This project is archived and is in readonly mode.
[I18n] :on key is converted to true, leading to TranslationMissing error
-
Aditya Sanghi
- Importance changed from to Low
Fairly sure this is a YAML issue not an i18n issue. I think there are a number of words that get evaluated to true in YAML.
>> YAML.load_file('config/locales/en.yml')['en']['bug'] => {true=>"on on", "at"=>"at at"}This is an issue nevertheless. I'll see if there are workarounds or flag or something to assist and report here.
-
Aditya Sanghi
- State changed from new to invalid
There is no easy solution it seems but to double quote "on" in your YAML file.
Please see http://yaml.org/type/bool.html
require 'yaml' YAML.load('a: on') # => {"a"=>true} YAML.load('"on": on on') # => {"on"=>"on on"}Closing this ticket as invalid as what is happening is as per YAML specification and the workaround is to double quote your keys and values if you want to prevent them from being booleanized by ruby.
Please feel free to comment if you feel otherwise about the status of the ticket.
-
Florent Vaucelle
I agree with the ticket status. Thanks a lot for the insight.
