fix(locale): remove stray whitespace from five locale entries - #4006
Merged
ST-DDT merged 3 commits intoAug 24, 2026
Conversation
One entry each in ar state, bn_BD state, cy book format, hu city name and fa lorem word carried a leading or trailing space, so those values came out of faker with the space attached. Added a locale-data check for it, ignoring the affix definitions where surrounding whitespace is deliberate.
✅ Deploy Preview for fakerjs ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## next #4006 +/- ##
==========================================
- Coverage 98.98% 98.92% -0.07%
==========================================
Files 926 926
Lines 3246 3246
Branches 569 582 +13
==========================================
- Hits 3213 3211 -2
- Misses 29 31 +2
Partials 4 4 🚀 New features to boost your workflow:
|
matthewmayer
previously approved these changes
Aug 19, 2026
Shinigami92
previously approved these changes
Aug 19, 2026
ST-DDT
previously approved these changes
Aug 19, 2026
MahinAnowar
dismissed stale reviews from ST-DDT, Shinigami92, and matthewmayer
via
August 24, 2026 10:06
2d0d739
Contributor
Author
|
Took the array-index suggestion and answered the |
ST-DDT
approved these changes
Aug 24, 2026
Shinigami92
approved these changes
Aug 24, 2026
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.
Five locale entries carry a leading or trailing space, so faker hands the space back to the caller:
arlocation.state" بابل"bn_BDlocation.state"রংপুর "cybook.format"E-lyfr "hulocation.city_name"Siófok "falorem.word" و زمان"Each is the only untrimmed entry in its array, and none of the five are affixes, so the space isn't doing anything.
faker.location.state()onarcan return" بابل", andhucity names feedlocation.city(), where the trailing space ends up in the middle of a composed string.I found these by walking
allLocales, so I added the check tolocale-data.spec.tsrather than leaving it as five one-off edits. It follows theignoredCharacterDatapattern already in that file, because three definitions legitimately hold whitespace:Those are concatenated onto another value, so
" aan de IJssel"innland" s/n."inesare data, not mistakes. I left them alone.nl.location.city_suffixalso contains an empty string, which reads as "sometimes no suffix" and looks deliberate, so I didn't touch that either.The five locales fail the new check on
nextand every other locale passes, which is what makes me reasonably confident the ignore list is right rather than just tuned until green.locale-data.spec.tsis green at 2763, and location, book, lorem plusall-functionalcome to 40045 with no snapshot changes. oxlint and oxfmt are clean.I can't read Arabic, Bengali, Welsh, Hungarian or Persian, so I've only removed whitespace and changed nothing else about any of these words. Worth a native speaker's glance if that's cheap for you.