diff --git a/src/i18n/en.js b/src/i18n/en.js index d835c0c3..6bd5cf9b 100644 --- a/src/i18n/en.js +++ b/src/i18n/en.js @@ -11,13 +11,4 @@ this.recline.View.translations['en'] = { map_mapping: 'Coordinates source', map_mapping_lat_lon: 'Latitude / Longitude fields', map_mapping_geojson: 'GeoJSON field' -} - -// -//(function(v) { -// "use strict"; -// -// -// -//})(recline.t); -// +} \ No newline at end of file diff --git a/src/i18n/pl.js b/src/i18n/pl.js index fb7a0bb4..82cccb3e 100644 --- a/src/i18n/pl.js +++ b/src/i18n/pl.js @@ -64,12 +64,3 @@ this.recline.View.translations['pl'] = { num_records: '{recordCount} rekordów' } - -// -//(function(v) { -// "use strict"; -// -// -// -//})(recline.t); -// diff --git a/src/i18n/view.i18n.js b/src/i18n/view.i18n.js index d3a88717..65a2f174 100644 --- a/src/i18n/view.i18n.js +++ b/src/i18n/view.i18n.js @@ -1,9 +1,6 @@ /*jshint multistr:true */ -// todo probably some kind of mixin would be better -//usage: (zamienic na extension) -// my.View - Backbone.View.extend({}); -//_.extend(my.View, Backbone.I18nView); +// TODO probably some kind of mixin would be better, like: my.View - Backbone.View.extend({}); _.extend(my.View, Backbone.I18nView); Backbone.I18nView = Backbone.View.extend({ defaultLocale: 'en', diff --git a/src/view.grid.js b/src/view.grid.js index eaa646c0..3ef12f77 100644 --- a/src/view.grid.js +++ b/src/view.grid.js @@ -124,7 +124,8 @@ my.Grid = Backbone.I18nView.extend({ var newView = new my.GridRow({ model: doc, el: tr, - fields: self.fields + fields: self.fields, + locale: self.locale }); newView.render(); }); @@ -166,11 +167,12 @@ my.Grid = Backbone.I18nView.extend({ // fields: mydatasets.fields // a FieldList object // }); // -my.GridRow = Backbone.View.extend({ +my.GridRow = Backbone.I18nView.extend({ initialize: function(initData) { _.bindAll(this, 'render'); this._fields = initData.fields; this.listenTo(this.model, 'change', this.render); + this.initializeI18n(initData.locale); }, template: ' \