Commit graph

28 commits

Author SHA1 Message Date
Andrew Garrett
70464b0cdf Fix E_NOTICE in r55415 breaking Zh variants 2009-09-16 23:53:31 +00:00
Andrew Garrett
6b0be31e02 Partial revert of r55415, calling wfMsg in Language object constructor causes unstub loops 2009-09-16 23:50:29 +00:00
Philip Tzou
e05338c102 1. Revert my revision r55371. Since it may override logged user's settings.
2. Patch for situations that some wikis like zhwikisource may disabled some language variants. We should treat these disabled variants unacceptable in LanguageConverter.
2009-08-21 16:00:01 +00:00
Brion Vibber
ceedb37941 * (bug 8445) Multiple-character search terms are now handled properly for Chinese
Big fixup for Chinese word breaks and variant conversions in the MySQL search backend...
- removed redunant variant terms for Chinese, which forces all search indexing to canonical zh-hans
- added parens to properly group variants for languages such as Serbian which do need them at search time
- added quotes to properly group multi-word terms coming out of stripForSearch, as for Chinese where we segment up the characters. This is based on Language::hasWordBreaks() check.
- also cleaned up LanguageZh_hans::stripForSearch() to just do segmentation and pass on the Unicode stripping to the base Language implementation, avoiding scary code duplication. Segmentation was already pulled up to LanguageZh, but was being run again at the second level. :P
- made a fix to Chinese word segmentation to handle the case where a Han character is followed by a Latin char or numeral; a space is now added after as well. Spaces are then normalized for prettiness.
2009-06-24 02:27:51 +00:00
Philip Tzou
82a2dc03f5 New function to convert content text to specified language (only applies on wiki with
LanguageConverter class)
2009-03-04 06:56:37 +00:00
Philip Tzou
9b9bbbc485 1. Namespace translation for Chinese Language.
2. New function to convert namespace text for display. (only applies on wiki with LanguageConverter class)
2009-02-06 13:21:11 +00:00
Siebrand Mazeland
99733619ef Revert r46523, r46525. Spewing errors. See below. Behaviour observed on http://translatewiki.net.
PHP Notice:  Undefined property:  FakeConverter::$mMainLanguageCode in /var/www/w/languages/Language.php on line 2230
PHP Notice:  Undefined property:  FakeConverter::$mVariants in /var/www/w/languages/Language.php on line 2233
PHP Warning:  in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument in /var/www/w/languages/Language.php on line 2233
PHP Notice:  Undefined property:  FakeConverter::$mMainLanguageCode in /var/www/w/languages/Language.php on line 2234
2009-01-29 08:59:53 +00:00
Philip Tzou
3bea66b61a Move method 'getPreferredVariant' to Language class, patched by Fdcn. 2009-01-29 06:51:20 +00:00
Andrew Garrett
c06afd56b3 Revert "Follow up on r43982. Reduce dirname(__FILE__) calls in core and extensions."
Uses $dir in extension files, and assumes that it remains unchanged in require_once( 'maintenance/commandLine.inc' ).
In fact, it is likely that '$dir' will be set when setting up command-line, as some extensions will use the same var.

Recommended fix: Use $CentralAuth_dir, $EmailPage_dir, etc.
2008-11-30 03:15:22 +00:00
Siebrand Mazeland
daaa7f37a1 Follow up on r43982. Reduce dirname(__FILE__) calls in core and extensions. 2008-11-26 23:17:15 +00:00
Brion Vibber
7ebf0e431b * (bug 5477) Searches for words less than 4 characters now work without
requiring customization of MySQL server settings

Short words are padded so they now get indexed. Yay!

Adapted part of Werdna's patch, with some additional cleanup:
* Using 'U00' to pad instead of 'SMALL' to reduce false positives (eg search for "small*" could match "Smallville" and "SMALLc")
* Checking server's ft_min_word_len variable to see if we need to do anything. This preserves index compatibility with existing installations which have customized their index length.
* Some further cleanup on redundant code -- just toss everything through lc() and be done with it :D
* Cleaned out some more evals in zh and yue classes :P
* Fixed yue class to call the parent adjustor properly
2008-11-25 02:39:06 +00:00
Shinjiman
90628b9c48 * (bug 14604) Update LanguageConverter for compatibility on -{*|xxx}- usage
patch by fdcn
2008-07-09 08:16:39 +00:00
Robert Stojnić
3e1c8acb67 (bug 14604#c6): Fix regression in variant conversion when semicolon is within -{}- tags. Patch by fdcn, thanks! 2008-07-06 17:23:00 +00:00
Shinjiman
9bfe56aa37 fixing encoding problems on r36664
patch by fdcn
2008-06-27 15:08:07 +00:00
Shinjiman
69dbeb97f1 * (bug 14604) Introduced the following features for the LanguageConverter: Multi-tag support, single conversion flag, remove conversion flag on a single page, description flag, variant name, multi-variant fallbacks.
patch by fdcn
* Added zh-mo and zh-my variants for the zh language
2008-06-26 03:00:34 +00:00
Alexandre Emsenhuber
087a9f70c5 WARNING: HUGE COMMIT
Doxygen documentation update:
* Changed alls @addtogroup to @ingroup. @addtogroup adds the comment to the group description, but doesn't add the file, class, function, ... to the group like @ingroup does. See for example http://svn.wikimedia.org/doc/group__SpecialPage.html where it's impossible to see related files, classes, ... that should belong to that group.
* Added @file to file description, it seems that it should be explicitely decalred for file descriptions, otherwise doxygen will think that the comment document the first class, variabled, function, ... that is in that file.
* Removed some empty comments
* Removed some ?>

Added following groups:
* ExternalStorage
* JobQueue
* MaintenanceLanguage

One more thing: there are still a lot of warnings when generating the doc.
2008-05-20 17:13:28 +00:00
Siebrand Mazeland
555019a2c6 remove EOL whitespace, and excess empty lines 2008-05-17 17:10:18 +00:00
Shinjiman
3fa8b188cd set the variant fallback from zh-CN/zh-TW to zh 2007-12-03 11:55:44 +00:00
Shinjiman
9c1fea181a fixing zh-TW array to merging with zh-Hant instead of zh-Hans 2007-12-03 03:51:44 +00:00
Shinjiman
c7c389848b * (bug 451) adding a generic Traditional / Simplified Chinese conversion table, with their variants 2007-12-02 09:02:09 +00:00
Shinjiman
b6674ff4d3 * updating the manual tables, fixing some conversion errors, and regenerate the ZhConversion.php using the scripts and manual tables
* minor cleanup for the LanguageZh.php
2007-12-02 03:41:12 +00:00
Raimond Spekking
0b37df653c * (bug 11284) Update Chinese translations
Patch by Shinjiman
2007-09-27 15:40:35 +00:00
Aryeh Gregor
a15c419b3d Remove ?>'s from files. They're pointless, and just asking for people to mess with the files and add trailing whitespace. (Yes, I looked over every one and reverted those that were bogus. Slash-enter a million times in less worked well enough, although it was a bit mind-numbing.) 2007-06-29 01:19:14 +00:00
Brion Vibber
72a4abe588 * Skip additional setting of include_path in commandLine.inc (for non-Wikimedia mode)
* Fix some scripts that assumed include_path was set with various additional directories
Stuff now seems to mostly work when not overriding include_path.
Taking that out of LocalSettings is the next step... whee!
2007-06-06 16:01:14 +00:00
Antoine Musso
c771fc9c96 Use Doxygen @addtogroup instead of phpdoc @package && @subpackage 2007-01-20 15:09:52 +00:00
Antoine Musso
53a89fc564 * someone forgot to declare a method static
* compatibility issue in zhconvert
2006-12-14 20:47:19 +00:00
Tim Starling
2f12a58d93 * Introduced StringUtils.php, populated it with some generic string functions, both new and collected from various other files.
* Removed some backtracking regexes with an O(N^2) worst case, replaced with StringUtils::delimiterReplace(). There is a beneficial functional difference: /*/ is no longer considered to be a complete CSS comment.
* Changed the parser strip state from an array to an object. This should hopefully avoid the PHP bugs with array references. StripState uses the new ReplacementArray to do the replacements, thereby supporting FSS. 
* Removed DatabaseFunctions.php from the default startup sequence. Moved wfGetDB() to GlobalFunctions.php.
* Introduced the SiteStats class, with a collection of cached site stats accessor functions.
* Removed all global functions from Parser.php, they don't belong there.
* Made LanguageConverter use the new ReplacementArray class instead of managing its own FSS objects.
2006-11-21 09:53:45 +00:00
Tim Starling
157a8106ac Restructured the languages directory, to avoid problems when people untar MW 1.8 over the top of a 1.7 installation. 2006-10-04 01:39:28 +00:00
Renamed from languages/LanguageZh.php (Browse further)