mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Rename translation resources from aur to aurweb
* Rename the aur project to aurweb on Transifex. * Rename aur.pot to aurweb.pot. * Update documentation and Makefile. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
This commit is contained in:
parent
41a4189d20
commit
840ee20f7b
4 changed files with 14 additions and 15 deletions
|
@ -1,8 +1,7 @@
|
||||||
[main]
|
[main]
|
||||||
host = https://www.transifex.com
|
host = https://www.transifex.com
|
||||||
|
|
||||||
[aur.aurpot]
|
[aurweb.aurwebpot]
|
||||||
file_filter = po/<lang>.po
|
file_filter = po/<lang>.po
|
||||||
source_file = po/aur.pot
|
source_file = po/aurweb.pot
|
||||||
source_lang = en
|
source_lang = en
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ This document describes how to create and maintain aurweb translations.
|
||||||
|
|
||||||
Creating an aurweb translation requires a Transifex (http://www.transifex.com/)
|
Creating an aurweb translation requires a Transifex (http://www.transifex.com/)
|
||||||
account. You will need to register with a translation team on the aurweb
|
account. You will need to register with a translation team on the aurweb
|
||||||
project page (http://www.transifex.com/projects/p/aur/).
|
project page (http://www.transifex.com/projects/p/aurweb/).
|
||||||
|
|
||||||
|
|
||||||
Creating a New Translation
|
Creating a New Translation
|
||||||
|
@ -26,11 +26,11 @@ $ git clone git://git.archlinux.org/aurweb.git aurweb-git
|
||||||
2. Go into the "po/" directory in the aurweb source and run msginit(1) to
|
2. Go into the "po/" directory in the aurweb source and run msginit(1) to
|
||||||
create a initial translation file from our translation catalog:
|
create a initial translation file from our translation catalog:
|
||||||
|
|
||||||
$ cd aur-git
|
$ cd aurweb-git
|
||||||
$ git checkout master
|
$ git checkout master
|
||||||
$ git pull
|
$ git pull
|
||||||
$ cd po
|
$ cd po
|
||||||
$ msginit -l <locale> -o <locale>.po -i aur.pot
|
$ msginit -l <locale> -o <locale>.po -i aurweb.pot
|
||||||
|
|
||||||
3. Use some editor or a translation helper like poedit to add translations:
|
3. Use some editor or a translation helper like poedit to add translations:
|
||||||
|
|
||||||
|
@ -58,4 +58,4 @@ $ poedit po/<locale>.po
|
||||||
3. Push the updated translation file back to Transifex. Using transifex-client,
|
3. Push the updated translation file back to Transifex. Using transifex-client,
|
||||||
this works as follows:
|
this works as follows:
|
||||||
|
|
||||||
$ tx push -r aur.aurpot -t -l <locale>
|
$ tx push -r aurweb.aurwebpot -t -l <locale>
|
||||||
|
|
16
po/Makefile
16
po/Makefile
|
@ -44,9 +44,9 @@ all: ${MOFILES}
|
||||||
%.mo: %.po
|
%.mo: %.po
|
||||||
msgfmt --check -o $@ $<
|
msgfmt --check -o $@ $<
|
||||||
|
|
||||||
%.po-update: %.po aur.pot
|
%.po-update: %.po aurweb.pot
|
||||||
lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
|
lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
|
||||||
msgmerge -U --no-location --lang="$$lang" $< aur.pot
|
msgmerge -U --no-location --lang="$$lang" $< aurweb.pot
|
||||||
|
|
||||||
POTFILES-php:
|
POTFILES-php:
|
||||||
find ../web -type f -name '*.php' -printf '%P\n' | sort >POTFILES-php
|
find ../web -type f -name '*.php' -printf '%P\n' | sort >POTFILES-php
|
||||||
|
@ -55,19 +55,19 @@ POTFILES-py:
|
||||||
find ../aurweb -type f -name '*.py' -printf '%P\n' | sort >POTFILES-py
|
find ../aurweb -type f -name '*.py' -printf '%P\n' | sort >POTFILES-py
|
||||||
|
|
||||||
update-pot: POTFILES-php POTFILES-py
|
update-pot: POTFILES-php POTFILES-py
|
||||||
pkgname=AUR; \
|
pkgname=AURWEB; \
|
||||||
pkgver=`sed -n 's/.*"AURWEB_VERSION", "\(.*\)".*/\1/p' ../web/lib/version.inc.php`; \
|
pkgver=`sed -n 's/.*"AURWEB_VERSION", "\(.*\)".*/\1/p' ../web/lib/version.inc.php`; \
|
||||||
xgettext --default-domain=aur -L php --keyword=__ --keyword=_n:1,2 \
|
xgettext --default-domain=aurweb -L php --keyword=__ --keyword=_n:1,2 \
|
||||||
--add-location=file --add-comments=TRANSLATORS: \
|
--add-location=file --add-comments=TRANSLATORS: \
|
||||||
--package-name="$$pkgname" --package-version="$$pkgver" \
|
--package-name="$$pkgname" --package-version="$$pkgver" \
|
||||||
--msgid-bugs-address='${MSGID_BUGS_ADDRESS}' \
|
--msgid-bugs-address='${MSGID_BUGS_ADDRESS}' \
|
||||||
--directory ../web --files-from POTFILES-php -o aur.pot; \
|
--directory ../web --files-from POTFILES-php -o aurweb.pot; \
|
||||||
xgettext --default-domain=aur -L python --join-existing \
|
xgettext --default-domain=aurweb -L python --join-existing \
|
||||||
--keyword=translate \
|
--keyword=translate \
|
||||||
--add-location=file --add-comments=TRANSLATORS: \
|
--add-location=file --add-comments=TRANSLATORS: \
|
||||||
--package-name="$$pkgname" --package-version="$$pkgver" \
|
--package-name="$$pkgname" --package-version="$$pkgver" \
|
||||||
--msgid-bugs-address='${MSGID_BUGS_ADDRESS}' \
|
--msgid-bugs-address='${MSGID_BUGS_ADDRESS}' \
|
||||||
--directory ../aurweb --files-from POTFILES-py -o aur.pot
|
--directory ../aurweb --files-from POTFILES-py -o aurweb.pot
|
||||||
|
|
||||||
update-po:
|
update-po:
|
||||||
${MAKE} ${UPDATEPOFILES}
|
${MAKE} ${UPDATEPOFILES}
|
||||||
|
@ -77,7 +77,7 @@ clean:
|
||||||
|
|
||||||
install: all
|
install: all
|
||||||
for l in ${LOCALES}; do mkdir -p ${DESTDIR}${PREFIX}/$$l/LC_MESSAGES/; done
|
for l in ${LOCALES}; do mkdir -p ${DESTDIR}${PREFIX}/$$l/LC_MESSAGES/; done
|
||||||
for l in ${LOCALES}; do cp $$l.mo ${DESTDIR}${PREFIX}/$$l/LC_MESSAGES/aur.mo; done
|
for l in ${LOCALES}; do cp $$l.mo ${DESTDIR}${PREFIX}/$$l/LC_MESSAGES/aurweb.mo; done
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
for l in ${LOCALES}; do rm -rf ${DESTDIR}${PREFIX}/$$l/LC_MESSAGES/; done
|
for l in ${LOCALES}; do rm -rf ${DESTDIR}${PREFIX}/$$l/LC_MESSAGES/; done
|
||||||
|
|
Loading…
Add table
Reference in a new issue