'''Allow wiki markup in language macros''' See also: AccessibleMoin, BieneAward2007 For best accessibility each language change should be marked with language macro, so that sreenreades can adapt the pronunciation accordingly. For example on a German wiki each Egnlish term should be marked with {{{[[en(Egnlish term)]]}}}. Adding inline markup for single words is easy using markup around the macro e.g {{{'''[[he(עברית)]]'''}}} however it is harder for a sentence in other language e.g. {{{[[he(כמה מילים בעברית)]]}}}. The suggestion is to allow some wiki markup in language macros, similar to the !FootNote macro. For example: {{{[[en(This ''is'' a '''text''' with /!\ markup)]]}}}. Here's a patch for !MoinMoin.macro._init_ (moin-1-6-main-4cfb61592fe4) {{{ def _m_lang(self, text): """ Set the current language for page content. Language macro are used in two ways: * [lang] - set the current language until next lang macro * [lang(text)] - insert text with specific lang inside page """ if text: Parser = wikiutil.getParser(self.request, text) # XXX FIXME parser injects unwanted opening (closing missing!) # of paragraph
return wikiutil.renderText(self.request, Parser, text, line_anchors=False).replace('
', '') self.request.current_lang = self.name return '' }}} ---- CategoryFeaturePatched