Template:NeedsTranslationTooltip/doc: Difference between revisions

From Deadlock Wiki
Jump to navigation Jump to search
Sur (talk | contribs)
initial
 
Sur (talk | contribs)
m docs for 1st optional parameter
 
Line 3: Line 3:
See [[Template:Translate]] for documentation and further information to help translate marked text.
See [[Template:Translate]] for documentation and further information to help translate marked text.


Has no parameters.
Optional first parameter is translation-key to localize and display. Defaults to 'NeedsTranslationTooltip' which displays "{{#invoke:Dictionary|translate|NeedsTranslationTooltip}}".


In most circumstances, use no parameter.
<code><nowiki>Patch notes{{NeedsTranslationTooltip}}</nowiki></code>
<code><nowiki>Patch notes{{NeedsTranslationTooltip}}</nowiki></code>


Line 10: Line 11:


Patch notes{{NeedsTranslationTooltip}}
Patch notes{{NeedsTranslationTooltip}}
One special circumstance for needing to use another key is in an ability article. Notes for the ability come from /<ability name>/Notes, so if 'Notes' is not yet translated, the page can't exist, and it instead transcludes the english notes. In this case, the 'NotesNeedsTranslation' key is passed, which displays "{{#invoke:Dictionary|translate|NotesNeedsTranslation}}".
This is accomplished with
<code><nowiki>{{NeedsTranslationTooltip|NotesNeedsTranslation}}</nowiki></code>

Latest revision as of 20:13, 14 October 2024

Added directly after content that needs localization, including both larger content such as Abrams#Introduction, and shorter strings such as "Patch notes" in a Hero's Update history article, which are otherwise written in a template.

See Template:Translate for documentation and further information to help translate marked text.

Optional first parameter is translation-key to localize and display. Defaults to 'NeedsTranslationTooltip' which displays "This needs translation to English. To help translate it, visit %s.".

In most circumstances, use no parameter. Patch notes{{NeedsTranslationTooltip}}

Outputs

Patch notes[nt]


One special circumstance for needing to use another key is in an ability article. Notes for the ability come from /<ability name>/Notes, so if 'Notes' is not yet translated, the page can't exist, and it instead transcludes the english notes. In this case, the 'NotesNeedsTranslation' key is passed, which displays "Notes page cannot be created until 'Notes' is translated.".

This is accomplished with

{{NeedsTranslationTooltip|NotesNeedsTranslation}}