Bug 246702 - Translation disables loans editing
Summary: Translation disables loans editing
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: HI normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-04 16:30 UTC by Petr Bravenec
Modified: 2010-08-09 03:48 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
czech kmymoney.po bzipped (81.37 KB, application/octet-stream)
2010-08-05 09:30 UTC, Petr Bravenec
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Bravenec 2010-08-04 16:30:37 UTC
Version:           unspecified (using KDE 4.4.5) 
OS:                Linux

I translate KMyMoney to czech language and there is different functions using english and translated version. In czech version I'm not able to finish the load editing.



Reproducible: Always

Steps to Reproduce:
Loan account
Edit account... in context menu
Next...
Modify other load information
Next... Next... Next... ...
and then the dialog "Calculation successfull" should apear but nothing happened.
Button "Next..." is enabled but dialog is not shown and it's imposible to
continue.

I recompiled SVN version and i have found additional traces:

The loan example is created for 24 months.
When using english translation, then the value of "Term" is set to 2 Years.
When using czech translation, then the value of "Term" is set to 24 Payments and clicking "Next" writes to stdout text "Occurrence not supported by financial calculator".
When I returned to previous page and changed the Term to 2 years, then all other values are set to 1.



Expected Results:  
Thw wizard should continue to finish editing loan account.
Comment 1 Thomas Baumgart 2010-08-04 20:05:12 UTC
Can you please provide all details for the values you entered. I was trying to duplicate the problem but did not get there to automatically change the term from 24 months to 2 years. A simple list of key-value-pairs for the loan parameters should do.
Comment 2 Petr Bravenec 2010-08-04 20:13:40 UTC
It does not depends on values entered. I have always finished the wizard using english language a I have never finished it using czech translation.
Comment 3 Thomas Baumgart 2010-08-05 08:37:04 UTC
Petr, I tried to duplicate the problem here using other translations to figure out if it is a general problem or not. Since the wizard uses different paths depending on the values one enters, it is more than natural that I need those figures that you used, because the one's I tried worked all the time. Otherwise we compare apples and oranges which I try to avoid.

In case the behavior you describe cannot be reproduced using another translation we certainly need the Czech files. But that is step #2. The first one is to get a detailed description of the things you do.
Comment 4 Petr Bravenec 2010-08-05 09:27:28 UTC
Creating loan account:

Institution:
Institution: empty

Account:
Account name: aaa
Account type: Loan
Currency: CZK
Opening date: today
Opening balance: 10000

Details:
What is the type of loan? I am borrowing money
Who is the payee of the loan? aaa (new created)
Others fields: default

Payments:
The interest rate gets calculated: when the payment is received
Loan amount: 10000
Interest rate: 5
Term: 24 months
Calculate
Payment: 438.71 (calculated)

Fees:
No additional fees

Interest category: Interest (new created or existing)
Payment account: some existing

Payout:
Don't create payout transaction

Finish

Then I go to institutions and find my created loan account
and in context menu choose:
Edit account
Next>
Modify other load information
Next>
When should the changes become active? todays date (no change)
Next>
Name: aaa (no change)
To whom do you make payments?
Payments to: aaa
Next>
When does the actual interest rate get calculated: When the payment is received
Next>
Interest rate: 5.000
Next>
Term: 2 year (should not be 24 months as given creating account?)
Next>
Principal and interest: 438.71 (calculated, ok)
Final amortization payment: 0.10 (calculated)

--- And now: ---
Next>
english version: The dialog "Calculation succesful" appeared.

I canceled editing, switched to czech language, restarted and edit the account again:

Next> Dalsi
Modify other load information
Upravit jine informace o pujcce
Next> Dalsi
When should the changes become active? todays date (no change)
Kdy zacina platnost zmen?
Next> Dalsi
Name: aaa (no change)
Jmeno
To whom do you make payments?
Komu splacite tuto pujcku
Payments to: aaa
Platim tomuto platci
Next> Dalsi
When does the actual interest rate get calculated: When the payment is received
Kdy byla vypoctena skutecna urokova sazba: pri obrzeni platby
Next> Dalsi
Interest rate: 5.000
Urokova sazba: 5.000
Next> Dalsi
--- difference: ---
Term: 2 year (should not be 24 months as given creating account?)
Delka: 24 Platby (platby == payments)
Next> Dalsi
Principal and interest: 438.71 (calculated, ok)
Splatka a urok: 438.71
Next> Dalsi
Final amortization payment: 0.10 (calculated)
Posledni amortizacni splatka: 0.10

Next> Dalsi
--- difference: ---
In czech version I cannot continue. Nothing happens when "Next (dalsi)" was pressed.
Comment 5 Petr Bravenec 2010-08-05 09:30:04 UTC
Created attachment 49824 [details]
czech kmymoney.po bzipped
Comment 6 Petr Bravenec 2010-08-05 09:34:38 UTC
Additional note: there is difference in thousands and decimal separators:
English: decimal . thousands ,
Czech: decimal, thousands space
Comment 7 Thomas Baumgart 2010-08-05 10:27:12 UTC
Thanks for the info. The problem was that I did not realize that you were editing an existing account. Meanwhile I was able to duplicate the problem even with the German translation which makes it a bit easier for me to understand.

I'll take care of the problem. Please continue to work on the translation as we know it is not related to the Czech one in particular.
Comment 8 Thomas Baumgart 2010-08-05 11:51:47 UTC
Looks like the problem is related to the i18n stuff. If running in a different language, the combo box for the payment frequency is not loaded correctly. Not all terms are translated. Strange, as in PaymentFrequencyWizardPage::PaymentFrequencyWizardPage() they all get loaded in the same manner, but 'daily', 'weekly', 'monthly', 'yearly' show up untranslated in the combo box.

This leads to the console error "Occurrence not supported by financial calculator" later on.
Comment 9 Cristian Oneț 2010-08-05 12:08:09 UTC
I think it's an issue of calling i18n twice.

insertItem(i18n(MyMoneySchedule::occurrencePeriodToString(MyMoneySchedule::OCCUR_ONCE).toLatin1()), MyMoneySchedule::OCCUR_ONCE);

and
MyMoneySchedule::occurrencePeriodToString already has a i18n call inside.
Comment 10 Thomas Baumgart 2010-08-05 12:52:32 UTC
No, that's an I18N_NOOP inside the method. See http://techbase.kde.org/Development/FAQs/Technical_FAQ#What_is_the_difference_between_i18n_and_I18N_NOOP.3F for details.
Comment 11 Alvaro Soliverez 2010-08-06 03:37:59 UTC
SVN commit 1159713 by asoliverez:

No strings have changed, only context strings to match I18N_NOOP calls in MyMoneySchedule.

Temporary fix. This will be dealt with properly after release.

BUG:246702

CCMAIL:kde-i18n-doc@kde.org
CCMAIL:kmymoney-devel@kde.org

 M  +18 -18    mymoneyscheduled.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1159713
Comment 12 Petr Bravenec 2010-08-06 10:36:08 UTC
Does it work? 
I unmerged kmymoney 3.98.1 from my gentoo and installed svn version 1159736
to /usr/local
and I found this:

BUG:246702
No strings have changed, only context strings to match I18N_NOOP calls in
MyMoneySchedule.
Temporary fix. This will be dealt with properly after release.

NOT OK. There is the same behaviour as before the fix.

Petr Bravenec



----------------původní zpráva-----------------
Od: "Alvaro Soliverez" asoliverez@gmail.com
Komu: kmymoney-devel@kde.org
Datum: Fri, 6 Aug 2010 03:38:01 +0200 (CEST)
-------------------------------------------------
 
 
> https://bugs.kde.org/show_bug.cgi?id=246702
> 
> 
> Alvaro Soliverez asoliverez@gmail.com changed:
> 
> What |Removed |Added
> 
> --------------------------------------------------------------------
> --------
> Status|NEW |RESOLVED
> Resolution| |FIXED
> 
> 
> 
> 
> --- Comment #11 from Alvaro Soliverez 2010-08-06 
> 03:37:59 ---
> SVN commit 1159713 by asoliverez:
> 
> No strings have changed, only context strings to match I18N_NOOP calls in
> MyMoneySchedule.
> 
> Temporary fix. This will be dealt with properly after release.
> 
> BUG:246702
> 
> CCMAIL:kde-i18n-doc@kde.org
> CCMAIL:kmymoney-devel@kde.org
> 
> M +18 -18 mymoneyscheduled.cpp 
> 
> 
> WebSVN link: http://websvn.kde.org/?view=rev&revision=1159713
> 
> -- 
> Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
> ------- You are receiving this mail because: -------
> You are the assignee for the bug.
> _______________________________________________
> KMyMoney-devel mailing list
> KMyMoney-devel@kde.org
> https://mail.kde.org/mailman/listinfo/kmymoney-devel
> 
>
Comment 13 Thomas Baumgart 2010-08-06 10:36:08 UTC
SVN commit 1159793 by tbaumgart:

No strings have changed, only context strings have been added and i18n calls have been changed to i18nc calls to match I18N_NOOP2 calls in MyMoneySchedule.

BUG:246702

CCMAIL:kde-i18n-doc@kde.org
CCMAIL:kmymoney-devel@kde.org


 M  +3 -3      kmymoneyutils.cpp  
 M  +1 -1      reports/objectinfotable.cpp  
 M  +22 -22    widgets/kmymoneymvccombo.cpp  
 M  +1 -1      wizards/newloanwizard/keditloanwizard.cpp  
 M  +16 -16    wizards/newloanwizard/paymentfrequencywizardpage.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1159793
Comment 14 Alvaro Soliverez 2010-08-06 11:40:36 UTC
As this depends on i18n matching, we probably have to wait for scripty to run. Only then we are sure that i18n calls are regenerated.
Comment 15 Thomas Baumgart 2010-08-06 12:37:25 UTC
Probably not. I tested it here with creating a tarball including the (current) translations, installed that and simply installed updated development environment on top of it. All seemed to be working. OTOH, we need to check that after scripty ran things are still working as expected.
Comment 16 Alvaro Soliverez 2010-08-09 03:48:56 UTC
SVN commit 1160756 by asoliverez:

Have the wizard remember the values when the back button is pressed.

BUG:246702

 M  +3 -0      knewloanwizard.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1160756