Template:TranslationQuality: Difference between revisions

From SmashWiki, the Super Smash Bros. wiki
Jump to navigationJump to search
(New Page: <span style="background:rgba({{#ifeq:{{{1|}}}|?|255,0,0,0.5|{{#expr:trunc(-1020*{{{3|0.5}}}+765)}},{{#expr:trunc(510*{{{3|0.5}}})}},0,{{#ifexpr:{{{3|0.5}}}>0.75|{{#expr:-2*{{{3|0.5}}}+2...)
 
mNo edit summary
 
Line 1: Line 1:
<span style="background:rgba({{#ifeq:{{{1|}}}|?|255,0,0,0.5|{{#expr:trunc(-1020*{{{3|0.5}}}+765)}},{{#expr:trunc(510*{{{3|0.5}}})}},0,{{#ifexpr:{{{3|0.5}}}>0.75|{{#expr:-2*{{{3|0.5}}}+2}})|0.5}}}})" title="{{{2}}}">{{#ifeq:{{{1|}}}|?|{{{2}}}|{{{1|}}}}}</span><noinclude>
<span style="background:rgba({{#ifeq:{{{1|}}}|?|255,0,0,0.5|{{#expr:trunc(-1020*{{{3|0.5}}}+765)}},{{#expr:trunc(510*{{{3|0.5}}})}},0,{{#ifexpr:{{{3|0.5}}}>0.75|{{#expr:-2*{{{3|0.5}}}+2}}|0.5}}}})" title="{{{2}}}">{{#ifeq:{{{1|}}}|?|{{{2}}}|{{{1|}}}}}</span><noinclude>
==Usage==
==Usage==
For [[SW:1226]]. Highlights a block of textbased on its believed translation quality. To avoid nesting, incorporates rollover by itself.
For [[SW:1226]]. Highlights a block of textbased on its believed translation quality. To avoid nesting, incorporates rollover by itself.

Latest revision as of 13:56, September 3, 2013

Usage

For SW:1226. Highlights a block of textbased on its believed translation quality. To avoid nesting, incorporates rollover by itself.

{{TranslationQuality|translated text|original text|quality}}

"quality" should be a number between 0.0 and 1.0, where 1.0 is "perfect" and 0.0 is "gibberish".

If the translated text is set to "?", then the untranslated text will be displayed in "gibberish" colour.

For simplicity, assumes that values outside the 255-0 range (such as -95 or 382) will be clamped to 255 or 0. If someone says this results in problems with a particular browser, note such on the talk page.