Edgewall Software

Ticket #376 (closed defect: duplicate)

Opened 5 years ago

Last modified 5 years ago

Rendering error with i18n:msg attribute

Reported by: rblank Owned by: palgarvio
Priority: major Milestone:
Component: Internationalization Version: devel
Keywords: i18n:msg Cc:


The following snippet renders incorrectly in Trac (anydiff of two paths, changeset view):

<h1 py:when="not changeset and not restricted" i18n:msg="reponame, old_path, old_rev, new_path, new_rev">
  Changes<py:if test="reponame"> in $reponame</py:if>
  from <a title="Show entry in browser" href="${href.browser(reponame, old_path, rev=old_rev)}">$old_path</a>
  at <a title="Show full changeset" href="${href.changeset(old_rev, reponame)}">r$old_rev</a>
  to <a title="Show entry in browser" href="${href.browser(reponame, new_path, rev=new_rev)}">$new_path</a>
  at <a title="Show full changeset" href="${href.changeset(new_rev, reponame)}">r$new_rev</a>

The result is:

  from <a title="Show entry in browser" href="/browser/branches/0.11-stable/trac/util?rev=8271">branches/0.11-stable/trac/util</a>
  at <a title="Show full changeset" href="/changeset/8271/trac">r8271</a><a title="Show entry in browser" href="/browser/trunk/trac/util?rev=8271">trunk/trac/util</a>
  at <a title="Show full changeset" href="/changeset/8271/trac">r8271</a></h1>

Note how the "to" (in "Changes from ... at ... to ... at ...") as well as some whitespace are missing.

See  here for the rendering of this example, and note the missing "to" in the heading.


Change History

Changed 5 years ago by cboos

Oh, that must be because of the <py:if test="reponame"> in $reponame</py:if>. Conditionals in i18n:msg are not supported (#372). I'll try to fix that.

But it's true that there are still errors with i18n:msg, when trying to fix  #T9159 I stumbled upon a similar issue, and that one didn't imply any embedded py: directive. More details on this problem later.

Changed 5 years ago by rblank

Oh, right, my bad. I tried separating the py:when from the i18n:msg, but I didn't think about the contained py:if.

So I guess we can close this as a duplicate, then?

Changed 5 years ago by cboos

  • status changed from new to closed
  • resolution set to duplicate
  • milestone 0.6 deleted

Ok, I'll another one later with the issue for  #T9159.

Duplicate of #372.

Add/Change #376 (Rendering error with i18n:msg attribute)


E-mail address and user name can be saved in the Preferences.

Change Properties
<Author field>
as closed
The resolution will be deleted. Next status will be 'reopened'
Note: See TracTickets for help on using tickets.