[MPlayer-dev-eng] [PATCH] Fix dll loading with Turkish locales

Jiri Svoboda jiri.svoboda at seznam.cz
Fri Jan 21 08:47:26 CET 2005


 

> -----Original Message-----
> From: mplayer-dev-eng-bounces at mplayerhq.hu 
> [mailto:mplayer-dev-eng-bounces at mplayerhq.hu] On Behalf Of Torinthiel
> Sent: Thursday, January 20, 2005 11:59 PM
> To: mplayer-dev-eng at mplayerhq.hu
> Subject: Re: [MPlayer-dev-eng] [PATCH] Fix dll loading with 
> Turkish locales
> 
> On Thu, Jan 20, 2005 at 08:39:42PM +0100, Jiri Svoboda wrote:
> > Just in brief - how it works (worked in past). For each 
> mp_msg message
> > mplayer already calls gettext routine (if i18l is enabled 
> in configuration -
> > see mp_msg.[c|h]).
> > So the only part missing are .po files. They can be easily 
> created, compiled
> > and installed during mplayer configuration and compilation 
> from source code.
> > What is missing in current code? 
> > -Code snipped which creates for each language .po file 
> (some grep magic to
> > make from help_mp-en and help_mp-XX pairs of translated and original
> > messages -->.po file), should be done at configure time
> > -Compilation of lang files .po --> .mo (just invoking 
> compiler), should be
> > done at compile time
> > -Installation of lang files (simple copy), should be done 
> at install time
> > To have i18n working mplayer itself has to be compiled with 
> en language!
> 
> What is the .po file format? What encoding it should use?

Format is described in documentation of gettext. Encoding - whichever You
prefer (encoding is specfied in the .po file)

.po file is text file containing pair of original and translated messages.
There is some header containing lang definition, character encoding,
translator, etc. Then translation follows. Format is relativly simple, just
take a look at any existing .po file
Just for info - format of one entry in .po file
 	

white-space
#  translator-comments
#. automatic-comments
#: reference...
#, flag...
msgid untranslated-string
msgstr translated-string

http://www.gnu.org/software/gettext/manual/html_chapter/gettext_2.html#SEC7

> What command is used to .po -> .mo? 

.mo this is compiled mo file (machine object). If I remember well
compilation is done by invoking msgfmt for each .po file

> Where should these be installed?

/usr/share/locale/XX/LC_MESSAGES/mplayer.mo (XX stands for lang code)

But this depends on locale configuration. It also depends to which domain is
mplayer binded (for some reasons mplayer had hard encoded different location
then system default in the code)


> After I know that I might just find some time next week to 
> address the issues.
> Torinthiel

I do not have big knowledge so let me forward You to the documentation for
gettext

http://www.gnu.org/software/gettext/manual/html_chapter/gettext_toc.html


			Jiri Svoboda





More information about the MPlayer-dev-eng mailing list