Some updates

canary
WolverinDEV 2019-10-19 18:50:03 +02:00
parent ebf07f8074
commit 5dfa6bd6d2
3 changed files with 43 additions and 1 deletions

30
documentation/i18n.md Normal file
View File

@ -0,0 +1,30 @@
# I18N-System
The TeaSpeak web and native client are supporting a farly rich amount of different languages.
This is possible due to the integrated translation system.
The goal of this paper is to give a brief overview of the functionality.
## 1. Structure of the system
TeaSpeaks translation system is a map based system.
This means that in general every visible text will be looked up
and if there is a mapped value it will uses this instead of the original text.
For example, if we have tree phrases and the following mapping:
Mapping:
`Hello, World` => `See you soon`
`Foo` => `Bar`
Messages
`Hello, World` becomes: `See you soon`
`Hello world` has no mapping so: `Hello world`
`Foo` becomes => `Bar`
`Foo Bar` has no mapping so: `Foo Bar`
The files which contain these mappings are ending with `.translation` (Structure described in [1.1]()).
This means that for each language or dialect you want to adjust, you require a new translation file.
To actually use a translation file you'll need to register the file in a so called "translation repository".
A translation repository could provide multiple translation files or even multiple versions of the same file.
The structure of a "translation repository" is described in [1.2]().
The web an the native client will query all registered translation repositories for their translation files.
If the client then selects one of the queried translations, the given mapping of the file will be used to map all visible texts.
### 1.1 The `.translation` file
The `.translation` file contain in `json` format the all mapping information.

12
shared/.gitignore vendored
View File

@ -8,4 +8,16 @@ css/static/**/*.css.map
js/**/*.js
js/**/*.js.map
loader/**/*.css
loader/**/*.css.map
loader/**/*.js
loader/**/*.js.map
popup/**/*.css
popup/**/*.css.map
popup/**/*.js
popup/**/*.js.map
generated/*

View File

@ -9826,7 +9826,7 @@
}
},
{
"translated": "ICH WÜRDE",
"translated": "ID",
"flags": [
"google-translate"
],