Metmaacher:Purodha/InterBabel/Documentation
General Ändere
This is all about generating Babel stuff for various Wikipedias. Use Special:ExpandTemplates in order to have it generated.
Inputs Ändere
Choose and copy one of the two template invocation blocks below:
Babel page source | Interwiki hint file | ||||
---|---|---|---|---|---|
{{Metmaacher:Purodha/InterBabel/page |wiki= |page= |iso639-1= |iso639-2= |iso639-2B= |iso639-2T= |iso639-3= |wmf-xlc= |lvl= }} |
{{Metmaacher:Purodha/InterBabel/page |page= |iso639-1= |iso639-2= |iso639-2B= |iso639-2T= |iso639-3= |wmf-xlc= |lvl= }} |
and paste it into the field labelled Wat De üvverpröfe wells:
Fill the named parameter values in. Check the fields:
De ėnner Kommentare fottloohße
Donn de <nowiki>-Befähle ongerdröcke en dämm, wadd_eruß kütt
Other fields are insignificant.
Currenty, the iso639-2
values are used only if neither of wmf-xlc
or iso639-1
or iso639-3
are specified.
Parameters are described below.
Additionally, a list of ISO 639 language codes and a list of MediaWiki/WikiMedia interwiki and language codes may help.
Outputs Ändere
What you get should be either the source code of a Babel page, or an interwiki hint file of such a page, or one or more error messages. The latter may be telling that something was missing or something went wrong.
If there are red links inside the generated data, ….
Wiki Pages Ändere
You must carefully check generated pages before uploading them. There is no guarantee for them to be correct, or to remain correct. Also, check the target wiki for more recent local templates. Chances are that generated pages should be adjusted to the current state of affairs for the target wiki.
Wiki pages start with a comment line giving the full page name inthe target wiki. It can be copied and pasted into the target wiki so as to get the right page. This line can, but need not, be pasted to the target wiki with the rest of the generated wiki page.
Interwiki Hint Files Ändere
Errors in pywikipediabot
interwiki hint files are usually not critical. Even if there are none, interwiki.py
is likely to emit some error messages such as commons
and few others not being valid language codes in the wikipedia
family of wikis. Hint files are made for maximum coverage and include some planned future links. Many wikis may not (yet) have the linked pages. All these things are not a problem. They are sorted out by interwiki.py
automatically.
There is no provision to include the complete hint data in an interwiki.py
command, since almost all operating systems do not allow commands lines of sufficient length.
Template Calls, Parameters, Semantics Ändere
Parameters Ändere
Common parameters are:
|base={{{base}}}
| |||||||||||
|wiki=
|
— | Interwiki language code for target wikipedia, or und for unspecified.
| |||||||||
|page=
|
— | cat , tpl , smp , the kind of page to be generated.
| |||||||||
|iso639-1=
|
— | The ISO 639-1 two-letter code of the language, for which a page is to be generated. Must be empty or omitted if no such code exists. | |||||||||
|iso639-2=
|
— | The ISO 639-2 three-letter code of the language, for which a page is to be generated. Must be empty or omitted, if no such code exists, or if the bibliographic code and the terminologic code according to ISO 639-2 are unequal. Most often, it is equal to the ISO 639-3 code for the language. This code is very rarely used in the InterBabel system. | |||||||||
|iso639-2B=
|
— | The ISO 639-2 three-letter bibliographic code of the language, for which a page is to be generated. Must be empty or omitted, if no such code exists. It is most often equal to the ISO 639-3 code for the language, but there are some 15 exceptions. This code is very rarely used in the InterBabel system. | |||||||||
|iso639-2T=
|
— | The ISO 639-2 three-letter terminology code of the language, for which a page is to be generated. Must be empty or omitted, if no such code exists. It is almost always equal to the ISO 639-3 code for the language. This code is very rarely used in the InterBabel system. | |||||||||
|iso639-3=
|
— | The ISO 639-3 three-letter code of the language, for which a page is to be generated. To be empty or omitted if no such code exists. | |||||||||
|wmf-xlc=
|
— | The interwiki link code used by the WikiMedia/MediaWiki software specifying the language, for which a page is to be generated, provided, the code is not one of the ISO 639 codes mentioned before. Otherwise empty, or to be omitted. | |||||||||
|lvl=
|
— | Skill level, for which the page is to be generated. May be one of:
| |||||||||
|lang=
|
— | An ISO 639-1 or ISO 629-3 or ISO 639-2 language code, or an interwiki link code used by the WikiMedia/MediaWiki software, usually specifying a language, the name of which is to be generated. | |||||||||
|this=
|
— | An interwiki link code used by MediaWiki, specifying the language, the interwiki link to which is to be generated. |
Special parameters are:
Parameters for the Babel template page templates are generated via {{babel-lang-text-***| }}
template calls. So numbered parameters 0 to 9, and 00 to 99 are available. The only other, named, parameters are:
|base={{{base}}}
| ||||||||
|wiki=
|
— | Interwiki language code for target wikipedia, or und for unspecified.
| ||||||
|lvl=
|
— | Skill level, for which the template page is to be generated. May be one of:
| ||||||
|pos=
|
— | a position in the numbered parameter array corresponding to {{{lvl}}} being one of:
|
Templates Ändere
Pages Ändere
page — page in wiki Ändere
{{ {{{base}}}/page |base= |wiki= |page= |lang= |iso639-1= |iso639-2= |iso639-2B= |iso639-2T= |iso639-3= |wmf-xlc= |lvl= |}}
A page in wiki.
page/tpl — template page Ändere
{{ {{{base}}}/page/tpl |base= |wiki= |page= |lang= |iso639-1= |iso639-2= |iso639-2B= |iso639-2T= |iso639-3= |wmf-xlc= |lvl= |}}
A Babel template page in wiki.
page/cat — category page Ändere
{{ {{{base}}}/page/cat |base= |wiki= |page= |lang= |iso639-1= |iso639-2= |iso639-2B= |iso639-2T= |iso639-3= |wmf-xlc= |lvl= |}}
A category page in wiki.
page/smp — sample page Ändere
{{ {{{base}}}/page/smp |base= |wiki= |page= |lang= |iso639-1= |iso639-2= |iso639-2B= |iso639-2T= |iso639-3= |wmf-xlc= |lvl= |}}
A Babel sample page in wiki.
page/tpl/{{{wiki}}}
— template page
Ändere
{{ {{{base}}}/page/tpl/{{{wiki}}} |base= |lang= |iso639-1= |iso639-2= |iso639-2B= |iso639-2T= |iso639-3= |wmf-xlc= |lvl= |}}
A Babel template page in wiki
page/cat/{{{wiki}}}
— category page
Ändere
{{ {{{base}}}/page/cat/{{{wiki}}} |base= |lang= |iso639-1= |iso639-2= |iso639-2B= |iso639-2T= |iso639-3= |wmf-xlc= |lvl= |}}
A Babel category page in wiki
page/smp/{{{wiki}}}
— sample page
Ändere
{{ {{{base}}}/page/smp/{{{wiki}}} |base= |lang= |iso639-1= |iso639-2= |iso639-2B= |iso639-2T= |iso639-3= |wmf-xlc= |lvl= |}}
A Babel sample page in wiki
Hint Files Ändere
hint — hint file Ändere
{{ {{{base}}}/hint |base= |page= |lang= |iso639-1= |iso639-2= |iso639-2B= |iso639-2T= |iso639-3= |wmf-xlc= |lvl= |}}
An interwiki hint file for a Babel page. To be used with pywikipediabot.
hint/tpl — template hint file Ändere
{{ {{{base}}}/hint/tpl |base= |page= |lang= |iso639-1= |iso639-2= |iso639-2B= |iso639-2T= |iso639-3= |wmf-xlc= |lvl= |}}
An interwiki hint file for a Babel template page. To be used with pywikipediabot.
hint/cat — category hint file Ändere
{{ {{{base}}}/hint/cat |base= |page= |lang= |iso639-1= |iso639-2= |iso639-2B= |iso639-2T= |iso639-3= |wmf-xlc= |lvl= |}}
An interwiki hint file for a Babel category page. To be used with pywikipediabot.
hint/smp — sample hint file Ändere
{{ {{{base}}}/hint/smp |base= |page= |lang= |iso639-1= |iso639-2= |iso639-2B= |iso639-2T= |iso639-3= |wmf-xlc= |lvl= |}}
An interwiki hint file for a Babel sample page. To be used with pywikipediabot.
Interwiki Links Ändere
iwl/1 — a conditional interwiki link Ändere
iwl/* — all interwiki links Ändere
{{ {{{base}}}/iwl/* |base= |wiki= |page= |lang= |iso639-1= |iso639-2= |iso639-2B= |iso639-2T= |iso639-3= |wmf-xlc= |lvl= |}}
Each possible interwikilink of page in wiki
iwl — one interwikilink Ändere
{{ {{{base}}}/iwl |base= |this= |wiki= |page= |lang= |iso639-1= |iso639-2= |iso639-2B= |iso639-2T= |iso639-3= |wmf-xlc= |lvl= |}}
The interwikilink of page in wiki to this
iwl/tpl — one template page interwikilink Ändere
{{ {{{base}}}/iwl/tpl |base= |this= |wiki= |page= |lang= |iso639-1= |iso639-2= |iso639-2B= |iso639-2T= |iso639-3= |wmf-xlc= |lvl= |}}
The interwikilink of a template page in wiki to this
iwl/cat — one category page interwikilink Ändere
{{ {{{base}}}/iwl/cat |base= |this= |wiki= |page= |lang= |iso639-1= |iso639-2= |iso639-2B= |iso639-2T= |iso639-3= |wmf-xlc= |lvl= |}}
The interwikilink of a catgory page in wiki to this
iwl/smp — one sample page interwikilink Ändere
{{ {{{base}}}/iwl/smp |base= |this= |wiki= |page= |lang= |iso639-1= |iso639-2= |iso639-2B= |iso639-2T= |iso639-3= |wmf-xlc= |lvl= |}}
The interwikilink of a sample page in wiki to this
Namespaces Names Ändere
ns — a namespace name Ändere
{{ {{{base}}}/ns |base= |wiki= |page= |}}
A namespace name in wiki.
ns/tpl — a template namespace name Ändere
{{ {{{base}}}/ns/tpl |base= |wiki= |}}
The template namespace name in wiki.
ns/cat — a category namespace name Ändere
{{ {{{base}}}/ns/cat |base= |wiki= |}}
The category namespace name in wiki.
ns/smp — a sample namespace name Ändere
{{ {{{base}}}/ns/smp |base= |wiki= |}}
The sample namespace name in wiki.
ns/tpl/{{{wiki}}}
— the template namespace name in wiki
Ändere
{{ {{{base}}}/ns/tpl/{{{wiki}}} |base= |}}
The template namespace name in wiki.
ns/cat/{{{wiki}}}
— the category namespace name in wiki
Ändere
{{ {{{base}}}/ns/cat/{{{wiki}}} |base= |}}
The category namespace name in wiki.
ns/smp/{{{wiki}}}
— the sample namespace name in wiki
Ändere
{{ {{{base}}}/ns/smp/{{{wiki}}} |base= |}}
The sample namespace name in wiki.
Template Names Ändere
tpl — template page name Ändere
{{ {{{base}}}/cat |base= |wiki= |page= |lang= |iso639-1= |iso639-2= |iso639-2B= |iso639-2T= |iso639-3= |wmf-xlc= |lvl= |}}
A category page name in wiki.
tpl/{{{wiki}}}
- template page name in a wiki
Ändere
{{ {{{base}}}/tpl/{{{wiki}}} |base= |this= |wiki= |lang= |iso639-1= |iso639-2= |iso639-2B= |iso639-2T= |iso639-3= |wmf-xlc= |lvl= |}}
A template page name in wiki.
Category Names Ändere
cat — category page name Ändere
{{ {{{base}}}/cat |base= |wiki= |page= |lang= |iso639-1= |iso639-2= |iso639-2B= |iso639-2T= |iso639-3= |wmf-xlc= |lvl= |}}
A category page name in wiki.
cat/{{{wiki}}}
- category page name in a wiki
Ändere
{{ {{{base}}}/cat/{{{wiki}}} |base= |this= |wiki= |lang= |iso639-1= |iso639-2= |iso639-2B= |iso639-2T= |iso639-3= |wmf-xlc= |lvl= |}}
A category page name in wiki.
Purodha/InterBabel/cat U1Ltecht Purodha/InterBabel/cat UL techt Purodha/InterBabel/cat cat Purodha/InterBabel/cat none Purodha/InterBabel/cat root Purodha/InterBabel/cat text1L Purodha/InterBabel/cat text 1L Purodha/InterBabel/cat text 3L Purodha/InterBabel/cat text NL
Sample Page Names Ändere
smp — sample page name Ändere
Metmaacher:Purodha/InterBabel/smp/
smp/{{{wiki}}}
- sample page name in a wiki
Ändere
{{ {{{base}}}/smp/{{{wiki}}} |base= |this= |wiki= |lang= |iso639-1= |iso639-2= |iso639-2B= |iso639-2T= |iso639-3= |wmf-xlc= |lvl= |}}
A sample page name in wiki.
Other Ändere
ns/{{{wiki}}}
- a namespace name in {{{wiki}}}
Ändere
{{ {{{base}}}/ns |base= |wiki= |page= |}}
A namespace name in wiki.
Other / Incomplete Ändere
iwl - Ändere
iwl/{{{wiki}}} - Ändere
Purodha/InterBabel/key Purodha/InterBabel/key/{Schablon:Wiki Purodha/InterBabel/key 012345A Purodha/InterBabel/key 012345D Purodha/InterBabel/key 012345M Purodha/InterBabel/key 012345N Purodha/InterBabel/key iso1-3 SP012345N Purodha/InterBabel/key iso3 SP012345N Purodha/InterBabel/key none
Language Name Ändere
Purodha/InterBabel/lang Purodha/InterBabel/lang/{{{wiki}}}
/lvl /lvl/{{{wiki}}}
Purodha/InterBabel/lvl 012345A Purodha/InterBabel/lvl 012345B Purodha/InterBabel/lvl 012345D Purodha/InterBabel/lvl 012345L Purodha/InterBabel/lvl 012345M Purodha/InterBabel/lvl 012345N Purodha/InterBabel/lvl 012345T Purodha/InterBabel/lvl 012345 - Purodha/InterBabel/lvl 012345n Purodha/InterBabel/lvl 012345მ
Purodha/InterBabel/name cat root
Purodha/InterBabel/page/iwl/ Purodha/InterBabel/page/iwl/*
Purodha/InterBabel/page/smp Purodha/InterBabel/page/smp/ Purodha/InterBabel/page/smp/ksh Purodha/InterBabel/page/smp/und Purodha/InterBabel/page/tpl Purodha/InterBabel/page/tpl/ Purodha/InterBabel/page/tpl/bjn Purodha/InterBabel/page/tpl/bxr Purodha/InterBabel/page/tpl/en Purodha/InterBabel/page/tpl/eo Purodha/InterBabel/page/tpl/fy Purodha/InterBabel/page/tpl/kaa Purodha/InterBabel/page/tpl/ko Purodha/InterBabel/page/tpl/vo Purodha/InterBabel/page/tpl/wa Purodha/InterBabel/page/tpl iwl Purodha/InterBabel/text/ Purodha/InterBabel/text/eng Purodha/InterBabel/ttx Purodha/InterBabel/ttx/
iwl/smp - one sample page interwikilink Ändere
{{ {{{base}}}/iwl/smp |base= |this= |wiki= |page= |lang= |iso639-1= |iso639-2= |iso639-2B= |iso639-2T= |iso639-3= |wmf-xlc= |lvl= |}}
The interwikilink of a sample page in wiki to this
iwl/smp - one sample page interwikilink Ändere
{{ {{{base}}}/iwl/smp |base= |this= |wiki= |page= |lang= |iso639-1= |iso639-2= |iso639-2B= |iso639-2T= |iso639-3= |wmf-xlc= |lvl= |}}
The interwikilink of a sample page in wiki to this
iwl - one interwikilink Ändere
{{ {{{base}}}/iwl |base= |this= |wiki= |page= |lang= |iso639-1= |iso639-2= |iso639-2B= |iso639-2T= |iso639-3= |wmf-xlc= |lvl= |}}
One possible interwikilink of page in wiki if not this
{{{base}}}/page Ändere
{{ {{{base}}}/iwl |base= |this= |wiki= |page= |lang= |iso639-1= |iso639-2= |iso639-2B= |iso639-2T= |iso639-3= |wmf-xlc= |lvl= |}}
{{{base}}}/iwl
Ändere
{{ {{{base}}}/iwl |base= |this= |wiki= |page= |lang= |iso639-1= |iso639-2= |iso639-2B= |iso639-2T= |iso639-3= |wmf-xlc= |lvl= |}}
Maintenance Ändere
Adding a New Language Ändere
Adding another language, you must know at least one language code for the langage, and create a template for it. Say, the new code was qrs
, then open the temple Babel-lang-text-zxx
for editing, copy its contents and paste it into a new template named Babel-lang-text-qrs
. Before saving, check and/or ajust all parameters. Delete the comment block at the end of the template if you are done.
Note that parameter values passed with a an equals sign have whitespace surrounding them stripped, while positional parameters keep theirs.
Parameters inside Babel-lang-text-???
templates
Ändere
Here is a quick rundown of the parameters:
0…9 — Message text elements for native level, see below.
00…09 — Message text elements for skill level zero, see below.
10…19 — Message text elements for skill level 1, see below.
20…29 — Message text elements for skill level 2, see below.
30…39 — Message text elements for skill level 3, see below.
40…49 — Message text elements for skill level 4, see below.
50…59 — Message text elements for skill level 5, see below.
94 — Sort key value derived from parameter 99 (may be empty for InterBabel)
95 — Name of the language in the language itself.
96 — Latin transcription of parameter 95 (may be empty if parameter 95 is using a Latin script)
97 — rtl, if script runs from right to left, ltr or empty if script runs from left to right.
98 — The language code.
99 — Ripuarian name of the language, or language code if unknown.
Text element parameters Ändere
There are ten parameters each per message, numbered here from X0 to X9 (see above) many of which can be empty or contain just a space character. Elements X0, X2, X3, X5, X6, X7 are concatenated in this order, forming the message text in the language. Thus having proper spaces at the end of X0, the end plus the beginning of X3, and at the beginning of X7 is crucial for most languages. X2 and X4 indicate what the elements following them link to, if the target wiki has such links at all. A value of 8 says that a language denominator follows and the link should go to the category of all users of that language, while 0 (=no knowledge), 1, 2, 3, 4, 5, 9 (=native) indicate a skill level, the link should go the appropriate category. One of X2 and x4 must be 8, while the other must indicate a skill level.
X0 — Initial piece of text in the message. May be empty.
X1 — Link target indicator for the 2nd piece in the message. Must be either of 0, 1, 2, 3, 4, 5, 9, or 8.
X2 — Link anchor text for second piece of message. Must not have leading or trailing whitespace.
X3 — Third piece of message.
X4 — Link target indicator for the 4th piece in the message. Must be either of 0, 1, 2, 3, 4, 5, 9, or 8.
X5 — Link anchor text for fourth piece of message. Must not have leading or trailing whitespace.
X6 — Fifth and final piece of the message.
X7 — Reserved for future use. Must be 7.
X8 — Reserved for future use. Must be empty.
X9 — Reserved for future use. Should be empty.
Translated Language Names Ändere
…
Adding a Language Code Ändere
Adding another language code for a language is simply accomplished by copying contents of an existing template Babel-lang-text-???
of the language to the template with the new code, and adjust the language code (parameter 98
) towards the end of the template.
Translated Language Names Ändere
…
Adding a Wiki Ändere
So as to be able to add another wiki, the wiki language and all its language codes must have been added. …
Names Ändere
…
Namespace Names Ändere
Most often, a wiki can do with generic namespace names. Nothing needs to be done for them, although using localized namespace names does not hurt. So as to set a namespace name for a wiki, for:
- template pages: — generic name:
Template
— edit ns/tpl/zxx - category pages: — generic name:
Category
— edit { {:{{#xxxxx:2}}/Documentation/edit|ns/cat/}} - sample pages: — generic name:
Project
— smp
Just enter the local namespace name without any colons. Letter case is irrelevant.
Language Names Ändere
…
Skill Levels Ändere
…
Category Names Ändere
…
Template Names Ändere
…
Sample Page Names Ändere
…
Category Page Contents Ändere
…
Template Page Contents Ändere
…
Sample Page Contents Ändere
…
Interwiki Links Ändere
…
Handling Changes Ändere
Whether you detect a typing error, or a wiki changes the pattern of naming something, let yourself guide to the appropriate template or templates by the informations presented above. With yout changes, existing templates may become obsolete and unused. If so, do mark them with {{delete}}
at their beginnings, type a sentence or two giving the reason just behind it, and 'sign' with --~~~~
so as to not leave unnecessary debris behind. But beware, you cannot rely on Special:WhatLinksHere in such cases. If you are unsure about general use, but know that a template went out of use for your case, note that on the templates talk page. Someone else will take care.