mirror of
https://github.com/documize/community.git
synced 2025-07-24 15:49:44 +02:00
i18n space strings
This commit is contained in:
parent
e0805d7131
commit
4885a1b380
9 changed files with 92 additions and 57 deletions
|
@ -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));
|
||||
},
|
||||
|
||||
|
|
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue