From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MKL4Y-0003Su-CS for mharc-grub-devel@gnu.org; Fri, 26 Jun 2009 19:43:10 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MKL4W-0003R7-L3 for grub-devel@gnu.org; Fri, 26 Jun 2009 19:43:08 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MKL4R-0003JZ-3Z for grub-devel@gnu.org; Fri, 26 Jun 2009 19:43:07 -0400 Received: from [199.232.76.173] (port=43063 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MKL4Q-0003JT-Uo for grub-devel@gnu.org; Fri, 26 Jun 2009 19:43:02 -0400 Received: from 197.red-80-32-81.staticip.rima-tde.net ([80.32.81.197]:34255 helo=mail.pina.cat) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MKL4Q-0008Bt-DH for grub-devel@gnu.org; Fri, 26 Jun 2009 19:43:02 -0400 Received: from pinux (82-45-164-87.cable.ubr06.hari.blueyonder.co.uk [82.45.164.87]) by mail.pina.cat (Postfix) with ESMTP id 9224E2894568D for ; Sat, 27 Jun 2009 01:42:58 +0200 (CEST) Received: by pinux (Postfix, from userid 1000) id BB3C924886; Sat, 27 Jun 2009 00:42:57 +0100 (BST) Date: Sat, 27 Jun 2009 00:42:57 +0100 From: Carles Pina i Estany To: The development of GRUB 2 Message-ID: <20090626234257.GB879@pina.cat> References: <20090618205607.GA20132@pina.cat> <20090619103747.GC19777@thorin> <20090621110757.GB27710@thorin> <20090621172236.GA23270@pina.cat> <20090621184230.GA21495@thorin> <1245611699.4250.19.camel@mj> <20090625212047.GA27921@pina.cat> <1245985742.23442.249.camel@mj> <20090626124721.GA12862@thorin> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20090626124721.GA12862@thorin> User-Agent: Mutt/1.5.18 (2008-05-17) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Subject: Re: Fw: gettext support X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jun 2009 23:43:09 -0000 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=EDnia d'ordres." #: util/grub.d/10_linux.in:143 #, sh-format msgid "${OS}, linux ${version} (recovery mode)" msgstr "${OS}, linux ${version} (mode recuperaci=F3)" #, sh-format msgid "hello" msgstr "hola" --------------- carles@pinux:~/grub/grub2/po$ msgfmt --no-hash ca.po -o test.mo carles@pinux:~/grub/grub2/po$ ls -la ca.po test.mo=20 -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 carles@pinux:~/grub/grub2/po$=20 so, in terms of size it's even smaller than the .po file (it avoids the comments, etc.) --=20 Carles Pina i Estany http://pinux.info