On Tue, Dec 15, 2009 at 5:18 AM, Carles Pina i Estany <car...@pina.cat> 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 _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel