[FFmpeg-devel] GSoC with FFMpeg waht a combination!

Michael Niedermayer michaelni
Sat Mar 22 16:56:12 CET 2008


On Sat, Mar 22, 2008 at 10:57:23AM -0400, Ronald S. Bultje wrote:
> Hi,
> 
> On Sat, Mar 22, 2008 at 8:29 AM, Michael Niedermayer <michaelni at gmx.at>
> wrote:
> 
> > The requirement of no duplicate strings leads to integers as keys.
> > The requirement of O(1) and uncoordinated additon of new keys leads
> > to the use of a hash table and 64bit hash values of
> > default (english/in source) strings as keys.
> 
> 
> Disadvantage is that if an invalid locale is specified, an invalid string is
> used or whatever, 

what!?


> no string will be displayed. 

???


> Also, everyone *has* to
> specify a locale.

I just cant follow you at all.
No matter what locale you specify (or not) a file with strings will be
selected. This will likely be the file with default strings if you dont
specify a local or an invalid locale.

Also all missing strings in a translation would be filled by the default one
when the translation file is generated so there are also no missing strings
ever.
And last, setting the locale for this can be completely indepandant of
setlocale().


> In the normal gettext() world, developers don't specify a
> locale in their runtime and it just works. 

same here ...


> Here, developers not wanting a
> locale would need to recompile so that the string->int64 replacements go
> away and normal plain strings (untranslated) are displayed.

I honestly do not know what you are talking about. The int64 keys would just
be looked up in the default table of strings, newly added strings in c files
would be added there and changed to int64 the moment you run make.
Also note that i didnt intend these int64 to be written in the .c files ever
they would just be generated before feeding the .c files into the compiler.
The developer would just see the normal gettext like strings.


> 
> Anyway, do you know any software that uses your described system that I
> could have a peek at?

No, if you want i18n in libav* you will have to implement it or suggest some
other equally or better system. gettext certainly is not.

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

When the tyrant has disposed of foreign enemies by conquest or treaty, and
there is nothing more to fear from them, then he is always stirring up
some war or other, in order that the people may require a leader. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080322/76070cf5/attachment.pgp>



More information about the ffmpeg-devel mailing list