Add language configuration to build.sh!
This commit is contained in:
parent
b8149e8be2
commit
6d95360c51
12
README.md
12
README.md
|
@ -71,10 +71,20 @@ bestool write-image out/open_source/open_source.bin --port /dev/ttyACM1
|
||||||
- Quad tap : Volume Down
|
- Quad tap : Volume Down
|
||||||
|
|
||||||
## Changing audio alerts
|
## Changing audio alerts
|
||||||
The audio alerts are stored in:
|
The default audio alerts are stored in:
|
||||||
|
|
||||||
`config/_default_cfg_src_/res/en/`
|
`config/_default_cfg_src_/res/en/`
|
||||||
|
|
||||||
If you want to change the alert to a custom sound, just replace the sound file you'd like to change
|
If you want to change the alert to a custom sound, just replace the sound file you'd like to change
|
||||||
(ie `config/_default_cfg_src_/res/en/SOUND_POWER_ON.mp3`) with your own MP3 with the same name
|
(ie `config/_default_cfg_src_/res/en/SOUND_POWER_ON.mp3`) with your own MP3 with the same name
|
||||||
and recompile with `./build.sh`!
|
and recompile with `./build.sh`!
|
||||||
|
|
||||||
|
### Language support
|
||||||
|
|
||||||
|
The `LANG` environment variable can be set when running the `build.sh` script to load sound files
|
||||||
|
for languages other than the default English. For example, running `LANG=cn ./build.sh` will load sounds files from
|
||||||
|
`config/_default_cfg_src_/res/cn/` instead of the default `en/` folder.
|
||||||
|
|
||||||
|
The current languages supported with sound files are English (`en`) and Chinese (`cn`). Other languages
|
||||||
|
(or other sets of custom sounds) may be added by adding all the correct sound files into a
|
||||||
|
`config/_default_cfg_src_/res/<custom_language>/` directory and building with `LANG=<custom_language> ./build.sh`.
|
6
build.sh
6
build.sh
|
@ -1,5 +1,9 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
make -j T=open_source DEBUG=1 >log.txt 2>&1
|
|
||||||
|
# use LANG environment variable, default to "en"
|
||||||
|
LANG="${LANG:-en}"
|
||||||
|
|
||||||
|
make -j T=open_source LANG=${LANG} DEBUG=1 >log.txt 2>&1
|
||||||
|
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
echo "build success"
|
echo "build success"
|
||||||
|
|
Loading…
Reference in New Issue