[4.0] Flags are country flags, not language flags#28575
[4.0] Flags are country flags, not language flags#28575Bakual wants to merge 6 commits intojoomla:4.0-devfrom
Conversation
|
Suggestion: |
|
Ah, good find. Will do that today! |
|
By not removing images only on new installs you create a scenario whereby on one site (an upgrade) you select a flag of de_DE.gif and on another site (clean install) you select a flag of de.gif On the other hand for upgraded sites that have been set to use de_DE.gif and you do remove the image on upgrade then you get a 404 on the image. |
Which is no problem. Or do I miss something? |
|
Updated with findings from JM |
I am not a fan of different settings based on an upgrade or a clean install - personal opinion - others may disagree |
Yes. Add it into this array and we are good https://github.com/joomla/joomla-cms/pull/25559/files#diff-364166631f7d7383b58d579f097b86a2R63 |
fd25811 to
9b5da1e
Compare
|
I tested with Persian which worked but when I try to install for example fr-CA, en-us,... the language packages can't be found ...? |
|
iirc at the moment there are only 3 languages ready for j4 |
|
They are not "ready" for J4. Their 3.9 versions are only available for installing in J4 at J4 install time and through the Install Languages interface. |
|
I have tested this item ✅ successfully on 9b5da1e Step
|
|
There are not enough languages to test this successfully. Ideally, we should be able to install a language available for different countries. For instance, French from France and French from Canada. Depending on the language file installed, we should get either the French flag or the Canadian flag. |
|
@obuisard |
|
You could manually download a package and install that zip like a regular extension. Codewise it is the exact same thing that happens. |
|
Oh, JM was faster 😄 |
|
Thank you! |
|
I tested now and I don't understand. |
|
@coolcat-creations |
|
Aye, it doesn't delete existing images to keep being backward compatible. |
|
Maybe I'm a bit late to the party, but I was pointed to this by the bugs and fun at home PR list. 2 questions:
|
|
Because languages don't match national borders, I think this PR is right. I will test it as soon as the conflicts are resolved. |
|
I still think this PR would be useful. But I certainly don't have time to fix conflicts during the next week. However the conflict itself is minimal and easy to solve as it's only in the postgresql file (which has almost no impact). A decision would certainly be welcome. |
|
@Bakual I can fix the conflict for you here via GitHub UI. But the conflict shows there has been made an error before with another PR which has been merged. Will have to make a separate PR to fix that. |
|
Conflicts solved. |
|
I tested the following:
Then
System Information |
|
I have tested this item ✅ successfully on 794fad4 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/28575. |
|
Merged current 4.0-dev so hopefully tests pass |
|
I have tested this item ✅ successfully on 7433fd3 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/28575. |
|
Tested successfully This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/28575. |
|
I have tested this item ✅ successfully on 7433fd3 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/28575. |
|
I am closing this, seems not the perfect solution. Good would be a migration script that let us not have a b/c break. Thanks for the discusion and work on this. |
|
p.s. RLDQ 👍 |







When installing a language, the corresponding content language is automatically created and also an image ("flag") associated with it.
However the logic for the language flags applied there is no proper logic at all: The issue is that there exists no language flags, they are country (or district) flags.
When a new official language is created by our translation teams, we manually have to upload a new image matching the new language code. For example for the german dialects this was done in a PR (see #11868).
Original PR was #12014. Feel free to read through the lengthy discussion there.
Summary of Changes
This PR suggest to change the logic and assign the flags based on the country code in our language codes. Eg for de-CH (Swiss German) it would take the image ch.gif instead of de-ch.gif.
To still allow language specific images, it will first look for an existing file with the language code and fall back to the country code.
This PR also removes all now unneeded (since duplicated) files and renames some:
33 files are renamed to their corresponding country code.
75 files are deleted because they were duplicates and are no longer needed.
6 files are renamed to a name which already existed with a wrong image before. Those are si.gif, ca.gif, br.gif, be.gif, at.gif and af.gif. This accounts for a small B/C break for people who used those images before, as they will now change. Solution is simple: The user needs to select the image fresh in the content language.
Testing Instructions
Documentation Changes Required
None that I am aware of.