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")
 
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}}} {{{codename}}} 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}}} {{{codename}}} lanzado
+
*'''{{#time: d "de" F "de" Y | {{{date}}} | es}}:''' {{#if: {{{version|}}}
| ca = <!-- Catalan -->
+
      | FlightGear [[Changelog {{{version}}}|{{{version}}}]] {{#if:{{{codename|}}}|"{{{codename}}}"}} lanzado.
* '''{{{date}}}:''' FlightGear {{{version}}} {{{codename}}} llançat
+
      | {{{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}}} {{{codename}}} 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}}} {{{codename}}} vrijgegeven
+
* '''{{#time: d F Y | {{{date}}} | nl}}:''' {{#if: {{{version|}}}
 +
      | FlightGear [[Changelog {{{version}}}|{{{version}}}]] {{#if:{{{codename|}}}|"{{{codename}}}"}} vrijgegeven.
 +
      | {{{nl|{{{en|{{{1|}}}}}}}}}}}
 
| pl = <!-- Polish -->
 
| pl = <!-- Polish -->
* '''{{{date}}}:''' FlightGear {{{version}}} {{{codename}}} wydana
+
* '''{{#time: d F Y | {{{date}}} | pl}}:''' {{#if: {{{version|}}}
| en = <!-- English -->  
+
      | FlightGear [[Changelog {{{version}}}|{{{version}}}]] {{#if:{{{codename|}}}|"{{{codename}}}"}} wydana.
* '''{{{date}}}:''' FlightGear [[Changelog {{{version}}}|{{{version}}}]] {{{codename}}} released
+
      | {{{pl|{{{en|{{{1|}}}}}}}}}}}
| {{{lang|en}}}
+
| pt = <!-- Português -->
}}<noinclude>
+
* '''{{#time: d "de" F "de" Y | {{{date}}} | pt}}:''' {{#if: {{{version|}}}
{{WIP}}
+
      | 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=
 
== Goal ==
 
== Goal ==
This template is used for showing FlightGear release dates in the {{tl|news}} template displayed on the [[Main Page]].
+
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).
  
The template will show translated texts depending on the language prefix of the page it is on.  If there is no translation it will fall back to English.
 
  
 
== Usage ==
 
== Usage ==
  {{obr}}'''Localized Release Announcement''' {{!}}date= {{!}}version= {{!}}''lang=''{{cbr}}
+
  {{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 '''lang''' are mandatory.
 
  
; date:    Date of the release in <Month> <d>, <yyyy> format, for example '''{{CURRENTMONTHNAME}} {{CURRENTDAY}}, {{CURRENTYEAR}}'''.
+
All parameters but '''date''' are optional.
  
; version: Version of the release, for example '''3.4'''.
+
; date:         Date of the release in any format like ''<d>-<m>-<yyyy>'' (or ''<Month> <d>, <yyyy>''), for example '''{{#time: d-m-Y|now}}'''.
  
; lang:     Language override for testing and demonstration purposes.
+
; version:     Version of the release, for example '''3.4''' or '''{{Current release|cr}}.2'''. (optional)
  
== Example ==
+
; codename:    Default airport or name of release, for example '''Bergen'''. (optional)
{{obr}}Localized Release Announcement {{!}}date={{CURRENTMONTHNAME}} {{CURRENTDAY}}, {{CURRENTYEAR}} {{!}}version=3.4{{cbr}}
+
  
{{Localized Release Announcement |date={{CURRENTMONTHNAME}} {{CURRENTDAY}}, {{CURRENTYEAR}} |version=3.4}}
+
; 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 ==
 
== Related templates ==
 
* {{tl|news}}
 
* {{tl|news}}

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 02-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=02-12-2020 |version=2020.3 |codename=Bergen}}
  • December 02, 2020: FlightGear 2020.3 "Bergen" is released.

or in Português:

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

Without Codename

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

On a spanish Page like Es/Portada:

  • 02 de diciembre de 2020: FlightGear 3.6 lanzado.

Translated Date only

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

or Russian

  • 02 декабрь 2020:

Then add your message.


Other News

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

Italian:

  • 02 dicembre 2020: Ciao mondo

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

  • 02 december 2020: Hello World

Related templates