Template talk:Navigation by country

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

Potential issue with translations?[edit]

@Verdy p: I notice the edits you made to this template and welcome the effort to improve it. However, your edits removed the ability of the template to display country names in the selected language of the user, a key feature of this template and so I have restored the previous version of it for now and set up your proposed changes at Template:Navigation by country/sandbox for review. In your note, you mention that you were fixing bugs and that the template was not translateable, so I was wondering if you could elaborate on what bugs you are finding and what you man by not translatable. I find that when I set my language to English, I see names in English, to German and see names in German, Hebrew and see names in Hebrew, and so forth. I have not checked every supported language so perhaps there is one you are seeing a problem with? Let's review the bugs you are finding and see how we can fix them withuot eliminating the ability to display countries in user languages. Josh (talk) 19:21, 11 March 2020 (UTC)[reply]

This template uses Mediawiki but has errors, the lists are incomplte and not synchronized and actually it contains a single language: English
And translatability must not be done this way, but in Wikidata, item by item. So as this did not work except for English, the LangSwith was removed (clearly not necessary).
There's already a much better solution using an existing module (which also allows *correct* testing of existence for known aliases and variations with articles) whichs supports a single unified list of countries, all of them translated from Wikidata, and full support for sortability in a consistant way
Such template is the old way for doing that, but this is giant code, unmaintainable when the list of languages for translation grows, and exploding the capacity of the parser.
Given there was no use at all for tyranslation in the template it was corerct to remove this completely unnecessary LangSwitch, which resulted in wrong lists with missing items for other languages even if everything was actually displayed in English (with the "default=" fallback). So actually I did not remove any translation.
LangSwitch should only be used to translate isolated items, never for complex code for each added language as this breaks the parser and causes excessive use of memory and explodes the limits (causing pages to be very long to render, or not be rendered at all with template transclusions not expanded).
Look at Module:Countries for a much better solution (which also allows custom presentation for lists). verdy_p (talk) 22:27, 11 March 2020 (UTC)[reply]

Incorrect flag changes[edit]

@Verdy p: You have made several changes in country status that are incorrect for the functioning of this template. Countries such as Taiwan are not constituents. Their sovereignty is disputed but that does not make them a constituent of another sovereign country. Please keep in mind that this is a navigation list for Wikimedia Commons categories and galleries and any entity is only ever listed if there is actually a category or gallery extant for it. Josh (talk) 21:57, 8 April 2020 (UTC)[reply]

It is a constituent of China for UN and not recognized sovereign. This is the existing official status, independantly of the disputes of sovereignty. verdy_p (talk) 21:59, 8 April 2020 (UTC)[reply]
And it was clear in the navigation template for countries of Asia that you removed from the many relevant categories: there was no confusion at all about the status (and their parent categories that you removed too, completely blindly); but your newer nav template mixes now everything ! verdy_p (talk) 22:01, 8 April 2020 (UTC)[reply]
This is not a nav template, it is merely a tool for creating lists that can be used by nav templates. You keep making the mistake of stepping into something you do not understand and making changes that are incorrect because of that lack of understanding. I know you think you have all the right answers and it seems no one can tell you otherwise, but that doesn't make it so. Parameter showcurrent was not intended to reflect UN status. Your efforts to pervert it into something it wasn't intended to do is wrong. Josh (talk) 22:47, 8 April 2020 (UTC)[reply]
also some of your new tests added in the doc page had incorrect parameters and did not displays waht was described; I've reordered it to make things clearer.
But your two recent edits made things all garbled.
I also added the case of "Category:Maps of" so that you see the effect of the conditional "the", which does not work depending on the prefix used (or absence of prefix). verdy_p (talk) 22:51, 8 April 2020 (UTC)[reply]
The status was displayed appropriately with the "countries of" template, which also managed the conditional "the" and found the supported aliases (which vary sometimes depending on the parent category used, because of disambiguation suffixes not always present for all topics).
You perverted the categories by reducing the navigation (making things less clear) and lack of support for aliases. verdy_p (talk) 22:51, 8 April 2020 (UTC)[reply]
What categories are you even talking about? This template doesn't even set any categories! Again with the rampant irrelevant ranting. Josh (talk) 23:27, 8 April 2020 (UTC)[reply]
I'm happy to work with you to add a new flag to meet an end use if you have one you would like to share. Any new flags should be discussed, as we don't want to have too many built in, but we can certainly add ones that make sense. You can see a variety of different display options in the documentation. Josh (talk) 23:27, 8 April 2020 (UTC)[reply]
Hmmm, too many test cases on the doc page resulted in some flaky behavior. I've limited the doc page to a few examples, but set up Template:Navigation by country/doc/testcases to experiment and go to town with all the permutations one wants to try out. This is better than using the doc page as a testbed, as the template is not designed to be added to the same pages a hundred times over! Josh (talk) 00:26, 9 April 2020 (UTC)[reply]

Purpose of this template[edit]

I don't understand the purpose of this template. As was said above, Module:Countries is already there for navigation by countries, and I see no advantage in maintaining two different lists of countries by continent. If you look at the previous version of Category:Nature of Austria for example, you can see how, for example, {{Category description}} can be used with a number of advantages:

  • The list of country names is fully translated using the Wikidata labels, so translation is available out of the box for dozens of languages.
  • It uses Module:Countries so no need for double maintenance, no reinventing the wheel.
  • It uses Module:Navbox so no reinventing the wheel on the design side either.
  • It includes a centrally maintained explanatory text about the purpose of the category which helps to make clearer what belongs in there and what doesn't. Of course this is also translateable.
  • The same template can be used not only for countries, but for subdivisions of countries all the way down the hierarchy (see for example Category:Nature of Lower Austria, Category:Nature of Bezirk Gmünd, Category:Nature of Schrems).
  • It fetches the actual country name from the page title, so the snippet {{Category description|Nature by administrative division}} can simply be copy-and-pasted into any "Nature of..." category page without the need to change a parameter for each page.

Thanks --Reinhard Müller (talk) 07:59, 7 June 2021 (UTC)[reply]