From 978fd8e1a936b93a96f8eaa4f4ce919640b947d8 Mon Sep 17 00:00:00 2001 From: Alexander Yuzhin Date: Fri, 18 Nov 2016 13:06:49 +0300 Subject: [PATCH] [DE mobile] Localization AddImage. --- .../mobile/app/controller/add/AddImage.js | 5 ++--- .../mobile/app/template/AddImage.template | 16 ++++++++-------- .../mobile/app/view/add/AddImage.js | 17 +++++++++++++---- apps/documenteditor/mobile/locale/en.json | 12 +++++++++++- 4 files changed, 34 insertions(+), 16 deletions(-) diff --git a/apps/documenteditor/mobile/app/controller/add/AddImage.js b/apps/documenteditor/mobile/app/controller/add/AddImage.js index 3e41f8259..742a20eae 100644 --- a/apps/documenteditor/mobile/app/controller/add/AddImage.js +++ b/apps/documenteditor/mobile/app/controller/add/AddImage.js @@ -84,11 +84,10 @@ define([ var me = this; $('#addimage-insert a').single('click', _.buffered(me.onInsertByUrl, 100, me)); - - $('#addimage-url input[type="url"]').single('input', _.bind(me.onUrlChange, me)); + $('#addimage-url input[type=url]').single('input', _.bind(me.onUrlChange, me)); _.delay(function () { - $('#addimage-link-url input[type="url"]').focus(); + $('#addimage-link-url input[type=url]').focus(); }, 1000); }, diff --git a/apps/documenteditor/mobile/app/template/AddImage.template b/apps/documenteditor/mobile/app/template/AddImage.template index c6d18ccc3..7bc70e32d 100644 --- a/apps/documenteditor/mobile/app/template/AddImage.template +++ b/apps/documenteditor/mobile/app/template/AddImage.template @@ -9,7 +9,7 @@
-
Picture from Library
+
<%= scope.textFromLibrary %>
@@ -21,7 +21,7 @@
-
Picture from URL
+
<%= scope.textFromURL %>
@@ -34,20 +34,20 @@
-
Address
+
<%= scope.textAddress %>
  • @@ -56,11 +56,11 @@
<% if (android) { %> - Insert Image + <%= scope.textInsertImage %> <% } else { %> <% } %> diff --git a/apps/documenteditor/mobile/app/view/add/AddImage.js b/apps/documenteditor/mobile/app/view/add/AddImage.js index e8094e75c..ea62ee1a5 100644 --- a/apps/documenteditor/mobile/app/view/add/AddImage.js +++ b/apps/documenteditor/mobile/app/view/add/AddImage.js @@ -49,7 +49,7 @@ define([ ], function (addTemplate, $, _, Backbone) { 'use strict'; - DE.Views.AddImage = Backbone.View.extend((function() { + DE.Views.AddImage = Backbone.View.extend(_.extend((function() { // private return { @@ -76,7 +76,8 @@ define([ render: function () { this.layout = $('
').append(this.template({ android : Common.SharedSettings.get('android'), - phone : Common.SharedSettings.get('phone') + phone : Common.SharedSettings.get('phone'), + scope : this })); return this; @@ -117,7 +118,15 @@ define([ showImageUrl: function () { this.showPage('#addimage-url-view'); - } + }, + + textFromLibrary: 'Picture from Library', + textFromURL: 'Picture from URL', + textBack: 'Back', + textLinkSettings: 'Link Settings', + textAddress: 'Address', + textImageURL: 'Image URL', + textInsertImage: 'Insert Image' } - })()); + })(), DE.Views.AddImage || {})) }); \ No newline at end of file diff --git a/apps/documenteditor/mobile/locale/en.json b/apps/documenteditor/mobile/locale/en.json index 710678244..c20799039 100644 --- a/apps/documenteditor/mobile/locale/en.json +++ b/apps/documenteditor/mobile/locale/en.json @@ -140,5 +140,15 @@ "DE.Controllers.AddContainer.textTable": "Table", "DE.Controllers.AddContainer.textShape": "Shape", "DE.Controllers.AddContainer.textImage": "Image", - "DE.Controllers.AddContainer.textOther": "Other" + "DE.Controllers.AddContainer.textOther": "Other", + + "DE.Controllers.AddImage.textEmptyImgUrl": "You need to specify image URL.", + "DE.Controllers.AddImage.txtNotUrl": "This field should be a URL in the format 'http://www.example.com'", + "DE.Views.AddImage.textFromLibrary": "Picture from Library", + "DE.Views.AddImage.textFromURL": "Picture from URL", + "DE.Views.AddImage.textBack": "Back", + "DE.Views.AddImage.textLinkSettings": "Link Settings", + "DE.Views.AddImage.textAddress": "Address", + "DE.Views.AddImage.textImageURL": "Image URL", + "DE.Views.AddImage.textInsertImage": "Insert Image" } \ No newline at end of file