Mailing List Archive

namespace names vs interlanguage links
Hi,

I've recently discovered that namespace names may have an ambiguity with
interlanguage links: If a namespace name is the same as a language code,
using it in wikitext poses all kinds of challenges.

Actual example: In the Tyap language (code kcg), the Wikipedia in which was
created a few days ago, the Category namespace is called "Sa:", which is
also the language code and, hence, the interlanguage link code for Sanskrit.

So, "Sa" is usable in wikitext, but has all kinds of little issues. For
example, old-style non-Wikidata interlanguage links to Sanskrit from the
Tyap Wikipedia are probably impossible. They are not very likely to be
inserted into articles, but still, it's somewhat conceivable. I also
noticed that it confuses Pywikibot in some ways. And I can imagine other
subtle bugs that it will cause.

I've asked Tyap speakers whether it's possible to change the word for
"Category" to something else. No—they want to use "Sa". It's legitimate not
to want to change the word for a technical reason.

So what can be done?

The editors there told me that it's OK for them to use "[[Category:" in
wikitext, but they would like to see "Sa:" in the title of category pages.
I'm not sure that it's possible: as far as I know, the namespace name
definition in MessagesKcg.php will be used for both things, and if Visual
editor is used to add categories, it will add "[[Sa:". Bots or gadgets can
be used to replace it to "Category", but is looks like an ugly hack.

Does anyone have better ideas for a robust, comprehensive solution?

--
Amir Elisha Aharoni · ?????? ????????? ??????????
http://aharoni.wordpress.com
?“We're living in pieces,
I want to live in peace.” – T. Moore?
Re: namespace names vs interlanguage links [ In reply to ]
Namespace names identical to interwiki links should work, with the
namespace taking precedence. It may be surprising, but this is a
well-tested feature: we have a 'wikipedia:' interwiki link defined on
all wikis, and a 'Wikipedia' namespace on many of them, and everything
works fine. (Although you lose the ability to use that interwiki, but
it's also available as 'w:'.)

In this case you have an interlanguage interwiki link, which may
complicate things somewhat, but it *should* also work. (You do lose the
ability to have old-style interlanguage links, since you can't just use
another alias, but hopefully this is a minor issue.)

If you document specific issues, I think folks would be willing to fix them.

--
Bartosz Dziewo?ski
_______________________________________________
Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org
To unsubscribe send an email to wikitech-l-leave@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/
Re: namespace names vs interlanguage links [ In reply to ]
Amir,

In Romanian, this kind of possible, but highly unlikely problem is called
"drob de sare" (salt stone). I'll let you use your language skills to find
out why :)

Let the community be and find their own ways to deal with the problem, if
it ever becomes a real one. If one really wants to link to the sanskrit
Wikipedia, it can do so using [[:w:sa:...]]. Bugs in Pwb can be solved if
you log them - but does Tyap has any robots today?

No need to have users in a new language write in English just because some
problems might occur in certain very particular scenarios.

My 2c,
Andrei

Pe sâmb?t?, 4 iunie 2022, Amir E. Aharoni <amir.aharoni@mail.huji.ac.il> a
scris:
> Hi,
> I've recently discovered that namespace names may have an ambiguity with
interlanguage links: If a namespace name is the same as a language code,
using it in wikitext poses all kinds of challenges.
> Actual example: In the Tyap language (code kcg), the Wikipedia in which
was created a few days ago, the Category namespace is called "Sa:", which
is also the language code and, hence, the interlanguage link code for
Sanskrit.
> So, "Sa" is usable in wikitext, but has all kinds of little issues. For
example, old-style non-Wikidata interlanguage links to Sanskrit from the
Tyap Wikipedia are probably impossible. They are not very likely to be
inserted into articles, but still, it's somewhat conceivable. I also
noticed that it confuses Pywikibot in some ways. And I can imagine other
subtle bugs that it will cause.
> I've asked Tyap speakers whether it's possible to change the word for
"Category" to something else. No—they want to use "Sa". It's legitimate not
to want to change the word for a technical reason.
> So what can be done?
> The editors there told me that it's OK for them to use "[[Category:" in
wikitext, but they would like to see "Sa:" in the title of category pages.
I'm not sure that it's possible: as far as I know, the namespace name
definition in MessagesKcg.php will be used for both things, and if Visual
editor is used to add categories, it will add "[[Sa:". Bots or gadgets can
be used to replace it to "Category", but is looks like an ugly hack.
> Does anyone have better ideas for a robust, comprehensive solution?
>
> --
> Amir Elisha Aharoni · ?????? ????????? ??????????
> http://aharoni.wordpress.com
> ?“We're living in pieces,
> I want to live in peace.” – T. Moore?