Hello Pavlo,
08.12.2018 10:42, Pavlo Golub wrote:
I use a bash script to collect all pot's from branches in git:
What kind of functionality are you hoping such an API would provide?
Dumb and simple. List of languages, list of resources, links to .pot and .po files.
Example:GET /resourcesGET /languagesGET /psql.potGET /pt_BR/postgres.po
If it's complicated never mind. I can probably parse html then
extract_pot() {
local version=$1
local gitdir=$2
local branch=$3
mkdir $POTD/$version
(
cd $gitdir
git clean -dfx
git reset --hard HEAD
git checkout $branch
git rebase
./configure --enable-nls >/dev/null
make init-po
for pot in `find . -name '*.pot'`; do
cp $pot $POTD/$version/
echo $pot
done
)
}
For me the most inconvenient part was to support several versions of .po and synchronize between them.
So I use pology (posummit) to get united .po's, which looks like:
#. +> 11 10 9.6 9.5
#: pg_config.c:153
#, c-format
msgid "%s: could not find own program executable\n"
msgstr "%s: не удалось найти свой исполняемый файл\n"
#. +> 11 10 9.6 9.5
#: pg_config.c:180
#, c-format
msgid "%s: invalid argument: %s\n"
msgstr "%s: неверный аргумент: %s\n"
#. +> 9.5
#: pg_config.c:243 pg_config.c:259 pg_config.c:275 pg_config.c:291
#: pg_config.c:307 pg_config.c:323 pg_config.c:339 pg_config.c:355
#: pg_config.c:371
#, c-format
msgid "not recorded\n"
msgstr "не сохранено\n"
I can share my scripts if it can be useful for you.
Best regards,
Alexander