mirror of
https://github.com/moparisthebest/pacman
synced 2025-02-28 01:11:48 -05:00
update of translation-help and fix a typo in gensync.
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
This commit is contained in:
parent
b06ce1e8ad
commit
ebae8bd009
@ -126,7 +126,7 @@ forcepkgs=""
|
|||||||
for file in $(find "$rootdir"/* -name "$BUILDSCRIPT"); do
|
for file in $(find "$rootdir"/* -name "$BUILDSCRIPT"); do
|
||||||
unset pkgname pkgver pkgrel options
|
unset pkgname pkgver pkgrel options
|
||||||
|
|
||||||
source $file || die "$(gettext "failed to parse parse %s")" $file
|
source $file || die "$(gettext "failed to parse %s")" $file
|
||||||
if [ "$arch" = 'any' ]; then
|
if [ "$arch" = 'any' ]; then
|
||||||
CARCH='any'
|
CARCH='any'
|
||||||
fi
|
fi
|
||||||
|
@ -15,10 +15,12 @@ In addition, this site presents a small tutorial that I found useful:
|
|||||||
Translating Messages
|
Translating Messages
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
The message files are located in two directories in pacman- lib/libalpm/po/
|
The message files are located in two directories in pacman- lib/libalpm/po/ for
|
||||||
and src/pacman/po/. Each language has a .po file associated with it; the .pot
|
the translation of the backend, and po/ for the translation of the frontend and
|
||||||
file is the template file for creating new .po files and updating the messages
|
the scripts.
|
||||||
in them when the code changes.
|
Each language has a .po file associated with it; the .pot file is the template
|
||||||
|
file for creating new .po files and updating the messages in them when the code
|
||||||
|
changes.
|
||||||
|
|
||||||
First things first. You will need to run ./autogen.sh and ./configure in the
|
First things first. You will need to run ./autogen.sh and ./configure in the
|
||||||
base directory to generate the correct Makefiles. To update all the translation
|
base directory to generate the correct Makefiles. To update all the translation
|
||||||
@ -28,19 +30,19 @@ files, run this command:
|
|||||||
At this point, the .pot file is regenerated from the source code with an
|
At this point, the .pot file is regenerated from the source code with an
|
||||||
updated string list, and the existing po files are merged if necessary to add
|
updated string list, and the existing po files are merged if necessary to add
|
||||||
new messages or remove old ones. These po files can then either be hand edited,
|
new messages or remove old ones. These po files can then either be hand edited,
|
||||||
or modified with a tool such as gtranslator or kbabel.
|
or modified with a tool such as poedit, gtranslator or kbabel.
|
||||||
|
|
||||||
These steps make it easier to just update your language and not every po file.
|
These steps make it easier to just update your language and not every po file.
|
||||||
If you are working in the src/pacman tree, replace libalpm.pot with pacman.pot:
|
If you are working in the root tree, replace libalpm.pot with pacman.pot:
|
||||||
make libalpm.pot-update
|
make libalpm.pot-update
|
||||||
make <po file>-update
|
make <po file>-update
|
||||||
|
|
||||||
Making a new language is not too hard, but be sure to follow all the steps.
|
Making a new language is not too hard, but be sure to follow all the steps.
|
||||||
You will have to do the following steps in both the lib/libalpm/po/ and
|
You will have to do the following steps in both the lib/libalpm/po/ and po/
|
||||||
src/pacman/po/ directories, substituting where appropriate. First, edit the
|
directories, substituting where appropriate. First, edit the LINGUAS file and
|
||||||
LINGUAS file and add your new language code at the bottom. Next, run the
|
add your new language code at the bottom. Next, run the following command,
|
||||||
following command, substituting 'libalpm.pot' or 'pacman.pot' depending on
|
substituting 'libalpm.pot' or 'pacman.pot' depending on which directory you are
|
||||||
which directory you are currently working in:
|
currently working in:
|
||||||
msginit -l <lang code> -o <lang code>.po -i <potfile>
|
msginit -l <lang code> -o <lang code>.po -i <potfile>
|
||||||
|
|
||||||
You can then also add your language code to the end of the LINGUAS file located
|
You can then also add your language code to the end of the LINGUAS file located
|
||||||
@ -51,6 +53,11 @@ create the new language file, you may need to slightly modify the headers;
|
|||||||
try to make them look similar to the other .po file headers. In addition, for
|
try to make them look similar to the other .po file headers. In addition, for
|
||||||
all new translations we would strongly recommend using UTF-8 encoding.
|
all new translations we would strongly recommend using UTF-8 encoding.
|
||||||
|
|
||||||
|
If you want to test the translation (for example, the frontend one):
|
||||||
|
rm *.gmo stamp-po
|
||||||
|
make
|
||||||
|
cp <lang code>.gmo /usr/share/locale/<lang code>/LC_MESSAGES/pacman.mo
|
||||||
|
|
||||||
Finally, submitting your translations in patch form is not essential for new
|
Finally, submitting your translations in patch form is not essential for new
|
||||||
languages, but highly recommended for future updates to the translations.
|
languages, but highly recommended for future updates to the translations.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user