- Add support for loading via AMD and CommonJS module loaders (#266)
- Add
I18n.nullPlaceholder
Defaults to I18n.missingPlaceholder ([missing {{name}} value]
)
Set tofunction() {return "";}
to match RubyI18n.t("name: %{name}", name: nil)
- For date formatting, you can now also add placeholders to the date format, see README for detail
- Add fallbacks option to
i18n-js.yml
, defaults totrue
- Force currency number sign to be at first place using
sign_first
option, default totrue
- Fix factory initialization so that the Node/CommonJS branch only gets executed if the environment is Node/CommonJS (it currently will execute if module is defined in the global scope, which occurs with QUnit, for example)
- Fix pluralization rules selection for negative
count
(e.g.-1
was lead to useone
for pluralization) (#268) - Remove check for
Rails.configuration.assets.compile
before telling Sprockets the dependency of translations JS file
This might be the reason of many "cache not expired" issues
Discovered/reported in #277
- The Rails Engine initializer is now named as
i18n-js.register_preprocessor
(fnando#261) - Rename
I18n::JS.config_file
toI18n::JS.config_file_path
and make it configurable
Expected aString
, default is stillconfig/i18n-js.yml
- When running
rake i18n:js:export
, thei18n.js
will also be exported toI18n::JS.export_i18n_js_dir_path
by default - Add
I18n::JS.export_i18n_js_dir_path
Expected aString
, default ispublic/javascripts
Set tonil
will disable exportingi18n.js
- Prevent toString() call on
undefined
when there is a missing interpolation value - Added support for Rails instances without Sprockets object (fnando#241)
- Fix
DEFAULT_OPTIONS
ini18n.js
which contained an excessive comma - Fix
nil
values are exported into JS files which causes strange translation error - Fix pattern to replace all escaped $ in I18n.translate
- Fix JS
I18n.lookup
modifies existing locales accidentally
- You can now assign
I18n.locale
&I18n.default_locale
before loadingi18n.js
inapplication.html.*
(merged toi18n-js-pika
already) - You can include ERB in
config/i18n-js.yml
(fnando#224) - Add support for +00:00 style time zone designator (fnando#167)
- Add back rake task for export (
rake i18n:js:export
) - Not overriding translation when manually run
I18n::JS.export
(fnando#171) - Move missing placeholder text generation into its own function (for easier debugging) (fnando#169)
- Add support for milliseconds (
lll
inyyyy-mm-ddThh:mm:ss.lllZ
) (fnando#192) - Add back i18n-js.yml config file generator :
rails generate i18n:js:config
(fnando#225)
I18n::JS.export
no longer exports locales other than those inI18n.available_locales
, ifI18n.available_locales
is set- I18.t supports the base scope through the options argument
- I18.t accepts an array as the scope
- Fix regression: asset not being reloaded in development when translation changed
- Requires
i18n
to be~> 0.6
,0.5
does not work at all - Fix using multi-star scope with top-level translation key (fnando#221)
- Things happened.