Jump to:

23480 Posts in 18951 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » Small Display Bug after Update to SS 3.1.2

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1 2
Go to End
Author Topic: 980 Views
  • DirtyHarri
    Avatar
    Community Member
    8 Posts

    Re: Small Display Bug after Update to SS 3.1.2 Link to this post

    Hi Dacar,

    in my opinion there are three things related to the issue:

    1.) The old behavior to fall back to the default language was broken by changing the language names from long names to short names e.g. de_DE to de, en_US to en and so on. The menu items for "right click on tree items" were always in english as the string was not in the translation file and the fallback to the en_US worked fine. I supplied a small fix to establish another fallback level which will look for the default language with the short name.

    2.) The translation files are incomplete, you already completed the german translation file. Can you create a pull request for these changes at github so it can be included in the next version? But I am not sure if changes should be made directly to the files in cms/javascript/lang, as they have a note in their header about an automated creation process. So I think the changes has to be made to the files in the src subdirectory. (In the meantime I will use your version of the de.js file)

    3.) There seems to be a lot i18n function calls without a default/fall-back string, which is the last level of fall back when looking for a translation. These function calls should always include a default string (english is better than an empty field...).

    I am not sure if I can find the time to search for all calls of the i18n function and add a default string to all of them if they do not already have one.

    Kind regards,
    Andreas.

  • DirtyHarri
    Avatar
    Community Member
    8 Posts

    Re: Small Display Bug after Update to SS 3.1.2 Link to this post

    Hi Dacar,

    one more thing I just noted when I copied your translation to my system.

    In your code the language name for the addDictionary function call is "de_DE", but version 3.1.2 (or my 3.1.x-dev) use the short name for the language.

    Which version of Silverstripe are you using? It seems that it will work also with the de_DE, but I can not say what implications there might be...

    // This file was generated by GenerateJavaScriptI18nTask from javascript/lang/src/de.js.
    // See https://github.com/silverstripe/silverstripe-buildtools for details
    if(typeof(ss) == "undefined" || typeof(ss.i18n) == "undefined") {
       if(typeof(console) != "undefined") console.error("Class ss.i18n not defined");
    } else {
       ss.i18n.addDictionary("de", {

    Kind regards,
    Andreas

    980 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.