Skip to content

Include the standard Qt translation files with our OSX installers #1626

Open

Description

@justinclift

In #1592 we worked out how to add the missing standard Qt translations to our Windows installer. We need to do the same for our OSX installers too.

Activity

  1. self-assigned this
    on Nov 26, 2018
  2. justinclift commented on Nov 26, 2018

    @justinclift
    MemberAuthor

    Looking into this now. Adding the standard Qt files (trying with French for the moment) to the same translations directory as our other ones isn't working (on OSX).

    Looks like they need to be in some other location. Investigating...

  3. justinclift commented on Nov 26, 2018

    @justinclift
    MemberAuthor

    Having no joy at all with this. Looking at how Qt Creator itself is deployed on OSX, it has a Resources/translations/ directory, with all of the standard Qt translation files + its own in there.

    Trying to copy that approach, if I copy the entire set of standard Qt translation files (from the Qt 5.11.2 translations dir) into a new Resources/translations/ directory in our structure. No change.

    The way I'm attempting to test things is by:

    1. Open the DB4S Preferences menu and change the language there (to French), then restart DB4S.
    2. Note - The main DB4S interface is now in French (as expected)
    3. Open any local database file, then click the (French equivalent) "New table" button. This shows the "New table dialog" with the main strings in French.

    Unfortunately, the "Cancel" and "OK" buttons at the bottom of the window are still in English:

    capture d ecran 2018-11-26 a 06 37 22

    I've also tried after changing the system language to French in the main OSX menu + restarting, so the entire OSX experience is in French. No change, those "Cancel" and "OK" buttons are still in English for DB4S.

    Also tried copying the entire set of Qt translation files into the DB4S Contents/MacOS/translations/ folder. Again no change at all.

    Checking other applications while the OSX System setting is set to French, and they have correctly translated "Cancel" & "OK" buttons (using the French equivalent).

    Anyone have ideas? I'm hitting a blank wall atm. 😦

  4. justinclift commented on Nov 26, 2018

    @justinclift
    MemberAuthor

    Asked in the #qt channel on IRC, and the answer there looks good:

    06:48 < JustinClift> Heyas, I'm trying to figure out where to put Qt 5.11.2's *.qm files when deploying an application on macOS, such that things like the "Cancel" & "OK" buttons come up translated.
    06:49 < JustinClift> Our application is showing *our* translated strings fine, it's just not showing the translations for standard Qt buttons.
    06:49 < JustinClift> Got it figured out for Windows, just needing to get this working for macOS next.
    06:50 < JustinClift> Anyone have ideas?  I've tried copying the same approach as used by Qt Creator, to throw the translation files into `Contents/Resources/translations/`, but no joy.
    06:51 < JustinClift> Also created a GitHub issue with screenshots and details, if that's useful. 
                         https://github.com/sqlitebrowser/sqlitebrowser/issues/1626 :)
    07:16 < thiago> JustinClift: in whatever your application shows as QLibraryInfo::location(QLibraryInfo::TranslationsPath)
    07:16 < thiago> after macdeployqt
    07:23 < JustinClift> thiago: Thanks heaps.  I'll go check the build logs and/or run through the process manually to find it. :)
    

    I'll give that a go shortly. 😄

  5. justinclift commented on Nov 26, 2018

    @justinclift
    MemberAuthor

    Btw, thanks for the assist @thiagomacieira. 😄

  6. justinclift commented on Nov 26, 2018

    @justinclift
    MemberAuthor

    The output from that is /Applications/DB Browser for SQLite.app/Contents/translations.

    Thought I'd already tried that location, but I'll put the translations there again now just in case and see what happens. 😄

  7. justinclift commented on Nov 26, 2018

    @justinclift
    MemberAuthor

    Yep, that does look like the correct place after all. I'd been trying slightly different path variations, missing that exact one.

    Updating the macOS build script to add the right files now...

  8. justinclift commented on Nov 26, 2018

    @justinclift
    MemberAuthor

    Initial manual testing of the new build script seems ok. Running it end-to-end now. If it completes ok, then new OSX nightlies will be online in ~2.5 hours. They'll need testing (for each language) to make sure the language files are doing the right thing. But, I'm hopeful it's mostly ok. 😄

  9. justinclift commented on Nov 27, 2018

    @justinclift
    MemberAuthor

    The internet connection dropped out while those OSX nightlies were building, so that run failed. Ran the build job again, this time successfully, and now I'm verifying the individual translations display ok when DB4S runs:

    Language Status
    Arabic Seems ok
    Chinese (China) Qt strings not translated
    Chinese (Taiwan) Qt strings not translated, many other DB4S strings also not translated
    Czech Seems ok
    English (US) Nothing to check here, so "it's OK". 😉
    English (UK) Nothing to check here, so "it's OK". 😉
    French Seems ok
    German Seems ok
    Korean Seems ok
    Polish Seems ok
    Portuguese Qt strings not translated
    Russian Seems ok
    Spanish Seems ok
    Turkish Qt strings not translated, several other DB4S strings also not translated
    Ukranian Seems ok

    So, not a perfect result yet. My initial suspicion is there might be some naming mismatches between the language code we're using for DB4S's strings, and the language code used by Qt for it's strings. eg:

    Language DB4S lang code Qt lang code Notes
    Chinese (China) zh zh_CN
    Chinese (Taiwan) zh_TW zh_TW These are the same though. 😕
    Portuguese pt_BR pt
    Turkish tr ?? Qt Turkish strings are missing from the OSX installer. Need to investigate.

    Experimenting now...

  10. justinclift commented on Nov 27, 2018

    @justinclift
    MemberAuthor

    A should probably check each language for the Windows installers too, as the same problem is likely to happen there as well.

  11. justinclift commented on Nov 27, 2018

    @justinclift
    MemberAuthor

    Looking through the translation directory in the Qt 5.11.2 folder, it seems like the problem starts there. There are just very few Chinese, Portuguese, and Turkish files.

    I'm not (yet) sure if that's because of a build problem with the Qt 5.11.2 installers, or the Qt project just doesn't have translated strings for those languages yet. Looking into it now. 😄

  12. justinclift commented on Nov 27, 2018

    @justinclift
    MemberAuthor

    Yep, the problem seems to be the main Qt project not having translated strings for those languages:

        https://github.com/qt/qttranslations/tree/5.11/translations

    The longer term solution to the problem is probably to ask our translators for the missing bits, if they'd be ok to help translate for the main Qt project. The results would reach us through the next Qt release.

    As a cheating approach 😉 for now, we could possibly identify the strings needed by the DB4S dialogs and try to get translations done for just those. Generating .qm files from those + adding them to our installers should fix things for us.

    Naturally, those same strings would be useful for the main Qt project.

    @bssthu @PeterDaveHello @firateski @bernardosulzbach Does any of the above sound like a reasonable idea? 😄

  13. bernardosulzbach commented on Nov 27, 2018

    @bernardosulzbach
    Contributor

    I'm OK with providing the patches for either the Qt project or to DB4S, I just need some better clarification about what you want me to do exactly. Also, I might have to solve some higher priority issues before I can work on this, but I will get to it eventually.

  14. 8 remaining items

  15. justinclift commented on Dec 4, 2018

    @justinclift
    MemberAuthor

    Yeah, that's the general line of thought I have.

    eg first priority is to get the stuff done (for us) that we think we'll need. We could also then provide the same strings to the Qt project, but we don't really need to care if they decide to reject them or something as it won't have a negative effect on us.

    Time wise... I think it might be better to do this after the 3.11.0 release? It could turn out to be complicated, and I'd rather not delay the .0 release for it. 😄

  16. bernardosulzbach commented on Dec 4, 2018

    @bernardosulzbach
    Contributor

    I agree with everything you said. For me, in late December and January I will have more free time than I have now.

  17. justinclift commented on Dec 4, 2018

    @justinclift
    MemberAuthor

    Excellent. Sounds good to me too @bernardosulzbach. 😄

  18. MKleusberg commented on Feb 14, 2020

    @MKleusberg
    Member

    @justinclift Do you know if this is still an open issue? 😄

  19. mgrojo commented on Sep 7, 2025

    @mgrojo
    Member

    According to the PR #4005, the Qt translation is not being used on Windows. On Linux, I see that my own build on main branch works, but not our released 3.13.1 AppImage.

  20. lucydodo commented on Sep 16, 2025

    @lucydodo
    Member

    @mgrojo Was there an issue during the AppImage packaging process?

  21. PeterDaveHello commented on Sep 16, 2025

    @PeterDaveHello
    Contributor

    I’m tied up with other commitments at the moment, so I haven’t had time to dig into the full Qt contribution process yet. If someone can outline a straightforward workflow for submitting translations upstream, or help open a dialog with the Qt maintainers about collaborating, I’ll definitely look at contributing the missing Traditional Chinese strings.

  22. mgrojo commented on Sep 16, 2025

    @mgrojo
    Member

    @mgrojo Was there an issue during the AppImage packaging process?

    I don't know. It's possible that the same underlying problem is present in both the AppImage and Windows packaging. Maybe we have to tell cmake to include the Qt translations files in the build?

    I’m tied up with other commitments at the moment, so I haven’t had time to dig into the full Qt contribution process yet. If someone can outline a straightforward workflow for submitting translations upstream, or help open a dialog with the Qt maintainers about collaborating, I’ll definitely look at contributing the missing Traditional Chinese strings.

    These are two different issues. One is that we don't include the translation files already present in Qt, so we don't get any translation for any of the strings that are included in the Qt library, like default buttons and menus. Another matter is whether the Qt translation files are complete for each of the languages.

  23. lucydodo commented on Sep 17, 2025

    @lucydodo
    Member

    @mgrojo I'll look into this issue this weekend.

  24. lucydodo commented on Sep 24, 2025

    @lucydodo
    Member

    @mgrojo How did you install the Qt used during the build?
    I still encounter the same issue when building from the master branch.

  25. mgrojo commented on Sep 24, 2025

    @mgrojo
    Member

    @mgrojo How did you install the Qt used during the build? I still encounter the same issue when building from the master branch.

    I just build it using the Ubuntu packages for Qt5, so I guess it takes the translation files available also on Ubuntu, I guess, from the qttranslations5-l10n package.

  26. ozgurerturk commented on Aug 1, 2026

    @ozgurerturk

    Hello, is this issue still open?

    I encountered the same problem with turkish version of db browser for sqlite, I looked it up from qttranslations and found out they were added for the 5.15-tr branch.

    I generated the .qm turkish files, added them to my installed translations path and qt strings were translated correctly from my end.

    I guess it looks like Turkish and other catalogs are not included in qt 5.15.2 installation? Should I open a PR there or store the generated .qm files in this repo maybe?

  27. FriedrichFroebel commented on Aug 2, 2026

    @FriedrichFroebel
    Contributor

    Hello, is this issue still open?

    If the nightly builds still miss them, probably yes.

    Should I open a PR there or store the generated .qm files in this repo maybe?

    This is most likely the wrong approach. Instead, they should be handled/included correctly on build time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions