mirror of
https://github.com/spacedriveapp/spacedrive
synced 2024-07-02 10:03:28 +00:00
[feat]: update i18n contribution docs (#2440)
This commit is contained in:
parent
5fe9f02299
commit
8fd00851ea
|
@ -169,6 +169,10 @@ Once that has completed, run `xcode-select --install` in the terminal to install
|
|||
|
||||
Also ensure that Rosetta is installed, as a few of our dependencies require it. You can install Rosetta with `softwareupdate --install-rosetta --agree-to-license`.
|
||||
|
||||
### Translations
|
||||
Check out the [i18n README](interface/locales/README.md) for more information on how to contribute to translations.
|
||||
|
||||
|
||||
### Credits
|
||||
|
||||
This CONTRIBUTING.md file was inspired by the [github/docs CONTRIBUTING.md](https://github.com/github/docs/blob/main/CONTRIBUTING.md) file, and we extend our gratitude to the original author.
|
||||
|
|
|
@ -1,3 +1,24 @@
|
|||
|
||||
# Locales
|
||||
|
||||
This directory contains the translations for the application.
|
||||
|
||||
## Adding a new language
|
||||
|
||||
To add a new language, create a new directory with the language code (e.g. `es` for Spanish) and copy the `en` directory into it. Then, translate the strings in the new directory.
|
||||
|
||||
To display the new language as an option in the application, add the language code to the `LANGUAGE_OPTIONS` array in `interface/app/$libraryId/settings/client/appearance.tsx`.
|
||||
|
||||
```ts
|
||||
export const LANGUAGE_OPTIONS = [
|
||||
{ value: 'en', label: 'English' },
|
||||
{ value: 'es', label: 'Español' },
|
||||
// The rest of the languages
|
||||
];
|
||||
```
|
||||
|
||||
## Syncing locales
|
||||
|
||||
This command will help you sync locales with the source language (en) and find missing keys.
|
||||
|
||||
`npx i18next-locales-sync -p en -s it -l ./interface/locales`
|
||||
|
|
Loading…
Reference in a new issue