Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

templates: Replace unnecessary {{#tr}} blocks with {{t}} helper.

Anders Kaseorg83b68660188e
diff --git a/web/templates/about_zulip.hbs b/web/templates/about_zulip.hbs
index 7d993152129..aa70e18bb7e 100644
--- a/web/templates/about_zulip.hbs
+++ b/web/templates/about_zulip.hbs
@@ -8,15 +8,11 @@
<p>
<strong>Zulip Server</strong>
<br />
- {{#tr}}
- Version {zulip_version}
- {{/tr}}
+ {{t "Version {zulip_version}" }}
<i class="fa fa-copy tippy-zulip-tooltip" data-tippy-content="{{t 'Copy version' }}" data-tippy-placement="right" data-clipboard-text="{{zulip_version}}"></i>
{{#if is_fork}}
<br />
- {{#tr}}
- Forked from upstream at {zulip_merge_base}
- {{/tr}}
+ {{t "Forked from upstream at {zulip_merge_base}" }}
<i class="fa fa-copy tippy-zulip-tooltip" data-tippy-content="{{t 'Copy version' }}" data-tippy-placement="right" data-clipboard-text="{{zulip_merge_base}}"></i>
{{/if}}
</p>
diff --git a/web/templates/actions_popover_content.hbs b/web/templates/actions_popover_content.hbs
index c637a7d9e47..257a1e9b098 100644
--- a/web/templates/actions_popover_content.hbs
+++ b/web/templates/actions_popover_content.hbs
@@ -45,7 +45,7 @@
<li>
<a class="reaction_button" data-message-id="{{message_id}}" tabindex="0">
<i class="fa fa-smile-o" aria-hidden="true"></i>
- {{#tr}}Add emoji reaction{{/tr}}
+ {{t "Add emoji reaction" }}
</a>
</li>
<hr />
@@ -121,7 +121,7 @@
{{#if should_display_read_receipts_option}}
<li>
<a class="view_read_receipts" data-message-id="{{message_id}}" tabindex="0">
- <i class="zulip-icon zulip-icon-readreceipts" aria-label="{{#tr}}View read receipts{{/tr}}"></i> {{t "View read receipts" }}
+ <i class="zulip-icon zulip-icon-readreceipts" aria-label="{{t 'View read receipts' }}"></i> {{t "View read receipts" }}
</a>
</li>
{{/if}}
diff --git a/web/templates/all_messages_sidebar_actions.hbs b/web/templates/all_messages_sidebar_actions.hbs
index 75a254bb560..0a34f5eb290 100644
--- a/web/templates/all_messages_sidebar_actions.hbs
+++ b/web/templates/all_messages_sidebar_actions.hbs
@@ -4,7 +4,7 @@
{{! tabindex="0" Makes anchor tag focusable. Needed for keyboard support. }}
<a tabindex="0" id="mark_all_messages_as_read">
<i class="fa fa-book" aria-hidden="true"></i>
- {{#tr}}Mark all messages as read{{/tr}}
+ {{t "Mark all messages as read" }}
</a>
</li>
</ul>
diff --git a/web/templates/bookend.hbs b/web/templates/bookend.hbs
index b156609c453..e9660785e0b 100644
--- a/web/templates/bookend.hbs
+++ b/web/templates/bookend.hbs
@@ -9,11 +9,11 @@
{{#if deactivated}}
{{t "This stream has been deactivated" }}
{{else if subscribed }}
- {{#tr}}You subscribed to stream {stream_name}{{/tr}}
+ {{t "You subscribed to stream {stream_name}" }}
{{else if just_unsubscribed }}
- {{#tr}}You unsubscribed from stream {stream_name}{{/tr}}
+ {{t "You unsubscribed from stream {stream_name}" }}
{{else}}
- {{#tr}}You are not subscribed to stream {stream_name}{{/tr}}
+ {{t "You are not subscribed to stream {stream_name}" }}
{{/if}}
</span>
{{/if}}
diff --git a/web/templates/compose.hbs b/web/templates/compose.hbs
index a8d9cefcef3..dacdedabd7e 100644
--- a/web/templates/compose.hbs
+++ b/web/templates/compose.hbs
@@ -145,7 +145,7 @@
<template id="add-global-time-tooltip">
<div>
- <span>{{#tr}}Add global time{{/tr}}</span><br/>
- <span class="tooltip-inner-content italic">{{#tr}}Everyone sees global times in their own time zone.{{/tr}}</span>
+ <span>{{t "Add global time" }}</span><br/>
+ <span class="tooltip-inner-content italic">{{t "Everyone sees global times in their own time zone." }}</span>
</div>
</template>
diff --git a/web/templates/confirm_dialog/confirm_deactivate_own_user.hbs b/web/templates/confirm_dialog/confirm_deactivate_own_user.hbs
index 9a545a31e54..c11a52bacd7 100644
--- a/web/templates/confirm_dialog/confirm_deactivate_own_user.hbs
+++ b/web/templates/confirm_dialog/confirm_deactivate_own_user.hbs
@@ -1,3 +1,3 @@
-<p>{{#tr}}By deactivating your account, you will be logged out immediately.{{/tr}}</p>
+<p>{{t "By deactivating your account, you will be logged out immediately." }}</p>
<p>{{t "Note that any bots that you maintain will be disabled." }}</p>
<p>{{t "Are you sure you want to deactivate your account?"}}</p>
diff --git a/web/templates/confirm_dialog/confirm_deactivate_user.hbs b/web/templates/confirm_dialog/confirm_deactivate_user.hbs
index bac75f92db3..1be9751fb36 100644
--- a/web/templates/confirm_dialog/confirm_deactivate_user.hbs
+++ b/web/templates/confirm_dialog/confirm_deactivate_user.hbs
@@ -22,17 +22,13 @@
<label class="checkbox">
<input type="checkbox" class="send_email" data-key="{{ key }}" />
<span></span>
- {{#tr}}
- Notify this user by email?
- {{/tr}}
+ {{t "Notify this user by email?" }}
</label>
</div>
<div class="email_field">
<p class="border-top">
<strong>{{t "Subject" }}:</strong>
- {{#tr}}
- Notification of account deactivation on {realm_name}
- {{/tr}}
+ {{t "Notification of account deactivation on {realm_name}" }}
</p>
<div class="email-body">
<p>
diff --git a/web/templates/confirm_dialog/confirm_delete_all_drafts.hbs b/web/templates/confirm_dialog/confirm_delete_all_drafts.hbs
index 5c70d8b3e06..8619bb2b58b 100644
--- a/web/templates/confirm_dialog/confirm_delete_all_drafts.hbs
+++ b/web/templates/confirm_dialog/confirm_delete_all_drafts.hbs
@@ -1,5 +1,3 @@
<p>
- {{#tr}}
- Are you sure you want to delete all drafts? This action cannot be undone.
- {{/tr}}
+ {{t "Are you sure you want to delete all drafts? This action cannot be undone." }}
</p>
diff --git a/web/templates/confirm_dialog/confirm_delete_profile_field_option.hbs b/web/templates/confirm_dialog/confirm_delete_profile_field_option.hbs
index 7f194e528a8..77bb2ab1dc0 100644
--- a/web/templates/confirm_dialog/confirm_delete_profile_field_option.hbs
+++ b/web/templates/confirm_dialog/confirm_delete_profile_field_option.hbs
@@ -15,9 +15,9 @@
<p>
<div>
{{#if (eq deleted_options_count 1)}}
- {{#tr}}Deleted option:{{/tr}}
+ {{t "Deleted option:" }}
{{else}}
- {{#tr}}Deleted options:{{/tr}}
+ {{t "Deleted options:" }}
{{/if}}
</div>
<ul>
diff --git a/web/templates/confirm_dialog/confirm_delete_user.hbs b/web/templates/confirm_dialog/confirm_delete_user.hbs
index 07853f9c89e..0c9ed911adb 100644
--- a/web/templates/confirm_dialog/confirm_delete_user.hbs
+++ b/web/templates/confirm_dialog/confirm_delete_user.hbs
@@ -1,5 +1,3 @@
<p>
- {{#tr}}
- This action cannot be undone.
- {{/tr}}
+ {{t "This action cannot be undone." }}
</p>
diff --git a/web/templates/confirm_dialog/confirm_delete_user_avatar.hbs b/web/templates/confirm_dialog/confirm_delete_user_avatar.hbs
index 030cad606bb..01abc34f6ba 100644
--- a/web/templates/confirm_dialog/confirm_delete_user_avatar.hbs
+++ b/web/templates/confirm_dialog/confirm_delete_user_avatar.hbs
@@ -1,5 +1,3 @@
<p>
- {{#tr}}
- Are you sure you want to delete your profile picture?
- {{/tr}}
+ {{t "Are you sure you want to delete your profile picture?" }}
</p>
diff --git a/web/templates/confirm_dialog/confirm_mark_all_as_read.hbs b/web/templates/confirm_dialog/confirm_mark_all_as_read.hbs
index ada6a582a10..fa740fb8df8 100644
--- a/web/templates/confirm_dialog/confirm_mark_all_as_read.hbs
+++ b/web/templates/confirm_dialog/confirm_mark_all_as_read.hbs
@@ -1,5 +1,3 @@
<p>
- {{#tr}}
- Are you sure you want to mark all messages as read? This action cannot be undone.
- {{/tr}}
+ {{t "Are you sure you want to mark all messages as read? This action cannot be undone." }}
</p>
diff --git a/web/templates/confirm_dialog/confirm_subscription_invites_warning.hbs b/web/templates/confirm_dialog/confirm_subscription_invites_warning.hbs
index 4a62a6fc6e3..539f37bc9fd 100644
--- a/web/templates/confirm_dialog/confirm_subscription_invites_warning.hbs
+++ b/web/templates/confirm_dialog/confirm_subscription_invites_warning.hbs
@@ -1,5 +1,3 @@
<p>
- {{#tr}}
- Are you sure you want to create stream ''''{stream_name}'''' and subscribe {count} users to it?
- {{/tr}}
+ {{t "Are you sure you want to create stream ''''{stream_name}'''' and subscribe {count} users to it?" }}
</p>
diff --git a/web/templates/confirm_dialog/confirm_unstar_all_messages.hbs b/web/templates/confirm_dialog/confirm_unstar_all_messages.hbs
index d9c1e8e3b9e..1217fe69fb9 100644
--- a/web/templates/confirm_dialog/confirm_unstar_all_messages.hbs
+++ b/web/templates/confirm_dialog/confirm_unstar_all_messages.hbs
@@ -1,5 +1,3 @@
<p>
- {{#tr}}
- Are you sure you want to unstar all starred messages? This action cannot be undone.
- {{/tr}}
+ {{t "Are you sure you want to unstar all starred messages? This action cannot be undone." }}
</p>
diff --git a/web/templates/default_language_modal.hbs b/web/templates/default_language_modal.hbs
index 9eeb9757663..6553027d7d1 100644
--- a/web/templates/default_language_modal.hbs
+++ b/web/templates/default_language_modal.hbs
@@ -1,8 +1,6 @@
<p>
- {{#tr}}
- A language is marked as 100% translated only if every string in the web, desktop,
- and mobile apps is translated, including administrative UI and error messages.
- {{/tr}}
+ {{t "A language is marked as 100% translated only if every string in the web, desktop,
+ and mobile apps is translated, including administrative UI and error messages." }}
</p>
<p>
{{#tr}}
diff --git a/web/templates/draft.hbs b/web/templates/draft.hbs
index 26e609615c5..46c2f6be4a8 100644
--- a/web/templates/draft.hbs
+++ b/web/templates/draft.hbs
@@ -21,7 +21,7 @@
<div class="message_header message_header_private_message dark_background">
<div class="message-header-contents">
<div class="message_label_clickable stream_label">
- {{#tr}}You and {recipients}{{/tr}}
+ {{t "You and {recipients}" }}
</div>
<div class="recipient_row_date" title="{{t 'Last modified'}}">{{ time_stamp }}</div>
</div>
diff --git a/web/templates/draft_table_body.hbs b/web/templates/draft_table_body.hbs
index 212ad9693e0..862d206ba3a 100644
--- a/web/templates/draft_table_body.hbs
+++ b/web/templates/draft_table_body.hbs
@@ -7,7 +7,7 @@
<span class="exit-sign">&times;</span>
</div>
<div class="removed-drafts">
- {{#tr}}Drafts are not synced to other devices and browsers.{{/tr}}
+ {{t "Drafts are not synced to other devices and browsers." }}
<br />
{{#tr}}Drafts older than <strong>{draft_lifetime}</strong> days are automatically removed.{{/tr}}
</div>
diff --git a/web/templates/drafts_sidebar_action.hbs b/web/templates/drafts_sidebar_action.hbs
index 716f002a010..066f9af3891 100644
--- a/web/templates/drafts_sidebar_action.hbs
+++ b/web/templates/drafts_sidebar_action.hbs
@@ -4,7 +4,7 @@
{{! tabindex="0" Makes anchor tag focusable. Needed for keyboard support. }}
<a tabindex="0" id="delete_all_drafts_sidebar">
<i class="fa fa-trash-o" aria-hidden="true"></i>
- {{#tr}}Delete all drafts{{/tr}}
+ {{t "Delete all drafts" }}
</a>
</li>
</ul>
diff --git a/web/templates/edited_notice.hbs b/web/templates/edited_notice.hbs
index 2135e950560..7e620905e69 100644
--- a/web/templates/edited_notice.hbs
+++ b/web/templates/edited_notice.hbs
@@ -1,13 +1,13 @@
{{#if msg/local_edit_timestamp}}
-<div class="message_edit_notice auto-select" title="{{#tr}}Edited ({last_edit_timestr}){{/tr}}">
+<div class="message_edit_notice auto-select" title="{{t 'Edited ({last_edit_timestr})' }}">
{{t "SAVING" }}
</div>
{{else if moved}}
-<div class="message_edit_notice auto-select" title="{{#tr}}Moved ({last_edit_timestr}){{/tr}}">
+<div class="message_edit_notice auto-select" title="{{t 'Moved ({last_edit_timestr})' }}">
{{t "MOVED" }}
</div>
{{else}}
-<div class="message_edit_notice auto-select" title="{{#tr}}Edited ({last_edit_timestr}){{/tr}}">
+<div class="message_edit_notice auto-select" title="{{t 'Edited ({last_edit_timestr})' }}">
{{t "EDITED" }}
</div>
{{/if}}
diff --git a/web/templates/empty_feed_notice.hbs b/web/templates/empty_feed_notice.hbs
index ab32dcd0877..1937429b209 100644
--- a/web/templates/empty_feed_notice.hbs
+++ b/web/templates/empty_feed_notice.hbs
@@ -2,7 +2,7 @@
<h4> {{ title }} </h4>
{{#if (or search_data.query_words search.topic_query search_data.stream_query)}}
<div>
- {{#if search_data.has_stop_word}}{{#tr}}Some common words were excluded from your search.{{/tr}} <br/>{{/if}}{{#tr}}You searched for:{{/tr}}
+ {{#if search_data.has_stop_word}}{{t "Some common words were excluded from your search." }} <br/>{{/if}}{{t "You searched for:" }}
{{#if search_data.stream_query}}
<span>stream: {{search_data.stream_query}}</span>
{{/if}}
diff --git a/web/templates/gear_menu.hbs b/web/templates/gear_menu.hbs
index 002a4f0943c..de98ad88308 100644
--- a/web/templates/gear_menu.hbs
+++ b/web/templates/gear_menu.hbs
@@ -28,7 +28,7 @@
{{/if}}
{{#if (and is_plan_limited is_owner) }}
<li class="org-info org-upgrade small-font-size">
- <a href="/upgrade" target="_blank" rel="noopener noreferrer" role="menuitem">{{#tr}}Upgrade to {standard_plan_name}{{/tr}}</a>
+ <a href="/upgrade" target="_blank" rel="noopener noreferrer" role="menuitem">{{t "Upgrade to {standard_plan_name}" }}</a>
</li>
{{/if}}
{{#if is_plan_limited }}
diff --git a/web/templates/login_to_access.hbs b/web/templates/login_to_access.hbs
index b98860c278b..421f7e3d9d1 100644
--- a/web/templates/login_to_access.hbs
+++ b/web/templates/login_to_access.hbs
@@ -3,9 +3,7 @@
<div class="modal__container" role="dialog" aria-modal="true" aria-labelledby="login_to_access_modal_label">
<header class="modal__header">
<h1 class="modal__title" id="login_to_access_modal_label">
- {{#tr}}
- Join {realm_name}
- {{/tr}}
+ {{t "Join {realm_name}" }}
</h1>
<button class="modal__close" aria-label="{{t 'Close modal' }}" data-micromodal-close></button>
</header>
@@ -19,10 +17,8 @@
</p>
{{/if}}
<p>
- {{#tr}}
- You can fully access this community and participate in conversations
- by creating a Zulip account in this organization.
- {{/tr}}
+ {{t "You can fully access this community and participate in conversations
+ by creating a Zulip account in this organization." }}
</p>
</main>
<footer class="modal__footer">
diff --git a/web/templates/message_controls.hbs b/web/templates/message_controls.hbs
index 211c53adc79..828e9d47ddb 100644
--- a/web/templates/message_controls.hbs
+++ b/web/templates/message_controls.hbs
@@ -2,35 +2,35 @@
{{#if msg/sent_by_me}}
<div class="edit_content message_control_button" data-tooltip-template-id="view-source-tooltip-template"></div>
<template id="edit-content-tooltip-template">
- {{#tr}}Edit message{{/tr}}
+ {{t "Edit message" }}
{{tooltip_hotkey_hints "E"}}
</template>
<template id="move-message-tooltip-template">
- {{#tr}}Move message{{/tr}}
+ {{t "Move message" }}
{{tooltip_hotkey_hints "M"}}
</template>
<template id="view-source-tooltip-template">
- {{#tr}}View message source{{/tr}}
+ {{t "View message source" }}
{{tooltip_hotkey_hints "E"}}
</template>
{{/if}}
{{#unless msg/sent_by_me}}
<div class="reaction_button message_control_button" data-tooltip-template-id="add-emoji-tooltip-template">
- <i class="fa fa-smile-o" aria-label="{{#tr}}Add emoji reaction{{/tr}} (:)" role="button" aria-haspopup="true" tabindex="0"></i>
+ <i class="fa fa-smile-o" aria-label="{{t 'Add emoji reaction' }} (:)" role="button" aria-haspopup="true" tabindex="0"></i>
</div>
<template id="add-emoji-tooltip-template">
- {{#tr}}Add emoji reaction{{/tr}}
+ {{t "Add emoji reaction" }}
{{tooltip_hotkey_hints ":"}}
</template>
{{/unless}}
{{#unless msg/locally_echoed}}
<div class="actions_hover message_control_button" data-tooltip-template-id="message-actions-tooltip-template" >
- <i class="zulip-icon zulip-icon-ellipsis-v-solid" role="button" aria-haspopup="true" tabindex="0" aria-label="{{#tr}}Message actions{{/tr}}"></i>
+ <i class="zulip-icon zulip-icon-ellipsis-v-solid" role="button" aria-haspopup="true" tabindex="0" aria-label="{{t 'Message actions' }}"></i>
</div>
<template id="message-actions-tooltip-template">
- {{#tr}}Message actions{{/tr}}
+ {{t "Message actions" }}
{{tooltip_hotkey_hints "I"}}
</template>
{{/unless}}
@@ -50,11 +50,11 @@
<i role="button" tabindex="0" class="star fa {{#if msg/starred}}fa-star{{else}}fa-star-o{{/if}}"></i>
</div>
<template id="star-message-tooltip-template">
- <span class="starred-status">{{#tr}}Star this message{{/tr}}</span>
+ <span class="starred-status">{{t "Star this message" }}</span>
{{tooltip_hotkey_hints "Ctrl" "S"}}
</template>
<template id="unstar-message-tooltip-template">
- <span class="starred-status">{{#tr}}Unstar this message{{/tr}}</span>
+ <span class="starred-status">{{t "Unstar this message" }}</span>
{{tooltip_hotkey_hints "Ctrl" "S"}}
</template>
{{/unless}}
diff --git a/web/templates/message_edit_form.hbs b/web/templates/message_edit_form.hbs
index b5cbfc0c7a7..daf5837e3e4 100644
--- a/web/templates/message_edit_form.hbs
+++ b/web/templates/message_edit_form.hbs
@@ -36,7 +36,7 @@
<span class="message_edit_countdown_timer"></span>
<span>
<i id="message_edit_tooltip" class="tippy-zulip-tooltip message_edit_tooltip fa fa-question-circle" aria-hidden="true"
- data-tippy-content="{{#tr}}This organization is configured to restrict editing of message content to {minutes_to_edit} minutes after it is sent.{{/tr}}">
+ data-tippy-content="{{t 'This organization is configured to restrict editing of message content to {minutes_to_edit} minutes after it is sent.' }}">
</i>
</span>
</div>
diff --git a/web/templates/message_hidden_dialog.hbs b/web/templates/message_hidden_dialog.hbs
index 46dbeba2727..689ad45bb4a 100644
--- a/web/templates/message_hidden_dialog.hbs
+++ b/web/templates/message_hidden_dialog.hbs
@@ -1,6 +1,6 @@
<p>
<em>
- {{#tr}}This message was hidden because you have muted the sender. {{/tr}}
- <a class="reveal_hidden_message">{{#tr}}Click here to reveal.{{/tr}}</a>
+ {{t "This message was hidden because you have muted the sender." }}
+ <a class="reveal_hidden_message">{{t "Click here to reveal." }}</a>
</em>
</p>
diff --git a/web/templates/navbar_alerts/bankruptcy.hbs b/web/templates/navbar_alerts/bankruptcy.hbs
index 798f06c8229..9a676ac05ea 100644
--- a/web/templates/navbar_alerts/bankruptcy.hbs
+++ b/web/templates/navbar_alerts/bankruptcy.hbs
@@ -11,7 +11,5 @@
</span>
</div>
<div data-step="2" style="display: none;">
- {{#tr}}
- Marking all messages as read…
- {{/tr}}
+ {{t "Marking all messages as read…" }}
</div>
diff --git a/web/templates/playground_links_popover_content.hbs b/web/templates/playground_links_popover_content.hbs
index e1c1e1929ea..fa984ba2cd4 100644
--- a/web/templates/playground_links_popover_content.hbs
+++ b/web/templates/playground_links_popover_content.hbs
@@ -3,9 +3,7 @@
{{#each playground_info}}
<li>
<a href="{{this/playground_url}}" target="_blank" rel="noopener noreferrer" class="popover_playground_link">
- {{#tr}}
- View in {name}
- {{/tr}}
+ {{t "View in {name}" }}
</a>
</li>
{{/each}}
diff --git a/web/templates/recipient_row.hbs b/web/templates/recipient_row.hbs
index 5e379c3e0a2..b370dedd776 100644
--- a/web/templates/recipient_row.hbs
+++ b/web/templates/recipient_row.hbs
@@ -6,7 +6,7 @@
<a class="message_label_clickable narrows_by_recipient stream_label {{color_class}}"
style="background: {{background_color}}; border-left-color: {{background_color}};"
href="{{stream_url}}"
- title="{{#tr}}Narrow to stream &quot;{display_recipient}&quot;{{/tr}}">
+ title="{{t 'Narrow to stream "{display_recipient}"' }}">
{{~! Icons for invite-only/web-public streams ~}}
{{~#if invite_only ~}}
<i class="fa fa-lock recipient-row-stream-icon" title="{{t 'This is a private stream' }}" aria-label="{{t 'This is a private stream' }}"></i>
@@ -28,7 +28,7 @@
{{! topic link }}
<a class="message_label_clickable narrows_by_topic"
href="{{topic_url}}"
- title="{{#tr}}Narrow to stream &quot;{display_recipient}&quot;, topic &quot;{topic}&quot;{{/tr}}">
+ title="{{t 'Narrow to stream "{display_recipient}", topic "{topic}"' }}">
{{#if use_match_properties}}
{{{match_topic}}}
{{else}}
@@ -66,13 +66,13 @@
{{#if topic_muted}}
<i class="zulip-icon zulip-icon-mute on_hover_topic_unmute recipient_bar_icon" data-stream-id="{{stream_id}}" data-topic-name="{{topic}}" data-tooltip-template-id="topic-unmute-tooltip-template" role="button" tabindex="0" aria-label="{{t 'Unmute topic' }}"></i>
<template id="topic-unmute-tooltip-template">
- {{#tr}}Unmute topic{{/tr}}
+ {{t "Unmute topic" }}
{{tooltip_hotkey_hints "M"}}
</template>
{{else}}
<i class="zulip-icon zulip-icon-mute on_hover_topic_mute recipient_bar_icon hidden-for-spectators" data-stream-id="{{stream_id}}" data-topic-name="{{topic}}" data-tooltip-template-id="topic-mute-tooltip-template" role="button" tabindex="0" aria-label="{{t 'Mute topic' }}"></i>
<template id="topic-mute-tooltip-template">
- {{#tr}}Mute topic{{/tr}}
+ {{t "Mute topic" }}
{{tooltip_hotkey_hints "M"}}
</template>
{{/if}}
@@ -87,8 +87,8 @@
<div class="message-header-contents">
<a class="message_label_clickable narrows_by_recipient stream_label"
href="{{pm_with_url}}"
- title="{{#tr}}Narrow to your direct messages with {display_reply_to}{{/tr}}">
- {{#tr}}You and {display_reply_to}{{/tr}}
+ title="{{t 'Narrow to your direct messages with {display_reply_to}' }}">
+ {{t "You and {display_reply_to}" }}
</a>
<span class="recipient_row_date {{#if show_recipient_bar_date}}{{else}}hide-date{{/if}}">{{{date}}}</span>
diff --git a/web/templates/settings/default_streams_list_admin.hbs b/web/templates/settings/default_streams_list_admin.hbs
index cabffd3e094..21d8fe184a7 100644
--- a/web/templates/settings/default_streams_list_admin.hbs
+++ b/web/templates/settings/default_streams_list_admin.hbs
@@ -1,6 +1,6 @@
<div id="admin-default-streams-list" class="settings-section" data-name="default-streams-list">
<div class="side-padded-container">
- <p>{{#tr}}Configure the default streams new users are subscribed to when joining your organization.{{/tr}}</p>
+ <p>{{t "Configure the default streams new users are subscribed to when joining your organization." }}</p>
</div>
{{#if is_admin}}
diff --git a/web/templates/settings/emoji_settings_admin.hbs b/web/templates/settings/emoji_settings_admin.hbs
index a7bb177279e..27fc1c1e863 100644
--- a/web/templates/settings/emoji_settings_admin.hbs
+++ b/web/templates/settings/emoji_settings_admin.hbs
@@ -3,7 +3,7 @@
{{> emoji_settings_tip}}
</div>
<p class="add-emoji-text {{#unless can_add_emojis}}hide{{/unless}}">
- {{#tr}}Add extra emoji for members of the {realm_name} organization.{{/tr}}
+ {{t "Add extra emoji for members of the {realm_name} organization." }}
</p>
<button id="add-custom-emoji-button" class="button rounded sea-green">
{{t 'Add a new emoji' }}
diff --git a/web/templates/settings/linkifier_settings_admin.hbs b/web/templates/settings/linkifier_settings_admin.hbs
index d51d0de9b0b..604ea64ed11 100644
--- a/web/templates/settings/linkifier_settings_admin.hbs
+++ b/web/templates/settings/linkifier_settings_admin.hbs
@@ -2,20 +2,16 @@
<div class="admin-table-wrapper">
<p>
- {{#tr}}
- Configure regular expression patterns that will be used to
- automatically transform any matching text in Zulip messages
- and topics into links.
- {{/tr}}
+ {{t "Configure regular expression patterns that will be used to
+ automatically transform any matching text in Zulip messages
+ and topics into links." }}
</p>
<p>
- {{#tr}}
- Linkifiers make it easy to refer to issues or tickets in
- third party issue trackers, like GitHub, Salesforce, Zendesk,
- and others. For instance, you can add a linkifier that
- automatically turns #2468 into a link to the GitHub issue
- in the Zulip repository with:
- {{/tr}}
+ {{t "Linkifiers make it easy to refer to issues or tickets in
+ third party issue trackers, like GitHub, Salesforce, Zendesk,
+ and others. For instance, you can add a linkifier that
+ automatically turns #2468 into a link to the GitHub issue
+ in the Zulip repository with:" }}
</p>
<ul>
<li>
diff --git a/web/templates/settings/playground_settings_admin.hbs b/web/templates/settings/playground_settings_admin.hbs
index 88af7937703..e64914fe437 100644
--- a/web/templates/settings/playground_settings_admin.hbs
+++ b/web/templates/settings/playground_settings_admin.hbs
@@ -12,10 +12,8 @@
{{/tr}}
</p>
<p>
- {{#tr}}
- For example, to configure a code playground for code blocks tagged as Python,
- you can set:
- {{/tr}}
+ {{t "For example, to configure a code playground for code blocks tagged as Python,
+ you can set:" }}
</p>
<ul>
<li>
diff --git a/web/templates/settings/upload_space_stats.hbs b/web/templates/settings/upload_space_stats.hbs
index 69076343463..c3e1ac0a233 100644
--- a/web/templates/settings/upload_space_stats.hbs
+++ b/web/templates/settings/upload_space_stats.hbs
@@ -1,5 +1,5 @@
<span>
- {{#tr}}Organization using {percent_used}% of {upload_quota}.{{/tr}}
+ {{t "Organization using {percent_used}% of {upload_quota}." }}
{{#if show_upgrade_message}}
{{#tr}}
<z-link>Upgrade</z-link> for more space.
diff --git a/web/templates/starred_messages_sidebar_actions.hbs b/web/templates/starred_messages_sidebar_actions.hbs
index d35f8dcab4e..5c95dace765 100644
--- a/web/templates/starred_messages_sidebar_actions.hbs
+++ b/web/templates/starred_messages_sidebar_actions.hbs
@@ -5,7 +5,7 @@
<li>
<a tabindex="0" id="unstar_all_messages">
<i class="fa fa-star-o" aria-hidden="true"></i>
- {{#tr}}Unstar all messages{{/tr}}
+ {{t "Unstar all messages" }}
</a>
</li>
{{/if}}
@@ -13,10 +13,10 @@
<a tabindex="0" id="toggle_display_starred_msg_count">
{{#if starred_message_counts}}
<i class="fa fa-eye-slash" aria-hidden="true"></i>
- {{#tr}}Hide starred message count{{/tr}}
+ {{t "Hide starred message count" }}
{{else}}
<i class="fa fa-eye" aria-hidden="true"></i>
- {{#tr}}Show starred message count{{/tr}}
+ {{t "Show starred message count" }}
{{/if}}
</a>
</li>
diff --git a/web/templates/stream_settings/stream_settings.hbs b/web/templates/stream_settings/stream_settings.hbs
index 9bfbfb46c0e..0bd44817a53 100644
--- a/web/templates/stream_settings/stream_settings.hbs
+++ b/web/templates/stream_settings/stream_settings.hbs
@@ -5,9 +5,9 @@
<div class="sub_unsub_button_wrapper inline-block">
<button class="button small rounded subscribe-button sub_unsub_button {{#if should_display_subscription_button}}tippy-zulip-tooltip{{/if}} {{#unless subscribed }}unsubscribed{{/unless}}" type="button" name="button" {{#if should_display_subscription_button}}data-tippy-content="{{t 'Toggle subscription'}} (S)" {{else}}disabled="disabled"{{/if}}>
{{#if subscribed }}
- {{#tr}}Unsubscribe{{/tr}}
+ {{t "Unsubscribe" }}
{{else}}
- {{#tr}}Subscribe{{/tr}}
+ {{t "Subscribe" }}
{{/if}}
</button>
</div>
@@ -74,7 +74,7 @@
</p>
<p>
<button class="button rounded copy_email_button" type="button" name="button">
- <span class="copy_button">{{#tr}}Generate email address{{/tr}}</span>
+ <span class="copy_button">{{t "Generate email address" }}</span>
</button>
</p>
</div>
diff --git a/web/templates/stream_settings/stream_types.hbs b/web/templates/stream_settings/stream_types.hbs
index 1d87ffd8c46..65a5b0c708a 100644
--- a/web/templates/stream_settings/stream_types.hbs
+++ b/web/templates/stream_settings/stream_types.hbs
@@ -62,7 +62,7 @@
class="stream_message_retention_setting prop-element settings_select bootstrap-focus-style"
id="id_message_retention_days"
data-setting-widget-type="message-retention-setting">
- <option value="realm_default">{{#tr}}Use organization level settings {org_level_message_retention_setting}{{/tr}}</option>
+ <option value="realm_default">{{t "Use organization level settings {org_level_message_retention_setting}" }}</option>
<option value="unlimited">{{t 'Retain forever' }}</option>
<option value="custom_period">{{t 'Custom' }}</option>
</select>
diff --git a/web/templates/topic_sidebar_actions.hbs b/web/templates/topic_sidebar_actions.hbs
index 74ce448407f..96c4c591d73 100644
--- a/web/templates/topic_sidebar_actions.hbs
+++ b/web/templates/topic_sidebar_actions.hbs
@@ -28,7 +28,7 @@
<li class="hidden-for-spectators">
<a tabindex="0" class="sidebar-popover-unstar-all-in-topic" data-stream-id="{{ stream_id }}" data-topic-name="{{ topic_name }}">
<i class="fa fa-star-o" aria-hidden="true"></i>
- {{#tr}}Unstar all messages in topic{{/tr}}
+ {{t "Unstar all messages in topic" }}
</a>
</li>
{{/if}}
diff --git a/web/templates/typing_notification.hbs b/web/templates/typing_notification.hbs
index a92af25dca4..5eed7eaee96 100644
--- a/web/templates/typing_notification.hbs
+++ b/web/templates/typing_notification.hbs
@@ -1 +1 @@
-<li data-email="{{this.email}}" class="typing_notification">{{#tr}}{full_name} is typing…{{/tr}}</li>
+<li data-email="{{this.email}}" class="typing_notification">{{t "{full_name} is typing…" }}</li>
diff --git a/web/templates/user_info_popover_content.hbs b/web/templates/user_info_popover_content.hbs
index d6e117694e6..48781bdd076 100644
--- a/web/templates/user_info_popover_content.hbs
+++ b/web/templates/user_info_popover_content.hbs
@@ -30,21 +30,21 @@
</div>
{{/if}}
{{else}}
- <li class="user_popover_email half-opacity italic">{{#if is_bot}}{{#tr}}This bot has been deactivated.{{/tr}}{{else}}{{#tr}}This user has been deactivated.{{/tr}}{{/if}}</li>
+ <li class="user_popover_email half-opacity italic">{{#if is_bot}}{{t "This bot has been deactivated." }}{{else}}{{t "This user has been deactivated." }}{{/if}}</li>
{{/if}}
{{#if is_bot}}
{{#if bot_owner}}
- <li class="bot_owner" data-tippy-content="{{ bot_owner.full_name }}">{{#tr}}Bot owner{{/tr}}:
+ <li class="bot_owner" data-tippy-content="{{ bot_owner.full_name }}">{{t "Bot owner" }}:
<span class="bot-owner-name view_user_profile" data-user-id='{{ bot_owner.user_id }}'>
{{bot_owner.full_name}}
</span>
</li>
{{else if is_system_bot}}
- <li>{{#tr}}System bot{{/tr}}</li>
+ <li>{{t "System bot" }}</li>
{{else}}
- <li>{{#tr}}Bot{{/tr}}</li>
+ <li>{{t "Bot" }}</li>
{{/if}}
{{else}}
<li>{{ user_type }}</li>
@@ -52,13 +52,13 @@
{{!-- Display selected custom profile fields in this popover. --}}
{{> user_custom_profile_fields profile_fields=display_profile_fields for_user_info_popover=true}}
- <li class="only-visible-for-spectators">{{#tr}}Joined {date_joined}{{/tr}}</li>
+ <li class="only-visible-for-spectators">{{t "Joined {date_joined}" }}</li>
{{#if (or (and user_time is_active) is_me status_content_available) }}
<hr />
{{/if}}
{{#if (and user_time is_active)}}
- <li class="hidden-for-spectators local_time">{{#tr}}{user_time} local time{{/tr}}</li>
+ <li class="hidden-for-spectators local_time">{{t "{user_time} local time" }}</li>
{{/if}}
{{#if status_content_available}}
@@ -76,7 +76,7 @@
<span class="status_text">
{{status_text}}
{{#if is_me}}
- <span class="clear_status_button">(<a tabindex="0" class="clear_status">{{#tr}}clear{{/tr}}</a>)</span>
+ <span class="clear_status_button">(<a tabindex="0" class="clear_status">{{t "clear" }}</a>)</span>
{{/if}}
</span>
</span>
@@ -88,22 +88,22 @@
<a tabindex="0" class="update_status_text">
<i class="fa fa-comments" aria-hidden="true"></i>
{{#if status_text}}
- {{#tr}}Edit status{{/tr}}
+ {{t "Edit status" }}
{{else}}
- {{#tr}}Set a status{{/tr}}
+ {{t "Set a status" }}
{{/if}}
</a>
</li>
{{#if invisible_mode}}
<li>
<a tabindex="0" class="invisible_mode_turn_off">
- <i class="fa fa-circle-o" aria-hidden="true"></i> {{#tr}}Turn off invisible mode{{/tr}}
+ <i class="fa fa-circle-o" aria-hidden="true"></i> {{t "Turn off invisible mode" }}
</a>
</li>
{{else}}
<li>
<a tabindex="0" class="invisible_mode_turn_on">
- <i class="fa fa-circle-o" aria-hidden="true"></i> {{#tr}}Go invisible{{/tr}}
+ <i class="fa fa-circle-o" aria-hidden="true"></i> {{t "Go invisible" }}
</a>
</li>
{{/if}}
@@ -115,16 +115,16 @@
<li>
<a tabindex="0" class="view_full_user_profile">
{{#if is_me}}
- <i class="fa fa-user" aria-hidden="true"></i> {{#tr}}View your profile{{/tr}}
+ <i class="fa fa-user" aria-hidden="true"></i> {{t "View your profile" }}
{{else}}
- <i class="fa fa-user" aria-hidden="true"></i> {{#tr}}View profile{{/tr}}
+ <i class="fa fa-user" aria-hidden="true"></i> {{t "View profile" }}
{{/if}}
</a>
</li>
{{#if can_send_private_message}}
<li>
<a tabindex="0" class="{{ private_message_class }}">
- <i class="fa fa-comment" aria-hidden="true"></i> {{#tr}}Send direct message{{/tr}} {{#if is_sender_popover}}<span class="hotkey-hint">(R)</span>{{/if}}
+ <i class="fa fa-comment" aria-hidden="true"></i> {{t "Send direct message" }} {{#if is_sender_popover}}<span class="hotkey-hint">(R)</span>{{/if}}
</a>
</li>
{{/if}}
@@ -133,13 +133,13 @@
{{#if has_message_context}}
<a tabindex="0" class="mention_user">
<i class="fa fa-at" aria-hidden="true"></i>
- {{#if is_bot}}{{#tr}}Reply mentioning bot{{/tr}}{{else}}{{#tr}}Reply mentioning user{{/tr}}{{/if}}
+ {{#if is_bot}}{{t "Reply mentioning bot" }}{{else}}{{t "Reply mentioning user" }}{{/if}}
{{#if is_sender_popover}}<span class="hotkey-hint">(@)</span>{{/if}}
</a>
{{else}}
<a tabindex="0" class="copy_mention_syntax" data-clipboard-text="{{ user_mention_syntax }}">
<i class="fa fa-at" aria-hidden="true"></i>
- {{#tr}}Copy mention syntax{{/tr}}
+ {{t "Copy mention syntax" }}
{{#if is_sender_popover}}<span class="hotkey-hint">(@)</span>{{/if}}
</a>
{{/if}}
@@ -148,7 +148,7 @@
{{#if is_me}}
<li>
<a href="/#settings/profile">
- <i class="fa fa-edit" aria-hidden="true"></i> {{#tr}}Edit your profile{{/tr}}
+ <i class="fa fa-edit" aria-hidden="true"></i> {{t "Edit your profile" }}
</a>
</li>
{{/if}}
@@ -157,15 +157,15 @@
<a href="{{ pm_with_url }}" class="narrow_to_private_messages">
<i class="fa fa-envelope" aria-hidden="true"></i>
{{#if is_me}}
- {{#tr}}View messages with yourself{{/tr}}
+ {{t "View messages with yourself" }}
{{else}}
- {{#tr}}View direct messages{{/tr}}
+ {{t "View direct messages" }}
{{/if}}
</a>
</li>
<li>
<a href="{{ sent_by_uri }}" class="narrow_to_messages_sent">
- <i class="fa fa-paper-plane" aria-hidden="true"></i> {{#tr}}View messages sent{{/tr}}
+ <i class="fa fa-paper-plane" aria-hidden="true"></i> {{t "View messages sent" }}
</a>
</li>
{{/unless}}
diff --git a/web/templates/user_info_popover_manage_menu.hbs b/web/templates/user_info_popover_manage_menu.hbs
index fa407f5b25c..d87c86289c4 100644
--- a/web/templates/user_info_popover_manage_menu.hbs
+++ b/web/templates/user_info_popover_manage_menu.hbs
@@ -2,14 +2,14 @@
{{#if can_mute }}
<li>
<a tabindex="0" class="sidebar-popover-mute-user">
- <i class="fa fa-eye-slash" aria-hidden="true"></i> {{#tr}}Mute this user{{/tr}}
+ <i class="fa fa-eye-slash" aria-hidden="true"></i> {{t "Mute this user" }}
</a>
</li>
{{/if}}
{{#if can_unmute}}
<li>
<a tabindex="0" class="sidebar-popover-unmute-user">
- <i class="fa fa-eye" aria-hidden="true"></i> {{#tr}}Unmute this user{{/tr}}
+ <i class="fa fa-eye" aria-hidden="true"></i> {{t "Unmute this user" }}
</a>
</li>
{{/if}}
@@ -17,13 +17,13 @@
{{#if is_active}}
<li>
<a tabindex="0" class="sidebar-popover-manage-user">
- <i class="fa fa-edit" aria-hidden="true"></i> {{#if is_bot}}{{#tr}}Manage this bot{{/tr}}{{else}}{{#tr}}Manage this user{{/tr}}{{/if}}
+ <i class="fa fa-edit" aria-hidden="true"></i> {{#if is_bot}}{{t "Manage this bot" }}{{else}}{{t "Manage this user" }}{{/if}}
</a>
</li>
{{else}}
<li>
<a tabindex="0" class="sidebar-popover-reactivate-user">
- <i class="fa fa-user-plus" aria-hidden="true"></i> {{#if is_bot}}{{#tr}}Reactivate this bot{{/tr}}{{else}}{{#tr}}Reactivate this user{{/tr}}{{/if}}
+ <i class="fa fa-user-plus" aria-hidden="true"></i> {{#if is_bot}}{{t "Reactivate this bot" }}{{else}}{{t "Reactivate this user" }}{{/if}}
</a>
</li>
{{/if}}
diff --git a/web/templates/user_profile_modal.hbs b/web/templates/user_profile_modal.hbs
index 08e27b1d515..07cfe3c2836 100644
--- a/web/templates/user_profile_modal.hbs
+++ b/web/templates/user_profile_modal.hbs
@@ -27,33 +27,33 @@
<div id="default-section">
{{#if email}}
<div id="email" class="default-field">
- <div class="name">{{#tr}}Email{{/tr}}</div>
+ <div class="name">{{t "Email" }}</div>
<div class="value">{{email}}</div>
</div>
{{/if}}
<div id="user-id" class="default-field">
- <div class="name">{{#tr}}User ID{{/tr}}</div>
+ <div class="name">{{t "User ID" }}</div>
<div class="value">{{user_id}}</div>
</div>
<div id="user-type" class="default-field">
- <div class="name">{{#tr}}Role{{/tr}}</div>
+ <div class="name">{{t "Role" }}</div>
{{#if is_bot}}
{{#if is_system_bot}}
- <div class="value">{{#tr}}System bot{{/tr}}</div>
+ <div class="value">{{t "System bot" }}</div>
{{else}}
- <div class="value">{{#tr}}Bot{{/tr}}</div>
+ <div class="value">{{t "Bot" }}</div>
{{/if}}
{{else}}
<div class="value">{{user_type}}</div>
{{/if}}
</div>
<div id="date-joined" class="default-field">
- <div class="name">{{#tr}}Joined{{/tr}}</div>
+ <div class="name">{{t "Joined" }}</div>
<div class="value">{{date_joined}}</div>
</div>
{{#if user_time}}
<div class="default-field">
- <div class="name">{{#tr}}Local time{{/tr}}</div>
+ <div class="name">{{t "Local time" }}</div>
<div class="value">{{user_time}}</div>
</div>
{{/if}}
@@ -69,12 +69,12 @@
<div id="content">
{{#if is_bot}}
<div class="field-section">
- <div class="name">{{#tr}}Bot type{{/tr}}</div>
+ <div class="name">{{t "Bot type" }}</div>
<div class="bot_info_value">{{bot_type}}</div>
</div>
{{#if bot_owner}}
<div class="field-section bot_owner_user_field" data-field-id="{{bot_owner.user_id}}">
- <div class="name">{{#tr}}Owner{{/tr}}</div>
+ <div class="name">{{t "Owner" }}</div>
<div class="pill-container not-editable">
<div class="input" contenteditable="false" style="display: none;"></div>
</div>