Difference between revisions of "Internationalisation"

From Wikifab Developers
Jump to: navigation, search
(Context)
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
=== Context ===
+
== Context ==
  
Wikifab use the mediawiki extension 'PageForm' https://www.mediawiki.org/wiki/Extension:Page_Forms (extensions previously called SemanticsForm ).
+
Wikifab uses the mediawiki extension 'PageForm' https://www.mediawiki.org/wiki/Extension:Page_Forms (extensions previously called 'SemanticsForm').
  
This enabled us to create forms templates in order that users create new pages with a predefined form.
+
'PageForm' allows users to add and edit pages with a predefined template using forms.
  
 
+
However, this extensions doesn't works with the [https://www.mediawiki.org/wiki/Extension:Translate 'Translate' extension], which enable to have a multilingual website.
However, this extensions is not well integrated we the 'Translate' extension, which enable to have a multilingual website.
 
  
 
Today, wikifab has 2 websites :   
 
Today, wikifab has 2 websites :   
Line 16: Line 15:
 
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.
 
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.
  
So, we want to update the PageForm extension to be properly integrated with Translate extension.
+
== Installation guide ==
  
 +
An example of wikifab website with extension 'Translate' enabled is available here : http://i18n.test.wikifab.org/
  
=== installation guide ===
+
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.
 
 
To develops this feature, you can either install a wikifab wiki and add Translate extension, or just install a mediawiki with Translate and PageForm extensions :
 
  
 
==== Install wikifab site ====
 
==== Install wikifab site ====
Line 43: Line 42:
 
And install Mediawiki extension Translate : https://www.mediawiki.org/wiki/MediaWiki_Language_Extension_Bundle
 
And install Mediawiki extension Translate : https://www.mediawiki.org/wiki/MediaWiki_Language_Extension_Bundle
  
=== how Translate works ===
+
== 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.
 
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.
  
Then it show you the translation units, and here is the trouble for wikifab : it doesn't respect the PageForm fields.
+
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 [http://i18n.test.wikifab.org/index.php/Special:Translate special page 'Translate'].
  
After valid it, texts blocs to translate appear on the special page 'Translate'.
+
For more information see the tutorial [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Extension:Translate/Page_translation_example How to set up a content page for translation].
  
 +
==== Issue with PageForm ====
  
=== To do ===
+
The 'Translate' extension doesn't respect the PageForm fields.
  
==== automatically add 'translate' tags ====
+
== To do ==
  
Tags should be added either at page creation, or on a click on a specific action button.
+
==== Automatically add 'translate' tags ====
  
Tags should be added around each field to be translated.
+
* 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 ====
+
==== 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.
 
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.
 
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.

Latest revision as of 10:18, 1 December 2016

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.