Skip to content

feat(locale): add Welsh (cy) postcode definitions#3851

Open
IestynGage wants to merge 1 commit into
faker-js:nextfrom
IestynGage:next
Open

feat(locale): add Welsh (cy) postcode definitions#3851
IestynGage wants to merge 1 commit into
faker-js:nextfrom
IestynGage:next

Conversation

@IestynGage
Copy link
Copy Markdown
Contributor

Based on the en_GB postcode definitions with a prefix as recommened by @matthewmayer in #3850 (comment)

@IestynGage IestynGage requested a review from a team as a code owner May 19, 2026 20:29
@netlify
Copy link
Copy Markdown

netlify Bot commented May 19, 2026

Deploy Preview for fakerjs ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit c5759f0
🔍 Latest deploy log https://app.netlify.com/projects/fakerjs/deploys/6a0cc9bdc63a36000799c957
😎 Deploy Preview https://deploy-preview-3851.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.

export default [
'{{location.postcode_prefix}}# #??',
'{{location.postcode_prefix}}## #??',
];
Copy link
Copy Markdown
Contributor Author

@IestynGage IestynGage May 19, 2026

Choose a reason for hiding this comment

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

The en_GB is just export default ['??# #??', '??## #??']; I suppose you can also add a similiar prefix to en_GB as well. But the postcodes for England, NI, Scotland, Wales, crown dependecies and other special postcodes.

Copy link
Copy Markdown
Member

@ST-DDT ST-DDT May 19, 2026

Choose a reason for hiding this comment

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

@codecov
Copy link
Copy Markdown

codecov Bot commented May 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.91%. Comparing base (e72fd7c) to head (c5759f0).

Additional details and impacted files
@@           Coverage Diff           @@
##             next    #3851   +/-   ##
=======================================
  Coverage   98.91%   98.91%           
=======================================
  Files         905      905           
  Lines        3146     3146           
  Branches      581      581           
=======================================
  Hits         3112     3112           
  Misses         30       30           
  Partials        4        4           
Files with missing lines Coverage Δ
src/locales/cy/location/index.ts 100.00% <ø> (ø)
🚀 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.

Based on the `en_GB` postcode definitions with prefix as recommened by @matthewmayer.
@ST-DDT ST-DDT added p: 1-normal Nothing urgent c: locale Permutes locale definitions m: location Something is referring to the location module labels May 19, 2026
@ST-DDT ST-DDT added this to the v10.x milestone May 19, 2026
Copy link
Copy Markdown
Member

@ST-DDT ST-DDT left a comment

Choose a reason for hiding this comment

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

Please make sure to test your changes and verify that they return the expected results ⚠️

fakerCY.location.zipCode() // "{{location.postcode_prefix}}76 2MM"

Currently, the zipcode implementation does not support fake patterns (for default patterns).

This is planned for #3233 / #3176

Until then, you have to cross-product them yourself.

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

Labels

c: locale Permutes locale definitions 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.

2 participants