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)[reply]

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)[reply]

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)[reply]

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)[reply]

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)[reply]
I updated the main template so it uses the module. Johnuniq (talk) 03:45, 23 September 2017 (UTC)[reply]

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)[reply]

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)[reply]
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)[reply]
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)[reply]
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)[reply]
Thanks for solving the problem. I will have an eye on the issue as well. -- DerFussi 07:04, 9 May 2018 (UTC)[reply]

Macau[edit]

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

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)[reply]
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)[reply]
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)[reply]
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)[reply]
Well HK is the ISO code for Hong Kong. The ISO code for Macau is MO. Fry1989 eh? 01:53, 16 September 2018 (UTC)[reply]
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)[reply]
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)[reply]

United Arab Emirates[edit]

UAE is not shown in the list, e.g. at Category:Overhead power lines in the United Arab Emirates. I don't see a problem in the template, but maybe it was introduced (@Verdy p: ) with [1]? Note that the Philippines, also including "the", are shown. --Te750iv (talk) 20:33, 18 August 2019 (UTC)[reply]

Fixed: the option "the=true" was missing in the Countries/Asia module. verdy_p (talk) 21:07, 18 August 2019 (UTC)[reply]
Note: your diff is inaccurate as it refers to the previous template version, not the current module version. verdy_p (talk) 21:08, 18 August 2019 (UTC)[reply]
@Verdy p: thanks very much! Ping also @Pymouss: to make sure you notice the issue (referring to this edit [2]). --Te750iv (talk) 23:51, 18 August 2019 (UTC)[reply]

Diego Garcia[edit]

Should we add this? --Liuxinyu970226 (talk) 09:14, 1 February 2020 (UTC)[reply]

Palestine[edit]

Could someone please add Palestine? Thanks, Huldra (talk) 22:23, 13 January 2022 (UTC)[reply]

Chinese Taipei[edit]

Please add a match for Chinese Taipei (Taiwan), like it is done for Ireland. Trigenibinion (talk) 23:27, 16 November 2022 (UTC)[reply]