Index: trunk/extensions/LiveTranslate/sql/LT_IndexWordTranslation.sql |
— | — | @@ -1 +1,5 @@ |
| 2 | +-- Adds word translation index on the live_translate table. |
| 3 | +-- Licence: GNU GPL v3+ |
| 4 | +-- Author: Jeroen De Dauw < jeroendedauw@gmail.com > |
| 5 | + |
2 | 6 | CREATE INDEX word_translation ON /*$wgDBprefix*/live_translate (word_id, word_language); |
Index: trunk/extensions/LiveTranslate/sql/LT_addTMField.sql |
— | — | @@ -1,2 +1,6 @@ |
| 2 | +-- Adds the memory_id field to the live_translate table, introduced in version 0.4. |
| 3 | +-- Licence: GNU GPL v3+ |
| 4 | +-- Author: Jeroen De Dauw < jeroendedauw@gmail.com > |
| 5 | + |
2 | 6 | ALTER TABLE /*_*/live_translate ADD COLUMN memory_id INT(4) unsigned NOT NULL; |
3 | 7 | UPDATE /*_*/live_translate SET memory_id = 1; |
\ No newline at end of file |
Index: trunk/extensions/LiveTranslate/sql/LT_addTMHashField.sql |
— | — | @@ -0,0 +1,5 @@ |
| 2 | +-- Adds the memory_version_hash field to the live_translate_memories table. Change made in version 1.2. |
| 3 | +-- Licence: GNU GPL v3+ |
| 4 | +-- Author: Jeroen De Dauw < jeroendedauw@gmail.com > |
| 5 | + |
| 6 | +ALTER TABLE /*_*/live_translate_memories ADD COLUMN memory_version_hash VARCHAR(255) NOT NULL default '...'; |
Property changes on: trunk/extensions/LiveTranslate/sql/LT_addTMHashField.sql |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 7 | + native |
Index: trunk/extensions/LiveTranslate/LiveTranslate.php |
— | — | @@ -43,6 +43,7 @@ |
44 | 44 | unset( $useExtensionPath ); |
45 | 45 | |
46 | 46 | $wgExtensionMessagesFiles['LiveTranslate'] = $egLiveTranslateIP . '/LiveTranslate.i18n.php'; |
| 47 | +$wgExtensionAliasesFiles['LiveTranslate'] = $egLiveTranslateIP . '/LiveTranslate.i18n.alias.php'; |
47 | 48 | $wgExtensionMessagesFiles['LiveTranslateMagic'] = $egLiveTranslateIP . '/LiveTranslate.i18n.magic.php'; |
48 | 49 | |
49 | 50 | $wgAutoloadClasses['LiveTranslateHooks'] = $egLiveTranslateIP . '/LiveTranslate.hooks.php'; |
Index: trunk/extensions/LiveTranslate/LiveTranslate.hooks.php |
— | — | @@ -230,6 +230,12 @@ |
231 | 231 | 'memory_id', |
232 | 232 | $egLiveTranslateIP . '/sql/LT_addTMField.sql' |
233 | 233 | ); |
| 234 | + |
| 235 | + $wgExtNewFields[] = array( |
| 236 | + 'live_translate_memories', |
| 237 | + 'memory_version_hash', |
| 238 | + $egLiveTranslateIP . '/sql/LT_addTMHashField.sql' |
| 239 | + ); |
234 | 240 | } |
235 | 241 | else { |
236 | 242 | $updater->addExtensionUpdate( array( |
— | — | @@ -260,6 +266,14 @@ |
261 | 267 | $egLiveTranslateIP . '/sql/LT_addTMField.sql', |
262 | 268 | true |
263 | 269 | ) ); |
| 270 | + |
| 271 | + $updater->addExtensionUpdate( array( |
| 272 | + 'addField', |
| 273 | + 'live_translate_memories', |
| 274 | + 'memory_version_hash', |
| 275 | + $egLiveTranslateIP . '/sql/LT_addTMHashField.sql', |
| 276 | + true |
| 277 | + ) ); |
264 | 278 | } |
265 | 279 | } |
266 | 280 | |
Index: trunk/extensions/LiveTranslate/RELEASE-NOTES |
— | — | @@ -7,6 +7,7 @@ |
8 | 8 | === Version 1.2 === |
9 | 9 | 2011-xx-xx |
10 | 10 | |
| 11 | +* Added i18n alias file. |
11 | 12 | * Added TMX admin user rights group. |
12 | 13 | |
13 | 14 | === Version 1.1.1 === |
Index: trunk/extensions/LiveTranslate/LiveTranslate.i18n.alias.php |
— | — | @@ -0,0 +1,23 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Aliases for the special pages of the Live Translate extension. |
| 6 | + * |
| 7 | + * @file LiveTranslate.i18n.alias.php |
| 8 | + * @ingroup LiveTranslate |
| 9 | + * |
| 10 | + * @licence GNU GPL v3+ |
| 11 | + * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
| 12 | + */ |
| 13 | + |
| 14 | +$specialPageAliases = array(); |
| 15 | + |
| 16 | +/** English (English) */ |
| 17 | +$specialPageAliases['en'] = array( |
| 18 | + 'LiveTranslate' => array( 'LiveTranslate' ), |
| 19 | +); |
| 20 | + |
| 21 | +/** |
| 22 | + * For backwards compatibility with MediaWiki 1.15 and earlier. |
| 23 | + */ |
| 24 | +$aliases =& $specialPageAliases; |
\ No newline at end of file |
Property changes on: trunk/extensions/LiveTranslate/LiveTranslate.i18n.alias.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 25 | + native |
Index: trunk/extensions/LiveTranslate/api/ApiImportTranslationMemories.php |
— | — | @@ -131,7 +131,8 @@ |
132 | 132 | 'live_translate_memories', |
133 | 133 | array( |
134 | 134 | 'memory_lang_count' => $tm->getLanguageAmount(), |
135 | | - 'memory_tu_count' => $wordId |
| 135 | + 'memory_tu_count' => $wordId, |
| 136 | + 'memory_version_hash' => uniqid(), |
136 | 137 | ), |
137 | 138 | array( 'memory_id' => $memoryId ) |
138 | 139 | ); |
Index: trunk/extensions/LiveTranslate/LiveTranslate.sql |
— | — | @@ -1,4 +1,6 @@ |
2 | 2 | -- MySQL version of the database schema for the Live Translate extension. |
| 3 | +-- Licence: GNU GPL v3+ |
| 4 | +-- Author: Jeroen De Dauw < jeroendedauw@gmail.com > |
3 | 5 | |
4 | 6 | -- Special translations table. |
5 | 7 | CREATE TABLE IF NOT EXISTS /*$wgDBprefix*/live_translate ( |
— | — | @@ -16,7 +18,8 @@ |
17 | 19 | memory_location VARCHAR(255) NOT NULL, |
18 | 20 | memory_local INT(1) unsigned NOT NULL, |
19 | 21 | memory_lang_count INT(2) unsigned NOT NULL, |
20 | | - memory_tu_count INT(8) unsigned NOT NULL |
| 22 | + memory_tu_count INT(8) unsigned NOT NULL, |
| 23 | + memory_version_hash VARCHAR(255) NOT NULL default '...' |
21 | 24 | ) /*$wgDBTableOptions*/; |
22 | 25 | |
23 | | -INSERT INTO /*$wgDBprefix*/live_translate_memories VALUES (NULL, 0, "Live Translate Dictionary", 1, 0, 0); |
\ No newline at end of file |
| 26 | +INSERT INTO /*$wgDBprefix*/live_translate_memories VALUES (NULL, 0, "Live Translate Dictionary", 1, 0, 0, "..."); |
\ No newline at end of file |