Skip to content
Snippets Groups Projects
  • Ryan Senior's avatar
    96b77169
    Add UserLocalizedString and SystemLocalizedString for i18n · 96b77169
    Ryan Senior authored
    Currently i18n'd strings that are defined at compile time only return
    english text. This occurs with both system and user locale
    strings. For system locale, the locale can be changed via setting, so
    we can't rely on the JVM locale on startup to be correct as it may
    have changed. For the user locale, it could be different for every
    request.
    
    This commit adds two new `tru` and `trs` macros that have the same
    name as the `puppetlabs.i18n.core` macros (and thus will be extracted
    similarly) but will return a defrecord with a `toString` method. This
    delays the conversion of the english text to the translated text until
    `str` is invoked. All of the code hasn't been flipped to use the new
    i18n macros yet, but this gets it in place and tested for the rest of
    the application to be migrated to.
    
    Fixes #8245
    96b77169
    History
    Add UserLocalizedString and SystemLocalizedString for i18n
    Ryan Senior authored
    Currently i18n'd strings that are defined at compile time only return
    english text. This occurs with both system and user locale
    strings. For system locale, the locale can be changed via setting, so
    we can't rely on the JVM locale on startup to be correct as it may
    have changed. For the user locale, it could be different for every
    request.
    
    This commit adds two new `tru` and `trs` macros that have the same
    name as the `puppetlabs.i18n.core` macros (and thus will be extracted
    similarly) but will return a defrecord with a `toString` method. This
    delays the conversion of the english text to the translated text until
    `str` is invoked. All of the code hasn't been flipped to use the new
    i18n macros yet, but this gets it in place and tested for the rest of
    the application to be migrated to.
    
    Fixes #8245
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
locales.clj 86 B
{
  :locales  #{"en" "zz"}
  :packages ["metabase"]
  :bundle   "metabase.Messages"
}