#609 Wiki i18n/l10n Setup
Closed: Fixed None Opened 15 years ago by nigelj.

Since Mediawiki isn't MoinMoin, we need a different way to do i18n/l10n, this would mean setting up separate wiki's, this needs to be coordinated etc which I'm happy to do.

Steps that I can see that we need to do is:
* Decide on path locations for language wikis (see below)
* Get interwiki sorted out
* Database schemas (economies of scale) - http://www.mediawiki.org/wiki/Image:Mediawiki-database-schema.png looks helpful, should be able to 'create view' the interwiki table at the view least!
* Setup locations, htaccess/apache configs

{{{
14:35 < mmcgrath> well lang.fp.o got a firm "no" last I asked. Well, actually
a firm "not right now"
14:36 < ianweller> mmcgrath: so does the other url setup work for you?
14:37 < mmcgrath> yeah
14:37 < mmcgrath> do we want /en/wiki/ or /wiki/en/
14:37 < mmcgrath> I suppose we already have the /en/ convention
14:37 < G> I like en/wiki
14:38 < G> fp.o -> fp.o/en/
14:38 < G> fp.o/wiki -> fp.o/en/wiki
14:38 < G> de.fp.o -> fp.o/de etc
}}}


Personally, I can't believe I could do it so quickly...

Features/Whizbangs:
* 1016K for 4 wikis! (72K of which is an image)
* Images on 'en' can be used on other wikis without reuploading
* Interwikis work perfectly and are always synced between wikis
* Inter-language links display correctly on the sidebar
* Estimate < 1 hour 'downtime' on the current wiki to allow for new script path etc, other wikis can be added just like that.

I think the /xx/w/skins/ folder in htaccess can be all pointed to a common folder...

Configs are on publictest1:

  • /etc/httpd/conf.d/njwiki.conf
  • /var/www/njwiki/xx/LocalSettings.php

I give this about a +10!

Just a slight update, I've made a couple of changes, common settings are now at {{{/var/www/njwiki/common.php}}}, HNP etc works okay so everything seems to be fine for implementation. (I like it this way too but a more suitable location may be /etc/wiki.common.php or something.

My only comment would be, that before we setup any alternative language interwikis, https://fedoraproject.org/wiki/MediaWiki:Sidebar and the Main_Page is 'translated'.

Thoughts?

Some extra pages to add to the "required before doing a new wiki", would include:
* Overview
* Objectives
* Projects
* SIGs
and possibly stuff like ForbiddenItems, Infrastructure/AccountSystem, L10N and L10N/Join.

Maybe even add the requirement that the static site should be translated and published before going ahead with adding a language-specific wiki (just to be sure).

Replying to [comment:3 couf]:

Some extra pages to add to the "required before doing a new wiki", would include:
* Overview
* Objectives
* Projects
* SIGs
and possibly stuff like ForbiddenItems, Infrastructure/AccountSystem, L10N and L10N/Join.
+1, although making AccountSystem on the root of the wiki namespace would most likely be better (split off the Infrastructure specific stuff otherwise you could argue that 'Infrastructure' should be translated)

Maybe even add the requirement that the static site should be translated and published before going ahead with adding a language-specific wiki (just to be sure).
Yes, I guess I wasn't implicit enough on that view :)


Anyway, an update I've been playing with puppet and publictest10 and it works (surprise, surprise).

fr wiki has it's own image stash, but if it can't find an image it will turn to en for help locating it. HNP works, Shared Interwikis work, I can't think of much more that needs doing.

I need to clean up my addwiki process and then post the code for peer review :) and then I think we are well on the way!

There would need to be a slight migration window where I think it'd be best to say to folks "look the wiki is going to be down for XX00 UTC to XX00+1 UTC as we are making these changes" just in case something goes wrong (I hope not), in addition, depending on the timing it might be an idea/possible to perform the changes during the db1 switch over.

Small update:

It's nearly ready, I want to sort out a couple of policy things etc but we are basically there.

I'll be taking a discussion to the translation list soon with what needs to be done now for furthur discussion.

Nigel, is there an update on this? I think it'd be great if we could get the ball rolling and start testing.

Err thanks for bugging me about this.

There have been a few 'changes' that effect the immediate deployment:

  • We use HNP (for Wiki ACLs) which makes it a pain to setup new wikis, I did come up to a work around to make it easier BUT HNP introduces risks in itself, one of which is security as we cannot upgrade to a version of Mediawiki that is now maintained...
  • The Docs team now want to implement a CMS which would allow as to remove HNP on the wiki, and I've been a bit busy in the last few weeks and have not paid much attention to the stage of this discussion, but I believe it'd be nice to deploy both at once so we don't have to change everything again...

In addition Apache doesn't seem to like me anymore and I'd like to beat that into place first...

I think there are a couple of other things that I'm waiting on/need to do, but I can't think of them off the top of my head.

Replying to [comment:9 nigelj]:

  • We use HNP (for Wiki ACLs) which makes it a pain to setup new wikis, I did come up to a work around to make it easier BUT HNP introduces risks in itself, one of which is security as we cannot upgrade to a version of Mediawiki that is now maintained...
  • The Docs team now want to implement a CMS which would allow as to remove HNP on the wiki, and I've been a bit busy in the last few weeks and have not paid much attention to the stage of this discussion, but I believe it'd be nice to deploy both at once so we don't have to change everything again...

These are related, in that one reason to get CMS is to have an ACL'd place outside of the wiki. :)

Nigel has been helpful in getting some test instances of CMSes up; we need to rally some folks to test them for feature and UI. I've been focused on project management for Docs (really for the first time), and at worst case am just going to jump on it hard toward the end of October.

REGARDLESS ... we can move the ACL'd content sooner, just to a permanent URL and give Spot a super-fast turnaround on updates from his wiki content. I can do that, at least, although I need to find out how to get my check-ins for fedoraproject.org to go live fastest.

Then we can move the ACL'd content and upgrade the MediaWiki instance independently of Docs CMS. We pretty much decided ''not'' to update the tools underneath fedoraproject.org until after F10; too late for Infra freeze, etc. That means the moving of the ACL'd material is more a procedural situation.

Nigel, let's chat with Spot next time the three of us are on IRC. I want to make sure in realtime that we get his priorities covered. He basically wants a wysiwyg method where he can control who has write access; he doesn't mind changing to a CMS that does that as long as it all fits in to FAS etc.; we might have to move all the content under e.g. Legal/* to a sandbox so he can work on it there until we get the CMS up.

Request to add "zh" wiki for chinese documents.

We (we call ourselves FZUG) need a wiki to write documents. The main wiki does not support zh-autoconvert. Currently We have set up a test wiki here as http://wiki.fedora-zh.org/w/ , but according to Fedora leads, we should ask Infrastructure team for help, and work within Fedora Project instead of creating our own groups.

Since multiple wiki is planned, is it possible to set up "zh" wiki first?

Thanks!

Just some updates here:

I've taken another shot for:

https://<lang>.fedoraproject.org/wiki/

It works like so:

http://<lang>.fedoraproject.org has a set of Rewrites that read:

RewriteCond %{HTTP_HOST} ^(..).fedora
RewriteRule ^/wiki/(.)$ http://localhost:10001/%1/w/index.php?title=$1 [P]
RewriteCond %{HTTP_HOST} ^(..).fedora
RewriteRule ^/w/(.
)$ http://localhost:10001/%1/w/$1 [P]
RewriteCond %{HTTP_HOST} ^(..).fedora
RewriteRule ^(.*)$ /srv/web/fedoraproject.org/$1 [E=prefer-language:%1]

It needs a slight modification for items like pt_BR, which I'm going to tackle now, but as apache uses the same language codes as Mediawiki we should be good.

The only issue is: I think the rewrite should be something like:

RewriteCond %{HTTP_HOST} ^(en|fr|de|pt-br).
RewriteRule ^/wiki/(.)$ http://localhost:10001/%1/w/index.php?title=$1 [P]
RewriteCond %{HTTP_HOST} ^(en|fr|de|pt-br).
RewriteRule ^/w(.
)$ http://localhost:10001/%1/w$1 [P]
RewriteCond %{HTTP_HOST} ^(en|fr|de|pt-br|nl|etc).
RewriteRule ^(.*)$ /srv/web/fedoraproject.org/$1 [E=prefer-language:%1]

Followed with:

RewriteRule ^/wiki/(.)$ http://localhost:10001/en/w/index.php?title=$1 [P]
RewriteRule ^/w(.
)$ http://localhost:10001/en/w$1 [P]
RewriteRule ^(.*)$ /srv/web/fedoraproject.org/$1 [E=prefer-language:en]

As the catchall for English.

Errr that looks ugly... Take 2

Just some updates here:

I've taken another shot for:

https://<lang>.fedoraproject.org/wiki/

It works like so:

http://<lang>.fedoraproject.org has a set of Rewrites that read:

{{{
RewriteCond %{HTTP_HOST} ^(..).fedora
RewriteRule ^/wiki/(.)$ http://localhost:10001/%1/w/index.php?title=$1 [P]
RewriteCond %{HTTP_HOST} ^(..).fedora
RewriteRule ^/w/(.
)$ http://localhost:10001/%1/w/$1 [P]
RewriteCond %{HTTP_HOST} ^(..).fedora
RewriteRule ^(.*)$ /srv/web/fedoraproject.org/$1 [E=prefer-language:%1]
}}}

It needs a slight modification for items like pt_BR, which I'm going to tackle now, but as apache uses the same language codes as Mediawiki we should be good.

The only issue is: I think the rewrite should be something like:

{{{
RewriteCond %{HTTP_HOST} ^(en|fr|de|pt-br).
RewriteRule ^/wiki/(.)$ http://localhost:10001/%1/w/index.php?title=$1 [P]
RewriteCond %{HTTP_HOST} ^(en|fr|de|pt-br).
RewriteRule ^/w(.
)$ http://localhost:10001/%1/w$1 [P]
RewriteCond %{HTTP_HOST} ^(en|fr|de|pt-br|nl|etc).
RewriteRule ^(.*)$ /srv/web/fedoraproject.org/$1 [E=prefer-language:%1]
}}}

Followed with:

{{{
RewriteRule ^/wiki/(.)$ http://localhost:10001/en/w/index.php?title=$1 [P]
RewriteRule ^/w(.
)$ http://localhost:10001/en/w$1 [P]
RewriteRule ^(.*)$ /srv/web/fedoraproject.org/$1 [E=prefer-language:en]
}}}

As the catchall for English.

This is done and has been done since July. It's template based, not separate-wiki based. No additional infra required.

Login to comment on this ticket.

Metadata