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
|
## 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 =
|
record-input-addresses =
|
||||||
.input-label = IP address #{ $index }
|
.input-label = IP address #{ $index }
|
||||||
.error-record-parse-ip = Unexpected IP address format. The IP address
|
.error-record-parse-ip = Unexpected IP address format. The IP address
|
||||||
|
|
|
@ -30,6 +30,19 @@ zone-content-new-record-button = Nouvel enregistrement
|
||||||
|
|
||||||
## Create record
|
## 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 =
|
record-input-addresses =
|
||||||
.input-label = Adresse IP #{ $index }
|
.input-label = Adresse IP #{ $index }
|
||||||
.error-record-parse-ip = Format d’adresse IP inconnu. L’adresse IP doit être
|
.error-record-parse-ip = Format d’adresse IP inconnu. L’adresse IP doit être
|
||||||
|
|
|
@ -51,7 +51,10 @@ impl NewRecordQuery {
|
||||||
errors,
|
errors,
|
||||||
"/name"
|
"/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" %}
|
{% extends "bases/app.html" %}
|
||||||
{% import "macros/new_rrset.html" as new_rrset %}
|
{% 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 %}
|
{% block main %}
|
||||||
<h1>Create a new record in zone {{ current_zone }}</h1>
|
<h1>{{ tr(msg="record-creation-process-heading", zone=current_zone, lang=lang) }}</h1>
|
||||||
{{ errors | json_encode(pretty=true) }}
|
|
||||||
|
|
||||||
|
{% 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) %}
|
{% if not new_record_name or (new_record_name and domain_error) %}
|
||||||
{% include "pages/new_record/choose_name.html" %}
|
{% include "pages/new_record/choose_name.html" %}
|
||||||
{% elif not config and not rtype %}
|
{% 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">
|
<form action="" method="GET">
|
||||||
<label for="name">Name of the new record</label>
|
<div class="form-input">
|
||||||
{% set domain_error = errors | get(key="/name", default="") %}
|
<label for="name">{{ tr(msg="record-input-name", attr="input-label", lang=lang) }}</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
name="name"
|
name="name"
|
||||||
id="name"
|
id="name"
|
||||||
{% if domain_error %}aria-invalid="true"{% endif %}
|
{% if domain_error %}aria-invalid="true"{% endif %}
|
||||||
aria-describedby="{% if domain_error %}name-error {% endif %}subdomain-help"
|
aria-describedby="{% if domain_error %}name-error {% endif %}subdomain-help"
|
||||||
value="{{ new_record_name | default(value="") }}"
|
value="{{ new_record_name | default(value="") }}"
|
||||||
>
|
>
|
||||||
<span>.{{ current_zone }}</span>
|
<span>.{{ current_zone }}</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% if domain_error %}
|
{% 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 %}
|
{% endif %}
|
||||||
<p id="name-help">Only the subdomain, without the parent domain. For instance, "www" to create the subdomain "www.{{ current_zone }}".</p>
|
<p id="name-help">{{ tr(msg="record-input-name", attr="help-description", zone=current_zone, lang=lang) }}</p>
|
||||||
<button type="submit">Next step</button>
|
<button type="submit">{{ tr(msg="button-create-record-next-step", lang=lang) }}</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{% import "macros/display_rrset.html" as rrset %}
|
{% import "macros/display_rrset.html" as rrset %}
|
||||||
{% extends "bases/app.html" %}
|
{% 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 %}
|
{% block main %}
|
||||||
<h1>{{ tr(msg="zone-header", lang=lang, zone_name="<strong>" ~ current_zone ~ "</strong>") | safe }}</h1>
|
<h1>{{ tr(msg="zone-header", lang=lang, zone_name="<strong>" ~ current_zone ~ "</strong>") | safe }}</h1>
|
||||||
|
|
Loading…
Reference in a new issue