Merge pull request #4629 from caugner/fix-user-index-translate-boolean-values
FIX: Translate all boolean values in user index
This commit is contained in:
commit
1debf98d61
|
@ -175,13 +175,7 @@
|
||||||
|
|
||||||
<div class='display-row'>
|
<div class='display-row'>
|
||||||
<div class='field'>{{i18n 'admin.users.active'}}</div>
|
<div class='field'>{{i18n 'admin.users.active'}}</div>
|
||||||
<div class='value'>
|
<div class='value'>{{i18n-yes-no model.active}}</div>
|
||||||
{{#if model.active}}
|
|
||||||
{{i18n 'yes_value'}}
|
|
||||||
{{else}}
|
|
||||||
{{i18n 'no_value'}}
|
|
||||||
{{/if}}
|
|
||||||
</div>
|
|
||||||
<div class='controls'>
|
<div class='controls'>
|
||||||
{{#if model.active}}
|
{{#if model.active}}
|
||||||
{{#if model.can_deactivate}}
|
{{#if model.can_deactivate}}
|
||||||
|
@ -221,7 +215,7 @@
|
||||||
|
|
||||||
<div class='display-row'>
|
<div class='display-row'>
|
||||||
<div class='field'>{{i18n 'admin.user.admin'}}</div>
|
<div class='field'>{{i18n 'admin.user.admin'}}</div>
|
||||||
<div class='value'>{{model.admin}}</div>
|
<div class='value'>{{i18n-yes-no model.admin}}</div>
|
||||||
<div class='controls'>
|
<div class='controls'>
|
||||||
{{#if model.can_revoke_admin}}
|
{{#if model.can_revoke_admin}}
|
||||||
{{d-button action="revokeAdmin" icon="shield" label="admin.user.revoke_admin"}}
|
{{d-button action="revokeAdmin" icon="shield" label="admin.user.revoke_admin"}}
|
||||||
|
@ -234,7 +228,7 @@
|
||||||
|
|
||||||
<div class='display-row'>
|
<div class='display-row'>
|
||||||
<div class='field'>{{i18n 'admin.user.moderator'}}</div>
|
<div class='field'>{{i18n 'admin.user.moderator'}}</div>
|
||||||
<div class='value'>{{model.moderator}}</div>
|
<div class='value'>{{i18n-yes-no model.moderator}}</div>
|
||||||
<div class='controls'>
|
<div class='controls'>
|
||||||
{{#if model.can_revoke_moderation}}
|
{{#if model.can_revoke_moderation}}
|
||||||
{{d-button action="revokeModeration" icon="shield" label="admin.user.revoke_moderation"}}
|
{{d-button action="revokeModeration" icon="shield" label="admin.user.revoke_moderation"}}
|
||||||
|
@ -272,7 +266,7 @@
|
||||||
|
|
||||||
<div class="display-row {{if model.isSuspended 'highlight-danger'}}">
|
<div class="display-row {{if model.isSuspended 'highlight-danger'}}">
|
||||||
<div class='field'>{{i18n 'admin.user.suspended'}}</div>
|
<div class='field'>{{i18n 'admin.user.suspended'}}</div>
|
||||||
<div class='value'>{{model.isSuspended}}</div>
|
<div class='value'>{{i18n-yes-no model.isSuspended}}</div>
|
||||||
<div class='controls'>
|
<div class='controls'>
|
||||||
{{#if model.isSuspended}}
|
{{#if model.isSuspended}}
|
||||||
{{d-button class="btn-danger" action="unsuspend" icon="ban" label="admin.user.unsuspend"}}
|
{{d-button class="btn-danger" action="unsuspend" icon="ban" label="admin.user.unsuspend"}}
|
||||||
|
@ -303,7 +297,7 @@
|
||||||
|
|
||||||
<div class="display-row {{if model.blocked 'highlight-danger'}}">
|
<div class="display-row {{if model.blocked 'highlight-danger'}}">
|
||||||
<div class='field'>{{i18n 'admin.user.blocked'}}</div>
|
<div class='field'>{{i18n 'admin.user.blocked'}}</div>
|
||||||
<div class='value'>{{model.blocked}}</div>
|
<div class='value'>{{i18n-yes-no model.blocked}}</div>
|
||||||
<div class='controls'>
|
<div class='controls'>
|
||||||
{{#conditional-loading-spinner size="small" condition=model.blockingUser}}
|
{{#conditional-loading-spinner size="small" condition=model.blockingUser}}
|
||||||
{{#if model.blocked}}
|
{{#if model.blocked}}
|
||||||
|
@ -319,7 +313,7 @@
|
||||||
|
|
||||||
<div class="display-row">
|
<div class="display-row">
|
||||||
<div class='field'>{{i18n 'admin.user.staged'}}</div>
|
<div class='field'>{{i18n 'admin.user.staged'}}</div>
|
||||||
<div class='value'>{{model.staged}}</div>
|
<div class='value'>{{i18n-yes-no model.staged}}</div>
|
||||||
<div class='controls'>{{i18n 'admin.user.staged_explanation'}}</div>
|
<div class='controls'>{{i18n 'admin.user.staged_explanation'}}</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
import { registerUnbound } from 'discourse-common/lib/helpers';
|
import { registerUnbound } from 'discourse-common/lib/helpers';
|
||||||
|
|
||||||
registerUnbound('i18n', (key, params) => I18n.t(key, params));
|
registerUnbound('i18n', (key, params) => I18n.t(key, params));
|
||||||
|
registerUnbound('i18n-yes-no', (value, params) => I18n.t(value ? 'yes_value' : 'no_value', params));
|
||||||
|
|
Loading…
Reference in New Issue