Internationalisation

From Wikifab Developers
Jump to: navigation, search

Context

Wikifab uses the mediawiki extension 'PageForm' https://www.mediawiki.org/wiki/Extension:Page_Forms (extensions previously called 'SemanticsForm').

'PageForm' allows users to add and edit pages with a predefined template using forms.

However, this extensions doesn't works with the 'Translate' extension, which enable to have a multilingual website.

Today, wikifab has 2 websites :

This requires that users create one account on each platform, and tutorials must be created separately on each site.

We want to have only one website, with translation features included. So that every tutorial can be easily translate to be available in many languages.

So, we want to update Page_Form to be properly integrated with the Translate extension.

Installation guide

An example of wikifab website with extension 'Translate' enabled is available here : http://i18n.test.wikifab.org/

To develop this feature, you can install a local version of wikifab on your computer or one of your server. You can either install a wikifab wiki and add Translate extension, or just install a mediawiki with Translate and PageForm extensions. The first option enable you to have already some forms templates to create tutorials.

Install wikifab site

Follow the tutorial here : https://github.com/Wikifab/wikifab-main

Then install Mediawiki extension 'Translate', see instructions here : https://www.mediawiki.org/wiki/MediaWiki_Language_Extension_Bundle

Install empty mediawiki with extension Translate and PageForm

Here are the commands to install ( proccess for ubuntu)

wget https://releases.wikimedia.org/mediawiki/1.27/mediawiki-1.27.1.tar.gz
tar -xzf mediawiki-1.27.1.tar.gz
mv mediawiki-1.27.1 translation.wikifab
cd translation.wikifab
cd extensions
git clone https://github.com/wikimedia/mediawiki-extensions-PageForms PageForms

And install Mediawiki extension Translate : https://www.mediawiki.org/wiki/MediaWiki_Language_Extension_Bundle

How the extension 'Translate' works

To translate content of a page, we must edit the page, and add tags <translate>...</translate> to wrap the text to translate, save the page, then Click the "Mark this page for translation" link.

You can see an exemple of translated page here: http://i18n.test.wikifab.org/index.php/Standard_Wiki_page

Texts blocs to translate appear on the special page 'Translate'.

For more information see the tutorial How to set up a content page for translation.

Issue with PageForm

The 'Translate' extension doesn't respect the PageForm fields.

To do

Automatically add 'translate' tags

  • Tags should be added either at page creation, or on a click on a specific action button.
  • Tags should be added around each field to be translated.
  • Tags should not be visible on edition of page with forms.

Improve translation forms

After adding tags, all pages could be translated. But the translate form is not very good : each text block must be translate one by one, and we havn't a vision of the global page.

So we should create a translation form, which use a specific template, in the same way than we use form to create a tutorial page.