-
Notifications
You must be signed in to change notification settings - Fork 395
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: various docs improvements #1781
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
size-limit report 📦
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1781 +/- ##
==========================================
+ Coverage 76.27% 76.38% +0.11%
==========================================
Files 81 81
Lines 2074 2071 -3
Branches 529 529
==========================================
Hits 1582 1582
+ Misses 380 377 -3
Partials 112 112 ☔ View full report in Codecov by Sentry. |
@vonovak could you please address the discussions and rebase the branch? Thank you! |
088760a
to
69e7fe8
Compare
c491f80
to
6628614
Compare
03bb673
to
465c43c
Compare
21dc0fb
to
ad50eee
Compare
ad50eee
to
7f4ccb4
Compare
7f4ccb4
to
3c18cce
Compare
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.
@vonovak thank you!
@andrii-bodnar @thekip I'd like to hear your opinion on this: (1) version control: this is currently documented in two places: cli and Excluding message catalog build files I think we should have this topic documented in one place (the latter) but more importantly, the guides contradict each other: the first says: "What you do need to keep in VCS are the JSON files (locale//.json) that contain the messages for translators." the second says: "lingui extract command creates temporary message catalogs per each source file. Also, lingui compile command generates compiled message catalogs from source ones. All these files can be safely ignored from VCS and linters. Can be safely ignored because these files must be created every time you deploy to production" We should unify the recommended approach. What should it look like? (2) a different topic but potentially related: in the home page we say "If your team needs to edit source texts without developer involvement... – we've got you covered." I think it's worth documenting how this should be done. If I understand it correctly (and I'm not sure), the way this should be done is that once you define a message (e.g. Thank you! |
Hi @vonovak, thanks for bringing up these issues! (1) - I think it would be good to keep the version control information in one place (the "Excluding message catalog build files" article). For the CLI article, we can keep just a cross-link to the first article. (2) - This approach only works well with the explicit IDs if the developer only keeps keys in the source code. Then they can pull the externally edited sources into their message catalogs and compile them. If the keys change, the translations will probably be lost. |
This is extremely outdated sentence In some first version of extractor implementation it indeed created a json file with extracted messages next to each source file. So this is about it, and this is outdated. Extract command no longer create a temporary files and keep them only in memory. So this could be dropped.
This paragraph about 2 different type of files. Catalog sources such as *.po files (for po-formatter) or *.json files (for mimimal and lingui formatters), and theirs compiled artifacts produced by "lingui compile" if you use it instead of webpack's or vite's loaders. So the compiled artifacts might be safely ignored if you have a compile step in the build pipeline. So this part is also outdated because we advocate to use po format time over json, but this is not reflected in this paragrpaph.
Yes, you are right. As Andrii mentioned this works better with explicit id's, but still possible with natural language as id as well. It's just bring a bit of mess, because you will have one string in source code and will see different string in runtime. But since we use for default language the same catalogs as for any other language you freely can change it without touching the source code. |
Co-authored-by: Andrii Bodnar <[email protected]>
Description
I started reading the docs top to bottom, this is the first batch of updates.
Mostly changes to wording, a / the changes, sometimes rewriting stuff for clarity.
Types of changes
Fixes # (issue)
Checklist