[Lazarus] Translation becomes "fuzzy". Why?

2017-07-14 Thread Valdas Jankūnas via Lazarus

Hello,

In file "languages/lazaruside.lt.po" resides string:

#: lazarusidestrconsts.lischangedscoordofsfromdtodinsides
msgid "Changed %s coord of %s from \"%d\" to \"%d\" inside %s."

I translate it to:

msgstr "„%4:s“ viduje „%1:s“ koordinatė „%0:s“ pakeista iš „%2:d“ į „%3:d“."

After revision update this translation is always marked as "fuzzy,badformat". 
Why? Is rearrangement of arguments prohibited, or I don't see where I made a mistake?


--
  Valdas Jankūnas
--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Translation becomes "fuzzy". Why?

2017-07-14 Thread Julius via Lazarus


On 07/14/2017 11:06 AM, Valdas Jankūnas via Lazarus wrote:
> 
> msgstr "„%4:s“ viduje „%1:s“ koordinatė „%0:s“ pakeista iš „%2:d“ į
> „%3:d“."
> 
> After revision update this translation is always marked as
> "fuzzy,badformat". Why? Is rearrangement of arguments prohibited, or I
> don't see where I made a mistake?
> 
> 

In my experience this is due to a missing "msgctxt" entry.

Sometimes the po system writes one but often not. I believe when that is
specified uniquely that problem goes away. For instance:


#: linuxtrix.cltprocessinput
msgid "Input"
msgstr "Mwwaregrhh "

vs.


#: linuxtrix.cltprocessinput
msgctxt "linuxtrix.cltprocessinput"
msgid "Input"
msgstr "Mwwaregrhh "


But I'm not sure that that will get overwritten the next time po files
are written out, I don't think it does and so it should be a good fix
forever, but please let us know here if you find something different.



-- 
Julius
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Translation becomes "fuzzy". Why?

2017-07-14 Thread Maxim Ganetsky via Lazarus


14.07.2017 12:06, Valdas Jankūnas via Lazarus пишет:
> Hello,
> 
> In file "languages/lazaruside.lt.po" resides string:
> 
> #: lazarusidestrconsts.lischangedscoordofsfromdtodinsides
> msgid "Changed %s coord of %s from \"%d\" to \"%d\" inside %s."
> 
> I translate it to:
> 
> msgstr "„%4:s“ viduje „%1:s“ koordinatė „%0:s“ pakeista iš „%2:d“ į
> „%3:d“."
> 
> After revision update this translation is always marked as
> "fuzzy,badformat". Why? Is rearrangement of arguments prohibited, or I
> don't see where I made a mistake?

IIRC currently formatting arguments in translation should match original
string, otherwise formatting is considered incorrect. It is not very
flexible, but it is simple and allows to avoid subtle errors in
translations.

Probably this check can be relaxed/made more elaborate, but I don't
think it is worth potential risks and complications.

-- 
Best regards,
 Maxim Ganetsky  mailto:gan...@narod.ru
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus