-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Localize Web UI #39 #46
Conversation
I'm sorry that it is taking a long time and little delayed. |
Hi @gangjun06! Don't worry about it! Just take as much time as you need! We really appreciate your contributions. Thank you. |
I didn't translated all texts, but It seems almost done and ready to merge. If possible, I'll create translate part2 later. |
HI @gangjun06! This is really awesome! I'm still looking into this, it's a lot of code 😃 Do you think you could fix the merge conflicts? |
I fixed conflicts 5910bfb |
Quick question. Why did you decide to use next-translate instead of next-i18next? |
|
GitGuardian id | Secret | Commit | Filename | |
---|---|---|---|---|
- | Generic High Entropy Secret | 5b8337a | .env.example | View secret |
- | Generic High Entropy Secret | 5b8337a | .env.example | View secret |
- | Generic High Entropy Secret | 5b8337a | .env.example | View secret |
- | Generic High Entropy Secret | 5b8337a | .env.example | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secrets safely. Learn here the best practices.
- Revoke and rotate these secrets.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
Our GitHub checks need improvements? Share your feedbacks!
Updated module to next-i18next and resolved all merge conflicts. Some NotesApply translation to pageNext-i18next needs getServersideProps for all pages. import { getTranslatedServerSideProps } from "~/utilities/withTranslateProps";
export const getServerSideProps = getTranslatedServerSideProps(["dashboard"]);
---
import { getTranslatedStaticProps } from "~/components/utilities/withTranslateProps";
export const getStaticProps = getTranslatedStaticProps(["auth", "login"]); Too many locale filesI couldn't find good way for manage namespaces in one file. So, I just created lots of file in locales/{language}. How language change works?I believe next-i18next doesn't have language change function. It's just working with dynamic locale path. (/en/... , /ko/.......) Currently, this PR doesn't cover all texts. If no one contributes to this, I'll create new PR later when I am free(Maybe Jan 3rd week~). Also, I'm so sorry for being late |
Sounds good! Thank you so much, I will have a look soon! Quick question. If a translation is not available, does the text default to English? |
Yes, default locale is English. |
I think all of this makes sense! Thank you so much for the contribution ❤️ |
I solved all the merge conflicts! Merging now :) @gangjun06 I will work on adding translation to some part of the app where it's missing right now. Would you be able to help translating them to Korean when you have time? Also, do you think you could help translate our Readme? 😃 I think we should try to do something like Supabase does (https://github.com/supabase/supabase/blob/master/i18n/languages.md) |
Check Lists
What changed and added?
package.json
next-translate
for support multi languages.Locale files in
frontend/locales
All language files are located under
frontend/locales/{language}.json
.Language file is like this;
Texts in
frontend/pages/
andfrontend/components
Define namespaces and locales in
frontend/i18n.js
Defines the namespaces to use per page
docker-compose.dev.yml
https://github.com/gangjun06/infisical/blob/4c94ddd1b2635143ef93c941962c2bd29dfdd828/docker-compose.dev.yml#L52-53
To change language files without recreate full container with just restart, Added this lines.
Translate key convention?
I didn't make it clearly, but i followed some rules.
-
for space in key.ETC
For vscode, i18n-ally is very useful plugin for translated file.
It can be able to preview value of the translate key.