improve localization
This commit is contained in:
parent
d97d413d7a
commit
bdcbcf66ea
6 changed files with 61 additions and 21 deletions
|
@ -30,6 +30,19 @@ zone-content-new-record-button = New record
|
|||
|
||||
## Create record
|
||||
|
||||
new-record-title = New record
|
||||
|
||||
record-creation-process-heading = Create a new record in zone { $zone }
|
||||
|
||||
record-choose-name-heading = Choose the subdomain name of the new record
|
||||
|
||||
record-input-name =
|
||||
.input-label = Subdomain of the new record
|
||||
.help-description = Only the subdomain, without the parent domain. For instance, "www" to create the subdomain "www.{ $zone }".
|
||||
.error-domain-characters_not_permitted = Domain name label "{ $label }" contains characters not permitted. The allowed characters are lowercase alphanumeric characters (a-z and 0-9), the dash ('-'), the underscore ('_') and the forward slash ('/').
|
||||
|
||||
button-create-record-next-step = Next step
|
||||
|
||||
record-input-addresses =
|
||||
.input-label = IP address #{ $index }
|
||||
.error-record-parse-ip = Unexpected IP address format. The IP address
|
||||
|
|
|
@ -30,6 +30,19 @@ zone-content-new-record-button = Nouvel enregistrement
|
|||
|
||||
## Create record
|
||||
|
||||
new-record-title = Nouvel enregistrement
|
||||
|
||||
record-creation-process-heading = Créer un nouvel enregistrement dans la zone { $zone }
|
||||
|
||||
record-choose-name-heading = Choisir le nom du sous-domaine du nouvel enregistrement
|
||||
|
||||
record-input-name =
|
||||
.input-label = Sous-domaine du nouvel enregistrement
|
||||
.help-description = Seulement le sous-domaine, sans le domaine parent. Par exemple, “www” pour créer le sous-domaine “www.{ $zone }”.
|
||||
.error-domain-characters_not_permitted = Le segment “{ $label }” du nom de domain contient des caractères interdits. Les caractères autorisés sont les caractères alphanumériques (a-z et 0-9), le tiret (“-”), le tiret bas (“_”) et le slash (“/”).
|
||||
|
||||
button-create-record-next-step = Étape suivante
|
||||
|
||||
record-input-addresses =
|
||||
.input-label = Adresse IP #{ $index }
|
||||
.error-record-parse-ip = Format d’adresse IP inconnu. L’adresse IP doit être
|
||||
|
|
|
@ -51,7 +51,10 @@ impl NewRecordQuery {
|
|||
errors,
|
||||
"/name"
|
||||
);
|
||||
self.name = new_name;
|
||||
// Keep the old value if the name is invalid
|
||||
if new_name.is_some() {
|
||||
self.name = new_name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,10 +1,14 @@
|
|||
{% extends "bases/app.html" %}
|
||||
{% import "macros/new_rrset.html" as new_rrset %}
|
||||
{% block title %}New record - {{ current_zone }} - {% endblock title %}
|
||||
{% block title %}{{ tr(msg="new-record-title", lang=lang) }} – {{ current_zone }} ‑ {% endblock title %}
|
||||
|
||||
{% block main %}
|
||||
<h1>Create a new record in zone {{ current_zone }}</h1>
|
||||
{{ errors | json_encode(pretty=true) }}
|
||||
<h1>{{ tr(msg="record-creation-process-heading", zone=current_zone, lang=lang) }}</h1>
|
||||
|
||||
|
||||
{% set domain_error = errors | get(key="/name", default="") %}
|
||||
|
||||
{{ domain_error | json_encode(pretty=true) }}
|
||||
{% if not new_record_name or (new_record_name and domain_error) %}
|
||||
{% include "pages/new_record/choose_name.html" %}
|
||||
{% elif not config and not rtype %}
|
||||
|
|
|
@ -1,21 +1,28 @@
|
|||
<h2>Choose the name of the new record</h2>
|
||||
<h2>{{ tr(msg="record-choose-name-heading", lang=lang) }}</h2>
|
||||
<form action="" method="GET">
|
||||
<label for="name">Name of the new record</label>
|
||||
{% set domain_error = errors | get(key="/name", default="") %}
|
||||
<div class="input-group">
|
||||
<input
|
||||
type="text"
|
||||
name="name"
|
||||
id="name"
|
||||
{% if domain_error %}aria-invalid="true"{% endif %}
|
||||
aria-describedby="{% if domain_error %}name-error {% endif %}subdomain-help"
|
||||
value="{{ new_record_name | default(value="") }}"
|
||||
>
|
||||
<span>.{{ current_zone }}</span>
|
||||
<div class="form-input">
|
||||
<label for="name">{{ tr(msg="record-input-name", attr="input-label", lang=lang) }}</label>
|
||||
<div class="input-group">
|
||||
<input
|
||||
type="text"
|
||||
name="name"
|
||||
id="name"
|
||||
{% if domain_error %}aria-invalid="true"{% endif %}
|
||||
aria-describedby="{% if domain_error %}name-error {% endif %}subdomain-help"
|
||||
value="{{ new_record_name | default(value="") }}"
|
||||
>
|
||||
<span>.{{ current_zone }}</span>
|
||||
</div>
|
||||
</div>
|
||||
{% if domain_error %}
|
||||
<p class="error" id="name-error">{{ domain_error.description }}</p>
|
||||
<p class="error" id="name-error">
|
||||
{{ tr(
|
||||
msg="record-input-name",
|
||||
attr="error-" ~ domain_error.code | replace(from=":", to="-"),
|
||||
extra_args=domain_error | get(key="details", default=""),
|
||||
lang=lang) }}
|
||||
</p>
|
||||
{% endif %}
|
||||
<p id="name-help">Only the subdomain, without the parent domain. For instance, "www" to create the subdomain "www.{{ current_zone }}".</p>
|
||||
<button type="submit">Next step</button>
|
||||
<p id="name-help">{{ tr(msg="record-input-name", attr="help-description", zone=current_zone, lang=lang) }}</p>
|
||||
<button type="submit">{{ tr(msg="button-create-record-next-step", lang=lang) }}</button>
|
||||
</form>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{% import "macros/display_rrset.html" as rrset %}
|
||||
{% extends "bases/app.html" %}
|
||||
|
||||
{% block title %}{{ tr(msg="zone-content-title", lang=lang) }} - {{ current_zone }} - {% endblock title %}
|
||||
{% block title %}{{ tr(msg="zone-content-title", lang=lang) }} – {{ current_zone }} – {% endblock title %}
|
||||
|
||||
{% block main %}
|
||||
<h1>{{ tr(msg="zone-header", lang=lang, zone_name="<strong>" ~ current_zone ~ "</strong>") | safe }}</h1>
|
||||
|
|
Loading…
Reference in a new issue