Sha256: da3ac4b36719a491286d7d65db7b1f11dc42f8953837186bc9c90875eb2505ea

Contents?: true

Size: 1.1 KB

Versions: 4

Compression:

Stored size: 1.1 KB

Contents

/**
 * In order to choose the correct internationalization for among the
 * grid.locale.{lang} files, we will manually require each of these
 * grid.locale.* files (where * is the language code of the locale). These
 * files have each been slightly modified to no longer extend Aloha.jQuery with
 * a "jgrid" object, but rather a jgrid_* object. So instead of the jQuery
 * object having a single "jgrid" object, it will have several objects with
 * names like "jgrid_en", and "jgrid_de".
 * In order to determine which of these i18n objects should be used with the
 * browser, we read a "jgrid.locale" key from the i18n.js file in browser/nls,
 * an use this value to choose which of the jgrid_* objects, Aloha.jQuery.jgrid
 * should point to
 */
define( [
	'aloha/jquery',
	'i18n!browser/nls/i18n',
	'browser/../vendor/grid.locale.en',
	'browser/../vendor/grid.locale.de'
], function ( jQuery, i18n ) {
	var locale = i18n[ 'jgrid.locale' ] || 'en';
	if ( typeof jQuery.jgrid == 'undefined' ) {
		jQuery.jgrid = {};
	}
	jQuery.extend( jQuery.jgrid, jQuery[ 'jgrid_' + locale ] );
	jQuery.jgrid_en = jQuery.jgrid_de = void 0;
} );

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
locomotive-aloha-rails-0.20.1.5 vendor/assets/javascripts/aloha/plugins/extra/browser/lib/locale.js
free_text-0.0.3 app/assets/javascripts/aloha-0.10.0/plugins/extra/browser/lib/locale.js
locomotive-aloha-rails-0.20.1.4 vendor/assets/javascripts/aloha/plugins/extra/browser/lib/locale.js
locomotive-aloha-rails-0.20.1.3 vendor/assets/javascripts/aloha/plugins/extra/browser/lib/locale.js