Template:Localized Release Announcement: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
No edit summary
(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>

Revision as of 14: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 28-03-2024.
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=28-03-2024 |version=2020.3 |codename=Bergen}}
  • March 28, 2024: FlightGear 2020.3 "Bergen" is released.

or in Português:

  • 28 de março de 2024: Lançado o FlightGear 2020.3 "Bergen".

Without Codename

{{Localized Release Announcement |date=March 28, 2024 |version=3.6}}  (Spanish Es/Portada)
  • March 28, 2024: FlightGear 3.6 is released.

On a spanish Page like Es/Portada:

  • 28 de marzo de 2024: FlightGear 3.6 lanzado.

Translated Date only

{{Localized Release Announcement |date=28-03-2024 }}
  • March 28, 2024:

or Russian

  • 28 март 2024:

Then add your message.


Other News

{{Localized Release Announcement |date=28-03-2024 
  |en=Hello World
  |de=Hallo Welt
  |pt=Olá mundo
  |it=Ciao mondo
}}
  • March 28, 2024: Hello World

Italian:

  • 28 marzo 2024: Ciao mondo

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

  • 28 maart 2024: Hello World

Related templates