Fullscreen
Loading...
 
[Show/Hide Left Column]
[Show/Hide Right Column]

Multilingual_Wiki

Enables most multilingual wiki content features and assigns the translation module. To manage the interface, use Interactive_Translation instead.



Configuration code

YAML
preferences:
 feature_multilingual: y
 feature_translation: y
 featur_urgent_translation: y
 feature_multilingual_structures: y
 feature_best_language: y
 feature_detect_language: y
 quantify_changes: y
 freetags_multilingual: y
 wiki_page_regex: full
 # Support insertion of translated string in wiki markup
 wikiplugin_tr: y
# lang_use_db disabled for now, because it causes Tiki to not look
# at all in the language files, and thus, menus etc are never #translated
# lang_use_db: y
objects:
 -
  type: module
  data:
   position: right
   order: 20
   name: switch_lang
   groups: [ Anonymous, Registered ]
 -
  type: module
  data:
   position: right
   order: 10
   name: translation
   groups: [ Anonymous, Registered ]


After this profile is activated, you will notice a "translate" button on wiki pages. Once you translate wiki pages, you will start seeing (when relevant), the "translation" module which provides you information about the state of translation. You can see this in action over at: www.wiki-translation.com

Test plan

Below is a list of scenarios that needs to be tested for this profile. Eventually, they should be implemented as automated tests using Selenium.

Note: This test plan is still highly incomplete!


Last tested
  • Date: 2009-12-04
  • By who: Alain Désilets
  • Branch/Revision number: Tiki 4.x/r23661

Setting up the site for testing

  • Reinstall the DB, using Barebones profile
  • Create page 'English Page With Undfefined Language'
    • IMPORTANT: Create this page before installing the multilingual profile, so as to simulate a situation where pages with undefined languages were created, before a decision was taken to make the site multilingual (this is a common thing).
  • Install the Multilingual_Wiki profile
  • Set the default site languages as English. Set French and Spanish as alternative languages
    • Admin > i18n
    • Default Language: English
    • Click on the Restrict support languages checkbox.
    • A list of languages opens up. Holding down the Ctrl key, click on English, French and Spanish.
    • Change preferences button.
  • Enable different kinds of searching
    • Search feature Admin > Features > Search
    • Wiki Search Box module (make sure you grand permission to all groups)
    • Search Box module (make sure you grant permission to all)

Basic sanity test

This test will execute most of the happy pathes of the multilingual features. You can run it in 2-3 minutes to rapidly do a sanity check (the complete test plan takes a good hour to carry out).
  • Create an English page Basic Test Page, and save it.
  • Click on Translate, choose French as the language, and enter following name for the translation: Page Pour Test de Base. Click on Create translation.
  • Make sure that:
    • Complete text of En page Basic Test Page is displayed on the left hand side, and that it is all highlighted.
    • The content of the En page has been pasted into the editor on the right for Fr page _Page Pour Test de Base__.
  • Click on Partial Translation
  • Make sure that:
    • System displays Fr page
    • The Translate updates module shows that this page has incoming translations from English.

  • Click on the incoming translation icon.
  • Make sure that:
    • Complete text of En page Basic Test Page is displayed on the left hand side, and that it is all highlighted.
  • Click on Partial Translation
  • Make sure that:
    • System displays Fr page
    • The Translate updates module shows that this page has incoming translations from English.

  • Manually switch language to English (language box at the top right)
  • Make sure that:
    • System displays En page
    • The Translate updates module shows that this page has outgoing translations to French
  • Click on the outgoing translation icon.
  • Make sure that:
    • Complete text of En page Basic Test Page is displayed on the left hand side, and that it is all highlighted.
  • Click on Partial Translation
  • Make sure that:
    • System displays Fr page
    • The Translate updates module shows that this page has incoming translations from English.

  • Click on Edit button.
  • Make sure that a warning is displayed at the top, saying that translation of this page is in progress, and providing an icon for continuing that translation.
    • Click on the update translation icon in that notice.
  • Make sure that:
    • Complete text of En page Basic Test Page is displayed on the left hand side, and that it is all highlighted.
  • Click on Partial Translation
  • Make sure that:
    • System displays Fr page
    • The Translate updates module shows that this page has incoming translations from English.

  • Click on Translate button.
  • Make sure that there is a section "Translate Updates" which allows you to continue translating the update.
    • Click on the update translation icon in that section.
  • Make sure that:
    • Complete text of En page Basic Test Page is displayed on the left hand side, and that it is all highlighted.
  • Click on Partial Translation
  • Make sure that:
    • System displays Fr page
    • The Translate updates module shows that this page has incoming translations from English.

  • In the Translate Updates module, click on the incoming translation icon .
  • Make sure that:
  • THIS TIME, click on Complete translation
  • Make sure that:
    • System displays Fr page
    • The Translate updates module shows that this page DOES NOT HAVE incoming translations from English.
  • Manually switch to English
  • Make sure that:
    • The Translate updates module shows that this page DOES NOT HAVE outgoing translations to French.

  • Got to En page Basic Test Page, and add this line to it:
    • ADDED TO VERSION 2 OF EN
  • Make sure that:
    • The Translate updates module shows that this page has outgoing translations to French.
  • Click on the outgoing translations icon.
  • Make sure that:
    • Only the line that was added to En is highlighted on the left hand side, namely:
      • ADDED TO VERSION 2 OF EN


Switching between languages

Need to provide more details for the various scenarios

  • Go to a unilingual page
    • Make sure that the language picklist does not mention other languges
  • Go to a bilingual page (en and fr)
    • Use the language picklist to move between the two languages
  • Go to a trilingual page (en, fr, es)
    • Use the language picklist to move between the three languages

Language guessing

  • Login as test_user and set langauges preferences:
    • Set French as the first language, and English is the second language
  • Login as admin and set the site's default languges to English
  • Still as admin, make sure that the langauge guessing feature is enabled
  • Go to a page that is available in En and Fr
    • Make sure that by default, the page is displayed in Fr, even though the site's default language is En.

Create a new translation

  • Login as test_user.
  • Go to an English page that does not have a French translation yet.
  • Click on the Translate button.
  • Specify French as the languge of the new translation.
  • Enter the name for the French translation.
  • Click on the ???_ button.
  • Make sure that the content of the original English page was pasted into the new French page.
  • Make sure that a notice Traduction en cours was automatically inserted at the top of the page.
  • Replace some of the English text by French text.
  • Click on Partial Translation button.
  • Go to the English page.
    • Check that the picklist now mentions French.
    • Click on the French version, and make sure it takes you to the new French page you created.

Managing translation of updates

  • Go to an English page that has a French translation where the two are considered to be 100% up to date.
  • Change a few words in the English page, and save.
  • Make sure that the translation assistant (on the right column):
    • Says that the French page needs updating.
    • Says that the English page is still 100% up to date
  • Switch to the French page, and check that:
    • It says that it needs to be updated from English.
    • It is less than 100% up to date.
  • Click on the Update from icon.
  • Make sure that:
    • You see a diff of the changes you made on the English page.
    • You get an edit area with the current content of the French page.
    • Reproduce part of the English change in the French, and click on Partial Translation button.
    • Make sure that French page is still listed as needing to be updated, and as being less than 100% up to date.
  • Click again on the Update from icon, and finish translating the English change.
    • This time, click on Complete Translation button.
  • Make sure that the French page is now listed as being 100% up to date, and that it does not have an _update from__ icon anymore.


Continue a translation by clicking on the Edit button

First, test this for a brand new translation
  • Find an English page that does not have a French translation.
  • Click on the Translate button, and create a new translation in French.
    • Save it as a Partial Translation.
  • Go to the French page and click on Edit button.
    • Make sure the system warns you that this page is undergoing translation, and that it provides you for icons for continuing the translation OR to make a brand new edit.
    • Click on the icon to continue translation from English, and click on Partial Translation
  • Go to the French page and click on Edit button again
    • Make sure the system warns you that this page is undergoing translation, and that it provides you for icons for continuing the translation OR to make a brand new edit.
    • Scroll down to the edit form, and make a change there, and click Save.
  • * Go to the French page and click on Edit button.
    • Make sure the system warns you that this page is undergoing translation, and that it provides you for icons for continuing the translation OR to make a brand new edit.
    • Click on the icon to continue translation from English, and this time, click on Complete Translation to signal that you are done.
  • Go to the French page and click on Edit button.
    • Make sure the system warns you that this page is undergoing translation, and that it provides you for icons for continuing the translation OR to make a brand new edit.

Next, test this for translation of an update
  • Find an English page which is in-sync with its French translation.
  • Edit the English page.
  • Click on the icon to translate this update to French.
    • Make sure the system does not warn you that this page is undergoing translation.
    • Click Partial Translation
  • Go to the French page and click on Edit button.
    • Make sure the system warns you that this page is undergoing translation, and that it provides you for icons for continuing the translation OR to make a brand new edit.
    • Click on the icon to continue translation from English, and click on Partial Translation
  • Go to the French page and click on Edit button again
    • Make sure the system warns you that this page is undergoing translation, and that it provides you for icons for continuing the translation OR to make a brand new edit.
    • Scroll down to the edit form, and make a change there, and click Save.
  • * Go to the French page and click on Edit button.
    • Make sure the system warns you that this page is undergoing translation, and that it provides you for icons for continuing the translation OR to make a brand new edit.
    • Click on the icon to continue translation from English, and this time, click on Complete Translation to signal that you are done.
  • Go to the French page and click on Edit button.
    • Make sure the system warns you that this page is undergoing translation, and that it provides you for icons for continuing the translation OR to make a brand new edit.

Testing custom translated strings

  • Create a custom translated string for FR
    • Admin > i18n > Customized String Translation tab
    • French > Edit
      • Replace the following line:
//"Hello"=>"My Hello",

      • With this
"will be translated automatically"=>"sera traduit automatiquement",

      • Save button.
    • NOTE: This may not be necessary??? English > Edit
      • Replace the following line:
//"Hello"=>"My Hello",

      • With this
"will be translated automatically"=>"will be translated automatically",

      • Save button.
  • Create a French page with that custom string in it
    • Create a page Page Francaise.
    • Enter following in it:
{TR()}will be translated automatically{TR}

    • Make sure it is a French page
      • Translate button, then
      • In Change language for this page section, choose French and then click on Change language button.
    • Go back to page Page Francaise, and verify that the English string is actually displayed in French, i.e. "sera traduit automatiquement".

Simultaneous updates in two languages at once

  • Go to a page that has En and Fr, and where both are considered to be 100% up to date.
  • Make a change to the En page.
  • Make a change to the Fr page.
  • Check that En page:
    • Is shown as less than 100% up to date.
    • Has an icon for updating FROM fr
    • Has an icon for updating TO fr
  • Check that Fr page:
    • Is shown as less than 100% up to date.
    • Has an icon for updating FROM en
    • Has an icon for updating TO en
  • From the Fr page, click on the upddate from icon, translate the update, then click on Complete Translation.
  • Make sure that the Fr version:
    • is now considered as 100% up to date,
    • Does not have an update from En icon.
    • But still has an update to En icon.
  • Make sure that the En version:
    • is still considered to be less than 100% up to date,
    • Still has an update from Fr icon.
    • Does not have an update to Fr icon.
  • Still on the En page, click on the update from fr icon, translate the change, and click on Complete Translation.
  • Make sure that En page:
    • Is now shown to be 100% up to date.
    • Does not have either an update to fr, nor update from fr icon.
  • Make sure that Fr page:
    • Is now shown to be 100% up to date.
    • Does not have either an update to en, nor update from en icon.

Changing language of a page

  • Go to an English page that's also available in French, but not in Spanish.
  • Switch to the French page using the language picklist.
  • Make sure that the language picklist has French as the language
  • Change the page's language to Spanish
    • Click on the Translate button
    • In the bottom section, select Spanish as the language and click on the Change language button.
  • Go back to the English version of the page
    • Make sure that the language picklist does not mention French anymore, but that it mentions Spanish
    • Switch to the Spanish page, and make sure that it is the French page whose language you changed to Spanish.
    • Turn the language of that page back to French, for future tests.

Assing existing page as a translation

  • Create a french page Bonjour le monde, and type "Bonjour" in it.
  • Create an english page Hello world, and type "Hello" in it.
  • On Hello world page, click on Translate button.
  • Assign page Bonjour le monde as a translation.
  • NEED TO FINISH DESCRIBING THIS SCENARIO.

Searching in different languages

  • Search with the Wiki Search box
    • Make sure that the search language defaulted to "any language". Unckeck exact match and try the following scenarios
      • Search for a word that matches only the names of English pages
      • Search for a word that matches only the names of French pages
      • Search for a word that matches only the names of English AND French pages
      • Search for a word that does not match ANY page in ANY language.
    • Change the search language to "english" and do the following:
      • Search for a word that matches the names of an English page only.
      • Search for a word that does NOT match the name of an English page, but DOES match the name of a French page.
      • Search for a word that matches the names of pages in BOTH English and French.
      • Search for a word that does NOT matche the name of ANY page in ANY language.
  • Search with the Search box (NOT the Wiki Search box).
  • Make sure the language defaulted to "any language", and try the following.
    • Search for a word that only exists in an English page.
    • Search for a word that only exists in a French page.
    • Search for a word that exists in BOTH an English and a French page.
    • Search for a word that exists in NEITHER an English nor a French page.
  • Change the search language to "english" and do the following:
    • Search for a word that only exists in an English page.
    • Search for a word that only exists in a French page.
    • Search for a word that exists in BOTH an English and a French page.
    • Search for a word that exists in NEITHER an English nor a French page.
  • Change the search language to "french" and do the following:
    • Search for a word that only exists in an English page.
    • Search for a word that only exists in a French page.
    • Search for a word that exists in BOTH an English and a French page.
    • Search for a word that exists in NEITHER an English nor a French page.
  • Search for word 'undefined', with language set to 'any'
    • Make sure page 'English Page With Undfefined Language' is found
  • Search for word 'undefined', with language set to 'French'
    • Make sure page 'English Page With Undfefined Language' is found
  • Search for word 'undefined', with language set to 'English'
    • Make sure page 'English Page With Undfefined Language' is found
  • Search by going directly to tiki-listpages
    • Go to tiki-listpages.php directly
    • Make sure that the search language is set to 'any language'
    • And that there are some pages in the results (actually, all pages should be listed).

Search for a page, then create it

  • In the Wiki Search Box, search for 'Blah'
    • The system tells you that it does not exist.
  • Click on the Create button.
  • Make sure the system asks you to set the pages's language.
  • Make sure the selected language is English (i.e., the site's default language).
  • Select French as the language.
  • Finish creating the page, and save it.
  • Make sure that the page was created in French, i.e.
    • Check that the language picklist (top right) displays French.


Page creation with multilingual features off does not ask for language

  • Turn the multilingual features off
  • In the Wiki Search box, type the name of page that does not exist ye.
  • Click on the Create button.
  • Check that the system does NOT ask you for the language of that page.
  • Finish creating the page, and make sure it displays correctly.
  • Turn multilingual features back on

  • Setup: Create a French page Page Parent and an English page Parent Page.
  • Case where only one parent and it's French
    • On French page Page Parent, create a link to a non-existant page Nouvelle Page avec parent francais, and save.
    • Click on the question mark link for Nouvelle Page avec parent francais.
      • Make sure the system does not ask you for the language of that page.
      • Go to the Tools tab, and make sure the system set the new page's language to French.
      • Save the new page, and make sure it was created in French (i.e. the language picklist at the top says French).
  • Case where only one parent and it's English
    • On English page Parent Page, create a link to a non-existant page New page with English parent, and save.
    • Click on the question mark link for New page with English parent.
    • Make sure the system does not ask you for the language of that page.
      • Go to the Tools tab, and make sure the system set the new page's language to English.
      • Save the new page, and make sure it was created in English(i.e. the language picklist at the top says English).
  • Case where two parents, one English and one French
    • On both English and French parent pages, create links to the same new page New Page with both English and French parents?.
    • Clikc on one of the two resulting question mark links.
      • Make sure the system prompts you for the page's language (since it can't tell if it's French or English). Choose French.
      • Save the page, and make sure it was created in French (i.e., the language picklist at the top says French).
  • Case where multilingual features are off
    • Disable multilingual features
    • On both English and French parent pages, create links to the same new page Another New Page with both English and French parents?.
    • Clikc on one of the two resulting question mark links.
      • Make sure the system DOES NOT prompt you for the page's language (since it can't tell if it's French or English).
      • Save the page, and make sure it doesn't crash.






Contributors to this page: Marc Laporte and alain_desilets .
Page last modified on Tuesday 14 of September, 2010 03:33:36 CEST by Marc Laporte.