Move to maketext: sample templates

Vitaly Fedrushkov fedrushkov at users.sourceforge.net
Tue Jan 20 01:59:40 UTC 2009


Teemu Mannermaa wrote:
> On 18.1.2009 2:48, Vitaly Fedrushkov wrote:
>> <a href="editusers.cgi?action=edit&userid=
>> [%- otheruser.id FILTER url_quote %]"
>> title="Edit user '[% otheruser.login FILTER html %]'">Edit this user</a>

>  From all the examples you show, I don't understand why you want to 
> translate the HTML link tag. Somebody really wants to translate the HTML 
> code and not just the english strings that are actually visible to user?

I really don't want to mix html into translation.  Just tried to beautify the 
ugly reality :-)

http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla%2Fwebtools%2Fbugzilla%2Ftemplate%2Fen%2Fdefault%2Faccount%2Fprofile-activity.html.tmpl&rev=&cvsroot=%2Fcvsroot#77

 > I would like to see something simple like this:

 >  <a href="editusers.cgi?action=edit&userid=
 >  [%- otheruser.id FILTER url_quote %]"
 >  title="[% l("Edit user '$1'", filter($otheruser.login, "html")) %]">[%
 > l("Edit this user") %]</a>

Natural language in real example consisted of

   <>Edit this user<> or <>find other accounts<>
   or go <>back to the user list<>

where <> are HTML markup parts and second line is conditional

Not all languages maintain progression similar to English so I doubt about 
possibility to translate

   [_1] or [_2] or go [_3]

to every language without complications, given that 1, 2 and 3 are phrases by 
themselves, already passed through l().

> I'd think this syntax actually improves readability of templates. 
> Especially parameterized texts would be clearly visible. As are 
> translated text. Correct usage should also be simple to verify during a 
> review.

Yes, we're trying to separate natural language and html markup better
(see https://bugzilla.mozilla.org/show_bug.cgi?id=367784)

>> [% |l("<a href=\"editusers.cgi?action=edit&userid=" _

> These quoted quotation marks are not a good idea in any case. I do hope 
> one can use apostrophes for the outermost quoting to get rid of these..

Double quotes do allow ${} interpolation within.

> Otherwise I could pretty much echo what LpSolit said. :)

Thanks for your feedback!

   Regards,
   Vitaly.
_______________________________________________
dev-apps-bugzilla mailing list
dev-apps-bugzilla at lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-apps-bugzilla



More information about the developers mailing list