mirror of
https://github.com/documize/community.git
synced 2025-07-24 23:59:47 +02:00
i18n space strings
This commit is contained in:
parent
4885a1b380
commit
97c4c927ac
6 changed files with 36 additions and 21 deletions
|
@ -24,6 +24,7 @@ export default Component.extend(AuthMixin, Notifier, {
|
|||
spaceSvc: service('folder'),
|
||||
iconSvc: service('icon'),
|
||||
localStorage: service('localStorage'),
|
||||
i18n: service(),
|
||||
isSpaceAdmin: computed('permissions', function() {
|
||||
return this.get('permissions.spaceOwner') || this.get('permissions.spaceManage');
|
||||
}),
|
||||
|
@ -120,9 +121,9 @@ export default Component.extend(AuthMixin, Notifier, {
|
|||
let folder = this.get('space');
|
||||
|
||||
let spaceTypeOptions = A([]);
|
||||
spaceTypeOptions.pushObject({id: constants.SpaceType.Private, label: 'Private - viewable only by me'});
|
||||
spaceTypeOptions.pushObject({id: constants.SpaceType.Protected, label: 'Protected - access is restricted to selected users'});
|
||||
spaceTypeOptions.pushObject({id: constants.SpaceType.Public, label: 'Public - can be seen by everyone'});
|
||||
spaceTypeOptions.pushObject({id: constants.SpaceType.Private, label: this.i18n.localize('personal_explain')});
|
||||
spaceTypeOptions.pushObject({id: constants.SpaceType.Protected, label: this.i18n.localize('protected_explain')});
|
||||
spaceTypeOptions.pushObject({id: constants.SpaceType.Public, label: this.i18n.localize('public_explain')});
|
||||
this.set('spaceTypeOptions', spaceTypeOptions);
|
||||
this.set('spaceType', spaceTypeOptions.findBy('id', folder.get('spaceType')));
|
||||
|
||||
|
@ -131,7 +132,7 @@ export default Component.extend(AuthMixin, Notifier, {
|
|||
if (this.get('allowLikes')) {
|
||||
this.set('likes', folder.get('likes'));
|
||||
} else {
|
||||
this.set('likes', 'Did this help you?');
|
||||
this.set('likes', this.i18n.localize('likes_prompt'));
|
||||
}
|
||||
|
||||
this.set('spaceName', this.get('space.name'));
|
||||
|
@ -184,7 +185,7 @@ export default Component.extend(AuthMixin, Notifier, {
|
|||
space.set('labelId', this.get('spaceLabel'));
|
||||
|
||||
this.get('spaceSvc').save(space).then(() => {
|
||||
this.notifySuccess('Saved');
|
||||
this.notifySuccess(this.i18n.localize('saved'));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<Ui::UiSpacer @size="200" />
|
||||
{{#ui/ui-toolbar dark=false light=true raised=true large=false bordered=true}}
|
||||
{{ui/ui-toolbar-icon icon=constants.Icon.AddUser color=constants.Color.Green tooltip=(localize 'space_admin_make_owner') onClick=(action "onOwner" space.id)}}
|
||||
{{ui/ui-toolbar-icon icon=constants.Icon.Delete color=constants.Color.Red tooltip=(localize 'space_admin_delete') onClick=(action "onShow" space.id)}}
|
||||
{{ui/ui-toolbar-icon icon=constants.Icon.Delete color=constants.Color.Red tooltip=(localize 'space_delete') onClick=(action "onShow" space.id)}}
|
||||
{{/ui/ui-toolbar}}
|
||||
</div>
|
||||
</li>
|
||||
|
|
|
@ -129,11 +129,11 @@
|
|||
</div>
|
||||
|
||||
{{#ui/ui-dialog title=(localize 'delete_documents') confirmCaption=(localize 'delete') buttonColor=constants.Color.Red show=showDeleteDialog onAction=(action "onDeleteDocuments")}}
|
||||
<p>Are you sure you want to delete {{selectedDocuments.length}} {{selectedCaption}}?</p>
|
||||
<p>{{localize 'delete_confirm'}} ({{selectedDocuments.length}} {{selectedCaption}})</p>
|
||||
{{/ui/ui-dialog}}
|
||||
|
||||
{{#ui/ui-dialog title=(localize 'move_documents') confirmCaption=(localize 'move') buttonColor=constants.Color.Green show=showMoveDialog onAction=(action "onMoveDocuments")}}
|
||||
<p>Select space for {{selectedDocuments.length}} {{selectedCaption}}</p>
|
||||
<p>{{localize 'space_change_prompt'}} ({{selectedDocuments.length}} {{selectedCaption}})</p>
|
||||
{{ui/ui-list-picker items=moveOptions nameField="name" singleSelect=true}}
|
||||
{{/ui/ui-dialog}}
|
||||
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
{{layout/logo-heading
|
||||
title="Delete Space"
|
||||
desc="Proceed with caution as there is no undo"
|
||||
title=(localize 'delete_space')
|
||||
desc=(localize 'no_undo')
|
||||
icon=constants.Icon.Delete}}
|
||||
|
||||
<form>
|
||||
<div class="form-group">
|
||||
<label>Please type space name to confirm</label>
|
||||
{{focus-input id="delete-space-name" type="text" value=deleteSpaceName class="form-control mousetrap" placeholder="Space name" autocomplete="off"}}
|
||||
<small class="form-text text-muted">This will delete all documents and templates within this space!</small>
|
||||
<label>{{localize 'space_delete_prompt'}}</label>
|
||||
{{focus-input id="delete-space-name" type="text" value=deleteSpaceName class="form-control mousetrap" placeholder=(localize 'name') autocomplete="off"}}
|
||||
<small class="form-text text-muted">{{localize 'space_delete_warn'}}</small>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
|
|
@ -5,19 +5,19 @@
|
|||
|
||||
<form role="form">
|
||||
<div class="form-group">
|
||||
<label>Name</label>
|
||||
<label>{{localize 'name'}}</label>
|
||||
{{focus-input id="space-name" type="text" value=spaceName class=(if hasNameError "form-control is-invalid" "form-control") placeholder="Space name" autocomplete="off"}}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Description</label>
|
||||
<label>{{localize 'description'}}</label>
|
||||
<div id="space-desc" class="wysiwyg wysiwyg-editor">
|
||||
{{{spaceDesc}}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Visibility</label>
|
||||
<label>{{localize 'visibility'}}</label>
|
||||
{{ui/ui-select id="spacetypes-dropdown" content=spaceTypeOptions optionValuePath="id" optionLabelPath="label" selection=spaceType action=(action "onSetSpaceType")}}
|
||||
</div>
|
||||
|
||||
|
@ -37,7 +37,7 @@
|
|||
<div class="form-group">
|
||||
<label>Label</label>
|
||||
<ul class="space-label-picker">
|
||||
<li class="label none {{if (eq spaceLabel "") "selected"}}" {{action "onSetLabel" ""}} role="button" tabindex="0">None</li>
|
||||
<li class="label none {{if (eq spaceLabel "") "selected"}}" {{action "onSetLabel" ""}} role="button" tabindex="0">{{localize 'none'}}</li>
|
||||
{{#each labels as |label|}}
|
||||
<li class="label {{if (eq spaceLabel label.id) "selected"}}" role="button" tabindex="0"
|
||||
style={{label.bgColor}}
|
||||
|
@ -49,15 +49,15 @@
|
|||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Enable Feedback</label>
|
||||
<label>{{localize 'feedback_enable'}}</label>
|
||||
{{x-toggle value=allowLikes size="medium" theme="light" onToggle=(action (mut allowLikes))}}
|
||||
</div>
|
||||
|
||||
{{#if allowLikes}}
|
||||
<div class="form-group">
|
||||
<label>Feedback Prompt</label>
|
||||
{{input type="text" id="space-likes-prompt" class="form-control" placeholder="Enter prompt asking for user feedback" value=likes}}
|
||||
<small class="form-text text-muted">Specify the prompt, e.g. Did this help you? Was this helpful? Did you find what you needed?</small>
|
||||
{{input type="text" id="space-likes-prompt" class="form-control" placeholder=(localize 'feedback_prompt_hint') value=likes}}
|
||||
<small class="form-text text-muted">{{localize 'feedback_prompt_explain'}}</small>
|
||||
</div>
|
||||
{{/if}}
|
||||
</form>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue