mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-26 20:56:48 +00:00
It has become the issue https://github.com/openfoodfoundation/openfoodnetwork/issues/1961
9 lines
306 B
CoffeeScript
9 lines
306 B
CoffeeScript
# Declares the translation function t.
|
|
# You can use translate('login') or t('login') in Javascript.
|
|
window.translate = (key, options = {}) ->
|
|
unless 'I18n' of window
|
|
console.log 'The I18n object is undefined. Cannot translate text.'
|
|
return key
|
|
I18n.t(key, options)
|
|
window.t = window.translate
|