Created attachment 114486 [details] Screenshot of KbibTeX 0.8.2 window, Ukrainain (uk) locale, compiled from 0.8.2 branch at 2018-08-17 Strings from bibtexfields.cpp and bibtexentries.cpp are successfully extracted to kbibtex.pot, can be translated, but are shown in English in the interface in both 0.8.2 and git/master branches (please see the screenshot attached). They are displayed correctly (translated) in v0.7 from Mageia RPM. It was told that "They are using i18n() before creating a QCoreApplication and that is not supported at this time." https://marc.info/?l=kde-i18n-doc&m=153462469130148&w=2 Many thanks in advance for fixing this bug.
I have trouble getting translations to be loaded in the first place (everything stays English, no matter what) so I have problems to reproduce this bug. However, I believe that it exists and I may have an idea how to fix it. Please check out this commit and see if it makes a difference in your case: https://commits.kde.org/clones/kbibtex/thomasfischer/kbibtex/b595e7ccaf75875022d1fdf927568b67b7a7b3ed Note that this code only exists in my personal clone of KBibTeX's code, but not in the official repository.
(In reply to Thomas Fischer from comment #1) > Please check out this commit and see if it makes a difference in your case: > https://commits.kde.org/clones/kbibtex/thomasfischer/kbibtex/ > b595e7ccaf75875022d1fdf927568b67b7a7b3ed Tested for git/master. Now the translations work as expected. Thanks for your work.
Git commit a801a85b9755f154c0192ff7a22e9df00772e14f by Thomas Fischer. Committed on 01/09/2018 at 18:47. Pushed by thomasfischer into branch 'kbibtex/0.8'. Delaying initialization of static variables To allow for proper internationalization to be loaded and initialized before static const variables in BibTeXFields and BibTeXEntries, those variables have been refactored into the singleton functions of each class. FIXED-IN: 0.8.2 M +48 -47 src/config/bibtexentries.cpp M +159 -158 src/config/bibtexfields.cpp https://commits.kde.org/kbibtex/a801a85b9755f154c0192ff7a22e9df00772e14f
Git commit d11f419afc2289e42f4b3bd682ef8269ccd13bf1 by Thomas Fischer. Committed on 30/08/2018 at 19:28. Pushed by thomasfischer into branch 'master'. Delaying initialization of static variables To allow for proper internationalization to be loaded and initialized before static const variables in BibTeXFields and BibTeXEntries, those variables have been refactored into the singleton functions of each class. M +48 -48 src/config/bibtexentries.cpp M +159 -159 src/config/bibtexfields.cpp https://commits.kde.org/kbibtex/d11f419afc2289e42f4b3bd682ef8269ccd13bf1