Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1NKuIk-0003MR-38 for mharc-grub-devel@gnu.org; Wed, 16 Dec 2009 08:52:26 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NKuIh-0003Lx-7Q for grub-devel@gnu.org; Wed, 16 Dec 2009 08:52:23 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NKuIc-0003Iu-MR for grub-devel@gnu.org; Wed, 16 Dec 2009 08:52:22 -0500 Received: from [199.232.76.173] (port=60618 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NKuIc-0003Ic-Dp for grub-devel@gnu.org; Wed, 16 Dec 2009 08:52:18 -0500 Received: from mail-vw0-f176.google.com ([209.85.212.176]:60442) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NKuIb-0005gX-Vm for grub-devel@gnu.org; Wed, 16 Dec 2009 08:52:18 -0500 Received: by vws6 with SMTP id 6so280512vws.14 for ; Wed, 16 Dec 2009 05:52:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=dGKduaBU80LfgWtBjauBAEgmCyym1tWCRDKs6fQNvCI=; b=VniaEVmILyKbrOwKtiA9NWEN6b5nScCsxJ/kKw64rfVIkcDB/1g/WUsXiYKuQZuIvT i2SKj6SfaU9ayS46RqvOlGakaLZsQeLCP2rcQP6YDR8V6s28eOnBDf2Wl8EzlZS/KOHG hHvqSRzSx6frLOwl3rSiSVvr4duqkiTIDo2UM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=vVSI8dpm4+jhBeeecI4V8qRKBJ539LGD6/Oj6HRcMF/4bI22M8dvCAup1jodz0PZbm C/KGkuUWzthPTRz0H081v9FS3HD3ODph2ulnu2YWPzFjCkcY3BYdnquyFLZnN56Z0L88 zrJEqoOyAVkCriIIic+lQNp5eZcMqQwuweCUg= MIME-Version: 1.0 Received: by 10.220.127.80 with SMTP id f16mr198041vcs.47.1260971534467; Wed, 16 Dec 2009 05:52:14 -0800 (PST) In-Reply-To: <20091214234808.GC29506@pina.cat> References: <20091214234808.GC29506@pina.cat> Date: Wed, 16 Dec 2009 19:22:14 +0530 Message-ID: From: BVK Chaitanya To: The development of GNU GRUB Content-Type: text/plain; charset=ISO-8859-1 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: Unittests X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Dec 2009 13:52:23 -0000 On Tue, Dec 15, 2009 at 5:18 AM, Carles Pina i Estany wrote: > > Writing a unittest for gettext it's very easy: it just needs a couple of > .mo and a script executing gettext "string" and checking that the result > is "string translated". Will get more interesting when ngettext will > come too :-) > Hi Carles, I don't have much knowledge about how gettext works, but I tried to add unit test today (in my local branch) and I couldn't get it working :-( Below is what I did, with some questions: 1. I downloaded zh_CN.po from translationproject.org and placed it in $(srcdir)/po/ directory. 2. I tried to build grub.pot, but build failed. Build rule for grub.pot assumes builddir == srcdir, which is not true in my case. Also, it looks like that command is trying to create grub.po in srcdir instead of builddir; is it normal? if we need grub.pot in srcdir, can we move this step into autogen.sh? 3. After fixing the grub.pot rule, I was able to get .mo files in $(builddir)/po/ 4. Now I wanted to see if gettext could find the translations without doing a make install, as below in $(builddir) $ LANG="zh_CN" TEXTDOMAINDIR=$(pwd) gettext grub "the core image is too small" It displayed only english version, even though zh_CN translation is available :-( Since the directory structure in /usr/share/locale is different from $(builddir), I did "make install" and tried the gettext command without setting TEXTDOMAINDIR, but still no success :-( What is wrong? Can you provide any pointers? thanks, -- bvk.chaitanya