User:Xavi/Test: Difference between revisions

From OLPC
Jump to navigation Jump to search
m (simplifying the inclusions)
m (Walter's rectum 28/Test moved to User:Xavi/Test over redirect: revert)
 
(15 intermediate revisions by 4 users not shown)
Line 1: Line 1:
== OLPC & User boxes ==
This is a subpage (?) of mine... how could it be used... have no clue, and currently no will to search the docs... ;)
{{olpcboxtop}}
{{olpcboxbreak|toptext=Domains}}
{{User teacher}}
{{olpcboxbreak|toptext=[[:Category:Activity|Activities]]}}
{{XO source}}
{{XO source|1=[http://dev.laptop.org/git.do?p=projects/write laptop.org]}}
{{XO source|[http://sugar.abisource.com/ abisource.com]|RPM}}
{{olpcboxbreak|toptext=[[:Category:User languages|Languages]]}}
{{User es}}
{{User en-4}}
{{User fr-2}}
<div class="NavFrame" style="padding:0;border-style:none;">
<div class="NavFrame" style="border-style:none;padding:0;">
<div class="NavHead" style="background:#EDF1F1;text-align:left;text-style:normal">
Hide/Show doesn't work</div><div class="NavContent" style="display:none;">
{{User ru}}
</div></div></div>
{{User pt}}
{{olpcboxbottom}}


; See also : http://en.wikipedia.org/wiki/Wikipedia:Userboxes
: [[Talk:Wiki Page Restructuring Common Room]]
: [[Template talk:XO box]]
The following text generates the boxes on the right... yeah!
{{tl|olpcboxtop}}
{{[[Template:olpcboxbreak|olpcboxbreak]]|toptext=Domains}}
{{tl|User teacher}}
{{[[Template:olpcboxbreak|olpcboxbreak]]|toptext=<nowiki>[[:Category:Activity|Activities]]</nowiki>}}
{{tl|XO source}}
{{[[Template:XO source|XO source]]|1=<nowiki>[http://dev.laptop.org/git.do?p=projects/write laptop.org]</nowiki>}}
{{[[Template:XO source|XO source]]|<nowiki>[http://sugar.abisource.com/ abisource.com]</nowiki>|RPM}}
{{[[Template:olpcboxbreak|olpcboxbreak]]|toptext=<nowiki>[[:Category:User languages|Languages]]</nowiki>}}
{{tl|User es}}
{{tl|User en-4}}
{{tl|User fr-2}}
&lt;div class="NavFrame" style="padding:0;border-style:none;"&gt;
&lt;div class="NavFrame" style="border-style:none;padding:0;"&gt;
&lt;div class="NavHead" style="background:#EDF1F1;text-align:left;text-style:normal"&gt;
Hide/Show doesn't work</div><div class="NavContent" style="display:none;"&gt;
{{tl|User ru}}
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
{{tl|User pt}}
{{tl|olpcboxbottom}}
The basic structure is:

{{tl|olpcboxtop}}
...''boxes''... # You may also add ''breaks'' using {{[[Template:olpcboxbreak|olpcboxbreak]]|toptext=Title}}
{{tl|olpcboxbottom}}

== Geo Data ==

My intention was to have a page with some 'template like paramater data' (ie: [[User:Xavi/Test/GeoData]]) that could be fed (initially) as the parameters of a template (ie: [[User:Xavi/Templates/GeoXOGoogle]]). But even though the basic generation of the 'resulting template generation' (see #7 below) it doesn't actually get evaluated&mdash;#8 below is a manual copy-paste of the template-stitching.

<table border=1 cellspacing=0 style="font-size:60%;">
<tr>
<th colspan="2">Source Wiki Text</th>
<th width=66%>Processed / Results</th>
</tr>
<tr><th width=25px>1</th>
<td><nowiki>{{:User:Xavi/Test/GeoData}}</nowiki></td>
<td>{{:User:Xavi/Test/GeoData}}</td>
</tr>
<tr><th>2</th>
<td><nowiki>{{User:Xavi/Test/GeoData}}</nowiki></td>
<td>{{User:Xavi/Test/GeoData}}</td>
</tr>
<tr><th>3</th>
<td><nowiki>{{:User:Xavi/Templates/GeoXOGoogle {{:User:Xavi/Test/GeoData}}}}</nowiki></td>
<td>{{:User:Xavi/Templates/GeoXOGoogle {{:User:Xavi/Test/GeoData}}}}</td>
</tr>
<tr><th>4</th>
<td><nowiki>{{User:Xavi/Templates/GeoXOGoogle {{:User:Xavi/Test/GeoData}}}}</nowiki></td>
<td>{{User:Xavi/Templates/GeoXOGoogle {{:User:Xavi/Test/GeoData}}}}</td>
</tr>
<tr><th>5</th>
<td><nowiki>{{User:Xavi/Templates/GeoXOGoogle {{User:Xavi/Test/GeoData}}}}</nowiki></td>
<td>{{User:Xavi/Templates/GeoXOGoogle {{User:Xavi/Test/GeoData}}}}</td>
</tr>
<tr><th>6</th>
<td><nowiki>{{User:Xavi/Templates/GeoXOGoogle {{:User:Xavi/Test/GeoData}}}}</nowiki></td>
<td>{{User:Xavi/Templates/GeoXOGoogle {{:User:Xavi/Test/GeoData}}}}</td>
</tr>
<tr>
<tr><th>7</th>
<td><nowiki>{{:User:Xavi/Templates/GeoXOGoogle{{:User:Xavi/Test/GeoData}}}}</nowiki></td>
<td>{{:User:Xavi/Templates/GeoXOGoogle{{:User:Xavi/Test/GeoData}}}}</td>
</tr>
<tr><th>8</th>
<td><nowiki>{{:User:Xavi/Templates/GeoXOGoogle | lat = -34.291 | long = -56.389 | zoom = 10 | type = k | display = Cardal }}</nowiki></td>
<td>{{:User:Xavi/Templates/GeoXOGoogle | lat = -34.291 | long = -56.389 | zoom = 10 | type = k | display = Cardal }}</td>
</tr>
</table>

; Notes : Funny. Now that I remember, the [[Template:Babel-X]] (inspired in Wikipedia's and that didn't work until we enabled the ParserFunctions iirc) does something similar to this...

== June 2007 ==

After the update of the [[wiki]] a piece in the [[Translating]] puzzle has been broken: the use of <tt>&lt;div id="anchor"/&gt;</tt>. A possible solution (provided by Nikerabbit in #mediawiki @ irc.freenode.net) was to switch to <tt>&lt;div id="anchor"&gt;&lt;/div&gt;</tt> &mdash; which I'm testing.

<div id="YNew laptop.org POT files"/>
<div id="XNew laptop.org POT files"></div>
== New laptop.org POT files ==
== New laptop.org POT files ==

The results were positive and the [[PO-laptop.org-en-US]] has been split (thus also the [[PO-laptop.org-es]] translation too). Hopefully it will help translators in their jobs... time will tell :) --[[User:Xavi|Xavi]] 00:18, 2 April 2007 (EDT)

<div id="YThe actual (old) test"/>
<div id="XThe actual (old) test"></div>
=== The actual (old) test ===


Testing an idea for the new round of [[:Category:PO files]]... which happen to have grown quite a bit since the last time, making them not only a bigger effort but also a more complex one when trying to let several people tackle it at the same time due to possible conflicts.
Testing an idea for the new round of [[:Category:PO files]]... which happen to have grown quite a bit since the last time, making them not only a bigger effort but also a more complex one when trying to let several people tackle it at the same time due to possible conflicts.
Line 8: Line 114:
367 13.7 kb [[POT]]
367 13.7 kb [[POT]]
320 15.5 kb [[Es PO]]
320 15.5 kb [[Es PO]]
1144 50.0 kb [[User:Felice/website_copy|New POT]]
1144 50.0 kb <nowiki>[[User:Felice/website_copy|New POT]]</nowiki>
1162 56.2 kb [[User:Felice/website copy/lang-es AR|New Es PO]]
1162 56.2 kb <nowiki>[[User:Felice/website copy/lang-es AR|New Es PO]]</nowiki>


So the idea that I'm playing with is to use subpages for each 'section' of the POT. This will obviously make it more complicated to set up a translation (there will be ''n'' new pages for each translation) but at the same time, translators can focus on separate sub-sections and have more manageable chunks to work on.
So the idea that I'm playing with is to use subpages for each 'section' of the POT. This will obviously make it more complicated to set up a translation (there will be ''n'' new pages for each translation) but at the same time, translators can focus on separate sub-sections and have more manageable chunks to work on.


=== POT test results ===
<div id="YPOT test results"/>
<div id="XPOT test results"></div>
==== POT test results ====


Inclusion seems to work, but...
Inclusion seems to work, but...
Line 26: Line 134:
* the template should leave behind a link to edit (or create) the sub-page holding the translated version...
* the template should leave behind a link to edit (or create) the sub-page holding the translated version...


=== POT proving grounds ===
<div id="YPOT proving grounds"/>
<div id="XPOT proving grounds"></div>
==== POT proving grounds ====


But let's first the base idea to see if it works... then we'll see if it's applicable or useful...
But let's first the base idea to see if it works... then we'll see if it's applicable or useful...



<pre>
<pre>
... tests worked pretty good, no need to keep the ''sample text''...
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: OLPC website files Version 2.0\n"
"POT-Creation-Date: 2007-03-11 12:00-0500\n"
"PO-Revision-Date: 2007-03-11 15:00-0500\n"
"Last-Translator: Xavier Alvarez <xavi.alvarez@gmail.com>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"

msgid "align"
msgstr "left"

msgid "lang"
msgstr "es"

msgid "xml:lang"
msgstr "es"

msgid "olpc"
msgstr "Una Laptop por Chico (OLPC)"

msgid "titletext"
msgstr "una laptop a USD 100 para la educación de los chicos del mundo"

msgid "description"
msgstr "La mayor parte de los casi dos mil millones de chicos en los países en vías de desarrollo carecen de una educación adecuada. Es necesario replantear esta situación. Teniendo en cuenta los recursos que esos países puedan destinar a la educación."

...

msgid "designedby"
msgstr "Diseñado por"

msgid "poweredby"
msgstr "Corriendo sobre"

</pre>
</pre>
{{/vision.html}}
{{/mission.html}}

Latest revision as of 15:30, 20 December 2009

OLPC & User boxes

Domains
Nuvola apps edu miscellaneous.png This user is a teacher.

Template:XO source Template:XO source Template:XO source

es Castellano es la lengua materna de este usuario
en-4 This user speaks English at a near-native level.
fr-2 Cet utilisateur peut contribuer avec un niveau intermédiaire en français.
pt Este usuário é um falante nativo do português.
See also
http://en.wikipedia.org/wiki/Wikipedia:Userboxes
Talk:Wiki Page Restructuring Common Room
Template talk:XO box

The following text generates the boxes on the right... yeah!

{{olpcboxtop}}
{{olpcboxbreak|toptext=Domains}}
{{User teacher}}
{{olpcboxbreak|toptext=[[:Category:Activity|Activities]]}}
{{XO source}}
{{XO source|1=[http://dev.laptop.org/git.do?p=projects/write laptop.org]}}
{{XO source|[http://sugar.abisource.com/ abisource.com]|RPM}}
{{olpcboxbreak|toptext=[[:Category:User languages|Languages]]}}
{{User es}}
{{User en-4}}
{{User fr-2}}
<div class="NavFrame" style="padding:0;border-style:none;">
<div class="NavFrame" style="border-style:none;padding:0;">
<div class="NavHead" style="background:#EDF1F1;text-align:left;text-style:normal">

Hide/Show doesn't work<div class="NavContent" style="display:none;">

{{User ru}}
</div></div></div>
{{User pt}}
{{olpcboxbottom}}

The basic structure is:

{{olpcboxtop}}
...boxes...        # You may also add breaks using {{olpcboxbreak|toptext=Title}}
{{olpcboxbottom}}

Geo Data

My intention was to have a page with some 'template like paramater data' (ie: User:Xavi/Test/GeoData) that could be fed (initially) as the parameters of a template (ie: User:Xavi/Templates/GeoXOGoogle). But even though the basic generation of the 'resulting template generation' (see #7 below) it doesn't actually get evaluated—#8 below is a manual copy-paste of the template-stitching.

Source Wiki Text Processed / Results
1 {{:User:Xavi/Test/GeoData}} User:Xavi/Test/GeoData
2 {{User:Xavi/Test/GeoData}} User:Xavi/Test/GeoData
3 {{:User:Xavi/Templates/GeoXOGoogle {{:User:Xavi/Test/GeoData}}}} {{:User:Xavi/Templates/GeoXOGoogle User:Xavi/Test/GeoData}}
4 {{User:Xavi/Templates/GeoXOGoogle {{:User:Xavi/Test/GeoData}}}} {{User:Xavi/Templates/GeoXOGoogle User:Xavi/Test/GeoData}}
5 {{User:Xavi/Templates/GeoXOGoogle {{User:Xavi/Test/GeoData}}}} {{User:Xavi/Templates/GeoXOGoogle User:Xavi/Test/GeoData}}
6 {{User:Xavi/Templates/GeoXOGoogle {{:User:Xavi/Test/GeoData}}}} {{User:Xavi/Templates/GeoXOGoogle User:Xavi/Test/GeoData}}
7 {{:User:Xavi/Templates/GeoXOGoogle{{:User:Xavi/Test/GeoData}}}} {{:User:Xavi/Templates/GeoXOGoogleUser:Xavi/Test/GeoData}}
8 {{:User:Xavi/Templates/GeoXOGoogle | lat = -34.291 | long = -56.389 | zoom = 10 | type = k | display = Cardal }} Cardal
Notes
Funny. Now that I remember, the Template:Babel-X (inspired in Wikipedia's and that didn't work until we enabled the ParserFunctions iirc) does something similar to this...

June 2007

After the update of the wiki a piece in the Translating puzzle has been broken: the use of <div id="anchor"/>. A possible solution (provided by Nikerabbit in #mediawiki @ irc.freenode.net) was to switch to <div id="anchor"></div> — which I'm testing.

New laptop.org POT files

The results were positive and the PO-laptop.org-en-US has been split (thus also the PO-laptop.org-es translation too). Hopefully it will help translators in their jobs... time will tell :) --Xavi 00:18, 2 April 2007 (EDT)

The actual (old) test

Testing an idea for the new round of Category:PO files... which happen to have grown quite a bit since the last time, making them not only a bigger effort but also a more complex one when trying to let several people tackle it at the same time due to possible conflicts.

 lines   size    POT file
   367  13.7 kb  POT
   320  15.5 kb  Es PO
  1144  50.0 kb  [[User:Felice/website_copy|New POT]]
  1162  56.2 kb  [[User:Felice/website copy/lang-es AR|New Es PO]]

So the idea that I'm playing with is to use subpages for each 'section' of the POT. This will obviously make it more complicated to set up a translation (there will be n new pages for each translation) but at the same time, translators can focus on separate sub-sections and have more manageable chunks to work on.

POT test results

Inclusion seems to work, but...

  • Included sub-pages have the <pre></pre> tags in them (mainly for aesthetics while editing that sub-page - haven't tried without them and see what they look like)
  • Comments (lines starting with # risk being converted into numbered-bullets by the wiki. This could be a major mangling risk.
    • The <pre></pre> are very delicate, a missing CR could create quite a bit of mess... so they should be in a line by themselves (is this obvious?)
    • If all sections are handled by sub-pages, most of the <pre></pre> are eliminated, leaving behind a compact set of template inclusions.

Possible extensions could be:

  • make a template that includes the original (english) sub-page by default, else the specified translation
    • this would allow to have the complete POT file for any language by just creating the central page that invokes the template with all the default (non-translated / original) sub-pages.
  • the template should leave behind a link to edit (or create) the sub-page holding the translated version...

POT proving grounds

But let's first the base idea to see if it works... then we'll see if it's applicable or useful...

... tests worked pretty good, no need to keep the ''sample text''...