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]


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:


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)


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)


Can someone please add Macau to the template? Fry1989 eh? 00:28, 14 September 2018 (UTC)

That would be easy to do but I don't know why Macau would be added but not other places in Category:China Southeast. I would like to see a wider discussion, if possible. Johnuniq (talk) 07:55, 14 September 2018 (UTC)
Macau is a special place in China with autonomy, on par with Hong Kong. In my eyes it is logical to add Macau to the "other territories" subsection, since Hong Kong already is there. VulpesVulpes42 (talk) 14:52, 14 September 2018 (UTC)
I agree that since both Hong Kong and Macau are special autonomous regions, if Hong Kong is in the template, it makes sense for Macau to also be in the template. I will not oppose a wider discussion, however. Fry1989 eh? 17:27, 14 September 2018 (UTC)
While waiting for other views, adding Macau would need values like the following which shows Hong Kong and a possible Macau.
code = HK, name = Hong Kong, qid = d:Q8646
code = ?, name = Macau, qid = d:Q14773
The code can be anything (it is only used internally, but it is needed). Macau is a redirect to 澳門 - Macau and Category:Macau is used. Johnuniq (talk) 02:19, 15 September 2018 (UTC)
Well HK is the ISO code for Hong Kong. The ISO code for Macau is MO. Fry1989 eh? 01:53, 16 September 2018 (UTC)
OK, I made the edit as everyone here seems to agree. Please check a few pages and report any problems here. Johnuniq (talk) 04:00, 16 September 2018 (UTC)
There doesn't appear to be any flaws to the pages I have added the template to. I am very grateful. Fry1989 eh? 17:54, 16 September 2018 (UTC)