Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Bug [SOLVED] LocalizedString returning "No translation found" when configured correctly in the inspector

Discussion in 'Localization Tools' started by keenan_unity636, Nov 2, 2022.

  1. keenan_unity636

    keenan_unity636

    Joined:
    May 26, 2021
    Posts:
    3
    LocalizedStrings that use strings from a certain table collection are not working.

    I have written a simple test component that prints a localized string to demonstrate.
    Code (CSharp):
    1. public class LocalizedStringTest : MonoBehaviour
    2. {
    3.     public LocalizedString zoomIn;
    4.    
    5.     private void Start()
    6.     {
    7.         print(zoomIn.GetLocalizedString());
    8.     }
    9. }
    It appears to be configured correctly in the inspector. It displays the English translation correctly.
    upload_2022-11-2_11-46-42.png

    but it prints, "No translation found for 'ZOOM_IN' in Session"
    It is clearly added to the table.
    upload_2022-11-2_11-48-43.png

    Am I doing anything wrong? This seems like a bug. I've tried re-assigning it in the inspector, making a new test component, re-pulling keys from google sheets, rebuilding addressables etc.
     

    Attached Files:

  2. keenan_unity636

    keenan_unity636

    Joined:
    May 26, 2021
    Posts:
    3
    I'm using Localization v1.3.2 on Unity 2021.3.12
     
  3. keenan_unity636

    keenan_unity636

    Joined:
    May 26, 2021
    Posts:
    3
    Somehow the Session table was not added to any string table asset groups. The asset group is greyed out in the group viewer so I am not sure how to add it. I was able to retrigger *something* that caused it to be added by doing the following:

    1. Delete the String Table Collection and its String Tables
    2. Recreate them.
    3. Undo all my changes via version control

    The locale asset groups now have the guid of the *original* string table added o_O
    I stumbled into this accidentally and hadn't noticed the tables were missing from the asset groups until they were magically re-added in my VC pending changes.

    image (1).png
     

    Attached Files:

    Last edited: Nov 2, 2022
  4. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,058