Skip to content

refactor(location): distinguish between street_name_part and street_name#3859

Open
ST-DDT wants to merge 2 commits into
nextfrom
refactor/locale/rename-street-name-parts
Open

refactor(location): distinguish between street_name_part and street_name#3859
ST-DDT wants to merge 2 commits into
nextfrom
refactor/locale/rename-street-name-parts

Conversation

@ST-DDT
Copy link
Copy Markdown
Member

@ST-DDT ST-DDT commented May 24, 2026

Fixes #2062


Distinguish between street_name_part and street_name.

  • street_name_part meant to be combined with street prefixes or suffixes.
  • street_name full existing street names.

Deviations:

  • az: Removed {{location.street_suffix}} {{location.street_name}} as it doesn't appear to be a thing.
  • es_MX: Suffixes used as prefix, "suffixes" didn't actually contain suffixes or prefixes.
  • el: street_name is used as is and with prefixes. The prefix is mostly omitted.

@ST-DDT ST-DDT added this to the v10.x milestone May 24, 2026
@ST-DDT ST-DDT requested review from a team May 24, 2026 19:09
@ST-DDT ST-DDT self-assigned this May 24, 2026
@ST-DDT ST-DDT added p: 1-normal Nothing urgent c: refactor PR that affects the runtime behavior, but doesn't add new features or fixes bugs c: locale Permutes locale definitions m: location Something is referring to the location module labels May 24, 2026
@netlify
Copy link
Copy Markdown

netlify Bot commented May 24, 2026

Deploy Preview for fakerjs ready!

Name Link
🔨 Latest commit 2a2adde
🔍 Latest deploy log https://app.netlify.com/projects/fakerjs/deploys/6a134fd8dd37fe0008e5d815
😎 Deploy Preview https://deploy-preview-3859.fakerjs.dev
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.91%. Comparing base (8c7ff0c) to head (2a2adde).

Additional details and impacted files
@@           Coverage Diff           @@
##             next    #3859   +/-   ##
=======================================
  Coverage   98.91%   98.91%           
=======================================
  Files         905      905           
  Lines        3146     3146           
  Branches      564      564           
=======================================
  Hits         3112     3112           
  Misses         30       30           
  Partials        4        4           
Files with missing lines Coverage Δ
src/locales/az/location/index.ts 100.00% <ø> (ø)
src/locales/es_MX/location/index.ts 100.00% <ø> (ø)
src/locales/he/location/index.ts 100.00% <ø> (ø)
src/locales/hu/location/index.ts 100.00% <ø> (ø)
src/locales/ka_GE/location/index.ts 100.00% <ø> (ø)
src/locales/lv/location/index.ts 100.00% <ø> (ø)
src/locales/nb_NO/location/index.ts 100.00% <ø> (ø)
src/locales/ro/location/index.ts 100.00% <ø> (ø)
src/locales/ru/location/index.ts 100.00% <ø> (ø)
src/locales/sv/location/index.ts 100.00% <ø> (ø)
... and 1 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread src/definitions/location.ts Outdated
Comment thread src/definitions/location.ts Outdated
Comment thread src/definitions/location.ts Outdated
Co-authored-by: ST-DDT <ST-DDT@gmx.de>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors locale street name generation to distinguish between full street names (street_name) and composable street name components (street_name_part), updating affected locales’ street_pattern and locale exports accordingly.

Changes:

  • Added street_name_part to the LocationDefinition schema and documented intended usage.
  • Updated multiple locales to use street_name_part in street_pattern and export the new dataset.
  • Adjusted locale-specific prefix/suffix usage (notably es_MX replacing street_suffix with a proper street_prefix list).

Reviewed changes

Copilot reviewed 25 out of 36 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/locales/uk/location/street_pattern.ts Switches patterns to use street_name_part when composing street names.
src/locales/uk/location/street_name_part.ts Adds Ukrainian street name parts dataset.
src/locales/uk/location/index.ts Exports street_name_part instead of street_name.
src/locales/sv/location/street_pattern.ts Switches Swedish street patterns to use street_name_part.
src/locales/sv/location/street_name_part.ts Adds Swedish street name parts dataset.
src/locales/sv/location/index.ts Exports street_name_part instead of street_name.
src/locales/ru/location/street_pattern.ts Switches Russian street patterns to use street_name_part.
src/locales/ru/location/street_name_part.ts Adds Russian street name parts dataset.
src/locales/ru/location/index.ts Exports street_name_part instead of street_name.
src/locales/ro/location/street_pattern.ts Switches Romanian street pattern to use street_name_part.
src/locales/ro/location/street_name_part.ts Adds Romanian street name parts dataset.
src/locales/ro/location/index.ts Exports street_name_part instead of street_name.
src/locales/nb_NO/location/street_pattern.ts Switches Norwegian Bokmål patterns to use street_name_part.
src/locales/nb_NO/location/street_name_part.ts Adds Norwegian Bokmål street name parts dataset.
src/locales/nb_NO/location/index.ts Exports street_name_part instead of street_name.
src/locales/lv/location/street_pattern.ts Switches Latvian street pattern to use street_name_part.
src/locales/lv/location/street_name_part.ts Adds Latvian street name parts dataset.
src/locales/lv/location/index.ts Exports street_name_part instead of street_name.
src/locales/ka_GE/location/street_pattern.ts Switches Georgian street pattern to use street_name_part.
src/locales/ka_GE/location/street_name_part.ts Adds Georgian street name parts dataset.
src/locales/ka_GE/location/index.ts Exports street_name_part instead of street_name.
src/locales/hu/location/street_pattern.ts Switches Hungarian street pattern to use street_name_part.
src/locales/hu/location/street_name_part.ts Adds Hungarian street name parts dataset.
src/locales/hu/location/index.ts Exports street_name_part instead of street_name.
src/locales/he/location/street_pattern.ts Switches Hebrew street pattern to use street_name_part.
src/locales/he/location/street_name_part.ts Adds Hebrew street name parts dataset.
src/locales/he/location/index.ts Exports street_name_part instead of street_name.
src/locales/es_MX/location/street_suffix.ts Removes street_suffix dataset (previously used as a prefix).
src/locales/es_MX/location/street_prefix.ts Adds street_prefix dataset for proper prefix handling.
src/locales/es_MX/location/street_pattern.ts Updates patterns to use street_prefix and street_name_part.
src/locales/es_MX/location/street_name_part.ts Adds Mexican Spanish street name parts dataset.
src/locales/es_MX/location/index.ts Switches exports to street_name_part and street_prefix.
src/locales/az/location/street_pattern.ts Updates Azerbaijani street pattern to use street_name_part.
src/locales/az/location/street_name_part.ts Adds Azerbaijani street name parts dataset.
src/locales/az/location/index.ts Exports street_name_part instead of street_name.
src/definitions/location.ts Adds street_name_part to the location definitions type + docs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c: locale Permutes locale definitions c: refactor PR that affects the runtime behavior, but doesn't add new features or fixes bugs m: location Something is referring to the location module p: 1-normal Nothing urgent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Check locale.street patterns for incorrect usage

3 participants