Help talk:Templates

From FlightGear wiki
Revision as of 18:43, 9 October 2015 by Johan G (talk | contribs) (→‎Template localisation: clarification)
Jump to navigation Jump to search

This page should be about how to use and write templates

I'd like to see this page be changed to what it tells, how to use a template, how to make one. Perhaps include (part of the) the list from Special:UncategorizedTemplates and the use of them.

Current content can be dropped, no probs.

This unsigned comment was added by PH-JBO (Talk | contribs) 20:46, 15 October 2011 (UTC)

Agreed. Current content should be moved to some kind of a list or gallery with templates, say Help:Template gallery, while this page should be completely rewritten to reflect using, writing and documenting templates (though maybe only on a lower difficulty level and refer to Mediawiki help pages for the rest).
Johan G (Talk | contribs) 12:23, 9 August 2013 (UTC)
I have now written Help:List of messagebox templates and have moved those templates to that page (and added a lot more of them there). They could need a bit of standardisation though, but that is another story.
Johan G (Talk | contribs) 08:46, 7 November 2013 (UTC)

Done Done I have now more or less completely rewritten the page (diff). It is now a help page proper, though there could still be more done.
Johan G (Talk | contribs) 02:14, 10 November 2013 (UTC)

Template localisation

I was wondering if we had a standard procedure to localise templates? I would like to have French translations for {{WIP}}, {{note}}, {{warning}}, and maybe {{BeingTranslated}} for the Fr/FGAddon article. I found this MediaWiki article:, however it is not very informative. —Bugman (talk) 06:35, 8 October 2015 (EDT)

See {{LangSwitch}}. For examples: {{News}}, {{GitStatus:open}}, {{Did you know}}...
Gijs (talk) 07:40, 8 October 2015 (EDT)
See also the section #Translating templates on the help page. ;-)
I just made a few changes to make it more comprehensive.
Johan G (Talk | contribs) 21:54, 8 October 2015 (EDT)
Awesome, the {{WIP}} translation as seen on Fr/FGAddon works beautifully :) I hope I don't break things! Unfortunately I cannot edit and translate {{Note}}. It says: "You do not have permission to edit this page, for the following reason: This page has been protected from editing because it is included in the following page, which is protected with the "cascading" option turned on: FlightGear Newsletter April 2015". Is there a way to unlock it? For French it doesn't need changing, but translations are needed for other languages.
Bugman (talk) 08:25, 8 October 2015 (EDT)
Hooray accidentally enabled "cascading" there, I've disabled it now, so please try again.
Gijs (talk) 10:48, 8 October 2015 (EDT)
Cheers, that worked. I have now translated {{WIP}}, {{note}}, {{caution}}, {{warning}}, and {{BeingTranslated}} to be available in English, French, and German. Not being a French or German native speaker, there is room for improvement here.
Bugman (talk) 11:00, 8 October 2015 (EDT)
I've now also translated the {{tip}} template into French and German. Are there any more from the {{tip}}, {{note}}, {{caution}}, {{warning}}, {{BeingTranslated}} series? I'd like to add an example section in Help:Templates to help reveal the colourful existence of this useful set of related templates.
Bugman (talk) 06:40, 9 October 2015 (EDT)
Something like:
This article is currently being translated.
Tip  If you do it this way, your life will be easier.
Note  Do not forget to run this command.
Caution  If you run this command incorrectly, your harddrive will be erased.
Warning  Do not delete all FGAddon aircraft.
Bugman (talk) 06:49, 9 October 2015 (EDT)
There is a gallery with templates, Help:Gallery of messagebox templates, showing examples of (hopefully) all the messagebox templates. See also the note on its discussion page. I guess the galleries can be advertised more. ;-)
Regarding the very varying style of all of them, I was at one time working on improving that, see User:Johan G/Messagebox style sandbox, but I somehow got discouraged and/or distracted...
Johan G (Talk | contribs) 11:54, 9 October 2015 (EDT)
I just made the galleries a tiny bit easier to find on the Help page ( These galleries are prefect for creating translated galleries, to help with the translation process. All new wiki contributors should be pointed to them. Keep up the brilliant work with these things, they are really useful!
Bugman (talk) 12:33, 9 October 2015 (EDT)
That is great. Those "translated" galleries would indeed be perfect for that.
When translating the templates though, could you add the lang= parameter to them as well, by adding | lang = {{{lang|}}} to the end of them (see {{LangSwitch}}). That way you could simply add for example | lang = {{{lang|fr}}} to the end of a template in order to review the French translation while working on it. Just remember to remove the fr before saving though. ;-)
Johan G (Talk | contribs) 14:33, 9 October 2015 (EDT)