Skip to content

[Intl] [Emoji] Fix emoji files (remove wrong characters / add missing data) #53203

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

Merged
merged 1 commit into from
Dec 26, 2023

Conversation

smnandre
Copy link
Member

Q A
Branch? 6.4
Bug fix? yes
New feature? no
Deprecations? no
Issues Fix #53116
License MIT

Fix two things

  • unwanted characters (↑↑↑) instead of expected translations
  • merging between child and parent locales

Also adapted the code to maintain a shared / reproductible order in the generated files.

@carsonbot
Copy link

Hey!

Thanks for your PR. You are targeting branch "7.1" but it seems your PR description refers to branch "6.4".
Could you update the PR description or change target branch? This helps core maintainers a lot.

Cheers!

Carsonbot

@carsonbot carsonbot changed the title [Intl][Emoji] Fix emoji files (remove wrong characters / add missing data) [Intl] [Emoji] Fix emoji files (remove wrong characters / add missing data) Dec 24, 2023
@smnandre smnandre changed the base branch from 7.1 to 6.4 December 24, 2023 00:56
@smnandre
Copy link
Member Author

How can i tell fabbot to not add Licence or correct typo in the generated files ?

Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

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

Is the reordering necessary? Can't we get rid of it? I'd prefer keeping the original order if possible.

@smnandre
Copy link
Member Author

Is the reordering necessary? Can't we get rid of it? I'd prefer keeping the original order if possible.

By "original" you mean the one implemented previously ?

The problem i see: it was not the same between locales (as soon as parent/child where involved), and a new child addind a translatation for a given emoji would change the message.. and its position in the array.

@nicolas-grekas
Copy link
Member

I mean the order implemented previously yes, which is the order found in the source IIRC.

@smnandre
Copy link
Member Author

The previous files were not ordered like the source ones, they were ordered by mb_strlen then source order.

$codePointsCount = mb_strlen($emoji);
$mapsByLocale[$locale][$codePointsCount][$emoji] = $name;

And that order was kept only when no parent/child locale was involved

@smnandre
Copy link
Member Author

I can mimic this behaviour to build the "model map" if you want

@nicolas-grekas
Copy link
Member

I like reducing diffs so if you can then yes please :)

@smnandre
Copy link
Member Author

I like reducing diffs so if you can then yes please :)

Much better now indeed ... only the "child locales" have been updated

As they were the only one concerned by the two problems (arrows instead of messages, and missing parent messages) this is much more logical.

Thanks ;)

@smnandre
Copy link
Member Author

Still don't know how to handle fabbot false positives ❓

@nicolas-grekas
Copy link
Member

Still don't know how to handle fabbot false positives ❓

ignoring them once they are checked 🧠

@nicolas-grekas nicolas-grekas modified the milestones: 7.1, 6.4 Dec 26, 2023
@nicolas-grekas
Copy link
Member

Thank you @smnandre.

@nicolas-grekas nicolas-grekas merged commit aad8531 into symfony:6.4 Dec 26, 2023
This was referenced Dec 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Intl][Emoji] Arrows instead of emoji (CLDR hierarchical ↑↑↑)
3 participants