[Django] #28187: makemessages is ignoring templates outside the project

42 views
Skip to first unread message

Django

unread,
May 9, 2017, 6:31:11 AM5/9/17
to django-...@googlegroups.com
#28187: makemessages is ignoring templates outside the project
-------------------------------------+-------------------------------------
Reporter: | Owner: ChillarAnand
ChillarAnand |
Type: Bug | Status: assigned
Component: | Version: 1.11
Internationalization |
Severity: Normal | Keywords:
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
We have separate repos for frontend and backend code. We are able to use
templates from other packages after adding them to template dir path.

However, makemessages is ignoring those templates and not generating
messages for these files. Shouldn't makemessages process all template
directories?

--
Ticket URL: <https://code.djangoproject.com/ticket/28187>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
May 9, 2017, 9:42:47 AM5/9/17
to django-...@googlegroups.com
#28187: makemessages is ignoring templates outside the project
-------------------------------------+-------------------------------------
Reporter: ChillarAnand | Owner:

| ChillarAnand
Type: Bug | Status: assigned
Component: | Version: 1.11
Internationalization |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham):

Could you please explain the issue in more detail (i.e. give steps or a
sample project to reproduce)?

--
Ticket URL: <https://code.djangoproject.com/ticket/28187#comment:1>

Django

unread,
May 9, 2017, 1:02:18 PM5/9/17
to django-...@googlegroups.com
#28187: makemessages is ignoring templates outside the project
-------------------------------------+-------------------------------------
Reporter: ChillarAnand | Owner:

| ChillarAnand
Type: Bug | Status: assigned
Component: | Version: 1.11
Internationalization |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Claude Paroz):

I can confirm that currently makemessages only search files in the
directory from which you are running the command.

It's a bit unusual to have template dirs outside of the project directory.
I would be tempted to say that you could solve your issue through symbolic
links…

--
Ticket URL: <https://code.djangoproject.com/ticket/28187#comment:2>

Django

unread,
May 10, 2017, 12:50:39 AM5/10/17
to django-...@googlegroups.com
#28187: makemessages is ignoring templates outside the project
-------------------------------------+-------------------------------------
Reporter: ChillarAnand | Owner:

| ChillarAnand
Type: Bug | Status: assigned
Component: | Version: 1.11
Internationalization |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by ChillarAnand):

Symlinks will solve the problem.

There are several 3rd party apps which provide templates which have a
trans tag like this: [https://github.com/pennersr/django-
allauth/blob/4a6df009ff98255e03a122eb9ea4a90c5eb2aa35/allauth/templates/account/account_inactive.html#L5].
If user adds this directory to templates directory path, the entire
templating system works except trans tag. Now users have to add symlinks
for all files to make trans tag work?

--
Ticket URL: <https://code.djangoproject.com/ticket/28187#comment:3>

Django

unread,
May 10, 2017, 8:55:10 AM5/10/17
to django-...@googlegroups.com
#28187: makemessages is ignoring templates outside the project
-------------------------------------+-------------------------------------
Reporter: ChillarAnand | Owner:

| ChillarAnand
Type: Bug | Status: assigned
Component: | Version: 1.11
Internationalization |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Simon Charette):

ChillarAnand, in this case I think it's expected for third party apps to
ship their own translations if they use `{% trans %}` which allauth
[https://github.com/pennersr/django-allauth/tree/master/allauth/locale
seems to do]?

--
Ticket URL: <https://code.djangoproject.com/ticket/28187#comment:4>

Django

unread,
May 10, 2017, 2:54:15 PM5/10/17
to django-...@googlegroups.com
#28187: makemessages is ignoring templates outside the project
-------------------------------------+-------------------------------------
Reporter: ChillarAnand | Owner:
| ChillarAnand
Type: Bug | Status: closed
Component: | Version: 1.11
Internationalization |
Severity: Normal | Resolution: wontfix
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Claude Paroz):

* status: assigned => closed
* resolution: => wontfix


Comment:

Confirmed Simon's analysis, reusable apps are supposed to provide
translations for their templates. and other strings.

--
Ticket URL: <https://code.djangoproject.com/ticket/28187#comment:5>

Reply all
Reply to author
Forward
0 new messages