lint: Exclude Acme placeholders from translations.

These strings represented a small waste of time for our translators.
This commit is contained in:
Tim Abbott 2017-03-09 00:24:21 -08:00
parent ac20872f9d
commit 84d4f62abf
3 changed files with 7 additions and 3 deletions

View File

@ -14,7 +14,7 @@
</tbody>
<tfoot>
<tr id="add-alias-widget">
<td><input type="text" class="new-alias-domain" placeholder={{t "acme.com" }}></input></td>
<td><input type="text" class="new-alias-domain" placeholder="acme.com"></input></td>
<td><input type="checkbox" class="new-alias-allow-subdomains"></input></td>
<td><button type="button" class="btn btn-primary" id="submit-add-alias">{{t "Add" }}</button></td>
</tr>

View File

@ -78,7 +78,7 @@ Form is validated both client-side using jquery-validate (see signup.js) and ser
<div class="input-group grid">
<label for="id_team_name" class="inline-block label-title">{{ _('Organization name') }}</label>
<input id="id_team_name" class="required" type="text"
placeholder="{{ _("Acme") }}"
placeholder="Acme"
value="{% if form.realm_name.value() %}{{ form.realm_name.value() }}{% endif %}"
name="realm_name" maxlength="100" />
{% if form.realm_name.errors %}
@ -101,7 +101,7 @@ Form is validated both client-side using jquery-validate (see signup.js) and ser
</label>
<div class="breakpoint">
<input id="id_team_subdomain" class="required" type="text"
placeholder="{{ _("acme") }}"
placeholder="acme"
value="{% if form.realm_subdomain.value() %}{{ form.realm_subdomain.value() }}{% endif %}"
name="realm_subdomain" maxlength="40" />
{% if realms_have_subdomains %}

View File

@ -460,6 +460,10 @@ def build_custom_checkers(by_lang):
html_rules = whitespace_rules + prose_style_rules + [
{'pattern': 'placeholder="[^{]',
'description': "`placeholder` value should be translatable.",
'exclude_line': [('templates/zerver/register.html', 'placeholder="acme"'),
('templates/zerver/register.html', 'placeholder="Acme"'),
('static/templates/settings/realm-domains-modal.handlebars',
'<td><input type="text" class="new-alias-domain" placeholder="acme.com"></input></td>')],
'exclude': set(["static/templates/settings/emoji-settings-admin.handlebars",
"static/templates/settings/realm-filter-settings-admin.handlebars",
"static/templates/settings/bot-settings.handlebars"])},