Sign in Join

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

Mailing lists / lazarus / 2017-07

Translation becomes "fuzzy". Why?

3 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

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

Valdas Jankūnas

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

Reply by email

Julius
to Valdas Jankūnas
Valdas Jankūnas wrote 9 lines
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

Reply by email

Maxim Ganetsky
to Valdas Jankūnas: In file "languages/lazaruside.lt.po" resides string: #:…

14.07.2017 12:06, Valdas Jankūnas via Lazarus пишет:

Show quoted text 15 lines
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:

Reply by email