Index: trunk/phase3/languages/LanguageRo.php |
— | — | @@ -1,121 +1,130 @@ |
2 | 2 | <?php |
3 | | -/** |
4 | | - * @package MediaWiki |
5 | | - * @subpackage Language |
6 | | - */ |
| 3 | +/** Romanian (Română) |
| 4 | + * |
| 5 | + * @package MediaWiki |
| 6 | + * @subpackage Language |
| 7 | + */ |
7 | 8 | |
8 | | -require_once("LanguageUtf8.php"); |
| 9 | +require_once( 'LanguageUtf8.php' ); |
9 | 10 | |
10 | | -/* private */ $wgNamespaceNamesRo = array( |
11 | | - NS_MEDIA => 'Media', |
12 | | - NS_SPECIAL => 'Special', |
13 | | - NS_MAIN => '', |
14 | | - NS_TALK => 'Discuţie', |
15 | | - NS_USER => 'Utilizator', |
16 | | - NS_USER_TALK => 'Discuţie_Utilizator', |
17 | | - NS_PROJECT => $wgMetaNamespace, |
18 | | - NS_PROJECT_TALK => 'Discuţie_'.$wgMetaNamespace, |
19 | | - NS_IMAGE => 'Imagine', |
20 | | - NS_IMAGE_TALK => 'Discuţie_Imagine', |
21 | | - NS_MEDIAWIKI => 'MediaWiki', |
22 | | - NS_MEDIAWIKI_TALK => 'Discuţie_MediaWiki', |
23 | | - NS_TEMPLATE => 'Format', |
24 | | - NS_TEMPLATE_TALK => 'Discuţie_Format', |
25 | | - NS_HELP => 'Ajutor', |
26 | | - NS_HELP_TALK => 'Discuţie_Ajutor', |
27 | | - NS_CATEGORY => 'Categorie', |
28 | | - NS_CATEGORY_TALK => 'Discuţie_Categorie' |
| 11 | +if (!$wgCachedMessageArrays) { |
| 12 | + require_once('MessagesRo.php'); |
| 13 | +} |
29 | 14 | |
30 | | -) + $wgNamespaceNamesEn; |
| 15 | +class LanguageRo extends LanguageUtf8 { |
| 16 | + private $mMessagesRo, $mNamespaceNamesRo = null; |
31 | 17 | |
32 | | -/* private */ $wgQuickbarSettingsRo = array( |
33 | | - "Fără", "Fixă, în stânga", "Fixă, în dreapta", "Liberă" |
34 | | -); |
| 18 | + private $mQuickbarSettingsRo = array( |
| 19 | + 'Fără', 'Fixă, în stânga', 'Fixă, în dreapta', 'Liberă' |
| 20 | + ); |
| 21 | + |
| 22 | + private $mSkinNamesRo = array( |
| 23 | + 'standard' => 'Normală', |
| 24 | + 'nostalgia' => 'Nostalgie' |
| 25 | + ); |
| 26 | + |
| 27 | + private $mMagicWordsRo = array( |
| 28 | + # ID CASE SYNONYMS |
| 29 | + MAG_REDIRECT => array( 0, '#redirect' ), |
| 30 | + MAG_NOTOC => array( 0, '__NOTOC__', '__FARACUPRINS__' ), |
| 31 | + MAG_NOEDITSECTION => array( 0, '__NOEDITSECTION__', '__FARAEDITSECTIUNE__' ), |
| 32 | + MAG_START => array( 0, '__START__' ), |
| 33 | + MAG_CURRENTMONTH => array( 1, 'CURRENTMONTH', '{{NUMARLUNACURENTA}}' ), |
| 34 | + MAG_CURRENTMONTHNAME => array( 1, 'CURRENTMONTHNAME', '{{NUMELUNACURENTA}}' ), |
| 35 | + MAG_CURRENTDAY => array( 1, 'CURRENTDAY', '{{NUMARZIUACURENTA}}' ), |
| 36 | + MAG_CURRENTDAYNAME => array( 1, 'CURRENTDAYNAME', '{{NUMEZIUACURENTA}}' ), |
| 37 | + MAG_CURRENTYEAR => array( 1, 'CURRENTYEAR', '{{ANULCURENT}}' ), |
| 38 | + MAG_CURRENTTIME => array( 1, 'CURRENTTIME', '{{ORACURENTA}}' ), |
| 39 | + MAG_NUMBEROFARTICLES => array( 1, 'NUMBEROFARTICLES', '{{NUMARDEARTICOLE}}' ), |
| 40 | + MAG_CURRENTMONTHNAMEGEN => array( 1, 'CURRENTMONTHNAMEGEN', '{{NUMELUNACURENTAGEN}}' ), |
| 41 | + MAG_SUBST => array( 0, 'SUBST:' ), |
| 42 | + MAG_MSGNW => array( 0, 'MSGNW:', 'MSJNOU:' ), |
| 43 | + MAG_END => array( 0, '__END__', '__FINAL__' ), |
| 44 | + MAG_IMG_THUMBNAIL => array( 1, 'thumbnail', 'thumb' ), |
| 45 | + MAG_IMG_RIGHT => array( 1, 'right' ), |
| 46 | + MAG_IMG_LEFT => array( 1, 'left' ), |
| 47 | + MAG_IMG_NONE => array( 1, 'none' ), |
| 48 | + MAG_IMG_WIDTH => array( 1, '$1px' ), |
| 49 | + MAG_IMG_CENTER => array( 1, 'center', 'centre' ), |
| 50 | + MAG_INT => array( 0, 'INT:' ) |
| 51 | + ); |
35 | 52 | |
36 | | -/* private */ $wgSkinNamesRo = array( |
37 | | - 'standard' => "Normală", |
38 | | - 'nostalgia' => "Nostalgie" |
39 | | -) + $wgSkinNamesEn; |
| 53 | + |
| 54 | + function LanguageRo() { |
| 55 | + LanguageUtf8::LanguageUtf8(); |
40 | 56 | |
| 57 | + global $wgAllMessagesRo; |
| 58 | + $this->mMessagesRo =& $wgAllMessagesRo; |
41 | 59 | |
42 | | -/* private */ $wgDateFormatsRo = array( |
43 | | -# "Nici o preferinţă", |
44 | | -); |
| 60 | + global $wgMetaNamespace; |
| 61 | + $this->mNamespaceNamesRo = array( |
| 62 | + NS_MEDIA => 'Media', |
| 63 | + NS_SPECIAL => 'Special', |
| 64 | + NS_MAIN => '', |
| 65 | + NS_TALK => 'Discuţie', |
| 66 | + NS_USER => 'Utilizator', |
| 67 | + NS_USER_TALK => 'Discuţie_Utilizator', |
| 68 | + NS_PROJECT => $wgMetaNamespace, |
| 69 | + NS_PROJECT_TALK => 'Discuţie_'.$wgMetaNamespace, |
| 70 | + NS_IMAGE => 'Imagine', |
| 71 | + NS_IMAGE_TALK => 'Discuţie_Imagine', |
| 72 | + NS_MEDIAWIKI => 'MediaWiki', |
| 73 | + NS_MEDIAWIKI_TALK => 'Discuţie_MediaWiki', |
| 74 | + NS_TEMPLATE => 'Format', |
| 75 | + NS_TEMPLATE_TALK => 'Discuţie_Format', |
| 76 | + NS_HELP => 'Ajutor', |
| 77 | + NS_HELP_TALK => 'Discuţie_Ajutor', |
| 78 | + NS_CATEGORY => 'Categorie', |
| 79 | + NS_CATEGORY_TALK => 'Discuţie_Categorie' |
| 80 | + ); |
45 | 81 | |
46 | | -/* private */ $wgMagicWordsRo = array( |
47 | | -# ID CASE SYNONYMS |
48 | | - MAG_REDIRECT => array( 0, "#redirect" ), |
49 | | - MAG_NOTOC => array( 0, "__NOTOC__", "__FARACUPRINS__" ), |
50 | | - MAG_NOEDITSECTION => array( 0, "__NOEDITSECTION__", "__FARAEDITSECTIUNE__" ), |
51 | | - MAG_START => array( 0, "__START__" ), |
52 | | - MAG_CURRENTMONTH => array( 1, "CURRENTMONTH", "{{NUMARLUNACURENTA}}" ), |
53 | | - MAG_CURRENTMONTHNAME => array( 1, "CURRENTMONTHNAME", "{{NUMELUNACURENTA}}" ), |
54 | | - MAG_CURRENTDAY => array( 1, "CURRENTDAY", "{{NUMARZIUACURENTA}}" ), |
55 | | - MAG_CURRENTDAYNAME => array( 1, "CURRENTDAYNAME", "{{NUMEZIUACURENTA}}" ), |
56 | | - MAG_CURRENTYEAR => array( 1, "CURRENTYEAR", "{{ANULCURENT}}" ), |
57 | | - MAG_CURRENTTIME => array( 1, "CURRENTTIME", "{{ORACURENTA}}" ), |
58 | | - MAG_NUMBEROFARTICLES => array( 1, "NUMBEROFARTICLES", "{{NUMARDEARTICOLE}}" ), |
59 | | - MAG_CURRENTMONTHNAMEGEN => array( 1, "CURRENTMONTHNAMEGEN", "{{NUMELUNACURENTAGEN}}" ), |
60 | | - MAG_SUBST => array( 0, "SUBST:" ), |
61 | | - MAG_MSGNW => array( 0, "MSGNW:", "MSJNOU:" ), |
62 | | - MAG_END => array( 0, "__END__", "__FINAL__" ), |
63 | | - MAG_IMG_THUMBNAIL => array( 1, "thumbnail", "thumb" ), |
64 | | - MAG_IMG_RIGHT => array( 1, "right" ), |
65 | | - MAG_IMG_LEFT => array( 1, "left" ), |
66 | | - MAG_IMG_NONE => array( 1, "none" ), |
67 | | - MAG_IMG_WIDTH => array( 1, "$1px" ), |
68 | | - MAG_IMG_CENTER => array( 1, "center", "centre" ), |
69 | | - MAG_INT => array( 0, "INT:" ) |
| 82 | + } |
70 | 83 | |
71 | | - |
72 | | -); |
73 | | - |
74 | | -if (!$wgCachedMessageArrays) { |
75 | | - require_once('MessagesRo.php'); |
76 | | -} |
77 | | - |
78 | | -class LanguageRo extends LanguageUtf8 { |
79 | | - |
80 | 84 | function getNamespaces() { |
81 | | - global $wgNamespaceNamesRo; |
82 | | - return $wgNamespaceNamesRo; |
| 85 | + return $this->mNamespaceNamesRo + parent::getNamespaces(); |
83 | 86 | } |
84 | 87 | |
85 | 88 | function getQuickbarSettings() { |
86 | | - global $wgQuickbarSettingsRo; |
87 | | - return $wgQuickbarSettingsRo; |
| 89 | + return $this->mQuickbarSettingsRo; |
88 | 90 | } |
89 | 91 | |
90 | 92 | function getSkinNames() { |
91 | | - global $wgSkinNamesRo; |
92 | | - return $wgSkinNamesRo; |
| 93 | + return $this->mSkinNamesRo + parent::getSkinNames(); |
93 | 94 | } |
94 | 95 | |
95 | 96 | function getDateFormats() { |
96 | | - global $wgDateFormatsRo; |
97 | | - return $wgDateFormatsRo; |
| 97 | + return false; |
98 | 98 | } |
99 | 99 | |
100 | | - function timeanddate( $ts, $adj = false ) { |
101 | | - return $this->date( $ts, $adj ) . " " . $this->time( $ts, $adj ); |
| 100 | + function &getMagicWords() { |
| 101 | + $t = $this->mMagicWordsRo + parent::getMagicWords(); |
| 102 | + return $t; |
102 | 103 | } |
103 | 104 | |
104 | 105 | function getMessage( $key ) { |
105 | | - global $wgAllMessagesRo; |
106 | | - if( isset( $wgAllMessagesRo[$key] ) ) |
107 | | - return $wgAllMessagesRo[$key]; |
108 | | - else |
| 106 | + if( isset( $this->mMessagesRo[$key] ) ) { |
| 107 | + return $this->mMessagesRo[$key]; |
| 108 | + } else { |
109 | 109 | return parent::getMessage( $key ); |
| 110 | + } |
110 | 111 | } |
111 | 112 | |
| 113 | + function getAllMessages() { |
| 114 | + return $this->mMessagesRo; |
| 115 | + } |
| 116 | + |
| 117 | + function timeDateSeparator( $format ) { |
| 118 | + return ' '; |
| 119 | + } |
| 120 | + |
| 121 | + function timeBeforeDate() { |
| 122 | + return false; |
| 123 | + } |
| 124 | + |
112 | 125 | function fallback8bitEncoding() { |
113 | | - return "iso8859-2"; |
| 126 | + return 'iso8859-2'; |
114 | 127 | } |
115 | 128 | |
116 | | - function getMagicWords() { |
117 | | - global $wgMagicWordsRo; |
118 | | - return $wgMagicWordsRo; |
119 | | - } |
120 | 129 | } |
121 | 130 | |
122 | 131 | ?> |