-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Travis CI: push translation updates (if any) #487
Conversation
I couldn't really test this because the script will only run on master. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add some more comments to the scripts?
Especially to the update_translations.py
file.
I would prefer not to add comments to the old part of |
.travis.yml
Outdated
@@ -3,3 +3,9 @@ before_install: | |||
- sudo apt-get install -y python-jsonschema python-pil | |||
|
|||
script: python ./validate.py | |||
|
|||
after_success: if [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then ./i18n/push_translations.sh; fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even if it's currently quite clear what the both conditions check, but I think we should add a comment here
i18n/update_translations.py
Outdated
for file_name in fnmatch.filter(file_names, '*.po'): | ||
languages.append(os.path.splitext(file_name)[0]) | ||
for language in languages: | ||
ps = subprocess.Popen('msgmerge -U i18n/{}.po i18n/keys.pot'.format(language), shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we need a comment here shortly explaining what the commands msgmerge
and msgcat
do in these cases
i18n/update_translations.py
Outdated
for root, dir_names, file_names in os.walk(cwd + '/i18n'): | ||
for file_name in fnmatch.filter(file_names, '*.po'): | ||
languages.append(os.path.splitext(file_name)[0]) | ||
for language in languages: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should add a short comment explaining how you find the languages
Mh. That didn't work as expected. For some reason, I can't even see the log in Travis. |
fixes #480