15 | | * `index`, `app_index`: Moved the markup-as-translatable of app names from the template to the view code so the translators don't need to translate a second title()'d version of every app name. |
16 | | * Consistent use of the capfirst filter over the app names in the breadcrumbs of the different views. |
17 | | * Don't touch `base_site.html` in order to provide for translatability of the app name in the <title> HTML tag for the application-specific model list view. Implement the needed change in the relevant view (`app_index`) instead (replacing a "%s administration" msgid with a more translator-friendly "%(app_label)s administration" one in the process). This will spare translators having to translate both "<appaname>" and a "<appaname administration" literals. |
18 | | * Extend above fixes to other templates that also need them (`delete_confirm.html`, `object_history.html`) |
| 15 | * `index`, `app_index`: Moved the markup-as-translatable of app names from the template to the view code so the translators aren't forced to translate a second `title()`'d version of every app name. |
| 16 | * Consistent use of the `capfirst` filter on the app names in the breadcrumbs of the different views. |
| 17 | * Don't touch `base_site.html` in order to provide for ''translatability'' of the app name in the `<title>` HTML tag for the application-specific model list view. Instead, implement the needed change in the relevant view (`app_index`) (replacing a `"%s administration"` msgid with a more translator-friendly `"%(app_label)s administration"` one in the process). This will spare translators the need to translate both a `"<appname>"` and a `"<appname> administration"` literals. |
| 18 | * Extend above fixes to other templates that also need them (`delete_confirm.html`, `object_history.html`) |
24 | | '''Note 3:''' A further enhancement would be to move presentation-related munging (like calling .title() and/or capfirst() in view code) from views to templates if/when #5972 gets committed (will try to work on adding test+docs to it) but meanwhile this fix can solve this bug now with what we have at hand. |
| 24 | '''Note 2:''' The `change_form.html` template ran the app label through the `escape` filter. This has been dropped because it seems inconsistent with what is done in rest of the templates, the app name isn't end user-provided content so the risk of being abused for XSS seems low. |
| 25 | |
| 26 | '''Note 3:''' There seems to be some inconsistency on how the app name is a) `.title()`'d for the name that appear in the caption of model tables (`index` and `app_index` views) and b) `|capfirst`'d for use in HTML title and breadcrumbs. This has been left untouched to avoid introducing a backward incompatible change. |
| 27 | |
| 28 | '''Note 4:''' A further enhancement would be to move presentation-related munging (like calling `.title()` and/or `capfirst()` in view code) from views to templates if/when #5972 gets committed but meanwhile this fix can solve this bug now with the tools we have at hand now. |