Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2014-06

IDE bug handling translations?

21 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Giuliano Colla

Hi Lazarus developers,

in the last few days, (I can't tell exactly since which revision it happens) I get an "Invalid argument index" in some translated IDE dialogs, such as the dialog which prompts for an IDE rebuild when installing a package. Sort of:

Invalid argument index in format "Il pacchetto %s%s%s ? marcato per l'installazione.%sAttualmente lazarus supporta solo pacchetti con link statico. L'installazione dov? ricostruire Lazarus e riavviarlo.%s%sVuoi ricostruire Lazarus ora?".

The same occurs with IDE language set to Italian and to French, so I don't think it to be just a translation string issue.

Setting IDE language to English makes the problem disappear.

Environment is Linux, Lazarus svn trunk, fpc 2.6.2, OS both CentOs 5 and Fedora 14.

Giuliano

Reply by email

Juha Manninen
to Giuliano Colla
Giuliano Colla wrote
in the last few days, (I can't tell exactly since which revision it happens) I get an "Invalid argument index" in some translated IDE dialogs, such as the dialog which prompts for an IDE rebuild when installing a package.

I recently tweaked some IDE resource strings so that quotation mark (") is now hard-coded in the string instead of passed as a %s parameter.
It reduced the number of %s parameters and eliminated long sequences like %s%s%s%s which were difficult to translate and required reading the source code.

I did not anticipate error messages. Less params are passed now and they should well fit in the old parameter lists although in wrong places.
Anyway, the solution is to fix the fuzzy translations. The changes are only in the parameter lists and our PoChecker will find any remaining mismatches. Patches that fix it will be accepted. (eg. In case the official translation maintainer is busy).
Sorry for the inconvenience. This change creates more work in short term but makes things easier in long term.

See also a thread on this list titled:
Resource strings and newline

Hard-coding line endings is still an open issue.

Juha

Reply by email

Giuliano Colla
to Juha Manninen

Il 24/06/2014 13:25, Juha Manninen ha scritto:

Show quoted text 19 lines
On Tue, Jun 24, 2014 at 1:41 PM, Giuliano Colla wrote: > in the last few days, (I can't tell exactly since which revision it happens) > I get an "Invalid argument index" in some translated IDE dialogs, such as > the dialog which prompts for an IDE rebuild when installing a package. I recently tweaked some IDE resource strings so that quotation mark (") is now hard-coded in the string instead of passed as a %s parameter. It reduced the number of %s parameters and eliminated long sequences like %s%s%s%s which were difficult to translate and required reading the source code. I did not anticipate error messages. Less params are passed now and they should well fit in the old parameter lists although in wrong places. Anyway, the solution is to fix the fuzzy translations. The changes are only in the parameter lists and our PoChecker will find any remaining mismatches. Patches that fix it will be accepted. (eg. In case the official translation maintainer is busy).

Once the problem is understood, it would appear that a quick scan to .po files, adjusting the number of %s to the same number found in LazarusIDEStrConsts, even without a good knowledge of the language would fix the issue.
If such is the case I could do it.
Only lazaruside.xx.po are affected, or other packages/translations need the same housekeeping?

Giuliano

Reply by email

Juha Manninen
to Giuliano Colla
Giuliano Colla wrote
Only lazaruside.xx.po are affected, or other packages/translations need the same housekeeping?

Also:
components/ideintf/objinspstrconsts
components/codetools/codetoolsstrconsts
components/anchordocking/anchordockstr
lcl/lclstrconsts

Juha

Reply by email

Mattias Gaertner
to Juha Manninen
Show quoted text 10 lines
On Tue, Jun 24, 2014 at 2:38 PM, Giuliano Colla wrote: > Only lazaruside.xx.po are affected, or other packages/translations need the > same housekeeping? Also: components/ideintf/objinspstrconsts components/codetools/codetoolsstrconsts components/anchordocking/anchordockstr lcl/lclstrconsts

Have you tried pochecker?

Mattias

Reply by email

Mattias Gaertner
to Juha Manninen
Show quoted text 8 lines
On Tuesday, June 24, 2014, Mattias Gaertner wrote: > > And does it show the wrong strings? > No because the old strings are still there. Why the .po files are not auto-generated?

The IDE is compiled by make and that must not alter sources. You can do it:

./localize.sh

Mattias

Reply by email

Mattias Gaertner
to Juha Manninen
Show quoted text 8 lines
On Tue, Jun 24, 2014 at 6:55 PM, Mattias Gaertner wrote: > The IDE is compiled by make and that must not alter sources. > You can do it: > > ./localize.sh Right. I committed the .po files.

Can you now use pochecker?

Mattias

Reply by email

Giuliano Colla
to Juha Manninen

I'd hate to steal the job to an official maintainer, mainly in those days of unemployment :-) , but the Italian translation appeared to pochecker like a battlefield, already before running localize.sh. Aside from previous and last discrepancies, there's also a high number of inconsistencies, such as Tools being translated sometimes as Tools, sometimes as Environment, just to mention the first one. They appear to be remnants of very old Lazarus versions.
If you add that poedit denounces some 41% untranslated strings, it looks like the matter deserves some attention.
All of that comes from just one single file: lazarusidestrconsts. I'm afraid other files aren't in a better shape!

So, if the official maintainer is unable/unwilling to update the Italian translations, I can take this boring job on my shoulders, at least to provide a more complete and updated set of po files, to restart with.

As far as hard coded line endings are concerned, my opinion, FWIW, is strongly in favor. Line endings are intended to improve readability, and the different length of strings in different languages might require a slightly different arrangement. If they're hidden behind a %s parameter it becomes much harder to reposition them, with the risk of mistaking something else with a line ending.

Just my 5 c.

Giuliano

Il 24/06/2014 19:27, Juha Manninen ha scritto:

Show quoted text 12 lines
On Tue, Jun 24, 2014 at 8:05 PM, Mattias Gaertner wrote: > Can you now use pochecker? Yes. It shows 173 errors in eg. lazaruside.fi.po which looks correct. Juha -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Václav Valíček
to Giuliano Colla

I know your feelings... With czech language, it was similar... Interesting is, that I was translating every time I had something more important (par example finals :D). Don't be afraid to stole a job to official maintainer, he probbably does not work. If you look into header of PO file, there is (or should be) an email or something similar to contact last editor... But there is huge chance to make missmath with the %s changes - as translator, I can say, It will be great after replacing %s with " and sLineBreak... But the job is awkard... Specially in longer strings, it's self destructing to find out all %s and %s in source...

I can wish you as less of staetments untranslatable into you language as possible... I was a little bit dualised person when I was deciding if translate unit or not to translate unit into Czech, when in translations it was 50/50... And I know a lot of my translations aren't ideal, but it is still better than nothing...

V?clav Val??ek

Dne 25.6.2014 11:48, Giuliano Colla napsal(a):

Show quoted text 51 lines
I'd hate to steal the job to an official maintainer, mainly in those days of unemployment :-) , but the Italian translation appeared to pochecker like a battlefield, already before running localize.sh. Aside from previous and last discrepancies, there's also a high number of inconsistencies, such as Tools being translated sometimes as Tools, sometimes as Environment, just to mention the first one. They appear to be remnants of very old Lazarus versions. If you add that poedit denounces some 41% untranslated strings, it looks like the matter deserves some attention. All of that comes from just one single file: lazarusidestrconsts. I'm afraid other files aren't in a better shape! So, if the official maintainer is unable/unwilling to update the Italian translations, I can take this boring job on my shoulders, at least to provide a more complete and updated set of po files, to restart with. As far as hard coded line endings are concerned, my opinion, FWIW, is strongly in favor. Line endings are intended to improve readability, and the different length of strings in different languages might require a slightly different arrangement. If they're hidden behind a %s parameter it becomes much harder to reposition them, with the risk of mistaking something else with a line ending. Just my 5 c. Giuliano Il 24/06/2014 19:27, Juha Manninen ha scritto: > On Tue, Jun 24, 2014 at 8:05 PM, Mattias Gaertner > wrote: >> Can you now use pochecker? > Yes. It shows 173 errors in eg. lazaruside.fi.po which looks correct. > > Juha > > -- > _______________________________________________ > Lazarus mailing list > > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Giuliano Colla
to Giuliano Colla: I'd hate to steal the job to an official maintainer, mainly in those days of unemployment…

I have uploaded to bugtracker a first lazarusid.it.po, which still would require a lot of ironing, but at least passes pochecker test with no errors, and therefore shouldn't crash the IDE.

Giuliano

Il 25/06/2014 11:48, Giuliano Colla ha scritto:

Show quoted text 51 lines
I'd hate to steal the job to an official maintainer, mainly in those days of unemployment :-) , but the Italian translation appeared to pochecker like a battlefield, already before running localize.sh. Aside from previous and last discrepancies, there's also a high number of inconsistencies, such as Tools being translated sometimes as Tools, sometimes as Environment, just to mention the first one. They appear to be remnants of very old Lazarus versions. If you add that poedit denounces some 41% untranslated strings, it looks like the matter deserves some attention. All of that comes from just one single file: lazarusidestrconsts. I'm afraid other files aren't in a better shape! So, if the official maintainer is unable/unwilling to update the Italian translations, I can take this boring job on my shoulders, at least to provide a more complete and updated set of po files, to restart with. As far as hard coded line endings are concerned, my opinion, FWIW, is strongly in favor. Line endings are intended to improve readability, and the different length of strings in different languages might require a slightly different arrangement. If they're hidden behind a %s parameter it becomes much harder to reposition them, with the risk of mistaking something else with a line ending. Just my 5 c. Giuliano Il 24/06/2014 19:27, Juha Manninen ha scritto: > On Tue, Jun 24, 2014 at 8:05 PM, Mattias Gaertner > wrote: >> Can you now use pochecker? > Yes. It shows 173 errors in eg. lazaruside.fi.po which looks correct. > > Juha > > -- > _______________________________________________ > Lazarus mailing list > > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Giuliano Colla
to Václav Valíček: I know your feelings... With czech language, it was similar... Interesting is, that I was…

Il 25/06/2014 12:13, V?clav Val??ek ha scritto:

Show quoted text 17 lines
I know your feelings... With czech language, it was similar... Interesting is, that I was translating every time I had something more important (par example finals :D). Don't be afraid to stole a job to official maintainer, he probbably does not work. If you look into header of PO file, there is (or should be) an email or something similar to contact last editor... But there is huge chance to make missmath with the %s changes - as translator, I can say, It will be great after replacing %s with " and sLineBreak... But the job is awkard... Specially in longer strings, it's self destructing to find out all %s and %s in source... I can wish you as less of staetments untranslatable into you language as possible... I was a little bit dualised person when I was deciding if translate unit or not to translate unit into Czech, when in translations it was 50/50... And I know a lot of my translations aren't ideal, but it is still better than nothing...

I'd like to have a better knowledge of czech language to take good ideas from your translations, as you appear to share my philosophy. Unfortunately I only have a few notions of russian and croatian. When in Czech Republic, I've realized that czech is somewhat in between the two, but that's not enough:-( .
Giuliano

Reply by email

Václav Valíček
to Giuliano Colla

If you have any knowledge of russian language, one of core maintainers maintains russian translations, so you can use ideas from it... For a Czech language, there is huge difference from Russian, becose of location - Czech (and Slovakian) people between 5-7 century moved to future Czech Republic as most eastern tribe of original Slovan people, so we were under influence of germanistic and romanian languages...

V?clav Val??ek

Dne 25.6.2014 13:31, Giuliano Colla napsal(a):

Show quoted text 32 lines
Il 25/06/2014 12:13, V?clav Val??ek ha scritto: > I know your feelings... With czech language, it was similar... > Interesting is, that I was translating every time I had something > more important (par example finals :D). Don't be afraid to stole a > job to official maintainer, he probbably does not work. If you look > into header of PO file, there is (or should be) an email or something > similar to contact last editor... But there is huge chance to make > missmath with the %s changes - as translator, I can say, It will be > great after replacing %s with " and sLineBreak... But the job is > awkard... Specially in longer strings, it's self destructing to find > out all %s and %s in source... > > I can wish you as less of staetments untranslatable into you language > as possible... I was a little bit dualised person when I was deciding > if translate unit or not to translate unit into Czech, when in > translations it was 50/50... And I know a lot of my translations > aren't ideal, but it is still better than nothing... > I'd like to have a better knowledge of czech language to take good ideas from your translations, as you appear to share my philosophy. Unfortunately I only have a few notions of russian and croatian. When in Czech Republic, I've realized that czech is somewhat in between the two, but that's not enough:-( . Giuliano -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Maxim Ganetsky
to Giuliano Colla: I'd hate to steal the job to an official maintainer, mainly in those days of unemployment…

25.06.2014 13:48, Giuliano Colla ?????:

Show quoted text 15 lines
I'd hate to steal the job to an official maintainer, mainly in those days of unemployment :-) , but the Italian translation appeared to pochecker like a battlefield, already before running localize.sh. Aside from previous and last discrepancies, there's also a high number of inconsistencies, such as Tools being translated sometimes as Tools, sometimes as Environment, just to mention the first one. They appear to be remnants of very old Lazarus versions. If you add that poedit denounces some 41% untranslated strings, it looks like the matter deserves some attention. All of that comes from just one single file: lazarusidestrconsts. I'm afraid other files aren't in a better shape! So, if the official maintainer is unable/unwilling to update the Italian translations, I can take this boring job on my shoulders, at least to provide a more complete and updated set of po files, to restart with.

Please go ahead. Italian translation was last touched 3 years ago.

Best regards, Maxim Ganetsky mailto:

Reply by email

Václav Valíček
to Juha Manninen: On Tue, Jun 24, 2014 at 8:05 PM, Mattias Gaertner Yes. It shows 173 errors in eg.…

Added some patches for Czech translation and IDE resourcestrings. Caused some more bugs in other's translations...

Report ID: #26394

Link: http://bugs.freepascal.org/view.php?id=26394

There are two main problems:
1, in Licences, I have replaced all %s with sLine break (in .po file \n) 2, conflict with updated Italian and Russian translations, but rebasing and merging IDE translations is like being in the hell. I suggested solution in bugfix.

V?clav Val??ek

Dne 24.6.2014 19:27, Juha Manninen napsal(a):

Show quoted text 12 lines
On Tue, Jun 24, 2014 at 8:05 PM, Mattias Gaertner wrote: > Can you now use pochecker? Yes. It shows 173 errors in eg. lazaruside.fi.po which looks correct. Juha -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Giuliano Colla
to Maxim Ganetsky: 25.06.2014 13:48, Giuliano Colla ?????: Please go ahead. Italian translation was last…

Il 25/06/2014 21:29, Maxim Ganetsky ha scritto:

Show quoted text 19 lines
25.06.2014 13:48, Giuliano Colla ?????: > I'd hate to steal the job to an official maintainer, mainly in those > days of unemployment :-) , but the Italian translation appeared to > pochecker like a battlefield, already before running localize.sh. > Aside from previous and last discrepancies, there's also a high number > of inconsistencies, such as Tools being translated sometimes as Tools, > sometimes as Environment, just to mention the first one. They appear to > be remnants of very old Lazarus versions. > If you add that poedit denounces some 41% untranslated strings, it looks > like the matter deserves some attention. > All of that comes from just one single file: lazarusidestrconsts. I'm > afraid other files aren't in a better shape! > > So, if the official maintainer is unable/unwilling to update the Italian > translations, I can take this boring job on my shoulders, at least to > provide a more complete and updated set of po files, to restart with. Please go ahead. Italian translation was last touched 3 years ago.

Ok. I already posted on the bugtracker a first quick update, just meant to avoid IDE crashes.
Only I happened to click the wrong place, and I posted in Lazarus "packages" instead of "patches" as I intended. After that no way to move it! I also tried to get in touch with the last translator, but no answer from him.

Giuliano

Reply by email

Giuliano Colla
to Václav Valíček: If you have any knowledge of russian language, one of core maintainers maintains russian…

Il 25/06/2014 14:33, V?clav Val??ek ha scritto:

Show quoted text 7 lines
If you have any knowledge of russian language, one of core maintainers maintains russian translations, so you can use ideas from it... For a Czech language, there is huge difference from Russian, becose of location - Czech (and Slovakian) people between 5-7 century moved to future Czech Republic as most eastern tribe of original Slovan people, so we were under influence of germanistic and romanian languages...

Everybody is under some influence. You find a lot of French words in Russian, of Italian words in Croatian, etc.
The secret is to take the best from each. Such as vodka from Russia, and beer from Czech. Personally I prefer Budvar beer to Pilsener....

Giuliano

Reply by email