r78782 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r78781‎ | r78782 | r78783 >
Date:12:48, 22 December 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
v0.1
Modified paths:
  • /trunk/extensions/LiveTranslate/INSTALL (modified) (history)
  • /trunk/extensions/LiveTranslate/LiveTranslate.php (modified) (history)
  • /trunk/extensions/LiveTranslate/RELEASE-NOTES (modified) (history)

Diff [purge]

Index: trunk/extensions/LiveTranslate/LiveTranslate.php
@@ -25,7 +25,7 @@
2626 die( 'Not an entry point.' );
2727 }
2828
29 -define( 'LiveTranslate_VERSION', '0.1 alpha' );
 29+define( 'LiveTranslate_VERSION', '0.1' );
3030
3131 $wgExtensionCredits['other'][] = array(
3232 'path' => __FILE__,
Index: trunk/extensions/LiveTranslate/INSTALL
@@ -14,10 +14,33 @@
1515
1616 After this you need to run MediaWikis update script which can be found at /maintenance/update.php.
1717
 18+After doing this, you have installed the extension. To be able to use it in a meaningful way, you also need to take care of some configuration:
 19+
 20+== Configuration ==
 21+
 22+Configuration of Live Translate is done by adding simple PHP statements to your [[Manual:LocalSettings.php|LocalSettings.php]]
 23+file. These statements need to be placed AFTER the inclusion of Live Translate. The options are listed below and their default
 24+is set in the [http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/LiveTranslate/LiveTranslate_Settings.php?view=markup Live Translate settings file].
 25+You should NOT modify the settings file, but can have a look at it to get an idea of how to use the settings, in case the below descriptions do not suffice.
 26+
 27+=== Google API key ===
 28+
1829 To be able to actually use Google Translate, you need to [https://code.google.com/apis/console get an API key] and
1930 add it to your [[LocalSettings.php]] file AFTER the inclusion of the extension.
2031
2132 <source lang="php">
2233 # Google API key
2334 $egGoogleApiKey = 'INSERT-YOUR-KEY-HERE';
24 -</source>
\ No newline at end of file
 35+</source>
 36+
 37+=== Available languages ===
 38+
 39+You have to specify which languages users should be able to translate to. This is done by adding language codes to <code>$egLiveTranslateLanguages</code>.
 40+By default it contains only your wikis main language (as specified by <code>$wgLanguageCode</code> in [[LocalSettings.php]]). You add languages as follows:
 41+
 42+<source lang="php">
 43+$egLiveTranslateLanguages[] = 'nl';
 44+$egLiveTranslateLanguages[] = 'de';
 45+</source>
 46+
 47+If there are no languages available other then the current language of the page, then the translation control will not show up.
Index: trunk/extensions/LiveTranslate/RELEASE-NOTES
@@ -5,7 +5,7 @@
66
77
88 === Version 0.1 ===
9 -2010-12-xx
 9+2010-12-22
1010
1111 * Added simple translation interface to the right top of articles.
1212 * Implemented translation via the Google Translate API.

Status & tagging log