Predloga:Wikivar/GRAMMAR
Iz Wikinavedka, proste zbirke navedkov in pregovorov
Vsebina |
original version from LanguageCs.php
- Revision: 1.85, Sun Jan 22 00:40:21 2006 UTC (31 hours, 37 minutes ago) by midom
[spremeni] links
- template:Wikivar T
- template:Wikivar/GRAMMAR
- w:en:List of grammatical cases
- b:user:Gangleri/tests/bugzilla
- bugzilla:04685 – "LanguageSl.php hardcodes project namespace as Wikipedija"
- CVS: languages/
- w:en:IRC: #mediawiki, #wiktionary
- meta:Help:Magic words#GRAMMAR:
- meta:special:Search/GRAMMAR
notes:
result depends on the search namespaces activated at meta:special:Preferences
search={{grammar: does not provide the pages including "{{grammar:"
- meta:special:Search/GRAMMAR
- w:en:Slovenian language
- w:sl:Slovinčina
- special:Allmessages: b:, n:, q:, s:, wikt:, w:
[spremeni] to-do
- include / add all names of the sister projects: b:, n:, q:, s:, wikt:, w: – done
- identify what values are used for what grammatical cases
- ...
[spremeni] please work here (old)
reference: oldid=3813 (code from LanguageCs.php)
# Grammatical transformations, needed for inflected languages
# Invoked by putting {{grammar:case|word}} in a message
# function convertGrammar( $word, $case ) {
# allowed values for $case:
# 1sg, 2sg, ..., 7sg -- nominative, genitive, ... (in singular)
# switch ( $word ) {
# case 'Wikipedia':
# case 'Wikipedija':
# switch ( $case ) {
# case '3sg':
# return 'Wikipediji';
# case '4sg':
# return 'Wikipedijo';
# case '6sg':
# return 'Wikipedijo'; # example: "s Wikipedijo"
# case '7sg':
# return 'Wikipediji'; # example: "o Wikipediji"
# default:
# return 'Wikipedija';
# }
# case 'Wikibooks':
# case 'Wikiknjige':
# switch ( $case ) {
# case '3sg':
# return 'Wikiknjigam';
# case '4sg':
# return 'Wikiknjige';
# case '6sg':
# return 'Wikiknjigami'; # example: "s Wikiknjigami"
# case '7sg':
# return 'Wikiknjigah'; # example: "o Wikiknjigah"
# default:
# return 'Wikiknjige';
# }
# case 'Wikinews':
# case 'Wikinovice':
# switch ( $case ) {
# case '3sg':
# return 'Wikinovicam';
# case '4sg':
# return 'Wikinovice';
# case '6sg':
# return 'Wikinovicami'; # example: "s Wikinovicami"
# case '7sg':
# return 'Wikinovicah'; # example: "o Wikinovicah"
# default:
# return 'Wikinovice';
# }
# case 'Wikiquote':
# case 'Wikinavedek':
# switch ( $case ) {
# case '3sg':
# return 'Wikinavedku';
# case '4sg':
# return 'Wikinavedek';
# case '6sg':
# return 'Wikinavedkom'; # example: "s Wikinavedkom"
# case '7sg':
# return 'Wikinavedku'; # example: "o Wikinavedku"
# default:
# return 'Wikinavedek';
# }
# case 'Wikisource':
# case 'Wikivir':
# switch ( $case ) {
# case '3sg':
# return 'Wikiviru';
# case '4sg':
# return 'Wikivir';
# case '6sg':
# return 'Wikivirom'; # example: "s Wikivirom"
# case '7sg':
# return 'Wikiviru'; # example: "o Wikiviru"
# default:
# return 'Wikivir';
# }
# case 'Wiktionary':
# case 'Wikislovar':
# switch ( $case ) {
# case '3sg':
# return 'Wikislovarju';
# case '4sg':
# return 'Wikislovar';
# case '6sg':
# return 'Wikislovarjem'; # example: "s Wikislovarjem"
# case '7sg':
# return 'Wikislovarju'; # example: "o Wikislovarju"
# default:
# return 'Wikislovar';
# }
#}
# # unknown
# return $word;
# }
# <!-- ??? to developers: should a final "}" be here? -->
- Klemen now you can continue here. Namespaces will be handeled extra.
- See you later! Gangleri 13:48, 23 januar 2006 (UTC)
- OK, I made corrections, but please do not use them already; I want to confirm the grammar correctness. Regards, --Klemen Kocjančič (Pogovor - Hitri odgovor) 14:09, 23 januar 2006 (UTC)
BTW. You missed 5sg in script. Is there any reason for this or just a mistake? Regards, --Klemen Kocjančič (Pogovor - Hitri odgovor) 14:15, 23 januar 2006 (UTC)
- Thanks Klemen! I take a look. I do this for the first time but I will need to do it in other languages as well.
- your question about missing cases: It might be that the Czech language does not have "5sg".
-
- Well, Slovene has 1-6. If there aren't any script problems, this should be fixed. Don't worry, this is my first time also. Regards, --Klemen Kocjančič (Pogovor - Hitri odgovor) 15:59, 23 januar 2006 (UTC)
- Please note: All text must be included in "'" characters.
- Please do not add variants after "switch ( $case ) {"
- I removed: Wikipedije, Wikiknjig, Wikinovic, Wikinavedka, Wikivira, Wikislovarja
- I can see that you have included prepositions. I assume that prepositions should not be included in GRAMMAR.
-
- Propositions are part of the word and must be included. Regards, --Klemen Kocjančič (Pogovor - Hitri odgovor) 15:59, 23 januar 2006 (UTC)
- Have you find out the codings for the grammatical cases?
-
- No, and I don't know where to look and have to do it. Regards, --Klemen Kocjančič (Pogovor - Hitri odgovor) 15:59, 23 januar 2006 (UTC)
- Please let me know if some of the variants are using a definite article. Please post the answer
-
- The only thing that I know is {{ns:5}} = {{ns:Project_talk}}. There is Pogovor + 7sg (so -> Pogovor o Wikinavedku). Regards, --Klemen Kocjančič (Pogovor - Hitri odgovor) 15:59, 23 januar 2006 (UTC)
- Unless there is no "confirm" from you I will not post anything about activation at bugzilla:4685 – "LanguageSl.php hardcodes project namespace as Wikipedija".
- When you confirmed and no "???" are left I will remove the comment marks ("#" as first printable characters in lines) myself and update bugzilla:4685.
- Thanks and best regards Gangleri 15:44, 23 januar 2006 (UTC)
-
- I've checked the grammar with others and now it's alright. Regards, --Klemen Kocjančič (Pogovor - Hitri odgovor) 15:59, 23 januar 2006 (UTC)
[spremeni] please work here (new)
LanguageSk.php used an easier implementation. Please list below all grammatical cases that you know in Slovenian language, at least those which are used in special:Allmessages in the order you use them in your literure. w:en:Icelandic language is using the order nominativ, accusative, dativ, genitiv
.
Use first character either lower or upper case and all special characters you need.
(in alphabetical order; please change to usual order)
- ???accusative; English: Accusative case; used together with ...
- ???genitive ; English: Genitive case ; used together with ...
- ???instrumental ; English: Instrumental ; used together with ...
- ???locative ; English: Locative case ; used together with ...
- ???nominativ ; English: Nominative case ; used without prepositions
- ???nominativ ; English: Nominative case ; used together with ...
- Imenovalnik -> nominative
- Rodilnik -> genitive
- Dajalnik -> dativ
- Tožilnik -> accusative
- Mestnik -> locative
- Orodnik -> instrumental
[spremeni] alternative code
reference: oldid=3857 (code from LanguageSk.php)
# Convert from the nominative form of a noun to some other case
# Invoked with {{GRAMMAR:case|word}}
function convertGrammar( $word, $case ) {
case 'rodilnik': # genitive
if ( $word == 'Wikipedija' ) {
$word = 'Wikipedije';
} elseif ( $word == 'Wikiknjige' ) {
$word = 'Wikiknjig';
} elseif ( $word == 'Wikinovice' ) {
$word = 'Wikinovic';
} elseif ( $word == 'Wikinavedek' ) {
$word = 'Wikinavedka';
} elseif ( $word == 'Wikivir' ) {
$word = 'Wikivira';
} elseif ( $word == 'Wikislovar' ) {
$word = 'Wikislovarja';
}
break;
case 'dajalnik': # dativ
if ( $word == 'Wikipedija' ) {
$word = 'Wikipediji';
} elseif ( $word == 'Wikiknjige' ) {
$word = 'Wikiknjigam';
} elseif ( $word == 'Wikinovice' ) {
$word = 'Wikinovicam';
} elseif ( $word == 'Wikinavedek' ) {
$word = 'Wikinavedku';
} elseif ( $word == 'Wikivir' ) {
$word = 'Wikiviru';
} elseif ( $word == 'Wikislovar' ) {
$word = 'Wikislovarju';
break;
case 'tožilnik': # akuzatív
if ( $word == 'Wikipedija' ) {
$word = 'Wikipedijo';
} elseif ( $word == 'Wikiknjige' ) {
$word = 'Wikiknjige';
} elseif ( $word == 'Wikinovice' ) {
$word = 'Wikinovice';
} elseif ( $word == 'Wikinavedek' ) {
$word = 'Wikinavedek';
} elseif ( $word == 'Wikivir' ) {
$word = 'Wikivir';
} elseif ( $word == 'Wikislovar' ) {
$word = 'Wikislovar';
break;
case 'mestnik': # locative
if ( $word == 'Wikipedija' ) {
$word = 'z Wikipedijo';
} elseif ( $word == 'Wikiknjige' ) {
$word = 'z Wikiknjigami';
} elseif ( $word == 'Wikinovice' ) {
$word = 'z Wikinovicami';
} elseif ( $word == 'Wikinavedek' ) {
$word = 'z Wikinavedkom';
} elseif ( $word == 'Wikivir' ) {
$word = 'z Wikivirom';
} elseif ( $word == 'Wikislovar' ) {
$word = 'z Wikislovarjem';
break;
case 'orodnik': # instrumental
if ( $word == 'Wikipedija' ) {
$word = 'o Wikipediji';
} elseif ( $word == 'Wikiknjige' ) {
$word = 'o Wikiknjigah';
} elseif ( $word == 'Wikinovice' ) {
$word = 'o Wikinovicah';
} elseif ( $word == 'Wikinavedek' ) {
$word = 'o Wikinavedku';
} elseif ( $word == 'Wikivir' ) {
$word = 'o Wikiviru';
} elseif ( $word == 'Wikislovar' ) {
$word = 'o Wikislovarju';
break;
}
return $word; # this will return the original value for 'imenovalnik' (nominativ) and all undefined case values
}
[spremeni] wait / go ahead
- Please wait! Gangleri 17:25, 23 januar 2006 (UTC)
- Please go ahead! Gangleri 17:32, 23 januar 2006 (UTC)
OK for me!
- Klemen: I see two times accusative: one "imenovalnik" and another "tožilnik". Please confirm and make additional changes if necessary! Please confirm if OK for you. Best regards Gangleri | Th | T 19:34, 23 januar 2006 (UTC)
- I corrected the mistake. I hope that now is OK. The most problematic cases are mestnik in orodnik - because the propasitions must be part of them. If that will appear so, I think that it's OK. Regards, --Klemen Kocjančič (Pogovor - Hitri odgovor) 19:41, 23 januar 2006 (UTC)
[spremeni] What's next?
- Contancting w:fi:user:Nikerabbit and implementing the change. Hope it will work from the beginning. Best regards Gangleri | Th | T 21:13, 23 januar 2006 (UTC)
- As soon as these changes are live all MediaWiki messages need to be changed.
- Hardcoded SITENAME's and localized project names should be changed. Examples:
- w:sl:MediaWiki:Aboutpage T please compare with
w:fi:MediaWiki:Aboutpage T - w:sl:MediaWiki:Aboutsite T please compare with
w:fi:MediaWiki:Aboutsite T - w:sl:MediaWiki:Anonymous T please compare with
w:fi:MediaWiki:Anonymous T - ...
- w:sl:MediaWiki:Aboutpage T please compare with
- See also:
- bugzilla:02475 – "LanguageXx.php should not use localized namespaces in link translations it should use only generic namespaces"
- bugzilla:04361 – "Do not refer to nonexisting pages in LanguageXx.php"
- Please let me know where (at what project) you want to make the corrections. Then the MessagesSl.php should be changed and all other projects will be automatically updated.
- Best regards Gangleri | Th | T 21:13, 23 januar 2006 (UTC)
One notice: on w:sl:MediaWiki talk:Aboutpage the first {{msgnw:MediaWiki:{{PAGENAME}}}} is correct, the other two aren't (not slovene version). Is that intented to me so? Regards, --Klemen Kocjančič (Pogovor - Hitri odgovor) 21:25, 23 januar 2006 (UTC)
- Postes identical notes at w:sl:MediaWiki talk:Aboutpage, w:sl:MediaWiki talk:Aboutsite, w:sl:MediaWiki talk:Anonymous. Please verify again if bugzilla:04685 – "LanguageSl.php hardcodes project namespace as Wikipedija" is fixed. Regards Gangleri | Th | T 22:44, 23 januar 2006 (UTC)