Skip to content

Commit

Permalink
Fix some translations and tooltip translations
Browse files Browse the repository at this point in the history
  • Loading branch information
agordillo committed Jun 6, 2016
1 parent f010494 commit 9de0134
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 13 deletions.
4 changes: 2 additions & 2 deletions edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@
<p id="presentation_details_preview_title" class="presentation_details_column_title" i18n-key="i.Preview">Preview</p>
<div id="presentation_details_preview">
<div id="presentation_details_preview_thumbnail">
<div title="Click to add an avatar. You should select an avatar to identify your excursion" id="presentation_details_preview_thumbnail_img_wrapper">
<div id="presentation_details_preview_thumbnail_img_wrapper" title="" i18n-key="i.AddanavatarHover">
<img id="presentation_details_preview_thumbnail_img" class="addThumbnailPlus" src="/images/icons/addThumbnail.png">
</div>
<p class="addthumbtitle" i18n-key="i.Addanavatar" style="display: none;">Add an avatar *</p>
Expand Down Expand Up @@ -556,7 +556,7 @@
<span class="presentation_details_text" i18n-key="i.Attatchment">Attatchment</span><br/>
<div class="file_details_upload">
<form id="attachment_file_form" method="post" action="#" enctype="multipart/form-data">
<div class="attachmentFileUpload" disabled="disabled" i18n-key-tooltip="i.tooltip.UploadAttachment" title="If this button is deactivated, you need to save your excursion first.">
<div class="attachmentFileUpload" disabled="disabled" i18n-key="i.tooltip.UploadAttachment" title="">
<span i18n-key="i.ChooseFile">Choose File</span>
<input type="file" name="attachment" id="attachment_file">
</div>
Expand Down
12 changes: 10 additions & 2 deletions js/VISH.I18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ VISH.I18n = (function(V,$,undefined){
var translateUI = function(){
$("[i18n-key]").each(function(index, elem){
var translation = getTrans($(elem).attr("i18n-key"));
if(translation!=null){
if(typeof translation != "undefined"){
switch(elem.tagName){
case "INPUT":
_translateInput(elem,translation);
Expand All @@ -132,10 +132,18 @@ VISH.I18n = (function(V,$,undefined){
}
});

//Translante tooltip attributes
$("[i18n-key-tooltip]").each(function(index, elem){
var translation = getTrans($(elem).attr("i18n-key-tooltip"));
if(typeof translation != "undefined"){
$(elem).attr("title",translation);
}
});

//Translante hrefs attributes
$("[i18n-key-href]").each(function(index, elem){
var translation = getTrans($(elem).attr("i18n-key-href"));
if(translation!=null){
if(typeof translation != "undefined"){
$(elem).attr("href",translation);
}
});
Expand Down
12 changes: 6 additions & 6 deletions js/doc/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -966,21 +966,21 @@
},
{
"file": "VISH.I18n.js",
"line": 186,
"line": 194,
"description": "Function to translate a string",
"class": "",
"namespace": "VISH"
},
{
"file": "VISH.I18n.js",
"line": 211,
"line": 219,
"description": "Function to translate a string",
"class": "",
"namespace": "VISH"
},
{
"file": "VISH.I18n.js",
"line": 250,
"line": 258,
"description": "Return the current language",
"class": "",
"namespace": "VISH"
Expand Down Expand Up @@ -2166,15 +2166,15 @@
},
{
"message": "Missing item type\nFunction to translate a string",
"line": " VISH.I18n.js:186"
"line": " VISH.I18n.js:194"
},
{
"message": "Missing item type\nFunction to translate a string",
"line": " VISH.I18n.js:211"
"line": " VISH.I18n.js:219"
},
{
"message": "Missing item type\nReturn the current language",
"line": " VISH.I18n.js:250"
"line": " VISH.I18n.js:258"
},
{
"message": "Missing item type\nFunction to reload a gifs in the slide for Mobile devices",
Expand Down
12 changes: 10 additions & 2 deletions js/doc/files/VISH.I18n.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ <h1 class="file-heading">File: VISH.I18n.js</h1>
var translateUI = function(){
$(&quot;[i18n-key]&quot;).each(function(index, elem){
var translation = getTrans($(elem).attr(&quot;i18n-key&quot;));
if(translation!=null){
if(typeof translation != &quot;undefined&quot;){
switch(elem.tagName){
case &quot;INPUT&quot;:
_translateInput(elem,translation);
Expand All @@ -214,10 +214,18 @@ <h1 class="file-heading">File: VISH.I18n.js</h1>
}
});

//Translante tooltip attributes
$(&quot;[i18n-key-tooltip]&quot;).each(function(index, elem){
var translation = getTrans($(elem).attr(&quot;i18n-key-tooltip&quot;));
if(typeof translation != &quot;undefined&quot;){
$(elem).attr(&quot;title&quot;,translation);
}
});

//Translante hrefs attributes
$(&quot;[i18n-key-href]&quot;).each(function(index, elem){
var translation = getTrans($(elem).attr(&quot;i18n-key-href&quot;));
if(translation!=null){
if(typeof translation != &quot;undefined&quot;){
$(elem).attr(&quot;href&quot;,translation);
}
});
Expand Down
5 changes: 4 additions & 1 deletion js/lang/translations.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ VISH.Locales = {
"i.add" : "add",
"i.Add" : "Add",
"i.Addanavatar" : "Add an avatar *",
"i.AddanavatarHover" : "Click to add an avatar. You should select an avatar to identify your excursion",
"i.addatitle" : "add a title",
"i.AddContent" : "Add Content",
"i.addembeddedobject" : "add embedded object",
Expand Down Expand Up @@ -350,6 +351,7 @@ VISH.Locales = {
"i.Zoom-" : "Zoom-",
"i.Zoom+" : "Zoom+",
"i.tooltip.QSInput" : "Enter a name for the live quiz",
"i.tooltip.UploadAttachment" : "If this button is disabled, you need to save your excursion first",
"i.vtTitle_GStarted" : "Getting Started with ViSH Editor",
"i.last" : "last"
},
Expand Down Expand Up @@ -662,6 +664,7 @@ VISH.Locales = {
"i.add" : "añadir",
"i.Add" : "Añadir",
"i.Addanavatar" : "Añadir avatar *",
"i.AddanavatarHover" : "Haz clic para añadir un avatar. Debes seleccionar un avatar para identificar tu excursión",
"i.addatitle" : "añade un título",
"i.AddContent" : "Añadir Contenido",
"i.addembeddedobject" : "añadir objeto embebido",
Expand Down Expand Up @@ -991,7 +994,7 @@ VISH.Locales = {
//Tooltips
"i.tooltip.QSInput" : "Introduce un nombre para el cuestionario en vivo",
"i.tooltip.Help" : "Ayuda",
"i.tooltip.UploadAttachment" : "Si no puedes subir un archivo adjunto, guarda primero la excusión",
"i.tooltip.UploadAttachment" : "Si no puedes subir un archivo adjunto, guarda primero la excursión",
//Video Tutorials
"i.vtTitle_GStarted" : "Introducción a ViSH Editor",
//Images (V.ImagesPath is omitted here)
Expand Down

0 comments on commit 9de0134

Please sign in to comment.