Template talk:Mrm

From Second Life Wiki
Revision as of 07:51, 5 March 2010 by Zai Lynch (talk | contribs) (→‎Code cruft?: more i18n)
Jump to navigation Jump to search

Link deeper

Could we have these templates link right to the respective specific section of Maturity? Like so:

Parcel lght G.png General/PG , Parcel lght M.png Moderate/Mature , Parcel lght A.png Adult

i18n

This deeplinking wouldn't work for the translated pages to which these templates link when {{#var:lang}} is set, when the sections are named differently, there. The deeplinking wouldn't do any harm, as browsers silently ignore non-existent anchors and still take you to the right document. They would just not jump to any specific section. But there are at least two possibilities to get it fully working for translated pages, too:

Manual anchors

Place manual anchors around the section titles and keep those for the translations:

<div id="mrm"><!-- Do NOT remove or alter this anchor when translating! Feel free to change the section title, though. -->
==Was sind als „Mature“ eingestufte Regionen, Gruppen, Events und Anzeigen?==
</div>

Redirects

Have Template:mrm link to Maturity Rating Moderate{{#var:lang}} and make that a redirect to the right section of Maturity{{#var:lang}} for each language:

(Analogous Template:mrg and Template:mra would link to Maturity Rating General{{#var:lang}} and Maturity Rating Adult{{#var:lang}}, respectively, and the corresponding redirects would have to be created.)

The redirects for a specific language would need to be updated when the section titles in the corresponding translation of Maturity are changed. HTML Comments could be placed in Maturity and its translations to remind editors of that.

--Boroondas Gupte 13:00, 5 March 2010 (UTC)

I'd consider that a good idea and would like to see it deployed to the English version, as the links aren't so useful at the moment. The only place they're currently used is in the Linden Lab Official:Maturity ratings: an overview article, which is the target of the redirect from Maturity. So basically, the article is currently just linking to itself. For i18n, I'd go with the anchor version (and use Template:Anchor). It is my understanding that this is the way the Viewerhelp:Glossary will be handled as well, once localized versions are available (see Template:Xref). So it would be consistent (and also seems to be the version which causes fewest work for maintenance).
--Khepri Contractor 14:15, 5 March 2010 (UTC)


Code cruft?

Btw., are the {{{1|...}}} around the link captions and the | at the end of the image tags needed? I seem to get exactly the same HTML code with and without them:

with: Parcel lght G.png General/PG , Parcel lght M.png Moderate/Mature , Parcel lght A.png Adult

without: Parcel lght G.png General/PG , Parcel lght M.png Moderate/Mature , Parcel lght A.png Adult

--Boroondas Gupte 13:10, 5 March 2010 (UTC)

Yeah, these are needed to embed the template in localized versions which might have different terms for "General", "Moderate" and "Adult". {{{1|Something}}} means, that the template should use the first specified parameter as an input for that field. In case no first parameter is specified, "Something" is set as default value.
Some languages (like Japanese) are keeping the terms, while others (like French) change them. The template can be used with {{Mrm|Localized name}} to display: Parcel lght M.png Moderate.
--Khepri Contractor 14:15, 5 March 2010 (UTC)
I added some more Wikifu, so the templates adjust themselfs according to the pages language setting, without the need for parameter specification (in case it has a stored translation within the template). This should help to keep it all synced. It remains to be downwards compatible for the cases where alternate labels are needed.
--Zai signature.png (talk|contribs) 14:51, 5 March 2010 (UTC)
Ah, I just noticed what you were referring to with the pipe. No, that's superfluous...
--Khepri Contractor 14:22, 5 March 2010 (UTC)