Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
lint: Fix badly quoted strings tagged for translation.
Tim Abbott1d9b5ffa92e9
diff --git a/static/templates/copy_code_button.hbs b/static/templates/copy_code_button.hbsindex 3a072f0121b..41e56c1878b 100644--- a/static/templates/copy_code_button.hbs+++ b/static/templates/copy_code_button.hbs@@ -1,3 +1,3 @@-<button class="btn pull-left copy_button_base copy_codeblock tippy-zulip-tooltip" data-tippy-content="{{t "Copy code" }}" aria-label="{{t "Copy code" }}">+<button class="btn pull-left copy_button_base copy_codeblock tippy-zulip-tooltip" data-tippy-content="{{t 'Copy code' }}" aria-label="{{t 'Copy code' }}">{{> copy_to_clipboard_svg }}</button>diff --git a/static/templates/copy_invite_link.hbs b/static/templates/copy_invite_link.hbsindex ecd5d367a33..17ae6355d1d 100644--- a/static/templates/copy_invite_link.hbs+++ b/static/templates/copy_invite_link.hbs@@ -1,7 +1,7 @@{{t "Link:" }}<a href="{{ invite_link }}" id="multiuse_invite_link">{{ invite_link }}</a> -<a class="btn pull-right copy_button_base tippy-zulip-tooltip" data-tippy-content="{{t "Copy link" }}" aria-label="{{t "Copy link" }}"+<a class="btn pull-right copy_button_base tippy-zulip-tooltip" data-tippy-content="{{t 'Copy link' }}" aria-label="{{t 'Copy link' }}"id='copy_generated_invite_link' data-clipboard-text="{{ invite_link }}">{{> copy_to_clipboard_svg }}</a>diff --git a/static/templates/copy_message_button.hbs b/static/templates/copy_message_button.hbsindex 95ebc7f3d18..f04aa44b896 100644--- a/static/templates/copy_message_button.hbs+++ b/static/templates/copy_message_button.hbs@@ -1,3 +1,3 @@-<button class="btn pull-right copy_button_base copy_message tippy-zulip-tooltip" data-tippy-content="{{t "Copy and close" }}" aria-label="{{t "Copy and close" }}" >+<button class="btn pull-right copy_button_base copy_message tippy-zulip-tooltip" data-tippy-content="{{t 'Copy and close' }}" aria-label="{{t 'Copy and close' }}" >{{> copy_to_clipboard_svg }}</button>diff --git a/static/templates/edit_content_button.hbs b/static/templates/edit_content_button.hbsindex 1d2409de682..d6a90a34412 100644--- a/static/templates/edit_content_button.hbs+++ b/static/templates/edit_content_button.hbs@@ -1,5 +1,5 @@{{#if is_editable}}-<i class="fa fa-pencil edit_content_button" role="button" tabindex="0" aria-label="{{t "Edit" }} (e)" title="{{t "Edit" }} (e)"></i>+<i class="fa fa-pencil edit_content_button" role="button" tabindex="0" aria-label="{{t 'Edit' }} (e)" title="{{t 'Edit' }} (e)"></i>{{else}}-<i class="fa fa-file-code-o edit_content_button" role="button" tabindex="0" aria-label="{{t "View source" }} (e)" title="{{t "View source" }} (e)" data-message-id="{{msg_id}}"></i>+<i class="fa fa-file-code-o edit_content_button" role="button" tabindex="0" aria-label="{{t 'View source' }} (e)" title="{{t 'View source' }} (e)" data-message-id="{{msg_id}}"></i>{{/if}}diff --git a/static/templates/markdown_help.hbs b/static/templates/markdown_help.hbsindex 2decf7c588c..a733d76e019 100644--- a/static/templates/markdown_help.hbs+++ b/static/templates/markdown_help.hbs@@ -1,5 +1,5 @@<div class="overlay-modal hide" id="message-formatting" tabindex="-1" role="dialog"- aria-label="{{t "Message formatting" }}">+ aria-label="{{t 'Message formatting' }}"><div class="modal-body" data-simplebar data-simplebar-auto-hide="false"><div id="markdown-instructions"><table class="table table-striped table-condensed table-rounded table-bordered help-table">diff --git a/static/templates/new_stream_users.hbs b/static/templates/new_stream_users.hbsindex 49166dca2cf..6c223a68dd8 100644--- a/static/templates/new_stream_users.hbs+++ b/static/templates/new_stream_users.hbs@@ -19,7 +19,7 @@<br /><input class="add-user-list-filter" name="user_list_filter" type="text"- autocomplete="off" placeholder="{{t "Filter" }}" />+ autocomplete="off" placeholder="{{t 'Filter' }}" /><div>diff --git a/static/templates/settings/default_streams_list_admin.hbs b/static/templates/settings/default_streams_list_admin.hbsindex 0c180921a49..3ced901047b 100644--- a/static/templates/settings/default_streams_list_admin.hbs+++ b/static/templates/settings/default_streams_list_admin.hbs@@ -11,7 +11,7 @@<div class="settings-section-title">{{t "Add new default stream" }}</div><div class="inline-block" id="default_stream_inputs"><label for="default_stream_name">{{t "Stream name" }}</label>- <input class="create_default_stream" type="text" placeholder="{{t "Stream name" }}" name="stream_name" autocomplete="off" aria-label="{{t "Stream name" }}" />+ <input class="create_default_stream" type="text" placeholder="{{t 'Stream name' }}" name="stream_name" autocomplete="off" /></div><div class="inline-block"><button type="submit" id="do_submit_stream" class="button rounded sea-green">{{t "Add stream" }}</button>diff --git a/tools/linter_lib/custom_check.py b/tools/linter_lib/custom_check.pyindex 12e1150b6b2..33ed1aa4777 100644--- a/tools/linter_lib/custom_check.py+++ b/tools/linter_lib/custom_check.py@@ -745,6 +745,10 @@ handlebars_rules = RuleList("pattern": '{{t "[^"]+ " }}',"description": "Translatable strings should not have trailing spaces.",},+ {+ "pattern": r'"{{t "',+ "description": "Invalid quoting for HTML element with translated string.",+ },],)