User:Pfctdayelise/Extension:TranslatorHelp

An extension for multilingual wikis that have one "master language" and translate content into one or more other languages. Probably not appropriate for wikis where "translation forks" can occur (more than one language could have the most "up to date" version of a page). The aim is to make it easy for would-be translators to identify pages that need translating most urgently and assist translators in the general process. This is not Multilingual MediaWiki.

Important aims:
 * Allow translators to easily mark a t10n as being up to date with a specific revision of the master document
 * Easy to find which pages of a target lang need updating, rank them


 * master language = wiki language
 * target language - anything else

Sample markup tag
de=English page/de fr=Help:French Page Name zh=Chinese=Page Name XX=

(but this gives no actual output? maybe html comment?)

Parameters

 * enable by default on main namespace, have wgTranslationHelpEnabledNamespaces
 * i18n of course
 * not possible to translate name of tag?

Special:TranslationHelp/Pagename

 * looks for markup tag in cur revision, get target languages and target language pages
 * list latest revision of master page
 * list translations, with latest edit update + date.

 Master page: Englishpage



3 cases to handle: translated page has not been created, is not up to date, is up to date.


 * "Language code": links to page specified in &lt;translations&gt;
 * Number of revisions difference: rank(currrev) - rank(t10n'scurrev) (if page has not yet been created, this will be the total number of edits to the master page). link to a diff.
 * Time difference: time(currev) - time(t10n'scurrev) - time elapsed in making the "Number of revisions difference" revisions above
 * time since last update: now - time(t10ncurrev)

Master page: revisions 5,10,15,20,25,30,35 (say)

Translation page: revisions 7(t10n'scurrrev=10), 14(t10n'scurrrev=10), 21 (t10n'scurrrev=25), 28(t10n'scurrrev=30)

Special:TranslationHelp

 * box for pagename, for above case

This is more difficult. Search for all above cases.

default: Lists all pages. overview/summary - show oldest translation in each lang

sortable table according to some parameter.

Special:TranslationHelp/language=foo - filter for pages with LC=foo translations, somehow

Things to look out for

 * Special:TranslationHelp/Foo - Foo doesn't exist, Foo doesn't use the tag, Foo is in namespace with translation not enabled
 * Target page doesn't exist
 * Target language doesn't exist (make it not matter)
 * Avoid target language = wiki language (kinda silly)
 * Revision ID doesn't exist (fallback to last mentioned one)

Todo
XX= equivalent to  XX=Currentpage/XX
 * in &lt;translations&gt; make


 * Make Specialpage toolbox link for Page/fr go to equiv for Page - need to create table for this?


 * Side by side editing - left side=master doc, view mode, right side=translation doc, edit mode, with edit summary filled in


 * Add CSS classes to Special page output to allow coloured highlighting: green=uptodate, yellow=outofdate, red=doesntexist.


 * Mark page priority???

useful things

 * Internationalisation
 * MediaWiki extensions FAQ
 * Revision table, page table