﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
33863	Strings from default locale missing from Django JavaScript catalog	Carlos Mermingas	Claude Paroz	"== Problem
The JavaScript catalog doesn't include fallback strings in certain scenarios. In other words: when string ""A"" is not translated in `es_MX` but it is translated in `es`, the JavaScript catalog contains the default or untranslated ""A"" string.

I set up an app that demonstrates this problem: https://github.com/cmermingas/i18n_test

I believe that this is an issue but I asked in StackOverflow, in case it's improper use: https://stackoverflow.com/questions/73086306/strings-from-default-locale-missing-from-django-javascript-catalog

== Setup

* `LOCALE_PATHS` set to `PROJECT_ROOT/locale`.

* Translations for all apps stored under `LOCALE_PATHS`.

* `JavaScriptCatalog` configured without packages:

{{{
path('jsi18n/', JavaScriptCatalog.as_view(), name='javascript-catalog')
}}}

* `es_MX` and `es` translations that demonstrate the problem:

  * The string `""es - Not translated""` is translated in the `es` locale.
  * The string `""es_MX - Not translated""` is translated in the `es_MX` locale.

== Workaround

This works if I pass `packages` to `JavaScriptCatalog`:

{{{
path(
    'jsi18n/',
    JavaScriptCatalog.as_view(packages=[""testapp""]),
    name='javascript-catalog'
)
}}}

But this is not required, is it?

"	Bug	closed	Internationalization	4.0	Normal	fixed			Ready for checkin	1	0	0	0	0	0
