)]}'
{"openstack_dashboard/dashboards/settings/user/forms.py":[{"author":{"_account_id":12826,"name":"Rob Cresswell","display_name":"robcresswell","email":"robert.cresswell@outlook.com","username":"rob-cresswell"},"change_message_id":"c623d54142950d817ddd8d2971c62d5ffcd61ffc","unresolved":false,"context_lines":[{"line_number":58,"context_line":"            continue"},{"line_number":59,"context_line":"        found_catalogs \u003d ["},{"line_number":60,"context_line":"            gettext_module.find(domain, locale_path,"},{"line_number":61,"context_line":"                                [translation.to_locale(lang_code)])"},{"line_number":62,"context_line":"            for locale_path, domain"},{"line_number":63,"context_line":"            in itertools.product(settings.LOCALE_PATHS,"},{"line_number":64,"context_line":"                                 [\u0027django\u0027, \u0027djangojs\u0027])"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff0f0b1f_65f0d4ca","line":61,"updated":"2017-05-18 09:32:14.000000000","message":"If I remember correctly, there are problems with this, which I had to work around (see https://github.com/openstack/horizon/blob/master/openstack_dashboard/management/commands/update_catalog.py#L84)","commit_id":"a88092630014c53c9e6fe4ee9265f8443eea96bd"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"7825835b982467c50e648d7c9c5a351f2b134795","unresolved":false,"context_lines":[{"line_number":58,"context_line":"            continue"},{"line_number":59,"context_line":"        found_catalogs \u003d ["},{"line_number":60,"context_line":"            gettext_module.find(domain, locale_path,"},{"line_number":61,"context_line":"                                [translation.to_locale(lang_code)])"},{"line_number":62,"context_line":"            for locale_path, domain"},{"line_number":63,"context_line":"            in itertools.product(settings.LOCALE_PATHS,"},{"line_number":64,"context_line":"                                 [\u0027django\u0027, \u0027djangojs\u0027])"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff0f0b1f_123592f7","line":61,"in_reply_to":"ff0f0b1f_65f0d4ca","updated":"2017-05-21 19:19:22.000000000","message":"Actually gettext(_module).find looks up catalog appropriately.\nIn case of \u0027ko\u0027, the logic first searches \u0027ko\u0027 and then \u0027ko_KR\u0027. As a result, \u0027ko_KR\u0027 is found correctly.\n\n ubuntu@sheep6:/opt/stack/horizon (master)[19:06:54]$ tox -e manage -- shell\n ...\n In [1]: from django.utils import translation\n\n In [2]: from django.conf import settings\n\n In [3]: import gettext as gettext_module\n\n In [4]: settings.LOCALE_PATHS\n Out[4]: [\u0027horizon/locale\u0027, \u0027openstack_dashboard/locale\u0027]\n\n In [5]: gettext_module.find(\u0027django\u0027, \u0027openstack_dashboard/locale/\u0027, [translation.to_locale(\u0027ko\u0027)])\n Out[5]: \u0027openstack_dashboard/locale/ko_KR/LC_MESSAGES/django.mo\u0027\n\nIn the case of update_catalog command you mentioned, it uses pybabel and pybabel does not handle this, so we need a special language mapping.","commit_id":"a88092630014c53c9e6fe4ee9265f8443eea96bd"},{"author":{"_account_id":12826,"name":"Rob Cresswell","display_name":"robcresswell","email":"robert.cresswell@outlook.com","username":"rob-cresswell"},"change_message_id":"c623d54142950d817ddd8d2971c62d5ffcd61ffc","unresolved":false,"context_lines":[{"line_number":61,"context_line":"                                [translation.to_locale(lang_code)])"},{"line_number":62,"context_line":"            for locale_path, domain"},{"line_number":63,"context_line":"            in itertools.product(settings.LOCALE_PATHS,"},{"line_number":64,"context_line":"                                 [\u0027django\u0027, \u0027djangojs\u0027])"},{"line_number":65,"context_line":"        ]"},{"line_number":66,"context_line":"        if not all(found_catalogs):"},{"line_number":67,"context_line":"            continue"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff0f0b1f_a594ac45","line":64,"updated":"2017-05-18 09:32:14.000000000","message":"Not every language currently has django and djangojs files, so it might not be good to assume this? See https://bugs.launchpad.net/openstack-i18n/+bug/1690233","commit_id":"a88092630014c53c9e6fe4ee9265f8443eea96bd"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"7825835b982467c50e648d7c9c5a351f2b134795","unresolved":false,"context_lines":[{"line_number":61,"context_line":"                                [translation.to_locale(lang_code)])"},{"line_number":62,"context_line":"            for locale_path, domain"},{"line_number":63,"context_line":"            in itertools.product(settings.LOCALE_PATHS,"},{"line_number":64,"context_line":"                                 [\u0027django\u0027, \u0027djangojs\u0027])"},{"line_number":65,"context_line":"        ]"},{"line_number":66,"context_line":"        if not all(found_catalogs):"},{"line_number":67,"context_line":"            continue"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff0f0b1f_522aea8f","line":64,"in_reply_to":"ff0f0b1f_a594ac45","updated":"2017-05-21 19:19:22.000000000","message":"My intention is to check whether all four catalogs exist in the repo. This means all catalogs are well translated, and it will satisfies the criteria the i18n team discussed before (i.e. 80~90% translated) in most cases.\n\nEach catalog will be added to the horizon if the progress is \u003e\u003d 75% and it will be dropped if the percentage becomes \u003c40%  [1]. I think it is reasonable to check all catalogs exist.\n\n[1] https://docs.openstack.org/developer/i18n/infra.html#translation-jobs","commit_id":"a88092630014c53c9e6fe4ee9265f8443eea96bd"}]}
