Difference between revisions of "Template:Localized Release Announcement"

From FlightGear wiki
Jump to: navigation, search
(Translated dates, alt texts, new doc, more languages. Note: We need to update "Template:News")
 
(6 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{LangSwitch
+
<includeonly><!--Note: {{#time: format | time | lang}}; format: d = day, F = Full Monthname, Y = Year - see also php.net/date
 +
-->{{LangSwitch
 +
| en = <!-- English --> <!--
 +
  Date in Bold. See note above. -->
 +
*'''{{#time: F d"," Y | {{{date}}} | en}}:''' <!--
 +
  Is "version=" given?
 +
      -->{{#if: {{{version|}}} <!--
 +
    yes: show release note with "codename" (if given)
 +
        --> | FlightGear [[Changelog {{{version}}}|{{{version}}}]] {{#if:{{{codename|}}}|"{{{codename}}}"}} is released. <!--
 +
    no: show translated text or english text or any text or nothing
 +
        --> | {{{en|{{{en|{{{1|}}}}}}}}}}}
 +
| ca = <!-- Catalan -->
 +
* '''{{#time: d F Y | {{{date}}} | ca}}:''' {{#if: {{{version|}}}
 +
      | FlightGear [[Changelog {{{version}}}|{{{version}}}]] {{#if:{{{codename|}}}|"{{{codename}}}"}} llançat.
 +
      | {{{ca|{{{en|{{{1|}}}}}}}}}}}
 
| de = <!-- German -->
 
| de = <!-- German -->
* ''{{{date}}}:''' FlightGear {{{version}}} wurde veröffentlicht.
+
* '''{{#time: d"." F Y | {{{date}}} | de}}:''' {{#if: {{{version|}}}
 +
      | FlightGear [[Changelog {{{version}}}|{{{version}}}]] {{#if:{{{codename|}}}|"{{{codename}}}"}} wird veröffentlicht.  
 +
      | {{{de|{{{en|{{{1|}}}}}}}}}}}
 
| es = <!-- Spanish -->
 
| es = <!-- Spanish -->
* '''{{{date}}}:''' FlightGear {{{version}}} Versión Publicada.
+
*'''{{#time: d "de" F "de" Y | {{{date}}} | es}}:''' {{#if: {{{version|}}}
| ca = <!-- Catalan -->
+
      | FlightGear [[Changelog {{{version}}}|{{{version}}}]] {{#if:{{{codename|}}}|"{{{codename}}}"}} lanzado.  
* '''{{{date}}}:''' Publicada la versió {{{version}}} de FlightGear ([[ca/Changelog {{{version}}}|canvis]])
+
      | {{{es|{{{en|{{{1|}}}}}}}}}}}
 +
| fr = <!-- French -->
 +
*'''{{#time: d F Y | {{{date}}} | fr}}:''' {{#if: {{{version|}}}
 +
      | FlightGear [[Changelog {{{version}}}|{{{version}}}]] {{#if:{{{codename|}}}|"{{{codename}}}"}} publiée.
 +
      | {{{fr|{{{en|{{{1|}}}}}}}}}}}
 
| it = <!-- Italian -->
 
| it = <!-- Italian -->
* '''date:''' FlightGear {{{version}}} rilasciato
+
* '''{{#time: d F Y | {{{date}}} | it}}:''' {{#if: {{{version|}}}
 +
      | FlightGear [[Changelog {{{version}}}|{{{version}}}]] {{#if:{{{codename|}}}|"{{{codename}}}"}} rilasciato.
 +
      | {{{it|{{{en|{{{1|}}}}}}}}}}}
 
| nl = <!-- Dutch -->
 
| nl = <!-- Dutch -->
* '''date:''' FlightGear {{{version}}} uitgebracht
+
* '''{{#time: d F Y | {{{date}}} | nl}}:''' {{#if: {{{version|}}}
 +
      | FlightGear [[Changelog {{{version}}}|{{{version}}}]] {{#if:{{{codename|}}}|"{{{codename}}}"}} vrijgegeven.
 +
      | {{{nl|{{{en|{{{1|}}}}}}}}}}}
 
| pl = <!-- Polish -->
 
| pl = <!-- Polish -->
* '''{{{date}}}:''' Wydano nową wersję FlightGear {{{version}}}
+
* '''{{#time: d F Y | {{{date}}} | pl}}:''' {{#if: {{{version|}}}
| en = <!-- English -->
+
      | FlightGear [[Changelog {{{version}}}|{{{version}}}]] {{#if:{{{codename|}}}|"{{{codename}}}"}} wydana.
* '''{{{date}}}:''' [[Changelog {{{version}}}|FlightGear {{{version}}}]] released
+
      | {{{pl|{{{en|{{{1|}}}}}}}}}}}
}}<noinclude>
+
| pt = <!-- Português -->
{{WIP}}
+
* '''{{#time: d "de" F "de" Y | {{{date}}} | pt}}:''' {{#if: {{{version|}}}
 +
      | Lançado o FlightGear [[Changelog {{{version}}}|{{{version}}}]] {{#if:{{{codename|}}}|"{{{codename}}}"}}.
 +
      | {{{pt|{{{en|{{{1|}}}}}}}}}}}
 +
| ru = <!-- Russian -->
 +
* '''{{#time: d F Y | {{{date}}} | ru}}:''' {{#if: {{{version|}}}
 +
      | ??????? FlightGear [[Changelog {{{version}}}|{{{version}}}]] {{#if:{{{codename|}}}|"{{{codename}}}"}}.
 +
      | {{{ru|{{{en|{{{1|}}}}}}}}}}}
 +
| sl = <!-- Sl -->
 +
* '''{{#time: d. F Y | {{{date}}} | sl}}:''' {{#if: {{{version|}}}
 +
      | FlightGear [[Changelog {{{version}}}|{{{version}}}]] {{#if:{{{codename|}}}|"{{{codename}}}"}} objaviti.
 +
      | {{{ru|{{{en|{{{1|}}}}}}}}}}}
 +
| lang={{{lang|}}}
 +
}}</includeonly><noinclude>
 +
{{WIP|<big>'''It all works. We could use this template right away!'''</big>}}
 
{{Informative template|1=
 
{{Informative template|1=
This template is used for assembling the localized news section as displayed on the [[Main Page]].
+
== Goal ==
}}[[Category:Templates]]
+
This template is used for translating news in the {{tl|news}} template displayed on the [[Main Page]].
 +
 
 +
* Translated dates based on language prefix of the main page.
 +
* For a new FlightGear release it will show (translated) texts.
 +
* You can also type in custom text and its translations for not release-specific news (but keep the dates).
 +
 
 +
 
 +
== Usage ==
 +
{{obr}}'''Localized Release Announcement'''{{!}}date= {{!}}version= {{!}}codename= {{!}}''lang=''{{cbr}}
 +
<small>{{obr}}'''Localized Release Announcement'''{{!}}date= {{!}}en={{!}}ca={{!}}de={{!}}es={{!}}fr={{!}}it={{!}}nl={{!}}pl={{!}}pt={{!}}ru={{!}}sl={{cbr}}</small>
 +
 
 +
 
 +
All parameters but '''date''' are optional.
 +
 
 +
; date:        Date of the release in any format like ''<d>-<m>-<yyyy>'' (or ''<Month> <d>, <yyyy>''), for example '''{{#time: d-m-Y|now}}'''.
 +
 
 +
; version:      Version of the release, for example '''3.4''' or '''{{Current release|cr}}.2'''. (optional)
 +
 
 +
; codename:    Default airport or name of release, for example '''Bergen'''. (optional)
 +
 
 +
; LE(en/es/fr): For other news to be used like {{tl|LangSwitch}}, for example <code><nowiki>| en = Hello World | de = Hallo Welt | es...</nowiki></code> (optional)
 +
 
 +
; lang:    Language override for testing and demonstration purposes. (optional)
 +
 
 +
== Example ==
 +
===With Codename===
 +
{{obr}}Localized Release Announcement {{!}}date={{#time: d-m-Y|now}} {{!}}version={{Current release|cr}} {{!}}codename=Bergen{{cbr}}
 +
{{Localized Release Announcement|date={{#time: d-m-Y|now}}|version={{Current release|cr}}|codename=Bergen}}
 +
or in Português:
 +
{{Localized Release Announcement|date={{#time: d-m-Y|now}}|version={{Current release|cr}}|codename=Bergen|lang=pt}}
 +
----
 +
===Without Codename===
 +
{{obr}}Localized Release Announcement {{!}}date={{CURRENTMONTHNAME}} {{CURRENTDAY}}, {{CURRENTYEAR}} {{!}}version=3.6{{cbr}}  (Spanish [[Es/Portada]])
 +
{{Localized Release Announcement|date={{CURRENTMONTHNAME}} {{CURRENTDAY}}, {{CURRENTYEAR}}|version=3.6}}
 +
On a spanish Page like [[Es/Portada]]:
 +
{{Localized Release Announcement|date={{CURRENTMONTHNAME}} {{CURRENTDAY}}, {{CURRENTYEAR}}|version=3.6|lang=es}}
 +
----
 +
===Translated Date only===
 +
{{obr}}Localized Release Announcement {{!}}date={{#time: d-m-Y|now}} {{cbr}}
 +
{{Localized Release Announcement|date={{#time: d-m-Y|now}}}}
 +
or Russian {{Localized Release Announcement|date={{#time: d-m-Y|now}}|lang=ru}}
 +
Then add your message.
 +
----
 +
===Other News===
 +
{{obr}}Localized Release Announcement {{!}}date={{#time: d-m-Y|now}}
 +
  {{!}}en=Hello World
 +
  {{!}}de=Hallo Welt
 +
  {{!}}pt=Olá mundo
 +
  {{!}}it=Ciao mondo
 +
{{cbr}}
 +
{{Localized Release Announcement|date={{#time: d-m-Y|now}}|en=Hello World|de=Hallo Welt|pt=Olá mundo|it=Ciao mondo}}
 +
Italian:
 +
{{Localized Release Announcement|date={{#time: d-m-Y|now}}|en=Hello World|de=Hallo Welt|pt=Olá mundo|it=Ciao mondo|lang=it}}
 +
Dutch (nl) - no translation for message given here, shows english message and dutch date (just like {{tl|LangSwitch}})
 +
{{Localized Release Announcement|date={{#time: d-m-Y|now}}|en=Hello World|de=Hallo Welt|pt=Olá mundo|it=Ciao mondo|lang=nl}}
 +
== Related templates ==
 +
* {{tl|news}}
 +
 
 +
}}
 +
 
 +
[[Category:Templates]]
 
</noinclude>
 
</noinclude>

Latest revision as of 09:47, 17 January 2019

WIP.png Work in progress
This article or section will be worked on in the upcoming hours or days.
Note: It all works. We could use this template right away!
See history for the latest developments.
The following template description is not displayed when the template is inserted in an article.

Goal

This template is used for translating news in the {{news}} template displayed on the Main Page.

  • Translated dates based on language prefix of the main page.
  • For a new FlightGear release it will show (translated) texts.
  • You can also type in custom text and its translations for not release-specific news (but keep the dates).


Usage

{{Localized Release Announcement|date= |version= |codename= |lang=}}
{{Localized Release Announcement|date= |en=|ca=|de=|es=|fr=|it=|nl=|pl=|pt=|ru=|sl=}}


All parameters but date are optional.

date
Date of the release in any format like <d>-<m>-<yyyy> (or <Month> <d>, <yyyy>), for example 04-12-2020.
version
Version of the release, for example 3.4 or 2020.3.2. (optional)
codename
Default airport or name of release, for example Bergen. (optional)
LE(en/es/fr)
For other news to be used like {{LangSwitch}}, for example | en = Hello World | de = Hallo Welt | es... (optional)
lang
Language override for testing and demonstration purposes. (optional)

Example

With Codename

{{Localized Release Announcement |date=04-12-2020 |version=2020.3 |codename=Bergen}}
  • December 04, 2020: FlightGear 2020.3 "Bergen" is released.

or in Português:

  • 04 de dezembro de 2020: Lançado o FlightGear 2020.3 "Bergen".

Without Codename

{{Localized Release Announcement |date=December 4, 2020 |version=3.6}}  (Spanish Es/Portada)
  • December 04, 2020: FlightGear 3.6 is released.

On a spanish Page like Es/Portada:

  • 04 de diciembre de 2020: FlightGear 3.6 lanzado.

Translated Date only

{{Localized Release Announcement |date=04-12-2020 }}
  • December 04, 2020:

or Russian

  • 04 декабрь 2020:

Then add your message.


Other News

{{Localized Release Announcement |date=04-12-2020 
  |en=Hello World
  |de=Hallo Welt
  |pt=Olá mundo
  |it=Ciao mondo
}}
  • December 04, 2020: Hello World

Italian:

  • 04 dicembre 2020: Ciao mondo

Dutch (nl) - no translation for message given here, shows english message and dutch date (just like {{LangSwitch}})

  • 04 december 2020: Hello World

Related templates