translation fix
authorJan Szejko <janek37@gmail.com>
Fri, 23 Dec 2016 15:40:17 +0000 (16:40 +0100)
committerJan Szejko <janek37@gmail.com>
Fri, 23 Dec 2016 15:57:33 +0000 (16:57 +0100)
src/editor/modules/documentHistory/templates/main.html
src/editor/modules/mainBar/template.html
src/editor/plugins/core/core.js
src/editor/plugins/core/img/imgElement.js
src/editor/plugins/core/links/linkElement.js
src/editor/plugins/core/metadataEditor/view.js
src/editor/translation-fix.js [new file with mode: 0644]

index 73a62d7..4838205 100644 (file)
@@ -1,10 +1,10 @@
 <div class="rng-module-documentHistory">
     <div class="toolbar">
         <div class="group">
 <div class="rng-module-documentHistory">
     <div class="toolbar">
         <div class="group">
-            <button class="btn btn-mini compare">Compare</button>
-            <button class="btn btn-mini restore">Revert</button>
-            <button class="btn btn-mini display">Preview</button>
-            <button class="btn btn-mini publish">Publish</button>
+            <button class="btn btn-mini compare"><%= gettext('Compare') %></button>
+            <button class="btn btn-mini restore"><%= gettext('Revert') %></button>
+            <button class="btn btn-mini display"><%= gettext('Preview') %></button>
+            <button class="btn btn-mini publish"><%= gettext('Publish') %></button>
         </div>
     </div>
     <div style="clear:both;"></div>
         </div>
     </div>
     <div style="clear:both;"></div>
index 934b3ea..c3295fe 100644 (file)
@@ -8,8 +8,8 @@
         <ul>
             <!--li><a target="_blank" href="<%= documentScheduleUrl %>">Edit schedule</a></li>
             <li><a target="_blank" href="<%= documentForkUrl %>">Create another version</a></li-->
         <ul>
             <!--li><a target="_blank" href="<%= documentScheduleUrl %>">Edit schedule</a></li>
             <li><a target="_blank" href="<%= documentForkUrl %>">Create another version</a></li-->
-           <li><a target="_blank" href="<%= documentPreviewUrl %>">Preview saved version</a></li>
-            <li><a target="_blank" href="<%= documentGalleryUrl %>">Attachments</a></li>
+           <li><a target="_blank" href="<%= documentPreviewUrl %>"><%= gettext('Preview saved version') %></a></li>
+            <li><a target="_blank" href="<%= documentGalleryUrl %>"><%= gettext('Attachments') %></a></li>
 
             <li><a href="#" data-cmd="drop-draft" data-disabled-text="<%= gettext('no draft exists') %>"><%= gettext('drop a working draft') %></a></li>
             <li><button class="btn btn-mini btn-info" data-cmd="save"><%= gettext('Save') %></button></li>
 
             <li><a href="#" data-cmd="drop-draft" data-disabled-text="<%= gettext('no draft exists') %>"><%= gettext('drop a working draft') %></a></li>
             <li><button class="btn btn-mini btn-info" data-cmd="save"><%= gettext('Save') %></button></li>
index 7feb1a4..c56c5db 100644 (file)
@@ -542,7 +542,7 @@ var createLinkFromSelection = function(callback, params) {
                 prePasteHandler: function(text) {
                                     return params.fragment.document.getLinkForUrl(text);
                                 }.bind(this),
                 prePasteHandler: function(text) {
                                     return params.fragment.document.getLinkForUrl(text);
                                 }.bind(this),
-                description: '<a href="#-" class="attachment-library">attachment library</a>'
+                description: '<a href="#-" class="attachment-library">' + gettext('attachment library') + '</a>'
                 }
             ]
         }),
                 }
             ]
         }),
index be0ff24..5aaecfc 100644 (file)
@@ -63,7 +63,7 @@ _.extend(linkElement, {
                 prePasteHandler: function(text) {
                                     return this.wlxmlNode.document.getLinkForUrl(text);
                                 }.bind(this),
                 prePasteHandler: function(text) {
                                     return this.wlxmlNode.document.getLinkForUrl(text);
                                 }.bind(this),
-                                description: '<a href="#-" class="attachment-library">attachment library</a>'
+                                description: '<a href="#-" class="attachment-library">' + gettext('attachment library') + '</a>'
             }
             ]
         });
             }
             ]
         });
index 36163d1..6db8755 100644 (file)
@@ -54,7 +54,7 @@ _.extend(linkElement, {
                 prePasteHandler: function(text) {
                                     return this.wlxmlNode.document.getLinkForUrl(text);
                                 }.bind(this),
                 prePasteHandler: function(text) {
                                     return this.wlxmlNode.document.getLinkForUrl(text);
                                 }.bind(this),
-                                description: '<a href="#-" class="attachment-library">attachment library</a>'
+                                description: '<a href="#-" class="attachment-library">' + gettext('attachment library') + '</a>'
             }
             ]
         });
             }
             ]
         });
index 432b15d..18434e5 100644 (file)
@@ -167,7 +167,7 @@ _.extend(View.prototype, {
         newRow.find('td:nth-child(2)').append(valueSelectView.el).data('view', valueSelectView);
 
         if (this.getIsFileForKey(row.getKey())) {
         newRow.find('td:nth-child(2)').append(valueSelectView.el).data('view', valueSelectView);
 
         if (this.getIsFileForKey(row.getKey())) {
-            var el = $("<a href='#-' class='attachment-library' style='float: right'>attachments</a>");
+            var el = $("<a href='#-' class='attachment-library' style='float: right'>" + gettext('attachments') + "</a>");
             el.on('click', function() {
                 attachments.select(function(v) {
                     valueSelectView.setInput(v);
             el.on('click', function() {
                 attachments.select(function(v) {
                     valueSelectView.setInput(v);
diff --git a/src/editor/translation-fix.js b/src/editor/translation-fix.js
new file mode 100644 (file)
index 0000000..3a8216e
--- /dev/null
@@ -0,0 +1,24 @@
+// comment.html
+gettext('edit');
+gettext('remove');
+gettext('Delete this comment?');
+gettext('Delete');
+
+// template.html
+gettext('Exit');
+gettext('Preview saved version');
+gettext('Attachments');
+gettext('drop a working draft');
+
+// documentSummary.html
+gettext('Draft Saved');
+
+// box.html
+gettext('change');
+gettext('remove');
+
+// main.html
+gettext('Compare');
+gettext('Revert');
+gettext('Preview');
+gettext('Publish');