Closed Rob--W closed 9 years ago
Before this PR, it was impossible to programatically get the value of an localized attribute. I checked the implementation of how attributes in the properties file are parsed, and derived a method that recognized attributes, if specified.
Read commit message of dd0703a662a623e550317e3437f6850796606e9c for an explanation of the second change set. In a nutshell:
webL10n.get('non_existent', null, 'fallback') === 'fallback'
webL10n.get('non_existent', null, 'fallback') === '';
Thanks for this patch @Rob--W, and sorry for having missed it. My bad.
Before this PR, it was impossible to programatically get the value of an localized attribute. I checked the implementation of how attributes in the properties file are parsed, and derived a method that recognized attributes, if specified.
Read commit message of dd0703a662a623e550317e3437f6850796606e9c for an explanation of the second change set. In a nutshell:
webL10n.get('non_existent', null, 'fallback') === 'fallback'
webL10n.get('non_existent', null, 'fallback') === '';
(expected 'fallback')