Skip to content
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

feat(locale): add lorem for uz_UZ_latin #2824

Merged
merged 6 commits into from
May 8, 2024

Conversation

Mirazyzz
Copy link
Contributor

No description provided.

@Mirazyzz Mirazyzz requested a review from a team as a code owner April 15, 2024 07:04
Copy link

netlify bot commented Apr 15, 2024

Deploy Preview for fakerjs ready!

Name Link
🔨 Latest commit eccf522
🔍 Latest deploy log https://app.netlify.com/sites/fakerjs/deploys/6639d459884dfb000878a433
😎 Deploy Preview https://deploy-preview-2824.fakerjs.dev
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

Copy link

codecov bot commented Apr 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.95%. Comparing base (043f68b) to head (eccf522).

Additional details and impacted files
@@            Coverage Diff             @@
##             next    #2824      +/-   ##
==========================================
- Coverage   99.96%   99.95%   -0.01%     
==========================================
  Files        2975     2977       +2     
  Lines      214451   215466    +1015     
  Branches      602      949     +347     
==========================================
+ Hits       214366   215377    +1011     
- Misses         85       89       +4     
Files Coverage Δ
src/locales/uz_UZ_latin/index.ts 100.00% <100.00%> (ø)
src/locales/uz_UZ_latin/lorem/index.ts 100.00% <100.00%> (ø)
src/locales/uz_UZ_latin/lorem/words.ts 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

@Mirazyzz
Copy link
Contributor Author

What could be the root cause for the failing unit test: test/scripts/apidocs/verify-jsdoc-tags.spec.ts > verify JSDoc tags > phone > number > 0 > verify @example tag
→ Test timed out in 5000ms.
? Can someone help me @ST-DDT @matthewmayer ?

@xDivisionByZerox
Copy link
Member

xDivisionByZerox commented Apr 15, 2024

We are currently analyzing the problem with the CI pipeline (see #2782). For now, any team member has to restart failed jobs. Sorry for the inconvenience :(

It's definitely not on your side, tho.

@Mirazyzz
Copy link
Contributor Author

@ST-DDT can I ask you to perform code review?

@ST-DDT
Copy link
Member

ST-DDT commented Apr 16, 2024

I'm currently busy, I'll review it when I have time.

@matthewmayer
Copy link
Contributor

matthewmayer commented Apr 16, 2024

The English (well really fake Latin) words in lorem definitions are lowercase. Maybe do the same?

@ST-DDT
Copy link
Member

ST-DDT commented Apr 16, 2024

The English (well really fake Latin) words in lorem definitions are lowercase. Maybe do the same?

It looks like Uz also has uppercase words, so IMO lorem can also contain them.

ST-DDT
ST-DDT previously approved these changes Apr 19, 2024
Copy link
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.

The words itself look fine, but IMO the purpose of lorem is creating a text that is not supposed to be read. So en and de use Latin for that. Why did you use actual words?
(Or is it just google translate that assigns a translation to them even though they don't have any?)

@ST-DDT ST-DDT added p: 1-normal Nothing urgent c: locale Permutes locale definitions m: lorem Something is referring to the lorem module labels Apr 19, 2024
@ST-DDT ST-DDT added this to the vAnytime milestone Apr 19, 2024
@ST-DDT ST-DDT requested review from a team April 19, 2024 14:43
@ST-DDT ST-DDT added the s: awaiting more info Additional information are requested label Apr 19, 2024
Shinigami92
Shinigami92 previously approved these changes Apr 19, 2024
@Mirazyzz
Copy link
Contributor Author

The words itself look fine, but IMO the purpose of lorem is creating a text that is not supposed to be read. So en and de use Latin for that. Why did you use actual words? (Or is it just google translate that assigns a translation to them even though they don't have any?)

If the intent is to use actual lorem I can change it though I was looking to Russian locale as an example and there were proper words, that's why I used the same approach. I thought these words could be used to generate some comments, messages etc. However, if you think it's better to keep it consistent I will do so :)

@matthewmayer
Copy link
Contributor

My feeling is that most languages that use the Latin alphabet should probably just stick to the fake-Latin lorem so they don't need a locale-specific version of lorem. If you want "real" words you should use the word module.

@Mirazyzz
Copy link
Contributor Author

My feeling is that most languages that use the Latin alphabet should probably just stick to the fake-Latin lorem so they don't need a locale-specific version of lorem. If you want "real" words you should use the word module.

Sounds reasonable. Should I copy the words from Latin locale then into Uzbek? Or should I take it from somewhere and export it from Uzbek locale?

@matthewmayer
Copy link
Contributor

You probably don't have to do anything. All locales currently fall back to en and en already has the Latin lorem definitions.

@ST-DDT
Copy link
Member

ST-DDT commented Apr 25, 2024

Team Decision

  • Languages that use latin characters should use the latin lorem text (e.g. copy it from en).
  • We will create a separate PR that will document this behavior of the lorem feature in the definitions and module.
  • We will create further PRs to add/fix the other locales according to their charset.

@Mirazyzz
Copy link
Contributor Author

Mirazyzz commented May 6, 2024

Team Decision

  • Languages that use latin characters should use the latin lorem text (e.g. copy it from en).
  • We will create a separate PR that will document this behavior of the lorem feature in the definitions and module.
  • We will create further PRs to add/fix the other locales according to their charset.

Sorry for the late fix. I copied words should I update the docs and create new PR for that?

@xDivisionByZerox
Copy link
Member

Sorry for the late fix. I copied words should I update the docs and create new PR for that?

All good, no worries. The only thing you need to do is the bullet point one as you did in your latest commit f681ef6.

The other bullet points are for us, the faker team, to remember certain decisions made.

@ST-DDT ST-DDT removed the s: awaiting more info Additional information are requested label May 7, 2024
@ST-DDT ST-DDT requested review from Shinigami92 and a team May 7, 2024 07:14
@matthewmayer
Copy link
Contributor

If it is identical to en could we not just have words.ts be like this to avoid duplication:

import words from '../../en/lorem/words';
export default words;

@ST-DDT
Copy link
Member

ST-DDT commented May 7, 2024

I also considered this, but we could also do that in the mentioned cleanup PR.
For me both works.

@xDivisionByZerox
Copy link
Member

If it is identical to en could we not just have words.ts be like this to avoid duplication:

import words from '../../en/lorem/words';
export default words;

I'd suggest moving this to a separate PR as well. This way we can take the time to investigate if this is somehow influencing tree shaking for specific localized faker instances. I'd prefer to leave this kind of work to the faker team.

@ST-DDT ST-DDT merged commit 6e6fa4c into faker-js:next May 8, 2024
20 checks passed
@ST-DDT
Copy link
Member

ST-DDT commented May 8, 2024

I created a separate issue for the team todos:

Thank you @Mirazyzz for your contributions ❤️

@Mirazyzz
Copy link
Contributor Author

I created a separate issue for the team todos:

Thank you @Mirazyzz for your contributions ❤️

@ST-DDT Thank you for constantly providing constructive feedback, it's a pleasure to contribute to your community and project. I myself enjoy using faker library and to planning to contribute more in the future!

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: lorem Something is referring to the lorem module p: 1-normal Nothing urgent
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants