Fix instance variable not defined warnings due to added deprecations
Also fix the rescue_format deprecation, it seems it was never being triggered because it was checking for the existence of a not yet defined variable.
Fallbacks should check whether each fallback location being tried was set by store_translations before deferring to I18n.translate. Otherwise a I18n::InvalidLocale may be raised when enforce_available_locales is set.
Created a test-case for an issue where the Fallbacks module will generate an I18n::InvalidLocale error. Fallbacks relies on I18n.translation to find out whether there's a translation for a fallback locale (e.g. :'de' for :'de-DE'). But I18n.translation does not distinguish from a "user" call and one coming from the Fallbacks module, and may raise I18n::InvalidLocale if enforce_available_locales is set.
…locales-setting Fix an issue with setting I18n.config.enforce_available_locales
currently setting this config to false will not stick due to the memoize overwriting it back to nil. this probaly works ok in many circumstances because of falsy nil, but annoyingly it does not prevent the deprecation warning that comes along with having the setting unconfigured.
…nfig.enforce_available_locales Renamed `I18n.enforce_available_locales` method to `I18n.enforce_available_locales!`
I18n.locale_available? looks for the passed locale in the `I18n.available_locales` list. --- Enforce available locales When `I18n.config.enforce_available_locales` is true we'll raise an I18n::InvalidLocale exception if the passed locale is available. The default is set to `nil` which will display a deprecation error. If set to `false` we'll skip enforcing available locales altogether (old behaviour). This has been implemented in the following methods : - I18n.config.default_locale= - I18n.config.locale= - I18n.translate - I18n.localize - I18n.transliterate
…_message Also added deprecation message for the :rescue_format option
Updated #69 - Add exists? to check if a certain key exists in the translations
…ed test to lib/i18n/tests/basics.rb
Simplify handling of missing interpolation argument
Return meridian in correct case.