User:Bugman/wikipedia: Difference between revisions

Attempted fix for the automatic language support.
(Copy of the current {{wikipedia}} template for testing.)
 
(Attempted fix for the automatic language support.)
Line 1: Line 1:
<span class="plainlinks">[https://{{{lang|{{#if: {{{ {{lc: {{#titleparts: {{PAGENAME}} | 1}} }}| }}}  <!-- Does the page have a language prefix/language code? -->
<span class="plainlinks">[https://<!--
                                            | {{{ {{lc: {{#titleparts: {{PAGENAME}} | 1}} }} }}} <!-- If the page does have a language prefix, use the the contents of the parameter with that language code. -->
-->{{{lang|{{#if: {{#titleparts: {{PAGENAME}} | 1}}  <!-- Does the page have a language prefix/language code? -->
                                            | en <!-- If lang is empty or undefined and there is no language prefix, use the English content. -->
            | {{lc: {{#titleparts: {{PAGENAME}} | 1}} }} <!-- If the page does have a language prefix, use the contents of the parameter with that language code. -->
}}}}}.wikipedia.org/<!--
            | en <!-- If lang is empty or undefined and there is no language prefix, use the English content. -->
          }}<!--
-->}}}.wikipedia.org/<!--
-->{{#if: {{{diff|}}}  <!-- Is there a diff parameter and a permalink should be used? -->
-->{{#if: {{{diff|}}}  <!-- Is there a diff parameter and a permalink should be used? -->
  |  <!-- Yes there is a diff parameter, use permalink -->
  |  <!-- Yes there is a diff parameter, use permalink -->
Line 17: Line 19:
-->{{#if: {{{oldid|}}}  <!-- Is there an oldid parameter? -->
-->{{#if: {{{oldid|}}}  <!-- Is there an oldid parameter? -->
  |  <!-- Yes there is an oldid parameter -->
  |  <!-- Yes there is an oldid parameter -->
  &nbsp;(<span class="plainlinks">[https://{{{lang|en}}}.wikipedia.org/w/index.php?title={{urlencode:{{{2|Main Page}}}|wiki}}<!--
  &nbsp;(<span class="plainlinks">[https://<!--
-->{{{lang|{{#if: {{#titleparts: {{PAGENAME}} | 1}}  <!-- Does the page have a language prefix/language code? -->
            | {{lc: {{#titleparts: {{PAGENAME}} | 1}} }} <!-- If the page does have a language prefix, use the contents of the parameter with that language code. -->
            | en <!-- If lang is empty or undefined and there is no language prefix, use the English content. -->
          }}<!--
-->}}}.wikipedia.org/w/index.php?title={{urlencode:{{{2|Main Page}}}|wiki}}<!--
  -->{{#if: {{{diff|}}}  <!-- Is there also a non-empty diff parameter? -->
  -->{{#if: {{{diff|}}}  <!-- Is there also a non-empty diff parameter? -->
   |  <!-- Yes, there there also a non-empty diff parameter, show a link to the diff -->
   |  <!-- Yes, there there also a non-empty diff parameter, show a link to the diff -->
Line 49: Line 56:


== Examples ==
== Examples ==
  <nowiki>See the {{wikipedia|FlightGear}} article on Wikipedia.</nowiki>
  <nowiki>See the {{:User:Bugman/wikipedia|FlightGear}} article on Wikipedia.</nowiki>
See the {{wikipedia|FlightGear}} article on Wikipedia.
See the {{:User:Bugman/wikipedia|FlightGear}} article on Wikipedia.


  <nowiki>External link: {{wikipedia|FlightGear|FlightGear (Wikipedia)|noicon=1}}</nowiki>
  <nowiki>External link: {{:User:Bugman/wikipedia|FlightGear|FlightGear (Wikipedia)|noicon=1}}</nowiki>
External link: {{wikipedia|FlightGear|FlightGear (Wikipedia)|noicon=1}}
External link: {{:User:Bugman/wikipedia|FlightGear|FlightGear (Wikipedia)|noicon=1}}


  <nowiki>See the {{wikipedia|FlightGear|lang=sv}} article on the Swedish Wikipedia.</nowiki>
  <nowiki>See the {{:User:Bugman/wikipedia|FlightGear|lang=sv}} article on the Swedish Wikipedia.</nowiki>
See the {{wikipedia|FlightGear|lang=sv}} article on Swedish Wikipedia.
See the {{:User:Bugman/wikipedia|FlightGear|lang=sv}} article on Swedish Wikipedia.


  <nowiki>The Wikipedia article by the time of the {{wikipedia|FlightGear|release of FlightGear 3.0|oldid=596124837}}.</nowiki>
  <nowiki>The Wikipedia article by the time of the {{:User:Bugman/wikipedia|FlightGear|release of FlightGear 3.0|oldid=596124837}}.</nowiki>
The Wikipedia article by the time of the {{wikipedia|FlightGear|release of FlightGear 3.0|oldid=596124837}}.
The Wikipedia article by the time of the {{:User:Bugman/wikipedia|FlightGear|release of FlightGear 3.0|oldid=596124837}}.


  <nowiki>Someone {{wikipedia|FlightGear|mentioned the HondaJet take-down request|oldid=611503439|diff=yep}} on Wikipedia.</nowiki>
  <nowiki>Someone {{:User:Bugman/wikipedia|FlightGear|mentioned the HondaJet take-down request|oldid=611503439|diff=yep}} on Wikipedia.</nowiki>
Someone {{wikipedia|FlightGear|mentioned the HondaJet take-down request|oldid=611503439|diff=yep}} on Wikipedia.
Someone {{:User:Bugman/wikipedia|FlightGear|mentioned the HondaJet take-down request|oldid=611503439|diff=yep}} on Wikipedia.


== Known issues ==
== Known issues ==