-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Intl has Kosovo in DENYLIST #54711
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Answer there: #40020 (comment)
|
Yeah now I stumbled on that also after creating this issue. But I don't think that is a correct way to handle this issue. I managed to write a reply in the other issue already: #40020 (comment) The point is that in real world people need solution for that. |
Funny, I have been watching this issue for a while. cc @javiereguiluz We have talked about this. This year in May IIRC there was a vote that would affect this status so I have been waiting, but since nothing happened there, I would like to update the Symfony core team with this section from my correspondence with ISO themselves:
If you are interested to see this in action by the European Commission too feel free to browse: https://ec.europa.eu/eurostat/statistics-explained/index.php?title=Glossary:Country_codes I understand that the original thought was to make this non-political and I am sure members do not have any prejudice against an entire entity such as Kosovo, but I believe that since there seem to be exceptions within ISO themselves and to make this truly a-political my proposal is as follows:
Default behavior can be kept as is, disallow them initially, and for projects that do need this code, they can enable them I would like to work on this. Any extra input needed? |
Yes, I like your proposal:
Thanks! |
This PR was squashed before being merged into the 5.4 branch. Discussion ---------- [Intl] Update ICU data from 74.1 to 75.1 | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | no | New feature? | no | Deprecations? |no | Issues | Not reported | License | MIT While doing some work for [#54711](#54711) I had to track too many file changes because of latest ICU data update. I am opening this PR to simply update the data-dumps. The changes were generated by simply running ```bash $ php src/Symfony/Component/Intl/Resources/bin/update-data.php ``` Commits ------- ff2b7f9 [Intl] Update ICU data from 74.1 to 75.1
Hey, thanks for your report! |
still relevant |
@norkunas there has been a proposal above about a new feature that would solve that case. But nobody has stepped in to actually implement that proposal. If this is relevant for you, maybe you could contribute an implementation. |
Sure probably I could but for me this still looks that it's missing some pieces:
|
Back when I tried to implement my own proposal, even as a first attempt I had the same issues like you @norkunas Due to personal life I had to* put this in the back burner, but looking at all my emails from this issue today, I can take a jab this week again, as I have something with array unpacking that looks OK-ish. |
The symfony/intl component should stay focused on the ISO list, for 2 reasons:
To me, this feature about user-assigned codes should be a feature defined at the level of the CountryType, where the label for those codes would be provided as part of the option adding the user-assigned code (alongside the code). |
But to provide translations for each user assigned code would be a little cumbersome 🤔 |
All data is already in ICU. I will try to finish my PR by Feb 2nd and we can pick that apart 👍 |
Thanks everyone for getting this moving again! 🚀 |
@llupa the data for Kosovo is in ICU. But that's not the feature that @javiereguiluz suggested. |
@stof I think the wording BTW my plan is to have the PR just cover Kosovo as a first step, this topic looks deceptively easy. |
even with a restricting of user-assigned codes per the ISO norm (which I think is a good idea to avoid compatibility issues when the ISO adds new official codes), it still means that the translations will not be in ICU. |
I've been playing around with this topic (it was necessary) and my opinion is that it would be better to create a file format and method that allows the developer to extend the list runtime. |
Thats all we have to do. Subject: [PATCH] added NamesUserAssigned part
---
Index: src/Symfony/Component/Intl/Intl.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/src/Symfony/Component/Intl/Intl.php b/src/Symfony/Component/Intl/Intl.php
--- a/src/Symfony/Component/Intl/Intl.php (revision 4802aab8ab5ae11ca5ba97a45d08454ee7e449a9)
+++ b/src/Symfony/Component/Intl/Intl.php (date 1743692426761)
@@ -57,6 +57,8 @@
private static string|false|null $icuVersion = false;
private static string $icuDataVersion;
+ private static string $dataDirectory;
+
/**
* Returns whether the intl extension is installed.
*/
@@ -114,7 +116,12 @@
*/
public static function getDataDirectory(): string
{
- return __DIR__.'/Resources/data';
+ return self::$dataDirectory ?? __DIR__.'/Resources/data';
+ }
+
+ public static function setDataDirectory(string $dataDirectory): void
+ {
+ self::$dataDirectory = $dataDirectory;
}
/** |
Symfony version(s) affected
Description
Intl component has Kosovo in DENYLIST. Why is that? We rely on this component to populate country selection but we need Kosovo to be also included
How to reproduce
Just call:
Countries::getNames()
and see that Kosovo is not in the resultPossible Solution
remove Kosovo from DENYLIST: https://github.com/symfony/intl/blob/510a40cbf59244af027905cdb838eb7b57447752/Data/Generator/RegionDataGenerator.php#L59
Additional Context
No response
The text was updated successfully, but these errors were encountered: