Skip to content

Commit a345c3c

Browse files
authored
Merge pull request #2925 from zakihaya/fix_js_locale_settings
Fix JS translations not be object but string
2 parents f3f6c2c + 333bec6 commit a345c3c

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

app/assets/javascripts/rails_admin/ra.i18n.coffee

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
@RailsAdmin.I18n = class Locale
33
@init: (@locale, @translations)->
44
moment.locale(@locale)
5+
if typeof(@translations) == "string"
6+
@translations = JSON.parse(@translations)
57

68
@t:(key) ->
79
humanize = key.charAt(0).toUpperCase() + key.replace(/_/g, " ").slice(1)

0 commit comments

Comments
 (0)