Template talk:OLPC: Difference between revisions

From OLPC
Jump to navigation Jump to search
m (→‎Why I Created "Template:OLPC/": update link to target section)
 
(9 intermediate revisions by 6 users not shown)
Line 19: Line 19:
This template should read "This page monitored by the OLPC team.". The "maintained by" phrasing discourages people from adding useful information to the wiki.
This template should read "This page monitored by the OLPC team.". The "maintained by" phrasing discourages people from adding useful information to the wiki.
: I take your point, but I am not sure of what the proper term we should be using: we try to monitor all the pages, but we are in essence "certifying" the contents of pages with the olpc tag. --[[User:Walter|Walter]] 18:06, 19 March 2008 (EDT)
: I take your point, but I am not sure of what the proper term we should be using: we try to monitor all the pages, but we are in essence "certifying" the contents of pages with the olpc tag. --[[User:Walter|Walter]] 18:06, 19 March 2008 (EDT)
: That would be 'monitored'. Monitor is an oversight that provides caution, reminders, and admonishments. I believe you agree 'maintain' is wrong - the OLPC group does not maintain it. 'Certifies' is wrong as the OLPC group does not 'bless' changes in advance. Hmmm... Be reasonable, do it my way. :) [[User:CharlesMerriam|CharlesMerriam]] 03:59, 20 March 2008 (EDT)
::I am convinced that monitored is the right choice. Perhaps we should say somewhere that ''all'' pages are patrolled? --[[User:Walter|Walter]] 09:47, 20 March 2008 (EDT)

== Provide localization for this template ==

It's a bit jarring to see the English text in the header of the translated pages.

Rather than requiring translators to select alternate templates, e.g. <nowiki>{{OLPC/lang-es}}</nowiki>, this template can auto-detect the language by looking for the translation automatically, as I have done for the [[Template:Developers|<nowiki>{{Developers}}</nowiki> template]].

While that solution depends on /lang-xx in the page name, for those few cases (e.g. [[El Wiki de la OLPC]]) where the page has been renamed and doesn't have that, a translated page can still use a template parameter to override, e.g. <nowiki>{{OLPC | trans=lang-es}}</nowiki>

I would update this template (and similar, like <nowiki>{{Users}}</nowiki>, but alas, they are write protected.

[[User:Dupuy|@alex]] 14:17, 6 June 2008 (EDT)
: This is a good point. I like the developers template example... --[[User:Sj|Sj]]&nbsp;[[User talk:Sj|<font style="color:#f70; font-size:70%">talk</font>]] 00:01, 10 June 2008 (EDT)

::The protection on this page has been temporarily dialed down to allow registered users to edit (no anon edits, sysop to move). I'll watch this page and if Alex would kindly ping [[User_talk:Cjl|my talk page]] when the edits are done, I'll dial it back up. [[User:Cjl|Cjl]] 01:05, 10 June 2008 (EDT)

I've updated this template to a localized form, and improved the handling for RTL languages (arabic, hebrew); however, the [[Template:User]] page is still locked down, so I haven't done anything for that.

I've even provided translations for all languages that have a translation of the OLPC Wiki page. About half of these are Google translations, I was able to improve or avoid total nonsense for a number of languages, but these should really be checked by native speakers. However, before this is done, there is an interesting point that was raised in the [[Template:OLPC/translated]] page (I've replaced that with a redirect) - which is that the translations are not "maintained" by OLPC. The terminology has changed to "monitored" in any case, but I'm not sure that it's really accurate to say that the translations are even monitored. It might make sense for the translated forms of the templates to use a slightly different wording reflecting this, e.g. instead of

Esta página está supervisada por el equipo de OLPC.

it might be better to have something like

Esta página es una traducción manual, el original está supervisada por el equipo de OLPC.

but that's a mouthful as well, and I'm not sure if it is really better. (My choice of Spanish for this example is perhaps not ideal, since if any translations were to be monitored, they would be the ones into Spanish - el segundo idioma de los Estados Unidos - but it makes it easier for you all to follow the difference between the messages, and is easier for me than translating into French or Portuguese.) [[User:Dupuy|@alex]] 16:57, 13 June 2008 (EDT)

== removed hack ==

<div {{#switch: {{{trans|{{#titleparts:{{PAGENAME}}|1|2}} }}}|lang-ar|lang-he=dir="rtl" }} style="background:#3d7ef5; color:white;">&nbsp;&nbsp;{{#ifexist:Template:Help test/{{{trans|{{#titleparts:{{PAGENAME}}|1|2}} }}}
|{{Template:Help test/{{{trans|{{#titleparts:{{PAGENAME}}|1|2}} }}} }}|Please consider upgrading to the [[Release notes/8.2.0|stable 8.2.0 (build 767)]] release}}</div>

== Why I Created "Template:OLPC/" ==

I spent some time figuring out what this template was doing, so I'd thought I'd write it all down before I forgot, which will probably be in about 2 hours. Oh, and I could be wrong in any number of ways. But here's what I can 'cipher:

This following bit of parser magic gets used three times within the template (I've thrown in some extra spaces for clarity, so, don't copy and paste this and expect it to work), so I'll deal with it first:
<pre>
{{{trans | {{#titleparts: {{PAGENAME}} | 1 | 2 }} }}}
</pre>

Here, <code>trans</code> is an optional variable that can be passed to the template, as mentioned above, as <code><nowiki>{{OLPC | trans=lang-XX }}</nowiki></code> where the XX is replaced by the appropriate two-letter languange abbreviation. (There is a template on MediaWiki called <code>[[mw:Template:Trans|Trans]]</code> but that is unrelated. Took me a while to figure that out.)

So, you can just tell the template what language translation to use. (It might be a good idea to put some kind of explanation of that on the template's page in a <code><noinclude></code> section or summat.)

The triple-brace construct is [[mw:Manual:Substitution|substitution]], so that if you don't tell it what "lang-XX" is, it uses <code>[[mw:Help:Extension:ParserFunctions#.23titleparts|#titleparts]]</code> to extract it from <code>[[mw:Help:Magic_words#Variables|PAGENAME]]</code>.

So, where-ever that chunk shows up, you can replace it mentally with "lang-XX". Indeed, I'll replace it with just that from here on.

<pre>
<div {{#switch:"lang-XX"|lang-ar|lang-he=dir="rtl"}} style="background:#6abe45; color:white;">
</pre>

The <code>#switch</code> checks for right-to-left languages and sets that as needed. If "lang-XX" matches "<code>lang-ar</code>" or "<code>lang-he</code>" than the function returns <code>dir="rtl"</code>. (The default for <code>dir</code> is left-to-right.) The <code>style=</code> makes the text white on a green background.

<pre>
{{#ifexist:Template:OLPC/"lang-XX" | {{Template:OLPC/"lang-XX"}} | This page is monitored by the OLPC team.}}
</pre>

If a translated text for <code>Template:OLPC</code> that matches the page's language exists, use it. Otherwise, just put in the default version.

The small hiccup of this construct is that for calls of <code>Template:OLPC</code> where <code>trans</code> isn't passed, and <code><nowiki>{{#titleparts: {{PAGENAME}} | 1 | 2 }}</nowiki></code> returns nothing (which is true for any page that isn't a translated sub-page), [[Special:WantedTemplates|the wiki thinks]] somebody is looking for the non-sensical <code>Template:OLPC/</code>.

Which is why I created the page <code>Template:OLPC/</code>. It does nothing but keep <code>OLPC/</code> from showing up on [[Special:WantedTemplates]], but it doesn't hurt anything, either, as far as I know. Plus, it makes my OCD feel all better.

-- [[User:Pi3832|Pi3832]] 21:08, 23 January 2011 (UTC)

Latest revision as of 18:34, 17 June 2011

In my opinion the green was great. It matched the colour scheme used by Diana Fong in the mockup pictures and was the colour of chlorophyll, the colour of plant life. It stood out without being garish. Could you please consider reinstating it?

Being the one who chose the color green for the "Green Machine", I am sympathetic; but I found it really distracting in the context of the wiki. Maybe we can do some more experimenting in the Sandbox in the meanwhile? Walter 02:33, 15 June 2006 (EDT)
There are now some experiments in the Sandbox, at the bottom of the page. Maybe a colour could be chosen, such as red=(a value) green= (a value) blue=(a value) and that could be known as OLPC Green as a colour.
The skin of the wiki is monochrome. The only color is the bit of color used here and their for links. Until (or if) we chnage that and establish a color scheme, introducing color bars is really jarring. I'm happy to work with you to introduce a few color elements that would serve as a foil for adding some color to the page organization, etc., but visually, I think that needs to happen first. Otherwise, we are visually putting too much emphasis on these elements that should be mostly in the background. Walter 07:04, 15 June 2006 (EDT)

Protect this

This template should be protected; otherwise any random user, i.e. me, could vandalize it in any number of irriating ways. Generally, any templates used on protected pages should be protected themselves, unless you want to rely on people not knowing MediaWiki, which might work for a while, but... 71.128.189.182 21:05, 7 February 2007 (EST)

Why the change?

Was there a rationale for eliminating the link to the discussion page? Any reason why this was done without discussion? --Walter 12:24, 13 September 2007 (EDT)

missed this... it was interpreted by a couple of people as an indication that they could not fix changes even when they were obvious. We can find a way to say it that is encouraging and not discouraging. --Sj leave me a message 20:00, 13 January 2008 (EST)

Time to update this...

This template should read "This page monitored by the OLPC team.". The "maintained by" phrasing discourages people from adding useful information to the wiki.

I take your point, but I am not sure of what the proper term we should be using: we try to monitor all the pages, but we are in essence "certifying" the contents of pages with the olpc tag. --Walter 18:06, 19 March 2008 (EDT)
That would be 'monitored'. Monitor is an oversight that provides caution, reminders, and admonishments. I believe you agree 'maintain' is wrong - the OLPC group does not maintain it. 'Certifies' is wrong as the OLPC group does not 'bless' changes in advance. Hmmm... Be reasonable, do it my way. :) CharlesMerriam 03:59, 20 March 2008 (EDT)
I am convinced that monitored is the right choice. Perhaps we should say somewhere that all pages are patrolled? --Walter 09:47, 20 March 2008 (EDT)

Provide localization for this template

It's a bit jarring to see the English text in the header of the translated pages.

Rather than requiring translators to select alternate templates, e.g. {{OLPC/lang-es}}, this template can auto-detect the language by looking for the translation automatically, as I have done for the {{Developers}} template.

While that solution depends on /lang-xx in the page name, for those few cases (e.g. El Wiki de la OLPC) where the page has been renamed and doesn't have that, a translated page can still use a template parameter to override, e.g. {{OLPC | trans=lang-es}}

I would update this template (and similar, like {{Users}}, but alas, they are write protected.

@alex 14:17, 6 June 2008 (EDT)

This is a good point. I like the developers template example... --Sj talk 00:01, 10 June 2008 (EDT)
The protection on this page has been temporarily dialed down to allow registered users to edit (no anon edits, sysop to move). I'll watch this page and if Alex would kindly ping my talk page when the edits are done, I'll dial it back up. Cjl 01:05, 10 June 2008 (EDT)

I've updated this template to a localized form, and improved the handling for RTL languages (arabic, hebrew); however, the Template:User page is still locked down, so I haven't done anything for that.

I've even provided translations for all languages that have a translation of the OLPC Wiki page. About half of these are Google translations, I was able to improve or avoid total nonsense for a number of languages, but these should really be checked by native speakers. However, before this is done, there is an interesting point that was raised in the Template:OLPC/translated page (I've replaced that with a redirect) - which is that the translations are not "maintained" by OLPC. The terminology has changed to "monitored" in any case, but I'm not sure that it's really accurate to say that the translations are even monitored. It might make sense for the translated forms of the templates to use a slightly different wording reflecting this, e.g. instead of

 Esta página está supervisada por el equipo de OLPC.

it might be better to have something like

 Esta página es una traducción manual, el original está supervisada por el equipo de OLPC.

but that's a mouthful as well, and I'm not sure if it is really better. (My choice of Spanish for this example is perhaps not ideal, since if any translations were to be monitored, they would be the ones into Spanish - el segundo idioma de los Estados Unidos - but it makes it easier for you all to follow the difference between the messages, and is easier for me than translating into French or Portuguese.) @alex 16:57, 13 June 2008 (EDT)

removed hack

  

Why I Created "Template:OLPC/"

I spent some time figuring out what this template was doing, so I'd thought I'd write it all down before I forgot, which will probably be in about 2 hours. Oh, and I could be wrong in any number of ways. But here's what I can 'cipher:

This following bit of parser magic gets used three times within the template (I've thrown in some extra spaces for clarity, so, don't copy and paste this and expect it to work), so I'll deal with it first:

{{{trans | {{#titleparts: {{PAGENAME}} | 1 | 2 }} }}}

Here, trans is an optional variable that can be passed to the template, as mentioned above, as {{OLPC | trans=lang-XX }} where the XX is replaced by the appropriate two-letter languange abbreviation. (There is a template on MediaWiki called Trans but that is unrelated. Took me a while to figure that out.)

So, you can just tell the template what language translation to use. (It might be a good idea to put some kind of explanation of that on the template's page in a section or summat.)

The triple-brace construct is substitution, so that if you don't tell it what "lang-XX" is, it uses #titleparts to extract it from PAGENAME.

So, where-ever that chunk shows up, you can replace it mentally with "lang-XX". Indeed, I'll replace it with just that from here on.

<div {{#switch:"lang-XX"|lang-ar|lang-he=dir="rtl"}} style="background:#6abe45; color:white;">

The #switch checks for right-to-left languages and sets that as needed. If "lang-XX" matches "lang-ar" or "lang-he" than the function returns dir="rtl". (The default for dir is left-to-right.) The style= makes the text white on a green background.

{{#ifexist:Template:OLPC/"lang-XX" | {{Template:OLPC/"lang-XX"}} | This page is monitored by the OLPC team.}}

If a translated text for Template:OLPC that matches the page's language exists, use it. Otherwise, just put in the default version.

The small hiccup of this construct is that for calls of Template:OLPC where trans isn't passed, and {{#titleparts: {{PAGENAME}} | 1 | 2 }} returns nothing (which is true for any page that isn't a translated sub-page), the wiki thinks somebody is looking for the non-sensical Template:OLPC/.

Which is why I created the page Template:OLPC/. It does nothing but keep OLPC/ from showing up on Special:WantedTemplates, but it doesn't hurt anything, either, as far as I know. Plus, it makes my OCD feel all better.

-- Pi3832 21:08, 23 January 2011 (UTC)