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>
|
<h3>{{t "Profile picture" }}</h3>
|
||||||
{{> image_upload_widget
|
{{> image_upload_widget
|
||||||
widget = "user-avatar"
|
widget = "user-avatar"
|
||||||
upload_text = "Upload new profile picture"
|
upload_text = (t "Upload new profile picture")
|
||||||
delete_text = "Delete profile picture"
|
delete_text = (t "Delete profile picture")
|
||||||
is_editable_by_current_user = user_can_change_avatar
|
is_editable_by_current_user = user_can_change_avatar
|
||||||
image = page_params.avatar_url_medium}}
|
image = page_params.avatar_url_medium}}
|
||||||
<div id="user-avatar-source">
|
<div id="user-avatar-source">
|
||||||
|
|
|
@ -2,14 +2,14 @@
|
||||||
{{#if is_editable_by_current_user}}
|
{{#if is_editable_by_current_user}}
|
||||||
<div class="image_upload_button">
|
<div class="image_upload_button">
|
||||||
<div class="settings-page-image-background"></div>
|
<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>
|
||||||
<span class="settings-page-delete-text" aria-label="{{t delete_text }}" tabindex="0">
|
<span class="settings-page-delete-text" aria-label="{{ delete_text }}" tabindex="0">
|
||||||
{{t delete_text }}
|
{{ delete_text }}
|
||||||
</span>
|
</span>
|
||||||
<span class="settings-page-upload-text" aria-label="{{t upload_text }}" role="button" tabindex="0">
|
<span class="settings-page-upload-text" aria-label="{{ upload_text }}" role="button" tabindex="0">
|
||||||
{{t upload_text }}
|
{{ upload_text }}
|
||||||
</span>
|
</span>
|
||||||
<span class="upload-spinner-background">
|
<span class="upload-spinner-background">
|
||||||
<object class="image_upload_spinner" type="image/svg+xml" data="/static/images/tail-spin.svg"></object>
|
<object class="image_upload_spinner" type="image/svg+xml" data="/static/images/tail-spin.svg"></object>
|
||||||
|
@ -17,6 +17,6 @@
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<img class="image-block" src="{{ image }}"/>
|
<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 class="image_file_input_error text-error"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -29,8 +29,8 @@
|
||||||
<div class="realm-icon-section">
|
<div class="realm-icon-section">
|
||||||
{{> image_upload_widget
|
{{> image_upload_widget
|
||||||
widget = "realm-icon"
|
widget = "realm-icon"
|
||||||
upload_text = "Upload icon"
|
upload_text = (t "Upload icon")
|
||||||
delete_text = "Delete icon"
|
delete_text = (t "Delete icon")
|
||||||
is_editable_by_current_user = is_admin
|
is_editable_by_current_user = is_admin
|
||||||
image = realm_icon_url }}
|
image = realm_icon_url }}
|
||||||
</div>
|
</div>
|
||||||
|
@ -50,16 +50,16 @@
|
||||||
<div class="realm-logo-block realm-logo-section">
|
<div class="realm-logo-block realm-logo-section">
|
||||||
{{> image_upload_widget
|
{{> image_upload_widget
|
||||||
widget = "realm-day-logo"
|
widget = "realm-day-logo"
|
||||||
upload_text = "Upload logo"
|
upload_text = (t "Upload logo")
|
||||||
delete_text = "Delete logo"
|
delete_text = (t "Delete logo")
|
||||||
is_editable_by_current_user = user_can_change_logo
|
is_editable_by_current_user = user_can_change_logo
|
||||||
image = realm_icon_url }}
|
image = realm_icon_url }}
|
||||||
</div>
|
</div>
|
||||||
<div class="realm-logo-block realm-logo-section">
|
<div class="realm-logo-block realm-logo-section">
|
||||||
{{> image_upload_widget
|
{{> image_upload_widget
|
||||||
widget = "realm-night-logo"
|
widget = "realm-night-logo"
|
||||||
upload_text = "Upload logo"
|
upload_text = (t "Upload logo")
|
||||||
delete_text = "Delete logo"
|
delete_text = (t "Delete logo")
|
||||||
is_editable_by_current_user = user_can_change_logo
|
is_editable_by_current_user = user_can_change_logo
|
||||||
image = realm_icon_url }}
|
image = realm_icon_url }}
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue