1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-19 05:09:42 +02:00

i18n doc strings

This commit is contained in:
McMatts 2022-03-09 13:36:48 -05:00
parent 93b6f26365
commit a236cbb01c
6 changed files with 45 additions and 27 deletions

View file

@ -25,6 +25,7 @@ export default Component.extend(ModalMixin, AuthMixin, Notifier, {
pinned: service(), pinned: service(),
browserSvc: service('browser'), browserSvc: service('browser'),
documentSvc: service('document'), documentSvc: service('document'),
i18n: service(),
showRevisions: computed('permissions', 'document.protection', function() { showRevisions: computed('permissions', 'document.protection', function() {
if (!this.get('session.authenticated')) return false; if (!this.get('session.authenticated')) return false;
if (!this.get('session.viewUsers')) return false; if (!this.get('session.viewUsers')) return false;
@ -218,7 +219,7 @@ export default Component.extend(ModalMixin, AuthMixin, Notifier, {
this.get('documentSvc').export(spec).then((htmlExport) => { this.get('documentSvc').export(spec).then((htmlExport) => {
this.get('browserSvc').downloadFile(htmlExport, this.get('document.slug') + '.html'); this.get('browserSvc').downloadFile(htmlExport, this.get('document.slug') + '.html');
this.notifySuccess('Exported'); this.notifySuccess(this.i18n.localize('exported'));
}); });
} }
} }

View file

@ -1,13 +1,13 @@
<div id="add-section-modal" class="modal" tabindex="-1" role="dialog"> <div id="add-section-modal" class="modal" tabindex="-1" role="dialog">
<div class="modal-dialog modal-60" role="document"> <div class="modal-dialog modal-60" role="document">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header">Insert Section</div> <div class="modal-header">{{localize 'section_insert'}}</div>
<div class="modal-body"> <div class="modal-body">
<div id="new-section-wizard" class="new-section-wizard"> <div id="new-section-wizard" class="new-section-wizard">
<div class="form-group"> <div class="form-group">
{{focus-input type="text" id="new-section-name" value=newSectionName {{focus-input type="text" id="new-section-name" value=newSectionName
class=(if newSectionNameMissing "mousetrap form-control form-control-lg is-invalid" "mousetrap form-control form-control-lg") class=(if newSectionNameMissing "mousetrap form-control form-control-lg is-invalid" "mousetrap form-control form-control-lg")
placeholder="Enter section name" autocomplete="off"}} placeholder=(localize 'name') autocomplete="off"}}
</div> </div>
<ul class="options"> <ul class="options">

View file

@ -1,29 +1,29 @@
<div id={{concat "content-linker-modal-" page.id}} class="modal" tabindex="-1" role="dialog"> <div id={{concat "content-linker-modal-" page.id}} class="modal" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document"> <div class="modal-dialog" role="document">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header">Insert Link</div> <div class="modal-header">{{localize 'link-insert'}}</div>
<div class="modal-body"> <div class="modal-body">
<ul class="tabnav-control text-center"> <ul class="tabnav-control text-center">
{{#if hasSections}} {{#if hasSections}}
<li class="tab {{if tab1Selected "selected"}}" {{action "onTabSelect" 1}} role="button" tabindex="0">Section</li> <li class="tab {{if tab1Selected "selected"}}" {{action "onTabSelect" 1}} role="button" tabindex="0">{{localize 'link_type_section'}}</li>
{{/if}} {{/if}}
{{#if hasAttachments}} {{#if hasAttachments}}
<li class="tab {{if tab2Selected "selected"}}" {{action "onTabSelect" 2}} role="button" tabindex="0">Attachment</li> <li class="tab {{if tab2Selected "selected"}}" {{action "onTabSelect" 2}} role="button" tabindex="0">{{localize 'link_type_attachment'}}</li>
{{/if}} {{/if}}
<li class="tab {{if tab3Selected "selected"}}" {{action "onTabSelect" 3}} role="button" tabindex="0">Search</li> <li class="tab {{if tab3Selected "selected"}}" {{action "onTabSelect" 3}} role="button" tabindex="0">{{localize 'link_type_search'}}</li>
<li class="tab {{if tab4Selected "selected"}}" {{action "onTabSelect" 4}} role="button" tabindex="0">Network</li> <li class="tab {{if tab4Selected "selected"}}" {{action "onTabSelect" 4}} role="button" tabindex="0">{{localize 'link_type_network'}}</li>
</ul> </ul>
{{#if showSections}} {{#if showSections}}
<div class="content-linker-modal-container"> <div class="content-linker-modal-container">
<p>Link to content within this document</p> <p>{{localize 'link_type_section_explain'}}</p>
{{ui/ui-list-picker items=candidates.pages nameField="title" singleSelect=true onSelect=(action "setSelection")}} {{ui/ui-list-picker items=candidates.pages nameField="title" singleSelect=true onSelect=(action "setSelection")}}
</div> </div>
{{/if}} {{/if}}
{{#if showAttachments}} {{#if showAttachments}}
<div class="content-linker-modal-container"> <div class="content-linker-modal-container">
<p>Link to an attachment within this document</p> <p>{{localize 'link_type_attachment_explain'}}</p>
<div class="widget-list-picker"> <div class="widget-list-picker">
<ul class="options"> <ul class="options">
{{#each candidates.attachments as |item|}} {{#each candidates.attachments as |item|}}
@ -45,12 +45,12 @@
{{#if showSearch}} {{#if showSearch}}
<div class="content-linker-modal-container"> <div class="content-linker-modal-container">
<div class="form-group"> <div class="form-group">
<label>Search</label> <label>{{localize 'search'}}</label>
{{focus-input id="content-linker-search" type="input" class="form-control" value=keywords placeholder="keyword search" autocomplete="off" key-up=(action "onSearch")}} {{focus-input id="content-linker-search" type="input" class="form-control" value=keywords placeholder="" autocomplete="off" key-up=(action "onSearch")}}
<small class="form-text text-muted">Document name, content, attachment name</small> <small class="form-text text-muted">{{localize 'link_type_search_explain'}}</small>
</div> </div>
{{#unless hasMatches}} {{#unless hasMatches}}
<p class="nothing">Nothing found.</p> <p class="nothing">{{localize 'nothing_found'}}</p>
{{/unless}} {{/unless}}
<div class="widget-list-picker"> <div class="widget-list-picker">
<ul class="options"> <ul class="options">
@ -92,9 +92,9 @@
{{#if showNetwork}} {{#if showNetwork}}
<div class="content-linker-modal-container"> <div class="content-linker-modal-container">
<p>Specify network drive/share/folder location</p> <p>{{localize 'link_type_network_explain'}}</p>
<div class="form-group"> <div class="form-group">
{{focus-input id="content-linker-networklocation" type="input" class="form-control" value=networkLocation placeholder="e.g. //share/folder" autocomplete="off"}} {{focus-input id="content-linker-networklocation" type="input" class="form-control" value=networkLocation placeholder=(localize 'link_type_network_example') autocomplete="off"}}
<small class="form-text text-muted"></small> <small class="form-text text-muted"></small>
</div> </div>
</div> </div>

View file

@ -8,17 +8,17 @@
{{#if (eq document.protection constants.ProtectionType.None)}} {{#if (eq document.protection constants.ProtectionType.None)}}
<div class="label-open"> <div class="label-open">
OPEN {{localize 'protection_type_open'}}
</div> </div>
{{/if}} {{/if}}
{{#if (eq document.protection constants.ProtectionType.Review)}} {{#if (eq document.protection constants.ProtectionType.Review)}}
<div class="label-protected"> <div class="label-protected">
PROTECTED {{localize 'protection_type_protected'}}
</div> </div>
{{/if}} {{/if}}
{{#if (eq document.protection constants.ProtectionType.Lock)}} {{#if (eq document.protection constants.ProtectionType.Lock)}}
<div class="label-locked"> <div class="label-locked">
LOCKED {{localize 'protection_type_locked'}}
</div> </div>
{{/if}} {{/if}}
@ -35,31 +35,31 @@
{{/if}} {{/if}}
{{#if document.template}} {{#if document.template}}
<div class="label-template non-printable" title="This is a template"> <div class="label-template non-printable">
Template {{localize 'template'}}
</div> </div>
{{/if}} {{/if}}
<Ui::UiSpacer @size="200" /> <Ui::UiSpacer @size="200" />
<div class="title">CATEGORY / TAG</div> <div class="title">{{localize 'category'}} / {{localize 'tag'}}</div>
{{#each selectedCategories as |cat|}} {{#each selectedCategories as |cat|}}
<div class="meta-label"> <div class="meta-label">
<i class="dicon {{constants.Icon.Category}}" title="Category" /> <i class="dicon {{constants.Icon.Category}}" title={{localize 'category'}} />
{{cat.category}} {{cat.category}}
</div> </div>
{{/each}} {{/each}}
{{#each tagz as |t|}} {{#each tagz as |t|}}
<div class="meta-label"> <div class="meta-label">
<i class="dicon {{constants.Icon.Tag}}" title="Tag" /> <i class="dicon {{constants.Icon.Tag}}" title={{localize 'tag'}} />
{{t}} {{t}}
</div> </div>
{{/each}} {{/each}}
{{#if unassigned}} {{#if unassigned}}
{{#if permissions.spaceManage}} {{#if permissions.spaceManage}}
<div class="empty cursor-pointer" {{action "onEditCategory"}}>Unassigned</div> <div class="empty cursor-pointer" {{action "onEditCategory"}}>{{localize 'unassigned'}}</div>
{{else}} {{else}}
<div class="empty">Unassigned</div> <div class="empty">{{localize 'unassigned'}}</div>
{{/if}} {{/if}}
{{/if}} {{/if}}
</div> </div>

View file

@ -45,7 +45,7 @@
</div> </div>
{{/if}} {{/if}}
{{document/section-attachment uploadLabel="Upload Attachments" {{document/section-attachment uploadLabel=(localize 'upload_attachment')
editMode=editMode page=page document=document files=attachments editMode=editMode page=page document=document files=attachments
onAttachmentUpload=(action onAttachmentUpload) onAttachmentUpload=(action onAttachmentUpload)
onAttachmentDelete=(action onAttachmentDelete)}} onAttachmentDelete=(action onAttachmentDelete)}}

View file

@ -200,6 +200,23 @@
"category_permissions": "Category Permissions", "category_permissions": "Category Permissions",
"category_permissions_explain": "Select who can view documents within category", "category_permissions_explain": "Select who can view documents within category",
"protection_type_open": "Open",
"protection_type_protected": "Protected",
"protection_type_locked": "Locked",
"section_insert": "Insert Section",
"link_insert": "Insert Link",
"link_type_section": "Section",
"link_type_section_explain": "Link to content within this document",
"link_type_attachment": "Attachment",
"link_type_attachment_explain": "Link to an attachment within this document",
"link_type_search": "Search",
"link_type_search_explain": "Document name, content, attachment name",
"link_type_network": "Network",
"link_type_network_explain": "Specify network drive/share/folder location",
"link_type_network_example": "e.g. //share/folder",
"space_permissions": "Space Permissions", "space_permissions": "Space Permissions",
"space_permissions_explain": "Assign permissions to users or groups and invite new users to this space", "space_permissions_explain": "Assign permissions to users or groups and invite new users to this space",
"space_permission_view": "View", "space_permission_view": "View",