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

`{{#tr}}` supports HTML and allows translators to accidentally
introduce HTML, so it’s safer to use the `{{t}}` helper unless HTML is
needed.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2023-03-15 15:51:27 -07:00 committed by Tim Abbott
parent 8cd78d356f
commit 83b6866018
41 changed files with 109 additions and 145 deletions

View File

@ -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>

View File

@ -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}}

View File

@ -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>

View File

@ -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}}

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -1,5 +1,3 @@
<p>
{{#tr}}
This action cannot be undone.
{{/tr}}
{{t "This action cannot be undone." }}
</p>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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}}

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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}}

View File

@ -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}}

View File

@ -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 }}

View File

@ -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">

View File

@ -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}}

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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}}

View File

@ -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>

View File

@ -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}}

View File

@ -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' }}

View File

@ -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>

View File

@ -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>

View File

@ -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.

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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}}

View File

@ -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>

View File

@ -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}}

View File

@ -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}}

View File

@ -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>