Last modified: 2010-07-09 01:00:46 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 14604 - enhancement of languageConverter
enhancement of languageConverter
Product: MediaWiki
Classification: Unclassified
Language converter (Other open bugs)
All All
: Normal enhancement with 1 vote (vote)
: ---
Assigned To: fdcn
: parser, patch
Depends on:
  Show dependency treegraph
Reported: 2008-06-21 03:47 UTC by fdcn
Modified: 2010-07-09 01:00 UTC (History)
4 users (show)

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

enhancement of languageConverter (29.75 KB, patch)
2008-06-21 03:47 UTC, fdcn
fix unicode str error (1.22 KB, patch)
2008-06-27 07:45 UTC, fdcn
update for fix T conversion (3.69 KB, patch)
2008-07-04 14:16 UTC, fdcn
code refactoring and fix some bug (17.42 KB, patch)
2008-07-06 16:35 UTC, fdcn
major update (18.65 KB, patch)
2008-07-09 06:28 UTC, fdcn

Description fdcn 2008-06-21 03:47:27 UTC
Created attachment 5010 [details]
enhancement of languageConverter


   1. 修正单个转换bug: 之前-{zh-hant:繁}-不予转换
   2. 修正在__NOTC__下手动T转换导致标题转换的bug
   3. 修正在__NOCC__下导致T转换标签不能转换标题的bug
   4. 增加多重标签的用法,如:-{A;T|转换代码}-
   5. 增加单向转换     -{XX=>zh-hant:YY}-
   6. 增加隐藏全文转换   -{H|转换代码}- 同A标签类似,不过在代码处不显示转换后的文字
   7. 增加删除转换     -{-|转换代码}-
   8. 增加描述       -{D|转换代码}-
   9. 增加语言代码名称 -{N|xx}-  会返回xx语言代码的名称
  10. 增加多重variantfallbacks
  11. 增加对手动全文转换的限制 


   1. fixed a conversion code bug: before now the code "-{zh-hant:繁}-" won't be converted anymore.
   2. fixed a bug under __NOTC__ magicword: when used the -{T|}- conversion code, the title will be converted.
   3. fixed a bug under __NOCC__ magicword: when used the -{T|}- conversion code, the title should not be converted in -{T|}-.
   4. added a multi-tag support: e.g. -{A;T|convertion code}-
   5. added a unidirectional conversion flag: e.g. -{XX=>zh-hant:YY}-
   6. added a hide flag: e.g. -{+|convertion code}- same as A flag, but no display text in placed conversion code
   7. added a remove conversion flag: e.g. -{-|zh-hans:XX;zh-hant:YY}- remove zh-hans:XX;zh-hant:YY from mTables
   8. added a description flag: e.g. -{D|convertion code}-
   9. added a language name flag: e.g. when using the -{N|zh-hans}- code, it will return a language name like "中文(简体)"
  10. added the multi-variantfallbacks support
  11. added limit for manual alltext conversion
Comment 1 Shinjiman 2008-06-26 03:01:12 UTC
Thanks, applied on r36664.
Comment 2 fdcn 2008-06-27 07:45:04 UTC
Created attachment 5023 [details]
fix unicode str error

fix str error on Revision 36664
Comment 3 Shinjiman 2008-06-27 15:08:24 UTC
Applied on r36752.
Comment 4 fdcn 2008-07-04 14:16:05 UTC
Created attachment 5048 [details]
update for fix T conversion

fix -{T|XXX}- bug

marked private in some function
Comment 5 Shinjiman 2008-07-04 15:02:20 UTC
Applied on r37058.
Comment 6 Robert Stojnic 2008-07-04 16:41:55 UTC
The patch breaks when text within -{ }- tags contains semicolons, e.g. for -{chapter IV: the book}- no text will be displayed in any variant. 
Comment 7 fdcn 2008-07-06 03:45:26 UTC
@Robert Stojnic:

pls waitting..
Comment 8 fdcn 2008-07-06 16:35:50 UTC
Created attachment 5053 [details]
code refactoring and fix some bug

code refactoring (add class ConverterRule)

*fix breaks when text within -{ }- tags contains semicolons
*fix T conversion cache bug
Comment 9 Robert Stojnic 2008-07-06 17:31:36 UTC
Looks good, fixes the semicolon bug, committed in r37186.

Note however that T/NOTC caching still doesn't work (when parser cache is turned on, see bug 11785). Steps to reproduce:
1) add -{T|..}- or __NOTC__ to page
2) view page in couple of variants
3) force reload page in some of the viewed variants (shift-f5). the wrong title should appear.
Comment 10 fdcn 2008-07-09 06:28:33 UTC
Created attachment 5061 [details]
major update

fixed some conversion bug for allvariants.
modify behavior of -{A|text(no rules)}- or -{H|text(no rules)}- or -{-|text(no rules)}- for compatibility
Comment 11 Shinjiman 2008-07-09 08:16:54 UTC
Thanks, applied on r37373.

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