mirror of https://github.com/zulip/zulip.git
settings org: Fix i18n in image_upload_widget.hbs.
Since our translation functions don't support passing a variable into them and still being found by manage.py makemessages, we need to use translation function before passing as variable into image_upload_widget.hbs file.
This commit is contained in:
parent
3a46f6ecca
commit
872d43713a
|
@ -156,8 +156,8 @@
|
|||
<h3>{{t "Profile picture" }}</h3>
|
||||
{{> image_upload_widget
|
||||
widget = "user-avatar"
|
||||
upload_text = "Upload new profile picture"
|
||||
delete_text = "Delete profile picture"
|
||||
upload_text = (t "Upload new profile picture")
|
||||
delete_text = (t "Delete profile picture")
|
||||
is_editable_by_current_user = user_can_change_avatar
|
||||
image = page_params.avatar_url_medium}}
|
||||
<div id="user-avatar-source">
|
||||
|
|
|
@ -2,14 +2,14 @@
|
|||
{{#if is_editable_by_current_user}}
|
||||
<div class="image_upload_button">
|
||||
<div class="settings-page-image-background"></div>
|
||||
<span class="settings-page-delete-button" aria-label="{{t delete_text }}" role="button" tabindex="0">
|
||||
<span class="settings-page-delete-button" aria-label="{{ delete_text }}" role="button" tabindex="0">
|
||||
×
|
||||
</span>
|
||||
<span class="settings-page-delete-text" aria-label="{{t delete_text }}" tabindex="0">
|
||||
{{t delete_text }}
|
||||
<span class="settings-page-delete-text" aria-label="{{ delete_text }}" tabindex="0">
|
||||
{{ delete_text }}
|
||||
</span>
|
||||
<span class="settings-page-upload-text" aria-label="{{t upload_text }}" role="button" tabindex="0">
|
||||
{{t upload_text }}
|
||||
<span class="settings-page-upload-text" aria-label="{{ upload_text }}" role="button" tabindex="0">
|
||||
{{ upload_text }}
|
||||
</span>
|
||||
<span class="upload-spinner-background">
|
||||
<object class="image_upload_spinner" type="image/svg+xml" data="/static/images/tail-spin.svg"></object>
|
||||
|
@ -17,6 +17,6 @@
|
|||
</div>
|
||||
{{/if}}
|
||||
<img class="image-block" src="{{ image }}"/>
|
||||
<input type="file" name="file_input" class="notvisible image_file_input" value="{{t upload_text }}" />
|
||||
<input type="file" name="file_input" class="notvisible image_file_input" value="{{ upload_text }}" />
|
||||
<div class="image_file_input_error text-error"></div>
|
||||
</div>
|
||||
|
|
|
@ -29,8 +29,8 @@
|
|||
<div class="realm-icon-section">
|
||||
{{> image_upload_widget
|
||||
widget = "realm-icon"
|
||||
upload_text = "Upload icon"
|
||||
delete_text = "Delete icon"
|
||||
upload_text = (t "Upload icon")
|
||||
delete_text = (t "Delete icon")
|
||||
is_editable_by_current_user = is_admin
|
||||
image = realm_icon_url }}
|
||||
</div>
|
||||
|
@ -50,16 +50,16 @@
|
|||
<div class="realm-logo-block realm-logo-section">
|
||||
{{> image_upload_widget
|
||||
widget = "realm-day-logo"
|
||||
upload_text = "Upload logo"
|
||||
delete_text = "Delete logo"
|
||||
upload_text = (t "Upload logo")
|
||||
delete_text = (t "Delete logo")
|
||||
is_editable_by_current_user = user_can_change_logo
|
||||
image = realm_icon_url }}
|
||||
</div>
|
||||
<div class="realm-logo-block realm-logo-section">
|
||||
{{> image_upload_widget
|
||||
widget = "realm-night-logo"
|
||||
upload_text = "Upload logo"
|
||||
delete_text = "Delete logo"
|
||||
upload_text = (t "Upload logo")
|
||||
delete_text = (t "Delete logo")
|
||||
is_editable_by_current_user = user_can_change_logo
|
||||
image = realm_icon_url }}
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue