Skip to content

Commit

Permalink
- Code comments and reference to orginal creator of this script
Browse files Browse the repository at this point in the history
- more translations
  • Loading branch information
chris committed Nov 23, 2012
1 parent 1ba3f3b commit cd9161f
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 4 deletions.
15 changes: 15 additions & 0 deletions Ext.ux.Localizer.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/**
* Allow for language change after language change after language change etc.
* Go back to original language using initialConfig
* Localizable grid values through column renderers!
* When components need tooltips, I usually add them as a tip property to the same component. That tooltip can be translated as well.
* Prevention against word wraps after translation that I have seen occuring.
* renamed locale file to js, because IIS for example can't read .json files by default. (just to make it easy to test run this)
* Most of my comments and changes are described in the commits and code. Code is mostly equal to what ssamayoa has posted.
* This is work in progress and needs further optimization. Specially in the area of configurability.
*
* @author Sergio Samayoa (creator) http://www.sencha.com/forum/showthread.php?182631-Different-languages-Translations&p=797073&viewfull=1#post797073
* @author Christiaan Westerbeek (contributor)
* @see http://www.sencha.com/forum/showthread.php?182631-Different-languages-Translations&p=797073&viewfull=1#post797073
*/

Ext.define("Ext.ux.Localizer", {

singleton : true,
Expand Down
8 changes: 7 additions & 1 deletion app/locale/en.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[
[
{key: "My Panel", value: "Mi panel"},
{key: "MyButton", value: "Mi botón"},
{key: "Boolean", value: "Lógico"},
{key: "Label", value: "Etiqueta"},
Expand All @@ -8,4 +9,9 @@
{key: "My Grid Panel", value: "Mi Grid"},
{key: "W0500", value: "Mensaje de prevención 500"},
{key: "Warning", value: "Prevención"},
{key: "String", value: "String"},
{key: "Boolean", value: "Boolean"},
{key: "Date", value: "datum"},
{key: "Number", value: "nombre"}

]
8 changes: 7 additions & 1 deletion app/locale/es.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[
[
{key: "My Panel", value: "Mi panel"},
{key: "MyButton", value: "Mi botón"},
{key: "Boolean", value: "Lógico"},
{key: "Label", value: "Etiqueta"},
Expand All @@ -8,4 +9,9 @@
{key: "My Grid Panel", value: "Mi Grid"},
{key: "W0500", value: "Mensaje de prevención 500"},
{key: "Warning", value: "Prevención"},
{key: "String", value: "String"},
{key: "Boolean", value: "Boolean"},
{key: "Date", value: "Fecha"},
{key: "Number", value: "Número"}

]
8 changes: 7 additions & 1 deletion app/locale/fr.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[
[
{key: "My Panel", value: "Mon panneau"},
{key: "MyButton", value: "Mi botón"},
{key: "Boolean", value: "Lógico"},
{key: "Label", value: "Etiqueta"},
Expand All @@ -8,4 +9,9 @@
{key: "My Grid Panel", value: "Mi Grid"},
{key: "W0500", value: "Mensaje de prevención 500"},
{key: "Warning", value: "Prevención"},
{key: "String", value: "String"},
{key: "Boolean", value: "Boolean"},
{key: "Date", value: "Date"},
{key: "Number", value: "Nombre"}

]
7 changes: 6 additions & 1 deletion app/locale/nl.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[
[
{key: "My Panel", value: "Mijn paneel"},
{key: "MyButton", value: "Mijn knop"},
{key: "Boolean", value: "Boolean"},
{key: "Label", value: "Label"},
Expand All @@ -8,4 +9,8 @@
{key: "My Grid Panel", value: "Mijn Grid"},
{key: "W0500", value: "Waarschuwing 500"},
{key: "Warning", value: "Waarschuwing"},
{key: "String", value: "String"},
{key: "Boolean", value: "Boolean"},
{key: "Date", value: "datum"},
{key: "Number", value: "Nummer"}
]

0 comments on commit cd9161f

Please sign in to comment.