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

docs(lorem): define allowed words #2885

Open
wants to merge 1 commit into
base: next
Choose a base branch
from

Conversation

xDivisionByZerox
Copy link
Member

Description

Document the expected words for a locale in the lorem module.

Related to

This is the first part of #2884.

@xDivisionByZerox xDivisionByZerox added c: docs Improvements or additions to documentation p: 1-normal Nothing urgent m: lorem Something is referring to the lorem module labels May 8, 2024
@xDivisionByZerox xDivisionByZerox added this to the v9.0 milestone May 8, 2024
@xDivisionByZerox xDivisionByZerox requested a review from a team May 8, 2024 10:19
@xDivisionByZerox xDivisionByZerox self-assigned this May 8, 2024
@xDivisionByZerox xDivisionByZerox requested a review from a team as a code owner May 8, 2024 10:19
Copy link

netlify bot commented May 8, 2024

Deploy Preview for fakerjs ready!

Name Link
🔨 Latest commit b26bdff
🔍 Latest deploy log https://app.netlify.com/sites/fakerjs/deploys/663b51ab996360000891e352
😎 Deploy Preview https://deploy-preview-2885.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.

@xDivisionByZerox xDivisionByZerox linked an issue May 8, 2024 that may be closed by this pull request
Copy link

codecov bot commented May 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.96%. Comparing base (6e6fa4c) to head (b26bdff).
Report is 1 commits behind head on next.

Additional details and impacted files
@@           Coverage Diff            @@
##             next    #2885    +/-   ##
========================================
  Coverage   99.95%   99.96%            
========================================
  Files        2977     2977            
  Lines      215466   215469     +3     
  Branches      597      951   +354     
========================================
+ Hits       215372   215384    +12     
+ Misses         94       85     -9     
Files Coverage Δ
src/modules/lorem/index.ts 100.00% <100.00%> (ø)

... and 2 files with indirect coverage changes

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.

I thought about using normal words if they dont use Latin. 🤔

@xDivisionByZerox
Copy link
Member Author

I thought about using normal words if they dont use Latin. 🤔

Oh wow, then I completly misunderstood what we discussed in the team meeting when we made the decision. Discuss again in tomorrows meeting?

@matthewmayer
Copy link
Contributor

We should survey what current non-Latin locales actually do and document that (eg are they nonsense words or real words or transliterations of Latin lorem?)

@ST-DDT ST-DDT added the s: needs decision Needs team/maintainer decision label May 8, 2024
@matthewmayer
Copy link
Contributor

matthewmayer commented May 9, 2024

25 locales currently have a lorem/words.ts file. For each i generated 5 sample words

Latin

code script words(5) notes
cs_CZ Latn quasi neque quasi delectus minima standard Latin lorem
de Latn excepturi inventore nihil eveniet velit standard Latin lorem
en Latn crur capillus denique veritas audacia standard Latin lorem
fr Latn aliquid vitae accusamus suscipit est standard Latin lorem
fr_CH Latn iure ratione dicta voluptas illo standard Latin lorem
nl Latn veritatis quibusdam maxime magnam possimus standard Latin lorem
pl Latn accusamus eaque deleniti quam distinctio standard Latin lorem
pt_BR Latn vitae aliquid temporibus laudantium nam standard Latin lorem
sk Latn quidem possimus corrupti odio voluptate standard Latin lorem
tr Latn optio natus quis aspernatur molestias standard Latin lorem
uz_UZ_latin Latn tutamen ullam magni auctor delectatio standard Latin lorem
en_BORK Latn thees lebureeuoos gesh ooccoor injuy real English words with spelling modifications
lv Latn māxīmē vulnēro xīphīās soļ āēgrotātīo standard Latin lorem with extra diacritics
es_MX Latn Fichero Incorpóreo Basurear Engarbarse Gendarme random real and nonsense Spanish words
vi Latn yêu bè vàng ngọt độc random real Vietnamese words

Non-latin

(im not really enough of an expert in non-Latin languages to tell if these are nonsense or real words)

code script words(5) notes
ar Arab الذات اصرخ ليونة أتذكر فشيأ
dv Thaa އިންގިލާބެއް އެންމެ ތަރައްގީ މުޅިން ގެއްލުންނުވާ
el Grek nihil similique laudantium aliquid qui standard Latin lorem (perhaps should be changed)
fa Arab تمام به پایان بلکه ستون داشت
he Hebr דולור תוק לפתיעם רוגצה קלאצי Transliteration mimicking lorem ipsum in Hebrew
hy Armn աշխարհում բոլորն մեկ հասած իրենց
ja Jpan 色々 独裁 錠 めいがら たて
ko Kore 형에 확정될 자유를 정한다. 범하고
ru Cyrl направлений модели внедрения профессионального играет Random real words
ur Arab چاسدسد چسد ساسدبھ اسدفگبطاسدفد اسداسدھدسبابگ ابنسد

Copy link
Contributor

@matthewmayer matthewmayer left a comment

Choose a reason for hiding this comment

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

Suggested rewrite. In some ways the concept of "lorem ipsum" is unique to Latin-based languages, because you can write words using Ancient Latin, a dead language, that are "foreign" and yet immediately obvious as "words" in most Latin-based languages.

So I'm not sure there's a definite "best" way to handle lorem-ipsum in non-Latin languages. In some languages it may make sense to transliterate Latin words into the script like "l-o-r-e-m", in other cases you may just want to us random words or characters.

@@ -2,6 +2,9 @@ import type { LocaleEntry } from './definitions';

/**
* The possible definitions related to lorem texts.
*
* The words in this module are determined by the ISO 15924 script of the locale.
* If a locale uses the Latin script, it will utilize Latin lorem words, while a locale using the Cyrillic script will use Cyrillic lorem words, and so forth.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* If a locale uses the Latin script, it will utilize Latin lorem words, while a locale using the Cyrillic script will use Cyrillic lorem words, and so forth.
* If a locale uses the Latin script, it should generally utilize Latin "lorem ipsum" words, while a locale using another script should use real or nonsense words to give the same effect as Latin lorem text.

@ST-DDT
Copy link
Member

ST-DDT commented May 23, 2024

Team Proposal

  • The lorem module will always return the Latin lorem words/sentences.
  • The lorem word definitions will be inlined into the module and removed from the locale data
  • We will add replacement methods to the word module, that generate sentences/paragraphs with words of that locale

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: docs Improvements or additions to documentation m: lorem Something is referring to the lorem module p: 1-normal Nothing urgent s: needs decision Needs team/maintainer decision
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve specification of lorem module and definitions
3 participants