Fix mixed-script values in the ru_RU company name lists - #1067
Open
a-vasyukov wants to merge 1 commit into
Open
Conversation
Three values in the ru_RU Company provider mix Latin and Cyrillic letters: '-H' and 'Cиб' hold Latin homoglyphs, and 'IT' is Latin inside an otherwise Cyrillic list. Company names are assembled without separators, so each of them yields mixed-script words such as "Хмель-H", "CибМаш" or "ITМонтаж", which break search and sorting for anyone using the ru_RU locale.
Author
|
Pinging before the stale bot reaches this one — the fix it re-submits (#882) was approved twice and If CI has never run here — outside contributors need manual approval. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is the reason for this PR?
Three values in
src/Provider/ru_RU/Company.phpmix scripts:'-H'($companyNameSuffixes)H(U+0048) instead of CyrillicН(U+041D)'Cиб'($companyElements)C(U+0043) instead of CyrillicС(U+0421)'IT'($companyElements)Company names are assembled without separators
(
{{companyPrefix}} {{companyNameElement}}{{companyNameElement}}{{companyNameSuffix}}), so each ofthese produces a mixed-script word:
Хмель-H,CибМаш,ITМонтаж. Such strings do not match asearch for their Cyrillic spelling and sort incorrectly —
Cибis never found byСиб. Each valuelands in roughly 3.6% of generated company names.
'IT'is wrong as data too: a Russian company's registered name is written in Russian, and foreignwords may only appear in Cyrillic transcription, so Russian IT companies are registered as
АйТи,never as
IT.This re-submits the fix from #882, which was approved twice but closed by the stale bot on
2025-05-06, and extends it to the other two values.
Author's checklist
Summary of changes
'-H'→'-Н','Cиб'→'Сиб','IT'→'АйТи'Regarding "avoid changing existing sets of data": no element is added, removed or reordered, so a
given seed still selects the same positions in the same order. Only the characters inside three
values change — the very characters that are the defect.
The suite stays green: 1416 tests before, 1417 with the new test, no failures.
Review checklist
CHANGELOG.md