Bug 302502 - message for possible schedule incomplete
Summary: message for possible schedule incomplete
Status: RESOLVED FIXED
Alias: None
Product: skrooge
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Guillaume DE BURE
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-25 11:54 UTC by schunkac
Modified: 2012-06-27 16:31 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
anonymized file (89 bytes, text/plain)
2012-06-25 14:07 UTC, schunkac
Details
Email explaining in detail the issue with translation (67.34 KB, application/pdf)
2012-06-26 20:47 UTC, Stephane MANKOWSKI
Details

Note You need to log in before you can comment on or make changes to this bug.
Description schunkac 2012-06-25 11:54:51 UTC
Whenever skrooge decides to help me by showing possible schedule message in dashboard panel the message is incomplete. It only shows /Possible schedule for ''/ (in my native language I personally translated locales file so I know the substitute string %1 is there for sure). Also the string is missing in other corresponding messages eg. /The operation '' seems to be regularly.../ and /Monthly schedule operation ''/
I've already discussed this with Stephane Mankowski. He mentions the string is concatenation of date payee amount and symbol, which are the data my document fully provides.
I also tried to tamper with localization symbol my native language uses in KDE settings to avoid this error (this hleped in the past with similar problem)

Reproducible: Always

Steps to Reproduce:
1. Enter an operatoin which skrooge evaluate as possible for scheduling
Actual Results:  
In dashboard there is an widget showing some advices. There the incomplete message shows up.

Expected Results:  
Complete message (containing which operation should be scheduled)
Comment 1 Stephane MANKOWSKI 2012-06-25 13:52:55 UTC
Hi,

Could you provide me a sample? For example, an anomymized file.
Comment 2 schunkac 2012-06-25 14:07:06 UTC
Created attachment 72126 [details]
anonymized file

We already discussed it by mail (January 10 - 12), you also checked the file. Conclusion was to place it on a bug tracker. So here it is. I know it take a while, but I was working on a Czech translation for skrooge and also on other stuff so I forgot. But week ago alarm widget in a dashboard in Skrooge made me remember.
Comment 3 Stephane MANKOWSKI 2012-06-26 20:47:16 UTC
Created attachment 72156 [details]
Email explaining in detail the issue with translation

In this document you can see that, when a translation is not available, when the replace string contains some special character, then the replacement is not well done.

This seems to be a bug in translation API, not in Skrooge.
Comment 4 Albert Astals Cid 2012-06-26 20:58:33 UTC
Stephane can you explain why you think it's a bug in the translation API?
Comment 5 Stephane MANKOWSKI 2012-06-26 21:42:34 UTC
Hi,

This is normal explained in my previous attachment.
I will try to add information.

Without modifying the code of Skrooge:
If I select "French" (the string "Possible schedule '%1'" is translated) then %1 is well replaced by a Czech string with special char (č).
If I select "Czech" (the string "Possible schedule '%1'" is NOT translated) then %1 is NOT well replaced by a Czech string with special char (č).
If I select "Czech" (the string "Possible schedule '%1'" is NOT translated) then %1 is well replaced by a Czech string WITHOUT special char (č).

So, for my, the translation module is not able to replace string with special char if the string is not translated.

I hope this will help you.
Comment 6 schunkac 2012-06-27 06:56:56 UTC
That may be true, but now I've translated all this messages in Czech and I still got this result. (empty quotes) So why this error still applies. This is probably something else.
As mentioned in the email, I also tried change system settings for KDE, like using decimal points instead of comma, dashes in date format which helped last time.
Also last time switching to english and restart Skrooge show correct string.
And lastly there are other replacing strings using special chars (translated and untranslated) and they works fine.
My guess is problem in concatenating the replacement string (as you mentioned in the email) it is a combination of date payee amount and symbol and if one of them is None then the result is empty string.
As we know the document is correct so input data is allright but the result is somehow wrong.
Comment 7 Chusslove Illich 2012-06-27 08:11:37 UTC
> [: Stephane MANKOWSKI :]
> If I select "French" (the string "Possible schedule '%1'" [...]

The line of the code which outputs this is:

  ad.setShortMessage(i18nc("Advice on making the best (short)", "Possible schedule '%1'", name))

Did you check what is the value of name alone, in cases where it doesn't
show up in output? When I compile current master, and load anon.skg provided
above and switch to dashboard, in both English and French name turns out to
be empty string (as printed with kWarning() << name; in line before).
Comment 8 Stephane MANKOWSKI 2012-06-27 16:30:33 UTC
Hi,

I find a correction in Skrooge.
So, I don't really understand my old analysis in the attached email.
But, in any case, a bug has been found in skrooge.
Sorry for disturbance.
Comment 9 Stephane MANKOWSKI 2012-06-27 16:31:48 UTC
Git commit ce3e4abe9dcfe4b3caa4483ae1316e9de0bce9cd by Stephane Mankowski.
Committed on 27/06/2012 at 18:30.
Pushed by smankowski into branch 'Feature'.

M  +1    -0    CHANGELOG
M  +5    -5    skgbankmodeler/skgdocumentbank.cpp

http://commits.kde.org/skrooge/ce3e4abe9dcfe4b3caa4483ae1316e9de0bce9cd