Page MenuHomePhabricator

Namespaces and grammar function for rmy.wp
Closed, ResolvedPublic

Description

Author: desiphral

Description:
Hi!

Here are the namespaces in Romani for Romani Wikipedia:

<pre>

		global $wgMetaNamespace;
		$this->mNamespaceNamesRmy = array(
			NS_MEDIA          => 'Mediya',
			NS_SPECIAL        => 'Uzalutno',
			NS_MAIN           => '',
			NS_TALK           => 'Vakyarimata',
			NS_USER           => 'Jeno',
			NS_USER_TALK      => 'Jeno_vakyarimata',
			NS_PROJECT        => $wgMetaNamespace,
			NS_PROJECT_TALK   => 'Projekto_'.$wgMetaNamespace,
			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       => 'Kategoriya',
			NS_CATEGORY_TALK  => 'Kategoriya_vakyarimata'
		);

</pre>

and also the Grammar function:

<pre>

  1. Convert from the nominative form of a noun to the oblique case with postpositions
  2. Invoked with {{GRAMMAR:case|word}}

/**

  • Cases: nominative, genitive-m-sg, genitive-f-sg, dative, locative, ablative,

instrumental

	 */

function convertGrammar( $word, $case ) {

		global $wgGrammarForms;
		if ( isset($wgGrammarForms['sl'][$case][$word]) ) {
			return $wgGrammarForms['sl'][$case][$word];
		}

		switch ( $case ) {
			case 'genitive-m-sg': # genitive (m.sg.)
				if ( $word == 'Vikipidiya' ) {
					$word = 'Vikipidiyako';
				}
			break;
			case 'genitive-f-sg': # genitive (f.sg.)
				if ( $word == 'Vikipidiya' ) {
					$word = 'Vikipidiyaki';
				}
			break;
			case 'dativ':
				if ( $word == 'Vikipidiyake' ) {
					$word = 'Wikipediji';
				}
			break;
			case 'locative':
				if ( $word == 'Vikipidiyate' ) {
					$word = 'Wikipedijo';
				}
			break;
			case 'ablative':
				if ( $word == 'Vikipidiyatar' ) {
					$word = 'o Wikipediji';
				}
			break;
			case 'instrumental':
				if ( $word == 'Vikipidiyasa' ) {
					$word = 'z Wikipedijo';
				}
			break;
		}

		return $word; # this will return the original value for 'nominative' and all

undefined case values
}
</pre>

Thank you,
Desiphral


Version: unspecified
Severity: normal
OS: Windows XP
Platform: PC
URL: http://rmy.wikipedia.org

Details

Reference
bz6445

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:18 PM
bzimport set Reference to bz6445.
bzimport added a subscriber: Unknown Object (MLST).

robchur wrote:

*** This bug has been marked as a duplicate of 6444 ***