Opened 7 years ago

Closed 7 years ago

#28187 closed Bug (wontfix)

makemessages is ignoring templates outside the project

Reported by: ChillarAnand Owned by: ChillarAnand
Component: Internationalization Version: 1.11
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

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?

Change History (5)

comment:1 by Tim Graham, 7 years ago

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

comment:2 by Claude Paroz, 7 years ago

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…

comment:3 by ChillarAnand, 7 years ago

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?

comment:4 by Simon Charette, 7 years ago

ChillarAnand, in this case I think it's expected for third party apps to ship their own translations if they use {% trans %} which allauth seems to do?

Version 0, edited 7 years ago by Simon Charette (next)

comment:5 by Claude Paroz, 7 years ago

Resolution: wontfix
Status: assignedclosed

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

Note: See TracTickets for help on using tickets.
Back to Top