Am Samstag, 26. Oktober 2013 um 05:51:18, schrieb Yili Zhao <[email protected]> > Hi, > I want to contribute to Hugin's Chinese translation, and I just build > Hugin successfully on Ubuntu 13.10 based > on http://wiki.panotools.org/Hugin_Compiling_Ubuntu. > > Q1: After I completed the translation and saved the change to .po file by > Poedit, I recompile Hugin by "make", and cd to the "Hugin1/Hugin" > directory, invoke "./hugin", but the string is in its original form, not > the new one. However, if I invoke "sudo make install", then I run Hugin in > "Hugin1/Hugin" directory (not /usr/local/bin directory), the string output > right. Why?
I suppose, you are not compiling in the source directory.
Without 'make install' the appropriate hugin.mo is not installed, therefore
hugin finds the old installed data.
By the way, why don't you create package?
# make package
# sudo dpkg -i hugin-2013.1.0.6356-Linux.deb
or whatever .deb file is created.
> Q2: After I completed the translation and saved the change to .po file by
> Poedit, it generated another file named "zh_CN.mo". But I note that in the
> "translations" directory, others *.po files have no corresponding .mo
> files. Where are them?
To my understanding, no .mo will be created. Instead there are .gmo files in
the build-/src/translations directory.
How did you configure hugin? Did you use '-DREBUILD_TRANSLATIONS=ON'? (You may
try)
There is a target 'translations' for the task to create .gmo files:
# make translations
(To see all possible targets, use 'make help')
While installing ('make install' or 'make package') the created .gmo file are
copied and renamed.
So e.g. src/translations/zh_TW.gmo will be installed as
/usr/local/share/locale/zh_TW/LC_MESSAGES/hugin.mo
> Q3: If I invoke "hg status", the output is:
> M src/translations/zh_CN.po
> ? src/translations/zh_CN.mo
This should not be. Remove the .mo file, it does not belong there.
> How do I process this .mo file? I know I should commit the .po file, but
> what about this .mo file?
>
> Q4: The translation guide says that Hugin's language file's name is
> "hugin.mo", but the Chinese language file is "zh_CN.mo". How the Hugin know
> "zh_CN.mo" is its language file? Even, if I use other editor to edit
> "zh_CN.po" file, there will be no "zh_CN.mo" file generated, when I install
> Hugin to /usr/local/ directory, how can Hugin know which language file to
> select and rename it to "hugin.mo"?
See the answer to Q2.
> Thanks!
>
Kornel
signature.asc
Description: This is a digitally signed message part.
