Skip to content

Commit

Permalink
Pull atleast 3% translated files
Browse files Browse the repository at this point in the history
  • Loading branch information
Ayub-Khan committed Nov 19, 2018
1 parent 8b2b7f5 commit e4d6326
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 12 deletions.
6 changes: 6 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ Details of the config.yaml file are in `edx-platform/conf/locale/config.yaml

Changes
=======
v0.4.8
-------

* Updated transifex to pull files from Transifex that are atleast 3% done
previous value was 10%.

v0.4.7
-------

Expand Down
2 changes: 1 addition & 1 deletion i18n/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from . import config

__version__ = '0.4.7'
__version__ = '0.4.8'


class Runner:
Expand Down
2 changes: 1 addition & 1 deletion i18n/transifex.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def pull(configuration, *resources):
print("Pulling conf/locale/config.yaml:locales from Transifex...")

for lang in configuration.translated_locales:
cmd = 'tx pull -f --mode=reviewed --minimum-perc=10 -l {lang}'.format(lang=lang)
cmd = 'tx pull -f --mode=reviewed --minimum-perc=3 -l {lang}'.format(lang=lang)
if resources:
for resource in resources:
execute(cmd + ' -r {resource}'.format(resource=resource))
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

setup(
name='edx-i18n-tools',
version='0.4.7',
version='0.4.8',
description='edX Internationalization Tools',
author='edX',
author_email='[email protected]',
Expand Down
18 changes: 9 additions & 9 deletions tests/test_transifex.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ def test_pull_command(self):
transifex.pull(self.configuration)

call_args = [
('tx pull -f --mode=reviewed --minimum-perc=10 -l en',),
('tx pull -f --mode=reviewed --minimum-perc=10 -l fr',),
('tx pull -f --mode=reviewed --minimum-perc=10 -l zh_CN',),
('tx pull -f --mode=reviewed --minimum-perc=3 -l en',),
('tx pull -f --mode=reviewed --minimum-perc=3 -l fr',),
('tx pull -f --mode=reviewed --minimum-perc=3 -l zh_CN',),
]
self.assertEqual(
call_args,
Expand All @@ -74,12 +74,12 @@ def test_pull_command_with_resources(self):

# conf/locale/config.yaml specifies two non-source locales, 'fr' and 'zh_CN'
call_args = [
('tx pull -f --mode=reviewed --minimum-perc=10 -l en -r foo.1',),
('tx pull -f --mode=reviewed --minimum-perc=10 -l en -r foo.2',),
('tx pull -f --mode=reviewed --minimum-perc=10 -l fr -r foo.1',),
('tx pull -f --mode=reviewed --minimum-perc=10 -l fr -r foo.2',),
('tx pull -f --mode=reviewed --minimum-perc=10 -l zh_CN -r foo.1',),
('tx pull -f --mode=reviewed --minimum-perc=10 -l zh_CN -r foo.2',),
('tx pull -f --mode=reviewed --minimum-perc=3 -l en -r foo.1',),
('tx pull -f --mode=reviewed --minimum-perc=3 -l en -r foo.2',),
('tx pull -f --mode=reviewed --minimum-perc=3 -l fr -r foo.1',),
('tx pull -f --mode=reviewed --minimum-perc=3 -l fr -r foo.2',),
('tx pull -f --mode=reviewed --minimum-perc=3 -l zh_CN -r foo.1',),
('tx pull -f --mode=reviewed --minimum-perc=3 -l zh_CN -r foo.2',),
]
self.assertEqual(
call_args,
Expand Down

0 comments on commit e4d6326

Please sign in to comment.