Index: trunk/extensions/Wikidata/util/voctrain/i18n/language.php |
— | — | @@ -7,7 +7,7 @@ |
8 | 8 | * (mediawiki version is overkill for our purposes though) |
9 | 9 | * also, unlike mediawiki, we always use ISO 639-3 for language codes. |
10 | 10 | */ |
11 | | -class Language { |
| 11 | +class WDLanguage { |
12 | 12 | |
13 | 13 | private $code; # language code, mostly for debugging purposes |
14 | 14 | private $messages; # assoc array of translations |
— | — | @@ -47,7 +47,7 @@ |
48 | 48 | if ( $fallback[$code] === false ) { |
49 | 49 | $this->fallback = false; |
50 | 50 | } else { |
51 | | - $this->fallback = new Language( $fallback[$code] ); |
| 51 | + $this->fallback = new WDLanguage( $fallback[$code] ); |
52 | 52 | } |
53 | 53 | } |
54 | 54 | |
— | — | @@ -83,7 +83,7 @@ |
84 | 84 | * @return true if safe($one)==safe($two) |
85 | 85 | */ |
86 | 86 | public static function safeMatch( $one, $two ) { |
87 | | - return Language::safe( $one ) == Language::safe( $two ); |
| 87 | + return WDLanguage::safe( $one ) == WDLanguage::safe( $two ); |
88 | 88 | } |
89 | 89 | |
90 | 90 | |
Index: trunk/extensions/Wikidata/util/voctrain/i18n/getkey.php |
— | — | @@ -7,12 +7,12 @@ |
8 | 8 | require_once( "language.php" ); |
9 | 9 | |
10 | 10 | print "phrase: $phrase\n"; |
11 | | -print "translatewiki.net key: " . Language::safe( $phrase ) . "\n"; |
12 | | -$language = new Language(); |
| 11 | +print "translatewiki.net key: " . WDLanguage::safe( $phrase ) . "\n"; |
| 12 | +$language = new WDLanguage(); |
13 | 13 | print "translation:\n"; |
14 | 14 | print "- default: " . $language->translate( $phrase ) . "\n"; |
15 | 15 | if ( array_key_exists( 2, $argv ) ) { |
16 | | - $language = new Language( $argv[2] ); |
| 16 | + $language = new WDLanguage( $argv[2] ); |
17 | 17 | print "- " . $argv[2] . ": " . $language->translate( $phrase ) . "\n"; |
18 | 18 | } |
19 | 19 | |