WackoWiki: Translating

https://wackowiki.org/doc     Version: 16.08.2019 07:35
Dev[link67]/Translations
This guide is about translating WackoWiki to another language.

WackoWiki‘s userinterface can be configured to use any language by setting the appropriate option. Have a look in the lang directory to see which languages are available. To translate WackoWiki to your own language, copy the lang/en/ directory to a new one named after your ISO language code[link1].


1. Supported Languages


# User Documentation Localization Repository Charset* Abbr. Maintainer
1 Deutsch[link2] Deutsch[link3] iso-8859-1 de WikiAdmin[link4]
2 English[link5] English iso-8859-1 en
3 Spanish[link6] ((!/es )) iso-8859-1 es KlePy[link7]
4 French[link8] Français[link9] iso-8859-1 fr
5 Polski[link10] Polski iso-8859-2 pl
6 Portugues[link11] ((!/pt )) iso-8859-1 pt
7 Russain[link12] ((!/ru )) windows-1251 ru Elar9000[link13]
8Bulgarian[link14] Bulgarian windows-1251 bg
9 Italian ((!/it )) iso-8859-1 it
10 Danish Danish[link15] iso-8859-1 da
11 Estonian((!/et )) windows-1257 et
12 Hungarian[link16] Hungarian[link17]((!/hu )) iso-8859-2 hu
13 Dutch ((!/nl )) iso-8859-1 nl
14 Greek[link18] Ελληνικά[link19] iso-8859-7 el EvaggelosBalaskas[link20]

* The charset for all languages changed to utf-8 in the default branch after the R5.5.12 release.

Important: Please note that we have not verified those translations. If you believe that a translation is false or misleading, please contact us[link21].

2. Message sets

2.1. Locations

Message sets can be found under the following locations:

Repo: https://bitbucket.org/wackowiki/wackowiki-dev/src/tip/

wacko/[link22]
  1. admin/lang/
  2. js/lang/
  3. lang/
  4. setup/lang/
  5. theme/yourtheme/lang/

2.2. To Localize

Please check your language files whether the following message sets have yet to be translated into your language or whether the wording can be improved.

2.2.1. Main


lang/[link23]
  1. lang/wacko.en.php – default language file

2.2.2. Installer


setup/lang/[link24]
  1. setup/lang/installer.en.php – default language file
  2. setup/lang/inserts.en.php

2.2.3. Admin panel


admin/lang/[link25]
  1. admin/lang/ap.en.php – default language file

2.2.4. JavaScript


js/lang/[link26]
  1. js/lang/wikiedit.en.js – default language file

2.2.5. Theme


theme/[link27]
  1. theme/yourtheme/lang/ – default language file

3. Documentation


Core pages to translate

# Page Languages Notes
1 Features[link28] de[link29]
2 Requirements[link30] de[link31]
3 Installation[link32] de[link33], ru[link34]
4 Upgrade[link35] de[link36], ru[link37]
5 Configuration[link38] de[link39], ru[link40]
6 Content-Security-Policy
7 Formatting[link41] de[link42], ru[link43]
8 Actions[link44] de[link45], ru[link46]
9 Access Control Lists[link47] de[link48], ru[link49]
10 Admin Panel[link50] de[link51], ru[link52]
11 WikiConcept[link53] de[link54], ru[link55]
12 Markup[link56] de[link57], ru[link58]
13 Wabi-sabi[link59] de[link60], ru[link61]
14
15

It is desirable to have all essential pages available at least in German, English, French, Russian and Spanish.

4. Help to improve translation

Don't see your native language here? Is a translation incomplete or improper?

If your ability in English is sufficient to produce high-quality translations of English texts in a formal style, you can volunteer to translate WackoWiki.

Forum: Translation[link21]
  1. you want to start a new translation or continue an existing one and you want to avoid duplicating your work with someone else
  2. you're looking for other people who want to work with you on translating
  3. you're having technical questions about tools, the source tree, the meaning of terms, etc.



Send us your translations or corrections via E-Mail, Bugtracker or Pullreqest.

5. Localize your action, handler or module

5.1. Action and Handler

lang/wacko.en.php
'UserName'	=> 'User name',

usage
$this->_t('UserName')

5.2. Admin Panel

admin/lang/ap.en.php
'BackupCompleted'	=> 'Backing up and archiving completed.<br>' .
	'The Backup package files were stored in the sub-directory %1.<br>' .
	'To download it use FTP (maintain the directory structure and file names when copying).<br>' .
	'To restore a backup copy or remove a package, go to <a href="%2">Restore database</a>.',

usage
Ut::perc_replace(
	$engine->_t('BackupCompleted'), 
	'<code>' . $pack . '</code>', 
	$engine->href('', '', ['mode' => 'db_restore']))

5.3. Template

pull in templates
 [ ' _t: CategoryDescription ' ]

6. Tools

6.1. relang.php


In *nix systems, use the WHICH command to show the location of the php binary executable. This is the path to use as the first line in your php shell script file.


 # which php
/usr/local/bin/php

 cd /yourpathto/repo/community/devel

 php ./relang.php /yourpathto/repo/wacko.en.php wacko.bg.php wacko.da.php wacko.de.php wacko.el.php wacko.es.php wacko.et.php wacko.fr.php wacko.hu.php wacko.it.php wacko.nl.php wacko.pl.php wacko.pt.php wacko.ru.php

6.1.1. Issues

6.1.1.1. no var

 no var in /home/user/workspace/dev/wacko/lang/wacko.en.php

FIXED diff --git a/community/devel/relang.php b/community/devel/relang.php

 --- a/community/devel/relang.php
+++ b/community/devel/relang.php
@@ -57,7 +57,7 @@
 	$contents = trim($contents);

 	$parent = 0;
-	if (!preg_match('/\$([\w_]+)\s*=\s*array\s*\(/', $contents, $match))
+	if (!preg_match('/\$([\w_]+)\s*=\s*\[/', $contents, $match))
 	{
 		if (!$defvar) die("no var in $fname\n");
 		$var = $defvar;

6.1.1.2. dupe messages
 php ./relang.php /home/user/workspace/dev/wacko/admin/lang/ap.en.php /home/user/workspace/dev/wacko/admin/lang/ap.bg.php

 dupe messages in /home/user/workspace/dev/wacko/admin/lang/ap.en.php

Complains about a dupe set but in another sub array


6.2. Machine translation


  1. https://translate.google.com/
  2. https://translate.yandex.ru/
  3. https://www.bing.com/translator/
  4. https://www.deepl.com/translator
  5. http://mymemory.translated.net/
  6. http://www.apertium.org/
  7. Firefox Addon

7. Suggestions

  1. Proposed Specifications For Languages Holding[link66]