chris2511 / xca

X Certificate and Key management
http://xca.hohnstaedt.de
Other
1.49k stars 203 forks source link

macOS: Activate localization for Qt's macOS-specific Finder menu #311

Closed HackintoshHD closed 2 weeks ago

HackintoshHD commented 2 years ago

I have noticed that xca's macOS-specific Qt Finder menu is not localized (by that I refer to the Mac-specific, first menu item and its sub-entries in the macOS Finder bar on top of the screen right to the Apple symbol, which for macOS applications is always the application's name). All content remains in English which would be okay if the strings simply hadn't been translated yet.

I've initially noticed this issue in another of my favorite applications, digiKam, which is also built on Qt and have filed a bug report there. Gilles Caulier, digikam's coordinator and one of its three lead developers, has looked into the issue and could resolve it really easily for digiKam:

https://bugs.kde.org/show_bug.cgi?id=432685#c3 https://bugs.kde.org/show_bug.cgi?id=432685#c4

It sure is a more or less cosmetic issue, but on the other hand, a homogeneous, complete localization very much adds to an 'OS-native' user experience of an application. So I wonder if the described folder structure could be added to one of xca's next builds?

Thanks a lot!

chris2511 commented 3 weeks ago

Adding <lang>.lproj directories to the Resources folder as described in the bug above and the "Localized Resources in Bundles" chapter in https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFBundles/BundleTypes/BundleTypes.html#//apple_ref/doc/uid/20001119-105003 only works for other apps, but not for XCA. Hell knows why.

I additionally tried some empty file in the directory and adding them before codesigning with no success. The "Finder Menu" remains english.

Any other ideas or hints are very welcome, because I would also like a homogeneously translated app.

The CFBundleLocalizations in the Info.plist also contains all languages, but the "Finder Menu" remains english.

My primary language is set to german, so I would at least expect a german "Finder Menu"

This action-build https://github.com/chris2511/xca/actions/runs/10515594540 contains the changes. Maybe it works for somebody else

chris2511 commented 2 weeks ago

In the end the .lproj directories were irrelevant. I just messed up the installation of the QT translation files.