[Lada-commits] [PATCH 4 of 9] Enabled i18n translation of store values

Wald Commits scm-commit at wald.intevation.org
Fri May 22 16:14:38 CEST 2015


# HG changeset patch
# User Dustin Demuth <dustin at intevation.de>
# Date 1432293408 -7200
# Node ID 0840c4cf2273c69df5555e746c051a77fa4f0b9e
# Parent  1e7095533038e3fe093429b58b473211dd6f06fe
Enabled i18n translation of store values

diff -r 1e7095533038 -r 0840c4cf2273 app/store/Probenintervall.js
--- a/app/store/Probenintervall.js	Fri May 22 13:16:06 2015 +0200
+++ b/app/store/Probenintervall.js	Fri May 22 13:16:48 2015 +0200
@@ -16,7 +16,10 @@
     fields: ['probenintervall',
             {
                 name: 'piTexti18nId',
-                convert: translateStore
+                convert: function(v, record) {
+                    var i18n = Lada.getApplication().bundle;
+                    return i18n.getMsg(v);
+                }
             },
             'periodstart',
             'periodend'],
@@ -70,10 +73,4 @@
     remoteSort: false
 });
 
-function translateStore(v, record){
-// TODO currently Lada.get... can not be found when this code is run.
-//    var i18n = Lada.getApplication().bundle;
-//    return i18n.getMsg(v);
-      return v;
-}
 


More information about the Lada-commits mailing list