-
-
Notifications
You must be signed in to change notification settings - Fork 930
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
refactor(locale): remove fr_CH data which is identical to fr #2526
Conversation
Removed identical animal, color, commerce, date, finance, music, vehicle and word definitions which can use fallback from fr instead
aa9c509
to
8bfc804
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## next #2526 +/- ##
==========================================
- Coverage 99.58% 99.57% -0.01%
==========================================
Files 2820 2777 -43
Lines 255037 249352 -5685
Branches 1080 1102 +22
==========================================
- Hits 253982 248301 -5681
+ Misses 1027 1023 -4
Partials 28 28
|
This PR can easily be reviewed with the following script executed on next: diff -rs src/locales/fr_CH src/locales/fr | egrep '^Files .+ and .+ are identical$' | awk -F '(Files | and | are identical)' '{print $2}' Although according to the script the following files are identical as well:
to remove them append |
I decided to only touch modules where the entire module was identical. |
A little reminder that the following contribution guideline should be respected by members and maintainers as well:
|
I can split this if you want, but as this is only removals not additions i feel there's a lot less to review (sourcing, translations, etc) |
I totally understand that reasoning. Nevertheless, just imagine someone outside the core team providing a PR in that way because they "feel" like it. We would point to our contribution rules and asked them to split the PR. If not we would not need those rules in the first place. All that being said, I think we can let that slip this time. You don't need split this PR - at least from my point of view. |
This PR reduces the bundle size of the package by the following amounts:
I tryed this out of curiosity, but might that be interesting information for us on PRs that have the |
IMO that rule only applies to additions or changes that pertains the functional values within. |
What about the other identical files. Do you do them as a separate PR? |
My feeling is they can be left for now. Realistically all fr_XX locales will use the same words for animals, dates, etc but will more likely use different patterns for names, locations etc. So even if two files are identical in fr_XX/location/YYY.ts currently, that's probably temporary - it probably makes it easier for future contributors if there's already a file they can directly edit rather than have to figure out the overrides. |
Removed identical animal, color, commerce, date, finance, music, vehicle and word definitions which can use fallback from fr instead
Debatable if this should be considered breaking. Would only affect behavior if you were using a custom Faker instance with the fr_CH data but no fr fallback