-
-
Notifications
You must be signed in to change notification settings - Fork 920
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
base: next
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for fakerjs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## next #2885 +/- ##
========================================
Coverage 99.95% 99.96%
========================================
Files 2986 2986
Lines 215926 215929 +3
Branches 598 950 +352
========================================
+ Hits 215839 215855 +16
+ Misses 87 74 -13
|
There was a problem hiding this 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. 🤔
Oh wow, then I completly misunderstood what we discussed in the team meeting when we made the decision. Discuss again in tomorrows meeting? |
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?) |
25 locales currently have a lorem/words.ts file. For each i generated 5 sample words Latin
Non-latin(im not really enough of an expert in non-Latin languages to tell if these are nonsense or real words)
|
There was a problem hiding this 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* 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. |
Team Proposal
|
Would it make more sense to move the lorem definitions to the base locale? |
I was not available at last team meeting, and I'm missing any reasons 👀 |
Because all locales that use Latin characters, use Latin anyway. And those that dont, use normal words and are sometimes even incompatible with the Latin sentence structure. |
Team Task Everybody should make their suggestions for the lorem module defimnitions and expectations. |
My expectation: If we do not at least change the behavior of lorem, there should be a e.g. |
@Shinigami92 Could you please elaborate on what you would consider the defining difference between the word module and the lorem module? |
Personally I would say word is for generating words like nouns, verbs and so on, while lorem is more like for placeholder texts for example to test responsive table cells in a frontend. However I did not read our docs yet and both modules were from times long before I came into the project and so I won’t like to be made responsible for any historical decisions. |
That was not my intention. I'm sorry. I spend quite some time thinking about this. The following represents my personal opinion. |
For me, lorem (module) is a specific type of blind text that you are not supposed to read/be able to understand. |
If we define lorem to be latin, then those locales that currently return locale specific words would be impacted. |
If we add the explicit concept of (pseudo-)understandable blind text, then it is likely that it will require the same or at least similar methods to the current lorem module, so that you are able to generate a string matching your length requirements. |
I think the real question is does "lorem" mean general blind text or specifically the Latin lotem ipsum text? Does the idea of "Chinese lorem" or "Thai lorem" or "Hebrew lorem" make sense? |
Important question. @matthewmayer Could you please share your opinion on any of these questions? Ultimately we need answers/shared opinions to form any kind of consensus. |
I don't really know. I think we need to try and involve some native speakers of non-Latin languages. |
Team Proposal
|
Description
Document the expected words for a locale in the lorem module.
Related to
This is the first part of #2884.