Index: trunk/phase3/languages/LanguageNv.php |
— | — | @@ -29,17 +29,6 @@ |
30 | 30 | NS_CATEGORY_TALK => 'T\'ááłáhági_át\'éego_baa_yinísht\'į́' |
31 | 31 | ); |
32 | 32 | |
33 | | -/* private */ $wgDefaultUserOptionsNv = array( |
34 | | - 'quickbar' => 1, 'underline' => 1, 'hover' => 1, |
35 | | - 'cols' => 80, 'rows' => 25, 'searchlimit' => 20, |
36 | | - 'contextlines' => 5, 'contextchars' => 50, |
37 | | - 'skin' => $wgDefaultSkin, 'math' => 1, 'rcdays' => 7, 'rclimit' => 50, |
38 | | - 'highlightbroken' => 1, 'stubthreshold' => 0, |
39 | | - 'previewontop' => 1, 'editsection'=>1,'editsectiononrightclick'=>0, 'showtoc'=>1, |
40 | | - 'showtoolbar' =>1, |
41 | | - 'date' => 0 |
42 | | -); |
43 | | - |
44 | 33 | /* private */ $wgQuickbarSettingsNv = array( |
45 | 34 | 'None', 'Fixed left', 'Fixed right', 'Floating left' |
46 | 35 | ); |
— | — | @@ -179,11 +168,6 @@ |
180 | 169 | |
181 | 170 | class LanguageNv extends LanguageUtf8 { |
182 | 171 | |
183 | | - function getDefaultUserOptions () { |
184 | | - global $wgDefaultUserOptionsNv ; |
185 | | - return $wgDefaultUserOptionsNv ; |
186 | | - } |
187 | | - |
188 | 172 | function getBookstoreList () { |
189 | 173 | global $wgBookstoreListNv ; |
190 | 174 | return $wgBookstoreListNv ; |
— | — | @@ -245,25 +229,21 @@ |
246 | 230 | } |
247 | 231 | |
248 | 232 | /* by default we just return base form */ |
249 | | - function getMonthNameGen( $key ) |
250 | | - { |
| 233 | + function getMonthNameGen( $key ) { |
251 | 234 | return $this->getMonthName( $key ); |
252 | 235 | } |
253 | 236 | |
254 | | - function getMonthAbbreviation( $key ) |
255 | | - { |
| 237 | + function getMonthAbbreviation( $key ) { |
256 | 238 | global $wgMonthAbbreviationsNv; |
257 | 239 | return @$wgMonthAbbreviationsNv[$key-1]; |
258 | 240 | } |
259 | 241 | |
260 | | - function getWeekdayName( $key ) |
261 | | - { |
| 242 | + function getWeekdayName( $key ) { |
262 | 243 | global $wgWeekdayNamesNv; |
263 | 244 | return $wgWeekdayNamesNv[$key-1]; |
264 | 245 | } |
265 | 246 | |
266 | | - function getValidSpecialPages() |
267 | | - { |
| 247 | + function getValidSpecialPages() { |
268 | 248 | global $wgValidSpecialPagesNv; |
269 | 249 | return $wgValidSpecialPagesNv; |
270 | 250 | } |
Index: trunk/phase3/languages/LanguageGa.php |
— | — | @@ -44,16 +44,6 @@ |
45 | 45 | NS_CATEGORY_TALK => 'Plé_ranga' |
46 | 46 | ) + $wgNamespaceNamesEn; |
47 | 47 | |
48 | | -/* private */ $wgDefaultUserOptionsGa = array( |
49 | | - "quickbar" => 1, "underline" => 1, "hover" => 1, |
50 | | - "cols" => 80, "rows" => 25, "searchlimit" => 20, |
51 | | - "contextlines" => 5, "contextchars" => 50, |
52 | | - "skin" => $wgDefaultSkin, "math" => 1, "rcdays" => 7, "rclimit" => 50, |
53 | | - "highlightbroken" => 1, "stubthreshold" => 0, |
54 | | - "previewontop" => 1, "editsection"=>1,"editsectiononrightclick"=>0, "showtoc"=>1, |
55 | | - "date" => 0 |
56 | | -); |
57 | | - |
58 | 48 | /* private */ $wgQuickbarSettingsGa = array( |
59 | 49 | "Faic", "Greamaithe ar chlé", "Greamaithe ar an taobh deas", "Ag faoileáil ar chlé" |
60 | 50 | ); |
— | — | @@ -1460,87 +1450,76 @@ |
1461 | 1451 | |
1462 | 1452 | class LanguageGa extends LanguageUtf8 { |
1463 | 1453 | |
1464 | | - function getDefaultUserOptions () { |
1465 | | - global $wgDefaultUserOptionsGa ; |
1466 | | - return $wgDefaultUserOptionsGa ; |
1467 | | - } |
| 1454 | + function getBookstoreList () { |
| 1455 | + global $wgBookstoreListGa; |
| 1456 | + return $wgBookstoreListGa; |
| 1457 | + } |
1468 | 1458 | |
1469 | | - function getBookstoreList () { |
1470 | | - global $wgBookstoreListGa ; |
1471 | | - return $wgBookstoreListGa ; |
1472 | | - } |
| 1459 | + function getNamespaces() { |
| 1460 | + global $wgNamespaceNamesGa; |
| 1461 | + return $wgNamespaceNamesGa; |
| 1462 | + } |
1473 | 1463 | |
1474 | | - function getNamespaces() { |
1475 | | - global $wgNamespaceNamesGa; |
1476 | | - return $wgNamespaceNamesGa; |
1477 | | - } |
| 1464 | + function getNsText( $index ) { |
| 1465 | + global $wgNamespaceNamesGa; |
| 1466 | + return $wgNamespaceNamesGa[$index]; |
| 1467 | + } |
1478 | 1468 | |
1479 | | - function getNsText( $index ) { |
1480 | | - global $wgNamespaceNamesGa; |
1481 | | - return $wgNamespaceNamesGa[$index]; |
1482 | | - } |
| 1469 | + function getNsIndex( $text ) { |
| 1470 | + global $wgNamespaceNamesGa; |
1483 | 1471 | |
1484 | | - function getNsIndex( $text ) { |
1485 | | - global $wgNamespaceNamesGa; |
| 1472 | + foreach ( $wgNamespaceNamesGa as $i => $n ) { |
| 1473 | + if ( 0 == strcasecmp( $n, $text ) ) { return $i; } |
| 1474 | + } |
| 1475 | + /* Fallback to English names for compatibility */ |
| 1476 | + return Language::getNsIndex( $text ); |
| 1477 | + } |
1486 | 1478 | |
1487 | | - foreach ( $wgNamespaceNamesGa as $i => $n ) { |
1488 | | - if ( 0 == strcasecmp( $n, $text ) ) { return $i; } |
1489 | | - } |
1490 | | - /* Fallback to English names for compatibility */ |
1491 | | - return Language::getNsIndex( $text ); |
1492 | | - } |
| 1479 | + function getQuickbarSettings() { |
| 1480 | + global $wgQuickbarSettingsGa; |
| 1481 | + return $wgQuickbarSettingsGa; |
| 1482 | + } |
1493 | 1483 | |
1494 | | - function getQuickbarSettings() { |
1495 | | - global $wgQuickbarSettingsGa; |
1496 | | - return $wgQuickbarSettingsGa; |
1497 | | - } |
| 1484 | + function getSkinNames() { |
| 1485 | + global $wgSkinNamesGa; |
| 1486 | + return $wgSkinNamesGa; |
| 1487 | + } |
1498 | 1488 | |
1499 | | - function getSkinNames() { |
1500 | | - global $wgSkinNamesGa; |
1501 | | - return $wgSkinNamesGa; |
1502 | | - } |
| 1489 | + function getDateFormats() { |
| 1490 | + global $wgDateFormatsGa; |
| 1491 | + return $wgDateFormatsGa; |
| 1492 | + } |
1503 | 1493 | |
1504 | | - function getDateFormats() { |
1505 | | - global $wgDateFormatsGa; |
1506 | | - return $wgDateFormatsGa; |
1507 | | - } |
| 1494 | + function getValidSpecialPages() { |
| 1495 | + global $wgValidSpecialPagesGa; |
| 1496 | + return $wgValidSpecialPagesGa; |
| 1497 | + } |
1508 | 1498 | |
1509 | | - function getValidSpecialPages() |
1510 | | - { |
1511 | | - global $wgValidSpecialPagesGa; |
1512 | | - return $wgValidSpecialPagesGa; |
1513 | | - } |
| 1499 | + function getSysopSpecialPages() { |
| 1500 | + global $wgSysopSpecialPagesGa; |
| 1501 | + return $wgSysopSpecialPagesGa; |
| 1502 | + } |
1514 | 1503 | |
1515 | | - function getSysopSpecialPages() |
1516 | | - { |
1517 | | - global $wgSysopSpecialPagesGa; |
1518 | | - return $wgSysopSpecialPagesGa; |
1519 | | - } |
| 1504 | + function getDeveloperSpecialPages() { |
| 1505 | + global $wgDeveloperSpecialPagesGa; |
| 1506 | + return $wgDeveloperSpecialPagesGa; |
| 1507 | + } |
1520 | 1508 | |
1521 | | - function getDeveloperSpecialPages() |
1522 | | - { |
1523 | | - global $wgDeveloperSpecialPagesGa; |
1524 | | - return $wgDeveloperSpecialPagesGa; |
1525 | | - } |
1526 | | - |
1527 | | - function getMessage( $key ) |
1528 | | - { |
1529 | | - global $wgAllMessagesGa; |
| 1509 | + function getMessage( $key ) { |
| 1510 | + global $wgAllMessagesGa; |
1530 | 1511 | if( isset( $wgAllMessagesGa[$key] ) ) { |
1531 | 1512 | return $wgAllMessagesGa[$key]; |
1532 | 1513 | } else { |
1533 | 1514 | return Language::getMessage( $key ); |
1534 | 1515 | } |
1535 | | - } |
| 1516 | + } |
1536 | 1517 | |
1537 | | - function getAllMessages() |
1538 | | - { |
1539 | | - global $wgAllMessagesGa; |
1540 | | - return $wgAllMessagesGa; |
1541 | | - } |
| 1518 | + function getAllMessages() { |
| 1519 | + global $wgAllMessagesGa; |
| 1520 | + return $wgAllMessagesGa; |
| 1521 | + } |
1542 | 1522 | |
1543 | | - function getMagicWords() |
1544 | | - { |
| 1523 | + function getMagicWords() { |
1545 | 1524 | global $wgMagicWordsGa; |
1546 | 1525 | return $wgMagicWordsGa; |
1547 | 1526 | } |
Index: trunk/phase3/languages/LanguageOc.php |
— | — | @@ -921,35 +921,25 @@ |
922 | 922 | |
923 | 923 | ); |
924 | 924 | |
925 | | -class LanguageOc extends LanguageUtf8 |
926 | | -{ |
| 925 | +class LanguageOc extends LanguageUtf8{ |
927 | 926 | |
928 | | - function getDefaultUserOptions() |
929 | | - { |
930 | | - $opt = Language::getDefaultUserOptions(); |
931 | | - return $opt; |
| 927 | + function getBookstoreList () { |
| 928 | + global $wgBookstoreListOc ; |
| 929 | + return $wgBookstoreListOc ; |
932 | 930 | } |
933 | 931 | |
934 | | - function getBookstoreList () { |
935 | | - global $wgBookstoreListOc ; |
936 | | - return $wgBookstoreListOc ; |
937 | | - } |
938 | | - |
939 | | - function getNamespaces() |
940 | | - { |
| 932 | + function getNamespaces() { |
941 | 933 | global $wgNamespaceNamesOc; |
942 | 934 | return $wgNamespaceNamesOc; |
943 | 935 | } |
944 | 936 | |
945 | 937 | |
946 | | - function getNsText( $index ) |
947 | | - { |
| 938 | + function getNsText( $index ) { |
948 | 939 | global $wgNamespaceNamesOc; |
949 | 940 | return $wgNamespaceNamesOc[$index]; |
950 | 941 | } |
951 | 942 | |
952 | | - function getNsIndex( $text ) |
953 | | - { |
| 943 | + function getNsIndex( $text ) { |
954 | 944 | global $wgNamespaceNamesOc; |
955 | 945 | |
956 | 946 | foreach ( $wgNamespaceNamesOc as $i => $n ) |
— | — | @@ -961,27 +951,19 @@ |
962 | 952 | return false; |
963 | 953 | } |
964 | 954 | |
965 | | - function specialPage( $name ) |
966 | | - { |
967 | | - return $this->getNsText( Namespace::getSpecial() ) . ":" . $name; |
968 | | - } |
969 | | - |
970 | | - function getQuickbarSettings() |
971 | | - { |
| 955 | + function getQuickbarSettings() { |
972 | 956 | global $wgQuickbarSettingsOc; |
973 | 957 | return $wgQuickbarSettingsOc; |
974 | 958 | } |
975 | 959 | |
976 | | - function getSkinNames() |
977 | | - { |
| 960 | + function getSkinNames() { |
978 | 961 | global $wgSkinNamesOc; |
979 | 962 | return $wgSkinNamesOc; |
980 | 963 | } |
981 | 964 | |
982 | 965 | // Inherit userAdjust() |
983 | 966 | |
984 | | - function date( $ts, $adj = false ) |
985 | | - { |
| 967 | + function date( $ts, $adj = false ) { |
986 | 968 | if ( $adj ) { $ts = $this->userAdjust( $ts ); } |
987 | 969 | |
988 | 970 | $d = (0 + substr( $ts, 6, 2 )) . " " . |
— | — | @@ -990,39 +972,26 @@ |
991 | 973 | return $d; |
992 | 974 | } |
993 | 975 | |
994 | | - function time( $ts, $adj = false ) |
995 | | - { |
996 | | - if ( $adj ) { $ts = $this->userAdjust( $ts ); } |
997 | | - |
998 | | - $t = substr( $ts, 8, 2 ) . ":" . substr( $ts, 10, 2 ); |
999 | | - return $t; |
1000 | | - } |
1001 | | - |
1002 | | - function timeanddate( $ts, $adj = false ) |
1003 | | - { |
| 976 | + function timeanddate( $ts, $adj = false ) { |
1004 | 977 | return $this->date( $ts, $adj ) . " à " . $this->time( $ts, $adj ); |
1005 | 978 | } |
1006 | 979 | |
1007 | | - function getValidSpecialPages() |
1008 | | - { |
| 980 | + function getValidSpecialPages() { |
1009 | 981 | global $wgValidSpecialPagesOc; |
1010 | 982 | return $wgValidSpecialPagesOc; |
1011 | 983 | } |
1012 | 984 | |
1013 | | - function getSysopSpecialPages() |
1014 | | - { |
| 985 | + function getSysopSpecialPages() { |
1015 | 986 | global $wgSysopSpecialPagesOc; |
1016 | 987 | return $wgSysopSpecialPagesOc; |
1017 | 988 | } |
1018 | 989 | |
1019 | | - function getDeveloperSpecialPages() |
1020 | | - { |
| 990 | + function getDeveloperSpecialPages() { |
1021 | 991 | global $wgDeveloperSpecialPagesOc; |
1022 | 992 | return $wgDeveloperSpecialPagesOc; |
1023 | 993 | } |
1024 | 994 | |
1025 | | - function getMessage( $key ) |
1026 | | - { |
| 995 | + function getMessage( $key ) { |
1027 | 996 | global $wgAllMessagesOc, $wgAllMessagesEn; |
1028 | 997 | $m = $wgAllMessagesOc[$key]; |
1029 | 998 | |
Index: trunk/phase3/languages/LanguageKo.php |
— | — | @@ -24,15 +24,6 @@ |
25 | 25 | |
26 | 26 | ) + $wgNamespaceNamesEn; |
27 | 27 | |
28 | | -# I always compare this file with japanese file, when I'm confused. |
29 | | -# And DefaultUserOption isn't there in japanese one. What's |
30 | | -# this? I don't have to translate this. Am I right? |
31 | | - |
32 | | -# The Japanese file is a bit obsolete, so don't trust it too much! |
33 | | -# Don't translate the text strings here, but you can customize any |
34 | | -# option values if you like. These will be the defaults for any user |
35 | | -# who isn't logged in, or a newly created user account. |
36 | | - |
37 | 28 | /* private */ $wgQuickbarSettingsKo = array( |
38 | 29 | # "None", "Fixed left", "Fixed right", "Floating left" |
39 | 30 | "없음", "왼쪽 붙박이", "오른쪽 붙박이", "왼쪽 떠다님" |
— | — | @@ -884,11 +875,11 @@ |
885 | 876 | |
886 | 877 | class LanguageKo extends LanguageUtf8 { |
887 | 878 | |
888 | | - function getDefaultUserOptions () { |
889 | | - $opt = Language::getDefaultUserOptions(); |
890 | | - $opt["rcdays"]=14; |
891 | | - return $opt; |
892 | | - } |
| 879 | + function getDefaultUserOptions () { |
| 880 | + $opt = Language::getDefaultUserOptions(); |
| 881 | + $opt["rcdays"] = 14; |
| 882 | + return $opt; |
| 883 | + } |
893 | 884 | |
894 | 885 | function getBookstoreList () { |
895 | 886 | global $wgBookstoreListKo ; |
— | — | @@ -926,8 +917,7 @@ |
927 | 918 | |
928 | 919 | # Inherit default userAdjust() |
929 | 920 | |
930 | | - function date( $ts, $adj = false ) |
931 | | - { |
| 921 | + function date( $ts, $adj = false ) { |
932 | 922 | global $wgWeekdayAbbreviationsKo; |
933 | 923 | if ( $adj ) { $ts = $this->userAdjust( $ts ); } |
934 | 924 | |
— | — | @@ -944,41 +934,28 @@ |
945 | 935 | return $d; |
946 | 936 | } |
947 | 937 | |
948 | | - function time( $ts, $adj = false ) |
949 | | - { |
950 | | - if ( $adj ) { $ts = $this->userAdjust( $ts ); } |
951 | | - |
952 | | - $t = substr( $ts, 8, 2 ) . ":" . substr( $ts, 10, 2 ); |
953 | | - return $t; |
954 | | - } |
955 | | - |
956 | | - function timeanddate( $ts, $adj = false ) |
957 | | - { |
| 938 | + function timeanddate( $ts, $adj = false ) { |
958 | 939 | return $this->date( $ts, $adj ) . " " . $this->time( $ts, $adj ); |
959 | 940 | } |
960 | 941 | |
961 | 942 | # inherit function rfc1123( $ts ) |
962 | 943 | |
963 | | - function getValidSpecialPages() |
964 | | - { |
| 944 | + function getValidSpecialPages() { |
965 | 945 | global $wgValidSpecialPagesKo; |
966 | 946 | return $wgValidSpecialPagesKo; |
967 | 947 | } |
968 | 948 | |
969 | | - function getSysopSpecialPages() |
970 | | - { |
| 949 | + function getSysopSpecialPages() { |
971 | 950 | global $wgSysopSpecialPagesKo; |
972 | 951 | return $wgSysopSpecialPagesKo; |
973 | 952 | } |
974 | 953 | |
975 | | - function getDeveloperSpecialPages() |
976 | | - { |
| 954 | + function getDeveloperSpecialPages() { |
977 | 955 | global $wgDeveloperSpecialPagesKo; |
978 | 956 | return $wgDeveloperSpecialPagesKo; |
979 | 957 | } |
980 | 958 | |
981 | | - function getMessage( $key ) |
982 | | - { |
| 959 | + function getMessage( $key ) { |
983 | 960 | global $wgAllMessagesKo, $wgAllMessagesEn; |
984 | 961 | $m = $wgAllMessagesKo[$key]; |
985 | 962 | |
Index: trunk/phase3/languages/LanguageSl.php |
— | — | @@ -899,79 +899,74 @@ |
900 | 900 | #-------------------------------------------------------------------------- |
901 | 901 | |
902 | 902 | class LanguageSl extends LanguageUtf8 { |
903 | | - |
904 | | - function getDefaultUserOptions () { |
905 | | - $opt = Language::getDefaultUserOptions(); |
906 | | - return $opt; |
907 | | - } |
908 | | - |
909 | | - function getNamespaces() { |
910 | | - global $wgNamespaceNamesSl; |
911 | | - return $wgNamespaceNamesSl; |
912 | | - } |
913 | | - |
914 | | - function getNsText( $index ) { |
915 | | - global $wgNamespaceNamesSl; |
916 | | - return $wgNamespaceNamesSl[$index]; |
917 | | - } |
918 | | - |
919 | | - function getNsIndex( $text ) { |
920 | | - global $wgNamespaceNamesSl; |
921 | | - |
922 | | - foreach ( $wgNamespaceNamesSl as $i => $n ) { |
923 | | - if ( 0 == strcasecmp( $n, $text ) ) { return $i; } |
924 | | - } |
925 | | - if( 0 == strcasecmp( "Special", $text ) ) { return -1; } |
926 | | - if( 0 == strcasecmp( "User", $text ) ) { return 2; } |
927 | | - if( 0 == strcasecmp( "Wikipedia", $text ) ) { return 4; } |
928 | | - return false; |
929 | | - } |
930 | | - |
931 | | - function getQuickbarSettings() { |
932 | | - global $wgQuickbarSettingsSl; |
933 | | - return $wgQuickbarSettingsSl; |
934 | | - } |
935 | | - |
936 | | - function getSkinNames() { |
937 | | - global $wgSkinNamesSl; |
938 | | - return $wgSkinNamesSl; |
939 | | - } |
940 | | - |
941 | | - function getDateFormats() { |
942 | | - global $wgDateFormatsSl; |
943 | | - return $wgDateFormatsSl; |
944 | | - } |
945 | | - |
946 | | - function getValidSpecialPages() |
947 | | - { |
948 | | - global $wgValidSpecialPagesSl; |
949 | | - return $wgValidSpecialPagesSl; |
950 | | - } |
951 | | - |
952 | | - function getSysopSpecialPages() |
953 | | - { |
954 | | - global $wgSysopSpecialPagesSl; |
955 | | - return $wgSysopSpecialPagesSl; |
956 | | - } |
957 | | - |
958 | | - function getDeveloperSpecialPages() |
959 | | - { |
960 | | - global $wgDeveloperSpecialPagesSl; |
961 | | - return $wgDeveloperSpecialPagesSl; |
962 | | - } |
963 | | - |
964 | | - function getMessage( $key ) |
965 | | - { |
| 903 | + |
| 904 | + function getNamespaces() { |
| 905 | + global $wgNamespaceNamesSl; |
| 906 | + return $wgNamespaceNamesSl; |
| 907 | + } |
| 908 | + |
| 909 | + function getNsText( $index ) { |
| 910 | + global $wgNamespaceNamesSl; |
| 911 | + return $wgNamespaceNamesSl[$index]; |
| 912 | + } |
| 913 | + |
| 914 | + function getNsIndex( $text ) { |
| 915 | + global $wgNamespaceNamesSl; |
| 916 | + |
| 917 | + foreach ( $wgNamespaceNamesSl as $i => $n ) { |
| 918 | + if ( 0 == strcasecmp( $n, $text ) ) { return $i; } |
| 919 | + } |
| 920 | + if( 0 == strcasecmp( "Special", $text ) ) { return -1; } |
| 921 | + if( 0 == strcasecmp( "User", $text ) ) { return 2; } |
| 922 | + if( 0 == strcasecmp( "Wikipedia", $text ) ) { return 4; } |
| 923 | + return false; |
| 924 | + } |
| 925 | + |
| 926 | + function getQuickbarSettings() { |
| 927 | + global $wgQuickbarSettingsSl; |
| 928 | + return $wgQuickbarSettingsSl; |
| 929 | + } |
| 930 | + |
| 931 | + function getSkinNames() { |
| 932 | + global $wgSkinNamesSl; |
| 933 | + return $wgSkinNamesSl; |
| 934 | + } |
| 935 | + |
| 936 | + function getDateFormats() { |
| 937 | + global $wgDateFormatsSl; |
| 938 | + return $wgDateFormatsSl; |
| 939 | + } |
| 940 | + |
| 941 | + function getValidSpecialPages() |
| 942 | + { |
| 943 | + global $wgValidSpecialPagesSl; |
| 944 | + return $wgValidSpecialPagesSl; |
| 945 | + } |
| 946 | + |
| 947 | + function getSysopSpecialPages() |
| 948 | + { |
| 949 | + global $wgSysopSpecialPagesSl; |
| 950 | + return $wgSysopSpecialPagesSl; |
| 951 | + } |
| 952 | + |
| 953 | + function getDeveloperSpecialPages() |
| 954 | + { |
| 955 | + global $wgDeveloperSpecialPagesSl; |
| 956 | + return $wgDeveloperSpecialPagesSl; |
| 957 | + } |
| 958 | + |
| 959 | + function getMessage( $key ) |
| 960 | + { |
966 | 961 | global $wgAllMessagesSl; |
967 | 962 | if(array_key_exists($key, $wgAllMessagesSl)) |
968 | 963 | return $wgAllMessagesSl[$key]; |
969 | 964 | else |
970 | 965 | return Language::getMessage($key); |
971 | | - } |
972 | | - |
973 | | - function fallback8bitEncoding() { |
| 966 | + } |
| 967 | + |
| 968 | + function fallback8bitEncoding() { |
974 | 969 | return "iso-8859-2"; |
975 | | - } |
| 970 | + } |
976 | 971 | } |
977 | 972 | |
978 | 973 | ?> |
Index: trunk/phase3/languages/LanguageDa.php |
— | — | @@ -1122,11 +1122,6 @@ |
1123 | 1123 | |
1124 | 1124 | class LanguageDa extends LanguageUtf8 { |
1125 | 1125 | |
1126 | | - function getDefaultUserOptions () { |
1127 | | - $opt = Language::getDefaultUserOptions(); |
1128 | | - return $opt; |
1129 | | - } |
1130 | | - |
1131 | 1126 | function getBookstoreList () { |
1132 | 1127 | global $wgBookstoreListDa ; |
1133 | 1128 | return $wgBookstoreListDa ; |
— | — | @@ -1151,10 +1146,6 @@ |
1152 | 1147 | return false; |
1153 | 1148 | } |
1154 | 1149 | |
1155 | | - function specialPage( $name ) { |
1156 | | - return $this->getNsText( Namespace::getSpecial() ) . ":" . $name; |
1157 | | - } |
1158 | | - |
1159 | 1150 | function getQuickbarSettings() { |
1160 | 1151 | global $wgQuickbarSettingsDa; |
1161 | 1152 | return $wgQuickbarSettingsDa; |
— | — | @@ -1170,8 +1161,6 @@ |
1171 | 1162 | return $wgDateFormatsDa; |
1172 | 1163 | } |
1173 | 1164 | |
1174 | | - # Inherit userAdjust() |
1175 | | - |
1176 | 1165 | function date( $ts, $adj = false ) { |
1177 | 1166 | if ( $adj ) { $ts = $this->userAdjust( $ts ); } |
1178 | 1167 | |
— | — | @@ -1181,19 +1170,10 @@ |
1182 | 1171 | return $d; |
1183 | 1172 | } |
1184 | 1173 | |
1185 | | - function time( $ts, $adj = false ) { |
1186 | | - if ( $adj ) { $ts = $this->userAdjust( $ts ); } |
1187 | | - |
1188 | | - $t = substr( $ts, 8, 2 ) . ":" . substr( $ts, 10, 2 ); |
1189 | | - return $t; |
1190 | | - } |
1191 | | - |
1192 | 1174 | function timeanddate( $ts, $adj = false ) { |
1193 | 1175 | return $this->date( $ts, $adj ) . " kl. " . $this->time( $ts, $adj ); |
1194 | 1176 | } |
1195 | 1177 | |
1196 | | - # Inherit rfc1123() |
1197 | | - |
1198 | 1178 | function getValidSpecialPages() { |
1199 | 1179 | global $wgValidSpecialPagesDa; |
1200 | 1180 | return $wgValidSpecialPagesDa; |
— | — | @@ -1218,26 +1198,6 @@ |
1219 | 1199 | } |
1220 | 1200 | } |
1221 | 1201 | |
1222 | | - # Inherit iconv() |
1223 | | - |
1224 | | - # Inherit ucfirst() |
1225 | | - |
1226 | | - # Inherit lcfirst() |
1227 | | - |
1228 | | - # Inherit checkTitleEncoding() |
1229 | | - |
1230 | | - # Inherit stripForSearch() |
1231 | | - |
1232 | | - # Inherit setAltEncoding() |
1233 | | - |
1234 | | - # Inherit recodeForEdit() |
1235 | | - |
1236 | | - # Inherit recodeInput() |
1237 | | - |
1238 | | - # Inherit isRTL() |
1239 | | - |
1240 | | - # Inherit getMagicWords() |
1241 | | - |
1242 | 1202 | } |
1243 | 1203 | |
1244 | 1204 | ?> |
Index: trunk/phase3/languages/LanguageDe.php |
— | — | @@ -1184,14 +1184,10 @@ |
1185 | 1185 | |
1186 | 1186 | |
1187 | 1187 | ); |
| 1188 | + |
1188 | 1189 | class LanguageDe extends LanguageUtf8 { |
1189 | 1190 | |
1190 | | - function getDefaultUserOptions () { |
1191 | | - $opt = Language::getDefaultUserOptions(); |
1192 | | - return $opt; |
1193 | | - } |
1194 | | - |
1195 | | - function getBookstoreList () { |
| 1191 | + function getBookstoreList() { |
1196 | 1192 | global $wgBookstoreListDe ; |
1197 | 1193 | return $wgBookstoreListDe ; |
1198 | 1194 | } |
— | — | @@ -1215,10 +1211,6 @@ |
1216 | 1212 | return false; |
1217 | 1213 | } |
1218 | 1214 | |
1219 | | - function specialPage( $name ) { |
1220 | | - return $this->getNsText( Namespace::getSpecial() ) . ":" . $name; |
1221 | | - } |
1222 | | - |
1223 | 1215 | function getQuickbarSettings() { |
1224 | 1216 | global $wgQuickbarSettingsDe; |
1225 | 1217 | return $wgQuickbarSettingsDe; |
— | — | @@ -1229,10 +1221,7 @@ |
1230 | 1222 | return $wgSkinNamesDe; |
1231 | 1223 | } |
1232 | 1224 | |
1233 | | - # Inherit userAdjust() |
1234 | | - |
1235 | | - function date( $ts, $adj = false ) |
1236 | | - { |
| 1225 | + function date( $ts, $adj = false ) { |
1237 | 1226 | if ( $adj ) { $ts = $this->userAdjust( $ts ); } |
1238 | 1227 | |
1239 | 1228 | $d = (0 + substr( $ts, 6, 2 )) . ". " . |
— | — | @@ -1242,39 +1231,22 @@ |
1243 | 1232 | return $d; |
1244 | 1233 | } |
1245 | 1234 | |
1246 | | - function time( $ts, $adj = false ) |
1247 | | - { |
1248 | | - if ( $adj ) { $ts = $this->userAdjust( $ts ); } |
1249 | | - |
1250 | | - $t = substr( $ts, 8, 2 ) . ":" . substr( $ts, 10, 2 ); |
1251 | | - return $t; |
1252 | | - } |
1253 | | - |
1254 | | - function timeanddate( $ts, $adj = false ) |
1255 | | - { |
1256 | | - return $this->time( $ts, $adj ) . ", " . $this->date( $ts, $adj ); |
1257 | | - } |
1258 | | - |
1259 | | - function getValidSpecialPages() |
1260 | | - { |
| 1235 | + function getValidSpecialPages() { |
1261 | 1236 | global $wgValidSpecialPagesDe; |
1262 | 1237 | return $wgValidSpecialPagesDe; |
1263 | 1238 | } |
1264 | 1239 | |
1265 | | - function getSysopSpecialPages() |
1266 | | - { |
| 1240 | + function getSysopSpecialPages() { |
1267 | 1241 | global $wgSysopSpecialPagesDe; |
1268 | 1242 | return $wgSysopSpecialPagesDe; |
1269 | 1243 | } |
1270 | 1244 | |
1271 | | - function getDeveloperSpecialPages() |
1272 | | - { |
| 1245 | + function getDeveloperSpecialPages() { |
1273 | 1246 | global $wgDeveloperSpecialPagesDe; |
1274 | 1247 | return $wgDeveloperSpecialPagesDe; |
1275 | 1248 | } |
1276 | 1249 | |
1277 | | - function getMessage( $key ) |
1278 | | - { |
| 1250 | + function getMessage( $key ) { |
1279 | 1251 | global $wgAllMessagesDe; |
1280 | 1252 | if( isset( $wgAllMessagesDe[$key] ) ) { |
1281 | 1253 | return $wgAllMessagesDe[$key]; |
— | — | @@ -1283,7 +1255,6 @@ |
1284 | 1256 | } |
1285 | 1257 | } |
1286 | 1258 | |
1287 | | - |
1288 | 1259 | } |
1289 | 1260 | |
1290 | 1261 | ?> |
Index: trunk/phase3/languages/LanguageHe.php |
— | — | @@ -814,13 +814,13 @@ |
815 | 815 | |
816 | 816 | class LanguageHe extends LanguageUtf8 { |
817 | 817 | |
818 | | - function getDefaultUserOptions () { |
819 | | - $opt = Language::getDefaultUserOptions(); |
| 818 | + function getDefaultUserOptions () { |
| 819 | + $opt = Language::getDefaultUserOptions(); |
820 | 820 | $opt["quickbar"]=2; |
821 | | - return $opt; |
822 | | - } |
| 821 | + return $opt; |
| 822 | + } |
823 | 823 | |
824 | | - function getBookstoreList () { |
| 824 | + function getBookstoreList() { |
825 | 825 | global $wgBookstoreListHe ; |
826 | 826 | return $wgBookstoreListHe ; |
827 | 827 | } |
— | — | @@ -854,36 +854,32 @@ |
855 | 855 | return $wgSkinNamesHe; |
856 | 856 | } |
857 | 857 | |
858 | | - function getValidSpecialPages() |
859 | | - { |
| 858 | + function getValidSpecialPages() { |
860 | 859 | global $wgValidSpecialPagesHe; |
861 | 860 | return $wgValidSpecialPagesHe; |
862 | 861 | } |
863 | 862 | |
864 | | - function getSysopSpecialPages() |
865 | | - { |
| 863 | + function getSysopSpecialPages() { |
866 | 864 | global $wgSysopSpecialPagesHe; |
867 | 865 | return $wgSysopSpecialPagesHe; |
868 | 866 | } |
869 | 867 | |
870 | | - function getDeveloperSpecialPages() |
871 | | - { |
| 868 | + function getDeveloperSpecialPages() { |
872 | 869 | global $wgDeveloperSpecialPagesHe; |
873 | 870 | return $wgDeveloperSpecialPagesHe; |
874 | 871 | } |
875 | 872 | |
876 | | - function getMessage( $key ) |
877 | | - { |
878 | | - global $wgAllMessagesHe; |
879 | | - if(array_key_exists($key, $wgAllMessagesHe)) |
880 | | - return $wgAllMessagesHe[$key]; |
881 | | - else |
882 | | - return Language::getMessage($key); |
883 | | - } |
| 873 | + function getMessage( $key ) { |
| 874 | + global $wgAllMessagesHe; |
| 875 | + if(array_key_exists($key, $wgAllMessagesHe)) |
| 876 | + return $wgAllMessagesHe[$key]; |
| 877 | + else |
| 878 | + return Language::getMessage($key); |
| 879 | + } |
884 | 880 | |
885 | | - function isRTL() { return true; } |
| 881 | + function isRTL() { return true; } |
886 | 882 | |
887 | | - function fallback8bitEncoding() { return "iso8859-8"; } |
| 883 | + function fallback8bitEncoding() { return "iso8859-8"; } |
888 | 884 | |
889 | 885 | } |
890 | 886 | |
Index: trunk/phase3/languages/LanguagePl.php |
— | — | @@ -1076,132 +1076,78 @@ |
1077 | 1077 | ); |
1078 | 1078 | |
1079 | 1079 | class LanguagePl extends LanguageUtf8 { |
1080 | | - |
1081 | | - function getDefaultUserOptions () { |
1082 | | - $opt = Language::getDefaultUserOptions(); |
1083 | | - return $opt; |
1084 | | - } |
1085 | 1080 | |
1086 | | - function getNamespaces() { |
1087 | | - global $wgNamespaceNamesPl; |
1088 | | - return $wgNamespaceNamesPl; |
1089 | | - } |
| 1081 | + function getNamespaces() { |
| 1082 | + global $wgNamespaceNamesPl; |
| 1083 | + return $wgNamespaceNamesPl; |
| 1084 | + } |
1090 | 1085 | |
1091 | | - function getNsText( $index ) { |
1092 | | - global $wgNamespaceNamesPl; |
1093 | | - return $wgNamespaceNamesPl[$index]; |
1094 | | - } |
| 1086 | + function getNsText( $index ) { |
| 1087 | + global $wgNamespaceNamesPl; |
| 1088 | + return $wgNamespaceNamesPl[$index]; |
| 1089 | + } |
1095 | 1090 | |
1096 | | - function getNsIndex( $text ) { |
1097 | | - global $wgNamespaceNamesPl; |
| 1091 | + function getNsIndex( $text ) { |
| 1092 | + global $wgNamespaceNamesPl; |
1098 | 1093 | |
1099 | | - foreach ( $wgNamespaceNamesPl as $i => $n ) { |
1100 | | - if ( 0 == strcasecmp( $n, $text ) ) { return $i; } |
1101 | | - } |
1102 | | - return false; |
1103 | | - } |
| 1094 | + foreach ( $wgNamespaceNamesPl as $i => $n ) { |
| 1095 | + if ( 0 == strcasecmp( $n, $text ) ) { return $i; } |
| 1096 | + } |
| 1097 | + return false; |
| 1098 | + } |
1104 | 1099 | |
1105 | | - function getQuickbarSettings() { |
1106 | | - global $wgQuickbarSettingsPl; |
1107 | | - return $wgQuickbarSettingsPl; |
1108 | | - } |
| 1100 | + function getQuickbarSettings() { |
| 1101 | + global $wgQuickbarSettingsPl; |
| 1102 | + return $wgQuickbarSettingsPl; |
| 1103 | + } |
1109 | 1104 | |
1110 | | - function getSkinNames() { |
1111 | | - global $wgSkinNamesPl; |
1112 | | - return $wgSkinNamesPl; |
1113 | | - } |
| 1105 | + function getSkinNames() { |
| 1106 | + global $wgSkinNamesPl; |
| 1107 | + return $wgSkinNamesPl; |
| 1108 | + } |
1114 | 1109 | |
1115 | | - function getMonthNameGen( $key ) |
1116 | | - { |
1117 | | - global $wgMonthNamesGenEn; |
1118 | | - return wfMsg( $wgMonthNamesGenEn[$key-1] ); |
1119 | | - } |
| 1110 | + function getMonthNameGen( $key ) { |
| 1111 | + global $wgMonthNamesGenEn; |
| 1112 | + return wfMsg( $wgMonthNamesGenEn[$key-1] ); |
| 1113 | + } |
1120 | 1114 | |
| 1115 | + function date( $ts, $adj = false ) { |
| 1116 | + if ( $adj ) { $ts = $this->userAdjust( $ts ); } |
1121 | 1117 | |
1122 | | - function userAdjust( $ts ) |
1123 | | - { |
1124 | | - global $wgUser; |
| 1118 | + $d = (0 + substr( $ts, 6, 2 )) . |
| 1119 | + " " . $this->getMonthAbbreviation( substr( $ts, 4, 2 ) ) . |
| 1120 | + " " . substr( $ts, 0, 4 ); |
| 1121 | + return $d; |
| 1122 | + } |
1125 | 1123 | |
1126 | | - $diff = $wgUser->getOption( "timecorrection" ); |
1127 | | - if ( ! $diff ) { $diff = 0; } |
1128 | | - if ( 0 == $diff ) { return $ts; } |
| 1124 | + function getValidSpecialPages() { |
| 1125 | + global $wgValidSpecialPagesPl; |
| 1126 | + return $wgValidSpecialPagesPl; |
| 1127 | + } |
1129 | 1128 | |
1130 | | - $t = mktime( ( (int)substr( $ts, 8, 2) ) + $diff, |
1131 | | - (int)substr( $ts, 10, 2 ), (int)substr( $ts, 12, 2 ), |
1132 | | - (int)substr( $ts, 4, 2 ), (int)substr( $ts, 6, 2 ), |
1133 | | - (int)substr( $ts, 0, 4 ) ); |
1134 | | - return date( "YmdHis", $t ); |
1135 | | - } |
| 1129 | + function getSysopSpecialPages() { |
| 1130 | + global $wgSysopSpecialPagesPl; |
| 1131 | + return $wgSysopSpecialPagesPl; |
| 1132 | + } |
1136 | 1133 | |
1137 | | - function date( $ts, $adj = false ) |
1138 | | - { |
1139 | | - if ( $adj ) { $ts = $this->userAdjust( $ts ); } |
| 1134 | + function getDeveloperSpecialPages() { |
| 1135 | + global $wgDeveloperSpecialPagesPl; |
| 1136 | + return $wgDeveloperSpecialPagesPl; |
| 1137 | + } |
1140 | 1138 | |
1141 | | - $d = (0 + substr( $ts, 6, 2 )) . |
1142 | | - " " . $this->getMonthAbbreviation( substr( $ts, 4, 2 ) ) . |
1143 | | - " " . substr( $ts, 0, 4 ); |
1144 | | - return $d; |
1145 | | - } |
| 1139 | + function getMessage( $key ) { |
| 1140 | + global $wgAllMessagesPl; |
| 1141 | + if(array_key_exists($key, $wgAllMessagesPl)) |
| 1142 | + return $wgAllMessagesPl[$key]; |
| 1143 | + else |
| 1144 | + return Language::getMessage($key); |
| 1145 | + } |
1146 | 1146 | |
1147 | | - function time( $ts, $adj = false ) |
1148 | | - { |
1149 | | - if ( $adj ) { $ts = $this->userAdjust( $ts ); } |
| 1147 | + # Check for Latin-2 backwards-compatibility URLs |
| 1148 | + function fallback8bitEncoding() { |
| 1149 | + return "iso-8859-2"; |
| 1150 | + } |
1150 | 1151 | |
1151 | | - $t = substr( $ts, 8, 2 ) . ":" . substr( $ts, 10, 2 ); |
1152 | | - return $t; |
1153 | | - } |
1154 | | - |
1155 | | - function timeanddate( $ts, $adj = false ) |
1156 | | - { |
1157 | | - return $this->time( $ts, $adj ) . ", " . $this->date( $ts, $adj ); |
1158 | | - } |
1159 | | - |
1160 | | - function rfc1123( $ts ) |
1161 | | - { |
1162 | | - return date( "D, d M Y H:i:s T", $ts ); |
1163 | | - } |
1164 | | - |
1165 | | - function getValidSpecialPages() |
1166 | | - { |
1167 | | - global $wgValidSpecialPagesPl; |
1168 | | - return $wgValidSpecialPagesPl; |
1169 | | - } |
1170 | | - |
1171 | | - function getSysopSpecialPages() |
1172 | | - { |
1173 | | - global $wgSysopSpecialPagesPl; |
1174 | | - return $wgSysopSpecialPagesPl; |
1175 | | - } |
1176 | | - |
1177 | | - function getDeveloperSpecialPages() |
1178 | | - { |
1179 | | - global $wgDeveloperSpecialPagesPl; |
1180 | | - return $wgDeveloperSpecialPagesPl; |
1181 | | - } |
1182 | | - |
1183 | | - function getMessage( $key ) |
1184 | | - { |
1185 | | - global $wgAllMessagesPl; |
1186 | | - if(array_key_exists($key, $wgAllMessagesPl)) |
1187 | | - return $wgAllMessagesPl[$key]; |
1188 | | - else |
1189 | | - return Language::getMessage($key); |
1190 | | - } |
1191 | | - |
1192 | | - # Inherit ucfirst() and stripForSearch() from LanguageUtf8 |
1193 | | - |
1194 | | - function checkTitleEncoding( $s ) { |
1195 | | - # Check for Latin-2 backwards-compatibility URLs |
1196 | | - $ishigh = preg_match( '/[\x80-\xff]/', $s); |
1197 | | - $isutf = preg_match( '/^([\x00-\x7f]|[\xc0-\xdf][\x80-\xbf]|' . |
1198 | | - '[\xe0-\xef][\x80-\xbf]{2}|[\xf0-\xf7][\x80-\xbf]{3})+$/', $s ); |
1199 | | - |
1200 | | - if($ishigh and !$isutf) |
1201 | | - return iconv( "ISO-8859-2", "UTF-8", $s ); |
1202 | | - |
1203 | | - return $s; |
1204 | | - } |
1205 | | - |
1206 | 1152 | } |
1207 | 1153 | |
1208 | 1154 | ?> |
Index: trunk/phase3/languages/LanguageHu.php |
— | — | @@ -1160,26 +1160,22 @@ |
1161 | 1161 | return $wgDateFormatsHu; |
1162 | 1162 | } |
1163 | 1163 | |
1164 | | - function getValidSpecialPages() |
1165 | | - { |
| 1164 | + function getValidSpecialPages() { |
1166 | 1165 | global $wgValidSpecialPagesHu; |
1167 | 1166 | return $wgValidSpecialPagesHu; |
1168 | 1167 | } |
1169 | 1168 | |
1170 | | - function getSysopSpecialPages() |
1171 | | - { |
| 1169 | + function getSysopSpecialPages() { |
1172 | 1170 | global $wgSysopSpecialPagesHu; |
1173 | 1171 | return $wgSysopSpecialPagesHu; |
1174 | 1172 | } |
1175 | 1173 | |
1176 | | - function getDeveloperSpecialPages() |
1177 | | - { |
| 1174 | + function getDeveloperSpecialPages() { |
1178 | 1175 | global $wgDeveloperSpecialPagesHu; |
1179 | 1176 | return $wgDeveloperSpecialPagesHu; |
1180 | 1177 | } |
1181 | 1178 | |
1182 | | - function getMessage( $key ) |
1183 | | - { |
| 1179 | + function getMessage( $key ) { |
1184 | 1180 | global $wgAllMessagesHu; |
1185 | 1181 | if(array_key_exists($key, $wgAllMessagesHu)) |
1186 | 1182 | return $wgAllMessagesHu[$key]; |
— | — | @@ -1192,8 +1188,7 @@ |
1193 | 1189 | } |
1194 | 1190 | |
1195 | 1191 | # localised date and time |
1196 | | - function date( $ts, $adj = false ) |
1197 | | - { |
| 1192 | + function date( $ts, $adj = false ) { |
1198 | 1193 | if ( $adj ) { $ts = $this->userAdjust( $ts ); } |
1199 | 1194 | |
1200 | 1195 | $d = substr( $ts, 0, 4 ) . ". " . |
— | — | @@ -1202,14 +1197,6 @@ |
1203 | 1198 | return $d; |
1204 | 1199 | } |
1205 | 1200 | |
1206 | | - function time( $ts, $adj = false ) |
1207 | | - { |
1208 | | - if ( $adj ) { $ts = $this->userAdjust( $ts ); } |
1209 | | - |
1210 | | - $t = substr( $ts, 8, 2 ) . ":" . substr( $ts, 10, 2 ); |
1211 | | - return $t; |
1212 | | - } |
1213 | | - |
1214 | 1201 | function timeanddate( $ts, $adj = false ) |
1215 | 1202 | { |
1216 | 1203 | return $this->date( $ts, $adj ) . ", " . $this->time( $ts, $adj ); |
Index: trunk/phase3/languages/Language.php |
— | — | @@ -1737,32 +1737,27 @@ |
1738 | 1738 | return $wgLanguageNamesEn[$code]; |
1739 | 1739 | } |
1740 | 1740 | |
1741 | | - function getMonthName( $key ) |
1742 | | - { |
| 1741 | + function getMonthName( $key ) { |
1743 | 1742 | global $wgMonthNamesEn; |
1744 | 1743 | return wfMsg($wgMonthNamesEn[$key-1]); |
1745 | 1744 | } |
1746 | 1745 | |
1747 | 1746 | /* by default we just return base form */ |
1748 | | - function getMonthNameGen( $key ) |
1749 | | - { |
| 1747 | + function getMonthNameGen( $key ) { |
1750 | 1748 | return $this->getMonthName( $key ); |
1751 | 1749 | } |
1752 | 1750 | |
1753 | | - function getMonthAbbreviation( $key ) |
1754 | | - { |
| 1751 | + function getMonthAbbreviation( $key ) { |
1755 | 1752 | global $wgMonthAbbreviationsEn; |
1756 | 1753 | return wfMsg(@$wgMonthAbbreviationsEn[$key-1]); |
1757 | 1754 | } |
1758 | 1755 | |
1759 | | - function getWeekdayName( $key ) |
1760 | | - { |
| 1756 | + function getWeekdayName( $key ) { |
1761 | 1757 | global $wgWeekdayNamesEn; |
1762 | 1758 | return wfMsg($wgWeekdayNamesEn[$key-1]); |
1763 | 1759 | } |
1764 | 1760 | |
1765 | | - function userAdjust( $ts ) |
1766 | | - { |
| 1761 | + function userAdjust( $ts ) { |
1767 | 1762 | global $wgUser, $wgLocalTZoffset; |
1768 | 1763 | |
1769 | 1764 | $tz = $wgUser->getOption( 'timecorrection' ); |
— | — | @@ -1788,8 +1783,7 @@ |
1789 | 1784 | return date( 'YmdHis', $t ); |
1790 | 1785 | } |
1791 | 1786 | |
1792 | | - function date( $ts, $adj = false, $format = MW_DATE_USER_FORMAT ) |
1793 | | - { |
| 1787 | + function date( $ts, $adj = false, $format = MW_DATE_USER_FORMAT ) { |
1794 | 1788 | global $wgAmericanDates, $wgUser, $wgUseDynamicDates; |
1795 | 1789 | |
1796 | 1790 | $ts=wfTimestamp(TS_MW,$ts); |
— | — | @@ -1819,8 +1813,7 @@ |
1820 | 1814 | } |
1821 | 1815 | } |
1822 | 1816 | |
1823 | | - function time( $ts, $adj = false, $seconds = false ) |
1824 | | - { |
| 1817 | + function time( $ts, $adj = false, $seconds = false ) { |
1825 | 1818 | $ts=wfTimestamp(TS_MW,$ts); |
1826 | 1819 | |
1827 | 1820 | if ( $adj ) { $ts = $this->userAdjust( $ts ); } |
— | — | @@ -1832,44 +1825,37 @@ |
1833 | 1826 | return $this->formatNum( $t ); |
1834 | 1827 | } |
1835 | 1828 | |
1836 | | - function timeanddate( $ts, $adj = false, $format = MW_DATE_USER_FORMAT ) |
1837 | | - { |
| 1829 | + function timeanddate( $ts, $adj = false, $format = MW_DATE_USER_FORMAT ) { |
1838 | 1830 | $ts=wfTimestamp(TS_MW,$ts); |
1839 | 1831 | |
1840 | 1832 | return $this->time( $ts, $adj ) . ', ' . $this->date( $ts, $adj, $format ); |
1841 | 1833 | } |
1842 | 1834 | |
1843 | | - function rfc1123( $ts ) |
1844 | | - { |
| 1835 | + function rfc1123( $ts ) { |
1845 | 1836 | return date( 'D, d M Y H:i:s T', $ts ); |
1846 | 1837 | } |
1847 | 1838 | |
1848 | | - function getValidSpecialPages() |
1849 | | - { |
| 1839 | + function getValidSpecialPages() { |
1850 | 1840 | global $wgValidSpecialPagesEn; |
1851 | 1841 | return $wgValidSpecialPagesEn; |
1852 | 1842 | } |
1853 | 1843 | |
1854 | | - function getSysopSpecialPages() |
1855 | | - { |
| 1844 | + function getSysopSpecialPages() { |
1856 | 1845 | global $wgSysopSpecialPagesEn; |
1857 | 1846 | return $wgSysopSpecialPagesEn; |
1858 | 1847 | } |
1859 | 1848 | |
1860 | | - function getDeveloperSpecialPages() |
1861 | | - { |
| 1849 | + function getDeveloperSpecialPages() { |
1862 | 1850 | global $wgDeveloperSpecialPagesEn; |
1863 | 1851 | return $wgDeveloperSpecialPagesEn; |
1864 | 1852 | } |
1865 | 1853 | |
1866 | | - function getMessage( $key ) |
1867 | | - { |
| 1854 | + function getMessage( $key ) { |
1868 | 1855 | global $wgAllMessagesEn; |
1869 | 1856 | return @$wgAllMessagesEn[$key]; |
1870 | 1857 | } |
1871 | 1858 | |
1872 | | - function getAllMessages() |
1873 | | - { |
| 1859 | + function getAllMessages() { |
1874 | 1860 | global $wgAllMessagesEn; |
1875 | 1861 | return $wgAllMessagesEn; |
1876 | 1862 | } |
— | — | @@ -1968,15 +1954,13 @@ |
1969 | 1955 | function linkPrefixExtension() { return false; } |
1970 | 1956 | |
1971 | 1957 | |
1972 | | - function &getMagicWords() |
1973 | | - { |
| 1958 | + function &getMagicWords() { |
1974 | 1959 | global $wgMagicWordsEn; |
1975 | 1960 | return $wgMagicWordsEn; |
1976 | 1961 | } |
1977 | 1962 | |
1978 | 1963 | # Fill a MagicWord object with data from here |
1979 | | - function getMagic( &$mw ) |
1980 | | - { |
| 1964 | + function getMagic( &$mw ) { |
1981 | 1965 | $raw =& $this->getMagicWords(); |
1982 | 1966 | if( !isset( $raw[$mw->mId] ) ) { |
1983 | 1967 | # Fall back to English if local list is incomplete |
— | — | @@ -1988,8 +1972,7 @@ |
1989 | 1973 | } |
1990 | 1974 | |
1991 | 1975 | # Italic is unsuitable for some languages |
1992 | | - function emphasize( $text ) |
1993 | | - { |
| 1976 | + function emphasize( $text ) { |
1994 | 1977 | return '<em>'.$text.'</em>'; |
1995 | 1978 | } |
1996 | 1979 | |
— | — | @@ -2084,8 +2067,7 @@ |
2085 | 2068 | if(!array_key_exists(1, $choice)) { |
2086 | 2069 | /* a single choice */ |
2087 | 2070 | $text .= $choice{0}; |
2088 | | - } |
2089 | | - else { |
| 2071 | + } else { |
2090 | 2072 | $choice1=false; |
2091 | 2073 | $choice2=false; |
2092 | 2074 | foreach($choice as $c) { |
— | — | @@ -2120,21 +2102,21 @@ |
2121 | 2103 | /* this does the real conversion to the preferred variant. |
2122 | 2104 | see LanguageZh.php for example |
2123 | 2105 | */ |
2124 | | - function autoConvert($text, $toVariant=false) { |
| 2106 | + function autoConvert( $text, $toVariant=false ) { |
2125 | 2107 | return $text; |
2126 | 2108 | } |
2127 | 2109 | |
2128 | 2110 | /* hook for converting the title, which may needs special treatment |
2129 | 2111 | */ |
2130 | | - function convertTitle($text) { |
| 2112 | + function convertTitle( $text ) { |
2131 | 2113 | return $text; |
2132 | 2114 | } |
2133 | 2115 | |
2134 | 2116 | # returns a list of language variants for conversion. |
2135 | 2117 | # right now mainly used in the Chinese conversion |
2136 | 2118 | function getVariants() { |
2137 | | - $lang = strtolower(substr(get_class($this), 8)); |
2138 | | - return array($lang); |
| 2119 | + $lang = strtolower( substr( get_class( $this ), 8 ) ); |
| 2120 | + return array( $lang ); |
2139 | 2121 | } |
2140 | 2122 | |
2141 | 2123 | # in case some variant is not defined in the markup, we need |
— | — | @@ -2142,7 +2124,7 @@ |
2143 | 2125 | # will define zh-cn and zh-tw, but less so for zh-sg or zh-hk. |
2144 | 2126 | # when zh-sg is preferred but not defined, we will pick zh-cn |
2145 | 2127 | # in this case. right now this is only used by zh. |
2146 | | - function getVariantFallback($v) { |
| 2128 | + function getVariantFallback( $v ) { |
2147 | 2129 | return false; |
2148 | 2130 | } |
2149 | 2131 | |
— | — | @@ -2150,18 +2132,18 @@ |
2151 | 2133 | global $wgUser; |
2152 | 2134 | |
2153 | 2135 | // if user logged in, get in from user's preference |
2154 | | - if($wgUser->getID()!=0) |
2155 | | - return $wgUser->getOption('variant'); |
| 2136 | + if( $wgUser->getID() != 0 ) |
| 2137 | + return $wgUser->getOption( 'variant' ); |
2156 | 2138 | |
2157 | 2139 | // if we have multiple variants for this langauge, |
2158 | 2140 | // pick the first one as default |
2159 | | - $v=$this->getVariants() ; |
2160 | | - if(!empty($v)) |
| 2141 | + $v = $this->getVariants(); |
| 2142 | + if( !empty( $v ) ) |
2161 | 2143 | return $v{0}; |
2162 | 2144 | |
2163 | 2145 | // otherwise there should really be just one variant, |
2164 | 2146 | // get it from the class name |
2165 | | - $lang = strtolower(substr(get_class($this), 8)); |
| 2147 | + $lang = strtolower( substr( get_class( $this ), 8 ) ); |
2166 | 2148 | return $lang; |
2167 | 2149 | } |
2168 | 2150 | |
— | — | @@ -2171,20 +2153,20 @@ |
2172 | 2154 | tries to find it. |
2173 | 2155 | |
2174 | 2156 | */ |
2175 | | - function findVariantLink(&$link, &$nt) { |
| 2157 | + function findVariantLink( &$link, &$nt ) { |
2176 | 2158 | static $count=0; //used to limit this operation |
2177 | 2159 | global $wgDisableLangConversion, $wgContLang; |
2178 | | - if($wgDisableLangConversion) |
| 2160 | + if( $wgDisableLangConversion ) |
2179 | 2161 | return; |
2180 | 2162 | $variants = $wgContLang->getVariants(); |
2181 | | - if(sizeof($variants) > 1 && $count++<200) { |
2182 | | - if($nt->getArticleID() == 0) { |
2183 | | - foreach ( $variants as $v ) { |
2184 | | - if($v == $wgContLang->getPreferredVariant()) |
| 2163 | + if( sizeof( $variants ) > 1 && $count++ < 200 ) { |
| 2164 | + if( $nt->getArticleID() == 0 ) { |
| 2165 | + foreach( $variants as $v ) { |
| 2166 | + if( $v == $wgContLang->getPreferredVariant() ) |
2185 | 2167 | continue; |
2186 | | - $varlink = $wgContLang->autoConvert($link, $v); |
2187 | | - $varnt = Title::newFromText($varlink); |
2188 | | - if($varnt && $varnt->getArticleID()>0) { |
| 2168 | + $varlink = $wgContLang->autoConvert( $link, $v ); |
| 2169 | + $varnt = Title::newFromText( $varlink ); |
| 2170 | + if( $varnt && $varnt->getArticleID() > 0 ) { |
2189 | 2171 | $nt = $varnt; |
2190 | 2172 | $link = $varlink; |
2191 | 2173 | break; |
Index: trunk/phase3/languages/LanguageTt.php |
— | — | @@ -193,93 +193,84 @@ |
194 | 194 | |
195 | 195 | class LanguageTt extends LanguageUtf8 { |
196 | 196 | |
197 | | - function getDefaultUserOptions () { |
198 | | - $opt = Language::getDefaultUserOptions(); |
199 | | - return $opt; |
200 | | - } |
| 197 | + function getBookstoreList () { |
| 198 | + global $wgBookstoreListTt; |
| 199 | + return $wgBookstoreListTt; |
| 200 | + } |
201 | 201 | |
202 | | - function getBookstoreList () { |
203 | | - global $wgBookstoreListTt; |
204 | | - return $wgBookstoreListTt; |
205 | | - } |
| 202 | + function getNamespaces() { |
| 203 | + global $wgNamespaceNamesTt; |
| 204 | + return $wgNamespaceNamesTt; |
| 205 | + } |
206 | 206 | |
207 | | - function getNamespaces() { |
208 | | - global $wgNamespaceNamesTt; |
209 | | - return $wgNamespaceNamesTt; |
210 | | - } |
| 207 | + function getNsText( $index ) { |
| 208 | + global $wgNamespaceNamesTt; |
| 209 | + return $wgNamespaceNamesTt[$index]; |
| 210 | + } |
211 | 211 | |
212 | | - function getNsText( $index ) { |
213 | | - global $wgNamespaceNamesTt; |
214 | | - return $wgNamespaceNamesTt[$index]; |
215 | | - } |
| 212 | + function getNsIndex( $text ) { |
| 213 | + global $wgNamespaceNamesTt; |
216 | 214 | |
217 | | - function getNsIndex( $text ) { |
218 | | - global $wgNamespaceNamesTt; |
| 215 | + foreach ( $wgNamespaceNamesTt as $i => $n ) { |
| 216 | + if ( 0 == strcasecmp( $n, $text ) ) { return $i; } |
| 217 | + } |
| 218 | + return false; |
| 219 | + } |
219 | 220 | |
220 | | - foreach ( $wgNamespaceNamesTt as $i => $n ) { |
221 | | - if ( 0 == strcasecmp( $n, $text ) ) { return $i; } |
222 | | - } |
223 | | - return false; |
224 | | - } |
| 221 | + function getQuickbarSettings() { |
| 222 | + global $wgQuickbarSettingsTt; |
| 223 | + return $wgQuickbarSettingsTt; |
| 224 | + } |
225 | 225 | |
226 | | - function specialPage( $name ) { |
227 | | - return $this->getNsText( Namespace::getSpecial() ) . ":" . $name; |
228 | | - } |
| 226 | + function getSkinNames() { |
| 227 | + global $wgSkinNamesTt; |
| 228 | + return $wgSkinNamesTt; |
| 229 | + } |
229 | 230 | |
230 | | - function getQuickbarSettings() { |
231 | | - global $wgQuickbarSettingsTt; |
232 | | - return $wgQuickbarSettingsTt; |
233 | | - } |
| 231 | + function getDateFormats() { |
| 232 | + global $wgDateFormatsTt; |
| 233 | + return $wgDateFormatsTt; |
| 234 | + } |
234 | 235 | |
235 | | - function getSkinNames() { |
236 | | - global $wgSkinNamesTt; |
237 | | - return $wgSkinNamesTt; |
238 | | - } |
| 236 | + # Inherit userAdjust() |
239 | 237 | |
240 | | - function getDateFormats() { |
241 | | - global $wgDateFormatsTt; |
242 | | - return $wgDateFormatsTt; |
243 | | - } |
| 238 | + function date( $ts, $adj = false ) { |
| 239 | + if ( $adj ) { $ts = $this->userAdjust( $ts ); } |
244 | 240 | |
245 | | - # Inherit userAdjust() |
| 241 | + $d = (0 + substr( $ts, 6, 2 )) . ". " . |
| 242 | + $this->getMonthAbbreviation( substr( $ts, 4, 2 ) ) . " " . |
| 243 | + substr( $ts, 0, 4 ); |
| 244 | + return $d; |
| 245 | + } |
246 | 246 | |
247 | | - function date( $ts, $adj = false ) { |
248 | | - if ( $adj ) { $ts = $this->userAdjust( $ts ); } |
| 247 | + function time( $ts, $adj = false ) { |
| 248 | + if ( $adj ) { $ts = $this->userAdjust( $ts ); } |
249 | 249 | |
250 | | - $d = (0 + substr( $ts, 6, 2 )) . ". " . |
251 | | - $this->getMonthAbbreviation( substr( $ts, 4, 2 ) ) . " " . |
252 | | - substr( $ts, 0, 4 ); |
253 | | - return $d; |
254 | | - } |
| 250 | + $t = substr( $ts, 8, 2 ) . ":" . substr( $ts, 10, 2 ); |
| 251 | + return $t; |
| 252 | + } |
255 | 253 | |
256 | | - function time( $ts, $adj = false ) { |
257 | | - if ( $adj ) { $ts = $this->userAdjust( $ts ); } |
| 254 | + function timeanddate( $ts, $adj = false ) { |
| 255 | + return $this->date( $ts, $adj ) . ", " . $this->time( $ts, $adj ); |
| 256 | + } |
258 | 257 | |
259 | | - $t = substr( $ts, 8, 2 ) . ":" . substr( $ts, 10, 2 ); |
260 | | - return $t; |
261 | | - } |
| 258 | + # Inherit rfc1123() |
262 | 259 | |
263 | | - function timeanddate( $ts, $adj = false ) { |
264 | | - return $this->date( $ts, $adj ) . ", " . $this->time( $ts, $adj ); |
265 | | - } |
| 260 | + function getValidSpecialPages() { |
| 261 | + global $wgValidSpecialPagesTt; |
| 262 | + return $wgValidSpecialPagesTt; |
| 263 | + } |
266 | 264 | |
267 | | - # Inherit rfc1123() |
| 265 | + function getSysopSpecialPages() { |
| 266 | + global $wgSysopSpecialPagesTt; |
| 267 | + return $wgSysopSpecialPagesTt; |
| 268 | + } |
268 | 269 | |
269 | | - function getValidSpecialPages() { |
270 | | - global $wgValidSpecialPagesTt; |
271 | | - return $wgValidSpecialPagesTt; |
272 | | - } |
| 270 | + function getDeveloperSpecialPages() { |
| 271 | + global $wgDeveloperSpecialPagesTt; |
| 272 | + return $wgDeveloperSpecialPagesTt; |
| 273 | + } |
273 | 274 | |
274 | | - function getSysopSpecialPages() { |
275 | | - global $wgSysopSpecialPagesTt; |
276 | | - return $wgSysopSpecialPagesTt; |
277 | | - } |
278 | | - |
279 | | - function getDeveloperSpecialPages() { |
280 | | - global $wgDeveloperSpecialPagesTt; |
281 | | - return $wgDeveloperSpecialPagesTt; |
282 | | - } |
283 | | - |
284 | 275 | function getMessage( $key ) { |
285 | 276 | global $wgAllMessagesTt; |
286 | 277 | if( isset( $wgAllMessagesTt[$key] ) ) { |
— | — | @@ -289,32 +280,32 @@ |
290 | 281 | } |
291 | 282 | } |
292 | 283 | |
293 | | - # Inherit iconv() |
| 284 | + # Inherit iconv() |
294 | 285 | |
295 | | - # Inherit ucfirst() |
| 286 | + # Inherit ucfirst() |
296 | 287 | |
297 | | - # Inherit lcfirst() |
| 288 | + # Inherit lcfirst() |
298 | 289 | |
299 | | - # Inherit checkTitleEncoding() |
| 290 | + # Inherit checkTitleEncoding() |
300 | 291 | |
301 | | - # Inherit stripForSearch() |
| 292 | + # Inherit stripForSearch() |
302 | 293 | |
303 | | - # Inherit setAltEncoding() |
| 294 | + # Inherit setAltEncoding() |
304 | 295 | |
305 | | - # Inherit recodeForEdit() |
| 296 | + # Inherit recodeForEdit() |
306 | 297 | |
307 | | - # Inherit recodeInput() |
| 298 | + # Inherit recodeInput() |
308 | 299 | |
309 | | - # Inherit isRTL() |
| 300 | + # Inherit isRTL() |
310 | 301 | |
311 | | - # Inherit getMagicWords() |
| 302 | + # Inherit getMagicWords() |
312 | 303 | |
313 | | - function fallback8bitEncoding() { |
314 | | - # Windows codepage 1252 is a superset of iso 8859-1 |
315 | | - # override this to use difference source encoding to |
316 | | - # translate incoming 8-bit URLs. |
317 | | - return "windows-1254"; |
318 | | - } |
| 304 | + function fallback8bitEncoding() { |
| 305 | + # Windows codepage 1252 is a superset of iso 8859-1 |
| 306 | + # override this to use difference source encoding to |
| 307 | + # translate incoming 8-bit URLs. |
| 308 | + return "windows-1254"; |
| 309 | + } |
319 | 310 | } |
320 | 311 | |
321 | 312 | ?> |
Index: trunk/phase3/languages/LanguageAr.php |
— | — | @@ -1142,36 +1142,26 @@ |
1143 | 1143 | "," => "٬" |
1144 | 1144 | ); |
1145 | 1145 | |
1146 | | - # TODO: TRANSLATION! |
1147 | | - |
1148 | | - # Inherit everything except... |
1149 | | - |
1150 | | - function getNamespaces() |
1151 | | - { |
| 1146 | + function getNamespaces() { |
1152 | 1147 | global $wgNamespaceNamesAr; |
1153 | 1148 | return $wgNamespaceNamesAr; |
1154 | 1149 | } |
1155 | 1150 | |
1156 | | - |
1157 | | - function getNsText( $index ) |
1158 | | - { |
| 1151 | + function getNsText( $index ) { |
1159 | 1152 | global $wgNamespaceNamesAr; |
1160 | 1153 | return $wgNamespaceNamesAr[$index]; |
1161 | 1154 | } |
1162 | 1155 | |
1163 | | - function getNsIndex( $text ) |
1164 | | - { |
| 1156 | + function getNsIndex( $text ) { |
1165 | 1157 | global $wgNamespaceNamesAr; |
1166 | 1158 | |
1167 | | - foreach ( $wgNamespaceNamesAr as $i => $n ) |
1168 | | - { |
| 1159 | + foreach ( $wgNamespaceNamesAr as $i => $n ) { |
1169 | 1160 | if ( 0 == strcasecmp( $n, $text ) ) { return $i; } |
1170 | 1161 | } |
1171 | 1162 | return LanguageUtf8::getNsIndex( $text ); |
1172 | 1163 | } |
1173 | 1164 | |
1174 | | - function getMonthAbbreviation( $key ) |
1175 | | - { |
| 1165 | + function getMonthAbbreviation( $key ) { |
1176 | 1166 | /* No abbreviations in Arabic */ |
1177 | 1167 | return $this->getMonthName( $key ); |
1178 | 1168 | } |
— | — | @@ -1180,9 +1170,8 @@ |
1181 | 1171 | |
1182 | 1172 | function linkPrefixExtension() { return true; } |
1183 | 1173 | |
1184 | | - function getDefaultUserOptions () { |
1185 | | - global $wgDefaultUserOptionsEn; |
1186 | | - $opt = $wgDefaultUserOptionsEn; |
| 1174 | + function getDefaultUserOptions() { |
| 1175 | + $opt = parent::getDefaultUserOptions(); |
1187 | 1176 | |
1188 | 1177 | # Swap sidebar to right side by default |
1189 | 1178 | $opt['quickbar'] = 2; |
— | — | @@ -1192,27 +1181,16 @@ |
1193 | 1182 | return $opt ; |
1194 | 1183 | } |
1195 | 1184 | |
1196 | | - function checkTitleEncoding( $s ) { |
1197 | | - global $wgInputEncoding; |
1198 | | - |
1199 | | - # Check for non-UTF-8 URLs; assume they are windows-1256? |
1200 | | - $ishigh = preg_match( '/[\x80-\xff]/', $s); |
1201 | | - $isutf = ($ishigh ? preg_match( '/^([\x00-\x7f]|[\xc0-\xdf][\x80-\xbf]|' . |
1202 | | - '[\xe0-\xef][\x80-\xbf]{2}|[\xf0-\xf7][\x80-\xbf]{3})+$/', $s ) : true ); |
1203 | | - |
1204 | | - if( $ishigh and !$isutf ) |
1205 | | - return iconv( "windows-1256", "utf-8", $s ); |
1206 | | - |
1207 | | - return $s; |
| 1185 | + function fallback8bitEncoding() { |
| 1186 | + return "windows-1256"; |
1208 | 1187 | } |
1209 | 1188 | |
1210 | | - function getMessage( $key ) |
1211 | | - { |
1212 | | - global $wgAllMessagesAr, $wgAllMessagesEn; |
1213 | | - $m = $wgAllMessagesAr[$key]; |
| 1189 | + function getMessage( $key ) { |
| 1190 | + global $wgAllMessagesAr, $wgAllMessagesEn; |
| 1191 | + $m = $wgAllMessagesAr[$key]; |
1214 | 1192 | |
1215 | | - if ( "" == $m ) { return $wgAllMessagesEn[$key]; } |
1216 | | - else return $m; |
| 1193 | + if ( "" == $m ) { return $wgAllMessagesEn[$key]; } |
| 1194 | + else return $m; |
1217 | 1195 | } |
1218 | 1196 | |
1219 | 1197 | function formatNum( $number ) { |
Index: trunk/phase3/languages/LanguageEo.php |
— | — | @@ -1046,8 +1046,7 @@ |
1047 | 1047 | # Heredu userAdjust() |
1048 | 1048 | |
1049 | 1049 | # La dato- kaj tempo-funkciojn oni povas precizigi laŭ lingvo |
1050 | | - function date( $ts, $adj = false ) |
1051 | | - { |
| 1050 | + function date( $ts, $adj = false ) { |
1052 | 1051 | if ( $adj ) { $ts = $this->userAdjust( $ts ); } |
1053 | 1052 | |
1054 | 1053 | $d = (0 + substr( $ts, 6, 2 )) . ". " . |
— | — | @@ -1057,26 +1056,22 @@ |
1058 | 1057 | return $d; |
1059 | 1058 | } |
1060 | 1059 | |
1061 | | - function getValidSpecialPages() |
1062 | | - { |
| 1060 | + function getValidSpecialPages() { |
1063 | 1061 | global $wgValidSpecialPagesEo; |
1064 | 1062 | return $wgValidSpecialPagesEo; |
1065 | 1063 | } |
1066 | 1064 | |
1067 | | - function getSysopSpecialPages() |
1068 | | - { |
| 1065 | + function getSysopSpecialPages() { |
1069 | 1066 | global $wgSysopSpecialPagesEo; |
1070 | 1067 | return $wgSysopSpecialPagesEo; |
1071 | 1068 | } |
1072 | 1069 | |
1073 | | - function getDeveloperSpecialPages() |
1074 | | - { |
| 1070 | + function getDeveloperSpecialPages() { |
1075 | 1071 | global $wgDeveloperSpecialPagesEo; |
1076 | 1072 | return $wgDeveloperSpecialPagesEo; |
1077 | 1073 | } |
1078 | 1074 | |
1079 | | - function getMessage( $key ) |
1080 | | - { |
| 1075 | + function getMessage( $key ) { |
1081 | 1076 | global $wgAllMessagesEo; |
1082 | 1077 | if(array_key_exists($key, $wgAllMessagesEo)) |
1083 | 1078 | return $wgAllMessagesEo[$key]; |
— | — | @@ -1127,7 +1122,7 @@ |
1128 | 1123 | function checkTitleEncoding( $s ) { |
1129 | 1124 | global $wgInputEncoding; |
1130 | 1125 | |
1131 | | - # Check for X-system backwards-compatibility URLs |
| 1126 | + # Check for X-system backwards-compatibility URLs |
1132 | 1127 | $ishigh = preg_match( '/[\x80-\xff]/', $s); |
1133 | 1128 | $isutf = preg_match( '/^([\x00-\x7f]|[\xc0-\xdf][\x80-\xbf]|' . |
1134 | 1129 | '[\xe0-\xef][\x80-\xbf]{2}|[\xf0-\xf7][\x80-\xbf]{3})+$/', $s ); |
Index: trunk/phase3/languages/LanguageIs.php |
— | — | @@ -1123,7 +1123,7 @@ |
1124 | 1124 | function getDefaultUserOptions () { |
1125 | 1125 | global $wgDefaultUserOptionsIs; |
1126 | 1126 | return $wgDefaultUserOptionsIs; |
1127 | | - } |
| 1127 | + } |
1128 | 1128 | |
1129 | 1129 | function getBookstoreList () { |
1130 | 1130 | global $wgBookstoreListIs; |
— | — | @@ -1164,26 +1164,22 @@ |
1165 | 1165 | return $wgDateFormatsIs; |
1166 | 1166 | } |
1167 | 1167 | |
1168 | | - function getValidSpecialPages() |
1169 | | - { |
| 1168 | + function getValidSpecialPages() { |
1170 | 1169 | global $wgValidSpecialPagesIs; |
1171 | 1170 | return $wgValidSpecialPagesIs; |
1172 | 1171 | } |
1173 | 1172 | |
1174 | | - function getSysopSpecialPages() |
1175 | | - { |
| 1173 | + function getSysopSpecialPages() { |
1176 | 1174 | global $wgSysopSpecialPagesIs; |
1177 | 1175 | return $wgSysopSpecialPagesIs; |
1178 | 1176 | } |
1179 | 1177 | |
1180 | | - function getDeveloperSpecialPages() |
1181 | | - { |
| 1178 | + function getDeveloperSpecialPages() { |
1182 | 1179 | global $wgDeveloperSpecialPagesIs; |
1183 | 1180 | return $wgDeveloperSpecialPagesIs; |
1184 | 1181 | } |
1185 | 1182 | |
1186 | | - function getMessage( $key ) |
1187 | | - { |
| 1183 | + function getMessage( $key ) { |
1188 | 1184 | global $wgAllMessagesIs; |
1189 | 1185 | if( isset( $wgAllMessagesIs[$key] ) ) { |
1190 | 1186 | return $wgAllMessagesIs[$key]; |
— | — | @@ -1192,19 +1188,15 @@ |
1193 | 1189 | } |
1194 | 1190 | } |
1195 | 1191 | |
1196 | | - function getAllMessages() |
1197 | | - { |
| 1192 | + function getAllMessages() { |
1198 | 1193 | global $wgAllMessagesIs; |
1199 | 1194 | return $wgAllMessagesIs; |
1200 | 1195 | } |
1201 | 1196 | |
1202 | | - function getMagicWords() |
1203 | | - { |
| 1197 | + function getMagicWords() { |
1204 | 1198 | global $wgMagicWordsIs; |
1205 | 1199 | return $wgMagicWordsIs; |
1206 | 1200 | } |
1207 | 1201 | } |
1208 | 1202 | |
1209 | | -# @include_once( "Language" . ucfirst( $wgLanguageCode ) . ".php" ); |
1210 | | - |
1211 | 1203 | ?> |
Index: trunk/phase3/languages/LanguageFa.php |
— | — | @@ -1127,11 +1127,11 @@ |
1128 | 1128 | "," => "٬" |
1129 | 1129 | ); |
1130 | 1130 | |
1131 | | - function getDefaultUserOptions () { |
1132 | | - $opt = Language::getDefaultUserOptions(); |
1133 | | - $opt["quickbar"]=2; |
1134 | | - $opt["underline"]=0; |
1135 | | - return $opt; |
| 1131 | + function getDefaultUserOptions() { |
| 1132 | + $opt = Language::getDefaultUserOptions(); |
| 1133 | + $opt["quickbar"] = 2; |
| 1134 | + $opt["underline"] = 0; |
| 1135 | + return $opt; |
1136 | 1136 | } |
1137 | 1137 | |
1138 | 1138 | function getNamespaces() { |
— | — | @@ -1153,10 +1153,6 @@ |
1154 | 1154 | return false; |
1155 | 1155 | } |
1156 | 1156 | |
1157 | | - function specialPage( $name ) { |
1158 | | - return $this->getNsText( Namespace::getSpecial() ) . ":" . $name; |
1159 | | - } |
1160 | | - |
1161 | 1157 | function getQuickbarSettings() { |
1162 | 1158 | global $wgQuickbarSettingsFa; |
1163 | 1159 | return $wgQuickbarSettingsFa; |
— | — | @@ -1167,26 +1163,22 @@ |
1168 | 1164 | return $wgSkinNamesFa; |
1169 | 1165 | } |
1170 | 1166 | |
1171 | | - function getValidSpecialPages() |
1172 | | - { |
| 1167 | + function getValidSpecialPages() { |
1173 | 1168 | global $wgValidSpecialPagesFa; |
1174 | 1169 | return $wgValidSpecialPagesFa; |
1175 | 1170 | } |
1176 | 1171 | |
1177 | | - function getSysopSpecialPages() |
1178 | | - { |
| 1172 | + function getSysopSpecialPages() { |
1179 | 1173 | global $wgSysopSpecialPagesFa; |
1180 | 1174 | return $wgSysopSpecialPagesFa; |
1181 | 1175 | } |
1182 | 1176 | |
1183 | | - function getDeveloperSpecialPages() |
1184 | | - { |
| 1177 | + function getDeveloperSpecialPages() { |
1185 | 1178 | global $wgDeveloperSpecialPagesFa; |
1186 | 1179 | return $wgDeveloperSpecialPagesFa; |
1187 | 1180 | } |
1188 | 1181 | |
1189 | | - function getMessage( $key ) |
1190 | | - { |
| 1182 | + function getMessage( $key ) { |
1191 | 1183 | global $wgAllMessagesFa; |
1192 | 1184 | if(array_key_exists($key, $wgAllMessagesFa)) |
1193 | 1185 | return $wgAllMessagesFa[$key]; |
Index: trunk/phase3/languages/LanguageZh_cn.php |
— | — | @@ -31,7 +31,7 @@ |
32 | 32 | ) + $wgNamespaceNamesEn; |
33 | 33 | |
34 | 34 | /* private */ $wgQuickbarSettingsZh_cn = array( |
35 | | - "无", /* "None" */ |
| 35 | + "无", /* "None" */ |
36 | 36 | "左侧固定", /* "Fixed left" */ |
37 | 37 | "右侧固定", /* "Fixed right" */ |
38 | 38 | "左侧漂移" /* "Floating left" */ |
— | — | @@ -46,7 +46,7 @@ |
47 | 47 | 'davinci' => "DaVinci", |
48 | 48 | 'mono' => "Mono", |
49 | 49 | 'monobook' => "MonoBook", |
50 | | - "myskin" => "MySkin" |
| 50 | + 'myskin' => "MySkin" |
51 | 51 | ); |
52 | 52 | |
53 | 53 | |
— | — | @@ -953,11 +953,6 @@ |
954 | 954 | |
955 | 955 | class LanguageZh_cn extends LanguageUtf8 { |
956 | 956 | |
957 | | - function getDefaultUserOptions () { |
958 | | - $opt = Language::getDefaultUserOptions(); |
959 | | - return $opt; |
960 | | - } |
961 | | - |
962 | 957 | function getBookstoreList () { |
963 | 958 | global $wgBookstoreListZh_cn ; |
964 | 959 | return $wgBookstoreListZh_cn ; |
Index: trunk/phase3/languages/LanguageFo.php |
— | — | @@ -1,4 +1,4 @@ |
2 | | -<? |
| 2 | +<?php |
3 | 3 | |
4 | 4 | require_once( 'LanguageUtf8.php'); |
5 | 5 | |
— | — | @@ -226,11 +226,6 @@ |
227 | 227 | ); |
228 | 228 | class LanguageFo extends LanguageUtf8 { |
229 | 229 | |
230 | | - function getDefaultUserOptions () { |
231 | | - $opt = Language::getDefaultUserOptions(); |
232 | | - return $opt; |
233 | | - } |
234 | | - |
235 | 230 | function getBookstoreList () { |
236 | 231 | global $wgBookstoreListFo ; |
237 | 232 | return $wgBookstoreListFo ; |
— | — | @@ -255,10 +250,6 @@ |
256 | 251 | return false; |
257 | 252 | } |
258 | 253 | |
259 | | - function specialPage( $name ) { |
260 | | - return $this->getNsText( Namespace::getSpecial() ) . ":" . $name; |
261 | | - } |
262 | | - |
263 | 254 | function getQuickbarSettings() { |
264 | 255 | global $wgQuickbarSettingsFo; |
265 | 256 | return $wgQuickbarSettingsFo; |
— | — | @@ -276,8 +267,7 @@ |
277 | 268 | |
278 | 269 | # Inherit userAdjust() |
279 | 270 | |
280 | | - function date( $ts, $adj = false ) |
281 | | - { |
| 271 | + function date( $ts, $adj = false ) { |
282 | 272 | if ( $adj ) { $ts = $this->userAdjust( $ts ); } |
283 | 273 | |
284 | 274 | $d = (0 + substr( $ts, 6, 2 )) . ". " . |
— | — | @@ -286,41 +276,26 @@ |
287 | 277 | return $d; |
288 | 278 | } |
289 | 279 | |
290 | | - function time( $ts, $adj = false ) |
291 | | - { |
292 | | - if ( $adj ) { $ts = $this->userAdjust( $ts ); } |
293 | | - |
294 | | - $t = substr( $ts, 8, 2 ) . ":" . substr( $ts, 10, 2 ); |
295 | | - return $t; |
296 | | - } |
297 | | - |
298 | | - function timeanddate( $ts, $adj = false ) |
299 | | - { |
| 280 | + function timeanddate( $ts, $adj = false ) { |
300 | 281 | return $this->date( $ts, $adj ) . " kl. " . $this->time( $ts, $adj ); |
301 | 282 | } |
302 | 283 | |
303 | | - # Inherit rfc1123() |
304 | | - |
305 | | - function getValidSpecialPages() |
306 | | - { |
| 284 | + function getValidSpecialPages() { |
307 | 285 | global $wgValidSpecialPagesFo; |
308 | 286 | return $wgValidSpecialPagesFo; |
309 | 287 | } |
310 | 288 | |
311 | | - function getSysopSpecialPages() |
312 | | - { |
| 289 | + function getSysopSpecialPages() { |
313 | 290 | global $wgSysopSpecialPagesFo; |
314 | 291 | return $wgSysopSpecialPagesFo; |
315 | 292 | } |
316 | 293 | |
317 | | - function getDeveloperSpecialPages() |
318 | | - { |
| 294 | + function getDeveloperSpecialPages() { |
319 | 295 | global $wgDeveloperSpecialPagesFo; |
320 | 296 | return $wgDeveloperSpecialPagesFo; |
321 | 297 | } |
322 | 298 | |
323 | | - function getMessage( $key ) |
324 | | - { |
| 299 | + function getMessage( $key ) { |
325 | 300 | global $wgAllMessagesFo, $wgAllMessagesEn; |
326 | 301 | $m = $wgAllMessagesFo[$key]; |
327 | 302 | |
— | — | @@ -328,26 +303,6 @@ |
329 | 304 | else return $m; |
330 | 305 | } |
331 | 306 | |
332 | | - # Inherit iconv() |
333 | | - |
334 | | - # Inherit ucfirst() |
335 | | - |
336 | | - # Inherit lcfirst() |
337 | | - |
338 | | - # Inherit checkTitleEncoding() |
339 | | - |
340 | | - # Inherit stripForSearch() |
341 | | - |
342 | | - # Inherit setAltEncoding() |
343 | | - |
344 | | - # Inherit recodeForEdit() |
345 | | - |
346 | | - # Inherit recodeInput() |
347 | | - |
348 | | - # Inherit isRTL() |
349 | | - |
350 | | - # Inherit getMagicWords() |
351 | | - |
352 | 307 | } |
353 | 308 | |
354 | 309 | ?> |
Index: trunk/phase3/languages/LanguageFr.php |
— | — | @@ -1219,39 +1219,27 @@ |
1220 | 1220 | 'mw_math_mathml' => 'MathML', |
1221 | 1221 | ); |
1222 | 1222 | |
1223 | | -class LanguageFr extends LanguageUtf8 |
1224 | | -{ |
| 1223 | +class LanguageFr extends LanguageUtf8 { |
1225 | 1224 | |
1226 | | - function getDefaultUserOptions() |
1227 | | - { |
1228 | | - $opt = Language::getDefaultUserOptions(); |
1229 | | - return $opt; |
| 1225 | + function getBookstoreList () { |
| 1226 | + global $wgBookstoreListFr ; |
| 1227 | + return $wgBookstoreListFr ; |
1230 | 1228 | } |
1231 | 1229 | |
1232 | | - function getBookstoreList () { |
1233 | | - global $wgBookstoreListFr ; |
1234 | | - return $wgBookstoreListFr ; |
1235 | | - } |
1236 | | - |
1237 | | - function getNamespaces() |
1238 | | - { |
| 1230 | + function getNamespaces() { |
1239 | 1231 | global $wgNamespaceNamesFr; |
1240 | 1232 | return $wgNamespaceNamesFr; |
1241 | 1233 | } |
1242 | 1234 | |
1243 | | - |
1244 | | - function getNsText( $index ) |
1245 | | - { |
| 1235 | + function getNsText( $index ) { |
1246 | 1236 | global $wgNamespaceNamesFr; |
1247 | 1237 | return $wgNamespaceNamesFr[$index]; |
1248 | 1238 | } |
1249 | 1239 | |
1250 | | - function getNsIndex( $text ) |
1251 | | - { |
| 1240 | + function getNsIndex( $text ) { |
1252 | 1241 | global $wgNamespaceNamesFr, $wgSitename; |
1253 | 1242 | |
1254 | | - foreach ( $wgNamespaceNamesFr as $i => $n ) |
1255 | | - { |
| 1243 | + foreach ( $wgNamespaceNamesFr as $i => $n ) { |
1256 | 1244 | if ( 0 == strcasecmp( $n, $text ) ) { return $i; } |
1257 | 1245 | } |
1258 | 1246 | if( $wgSitename == "Wikipédia" ) { |
— | — | @@ -1261,19 +1249,12 @@ |
1262 | 1250 | return false; |
1263 | 1251 | } |
1264 | 1252 | |
1265 | | - function specialPage( $name ) |
1266 | | - { |
1267 | | - return $this->getNsText( Namespace::getSpecial() ) . ":" . $name; |
1268 | | - } |
1269 | | - |
1270 | | - function getQuickbarSettings() |
1271 | | - { |
| 1253 | + function getQuickbarSettings() { |
1272 | 1254 | global $wgQuickbarSettingsFr; |
1273 | 1255 | return $wgQuickbarSettingsFr; |
1274 | 1256 | } |
1275 | 1257 | |
1276 | | - function getSkinNames() |
1277 | | - { |
| 1258 | + function getSkinNames() { |
1278 | 1259 | global $wgSkinNamesFr; |
1279 | 1260 | return $wgSkinNamesFr; |
1280 | 1261 | } |
— | — | @@ -1281,8 +1262,7 @@ |
1282 | 1263 | |
1283 | 1264 | // Inherit userAdjust() |
1284 | 1265 | |
1285 | | - function date( $ts, $adj = false ) |
1286 | | - { |
| 1266 | + function date( $ts, $adj = false ) { |
1287 | 1267 | if ( $adj ) { $ts = $this->userAdjust( $ts ); } |
1288 | 1268 | |
1289 | 1269 | $d = (0 + substr( $ts, 6, 2 )) . " " . |
— | — | @@ -1291,39 +1271,26 @@ |
1292 | 1272 | return $d; |
1293 | 1273 | } |
1294 | 1274 | |
1295 | | - function time( $ts, $adj = false ) |
1296 | | - { |
1297 | | - if ( $adj ) { $ts = $this->userAdjust( $ts ); } |
1298 | | - |
1299 | | - $t = substr( $ts, 8, 2 ) . ":" . substr( $ts, 10, 2 ); |
1300 | | - return $t; |
1301 | | - } |
1302 | | - |
1303 | | - function timeanddate( $ts, $adj = false ) |
1304 | | - { |
| 1275 | + function timeanddate( $ts, $adj = false ) { |
1305 | 1276 | return $this->date( $ts, $adj ) . " à " . $this->time( $ts, $adj ); |
1306 | 1277 | } |
1307 | 1278 | |
1308 | | - function getValidSpecialPages() |
1309 | | - { |
| 1279 | + function getValidSpecialPages() { |
1310 | 1280 | global $wgValidSpecialPagesFr; |
1311 | 1281 | return $wgValidSpecialPagesFr; |
1312 | 1282 | } |
1313 | 1283 | |
1314 | | - function getSysopSpecialPages() |
1315 | | - { |
| 1284 | + function getSysopSpecialPages() { |
1316 | 1285 | global $wgSysopSpecialPagesFr; |
1317 | 1286 | return $wgSysopSpecialPagesFr; |
1318 | 1287 | } |
1319 | 1288 | |
1320 | | - function getDeveloperSpecialPages() |
1321 | | - { |
| 1289 | + function getDeveloperSpecialPages() { |
1322 | 1290 | global $wgDeveloperSpecialPagesFr; |
1323 | 1291 | return $wgDeveloperSpecialPagesFr; |
1324 | 1292 | } |
1325 | 1293 | |
1326 | | - function getMessage( $key ) |
1327 | | - { |
| 1294 | + function getMessage( $key ) { |
1328 | 1295 | global $wgAllMessagesFr, $wgAllMessagesEn; |
1329 | 1296 | if( isset( $wgAllMessagesFr[$key] ) ) { |
1330 | 1297 | return $wgAllMessagesFr[$key]; |
— | — | @@ -1332,7 +1299,6 @@ |
1333 | 1300 | } |
1334 | 1301 | } |
1335 | 1302 | |
1336 | | - function isRTL() { return false; } |
1337 | 1303 | } |
1338 | 1304 | |
1339 | 1305 | ?> |
Index: trunk/phase3/languages/LanguageNl.php |
— | — | @@ -905,13 +905,6 @@ |
906 | 906 | return $d; |
907 | 907 | } |
908 | 908 | |
909 | | - function time( $ts, $adj = false ) { |
910 | | - if ( $adj ) { $ts = $this->userAdjust( $ts ); } |
911 | | - |
912 | | - $t = substr( $ts, 8, 2 ) . ":" . substr( $ts, 10, 2 ); |
913 | | - return $t; |
914 | | - } |
915 | | - |
916 | 909 | function timeanddate( $ts, $adj = false ) { |
917 | 910 | return $this->date( $ts, $adj ) . " " . $this->time( $ts, $adj ); |
918 | 911 | } |
— | — | @@ -919,9 +912,8 @@ |
920 | 913 | function getValidSpecialPages() { |
921 | 914 | global $wgValidSpecialPagesNl; |
922 | 915 | return $wgValidSpecialPagesNl; |
923 | | - } |
| 916 | + } |
924 | 917 | |
925 | | - |
926 | 918 | function getSysopSpecialPages() { |
927 | 919 | global $wgSysopSpecialPagesNl; |
928 | 920 | return $wgSysopSpecialPagesNl; |
— | — | @@ -941,8 +933,6 @@ |
942 | 934 | } |
943 | 935 | } |
944 | 936 | |
945 | | - function isRTL() { return false; } |
946 | | - |
947 | 937 | # Inherit iconv(), ucfirst(), stripForSearch(), recodeForEdit(), recodeInput() |
948 | 938 | # since they are same as English/Latin1 |
949 | 939 | |
Index: trunk/phase3/languages/LanguageNn.php |
— | — | @@ -1324,7 +1324,7 @@ |
1325 | 1325 | function getDefaultUserOptions () { |
1326 | 1326 | global $wgDefaultUserOptionsNn; |
1327 | 1327 | return $wgDefaultUserOptionsNn; |
1328 | | - } |
| 1328 | + } |
1329 | 1329 | |
1330 | 1330 | function getQuickbarSettings() { |
1331 | 1331 | global $wgQuickbarSettingsNn; |