diff --git a/gui/app/components/folder/documents-list.js b/gui/app/components/folder/documents-list.js index 67f29594..4e26758f 100644 --- a/gui/app/components/folder/documents-list.js +++ b/gui/app/components/folder/documents-list.js @@ -16,10 +16,11 @@ import Component from '@ember/component'; export default Component.extend({ localStorage: service(), + i18n: service(), showDeleteDialog: false, showMoveDialog: false, selectedDocuments: A([]), - selectedCaption: 'document', + selectedCaption: '', viewDensity: "1", showAdd: computed('permissions.documentAdd', 'documents', function() { @@ -35,6 +36,11 @@ export default Component.extend({ return _.isEmpty(this.get('categoryFilter')) && this.get('documents').length == this.get("numDocuments"); }), + init() { + this._super(...arguments); + this.selectedCaption = this.i18n.localize('document'); + }, + didReceiveAttrs() { this._super(...arguments); @@ -162,7 +168,7 @@ export default Component.extend({ list = _.without(list, documentId); } - this.set('selectedCaption', list.length > 1 ? 'documents' : 'document'); + this.set('selectedCaption', list.length > 1 ? this.i18n.localize('document') : this.i18n.localize('documents')); this.set('selectedDocuments', A(list)); }, diff --git a/gui/app/components/folder/space-toolbar.js b/gui/app/components/folder/space-toolbar.js index 571b9885..8aef45d7 100644 --- a/gui/app/components/folder/space-toolbar.js +++ b/gui/app/components/folder/space-toolbar.js @@ -27,6 +27,7 @@ export default Component.extend(ModalMixin, AuthMixin, Notifier, { session: service(), appMeta: service(), pinned: service(), + i18n: service(), spaceName: '', copyTemplate: true, copyPermission: true, @@ -252,7 +253,7 @@ export default Component.extend(ModalMixin, AuthMixin, Notifier, { let status = this.get('importStatus'); let documents = this.get('importedDocuments'); - status.pushObject(`Converting ${filename}...`); + status.pushObject(this.i18n.localize('import_convert', filename)); documents.push(filename); this.set('importStatus', status); @@ -263,7 +264,7 @@ export default Component.extend(ModalMixin, AuthMixin, Notifier, { let status = this.get('importStatus'); let documents = this.get('importedDocuments'); - status.pushObject(`Successfully converted ${filename}`); + status.pushObject(this.i18n.localize('import_success', filename)); documents.pop(filename); this.set('importStatus', status); @@ -301,7 +302,7 @@ export default Component.extend(ModalMixin, AuthMixin, Notifier, { this.get('documentSvc').export(spec).then((htmlExport) => { this.get('browserSvc').downloadFile(htmlExport, this.get('space.slug') + '.html'); - this.notifySuccess('Exported'); + this.notifySuccess(this.i18n.localize('exported')); }); this.modalClose("#space-export-modal"); diff --git a/gui/app/templates/components/customize/space-labels.hbs b/gui/app/templates/components/customize/space-labels.hbs index c7a7459d..a889bd0c 100644 --- a/gui/app/templates/components/customize/space-labels.hbs +++ b/gui/app/templates/components/customize/space-labels.hbs @@ -73,6 +73,6 @@ -{{#ui/ui-dialog title=(localize 'label_delete') confirmCaption="Delete" buttonColor=constants.Color.Red show=showDeleteDialog onAction=(action "onDelete")}} +{{#ui/ui-dialog title=(localize 'label_delete') confirmCaption=(localize 'delete') buttonColor=constants.Color.Red show=showDeleteDialog onAction=(action "onDelete")}}

{{localize 'label_delete_confirm' deleteLabel.name}}

{{/ui/ui-dialog}} diff --git a/gui/app/templates/components/folder/document-categories.hbs b/gui/app/templates/components/folder/document-categories.hbs index dec51e4e..ce83b8bd 100644 --- a/gui/app/templates/components/folder/document-categories.hbs +++ b/gui/app/templates/components/folder/document-categories.hbs @@ -2,7 +2,7 @@ {{#each categories as |cat|}} {{#if cat}}
- +
{{cat}}
{{/if}} diff --git a/gui/app/templates/components/folder/document-tags.hbs b/gui/app/templates/components/folder/document-tags.hbs index 4a71c4cb..10dd1ae7 100644 --- a/gui/app/templates/components/folder/document-tags.hbs +++ b/gui/app/templates/components/folder/document-tags.hbs @@ -1,6 +1,6 @@ {{#each tagz as |tg|}} {{#link-to "search" (query-params filter=tg matchTag=true matchContent=false matchFile=false matchDoc=false) class="hashtag"}} - +
{{tg}}
{{/link-to}} {{/each}} diff --git a/gui/app/templates/components/folder/documents-list.hbs b/gui/app/templates/components/folder/documents-list.hbs index 31f8e59b..4a1173cb 100644 --- a/gui/app/templates/components/folder/documents-list.hbs +++ b/gui/app/templates/components/folder/documents-list.hbs @@ -2,16 +2,16 @@
{{#ui/ui-toolbar dark=false light=false raised=false large=false bordered=false}} - {{ui/ui-toolbar-icon icon=constants.Icon.Blocks color=constants.Color.Gray tooltip="Complete" + {{ui/ui-toolbar-icon icon=constants.Icon.Blocks color=constants.Color.Gray tooltip=(localize 'space_density_complete') selected=(eq viewDensity "1") onClick=(action "onSwitchView" "1")}} - {{ui/ui-toolbar-icon icon=constants.Icon.All color=constants.Color.Gray tooltip="Comfort" + {{ui/ui-toolbar-icon icon=constants.Icon.All color=constants.Color.Gray tooltip=(localize 'space_density_comfort') selected=(eq viewDensity "2") onClick=(action "onSwitchView" "2")}} - {{ui/ui-toolbar-label label="—" color=constants.Color.Gray tooltip="Compact" + {{ui/ui-toolbar-label label="—" color=constants.Color.Gray tooltip=(localize 'space_density_compact') selected=(eq viewDensity "3") onClick=(action "onSwitchView" "3")}} - {{#ui/ui-toolbar-icon icon=constants.Icon.Sort color=constants.Color.Gray tooltip="Sort"}} + {{#ui/ui-toolbar-icon icon=constants.Icon.Sort color=constants.Color.Gray tooltip=(localize 'sort')}} {{#attach-popover class="ember-attacher-popper" hideOn="click" showOn="click" isShown=false placement="bottom-end" as |attacher|}}
@@ -20,13 +20,13 @@
  • -
    Name
    +
    {{localize 'sort_by_name'}}
  • -
    Created date
    +
    {{localize 'sort_by_created'}}
  • -
    Last updated
    +
    {{localize 'sort_by_revised'}}
@@ -36,10 +36,10 @@
  • -
    Ascending
    +
    {{localize 'sort_ascending'}}
  • -
    Descending
    +
    {{localize 'sort_descending'}}
@@ -67,7 +67,7 @@ {{ document.name }} {{#if document.isSequenced}}
- +
{{/if}}
@@ -93,12 +93,12 @@
{{#if document.isSequenced}} {{#if showingAllDocs}} - - + + {{/if}} - + {{else}} - + {{/if}}
diff --git a/gui/app/templates/components/folder/space-toolbar.hbs b/gui/app/templates/components/folder/space-toolbar.hbs index db42eefe..1026645e 100644 --- a/gui/app/templates/components/folder/space-toolbar.hbs +++ b/gui/app/templates/components/folder/space-toolbar.hbs @@ -1,15 +1,15 @@ {{#ui/ui-toolbar dark=false light=false raised=false large=false bordered=false}} {{#if (or hasDocuments pinState.isPinned session.authenticated)}} - {{#ui/ui-toolbar-dropdown label="Content" arrow=true}} + {{#ui/ui-toolbar-dropdown label=(localize 'content') arrow=true}} {{#attach-popover class="ember-attacher-popper" hideOn="click clickout" showOn="click" isShown=false}} {{/attach-popover}} @@ -17,34 +17,33 @@ {{/if}} {{#if permissions.documentAdd}} - {{#ui/ui-toolbar-dropdown label="New" arrow=true}} + {{#ui/ui-toolbar-dropdown label=(localize 'new') arrow=true}} {{#attach-popover class="ember-attacher-popper" hideOn="click clickout" showOn="click" isShown=false}} {{/attach-popover}} {{/ui/ui-toolbar-dropdown}} {{/if}} {{#if (or permissions.spaceOwner permissions.spaceManage)}} - {{ui/ui-toolbar-icon icon=constants.Icon.Settings color=constants.Color.Green - tooltip="Space settings" linkTo="folder.settings"}} + {{ui/ui-toolbar-icon icon=constants.Icon.Settings color=constants.Color.Green tooltip=(localize 'settings') linkTo="folder.settings"}} {{/if}} {{/ui/ui-toolbar}}