mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-07 08:21:47 +01:00
only load one datepicker translation when the locale is not 'en'
This commit is contained in:
parent
139b348d09
commit
aefb00c98e
1 changed files with 4 additions and 2 deletions
|
|
@ -260,9 +260,11 @@ module ApplicationHelper
|
|||
end
|
||||
|
||||
def javascript_tag_for_i18n_datepicker
|
||||
locale = I18n.locale
|
||||
# do not include en as locale since this the available by default
|
||||
locales_without_en = I18n::available_locales.find_all{|locale| !(locale.to_s == 'en') }
|
||||
return javascript_include_tag(locales_without_en.map{|locale| "i18n/jquery.ui.datepicker-#{locale}.js"})
|
||||
if locale and locale != :en
|
||||
javascript_include_tag("i18n/jquery.ui.datepicker-#{locale}.js")
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue