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

Tip bot #912

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,15 @@ just i18n $lang
### Adding new languages or keys

1. In `src/i18n/` locate your desired language folder or create one if one does not exist

- When creating a new language dir ensure it follows the ISO 639 2-letter standard

2. In this folder create a file called `translations.ts`, this is where the translation keys for your desired language will be located

3. Populate your translation file with a translation object where all of the keys will be located

If you want to add Japanese you will create a file `/src/i18n/jp/translations.ts` and populate it with keys like so:

```
export default {
Common: {
Expand All @@ -147,6 +149,7 @@ export default {
}
}
```

(You should compare your translations against the English language as all other languages are not the master and are likely deprecated)

4. Add your new translation file to the `/src/i18n/config.ts` so you can begin to see them in the app
Expand All @@ -163,6 +166,7 @@ export const resources: {
```

5. Add your language to the `Language` object in `/src/utils/languages.ts`. This will allow you to select the language via the language selector in the UI. If your desired language is set as your primary language in your browser it will be selected automatically

```
export const LANGUAGE_OPTIONS: Language[] = [
{
Expand Down
4 changes: 2 additions & 2 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ i18n LANG:
pnpm eslint-path "./src/i18n/{{LANG}}/translations.ts" --rule "{internal-rules/check-i18n-keys: warn}"

local:
pnpm install && pnpm link --global "@mutinywallet/mutiny-wasm"
pnpm install && pnpm link --global "@johncantrell97/mutiny-wasm"

remote:
pnpm unlink --filter "@mutinywallet/mutiny-wasm" && pnpm install
pnpm unlink --filter "@johncantrell97/mutiny-wasm" && pnpm install

native:
pnpm install && pnpm build && npx cap sync
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mutiny-wallet",
"version": "0.6.0-rc2",
"version": "0.6.0-rc3",
"license": "MIT",
"packageManager": "[email protected]",
"scripts": {
Expand Down Expand Up @@ -58,7 +58,7 @@
"@kobalte/core": "^0.9.8",
"@kobalte/tailwindcss": "^0.5.0",
"@modular-forms/solid": "^0.18.1",
"@mutinywallet/mutiny-wasm": "0.6.0-rc2",
"@johncantrell97/mutiny-wasm": "0.6.0-rc3",
"@solid-primitives/upload": "^0.0.111",
"@solidjs/meta": "^0.29.1",
"@solidjs/router": "^0.9.0",
Expand Down
Loading