Last modified: 2013-12-03 08:47:13 UTC
Some GRAMMAR routines add isolated words such as grammatical articles, prepositions and postpositions around (possibly inflected) words, which usually are wiki names. When these words are to be bolded, italicized, or anything the like, translators currently have the choice to either drop this formatting, or appy it to the entire group of words yielded by a GRAMMAR routine. Neither of these is often desirable. What was generally needed is something wraped around the word passed to GRAMMAR after inflection, but before any extra words or particles are added before or after it. What exactly should undergo formatting or the like, and what should not, would be language dependant and thus has to be dealt with inside the GRAMMAR converter routines. I propose extending its syntax from {{GRAMMAR:case|word}} to {{GRAMMAR:case|word|before|after}} with two optional paramters which shall be put in front of and behind the word "word", respectively. Thus, e.g. for uselang=ksh {{ucfirst:{{GRAMMAR: Dativ, en |{{SITENAME}}|<i>|</i>}}}} would show as either of: En de <i>Wikipedia</i> Em <i>WikiTravel</i> depending on the grammatical gender of {{SITENAME}}. I believe, this is fairly easily coded, and for the most if not all GRAMMAR routines, I do volunteer implementing it. I've made this bug report mainly in order to collect feedback and possible additons or enhancements that I am not aware of. Thanks!
Maybe {{ucfirst:{{GRAMMAR: Dativ, en |{{SITENAME}}|''$1''}}}} is better, because you can use $1 in more places.
There is a use case where HTML link syntax should be pulled inside GRAMMAR, see https://translatewiki.net/wiki/Thread:Support/About_MediaWiki:Creditssource-source-work/ksh concerning message MediaWiki:Creditssource-source-work/ksh A possible solution would be along the lines of ... {{GRAMMAR:em|$6|<a href="$7">|</a>}} ... here. This poses another problem, since explicit HTML anchors are usually not tolerated as part of message texts in MediaWiki, if I am not mistaken.
There is another instance of this bug: http://translatewiki.net/wiki/Summary:Support/About_MediaWiki:Tsb-reminder-content-generic/en_(2)