[Localization] Problem: 2 translations for 1 string

Alexander Todorov atodorov at redhat.com
Fri Mar 21 06:12:47 EDT 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Markus Schlager wrote:
| Hence IMHO, the key poedit uses to identify its definitions should be the
| combination of both lines: 'msgid ...' *and* '#: ...'. What it looks like
| *and* where it's used.
|

Hi Markus,
Bert Freudenberg pointed out what's needed but let me answer to you in another way.

poedit (and others) are simply text editors where you enter text. They have
nothing to do with how translations work with software. This I think is a bit of
your confusion. Simply said a program that is translated performs the following:

execute some code -> need to display MSGID to user -> call gettext library to
check for translations ->
~  if translation is found -> show MSGSTR to user
~  else show MSGID to user

The lines starting with # in PO files are simply comments and they are usually
ignored by the gettext library. There are different types of comments and all
are described in gettext manual page. The information provided in # such as
where in the code or which menu entries is the text is for convenience of the
translators (and developers to some extent). This is why this information can
not be used to distinguish between two translations of the same word.

The context must be explicitly programmed in the application that will be
translated (EToys) so gettext library has the mechanism of providing the correct
translation. As a result the PO file will be slightly different.

I know that gettext manual is very big and at some points boring to read but
nevertheless I consider it the ultimate source of information when speaking
about localization. I advise anyone who intends to work seriously on localizing
software to read it as you may find very useful information there (I haven't
read the context part before actually). You should also read any manuals for
other localization libraries that the software you are working on supports
(luckily FOSS software uses gettext usually).

Hope that I made it more clear to you now (you said you're a teacher not
developer). There's nothing you can do except identifying to strings which need
context, filing a ticket and wait for developers to fix them in the program code.


Regards,
Alexander.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Red Hat - http://enigmail.mozdev.org

iD8DBQFH44oehmd3WOiFct4RCkwDAJwJH0UE/Y456Dm5Wuv22FVSps/4bwCgmnM0
Q8yzn0ixEGyMIiDvpt2Bx5w=
=gcuU
-----END PGP SIGNATURE-----


More information about the Localization mailing list