Last modified: 2006-11-28 17:09:20 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 6444 - Namespaces and grammar function for rmy.wp
Namespaces and grammar function for rmy.wp
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Internationalization (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
http://rmy.wikipedia.org
:
: 6445 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-06-26 13:31 UTC by Dosoftei Alin
Modified: 2006-11-28 17:09 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Dosoftei Alin 2006-06-26 13:31:33 UTC
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>
	# Convert from the nominative form of a noun to the oblique case with postpositions
	# 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
Comment 1 Rob Church 2006-06-26 13:57:23 UTC
*** Bug 6445 has been marked as a duplicate of this bug. ***
Comment 2 Dosoftei Alin 2006-06-26 13:59:40 UTC
Rewriting the namespaces:

<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        => 'Projekto,
			NS_PROJECT_TALK   => 'Projekto_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       => 'Kategoriya',
			NS_CATEGORY_TALK  => 'Kategoriya_vakyarimata'
		);
</pre>
Comment 3 lɛʁi לערי ריינהארט 2006-06-26 23:12:45 UTC
Hallo Alin!

NS_PROJECT => 'Projekto,
NS_PROJECT_TALK => 'Projekto_vakyarimata,

would use hardcoded namespaces for the projects.

I assume that {{GRAMMAR:}} should be used here. Please see examples at
http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/languages/LanguageSl.php?view=markup
where

NS_PROJECT_TALK   => 'Pogovor_' .
str_replace( ' ', '_', $this->convertGrammar( $wgMetaNamespace, 'mestnik' ) ),

is used.

best regards reinhardt [[user:gangleri]]
Comment 4 Niklas Laxström 2006-11-28 17:09:20 UTC
Fixed somewhere in the past.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links