Template:Language/archives/Page: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Preparing the template for the new format)
mNo edit summary
 
(16 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<includeonly><onlyinclude>{{DISPLAYTITLE:<span style="display:none">{{{title|{{FULLPAGENAME}}}}}</span>}}<!--
<noinclude>{{APH}}
--><indicator name="Page-Tools"><!--
--><div id="bodyContent" class="mw-body-content" style="user-select:none; pointer-events:none; position:absolute; top:-19px; {{text-dir|ltr=right|rtl=left}}:0; width:100vw; height:32px"><!--
--><div id="mw-content-text" style="display:grid; grid-template-columns:repeat(auto-fill, minmax(clamp((100% / 2) - 1rem, 491px, 100%), 1fr)); justify-items:end; line-height:10px">
 
<div style="user-select:none; height:2px"></div>
 
<div style="pointer-events:none; display:inline-flex; gap:4px; width:max-content">
 
<div style="pointer-events:auto; display:inline-flex; align-items:center; gap:4px">{{{icons|}}}</div><div></div>
 
<div style="pointer-events:auto; display:inline-flex; align-items:center; gap:4px; margin:6px 0">
 
<div style="display:inline-flex">
<div style="display:inline-flex; position:relative">
<div class="mw-customtoggle-Lang-Select-Menu" style="display:inline-flex; gap:4px; align-items:center; line-height:10px; padding:4px; border:1px solid #65635F; border-radius:{{text-dir|ltr=3px 0 0 3px|rtl=0 3px 3px 0}}; background:linear-gradient(135deg, rgba(255 255 255 / 4%), rgba(255 255 255 / 2%))">{{Flag|{{intlang}}}}<span>{{ucfirst:{{#language:{{intlang}}}}}}</span><span style="font-size:.6em">&#x25BC;</span></div>
 
<div class="mw-collapsible mw-collapsed" id="mw-customcollapsible-Lang-Select-Menu" style="display:none; user-select:text; overflow:hidden; position:absolute; top:22px; {{text-dir|ltr=right|rtl=left}}:0; z-index:1001; border:1px solid #65635F; border-radius:4px; box-shadow:0 10px 20px rgb(0,0,0,.3); width:max-content"><div style="overflow-y:auto; max-height:238px"><span class=plainlinks><!--
 
-->{{#if: {{{strings|}}} | <div style="position:sticky; top:0; overflow:hidden; padding:4px 6px; background:rgb(56 56 56 / 95%); border-bottom:1px solid rgb(101, 99, 95); font-size:1.2em">
 
<div style="position:relative; background-color:rgb(0 121 0 / 12%); border:1px solid rgba(0 121 0 / 48%); border-radius:4px; padding:2px">
 
<div style="position:absolute; color:#E3E3E3; font-weight:900; line-height:1.1em; left:0; width:100%; text-align:center"> {{Flag|{{intlang}}}} {{#expr: ({{{{{intlang}}|0}}}) * 100 / ({{{strings|}}}) round 2}}% ({{#expr:{{{{{intlang}}|0}}}}} / {{#expr:{{{strings|}}}}}) </div>
 
<div style="width:{{#if: {{{strings|}}} | {{#expr: ({{{{{intlang}}|0}}}) * 100 / ({{{strings|}}}) round 2}}% | 0 }}; background-color:rgb(0 121 0); border-radius:2px; text-align:center; line-height:1.1em">&nbsp;</div>
</div>
 
</div>}}<!--
 
--><table cellpadding="4px" cellspacing="0" style="background:rgb(56 56 56 / 95%)">
<tr>
  {{#if: {{{strings|}}} | <td>{{Tp|en|{{{strings}}}|{{{en|0}}}}}</td> }}
  <td>{{Flag|en}} [{{fullurl:{{FULLPAGENAME}}}}?uselang=en {{#language:en}}]</td>
  {{#if: {{{strings|}}} | <td>{{Tp|ca|{{{strings}}}|{{{ca|0}}}}}</td> }}
  <td>{{Flag|ca}} [{{fullurl:{{FULLPAGENAME}}}}?uselang=ca {{#language:ca}}]</td>
</tr>
<tr>
  {{#if: {{{strings|}}} | <td>{{Tp|cs|{{{strings}}}|{{{cs|0}}}}}</td> }}
  <td>{{Flag|cs}} [{{fullurl:{{FULLPAGENAME}}}}?uselang=cs {{#language:cs}}]</td>
  {{#if: {{{strings|}}} | <td>{{Tp|de|{{{strings}}}|{{{de|0}}}}}</td> }}
  <td>{{Flag|de}} [{{fullurl:{{FULLPAGENAME}}}}?uselang=de {{#language:de}}]</td>
</tr>
<tr>
  {{#if: {{{strings|}}} | <td>{{Tp|el|{{{strings}}}|{{{el|0}}}}}</td> }}
  <td>{{Flag|el}} [{{fullurl:{{FULLPAGENAME}}}}?uselang=el {{#language:el}}]</td>
  {{#if: {{{strings|}}} | <td>{{Tp|eo|{{{strings}}}|{{{eo|0}}}}}</td> }}
  <td>{{Flag|eo}} [{{fullurl:{{FULLPAGENAME}}}}?uselang=eo {{#language:eo}}]</td>
</tr>
<tr>
  {{#if: {{{strings|}}} | <td>{{Tp|et|{{{strings}}}|{{{et|0}}}}}</td> }}
  <td>{{Flag|et}} [{{fullurl:{{FULLPAGENAME}}}}?uselang=et {{#language:et}}]</td>
  {{#if: {{{strings|}}} | <td>{{Tp|fr|{{{strings}}}|{{{fr|0}}}}}</td> }}
  <td>{{Flag|fr}} [{{fullurl:{{FULLPAGENAME}}}}?uselang=fr {{#language:fr}}]</td>
</tr>
<tr>
  {{#if: {{{strings|}}} | <td>{{Tp|fi|{{{strings}}}|{{{fi|0}}}}}</td> }}
  <td>{{Flag|fi}} [{{fullurl:{{FULLPAGENAME}}}}?uselang=fi {{#language:fi}}]</td>
  {{#if: {{{strings|}}} | <td>{{Tp|he|{{{strings}}}|{{{he|0}}}}}</td> }}
  <td>{{Flag|he}} [{{fullurl:{{FULLPAGENAME}}}}?uselang=he {{#language:he}}]</td>
</tr>
<tr>
  {{#if: {{{strings|}}} | <td>{{Tp|hi|{{{strings}}}|{{{hi|0}}}}}</td> }}
  <td>{{Flag|hi}} [{{fullurl:{{FULLPAGENAME}}}}?uselang=hi {{#language:hi}}]</td>
  {{#if: {{{strings|}}} | <td>{{Tp|hr|{{{strings}}}|{{{hr|0}}}}}</td> }}
  <td>{{Flag|hr}} [{{fullurl:{{FULLPAGENAME}}}}?uselang=hr {{#language:hr}}]</td>
</tr>
<tr>
  {{#if: {{{strings|}}} | <td>{{Tp|hu|{{{strings}}}|{{{hu|0}}}}}</td> }}
  <td>{{Flag|hu}} [{{fullurl:{{FULLPAGENAME}}}}?uselang=hu {{#language:hu}}]</td>
  {{#if: {{{strings|}}} | <td>{{Tp|it|{{{strings}}}|{{{it|0}}}}}</td> }}
  <td>{{Flag|it}} [{{fullurl:{{FULLPAGENAME}}}}?uselang=it {{#language:it}}]</td>
</tr>
<tr>
  {{#if: {{{strings|}}} | <td>{{Tp|ja|{{{strings}}}|{{{ja|0}}}}}</td> }}
  <td>{{Flag|ja}} [{{fullurl:{{FULLPAGENAME}}}}?uselang=ja {{#language:ja}}]</td>
  {{#if: {{{strings|}}} | <td>{{Tp|ka|{{{strings}}}|{{{ka|0}}}}}</td> }}
  <td>{{Flag|ka}} [{{fullurl:{{FULLPAGENAME}}}}?uselang=ka {{#language:ka}}]</td>
</tr>
<tr>
  {{#if: {{{strings|}}} | <td>{{Tp|km|{{{strings}}}|{{{km|0}}}}}</td> }}
  <td>{{Flag|km}} [{{fullurl:{{FULLPAGENAME}}}}?uselang=km {{#language:km}}]</td>
  {{#if: {{{strings|}}} | <td>{{Tp|ko|{{{strings}}}|{{{ko|0}}}}}</td> }}
  <td>{{Flag|ko}} [{{fullurl:{{FULLPAGENAME}}}}?uselang=ko {{#language:ko}}]</td>
</tr>
<tr>
  {{#if: {{{strings|}}} | <td>{{Tp|ms|{{{strings}}}|{{{ms|0}}}}}</td> }}
  <td>{{Flag|ms}} [{{fullurl:{{FULLPAGENAME}}}}?uselang=ms {{#language:ms}}]</td>
  {{#if: {{{strings|}}} | <td>{{Tp|nl|{{{strings}}}|{{{nl|0}}}}}</td> }}
  <td>{{Flag|nl}} [{{fullurl:{{FULLPAGENAME}}}}?uselang=nl {{#language:nl}}]</td>
</tr>
<tr>
  {{#if: {{{strings|}}} | <td>{{Tp|no|{{{strings}}}|{{{no|0}}}}}</td> }}
  <td>{{Flag|no}} [{{fullurl:{{FULLPAGENAME}}}}?uselang=no {{#language:no}}]</td>
  {{#if: {{{strings|}}} | <td>{{Tp|pl|{{{strings}}}|{{{pl|0}}}}}</td> }}
  <td>{{Flag|pl}} [{{fullurl:{{FULLPAGENAME}}}}?uselang=pl {{#language:pl}}]</td>
</tr>
<tr>
  {{#if: {{{strings|}}} | <td>{{Tp|pt|{{{strings}}}|{{{pt|0}}}}}</td> }}
  <td>{{Flag|pt}} [{{fullurl:{{FULLPAGENAME}}}}?uselang=pt {{#language:pt}}]</td>
  {{#if: {{{strings|}}} | <td>{{Tp|pt-br|{{{strings}}}|{{{pt-br|0}}}}}</td> }}
  <td>{{Flag|pt-br}} [{{fullurl:{{FULLPAGENAME}}}}?uselang=pt-br {{#language:pt-br}}]</td>
</tr>
<tr>
  {{#if: {{{strings|}}} | <td>{{Tp|ru|{{{strings}}}|{{{ru|0}}}}}</td> }}
  <td>{{Flag|ru}} [{{fullurl:{{FULLPAGENAME}}}}?uselang=ru {{#language:ru}}]</td>
  {{#if: {{{strings|}}} | <td>{{Tp|es|{{{strings}}}|{{{es|0}}}}}</td> }}
  <td>{{Flag|es}} [{{fullurl:{{FULLPAGENAME}}}}?uselang=es {{#language:es}}]</td>
</tr>
<tr>
  {{#if: {{{strings|}}} | <td>{{Tp|sv|{{{strings}}}|{{{sv|0}}}}}</td> }}
  <td>{{Flag|sv}} [{{fullurl:{{FULLPAGENAME}}}}?uselang=sv {{#language:sv}}]</td>
  {{#if: {{{strings|}}} | <td>{{Tp|uk|{{{strings}}}|{{{uk|0}}}}}</td> }}
  <td>{{Flag|uk}} [{{fullurl:{{FULLPAGENAME}}}}?uselang=uk {{#language:uk}}]</td>
</tr>
<tr>
  {{#if: {{{strings|}}} | <td>{{Tp|tr|{{{strings}}}|{{{tr|0}}}}}</td> }}
  <td>{{Flag|tr}} [{{fullurl:{{FULLPAGENAME}}}}?uselang=tr {{#language:tr}}]</td>
  {{#if: {{{strings|}}} | <td>{{Tp|vi|{{{strings}}}|{{{vi|0}}}}}</td> }}
  <td>{{Flag|vi}} [{{fullurl:{{FULLPAGENAME}}}}?uselang=vi {{#language:vi}}]</td>
</tr>
<tr>
  {{#if: {{{strings|}}} | <td>{{Tp|zh|{{{strings}}}|{{{zh|0}}}}}</td> }}
  <td>{{Flag|zh}} [{{fullurl:{{FULLPAGENAME}}}}?uselang=zh {{#language:zh}}]</td>
  {{#if: {{{strings|}}} | <td>{{Tp|zh-tw|{{{strings}}}|{{{zh-tw|0}}}}}</td> }}
  <td>{{Flag|zh-tw}} [{{fullurl:{{FULLPAGENAME}}}}?uselang=zh-tw {{#language:zh-tw}}]</td>
</tr>
</table>
 
</span></div></div>
</div>
</div>
 
<div style="line-height:13px; border:1px solid #65635F; border-radius:3px; padding:3px 5px; background:linear-gradient(135deg, rgba(255 255 255 / 4%), rgba(255 255 255 / 2%))" title="Subpages">'''[[Special:PrefixIndex/{{FULLPAGENAME}}/|<span style="color:white" title="Subpages">/..</span>]]'''</div>
 
<div style="border:1px solid #65635F; border-radius:3px; padding:3px 4px; background:linear-gradient(135deg, rgba(255 255 255 / 4%), rgba(255 255 255 / 2%))" title="Purge this Page">[[File:Icon-deblur.png|link={{fullurl:{{FULLPAGENAME}}}}?action=purge|12px]]</div>
 
</div>
 
</div>
 
</div></div></indicator><div {{#if:{{{header}}}|id="firstHeading" class="firstHeading" style="color:white; padding:7px 0 7px 0; font-size:2em; margin:-15px 0 16px 0; direction:{{text-dir|ltr=ltr|rtl=rtl}}; {{{header style|}}}">{{{header|{{{title|{{FULLPAGENAME}}}}}}}}<wbr}}></div></onlyinclude></includeonly>
{{Wip|type=wip2|[[User:Max34|Max34]]|Designed for the new page format.}}
 
{{Todo|1=
☐ Add an icon for the subpage button instead of {{Code|/..}}.
 
☐ Either modify the maintenance templates to make it easier to work with this template, or embed the maintenance templates directly into this template (which will give more options to the maintenance templates).
 
(For copying: ☐ <span style="color:green">☑</span> <span style="color:yellow">☒</span>)
}}
 
New version of the {{Tl2|MultiPage}} template. Uses a completely different page structure, compressing everything into one page, without the need for language subpages.
 
== Usage ==
Default template usage.
 
{{Code|<nowiki>{{Page}}</nowiki>}}
 
Changes the name of the page that will be displayed in the header and when searching on the Internet. Without this parameter, the default page title will be used.
 
{{Code|<nowiki>{{Page|title=Example title}}</nowiki>}}
 
Changes the page header. Does not change the name of the page for the Internet.
 
{{Code|<nowiki>{{Page|header=Interesting header that can use &lt;div&gt; tags, for example}}</nowiki>}}
 
The header can be removed completely if you specify it empty.
 
{{Code|<nowiki>{{Page|header=}}</nowiki>}}
 
Access to header style.
 
{{Code|<nowiki>{{Page|header style=color:green}}</nowiki>}}
 
An area for adding icons or other small elements. Maximum available height: 31 pixels. If the content of this parameter exceeds this height, the entire panel will begin to slide down and the content will begin to overlap the line and below. Preferred icon size: 24 pixels.
 
{{Code|<nowiki>{{Page|icons=[[File:ESRB E10 Rating.png|link=|24px]] [[File:Hl2-16px.png|link=|24px]]}}</nowiki>}}
 
'''Optional'''. The {{Code|<nowiki>{{{strings}}}</nowiki>}} parameter is used to enter the total number of lines on the page (manually). To indicate the number of translated strings in a particular language, use their language codes. All these numbers are needed for the correct categorization of pages in the appropriate categories of the translation process, as well as for a better understanding of whether a page has been translated into a particular language.
 
{{Code|<nowiki>{{Page|strings=10|en=10|es=5|ru=8}}</nowiki>}}

Latest revision as of 15:59, 8 September 2024

Note.pngNote:Archived page history
Icon-Important.pngImportant:These pages are linked often from page history logs so Special:WhatLinksHere will not show anything.