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

i18n doc strings

This commit is contained in:
McMatts 2022-03-09 15:20:16 -05:00
parent 371706fb49
commit bca7794c00
9 changed files with 50 additions and 32 deletions

View file

@ -22,6 +22,7 @@ export default Component.extend(Modals, Notifier, {
browserSvc: service('browser'), browserSvc: service('browser'),
appMeta: service(), appMeta: service(),
session: service(), session: service(),
i18n: service(),
hasAttachments: notEmpty('files'), hasAttachments: notEmpty('files'),
canEdit: computed('permissions.{documentApprove,documentEdit}', 'document.protection', function() { canEdit: computed('permissions.{documentApprove,documentEdit}', 'document.protection', function() {
// Check to see if specific scenarios prevent us from changing doc level attachments. // Check to see if specific scenarios prevent us from changing doc level attachments.
@ -86,7 +87,7 @@ export default Component.extend(Modals, Notifier, {
}); });
this.on("queuecomplete", function () { this.on("queuecomplete", function () {
self.notifySuccess('Uploaded file'); self.notifySuccess(this.i18n.localize('uploaded'));
self.getAttachments(); self.getAttachments();
}); });
@ -115,7 +116,7 @@ export default Component.extend(Modals, Notifier, {
actions: { actions: {
onDelete(attachment) { onDelete(attachment) {
this.get('documentService').deleteAttachment(this.get('document.id'), attachment.id).then(() => { this.get('documentService').deleteAttachment(this.get('document.id'), attachment.id).then(() => {
this.notifySuccess('File deleted'); this.notifySuccess(this.i18n.localize('deleted'));
this.getAttachments(); this.getAttachments();
}); });
} }

View file

@ -1,6 +1,6 @@
{{layout/logo-heading {{layout/logo-heading
title="Categories" title=(localize 'categories')
desc="Assign one or more categories to help organize content within this space" desc=(localize 'doc_category_explain')
icon=constants.Icon.Category}} icon=constants.Icon.Category}}
{{#if categories}} {{#if categories}}
@ -15,5 +15,5 @@
light=true light=true
onClick=(action "onSave")}} onClick=(action "onSave")}}
{{else}} {{else}}
<p class="color-green-700">This space has no categories yet</p> <p class="color-green-700">{{localize 'category_none'}}</p>
{{/if}} {{/if}}

View file

@ -1,19 +1,19 @@
{{layout/logo-heading {{layout/logo-heading
title="Content Settings" title=(localize 'content')
desc="Set name, description and lifecycle stage" desc=(localize 'setings')
icon=constants.Icon.Settings}} icon=constants.Icon.Settings}}
<form class="view-document"> <form class="view-document">
<div class="form-group"> <div class="form-group">
<label for="document-name">Name</label> <label for="document-name">{{localize 'name'}}</label>
{{focus-input id="document-name" type="text" value=docName {{focus-input id="document-name" type="text" value=docName
class=(if hasNameError "form-control mousetrap is-invalid" "form-control mousetrap") placeholder="Title" autocomplete="off"}} class=(if hasNameError "form-control mousetrap is-invalid" "form-control mousetrap") placeholder="" autocomplete="off"}}
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="document-excerpt">Description</label> <label for="document-excerpt">{{localize 'description'}}</label>
{{textarea id="document-excerpt" rows="4" value=docExcerpt class="form-control mousetrap" placeholder="Excerpt" autocomplete="off"}} {{textarea id="document-excerpt" rows="4" value=docExcerpt class="form-control mousetrap" placeholder="" autocomplete="off"}}
<small class="form-text text-muted">Optional description explaining content</small> <small class="form-text text-muted">{{localize 'excerpt'}}</small>
</div> </div>
{{ui/ui-button {{ui/ui-button

View file

@ -1,7 +1,7 @@
{{layout/logo-heading {{layout/logo-heading
title="Tags" title=(localize 'tags')
desc=(concat "Specify up to " appMeta.maxTags " tags — lowercase, characters, numbers, hyphens only") desc=(localize 'tag_rules' appMeta.maxTags)
icon=constants.Icon.Category}} icon=constants.Icon.Tag}}
{{#each tagz as |tag|}} {{#each tagz as |tag|}}
<div class="input-group"> <div class="input-group">
@ -10,7 +10,7 @@
<i class="dicon {{constants.Icon.Tag}}" /> <i class="dicon {{constants.Icon.Tag}}" />
</span> </span>
</div> </div>
{{input type="text" id=(concat "add-tag-field-" tag.number) class="form-control mousetrap tag-input" placeholder="Tag name" value=tag.value}} {{input type="text" id=(concat "add-tag-field-" tag.number) class="form-control mousetrap tag-input" placeholder=(localize 'tag') value=tag.value}}
</div> </div>
<Ui::UiSpacer @size="200" /> <Ui::UiSpacer @size="200" />
{{/each}} {{/each}}

View file

@ -1,6 +1,6 @@
{{#if (or hasAttachments canEdit)}} {{#if (or hasAttachments canEdit)}}
<Ui::UiSpacer @size="200" /> <Ui::UiSpacer @size="200" />
<div class="title">attachments</div> <div class="title">{{localize 'attachments'}}</div>
<div class="document-sidebar-attachment"> <div class="document-sidebar-attachment">
<ul class="files"> <ul class="files">
{{#each files key="id" as |file|}} {{#each files key="id" as |file|}}
@ -14,7 +14,7 @@
<i class="dicon {{constants.Icon.Cross}}" role="button" tabindex="0" aria-haspopup="menu"> <i class="dicon {{constants.Icon.Cross}}" role="button" tabindex="0" aria-haspopup="menu">
{{#attach-popover class="ember-attacher-popper" hideOn="escapekey, clickout" showOn="click" isShown=false}} {{#attach-popover class="ember-attacher-popper" hideOn="escapekey, clickout" showOn="click" isShown=false}}
<div class="form"> <div class="form">
<p>Are you sure you want to delete this file?</p> <p>{{localize 'attachment_delete_confirm'}}</p>
<Ui::UiSpacer @size="100" /> <Ui::UiSpacer @size="100" />
{{ui/ui-button {{ui/ui-button
light=false light=false
@ -31,7 +31,7 @@
{{/each}} {{/each}}
{{#if canEdit}} {{#if canEdit}}
<li id="upload-document-files"> <li id="upload-document-files">
<i class="dicon {{constants.Icon.Plus}}" role="button" tabindex="0" title="Upload file" /> <i class="dicon {{constants.Icon.Plus}}" role="button" tabindex="0" title={{localize 'upload_attachment'}} />
</li> </li>
{{/if}} {{/if}}
</ul> </ul>

View file

@ -1,4 +1,4 @@
<div class="title center">table of contents</div> <div class="title center">{{localize 'toc'}}</div>
{{#if canEdit}} {{#if canEdit}}
<div class="document-sidebar-toc"> <div class="document-sidebar-toc">
<div class="controls {{if state.actionablePage "current-page"}}"> <div class="controls {{if state.actionablePage "current-page"}}">
@ -29,11 +29,11 @@
title={{item.page.title}}> title={{item.page.title}}>
<span class="numbering">{{item.page.numbering}}</span> <span class="numbering">{{item.page.numbering}}</span>
{{#if (or item.userHasChangePending userHasNewPagePending)}} {{#if (or item.userHasChangePending userHasNewPagePending)}}
<span class="color-red-600" title="Pending changes">[*]&nbsp;</span> <span class="color-red-600" title={{localize 'approval_pending'}}>[*]&nbsp;</span>
{{/if}} {{/if}}
{{#if (or permissions.documentApprove roles.documentApprove)}} {{#if (or permissions.documentApprove roles.documentApprove)}}
{{#if item.changeAwaitingReview}} {{#if item.changeAwaitingReview}}
<span class="color-green-700" title="Awaiting approval">[*]&nbsp;</span> <span class="color-green-700" title={{localize 'approval_awaiting'}}>[*]&nbsp;</span>
{{/if}} {{/if}}
{{/if}} {{/if}}
{{item.page.title}} {{item.page.title}}

View file

@ -33,21 +33,21 @@
{{#if canEdit}} {{#if canEdit}}
<div class="start-section"> <div class="start-section">
<i class="dicon {{constants.Icon.Plus}}" {{action "onShowSectionWizard"}} title="Insert section here" role="button" tabindex="0" /> <i class="dicon {{constants.Icon.Plus}}" {{action "onShowSectionWizard"}} title={{localize 'section_insert_here'}} role="button" tabindex="0" />
</div> </div>
{{/if}} {{/if}}
{{#if showLikes}} {{#if showLikes}}
<div class="vote-box no-print"> <div class="vote-box no-print">
{{#if voteThanks}} {{#if voteThanks}}
<div class="thanks">Thanks for the feedback!</div> <div class="thanks">{{localize 'feedback_thanks'}}</div>
{{else}} {{else}}
<div class="prompt">{{folder.likes}}</div> <div class="prompt">{{folder.likes}}</div>
<Ui::UiSpacer @size="200" /> <Ui::UiSpacer @size="200" />
<div class="buttons"> <div class="buttons">
{{ui/ui-button color=constants.Color.Yellow light=true label="Yes, thanks!" onClick=(action "onVote" 1)}} {{ui/ui-button color=constants.Color.Yellow light=true label=(localize 'feedback_help_yes') onClick=(action "onVote" 1)}}
{{ui/ui-button-gap}} {{ui/ui-button-gap}}
{{ui/ui-button color=constants.Color.Yellow light=true label="Not really" onClick=(action "onVote" 2)}} {{ui/ui-button color=constants.Color.Yellow light=true label=(localize 'feedback_help_no') onClick=(action "onVote" 2)}}
</div> </div>
{{/if}} {{/if}}
</div> </div>

View file

@ -1,5 +1,5 @@
{{#unless revisions}} {{#unless revisions}}
<p>No revisions made</p> <p>{{localize 'revision_none'}}</p>
{{/unless}} {{/unless}}
<div class="view-revision"> <div class="view-revision">
@ -21,9 +21,9 @@
<div id="document-rollback-modal" class="modal" tabindex="-1" role="dialog"> <div id="document-rollback-modal" 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">Restore Section</div> <div class="modal-header">{{localize 'revision_restore'}}</div>
<div class="modal-body"> <div class="modal-body">
<p>Are you sure you want to restore this revision?</p> <p>{{localize 'revision_restore_confirm'}}</p>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
{{ui/ui-button color=constants.Color.Gray light=true label=(localize 'cancel') dismiss=true}} {{ui/ui-button color=constants.Color.Gray light=true label=(localize 'cancel') dismiss=true}}

View file

@ -67,6 +67,7 @@
"published": "Published", "published": "Published",
"name": "Name", "name": "Name",
"description": "Description", "description": "Description",
"excerpt": "Excerpt",
"icon": "Icon", "icon": "Icon",
"color": "Color", "color": "Color",
"visibility": "Visibility", "visibility": "Visibility",
@ -124,6 +125,7 @@
"categories": "Categories", "categories": "Categories",
"tag": "Tag", "tag": "Tag",
"tags": "Tags", "tags": "Tags",
"tag_rules": "Specify up to {1} tags — lowercase, characters, numbers, hyphens only",
"revisions": "Revisions", "revisions": "Revisions",
"versions": "Versions", "versions": "Versions",
"version": "Version", "version": "Version",
@ -143,12 +145,14 @@
"templates": "Templates", "templates": "Templates",
"document": "Document", "document": "Document",
"documents": "Documents", "documents": "Documents",
"attachments": "Attachments",
"bookmark": "Bookmark", "bookmark": "Bookmark",
"bookmarks": "Bookmarks", "bookmarks": "Bookmarks",
"bookmark_remove": "Remove bookmark", "bookmark_remove": "Remove bookmark",
"new": "New", "new": "New",
"copy_link": "Copy link", "copy_link": "Copy link",
"toc": "table of contents",
"new_canvas": "Blank anvas", "new_canvas": "Blank anvas",
"new_template": "From template", "new_template": "From template",
"new_import": "Import files", "new_import": "Import files",
@ -181,9 +185,6 @@
"protection_none": "Changes permitted without approval", "protection_none": "Changes permitted without approval",
"protection_lock": "Locked, changes not permitted", "protection_lock": "Locked, changes not permitted",
"protection_review": "Changes require approval before publication", "protection_review": "Changes require approval before publication",
"approval_anybody": "Approval required from any approver",
"approval_majority": "Majority approval required from approvers",
"approval_unanimous": "Unanimous approval required from all approvers",
"template_published": "Published Template", "template_published": "Published Template",
"block_explain": "Content blocks provide re-usable content that can be inserted into any document", "block_explain": "Content blocks provide re-usable content that can be inserted into any document",
"block_published": "Published Block", "block_published": "Published Block",
@ -196,6 +197,9 @@
"feedback_prompt": "Feedback prompt", "feedback_prompt": "Feedback prompt",
"feedback_prompt_hint": "Enter prompt asking for user feedback", "feedback_prompt_hint": "Enter prompt asking for user feedback",
"feedback_prompt_explain": "Specify the prompt, e.g. Did this help you? Was this helpful? Did you find what you needed?", "feedback_prompt_explain": "Specify the prompt, e.g. Did this help you? Was this helpful? Did you find what you needed?",
"feedback_thanks": "Thanks for the feedback!",
"feedback_help_yes": "Yes, thanks!",
"feedback_help_no": "Not really",
"likes_prompt": "Did this help you?", "likes_prompt": "Did this help you?",
"delete_confirm": "Are you sure you want to delete?", "delete_confirm": "Are you sure you want to delete?",
"category_assignment_summary": "Assigned to {1} documents and viewable by {2} users/groups", "category_assignment_summary": "Assigned to {1} documents and viewable by {2} users/groups",
@ -205,6 +209,17 @@
"category_delete_confirm": "Are you sure you want to delete this category?", "category_delete_confirm": "Are you sure you want to delete this category?",
"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",
"category_none": "This space has no categories yet",
"approval_anybody": "Approval required from any approver",
"approval_majority": "Majority approval required from approvers",
"approval_unanimous": "Unanimous approval required from all approvers",
"approval_pending": "Pending changes",
"approval_awaiting": "Awaiting approval",
"revision_none": "No revisions made",
"revision_restore": "Restore Section",
"revision_restore_confirm": "Are you sure you want to restore this revision?",
"protection_type_open": "Open", "protection_type_open": "Open",
"protection_type_protected": "Protected", "protection_type_protected": "Protected",
@ -214,6 +229,7 @@
"doc_request_read": "Request read", "doc_request_read": "Request read",
"doc_request_publication": "Request publication", "doc_request_publication": "Request publication",
"doc_secure_share": "Share via secure external link", "doc_secure_share": "Share via secure external link",
"doc_category_explain": "Assign one or more categories to help organize content within this space",
"template_save": "Save as Template", "template_save": "Save as Template",
"template_name_explain": "Good template name conveys document type", "template_name_explain": "Good template name conveys document type",
"template_desc_explain": "Explain use case for this template", "template_desc_explain": "Explain use case for this template",
@ -223,6 +239,7 @@
"attachment_delete_confirm": "Are you sure you want to delete this attachment?", "attachment_delete_confirm": "Are you sure you want to delete this attachment?",
"section_insert": "Insert Section", "section_insert": "Insert Section",
"section_insert_here": "Insert section here",
"section_copy_explain": "This section and all nested sections will be copied to the selected document.", "section_copy_explain": "This section and all nested sections will be copied to the selected document.",
"section_move_explain": "This section and all nested sections will be moved to the selected document.", "section_move_explain": "This section and all nested sections will be moved to the selected document.",
"section_delete": "Are you sure you want to delete this section?", "section_delete": "Are you sure you want to delete this section?",