Page MenuHomePhabricator

Add magic word to enable LanguageConverter only in marked pages
Open, MediumPublicFeature

Description

Currently the LanguageConverter is enabled for all pages and can be disabled in individual pages by using NOCONTENTCONVERT (or NOCC).[1]

At Wikisources we are considering[2] the use of Language Converter as an improvement in the current "Modernization" Javascripts[3][4], but the current use of this kind of tool at Wikisource is in a per page basis so that it is only available an option to see the modernized if the page was reviewed by some editor, which then adds the corresponding template[5][6] to the page.

For the use of LanguageConverter as the replacement for the script, we would need to be able to do that again, I mean, to show the Conversion menu only if the page was marked with the magic word.

The new magic word/behavior switch could be called something like CONTENTCONVERT and CC, in analogy to the existent ones.

Maybe this request is related or blocked by Bug 18958 ( T20958 ), I don't know for sure.

[1] http://meta.wikimedia.org/wiki/Help:Magic_words#Other
[2] http://wikisource.org/w/index.php?title=Wikisource:Scriptorium&oldid=298863#Using_LanguageConverter_syntax_at_Wikisources
[3] http://wikisource.org/w/index.php?title=MediaWiki:Modernisation.js
[4] http://pt.wikisource.org/wiki/Usuário:Heldergeovane/Scripts/Modernisation.js
[5] http://pt.wikisource.org/wiki/Predefini%C3%A7%C3%A3o:Moderniza%C3%A7%C3%A3o_autom%C3%A1tica
[6] http://fr.wikisource.org/wiki/Mod%C3%A8le:Modernisation


Version: unspecified
Severity: enhancement

Details

Reference
bz25497

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:17 PM
bzimport set Reference to bz25497.
bzimport added a subscriber: Unknown Object (MLST).

PhiLiP.NPC wrote:

Language Converter now uses PHP's strtr() as its core converter. It won't divide words by any [[:en:word divider]]. An alternative converter need to be developed to meet this demand instead of the current one.

Well, that is actually useful in some cases (for example when dealing with some variations of a word - like plurals, verb conjugation, etc...), so ideally both approaches would be desirable:

  1. The current "forwards maximum match algorithm", which doesn't consider word dividers; This is useful to enable us to use just "accident => acident" instead of all these (and others):
  2. accidentada => acidentada
  3. accidentado => acidentado
  4. accidentados => acidentados
  5. accidentais => acidentais
  6. accidental => acidental
  7. accidentalmente => acidentalmente
  8. accidente => acidente
  9. accidentes => acidentes
  10. ...
  1. A way to additionally define rules which are matched only when surrounded by word boundaries. This would give us the possibility to use "ação => acção" without having to set every combination of the string "ação" with other letters which could form new words, as in
  2. ação => acção
    • coração => coração
    • relação => relação
    • situação => situação
    • ...

Anyway, this isn't really what this bug is about (I should probably create another one about this).

Here I'm reporting the need of a way to enable the conversion per page. Besides the possible use at Wikisources, this would also be an option to give some way for editors from Portuguese Wikipedia to test the system before implementing it there. The other alternative I've asked about is to add the LanguageConverter to some prototype wiki where we can experiment with it, but it seems from
http://lists.wikimedia.org/pipermail/wikitech-l/2010-August/048809.html
that the bug 18958 makes this impossible at the moment (although I didn't understand what exactly can not be disabled using $wgDisableLangConversion)

Aklapper changed the subtype of this task from "Task" to "Feature Request".Feb 4 2022, 12:24 PM
Aklapper removed a subscriber: wikibugs-l-list.