Template talk:Countries of Asia

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Output from main template[edit]

The following has been changed to use fixed wikitext to show the current results. Johnuniq (talk) 03:45, 23 September 2017 (UTC)

Using the template created in July 2016.

  • {{Countries of Asia}}
  • {{Countries of Asia|prefix=:Category:}}
  • {{Countries of Asia|prefix=:Category:Animals of}}

Output from sandbox template[edit]

The following has been changed to use fixed wikitext to show the current results. Johnuniq (talk) 03:45, 23 September 2017 (UTC)

Using the template that invokes Module:Countries.

  • {{Countries of Asia/sandbox}}
  • {{Countries of Asia/sandbox|prefix=:Category:}}
  • {{Countries of Asia/sandbox|prefix=:Category:Animals of}}

This page in other languages[edit]

Module:Countries[edit]

A new module is being developed at Module:Countries. The background (some out-of-memory errors) is outlined here. The module gets the label for each country from Wikidata, using the language of the current user.

{{Countries of Asia/sandbox}} contains wikitext:

{{#invoke:Countries/sandbox|main|Asia}}

A comparison of the main and sandbox templates is above. After some more checking and tweaks I was planning to use the sandbox wikitext to replace the main template. Johnuniq (talk) 01:35, 17 September 2017 (UTC)

Differences[edit]

Checking the above shows these differences for displayed names with uselang=en.

Main Sandbox
China People's Republic of China China
Palestine Palestinian territories Palestine
Taiwan Island Taiwan

Clicking the other languages links shows several differences. The sandbox lists are sorted although that only gives reasonable results in some languages. The differences with uselang=de are as follows.

Main Sandbox
China Volksrepublik China China
Georgien Georgia Georgien
Palästina (Region) Palästinensische Autonomiegebiete Palestine
Taiwan Republik China (Taiwan)

The module is getting its results from Wikidata and I thought the template was doing that too. I will contemplate the differences later. Johnuniq (talk) 02:32, 17 September 2017 (UTC)

I changed the first two of the following and I think I'll leave the third as is.
Johnuniq (talk) 10:31, 17 September 2017 (UTC)
I updated the main template so it uses the module. Johnuniq (talk) 03:45, 23 September 2017 (UTC)

missing links[edit]

I do not see any links to other countries/categorie in this category, just the plain black country names. Any idea why? -- DerFussi 05:54, 8 May 2018 (UTC)

It's worse than that—all pages with any of the "countries of" templates are broken (except for one that I saw where the HTML had not been purged for a while). I previewed the following in a sandbox and at Special:ExpandTemplates.
{{Countries of Africa|prefix=:Category:Maps of}}
In the sandbox, there were no links—just black names. In ExpandTemplates, the preview does show links. Very strange. A quick investigation makes me think the problem is that Module:Countries outputs each name in bdi tags, and something seems to have happened that breaks the result. Try previewing the following in a sandbox:
<span style="white-space:nowrap">[[:Category:Maps of Algeria|Algeria]]</span>
<span style="white-space:nowrap">[[:Category:Maps of Algeria|<bdi>Algeria</bdi>]]</span>
I see the first as a working link while the second (as output by the module, with bdi) is broken.
Jarekt: Any ideas? It would be easy to remove the bdi output from the module, but what's going on? Johnuniq (talk) 10:39, 8 May 2018 (UTC)
Johnuniq, I am sorry but this is one branch of templates I am totally unfamiliar with. I am more infobox and license template guy. I have never heard of this template or Module:Countries (and dozen submodules) before and I am quote busy at the moment with Artwork/Creator/Institution templates to learn this one. Maybe reach out to people who wrote the code? It might also help to develop testcases/testcase results pages to test the module. --Jarekt (talk) 13:09, 8 May 2018 (UTC)
What I'm asking concerns the bdi that the module outputs. I thought you might have encountered this issue because of your work with languages such as Module:Wikidata label. I'm seeking help at en:Wikipedia:Village pump (technical)#Bidirectional isolation bdi. Johnuniq (talk) 23:15, 8 May 2018 (UTC)
The answer at that link is that a new version of Tidy is breaking links that use bdi. As a temporary workaround I removed the bdi from the output. When Tidy is replaced with Remex at the end of June, bdi can be restored. The links now work, but pages may need to be purged to see the links.
@Jarekt: You might like to know that bdi in links is currently broken in case you hear of any other cases with this problem. Johnuniq (talk) 03:32, 9 May 2018 (UTC)
Thanks for solving the problem. I will have an eye on the issue as well. -- DerFussi 07:04, 9 May 2018 (UTC)