Edgewall Software

Opened 14 years ago

Closed 14 years ago

#376 closed defect (duplicate)

Rendering error with i18n:msg attribute

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

Description

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>
</h1>

The result is:

<h1>Changes
  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 (3)

comment:1 Changed 14 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.

comment:2 Changed 14 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?

comment:3 Changed 14 years ago by cboos

  • Milestone 0.6 deleted
  • Resolution set to duplicate
  • Status changed from new to closed

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

Duplicate of #372.

Note: See TracTickets for help on using tickets.