UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Translation from .po file not applying

    Scheduled Pinned Locked Moved Solved Translations
    2 Posts 1 Posters 386 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
      Reply
      • Reply as topic
      Log in to reply
      This topic has been deleted. Only users with topic management privileges can see it.
      • L Offline
        lkroll
        last edited by lkroll

        Hey fellow translators,

        for some reason I can't get any translation to work for my app: https://gitlab.com/lkroll/nostrut.

        Someone contributed a Dutch translation via a .po file but it is not applied in the app.
        I also tried adding a German translation myself and the same thing happens.

        When I try launching the app with clickable in another language it is still in English:

        clickable desktop --lang nl_NL
        

        From what I can tell the .mo files are being installed in the correct place:

        -- Installing: /home/lennart/Git/GitLab/nostrut/build/x86_64-linux-gnu/app/install/share/locale/de_DE/LC_MESSAGES/nostrut.lkroll.mo
        -- Installing: /home/lennart/Git/GitLab/nostrut/build/x86_64-linux-gnu/app/install/share/locale/nl/LC_MESSAGES/nostrut.lkroll.mo
        

        Maybe there is an error on my end and the translation works, but the weird thing is for my other app (https://gitlab.com/lkroll/lighthouse-control) I do not have this problem and my German translation works as expected.

        Can someone enlighten me here?

        1 Reply Last reply Reply Quote 0
        • L Offline
          lkroll
          last edited by

          After asking in the telegram app dev group I found out that the error was caused by not specifying the property applicationName inside of the MainView. Because of that the gettext domain was set to an empty string, which prevented the translations from getting loaded.

          1 Reply Last reply Reply Quote 0
          • arubislanderA arubislander marked this topic as a question on
          • arubislanderA arubislander has marked this topic as solved on
          • First post
            Last post