Template:HexString: Difference between revisions

From The Talos Principle Wiki
No edit summary
m moved usage header earlier
Line 1: Line 1:
{{#ifeq:{{{2|}}}|{{{2}}}|<span style="white-space: pre; text-decoration-line: underline; text-decoration-style: dotted; text-decoration-color: black;" title="{{{2}}}">{{{1}}}</span>|<span style="white-space: pre; text-decoration-line: underline; text-decoration-style: dotted; text-decoration-color: red;">{{{1}}}</span>[[Category:Pages with untranslated hex strings]]}}<noinclude>
{{#ifeq:{{{2|}}}|{{{2}}}|<span style="white-space: pre; text-decoration-line: underline; text-decoration-style: dotted; text-decoration-color: black;" title="{{{2}}}">{{{1}}}</span>|<span style="white-space: pre; text-decoration-line: underline; text-decoration-style: dotted; text-decoration-color: red;">{{{1}}}</span>[[Category:Pages with untranslated hex strings]]}}<noinclude>
 
== Usage ==
This is used to show hex strings, with or without translations.
This is used to show hex strings, with or without translations.
* If a translation is provided, it is shown in a tooltip (this formatting may change in the future).
* If a translation is provided, it is shown in a tooltip (this formatting may change in the future).
* If a translation is not provided, the page is automatically added to [[:Category:Pages with untranslated hex strings]].
* If a translation is not provided, the page is automatically added to [[:Category:Pages with untranslated hex strings]].
== Usage ==
<pre>{{HexString|48656c6c6f|Hello}} is translated, {{HexString|00}} is not translated.</pre>
<pre>{{HexString|48656c6c6f|Hello}} is translated, {{HexString|00}} is not translated.</pre>



Revision as of 02:58, 19 November 2023

{{{1}}}

Usage

This is used to show hex strings, with or without translations.

{{HexString|48656c6c6f|Hello}} is translated, {{HexString|00}} is not translated.

That shows up as:

48656c6c6f is translated, 00 is not translated.

Multiple lines:

You can break both the text and the tooltip into multiple lines. The text follows the usual MediaWiki conventions, but for the tooltip you need to explicitly break the text using the newline/line feed HTML character entity:

{{HexString
|
48656c6c6f2c0a
776f726c64
|Hello,&NewLine;world
}}

Produces: 48656c6c6f2c0a 776f726c64