mirror of
https://github.com/zulip/zulip.git
synced 2025-10-29 19:13:53 +00:00
subs: Replace tr block with t in subs handlebars template.
The `tr` block does clones the `options` array (which contains the entire subscriptions data set) very inefficiently, which leads to the rendering being very slow. We don't need a `tr` block here, as there is no dynamic content that needs to be replaced.
This commit is contained in:
committed by
Tim Abbott
parent
bbe326dd29
commit
ffb29ddaf1
@@ -24,9 +24,7 @@
|
||||
{{t "Stream permissions" }}
|
||||
</div>
|
||||
<div class="stream-creation-info">
|
||||
{{#tr this}}
|
||||
These settings are explained in detail in the <a target="_blank" href="/help/stream-permissions">help center</a>.
|
||||
{{/tr}}
|
||||
{{t 'These settings are explained in detail in the <a target="_blank" href="/help/stream-permissions">help center</a>.'}}
|
||||
</div>
|
||||
|
||||
{{ partial "stream_types" "is_public" true }}
|
||||
|
||||
@@ -2,32 +2,26 @@
|
||||
<li>
|
||||
<label class="radio">
|
||||
<input type="radio" name="privacy" value="public" {{#if is_public}}checked{{/if}} />
|
||||
{{#tr this}}
|
||||
<b>Public:</b> anyone can join; anyone can view complete message history without joining
|
||||
{{/tr}}
|
||||
{{t '<b>Public:</b> anyone can join; anyone can view complete message history without joining' }}
|
||||
</label>
|
||||
</li>
|
||||
<li>
|
||||
<label class="radio">
|
||||
<input type="radio" name="privacy" value="invite-only-public-history" {{#if is_private_with_public_history}}checked{{/if}} />
|
||||
{{#tr this}}
|
||||
<b>Private, shared history:</b> must be invited by a member; new members can view complete message history; hidden from non-administrator users
|
||||
{{/tr}}
|
||||
{{t '<b>Private, shared history:</b> must be invited by a member; new members can view complete message history; hidden from non-administrator users' }}
|
||||
</label>
|
||||
</li>
|
||||
<li>
|
||||
<label class="radio">
|
||||
<input type="radio" name="privacy" value="invite-only" {{#if is_private}}checked{{/if}} />
|
||||
{{#tr this}}
|
||||
<b>Private, protected history:</b> must be invited by a member; new members can only see messages sent after they join; hidden from non-administrator users
|
||||
{{/tr}}
|
||||
{{t '<b>Private, protected history:</b> must be invited by a member; new members can only see messages sent after they join; hidden from non-administrator users' }}
|
||||
</label>
|
||||
</li>
|
||||
<li>
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" name="is-announcement-only" value="is-announcement-only" {{#if is_announcement_only}}checked{{/if}}/>
|
||||
<span></span>
|
||||
{{#tr this}}Restrict posting to organization administrators{{/tr}}
|
||||
{{t 'Restrict posting to organization administrators' }}
|
||||
</label>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
Reference in New Issue
Block a user