[open-ils-commits] r10119 - trunk/Open-ILS/web/js/dojo/openils
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Jul 24 13:58:28 EDT 2008
Author: miker
Date: 2008-07-24 13:58:20 -0400 (Thu, 24 Jul 2008)
New Revision: 10119
Modified:
trunk/Open-ILS/web/js/dojo/openils/I18N.js
Log:
pull valid locales from the configured set in the database
Modified: trunk/Open-ILS/web/js/dojo/openils/I18N.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/openils/I18N.js 2008-07-24 17:40:41 UTC (rev 10118)
+++ trunk/Open-ILS/web/js/dojo/openils/I18N.js 2008-07-24 17:58:20 UTC (rev 10119)
@@ -25,20 +25,11 @@
dojo.declare('openils.I18N', null, {});
- openils.I18N.BaseLocales = {
- "en" : "English",
- "en_us" : "US English",
- "en_ca" : "Canadian English",
- "es" : "Spanish",
- "es_us" : "US Spanish",
- "fr" : "French",
- "fr_ca" : "Canadian French"
- };
-
+ openils.I18N.BaseLocales = fieldmapper.standardRequest( [ 'open-ils.fielder', 'open-ils.fielder.i18n_l.atomic'], [ { query : { code : { '!=' : null } } } ] );
openils.I18N.localeStore = new dojo.data.ItemFileWriteStore( { data : {identifier : 'locale', label : 'label', items : [] } } );
for (var i in openils.I18N.BaseLocales) {
- openils.I18N.localeStore.newItem({ locale : i, label : openils.I18N.BaseLocales[i] });
+ openils.I18N.localeStore.newItem({ locale : openils.I18N.BaseLocales[i].code, label : openils.I18N.BaseLocales[i].name });
}
openils.I18N.getTranslations = function ( obj /* Fieldmapper object */, field /* Field to translate */, locale /* optional locale */) {
More information about the open-ils-commits
mailing list