Page MenuHomePhabricator

enhancement of languageConverter
Closed, ResolvedPublic

Assigned To
Authored By
Jun 21 2008, 3:47 AM
Referenced Files
F4984: Languageconversion.patch
Nov 21 2014, 10:14 PM
F4983: Languageconversion.patch
Nov 21 2014, 10:14 PM
F4982: Languageconversion.patch
Nov 21 2014, 10:14 PM
F4981: Languageconversion.patch
Nov 21 2014, 10:14 PM


Author: fdcn64

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语言代码的名称
  1. 增加多重variantfallbacks
  2. 增加对手动全文转换的限制


    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 "中文(简体)"
  1. added the multi-variantfallbacks support
  2. added limit for manual alltext conversion

Version: unspecified
Severity: enhancement




Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:14 PM
bzimport set Reference to bz14604.

fdcn64 wrote:

fix unicode str error

fix str error on Revision 36664


fdcn64 wrote:

update for fix T conversion

fix -{T|XXX}- bug

marked private in some function


rainman wrote:

The patch breaks when text within -{ }- tags contains semicolons, e.g. for -{chapter IV: the book}- no text will be displayed in any variant.

fdcn64 wrote:

@Robert Stojnic:

pls waitting..

fdcn64 wrote:

code refactoring and fix some bug

code refactoring (add class ConverterRule)

*fix breaks when text within -{ }- tags contains semicolons
*fix T conversion cache bug


rainman wrote:

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.

fdcn64 wrote:

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