Skip to content
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

CLDR-18155 Order languageData's scripts by number of users #4237

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

conradarcturus
Copy link
Contributor

CLDR-18155

This sorts the scripts in the SupplementalData tags such that the first script has the highest population. This helps resolve some of the ambiguities interpreting the data.

  • This PR completes the ticket.

ALLOW_MANY_COMMITS=true

@conradarcturus conradarcturus force-pushed the CLDR-18155-Order-languageData-scripts-by-usage branch from 757c108 to cbce758 Compare December 10, 2024 07:58
@jira-pull-request-webhook
Copy link

Notice: the branch changed across the force-push!

  • tools/cldr-code/src/main/java/org/unicode/cldr/tool/ConvertLanguageData.java is different

View Diff Across Force-Push

~ Your Friendly Jira-GitHub PR Checker Bot

@@ -1346,7 +1346,7 @@ XXX Code for transations where no currency is involved
<language type="awa" scripts="Deva"/>
<language type="awa" territories="IN" alt="secondary"/>
<language type="ay" scripts="Latn" territories="BO"/>
<language type="az" scripts="Arab Cyrl Latn" territories="AZ"/>
<language type="az" scripts="Arab Latn Cyrl" territories="AZ"/>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

likely subtags for az is az_Latn_AZ but I will note there are more Azerbaijani speakers in Iran (az_Arab_IR). It's just that they haven't transitioned to the internet like Azerbaijan has.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While more speakers, it appears that there is more written in Latin (AZ) that Arabic (IR). So probably better Latn Arab Cyrl.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This language points out a good flaw in population estimates alone -- and it depends on the usage.

Do people want likely subtags based on the largest corpora, for active internet users, for official government mandates, for any potential user (regardless of online status), for spoken content, for local content v global content (eg. AE's largest internet usage is en_AE not ar_AE).

An interesting idea (for LikelySubtags) could be to add alt="official" and potentially other alt tags when it's different. But yes, let's just stew on this thought and return to it if/when we have a good evidence it would be useful downstream.

Copy link
Contributor

@roozbehp roozbehp Dec 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strong agreement with what Mark said: despite spoken Azerbaijani being quite common in Iran with more speakers than in Azerbaijan, literacy in the writing system is pretty low in Iran, due to it not being formally taught in schools. There are books and magazines published in az-Arab in Iran, but most Iranian Azerbaijani speakers have difficulty reading them, even if they are literate in Persian (which is is theoretically a close writing system). So if anyone runs into written Azerbaijani in the wild these days, there's a much higher chance it's in Latin than in Arabic.

I also believe there's much more spoken "content" (read "media") produced in the language in Azerbaijan than in Iran (there's limited Azerbaijani radio and TV stations in Iran, and I believe less podcasts and songs produced in Iran). But either way, I don't think we want to tag such content as az-Arab or az-Latn. That's just az (or azb/azj if you insist on using ISO 639-3), and not az-Latn or az-Arab.

Copy link
Contributor Author

@conradarcturus conradarcturus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added in-line comments for some languages with interesting changes. Otherwise they all match likely subtags and public records.

for (String script : scripts) {
scriptsByPopulation.put(script, 0);
}
return setScripts(scriptsByPopulation);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better to build once, make immutable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know generally what you mean but I'm not sure how you want me to do this. Do you want me to avoid calling setScripts and include the code here as well? Personally I prefer DRY code over WET.

macchiati
macchiati previously approved these changes Dec 10, 2024
@conradarcturus conradarcturus marked this pull request as ready for review December 16, 2024 10:08
@conradarcturus conradarcturus force-pushed the CLDR-18155-Order-languageData-scripts-by-usage branch from cbce758 to f03fd8c Compare December 16, 2024 10:09
@jira-pull-request-webhook
Copy link

Notice: the branch changed across the force-push!

  • common/supplemental/likelySubtags.xml is now changed in the branch
  • common/supplemental/supplementalData.xml is different
  • common/testData/localeIdentifiers/likelySubtags.txt is now changed in the branch
  • tools/cldr-code/src/main/java/org/unicode/cldr/tool/ConvertLanguageData.java is different
  • tools/cldr-code/src/main/java/org/unicode/cldr/util/DiffLanguageGroups.java is now changed in the branch
  • tools/cldr-code/src/main/java/org/unicode/cldr/util/SupplementalDataInfo.java is different
  • tools/cldr-code/src/main/resources/org/unicode/cldr/util/data/country_language_population.tsv is different

View Diff Across Force-Push

~ Your Friendly Jira-GitHub PR Checker Bot

Copy link
Member

@macchiati macchiati left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok to merge. Can do fixups later if necessary

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants