mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-11 07:40:10 +00:00
small updates to the locales readme
This commit is contained in:
parent
05f0f96940
commit
4f5f4e2a90
1 changed files with 7 additions and 5 deletions
|
|
@ -4,8 +4,8 @@ The `lib.rs` file in this crate is auto-generated by `xtask`. It must be manuall
|
|||
calling `xtask generate-locales` every time changes are made to the localization strings.
|
||||
|
||||
## Where are the Strings?
|
||||
Locale files can be added to any server by making a `locales` directory within the server, and
|
||||
then placing a `.json` file in there with a format like this:
|
||||
Locale files can be added to any app by making a `locales` directory within the `apps` folder, and
|
||||
then placing a `i18n.json` file in there with a format like this:
|
||||
|
||||
```json
|
||||
{
|
||||
|
|
@ -36,6 +36,8 @@ Note that "en-tts" is a locale for english/vision-impaired. `🔇` means that an
|
|||
for that locale (can be used in any locale, not just speech-to-text locales). Omitting a locale
|
||||
entirely without using the 🔇 character will lead to a panic.
|
||||
|
||||
There are also locale files `i18n.json` and `manifest.json` in the `apps` folder itself for strings relevant to menu items etc.
|
||||
|
||||
## How to Code with Locales
|
||||
The JSON file is parsed by `xtask` into a lib.rs file which is referred to within a server by
|
||||
the following idiom:
|
||||
|
|
@ -163,8 +165,8 @@ is present it will be treated as the original version.
|
|||
_NOTE:_ You may want to add the new lang to the other tools
|
||||
that know about available languages:
|
||||
|
||||
* https://github.com/betrusted-io/xous-core/blob/main/tools/updater/precursorupdater/precursorupdater.py#L154
|
||||
* https://github.com/betrusted-io/xous-core/blob/main/tools/backup.py#L420
|
||||
* https://github.com/betrusted-io/xous-core/blob/main/tools/restore.py#L541
|
||||
* https://github.com/betrusted-io/xous-core/blob/main/tools/updater/precursorupdater/precursorupdater.py#L620
|
||||
* https://github.com/betrusted-io/xous-core/blob/main/tools/backup.py#L435
|
||||
* https://github.com/betrusted-io/xous-core/blob/main/tools/restore.py#L557
|
||||
* https://github.com/betrusted-io/xous-core/blob/main/tools/legacy/update_ci.sh#L14
|
||||
* https://github.com/betrusted-io/xous-core/blob/main/tools/legacy/factory_reset.sh#L14
|
||||
|
|
|
|||
Loading…
Reference in a new issue