Open issues

Cannot compile i18n for JS files

Description

After a freshly new downloaded english translation (I've clean up `/edx/app/edxapp/edx-platform/conf/locale/en` and run `tx pull -l en` to download all the *en* files from transifex)

*$ python manage.py cms compilejsi18n -v3* shows "ValueError: plural forms expression could be dangerous" in english files (see the log below)

$ python manage.py cms compilejsi18n -v3

WARNINGy.warnings:/edx/app/edxapp/edx-platform/lms/djangoapps/courseware/_init_.py:5: DeprecationWarning: Importing 'lms.djangoapps.courseware' as 'courseware' is no longe
warnings.warn("Importing 'lms.djangoapps.courseware' as 'courseware' is no longer supported", DeprecationWarning)

2019-10-03 05:13:55,847 WARNING 5261 [enterprise.utils] utils.py:50 - Could not import Registry from third_party_auth.provider
2019-10-03 05:13:55,847 WARNING 5261 [enterprise.utils] utils.py:51 - cannot import name EnterpriseCustomerUser
processing language en
Traceback (most recent call last):
File "manage.py", line 123, in <module>
execute_from_command_line([sys.argv[0]] + django_args)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/management/_init_.py", line 364, in execute_from_command_line
utility.execute()
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/management/_init_.py", line 356, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
self.execute(*args, **cmd_options)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute
output = self.handle(*args, **options)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/statici18n/management/commands/compilejsi18n.py", line 108, in handle
self._create_output(outputdir, outputformat, locale, domain, packages)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/statici18n/management/commands/compilejsi18n.py", line 73, in _create_output
data = self._create_javascript_catalog(locale, domain, packages)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/statici18n/management/commands/compilejsi18n.py", line 48, in _create_javascript_catalog
activate(locale)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/utils/translation/_init_.py", line 166, in activate
return _trans.activate(language)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/utils/translation/trans_real.py", line 239, in activate
_active.value = translation(language)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/utils/translation/trans_real.py", line 228, in translation
_translations[language] = DjangoTranslation(language)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/utils/translation/trans_real.py", line 131, in _init_
self._add_local_translations()
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/utils/translation/trans_real.py", line 183, in _add_local_translations
translation = self._new_gnu_trans(localedir)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/utils/translation/trans_real.py", line 156, in _new_gnu_trans
fallback=use_null_fallback)
File "/usr/lib/python2.7/gettext.py", line 496, in translation
t = translations.setdefault(key, class(fp))
File "/usr/lib/python2.7/gettext.py", line 182, in _init_
self._parse(fp)
File "/usr/lib/python2.7/gettext.py", line 318, in _parse
self.plural = c2py(plural)
File "/usr/lib/python2.7/gettext.py", line 95, in c2py
raise ValueError, 'plural forms expression could be dangerous'
ValueError: plural forms expression could be dangerous

5.- Running the command for spanish "$ python manage.py cms compilejsi18n -v3 -l es-es" do not break, but do not show anything in the logs:

$ python manage.py cms compilejsi18n -v3 -l es-es
WARNINGy.warnings:/edx/app/edxapp/edx-platform/lms/djangoapps/courseware/_init_.py:5: DeprecationWarning: Importing 'lms.djangoapps.courseware' as 'courseware' is no longe
warnings.warn("Importing 'lms.djangoapps.courseware' as 'courseware' is no longer supported", DeprecationWarning)

2019-10-03 05:05:34,464 WARNING 32344 [enterprise.utils] utils.py:50 - Could not import Registry from third_party_auth.provider
2019-10-03 05:05:34,465 WARNING 32344 [enterprise.utils] utils.py:51 - cannot import name EnterpriseCustomerUser
processing language es-es

Steps to Reproduce

None

Current Behavior

None

Expected Behavior

None

Reason for Variance

None

Release Notes

None

User Impact Summary

None

Status

Assignee

Unassigned

Reporter

Santiago Bernabé García

Labels

None

Reach

None

Impact

None

Customer

None

Partner Manager

None

URL

None

Contributor Name

None

Groups with Read-Only Access

None

Actual Points

None

Category of Work

None

Stakeholders

None

Priority

Unset
Configure