#11825 closed enhancement (fixed)
Remove whitespace from extracted messages
Reported by: | Ryan J Ollos | Owned by: | Christian Boos |
---|---|---|---|
Priority: | normal | Milestone: | 1.3.2 |
Component: | i18n | Version: | |
Severity: | normal | Keywords: | jinja2 |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
Whitespace in extracted messages causes problems when the indentation is changed. This can easily occur in templates where a change in markup can lead to change in indentation for large blocks of code. Work was started in comment:5:ticket:11813 to remove whitespace for the messages that were modified in [13262].
The following list of messages needing whitespace removed was created before the latest extraction [13295]:
admin_logging.html:58 admin_perms.html:44 admin_perms.html:63 admin_perms.html:149 admin_plugins.html:82 prefs.html:27 prefs_advanced.html:35 prefs_advanced.html:52 prefs_datetime.html:40 prefs_datetime.html:53 prefs_datetime.html:64 prefs_datetime.html:83 prefs_datetime.html:101 prefs_general.html:25 prefs_general.html:29 prefs_keybindings.html:31 prefs_language.html:46 prefs_language.html:49 prefs_pygments.html:45 prefs_userinterface.html:31 prefs_userinterface.html:42 search.html:81 about.html:31 about.html:37 about.html:44 about.html:46 attachment.html:104 diff_div.html:81 diff_options.html:29 diff_view.html:27 diff_view.html:32 diff_view.html:37 error.html:96 error.html:116 error.html:123 error.html:135 error.html:144 error.html:153 theme.html:82 admin_components.html:113 admin_enums.html:94 admin_milestones.html:105 admin_versions.html:114 admin_components.html:119 admin_enums.html:104 admin_milestones.html:111 admin_versions.html:120 admin_enums.html:98 milestone_delete.html:53 milestone_edit.html:35 milestone_view.html:104 roadmap.html:90 query.html:139 query.html:271 report_delete.html:36 report_edit.html:67 report_list.html:126 report_view.html:220 report_edit.html:54 report_list.html:61 ticket.html:345 ticket.html:414 ticket_change.html:90 ticket_change.html:146 ticket_change.html:150 timeline.html:29 timeline.html:69 admin_repositories.html:62 browser.html:147 browser.html:155 browser.html:196 browser.html:232 changeset.html:45 changeset.html:49 changeset.html:53 changeset.html:67 changeset.html:71 changeset.html:75 changeset.html:121 changeset.html:221 diff_form.html:60 diff_form.html:72 revisionlog.html:67 revisionlog.html:77 revisionlog.html:219 wiki_delete.html:48 wiki_delete.html:67 wiki_delete.html:87 wiki_delete.html:93 wiki_edit.html:133 wiki_edit.html:141 wiki_edit.html:143 wiki_edit_form.html:44 wiki_view.html:46
Attachments (0)
Change History (14)
comment:1 by , 10 years ago
comment:2 by , 10 years ago
If the amount of whitespace is never significant, we could also think about adding a normalization step.
comment:3 by , 10 years ago
That sounds interesting. I didn't find either choice in comment:5:ticket:11813 (adding HTML comment markers or removing indentation) to be a particularly good solution.
comment:4 by , 10 years ago
Milestone: | 1.1.3 → next-dev-1.1.x |
---|
comment:5 by , 10 years ago
Milestone: | next-dev-1.1.x → next-major-releases |
---|
Retargetting tickets to narrow focus for milestone:1.2. Please move the ticket back to milestone:next-dev-1.1.x if you intend to resolve it by milestone:1.2.
comment:6 by , 10 years ago
Owner: | removed |
---|
comment:7 by , 9 years ago
With templates changing significantly in switching to Jinja, it might be worthwhile to minimize whitespace in the extracted messages.
comment:9 by , 9 years ago
Milestone: | next-major-releases → 1.3.1 |
---|
comment:10 by , 8 years ago
Keywords: | jinja2 added |
---|---|
Milestone: | 1.3.1 → 1.3.2 |
Owner: | set to |
Status: | new → assigned |
See [511551e7/cboos.git].
comment:11 by , 8 years ago
Verify if messages extracted from templates trans
and pluralize
directives are also normalized.
comment:12 by , 7 years ago
Extracted trans
text looks good. I don't see any uses of pluralize
in the templates.
comment:13 by , 7 years ago
Release Notes: | modified (diff) |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
Closing since it appears all extracted text has leading whitespace removed.
comment:14 by , 5 years ago
Release Notes: | modified (diff) |
---|
Leading whitespace (indentation) is removed from extracted messages.
Hmm. That changes would lead a lot of work to translators. So, I think we should modify extracted messages only when the template is changed by fixing defects and enhancements.