Template:Language/archives/Page: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
 
(17 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>
 
<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: ({{/Str|+}}) * 100 / ({{/Str|all}}) round 2}}% ({{#expr:{{/Str|+}}}} / {{#expr:{{/Str|all}}}}) </div>
 
<div style="width:{{#expr: ({{/Str|+}}) * 100 / ({{/Str|all}}) round 2}}%; 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>
  <td>{{Tp|en|{{/Str|all}}|{{/Str|+|force=en}}}}</td>
  <td>{{Flag|en}} [{{fullurl:{{FULLPAGENAME}}}}?uselang=en {{#language:en}}]</td>
  <td>{{Tp|ca|{{/Str|all}}|{{/Str|+|force=ca}}}}</td>
  <td>{{Flag|ca}} [{{fullurl:{{FULLPAGENAME}}}}?uselang=ca {{#language:ca}}]</td>
</tr>
<tr>
  <td>{{Tp|cs|{{/Str|all}}|{{/Str|+|force=cs}}}}</td>
  <td>{{Flag|cs}} [{{fullurl:{{FULLPAGENAME}}}}?uselang=cs {{#language:cs}}]</td>
  <td>{{Tp|de|{{/Str|all}}|{{/Str|+|force=de}}}}</td>
  <td>{{Flag|de}} [{{fullurl:{{FULLPAGENAME}}}}?uselang=de {{#language:de}}]</td>
</tr>
<tr>
  <td>{{Tp|el|{{/Str|all}}|{{/Str|+|force=el}}}}</td>
  <td>{{Flag|el}} [{{fullurl:{{FULLPAGENAME}}}}?uselang=el {{#language:el}}]</td>
  <td>{{Tp|eo|{{/Str|all}}|{{/Str|+|force=eo}}}}</td>
  <td>{{Flag|eo}} [{{fullurl:{{FULLPAGENAME}}}}?uselang=eo {{#language:eo}}]</td>
</tr>
<tr>
  <td>{{Tp|et|{{/Str|all}}|{{/Str|+|force=et}}}}</td>
  <td>{{Flag|et}} [{{fullurl:{{FULLPAGENAME}}}}?uselang=et {{#language:et}}]</td>
  <td>{{Tp|fr|{{/Str|all}}|{{/Str|+|force=fr}}}}</td>
  <td>{{Flag|fr}} [{{fullurl:{{FULLPAGENAME}}}}?uselang=fr {{#language:fr}}]</td>
</tr>
<tr>
  <td>{{Tp|fi|{{/Str|all}}|{{/Str|+|force=fi}}}}</td>
  <td>{{Flag|fi}} [{{fullurl:{{FULLPAGENAME}}}}?uselang=fi {{#language:fi}}]</td>
  <td>{{Tp|he|{{/Str|all}}|{{/Str|+|force=he}}}}</td>
  <td>{{Flag|he}} [{{fullurl:{{FULLPAGENAME}}}}?uselang=he {{#language:he}}]</td>
</tr>
<tr>
  <td>{{Tp|hi|{{/Str|all}}|{{/Str|+|force=hi}}}}</td>
  <td>{{Flag|hi}} [{{fullurl:{{FULLPAGENAME}}}}?uselang=hi {{#language:hi}}]</td>
  <td>{{Tp|hr|{{/Str|all}}|{{/Str|+|force=hr}}}}</td>
  <td>{{Flag|hr}} [{{fullurl:{{FULLPAGENAME}}}}?uselang=hr {{#language:hr}}]</td>
</tr>
<tr>
  <td>{{Tp|hu|{{/Str|all}}|{{/Str|+|force=hu}}}}</td>
  <td>{{Flag|hu}} [{{fullurl:{{FULLPAGENAME}}}}?uselang=hu {{#language:hu}}]</td>
  <td>{{Tp|it|{{/Str|all}}|{{/Str|+|force=it}}}}</td>
  <td>{{Flag|it}} [{{fullurl:{{FULLPAGENAME}}}}?uselang=it {{#language:it}}]</td>
</tr>
<tr>
  <td>{{Tp|ja|{{/Str|all}}|{{/Str|+|force=ja}}}}</td>
  <td>{{Flag|ja}} [{{fullurl:{{FULLPAGENAME}}}}?uselang=ja {{#language:ja}}]</td>
  <td>{{Tp|ka|{{/Str|all}}|{{/Str|+|force=ka}}}}</td>
  <td>{{Flag|ka}} [{{fullurl:{{FULLPAGENAME}}}}?uselang=ka {{#language:ka}}]</td>
</tr>
<tr>
  <td>{{Tp|km|{{/Str|all}}|{{/Str|+|force=km}}}}</td>
  <td>{{Flag|km}} [{{fullurl:{{FULLPAGENAME}}}}?uselang=km {{#language:km}}]</td>
  <td>{{Tp|ko|{{/Str|all}}|{{/Str|+|force=ko}}}}</td>
  <td>{{Flag|ko}} [{{fullurl:{{FULLPAGENAME}}}}?uselang=ko {{#language:ko}}]</td>
</tr>
<tr>
  <td>{{Tp|ms|{{/Str|all}}|{{/Str|+|force=ms}}}}</td>
  <td>{{Flag|ms}} [{{fullurl:{{FULLPAGENAME}}}}?uselang=ms {{#language:ms}}]</td>
  <td>{{Tp|nl|{{/Str|all}}|{{/Str|+|force=nl}}}}</td>
  <td>{{Flag|nl}} [{{fullurl:{{FULLPAGENAME}}}}?uselang=nl {{#language:nl}}]</td>
</tr>
<tr>
  <td>{{Tp|no|{{/Str|all}}|{{/Str|+|force=no}}}}</td>
  <td>{{Flag|no}} [{{fullurl:{{FULLPAGENAME}}}}?uselang=no {{#language:no}}]</td>
  <td>{{Tp|pl|{{/Str|all}}|{{/Str|+|force=pl}}}}</td>
  <td>{{Flag|pl}} [{{fullurl:{{FULLPAGENAME}}}}?uselang=pl {{#language:pl}}]</td>
</tr>
<tr>
  <td>{{Tp|pt|{{/Str|all}}|{{/Str|+|force=pt}}}}</td>
  <td>{{Flag|pt}} [{{fullurl:{{FULLPAGENAME}}}}?uselang=pt {{#language:pt}}]</td>
  <td>{{Tp|pt-br|{{/Str|all}}|{{/Str|+|force=pt-br}}}}</td>
  <td>{{Flag|pt-br}} [{{fullurl:{{FULLPAGENAME}}}}?uselang=pt-br {{#language:pt-br}}]</td>
</tr>
<tr>
  <td>{{Tp|ru|{{/Str|all}}|{{/Str|+|force=ru}}}}</td>
  <td>{{Flag|ru}} [{{fullurl:{{FULLPAGENAME}}}}?uselang=ru {{#language:ru}}]</td>
  <td>{{Tp|es|{{/Str|all}}|{{/Str|+|force=es}}}}</td>
  <td>{{Flag|es}} [{{fullurl:{{FULLPAGENAME}}}}?uselang=es {{#language:es}}]</td>
</tr>
<tr>
  <td>{{Tp|sv|{{/Str|all}}|{{/Str|+|force=sv}}}}</td>
  <td>{{Flag|sv}} [{{fullurl:{{FULLPAGENAME}}}}?uselang=sv {{#language:sv}}]</td>
  <td>{{Tp|uk|{{/Str|all}}|{{/Str|+|force=uk}}}}</td>
  <td>{{Flag|uk}} [{{fullurl:{{FULLPAGENAME}}}}?uselang=uk {{#language:uk}}]</td>
</tr>
<tr>
  <td>{{Tp|tr|{{/Str|all}}|{{/Str|+|force=tr}}}}</td>
  <td>{{Flag|tr}} [{{fullurl:{{FULLPAGENAME}}}}?uselang=tr {{#language:tr}}]</td>
  <td>{{Tp|vi|{{/Str|all}}|{{/Str|+|force=vi}}}}</td>
  <td>{{Flag|vi}} [{{fullurl:{{FULLPAGENAME}}}}?uselang=vi {{#language:vi}}]</td>
</tr>
<tr>
  <td>{{Tp|zh|{{/Str|all}}|{{/Str|+|force=zh}}}}</td>
  <td>{{Flag|zh}} [{{fullurl:{{FULLPAGENAME}}}}?uselang=zh {{#language:zh}}]</td>
  <td>{{Tp|zh-tw|{{/Str|all}}|{{/Str|+|force=zh-tw}}}}</td>
  <td>{{Flag|zh-tw}} [{{fullurl:{{FULLPAGENAME}}}}?uselang=zh-tw {{#language:zh-tw}}]</td>
</tr>
</table>
 
</span></div></div>
</div>
 
<div style="line-height:13px; border:1px solid #65635F; border-{{text-dir|ltr=left|rtl=right}}:0; border-radius:{{text-dir|ltr=0 3px 3px 0|rtl=3px 0 0 3px}}; padding:2px 4px 3px 4px; background:linear-gradient(135deg, rgba(255 255 255 / 4%), rgba(255 255 255 / 2%))">[[File:Icon-translate.png|link={{FULLPAGENAME}}/Str|13px]]</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.}}
 
{{Important|This template is still under development, so it may have many flaws.
Apart from this template, I ({{U|Max34}}) am working on a chrome extension called [[User:Max34/VDCEditor|VDCEditor]] in which I also plan to implement support for this whole page template system to make editing much easier.}}
 
{{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).
 
☐ Experiment with adding new lines without constantly copying a large piece of code or make this process simpler).
 
☐ Do something to be able to preview when editing a strings subpage (maybe we should go back to Str template instead of using /Str).
 
(For copying: ☐ <span style="color:green">☑</span> <span style="color:red">☒</span>)
}}
 
New version of the {{Tl2|MultiPage}} template. Uses a completely different page structure, compressing everything into two pages (main one and strings subpage), 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>}}

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.