Skip to content

Commit

Permalink
(#12639) adapt to Jinja2 [pallets/jinja#490 issue 490], fixed in 2.9.
Browse files Browse the repository at this point in the history
And make this version the minimal required version.
  • Loading branch information
cboos committed Jan 10, 2017
1 parent af176a1 commit f086301
Show file tree
Hide file tree
Showing 25 changed files with 42 additions and 41 deletions.
1 change: 1 addition & 0 deletions contrib/make_status.py
Expand Up @@ -28,6 +28,7 @@ def _genshi_version():
PACKAGES = [
("Python", 'sys.version'),
("Setuptools", 'setuptools.__version__'),
("Jinja2", 'jinja2.__version__'),
("Genshi", '__main__._genshi_version()'),
("Babel", 'babel.__version__'),
("sqlite3", ('sqlite3.version',
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Expand Up @@ -86,11 +86,11 @@
zip_safe = True,

setup_requires = [
'jinja2>=2.8',
'jinja2>=2.9.3',
],
install_requires = [
'setuptools>=0.6',
'jinja2>=2.8',
'jinja2>=2.9.3',
],
extras_require = {
'genshi': ['Genshi>=0.6'],
Expand Down
2 changes: 1 addition & 1 deletion trac/admin/templates/jadmin_plugins.html
Expand Up @@ -68,7 +68,7 @@ <h2>
# set nb_plugins
<span class="trac-count">(${len(plugins)})</span>
# endset
# trans nb_plugins = nb_plugins|safe
# trans nb_plugins = nb_plugins

Manage Plugins ${nb_plugins}

Expand Down
2 changes: 1 addition & 1 deletion trac/prefs/templates/jprefs_localization.html
Expand Up @@ -97,7 +97,7 @@
${trac_admin}
# endif
# endset
# trans project_admin = project_admin|safe
# trans project_admin = project_admin

Please contact your ${project_admin} to enable existing
translations.
Expand Down
2 changes: 1 addition & 1 deletion trac/templates/jattachment.html
Expand Up @@ -76,7 +76,7 @@ <h1>${tag_("Add Attachment to %(parent)s",
# endset
# if author == 'anonymous':
<p class="hint">
# trans preferences_link = preferences_link|safe
# trans preferences_link = preferences_link

E-mail address and name can be saved in the
${preferences_link}.
Expand Down
2 changes: 1 addition & 1 deletion trac/templates/jdiff_options.html
Expand Up @@ -32,7 +32,7 @@
value="${'all' if diff.options.contextlines is lessthan(0) else
diff.options.contextlines}"/>
# endset
# trans radio = radio_contextall_0|safe, text = text_contextlines|safe
# trans radio = radio_contextall_0, text = text_contextlines
<label>${radio} Show</label>
<label>${text} lines around each change</label>
# endtrans
Expand Down
2 changes: 1 addition & 1 deletion trac/templates/jerror.html
Expand Up @@ -116,7 +116,7 @@ <h1>${_("Oops…")}</h1>
${trac_admin}
# endif
# endset
# trans project_admin = project_admin|safe
# trans project_admin = project_admin

There was an internal error in Trac. It is recommended that
you notify your local ${project_admin} with the information
Expand Down
2 changes: 1 addition & 1 deletion trac/templates/jlist_of_attachments.html
Expand Up @@ -30,7 +30,7 @@
# set author = authorinfo(attachment.author)
# set date = pretty_dateinfo(attachment.date)
# set title = _('%(size)s bytes', size=attachment.size)
# trans attachment_links = attachment_links|safe, size, author, date, title
# trans attachment_links = attachment_links, size, author, date, title

${attachment_links}(<span title="${title}">${size}</span>)
- added by ${author} ${date}.
Expand Down
2 changes: 1 addition & 1 deletion trac/ticket/templates/jadmin_components.html
Expand Up @@ -69,7 +69,7 @@ <h2>${_("Manage Components")}
# set wikiformatting
<a tabindex="42" href="${href.wiki('WikiFormatting')}">WikiFormatting</a>
# endset
# trans wikiformatting=wikiformatting|safe
# trans wikiformatting=wikiformatting

Description: (you may use ${wikiformatting} here)

Expand Down
2 changes: 1 addition & 1 deletion trac/ticket/templates/jadmin_enums.html
Expand Up @@ -27,7 +27,7 @@ <h2>
<span class="trac-count">(${len(enums)})</span>
# endif
# endset
# trans label_plural, nb_enums = nb_enums|safe
# trans label_plural, nb_enums = nb_enums

Manage ${label_plural} ${nb_enums}

Expand Down
2 changes: 1 addition & 1 deletion trac/ticket/templates/jadmin_milestones.html
Expand Up @@ -38,7 +38,7 @@ <h2>
<span class="trac-count">(${len(milestones)})</span>
# endif
# endset
# trans nb_milestones = nb_milestones|safe
# trans nb_milestones = nb_milestones

Manage Milestones ${nb_milestones}

Expand Down
4 changes: 2 additions & 2 deletions trac/ticket/templates/jadmin_versions.html
Expand Up @@ -32,7 +32,7 @@ <h2>
<span class="trac-count">(${len(versions)})</span>
# endif
# endset
# trans nb_versions = nb_versions|safe
# trans nb_versions = nb_versions

Manage Versions ${nb_versions}

Expand Down Expand Up @@ -65,7 +65,7 @@ <h2>
# set wikiformatting
<a tabindex="42" href="${href.wiki('WikiFormatting')}">WikiFormatting</a>
# endset
# trans wikiformatting = wikiformatting|safe
# trans wikiformatting = wikiformatting

Description: (you may use ${wikiformatting} here)

Expand Down
2 changes: 1 addition & 1 deletion trac/ticket/templates/jquery.html
Expand Up @@ -202,7 +202,7 @@ <h1>${title} <span class="numrows">(${
value="${end}" size="14"
class="trac-${date_or_datetime}picker" />
# endset
# trans start_picker = start_picker|safe, end_picker = end_picker|safe
# trans start_picker = start_picker, end_picker = end_picker
<label>between</label> ${start_picker}
<label>and</label> ${end_picker}
# endtrans
Expand Down
2 changes: 1 addition & 1 deletion trac/ticket/templates/jreport_delete.html
Expand Up @@ -42,7 +42,7 @@ <h1>{${report.id}} ${report.title}</h1>
# set trac_reports
<a href="${href.wiki('TracReports')}">TracReports</a>
# endset
# trans trac_reports = trac_reports|safe
# trans trac_reports = trac_reports

<strong>Note:</strong> See ${trac_reports} for help on using
and creating reports.
Expand Down
6 changes: 3 additions & 3 deletions trac/ticket/templates/jreport_edit.html
Expand Up @@ -68,7 +68,7 @@ <h1>
<a tabindex="42" href="${href.wiki('WikiFormatting')}">
WikiFormatting</a>
# endset
# trans wiki_formatting = wiki_formatting|safe
# trans wiki_formatting = wiki_formatting

Description: (you may use ${wiki_formatting} here)

Expand All @@ -89,7 +89,7 @@ <h1>
<a tabindex="42" href="${href.wiki('TracQuery')
+ '#QueryLanguage'}">TracQuery</a>
# endset
# trans trac_query = trac_query|safe
# trans trac_query = trac_query

Query: (can be either SQL or, if starting
with <code>query:</code>, a ${trac_query} expression)
Expand All @@ -112,7 +112,7 @@ <h1>
# set trac_reports
<a href="${href.wiki('TracReports')}">TracReports</a>
# endset
# trans trac_reports = trac_reports|safe
# trans trac_reports = trac_reports

<strong>Note:</strong> See ${trac_reports} for help on using
and creating reports.
Expand Down
2 changes: 1 addition & 1 deletion trac/ticket/templates/jreport_list.html
Expand Up @@ -115,7 +115,7 @@ <h2>${_("SQL reports and saved custom queries")}
}|htmlattr}>${_("Title")}</a>
# endset
<span id="trac-sort-order">
# trans a_identifier = a_identifier|safe, a_title = a_title|safe
# trans a_identifier = a_identifier, a_title = a_title

Sort by: ${a_identifier} ${a_title}

Expand Down
2 changes: 1 addition & 1 deletion trac/ticket/templates/jticket.html
Expand Up @@ -291,7 +291,7 @@ <h3 class="foldable">Modify Ticket</h3>
<a href="${href.prefs()}" class="trac-target-new">${
_("Preferences")}</a>
# endset
# trans prefs = preferences|safe
# trans prefs = preferences

E-mail address and name can be saved in the ${prefs}

Expand Down
2 changes: 1 addition & 1 deletion trac/ticket/templates/jticket_box.html
Expand Up @@ -73,7 +73,7 @@ <h1 id="trac-ticket-title" class="searchable">
<a href="#comment:${version}">Version ${version}</a>
# endif
# endset
# trans version_link = version_link|safe
# trans version_link = version_link
&mdash; at ${version_link}
# endtrans
# endif
Expand Down
2 changes: 1 addition & 1 deletion trac/ticket/templates/jticket_change.html
Expand Up @@ -132,7 +132,7 @@ <h3 class="change"${{'id': 'comment:%s' % cnum if 'cnum' in change}|htmlattr}>
title="${_("Download")}"
class="trac-rawlink">&#8203;</a>
# endset
# trans attachment_link = attachment_link|safe
# trans attachment_link = attachment_link
${attachment_link} added
# endtrans
# elif 'rendered' in field:
Expand Down
4 changes: 2 additions & 2 deletions trac/timeline/templates/jtimeline.html
Expand Up @@ -43,7 +43,7 @@ <h1>${_("Timeline")}</h1>
# set authors_input
<input type="text" size="16" name="authors" value="${authors}" />
# endset
# trans fromdate = fromdate_input|safe, daysback = daysback_input|safe, authors = authors_input|safe
# trans fromdate = fromdate_input, daysback = daysback_input, authors = authors_input
<label>View changes from ${fromdate}</label> <br />
<label>going back ${daysback} days</label><br />
<label>by author ${authors}</label>
Expand Down Expand Up @@ -77,7 +77,7 @@ <h2>${day}: ${_("Today") if day == today else _("Yesterday") if
# endset
# set title = event.render('title', context)
# if event.author:
# trans time = time|safe, title, author = authorinfo(event.author)
# trans time = time, title, author = authorinfo(event.author)
${time} ${title} by ${author}
# endtrans
# else:
Expand Down
6 changes: 3 additions & 3 deletions trac/versioncontrol/templates/jadmin_repositories.html
Expand Up @@ -33,7 +33,7 @@ <h2>
<span class="trac-count">(${len(repositories)})</span>
# endif
# endset
# trans nb_repos = nb_repos|safe
# trans nb_repos = nb_repos

Manage Repositories ${nb_repos}

Expand Down Expand Up @@ -146,7 +146,7 @@ <h2>
# set tracreposadmin
<a href="${href.wiki('TracRepositoryAdmin') + '#ExplicitSync'}">${_("explicit synchronization")}</a>
# endset
# trans tracreposadmin = tracreposadmin|safe
# trans tracreposadmin = tracreposadmin

Not recommended. See ${tracreposadmin} for more info.

Expand All @@ -166,7 +166,7 @@ <h2>
# set wikiformatting
<a tabindex="42" href="${href.wiki('WikiFormatting')}">WikiFormatting</a>
# endset
# trans wikiformatting = wikiformatting|safe
# trans wikiformatting = wikiformatting

Description: (you may use ${wikiformatting} here)

Expand Down
4 changes: 2 additions & 2 deletions trac/versioncontrol/templates/jbrowser.html
Expand Up @@ -202,14 +202,14 @@ <h1>
title="${_("View changeset %(rev)s", rev=drev)}">${drev}</a>
#- endset
# if stickyrev:
# trans last_change = last_change_link|safe, stickyrev = display_rev(stickyrev), rev = rev_link|safe, author, age
# trans last_change = last_change_link, stickyrev = display_rev(stickyrev), rev = rev_link, author, age

${last_change} on this file since ${stickyrev} was ${rev},
checked in by ${author}, ${age}

# endtrans
# else:
# trans last_change = last_change_link|safe, rev = rev_link|safe, author, age
# trans last_change = last_change_link, rev = rev_link, author, age

${last_change} on this file was ${rev},
checked in by ${author}, ${age}
Expand Down
18 changes: 9 additions & 9 deletions trac/versioncontrol/templates/jchangeset_content.html
Expand Up @@ -39,27 +39,27 @@
<h1>
# if reponame:
# if changeset and restricted:
# trans newrev = newrev|safe, newpath = newpath|safe, reponame
# trans newrev = newrev, newpath = newpath, reponame

Changeset ${newrev} in ${reponame} for ${newpath}

# endtrans
# elif not changeset and restricted:
# trans newpath = newpath|safe, logoldnew = logoldnew|safe, reponame
# trans newpath = newpath, logoldnew = logoldnew, reponame

Changes in ${newpath} ${logoldnew} in ${reponame}

# endtrans
# elif not changeset and not restricted:
# trans reponame, oldpath = oldpath|safe, oldrrev = oldrrev|safe, newpath = newpath|safe, newrrev = newrrev|safe
# trans reponame, oldpath = oldpath, oldrrev = oldrrev, newpath = newpath, newrrev = newrrev

Changes in ${reponame} from ${oldpath} at ${oldrev}
to ${newpath} at ${newrev}

# endtrans
# else:
# if annotated:
# trans shortnewrev = shortnewrev|safe, reponame
# trans shortnewrev = shortnewrev, reponame

Changeset ${shortnewrev} in ${reponame}

Expand All @@ -74,26 +74,26 @@ <h1>
# endif
# else:
# if changeset and restricted:
# trans newrev = newrev|safe, newpath=newpath|safe
# trans newrev = newrev, newpath=newpath

Changeset ${newrev} for ${newpath}

# endtrans
# elif not changeset and restricted:
# trans newpath = newpath|safe, logoldnew = logoldnew|safe
# trans newpath = newpath, logoldnew = logoldnew

Changes in ${newpath} ${logoldnew}

# endtrans
# elif not changeset and not restricted:
# trans oldpath = oldpath|safe, oldrrev = oldrrev|safe, newpath = newpath|safe, newrrev = newrrev|safe
# trans oldpath = oldpath, oldrrev = oldrrev, newpath = newpath, newrrev = newrrev

Changes from ${oldpath} at ${oldrrev} to ${newpath} at ${newrrev}

# endtrans
# else:
# if annotated:
# trans shortnewrev = shortnewrev|safe
# trans shortnewrev = shortnewrev

Changeset ${shortnewrev}

Expand Down Expand Up @@ -157,7 +157,7 @@ <h1>
old_rev=display_rev(item.old.rev))}">
${item.old.path}</a>
# endset
# trans kind, oldpath = oldpath|safe
# trans kind, oldpath = oldpath
(${kind} from ${oldpath})
# endtrans
</em></small>
Expand Down
4 changes: 2 additions & 2 deletions trac/versioncontrol/templates/jrevisionlog.html
Expand Up @@ -88,7 +88,7 @@ <h1>
<input type="text" id="stop_rev" name="stop_rev"
value="${stop_rev}" size="5" />
# endset
# trans input_start = input_start|safe, input_end = input_end|safe
# trans input_start = input_start, input_end = input_end
<label>
View log starting at ${input_start}
</label>
Expand All @@ -101,7 +101,7 @@ <h1>
<input type="text" id="limit" name="limit" value="${limit}"
size="3" maxlength="3" />
# endset
# trans input_max = input_max|safe
# trans input_max = input_max
<label>
Show at most ${input_max} revisions per page.
</label>
Expand Down
2 changes: 1 addition & 1 deletion trac/wiki/templates/jwiki_edit_comment.html
Expand Up @@ -31,7 +31,7 @@ <h1>
# set name
<a href="${current_href}">${page.name}</a>
# endset
# trans version = page.version, name = name|safe
# trans version = page.version, name = name

Edit comment for version ${version} of ${name}

Expand Down

0 comments on commit f086301

Please sign in to comment.