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 1.8k 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

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • First post
            Last post