mirror of
https://github.com/discourse/discourse.git
synced 2025-09-04 08:47:37 +08:00
Simplify the pull_translations script
- There's no need for configuring "trans.<lang>" for each resource. Using the global "lang_map" in the Transifex client config is enough. - The Transifex client can rename locales. No need to do this manually. - Pull all translation files for each locale that has a file named config/locales/client.<lang>.yml. Up until now the script did only update existing files, but didn't add missing ones. That is why there are so many translation files for the poll plugin missing.
This commit is contained in:
parent
1b250f1e01
commit
1023badd90
2 changed files with 16 additions and 87 deletions
37
.tx/config
37
.tx/config
|
@ -1,92 +1,57 @@
|
|||
[main]
|
||||
host = https://www.transifex.com
|
||||
lang_map = es_ES: es, fr_FR: fr, ko_KR: ko, pt_PT: pt
|
||||
|
||||
[discourse-org.clientenyml]
|
||||
file_filter = config/locales/client.<lang>.yml
|
||||
source_file = config/locales/client.en.yml
|
||||
source_lang = en
|
||||
trans.es_ES = config/locales/client.es.yml
|
||||
trans.fr_FR = config/locales/client.fr.yml
|
||||
trans.ko_KR = config/locales/client.ko.yml
|
||||
trans.pt_PT = config/locales/client.pt.yml
|
||||
type = YML
|
||||
|
||||
[discourse-org.serverenyml]
|
||||
file_filter = config/locales/server.<lang>.yml
|
||||
source_file = config/locales/server.en.yml
|
||||
source_lang = en
|
||||
trans.es_ES = config/locales/server.es.yml
|
||||
trans.fr_FR = config/locales/server.fr.yml
|
||||
trans.ko_KR = config/locales/server.ko.yml
|
||||
trans.pt_PT = config/locales/server.pt.yml
|
||||
type = YML
|
||||
|
||||
[discourse-org.pollclientenyml]
|
||||
file_filter = plugins/poll/config/locales/client.<lang>.yml
|
||||
source_file = plugins/poll/config/locales/client.en.yml
|
||||
source_lang = en
|
||||
trans.es_ES = plugins/poll/config/locales/client.es.yml
|
||||
trans.fr_FR = plugins/poll/config/locales/client.fr.yml
|
||||
trans.ko_KR = plugins/poll/config/locales/client.ko.yml
|
||||
trans.pt_PT = plugins/poll/config/locales/client.pt.yml
|
||||
type = YML
|
||||
|
||||
[discourse-org.pollserverenyml]
|
||||
file_filter = plugins/poll/config/locales/server.<lang>.yml
|
||||
source_file = plugins/poll/config/locales/server.en.yml
|
||||
source_lang = en
|
||||
trans.es_ES = plugins/poll/config/locales/server.es.yml
|
||||
trans.fr_FR = plugins/poll/config/locales/server.fr.yml
|
||||
trans.ko_KR = plugins/poll/config/locales/server.ko.yml
|
||||
trans.pt_PT = plugins/poll/config/locales/server.pt.yml
|
||||
type = YML
|
||||
|
||||
[discourse-org.imgurserverenyml]
|
||||
file_filter = vendor/gems/discourse_imgur/lib/discourse_imgur/locale/server.<lang>.yml
|
||||
source_file = vendor/gems/discourse_imgur/lib/discourse_imgur/locale/server.en.yml
|
||||
source_lang = en
|
||||
trans.es_ES = vendor/gems/discourse_imgur/lib/discourse_imgur/locale/server.es.yml
|
||||
trans.fr_FR = vendor/gems/discourse_imgur/lib/discourse_imgur/locale/server.fr.yml
|
||||
trans.ko_KR = vendor/gems/discourse_imgur/lib/discourse_imgur/locale/server.ko.yml
|
||||
trans.pt_PT = vendor/gems/discourse_imgur/lib/discourse_imgur/locale/server.pt.yml
|
||||
type = YML
|
||||
|
||||
[discourse-org.403html]
|
||||
file_filter = public/403.<lang>.html
|
||||
source_file = public/403.html
|
||||
source_lang = en
|
||||
trans.es_ES = public/403.es.html
|
||||
trans.fr_FR = public/403.fr.html
|
||||
trans.ko_KR = public/403.ko.html
|
||||
trans.pt_PT = public/403.pt.html
|
||||
type = HTML
|
||||
|
||||
[discourse-org.422html]
|
||||
file_filter = public/422.<lang>.html
|
||||
source_file = public/422.html
|
||||
source_lang = en
|
||||
trans.es_ES = public/422.es.html
|
||||
trans.fr_FR = public/422.fr.html
|
||||
trans.ko_KR = public/422.ko.html
|
||||
trans.pt_PT = public/422.pt.html
|
||||
type = HTML
|
||||
|
||||
[discourse-org.500html]
|
||||
file_filter = public/500.<lang>.html
|
||||
source_file = public/500.html
|
||||
source_lang = en
|
||||
trans.es_ES = public/500.es.html
|
||||
trans.fr_FR = public/500.fr.html
|
||||
trans.ko_KR = public/500.ko.html
|
||||
trans.pt_PT = public/500.pt.html
|
||||
type = HTML
|
||||
|
||||
[discourse-org.503html]
|
||||
file_filter = public/503.<lang>.html
|
||||
source_file = public/503.html
|
||||
source_lang = en
|
||||
trans.es_ES = public/503.es.html
|
||||
trans.fr_FR = public/503.fr.html
|
||||
trans.ko_KR = public/503.ko.html
|
||||
trans.pt_PT = public/503.pt.html
|
||||
type = HTML
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue