Search Unity

Bug Issue with saving strings table in version 0.3.1

Discussion in 'Localization Tools' started by Lukas-Labaj, May 13, 2019.

  1. Lukas-Labaj

    Lukas-Labaj

    Joined:
    Nov 22, 2012
    Posts:
    36
    I have installed 0.3.1-preview in Unity 2018.3.7f1 and after restarting unity I lost all of my translation strings for any locale. I tried go back to version 0.2.3 and there everything works good.
     
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,282
    Yes, I'm afraid this version will break 0.2.3. We introduced the Key Database which now holds all the translation keys instead of each table. At this stage, we are not providing upgrade paths between versions so things may break.
     
  3. Lukas-Labaj

    Lukas-Labaj

    Joined:
    Nov 22, 2012
    Posts:
    36
    Thank you for quick reply :) I have installed new version 0.3.1 from scratch, I didn't upgrade from old version. Can you confirm new version working well for you (saving strings translations). Note: textures translations worked correctly. Thank you.
     
  4. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,282
    Hi. 0.3.2 is out now. Please use this version as it fixes the strings not saving in the Table editor bug.
    If you check the release notes in the future we do try to say when a change will break things, it should not happen all the time :)
     
  5. Lukas-Labaj

    Lukas-Labaj

    Joined:
    Nov 22, 2012
    Posts:
    36
    Hi, Unity 2018.3 is not supported in this new version? Minimum for this package will be 2019+?
     
  6. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,282
    Yeah hopefully it's a temporary thing. ugui has moved into a package in 2019.2 which means we now support it as an optional dependency in our asmdefs however 2018.4 does not support optional dependencies and throws errors. As the package currently needs to support all versions we had to remove 2018.4 support but hope to either find a solution to work around the issue or create a separate release for 2018.4 in the future.
     
  7. Lukas-Labaj

    Lukas-Labaj

    Joined:
    Nov 22, 2012
    Posts:
    36
    Thank you, saving strings now working properly (in Unity 2019). But I found small issue, checkbox "Plural Mode" is not stored after closing Asset Table editor. Translated version are stored correctly only checkbox is not set properly.
     
  8. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,282
    The checkbox is not a stored value. It just checks if multiple translated strings exist for the value, if they do it's enabled. Which will always be false for languages with one plural. It's a UX issue we need to address.
     
    Lukas-Labaj likes this.
  9. AngelBeatsZzz

    AngelBeatsZzz

    Joined:
    Nov 24, 2017
    Posts:
    239
    Hi, I use "0.3.2+Unity2019.1.2f1" and the string will still be lost after the editor restarts.

    I did the tests on the empty project.
     
  10. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,282
    Hi. Thanks, we have fixed this issue and hope to have it available shortly. It was caused by the tables not being SetDirty.
    You can fix this now by editing the file Editor/Tables/StringTableListView.cs and adding EditorUtility.SetDirty(col.Table); to line 183, under the line Undo.RecordObject(col.Table, "Change translated text");
     
    AngelBeatsZzz likes this.
  11. AngelBeatsZzz

    AngelBeatsZzz

    Joined:
    Nov 24, 2017
    Posts:
    239
    It works, thank you.
     
  12. AngelBeatsZzz

    AngelBeatsZzz

    Joined:
    Nov 24, 2017
    Posts:
    239
    When I restarted the editor for the second time, the string disappeared and I found that "EditorUtility.SetDirty(col.Table);" also disappeared.

    It seems that StringTableListView.cs will automatically reset its own code.

    I think I should wait for the new version.
     
  13. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,282
    Oh interesting. I guess the package cache updated itself.
     
    AngelBeatsZzz likes this.