A new setting for custom gettext domains?

189 views
Skip to first unread message

Tim Graham

unread,
Jul 28, 2015, 2:48:14 PM7/28/15
to Django developers (Contributions to Django itself)
Since adding new settings is sometimes controversial, I wanted to ask for thoughts about this ticket [1] / pull request [2] which proposes a new LOCALE_FILENAMES setting to allow using additional gettext domains besides "django". I don't use translations myself, so thoughts about whether the usefulness of the feature justifies a new setting or if there is some other solution to the problem described in the ticket would be welcome.

[1] https://code.djangoproject.com/ticket/6376
[2] https://github.com/django/django/pull/5053

Krzysio Gutkowski

unread,
Jul 29, 2015, 5:45:04 AM7/29/15
to Django developers (Contributions to Django itself), timog...@gmail.com

Raphael Michel

unread,
Aug 20, 2015, 9:39:21 AM8/20/15
to Tim Graham, Django developers (Contributions to Django itself)
Hi,

I think the setting is worth it, it can be really useful when working
with complex translation setups.

However, I feel that LOCALE_FILENAMES is a poor choice for the setting
name, as it differs from standard gettext terminology in a very unclear
way. Why not name it LOCALE_DOMAINS?
(To me, _FILENAMES sounds as if I should pass either a path or at least
a full filename, but it is neither of both.)

Raphael

Am Tue, 28 Jul 2015 11:48:14 -0700 (PDT)
schrieb Tim Graham <timog...@gmail.com>:

Claude Paroz

unread,
Aug 20, 2015, 4:25:19 PM8/20/15
to Django developers (Contributions to Django itself)
In my opinion, the question to ask when wondering if a configuration should be a setting or not is: is this setting supposed to be changed for different installations. In this case, I would answer no. So I think this is more an application configuration thing which could be appropriate in an AppConfig.
For translation paths specified in LOCALE_PATHS (not related to an app), we could extend the LOCALE_PATHS setting format to accept a different structure, for example a dict {'path': ..., 'domain': ...}.

My 2 cents,

Claude

Krzysio Gutkowski

unread,
Aug 24, 2015, 9:30:56 AM8/24/15
to Django developers (Contributions to Django itself)
Hi,

It looks that implementing it in that ways makes more sense.

However, if I were to implement it in that way, should I change both settings in one PR, or should I rework the LOCALE_PATHS setting in a separate PR?

Claude Paroz

unread,
Aug 25, 2015, 3:06:26 AM8/25/15
to Django developers (Contributions to Django itself)

When separate PRs are doable and have each self-contained and coherent changes, it's always preferred.

Claude
Reply all
Reply to author
Forward
0 new messages