Last modified: 2013-12-03 08:47:13 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T29223, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 27223 - GRAMMAR should allow selective bolding, etc.
GRAMMAR should allow selective bolding, etc.
Status: NEW
Product: MediaWiki
Classification: Unclassified
Internationalization (Other open bugs)
1.18.x
All All
: Normal enhancement with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
: i18n
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-02-07 14:37 UTC by Purodha Blissenbach
Modified: 2013-12-03 08:47 UTC (History)
3 users (show)

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


Attachments

Description Purodha Blissenbach 2011-02-07 14:37:34 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!
Comment 1 db [inactive,noenotif] 2011-02-11 19:59:52 UTC
Maybe {{ucfirst:{{GRAMMAR: Dativ, en |{{SITENAME}}|''$1''}}}} is better, because you can use $1 in more places.
Comment 2 Purodha Blissenbach 2013-03-29 22:30:44 UTC
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.
Comment 3 Purodha Blissenbach 2013-05-20 10:28:53 UTC
There is another instance of this bug:
http://translatewiki.net/wiki/Summary:Support/About_MediaWiki:Tsb-reminder-content-generic/en_(2)

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


Navigation
Links