Page MenuHomePhabricator

Create 'Index' and 'Citation' namespaces on orwiktionary
Closed, ResolvedPublic

Assigned To
Authored By
Sipun
May 8 2015, 9:11 AM
Referenced Files
F166334: citation.png
May 19 2015, 9:26 AM
F164314: mov-en.png
May 13 2015, 10:27 AM
F164316: mov-or.png
May 13 2015, 10:27 AM

Event Timeline

Sipun raised the priority of this task from to Medium.
Sipun updated the task description. (Show Details)
Sipun subscribed.
Sipun set Security to None.
Glaisher renamed this task from Namespace creation to Create 'Index' and 'Citation' namespaces on orwiktionary.May 9 2015, 3:20 PM

@Sipun Could you also provide translations for the matching discussions namespaces?

I see ବ୍ୟବହାରକାରୀ (user) becomes ବ୍ୟବହାରକାରୀଙ୍କ ଆଲୋଚନା (user talk), with an additional ଙ୍କ. I'd rather prefer you provide them than to guess them.

For 'Index' = 'ସୂଚୀ'
'Index talk' = 'ସୂଚୀ ଆଲୋଚନା'
'citations' = 'ଆଧାର'
'citations talk' may not require, its translation will be 'ଆଧାର ଆଲୋଚନା' . In case of 'ବ୍ୟବହାରକାରୀ' (user) it is bit different as he is a living person.

Thank you for the translation. This should be deployed around 15:00-15:30 UTC.

Change 210350 had a related patch set uploaded (by Dereckson):
Namespaces configuration on or.wiktionary

https://gerrit.wikimedia.org/r/210350

Change 210350 merged by jenkins-bot:
Namespaces configuration on or.wiktionary

https://gerrit.wikimedia.org/r/210350

So, we have now extra namespaces, Index and Citation.

Could you check if all works as expected, especially for the Citation namespace?

'ଆଧାର' (citations) and 'ସୂଚୀ' (index) has created. Thanks for this. But here are few issues with Citation namespace. Please see these links:
https://or.wiktionary.org/wiki/test1
https://or.wiktionary.org/wiki/Citations:test1
https://or.wiktionary.org/wiki/Citations:Citations:test1

'Citaions' is not behaving as namespace but its in mainspace
See the pic below, in Odia and in Eng

mov-en.png (850×414 px, 28 KB)

mov-or.png (800×451 px, 41 KB)

I've looked a little bit the script you're using in MediaWiki:Common.js to add this feature.

First, you can translate the values of the tab in the texts array at the top of the script to localize the tabs names and descriptions.

Then, the issue is there are four lines using canonical namespaces names in English:

  • if( wgCanonicalNamespace == 'Citations' ){
  • }else if( wgCanonicalNamespace == '' || wgCanonicalNamespace == 'Talk' ){
  • }else if( wgCanonicalNamespace == 'Template' && /\/doc$/.test(wgTitle) ){
  • }else if( wgCanonicalNamespace == 'Template' || wgCanonicalNamespace == 'Template_talk' ){

The three last lines are totally fine. Any MediaWiki or extension provided namespace could be designated by the english name.

But the Citations namespace isn't defined by MediaWiki, nor an extension. So, its canonical value will be the one requested at creation, here ଆଧାର.

Both on en.wiktionary and or.wiktionary, the 114 has been assigned to Citations: namespace. We could make an informal convention this should be the id of such namespace for Wiktionary projects with this Citations tab system enabled.

According this documentation and this MediaWiki manual page, the numeric identifier of a namespace is wgNamespaceNumber.

I so recommend to change the line:
if( wgCanonicalNamespace == 'Citations' ){
into:
if( wgNamespaceNumber == 114 ){

Or better, into:
wgNamespaceNumber == NS_CITATIONS
and add as the first script line:
var NS_CITATIONS = 114;

Whenever I click on 'citations' tab I can't go back to 'Entry' as not tab is present.

citation.png (224×183 px, 4 KB)