[Pywikipedia-l] SVN: [5757] trunk/pywikipedia/families/wikipedia_family.py
Stig Meireles Johansen
stigmj at gmail.com
Fri Jul 25 01:54:32 UTC 2008
Not sure if this is what you want to do...
You are saying with this update that:
any:0 can link to en:12, any:1 can link to en:13, pt:102 can link to en:12,
pt:103 can link to en:13, en:104 can link to any:0 and pt:102, en:105 can
link to any:1 and pt:103
The following would allow any:0 to link to en:12, any:1 to link to en:13 as
well as en:12 to link to any:0, and en:13 to link to any:1
self.crossnamespace[0] = {
'_default': {
'en': [12],
}
}
self.crossnamespace[1] = {
'_default': {
'en': [13],
}
}
self.crossnamespace[12] = {
'en': {
'_default': [0],
}
}
self.crossnamespace[13] = {
'en': {
'_default': [0],
}
}
If you want en:104 linking to any:0 and pt:102 as well as en:105 link to
any:1 and pt:103, you can add the following as well:
self.crossnamespace[102] = {
'pt': {
'en': [0, 104],
}
}
self.crossnamespace[103] = {
'pt': {
'en': [1, 105],
}
}
self.crossnamespace[104] = {
'en': {
'_default': [0],
'pt': [0, 102]
}
}
self.crossnamespace[105] = {
'en': {
'_default': [1],
'pt': [1, 103]
}
}
best regards,
Stig Meireles Johansen
On Thu, Jul 24, 2008 at 9:52 PM, <nicdumz at svn.wikimedia.org> wrote:
> Revision: 5757
> Author: nicdumz
> Date: 2008-07-24 19:52:06 +0000 (Thu, 24 Jul 2008)
>
> Log Message:
> -----------
> Adding crossnamespace support to and from en:Help:
> ( see for example http://en.wikipedia.org/wiki/Help:IPA_for_Italian ,
> equivalent of http://it.wikipedia.org/wiki/Fonologia_dell%27italiano and
> http://fr.wikipedia.org/wiki/Alphabet_phon%C3%A9tique_international_pour_l%27italien)
>
> Modified Paths:
> --------------
> trunk/pywikipedia/families/wikipedia_family.py
>
> Modified: trunk/pywikipedia/families/wikipedia_family.py
> ===================================================================
> --- trunk/pywikipedia/families/wikipedia_family.py 2008-07-24 19:48:25
> UTC (rev 5756)
> +++ trunk/pywikipedia/families/wikipedia_family.py 2008-07-24 19:52:06
> UTC (rev 5757)
> @@ -841,24 +841,27 @@
> '_default': {
> 'pt': [102],
> 'als': [104],
> + 'en': [12],
> 'es': [104],
> 'fr': [104],
> - 'lt': [104]
> + 'lt': [104],
> }
> }
> self.crossnamespace[1] = {
> '_default': {
> 'pt': [103],
> 'als': [105],
> + 'en': [13],
> 'es': [105],
> 'fr': [105],
> - 'lt': [105]
> + 'lt': [105],
> }
> }
> self.crossnamespace[102] = {
> 'pt': {
> '_default': [0],
> 'als': [0, 104],
> + 'en': [0, 12],
> 'es': [0, 104],
> 'fr': [0, 104],
> 'lt': [0, 104]
> @@ -869,6 +872,7 @@
> '_default': [1],
> 'als': [1, 105],
> 'es': [1, 105],
> + 'en': [1, 13],
> 'fr': [1, 105],
> 'lt': [1, 105]
> }
> @@ -878,6 +882,10 @@
> '_default': [0],
> 'pt': [0, 102]
> },
> + 'en': {
> + '_default': [0],
> + 'pt': [0, 102]
> + },
> 'es': {
> '_default': [0],
> 'pt': [0, 102]
> @@ -896,6 +904,10 @@
> '_default': [1],
> 'pt': [0, 103]
> },
> + 'en': {
> + '_default': [1],
> + 'pt': [0, 103]
> + },
> 'es': {
> '_default': [1],
> 'pt': [0, 103]
>
>
>
> _______________________________________________
> Pywikipedia-l mailing list
> Pywikipedia-l at lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wikimedia.org/pipermail/pywikipedia-l/attachments/20080725/88954166/attachment.htm
More information about the Pywikipedia-l
mailing list