mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
Update js_locale_helper.rb
Fix "undefined method `end_with?' for 1:Fixnum" when field name in YML file is not quoted number like: ``` user_action_groups: 1: "Likes Given" 2: "Likes Received" ``` (yamllint.com validates such file as valid YML file)
This commit is contained in:
parent
f268b882fd
commit
621d949033
1 changed files with 1 additions and 1 deletions
|
@ -62,7 +62,7 @@ module JsLocaleHelper
|
||||||
hash.each do |k,v|
|
hash.each do |k,v|
|
||||||
if Hash === v
|
if Hash === v
|
||||||
rval.merge!(strip_out_message_formats!(v, prefix + (prefix.length > 0 ? "." : "") << k, rval))
|
rval.merge!(strip_out_message_formats!(v, prefix + (prefix.length > 0 ? "." : "") << k, rval))
|
||||||
elsif k.end_with?("_MF")
|
elsif k.to_s().end_with?("_MF")
|
||||||
rval[prefix + (prefix.length > 0 ? "." : "") << k] = v
|
rval[prefix + (prefix.length > 0 ? "." : "") << k] = v
|
||||||
hash.delete(k)
|
hash.delete(k)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue