rmy localisation: Namespaces + grammar.
authorRotem Liss <rotem@users.mediawiki.org>
Tue, 1 Aug 2006 16:24:55 +0000 (16:24 +0000)
committerRotem Liss <rotem@users.mediawiki.org>
Tue, 1 Aug 2006 16:24:55 +0000 (16:24 +0000)
RELEASE-NOTES
languages/LanguageRmy.php [new file with mode: 0644]
languages/MessagesRmy.php

index 739939a..4f21fed 100644 (file)
@@ -127,9 +127,10 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * Indonesian (id)
 * Korean (ko)
 * Polish (pl)
+* Romani (rmy)
 * Russian (ru)
-* Telugu (te)
 * Tajic (tg)
+* Telugu (te)
 
 == Compatibility ==
 
diff --git a/languages/LanguageRmy.php b/languages/LanguageRmy.php
new file mode 100644 (file)
index 0000000..bbf22d5
--- /dev/null
@@ -0,0 +1,72 @@
+<?php
+
+class LanguageRmy extends Language {
+       /**
+        * Convert from the nominative form of a noun to some other case
+        * Invoked with {{GRAMMAR:case|word}}
+        *
+        * Cases: nominative, genitive-m-sg, genitive-f-sg, dative, locative, ablative, instrumental
+        */
+       public function convertGrammar( $word, $case ) {
+               global $wgGrammarForms;
+               if ( isset($wgGrammarForms['rmy'][$case][$word]) ) {
+                       return $wgGrammarForms['rmy'][$case][$word];
+               }
+
+               switch ( $case ) {
+                       case 'genitive-m-sg': # genitive (m.sg.)
+                               if ( $word == 'Vikipidiya' ) {
+                                       $word = 'Vikipidiyako';
+                               } elseif ( $word == 'Vikcyonaro' ) {
+                                       $word = 'Vikcyonaresko';
+                               }
+                       break;
+                       case 'genitive-f-sg': # genitive (f.sg.)
+                               if ( $word == 'Vikipidiya' ) {
+                                       $word = 'Vikipidiyaki';
+                               } elseif ( $word == 'Vikcyonaro' ) {
+                                       $word = 'Vikcyonareski';
+                               }
+                       break;
+                       case 'genitive-pl': # genitive (pl.)
+                               if ( $word == 'Vikipidiya' ) {
+                                       $word = 'Vikipidiyake';
+                               } elseif ( $word == 'Vikcyonaro' ) {
+                                       $word = 'Vikcyonareske';
+                               }
+                       break;
+                       case 'dativ':
+                               if ( $word == 'Vikipidiyake' ) {
+                                       $word = 'Wikipediji';
+                               } elseif ( $word == 'Vikcyonaro' ) {
+                                       $word = 'Vikcyonareske';
+                               }
+                       break;
+                       case 'locative':
+                               if ( $word == 'Vikipidiyate' ) {
+                                       $word = 'Wikipedijo';
+                               } elseif ( $word == 'Vikcyonaro' ) {
+                                       $word = 'Vikcyonareste';
+                               }
+                       break;
+                       case 'ablative':
+                               if ( $word == 'Vikipidiyatar' ) {
+                                       $word = 'o Wikipediji';
+                               } elseif ( $word == 'Vikcyonaro' ) {
+                                       $word = 'Vikcyonarestar';
+                               }
+                       break;
+                       case 'instrumental':
+                               if ( $word == 'Vikipidiyasa' ) {
+                                       $word = 'z Wikipedijo';
+                               } elseif ( $word == 'Vikcyonaro' ) {
+                                       $word = 'Vikcyonaresa';
+                               }
+                       break;
+               }
+
+               return $word; # this will return the original value for 'nominative' and all undefined case values
+       }
+}
+
+?>
index e7ccc1a..c868111 100644 (file)
@@ -1,20 +1,39 @@
 <?php
-/** Vlax Romany (Romani)
-  *
-  * @subpackage Language
-  *
-  * @bug 5422
-  *
-  * @author Niklas Laxström
-  *
-  * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
-  */
+/**
+ * Vlax Romany (Romani)
+ *
+ * @package MediaWiki
+ * @subpackage Language
+ *
+ * @author Niklas Laxström
+ */
 
 /**
  * Use Romanian as default instead of English
  */
 $fallback = 'ro';
 
+$namespaceNames = array(
+       NS_MEDIA          => 'Mediya',
+       NS_SPECIAL        => 'Uzalutno',
+       NS_MAIN           => '',
+       NS_TALK           => 'Vakyarimata',
+       NS_USER           => 'Jeno',
+       NS_USER_TALK      => 'Jeno_vakyarimata',
+       # NS_PROJECT set by $wgMetaNamespace
+       NS_PROJECT_TALK   => '{{GRAMMAR:genitive-pl|$1}}_vakyarimata',
+       NS_IMAGE          => 'Chitro',
+       NS_IMAGE_TALK     => 'Chitro_vakyarimata',
+       NS_MEDIAWIKI      => 'MediyaViki',
+       NS_MEDIAWIKI_TALK => 'MediyaViki_vakyarimata',
+       NS_TEMPLATE       => 'Sikavno',
+       NS_TEMPLATE_TALK  => 'Sikavno_vakyarimata',
+       NS_HELP           => 'Zhutipen',
+       NS_HELP_TALK      => 'Zhutipen_vakyarimata',
+       NS_CATEGORY       => 'Shopni',
+       NS_CATEGORY_TALK  => 'Shopni_vakyarimata'
+);
+
 $messages = array(
 'subcategories'         => 'Telekategoriye',
 'mainpage'              => 'Sherutni patrin',