[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fw: gettext support
From: |
Carles Pina i Estany |
Subject: |
Re: Fw: gettext support |
Date: |
Sat, 27 Jun 2009 00:42:57 +0100 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
Hi,
On Jun/26/2009, Robert Millan wrote:
> Also, if *.mo files contain plain text, compression would work well on
> them. They could be gzipped.
Yes, they contain plain text.
I implemented gettext without the hashtable (the .mo files usually has a
hashtable for the search). We will not have lot of strings, so we don't
need the hash table to speed up and we safe some space in implementation
and the .mo file.
I haven't counted the overhead of using a .mo file instead a other
solutions, but it's very reasonable.
Actually this file (.po simplified file):
-------------
#: normal/menu.c:90
#, c-format
msgid ""
"\n"
" Use the %C and %C keys to select which entry is highlighted.\n"
msgstr ""
"\n"
" Utilitzeu les tecles %C i %C per seleccionar l'entrada.\n"
#: normal/menu.c:93
msgid ""
" Press enter to boot the selected OS, 'e' to edit the\n"
" commands before booting or 'c' for a command-line."
msgstr ""
" Presioneu retorn per arrancar el SO seleccionat, 'e' editar\n"
" les comandes abans d'arrancar, 'c' per línia d'ordres."
#: util/grub.d/10_linux.in:143
#, sh-format
msgid "${OS}, linux ${version} (recovery mode)"
msgstr "${OS}, linux ${version} (mode recuperació)"
#, sh-format
msgid "hello"
msgstr "hola"
---------------
address@hidden:~/grub/grub2/po$ msgfmt --no-hash ca.po -o test.mo
address@hidden:~/grub/grub2/po$ ls -la ca.po test.mo
-rw-r--r-- 1 carles carles 680 8 mar 19:08 ca.po
-rw-r--r-- 1 carles carles 562 27 jun 00:42 test.mo
address@hidden:~/grub/grub2/po$
so, in terms of size it's even smaller than the .po file (it avoids the
comments, etc.)
--
Carles Pina i Estany
http://pinux.info
- Re: Fw: gettext support, (continued)
- Re: Fw: gettext support, Jordi Mallach, 2009/06/24
- Re: Fw: gettext support, Vladimir 'phcoder' Serbinenko, 2009/06/21
- Re: Fw: gettext support, Pavel Roskin, 2009/06/21
- Re: Fw: gettext support, Robert Millan, 2009/06/22
- Re: Fw: gettext support, Colin Watson, 2009/06/22
- Re: Fw: gettext support, Robert Millan, 2009/06/21
- Re: Fw: gettext support, Carles Pina i Estany, 2009/06/25
- Re: Fw: gettext support, Pavel Roskin, 2009/06/25
- Re: Fw: gettext support, Robert Millan, 2009/06/26
- Re: Fw: gettext support, Pavel Roskin, 2009/06/26
- Re: Fw: gettext support,
Carles Pina i Estany <=
- Re: Fw: gettext support, Jordi Mallach, 2009/06/19
- Re: Fw: gettext support, Vladimir 'phcoder' Serbinenko, 2009/06/19
- Re: Fw: gettext support, Robert Millan, 2009/06/21
- Re: Fw: gettext support, Carles Pina i Estany, 2009/06/19
- Re: Fw: gettext support, Robert Millan, 2009/06/21