Difference between revisions of "Template:Game Menu"

From eRepublik Official Wiki
Jump to: navigation, search
m
(added residence, replaced "country administration" with "my country")
(12 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<includeonly><br><div id="newMenu" style="{{#ifeq:{{{hide0|}}}{{{hide1|}}}{{{hide2|}}}{{{hide3|}}}{{{hide4|}}}{{{hide5|}}}|||{{#ifeq:{{{mainpage|}}}|true|width:768px;|margin:0px 0px; width:auto;}}}}{{#ifeq:{{{expand|}}}|all|height:450px;}}{{#ifeq: {{{expand2|}}}|true|height:450px;}}{{#ifeq: {{{expand1|}}}|true|height:275px;}}{{{float|}}} float:left;">
+
<includeonly><br><div id="newMenu" style="{{#ifeq:{{{hide0|}}}{{{hide1|}}}{{{hide2|}}}{{{hide3|}}}{{{hide4|}}}{{{hide5|}}}|||{{#ifeq:{{{mainpage|}}}|true|width:768px;|margin:0px 0px; width:auto;}}}}{{#ifeq:{{{expand|}}}|all|height:450px;}}{{#ifeq: {{{expand2|}}}|true|height:450px;}}{{#ifeq: {{{expand1|}}}|true|height:275px;}} float:{{{float|left}}};">
 
<ul id="nav">
 
<ul id="nav">
 
{{#ifeq:{{{hide0|}}}|true||<li id="menu1">{{L|Homepage|<span> </span>}}</li>}}
 
{{#ifeq:{{{hide0|}}}|true||<li id="menu1">{{L|Homepage|<span> </span>}}</li>}}
{{#ifeq:{{{hide1|}}}|true||<li id="menu2">{{L|My places|<span>{{Game Menu/Strings|places_{{Game Menu/Lang|{{Lang}}}}}}</span>}}</li>}}
+
{{#ifeq:{{{hide1|}}}|true||<li id="menu2">{{L|My places|<span>{{Game Menu/String|places}}</span>}}
{{#ifeq:{{{hide2|}}}|true||<li id="menu3">{{L|Wars|<span>{{Game Menu/Strings|wars_{{Game Menu/Lang|{{Lang}}}}}}</span>}}</li>}}
+
<ul style="{{#ifeq: {{{expand3|}}}|true|display:block;}} {{#ifeq:{{{expand|}}}|all|display:block;}}">
{{#ifeq:{{{hide3|}}}|true||<li id="menu4">{{L|Market|<span>{{Game Menu/Strings|market_{{Game Menu/Lang|{{Lang}}}}}}</span>}}
+
<li>{{L|Residence|{{Game Menu/String|residence}}}}</li>
 +
<li>{{L|Company_(presentation_page)|{{Game Menu/String|companies}}}}</li>
 +
<li>{{L|Train|{{Game Menu/String|tgrounds}}}}</li>
 +
<li>{{L|Storage|{{Game Menu/String|storage}}}}</li>
 +
<li>{{L|Buildings|{{Game Menu/String|spbuildings}}}}</li>
 +
<li>{{L|Travel|{{Game Menu/String|location}}}}</li>
 +
</ul>
 +
}}
 +
{{#ifeq:{{{hide2|}}}|true||<li id="menu3">{{L|Wars|<span>{{Game Menu/String|wars}}</span>}}</li>}}
 +
{{#ifeq:{{{hide3|}}}|true||<li id="menu4">{{L|Market|<span>{{Game Menu/String|market}}</span>}}
 
<ul style="{{#ifeq: {{{expand1|}}}|true|display:block;}} {{#ifeq:{{{expand|}}}|all|display:block;}}">
 
<ul style="{{#ifeq: {{{expand1|}}}|true|display:block;}} {{#ifeq:{{{expand|}}}|all|display:block;}}">
<li>{{L|Marketplace|{{Game Menu/Strings|marketplace_{{Game Menu/Lang|{{Lang}}}}}}}}</li>
+
<li>{{L|Marketplace|{{Game Menu/String|marketplace}}}}</li>
<li>{{L|Job market|{{Game Menu/Strings|job_{{Game Menu/Lang|{{Lang}}}}}}}}</li>
+
<li>{{L|Job market|{{Game Menu/String|job}}}}</li>
<li>{{L|Monetary market|{{Game Menu/Strings|monetary_{{Game Menu/Lang|{{Lang}}}}}}}}</li>
+
<li>{{L|Monetary market|{{Game Menu/String|monetary}}}}</li>
<li>{{L|Companies for sale|{{Game Menu/Strings|cmarket_{{Game Menu/Lang|{{Lang}}}}}}}}</li>
+
<li>{{L|Companies for sale|{{Game Menu/String|cmarket}}}}</li>
 
</ul>
 
</ul>
 
}}
 
}}
{{#ifeq:{{{hide4|}}}|true||<li id="menu5"> {{L|Community|<span>{{Game Menu/Strings|community_{{Game Menu/Lang|{{Lang}}}}}}</span>}}
+
{{#ifeq:{{{hide4|}}}|true||<li id="menu5"> {{L|Community|<span>{{Game Menu/String|community}}</span>}}
 
<ul style="{{#ifeq: {{{expand2|}}}|true|display:block;}} {{#ifeq:{{{expand|}}}|all|display:block;}}">
 
<ul style="{{#ifeq: {{{expand2|}}}|true|display:block;}} {{#ifeq:{{{expand|}}}|all|display:block;}}">
<li>{{L|Country administration|{{Game Menu/Strings|country_{{Game Menu/Lang|{{Lang}}}}}}}}</li>
+
<li>{{L|My country|{{Game Menu/String|country}}}}</li>
<li>{{L|Military unit|{{Game Menu/Strings|militaryunit_{{Game Menu/Lang|{{Lang}}}}}}}}</li>
+
<li>{{L|Military unit|{{Game Menu/String|militaryunit}}}}</li>
<li>{{L|Party|{{Game Menu/Strings|party_{{Game Menu/Lang|{{Lang}}}}}}}}</li>
+
<li>{{L|Party|{{Game Menu/String|party}}}}</li>
<li>{{L|Newspaper|{{Game Menu/Strings|newspaper_{{Game Menu/Lang|{{Lang}}}}}}}}</li>
+
<li>{{L|Newspaper|{{Game Menu/String|newspaper}}}}</li>
<li>{{L|Forum|{{Game Menu/Strings|forum_{{Game Menu/Lang|{{Lang}}}}}}}}</li>
+
<li>{{L|Forum|{{Game Menu/String|forum}}}}</li>
<li>{{L|Alliances|{{Game Menu/Strings|alliances_{{Game Menu/Lang|{{Lang}}}}}}}}</li>
+
<li>{{L|Alliances|{{Game Menu/String|alliances}}}}</li>
<li>{{L|Elections|{{Game Menu/Strings|elections_{{Game Menu/Lang|{{Lang}}}}}}}}</li>
+
<li>{{L|Elections|{{Game Menu/String|elections}}}}</li>
<li>{{L|Rankings|{{Game Menu/Strings|rankings_{{Game Menu/Lang|{{Lang}}}}}}}}</li>
+
<li>{{L|Rankings|{{Game Menu/String|rankings}}}}</li>
<li>{{L|World map|{{Game Menu/Strings|map_{{Game Menu/Lang|{{Lang}}}}}}}}</li>
+
<li>{{L|Latest Game Changes|{{Game Menu/String|latestupdates}}}}</li>
 +
<li>{{L|World map|{{Game Menu/String|map}}}}</li>
 
</ul>
 
</ul>
 
}}
 
}}
{{#ifeq:{{{hide5|}}}|true||<li id="menu6">{{L|Gold and Extras|<span>{{Game Menu/Strings|extras_{{Game Menu/Lang|{{Lang}}}}}}</span>}}</li>}}
+
{{#ifeq:{{{hide5|}}}|true||<li id="menu6">{{L|Gold and Extras|<span>{{Game Menu/String|extras}}</span>}}</li>}}
 
</ul>
 
</ul>
 
</div>
 
</div>
 
{{-}}<br>
 
{{-}}<br>
 +
 
</includeonly>
 
</includeonly>
 
<noinclude>
 
<noinclude>
 
{{Documentation}}[[Category:Menu Templates]]
 
{{Documentation}}[[Category:Menu Templates]]
 
</noinclude>
 
</noinclude>

Revision as of 13:35, 21 January 2019


[edit] [purge]

Documentation





Usage

{{Game Menu}}

This is used to display the same game menu there is in the game. To expand all menus add expand=all| parameter.

Expanding single menu

To expand a single menu, use the following code:

  • expand1=true| - to expand Market menu
  • expand2=true| - to expand Community menu
  • expand3=true| - to expand My places menu

Hiding some menus / show only specific menus

If you want to hide some menus, use the following code:

  • hide0=true| - to hide Homepage button
  • hide1=true| - to hide My places button
  • hide2=true| - to hide Wars button
  • hide3=true| - to hide Market button
  • hide4=true| - to hide Community button
  • hide5=true| - to hide Gold and Extras button

If you hide some menus, the bar will be aligned to the left side of the page.

Instructions for translators

To add a new language you need to

  1. Choose an abbreviation for your language (English = en, Finnish = fi, etc.)
    • Add following line to this page: Name of your lang = your lang abbreviation| (e.g. Hrvatski = hr|)
    • Add that line right after the "English = en|" line and save the page.
  1. Translate the strings
    • Copy the code underneath to Template:Game Menu/Strings page.
    • Replace the "_en" abbreviation with the abbreviation you added in the first step (e.g. for Croatian you need to replace "_en" with "_hr")
    • Translate the strings and save

If you don't understand these instructions, ask for help on bar page or discord wiki chat

  <!-- Language?? translation -->
  home_en = Homepage|
  places_en = My places|
  residence_en = Residence|
  companies_en = Companies|
  tgrounds_en = Training grounds|
  armory_en = Armory|
  manageemployees_en = Manage employees|
  storage_en = Storage|
  advbuildings_en = Advanced buildings|
  travel_en = Travel|
  wars_en = Wars|
  market_en = Market|
  marketplace_en = Marketplace|
  monetary_en = Monetary market|
  job_en = Job market|
  cmarket_en = Companies for sale|
  tokens_en = Game Tokens|
  community_en = Community|
  country_en = My country|
  militaryunit_en = My military unit|
  party_en = My party|
  newspaper_en = My newspaper|
  forum_en = Forum|
  invite_en = Invite friends|
  leaderboards_en = Leaderboards|
  alliances_en = Alliances|
  elections_en = Elections|
  rankings_en = Rankings|
  latestupdates_en = Latest updates|
  map_en = World map|
  extras_en = Gold & Extras|
  badges_en = Badges|