Browse Source

Migrate to Transifex API v3

pull/8983/head
Aleksander Machniak 2 years ago
parent
commit
bee513218a
  1. 50
      .tx/config
  2. 19
      bin/transifexpull.sh

50
.tx/config

@ -1,99 +1,99 @@
[main]
host = https://www.transifex.com
lang_map = be: be_BE, sr: sr_CS, fa: fa_AF, lb: lb_LU, fr: fr_FR
type = PHP_ALT_ARRAY
lang_map = sr: sr_CS, fa: fa_AF, lb: lb_LU, fr: fr_FR, be: be_BE
[roundcube-webmail.labels]
[o:roundcube:p:roundcube-webmail:r:labels]
file_filter = program/localization/<lang>/labels.inc
source_file = program/localization/en_US/labels.inc
source_lang = en_US
[roundcube-webmail.messages]
[o:roundcube:p:roundcube-webmail:r:messages]
file_filter = program/localization/<lang>/messages.inc
source_file = program/localization/en_US/messages.inc
source_lang = en_US
[roundcube-webmail.timezones]
file_filter = program/localization/<lang>/timezones.inc
source_file = program/localization/en_US/timezones.inc
source_lang = en_US
[roundcube-webmail.plugin-acl]
[o:roundcube:p:roundcube-webmail:r:plugin-acl]
file_filter = plugins/acl/localization/<lang>.inc
source_file = plugins/acl/localization/en_US.inc
source_lang = en_US
[roundcube-webmail.plugin-archive]
[o:roundcube:p:roundcube-webmail:r:plugin-archive]
file_filter = plugins/archive/localization/<lang>.inc
source_file = plugins/archive/localization/en_US.inc
source_lang = en_US
[roundcube-webmail.plugin-attachment_reminder]
[o:roundcube:p:roundcube-webmail:r:plugin-attachment_reminder]
file_filter = plugins/attachment_reminder/localization/<lang>.inc
source_file = plugins/attachment_reminder/localization/en_US.inc
source_lang = en_US
[roundcube-webmail.plugin-emoticons]
[o:roundcube:p:roundcube-webmail:r:plugin-emoticons]
file_filter = plugins/emoticons/localization/<lang>.inc
source_file = plugins/emoticons/localization/en_US.inc
source_lang = en_US
[roundcube-webmail.plugin-enigma]
[o:roundcube:p:roundcube-webmail:r:plugin-enigma]
file_filter = plugins/enigma/localization/<lang>.inc
source_file = plugins/enigma/localization/en_US.inc
source_lang = en_US
[roundcube-webmail.plugin-help]
[o:roundcube:p:roundcube-webmail:r:plugin-help]
file_filter = plugins/help/localization/<lang>.inc
source_file = plugins/help/localization/en_US.inc
source_lang = en_US
[roundcube-webmail.plugin-hide_blockquote]
[o:roundcube:p:roundcube-webmail:r:plugin-hide_blockquote]
file_filter = plugins/hide_blockquote/localization/<lang>.inc
source_file = plugins/hide_blockquote/localization/en_US.inc
source_lang = en_US
[roundcube-webmail.plugin-managesieve]
[o:roundcube:p:roundcube-webmail:r:plugin-managesieve]
file_filter = plugins/managesieve/localization/<lang>.inc
source_file = plugins/managesieve/localization/en_US.inc
source_lang = en_US
[roundcube-webmail.plugin-markasjunk]
[o:roundcube:p:roundcube-webmail:r:plugin-markasjunk]
file_filter = plugins/markasjunk/localization/<lang>.inc
source_file = plugins/markasjunk/localization/en_US.inc
source_lang = en_US
[roundcube-webmail.plugin-new_user_dialog]
[o:roundcube:p:roundcube-webmail:r:plugin-new_user_dialog]
file_filter = plugins/new_user_dialog/localization/<lang>.inc
source_file = plugins/new_user_dialog/localization/en_US.inc
source_lang = en_US
[roundcube-webmail.plugin-newmail_notifier]
[o:roundcube:p:roundcube-webmail:r:plugin-newmail_notifier]
file_filter = plugins/newmail_notifier/localization/<lang>.inc
source_file = plugins/newmail_notifier/localization/en_US.inc
source_lang = en_US
[roundcube-webmail.plugin-password]
[o:roundcube:p:roundcube-webmail:r:plugin-password]
file_filter = plugins/password/localization/<lang>.inc
source_file = plugins/password/localization/en_US.inc
source_lang = en_US
[roundcube-webmail.plugin-subscriptions_option]
[o:roundcube:p:roundcube-webmail:r:plugin-subscriptions_option]
file_filter = plugins/subscriptions_option/localization/<lang>.inc
source_file = plugins/subscriptions_option/localization/en_US.inc
source_lang = en_US
[roundcube-webmail.plugin-userinfo]
[o:roundcube:p:roundcube-webmail:r:plugin-userinfo]
file_filter = plugins/userinfo/localization/<lang>.inc
source_file = plugins/userinfo/localization/en_US.inc
source_lang = en_US
[roundcube-webmail.plugin-vcard_attachments]
[o:roundcube:p:roundcube-webmail:r:plugin-vcard_attachments]
file_filter = plugins/vcard_attachments/localization/<lang>.inc
source_file = plugins/vcard_attachments/localization/en_US.inc
source_lang = en_US
[roundcube-webmail.plugin-zipdownload]
[o:roundcube:p:roundcube-webmail:r:plugin-zipdownload]
file_filter = plugins/zipdownload/localization/<lang>.inc
source_file = plugins/zipdownload/localization/en_US.inc
source_lang = en_US
[o:roundcube:p:roundcube-webmail:r:timezones]
file_filter = program/localization/<lang>/timezones.inc
source_file = program/localization/en_US/timezones.inc
source_lang = en_US

19
bin/transifexpull.sh

@ -1,6 +1,9 @@
#!/bin/sh
TX=`which tx`
PWD=`dirname "$0"`
cd $PWD/..
# In 'translator' mode files will contain empty translated texts
# where translation is not available, we'll remove these later
@ -8,9 +11,7 @@ TX=`which tx`
# Note: there's a bug in txclib, so if the command below doesn't
# work see https://github.com/transifex/transifex-client/commit/a80320735973dd608b48520bf3b89ad53e2b088b
$TX --debug pull -a -f --mode translator
PWD=`dirname "$0"`
$TX pull -a -f --mode translator
do_clean()
{
@ -32,15 +33,15 @@ do_clean()
}
# clean up translation files
for file in $PWD/../program/localization/*/*.inc; do
for file in program/localization/*/*.inc; do
do_clean $file
done
for file in $PWD/../plugins/*/localization/*.inc; do
for file in plugins/*/localization/*.inc; do
do_clean $file
done
# remove empty localization files
for file in $PWD/../program/localization/*/labels.inc; do grep -q -E '\$labels' $file || rm $file; done
for file in $PWD/../program/localization/*/timezones.inc; do grep -q -E '\$labels' $file || rm $file; done
for file in $PWD/../program/localization/*/messages.inc; do grep -q -E '\$messages' $file || rm $file; done
for file in $PWD/../plugins/*/localization/*.inc; do grep -q -E '\$(labels|messages)' $file || rm $file; done
for file in program/localization/*/labels.inc; do grep -q -E '\$labels' $file || rm $file; done
for file in program/localization/*/timezones.inc; do grep -q -E '\$labels' $file || rm $file; done
for file in program/localization/*/messages.inc; do grep -q -E '\$messages' $file || rm $file; done
for file in plugins/*/localization/*.inc; do grep -q -E '\$(labels|messages)' $file || rm $file; done
Loading…
Cancel
Save