mirror of
https://gitlab.com/lunovox/computing.git
synced 2025-03-21 17:11:25 +00:00
This commit is contained in:
parent
0e8034f30c
commit
4e42bf6a99
1 changed files with 23 additions and 12 deletions
|
@ -1,15 +1,15 @@
|
||||||
# TRANSLATES
|
# HOW TO TRANSLATE
|
||||||
|
|
||||||
To generate file '**template.pot**', did use terminal command:
|
To generate the '**template.pot**' file (if it does not exist), use the terminal command:
|
||||||
|
|
||||||
````bash
|
````bash
|
||||||
cd computing
|
cd computing
|
||||||
xgettext -n *.lua -L Lua --force-po --keyword=modComputing.translate --from-code=UTF-8 -o ./locale/template.pot
|
xgettext -n *.lua -L Lua --force-po --keyword=modComputing.translate --from-code=UTF-8 -o ./locale/template.pot
|
||||||
|
|
||||||
````
|
````
|
||||||
----
|
---------------------------------------------
|
||||||
|
|
||||||
### Cria arquivo .po a partir de um arquivo de templante .pot
|
### Create '.po' file to translate (if it does not exist) from '.pot' template file.
|
||||||
|
|
||||||
Sintaxe:
|
Sintaxe:
|
||||||
```bash
|
```bash
|
||||||
|
@ -19,9 +19,9 @@ Example to brasilian portuguese language (pt_BR):
|
||||||
```bash
|
```bash
|
||||||
msginit --no-translator --no-wrap --locale=pt_BR.UTF-8 --output-file=./locale/pt_BR.po --input=./locale/template.pot
|
msginit --no-translator --no-wrap --locale=pt_BR.UTF-8 --output-file=./locale/pt_BR.po --input=./locale/template.pot
|
||||||
```
|
```
|
||||||
----
|
---------------------------------------------
|
||||||
|
|
||||||
### Atualiza arquivo ,po a partir de um arquivo de templante .pot
|
### Update '.po' file to translate from '.pot' template file.
|
||||||
|
|
||||||
Sintaxe:
|
Sintaxe:
|
||||||
```bash
|
```bash
|
||||||
|
@ -31,7 +31,7 @@ Example to brasilian portuguese language (pt_BR):
|
||||||
```bash
|
```bash
|
||||||
msgmerge --sort-output --no-wrap --update --backup=off ./locale/pt_BR.po ./locale/template.pot
|
msgmerge --sort-output --no-wrap --update --backup=off ./locale/pt_BR.po ./locale/template.pot
|
||||||
```
|
```
|
||||||
----
|
---------------------------------------------
|
||||||
|
|
||||||
To edit '**.po**' files to your language use app poedit.:
|
To edit '**.po**' files to your language use app poedit.:
|
||||||
|
|
||||||
|
@ -44,22 +44,33 @@ poedit ./locale/pt_BR.po
|
||||||
|
|
||||||
* See others locales used: ca;cs;da;de;dv;eo;es;et;fr;hu;id;it;ja;jbo;kn;lt;ms;nb;nl;pl;pt;pt_BR;ro;ru;sl;sr_Cyrl;sv;sw;tr;uk
|
* See others locales used: ca;cs;da;de;dv;eo;es;et;fr;hu;id;it;ja;jbo;kn;lt;ms;nb;nl;pl;pt;pt_BR;ro;ru;sl;sr_Cyrl;sv;sw;tr;uk
|
||||||
|
|
||||||
----
|
---------------------------------------------
|
||||||
|
|
||||||
## Convert '.po' file to '.tr' file.
|
## Convert '.po' file to '.tr' file.
|
||||||
|
|
||||||
### COMMAND SAMPLE: TRANSLATE TO BRASILIAN PORTUGUESSE
|
The '.tr' file is used as translations up to version '5.9.1'. Only from version '5.10' was support for translation via '.po' file implemented.
|
||||||
|
|
||||||
````
|
````
|
||||||
cd ./locale/
|
cd ./locale/
|
||||||
lua po2tr.lua "computing" "pt_BR.po"
|
lua po2tr.lua "computing" "pt_BR.po"
|
||||||
mv "pt_BR.tr" "computing.pt_BR.tr"
|
mv "pt_BR.tr" "computing.pt_BR.tr"
|
||||||
cat computing.pt_BR.tr | less
|
cat computing.pt_BR.tr | less
|
||||||
````
|
````
|
||||||
----
|
---------------------------------------------
|
||||||
|
|
||||||
### TO ENABLE YOUR LANGUAGE IN MINETEST
|
### TO ENABLE YOUR LANGUAGE IN MINETEST/LUANTI
|
||||||
|
|
||||||
* To enable the translate to brasilian portuguese language, write ```language = pt_BR``` in file "minetest.conf". Or write the command ```/set -n language pt_BR``` in game chat, and run again the minetest game.
|
* For Sample: To enable the translate to brasilian portuguese language, write ```language = pt_BR``` in file "minetest.conf". Or write the command ```/set -n language pt_BR``` in game chat, and run again the minetest game.
|
||||||
|
|
||||||
|
---------------------------------------------
|
||||||
|
|
||||||
|
## SUBMITTING YOUR TRANSLATION
|
||||||
|
|
||||||
|
If you understand any language other than English, please consider submitting your language translation '.po' file to '<lunovox@disroot.org>'!
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
---------------------------------------------
|
||||||
|
|
||||||
> See more:
|
> See more:
|
||||||
* https://forum.minetest.net/viewtopic.php?f=47&t=21974
|
* https://forum.minetest.net/viewtopic.php?f=47&t=21974
|
||||||
|
|
Loading…
Add table
Reference in a new issue