Entering account opening balance always creates an account using an untranslated name. Reproducible: Always Steps to Reproduce: 1. start kmymoney configured with non english language for example german 2. create a new file using any account template 3. goto to any account, enter an opening balance and save account Actual Results: In the account tree there is a new account below equity root folder named 'Opening balance' Expected Results: The mentioned account should have a translated name
The root cause is located in mymoneyfile.cpp:56 were the following definition const QString MyMoneyFile::OpeningBalancesPrefix = I18N_NOOP("Opening Balances"); defines a translation, but does not really translate it.
Changing const QString MyMoneyFile::OpeningBalancesPrefix = I18N_NOOP("Opening Balances"); to const QString MyMoneyFile::OpeningBalancesPrefix = i18n("Opening Balances"); do not solve the problem, because i18n context seems not to be defined on that initialization stage. There is a refactoring of the related code required.
Git commit 439f01b5fb53ad16950fda026960a5783d6fbfb7 by Ralf Habacker. Committed on 25/05/2017 at 12:18. Pushed by habacker into branch '4.8'. Fix 'Opening balance account is untranslated'. Using i18n for assigning a static variable does not work; therefore OpeningBalancesPrefix has been refactored into a static class method which is called on demand. FIXED-IN:4.8.1 M +7 -3 kmymoney/mymoney/mymoneyfile.cpp M +4 -4 kmymoney/mymoney/mymoneyfile.h M +2 -2 kmymoney/mymoney/mymoneyfiletest.cpp https://commits.kde.org/kmymoney/439f01b5fb53ad16950fda026960a5783d6fbfb7