mirror of
https://github.com/haiwen/seafile.git
synced 2025-01-08 11:57:44 +08:00
add README for i18n
This commit is contained in:
parent
4d3d801121
commit
30c8e1cabd
@ -50,6 +50,11 @@ Build and Run
|
||||
|
||||
See <https://github.com/haiwen/seafile/wiki>
|
||||
|
||||
Internationalization (I18n)
|
||||
==========
|
||||
|
||||
See [po/i18n.markdown](https://github.com/haiwen/seafile/blob/master/po/README.markdown)
|
||||
|
||||
Change Logs
|
||||
===========
|
||||
|
||||
|
61
po/i18n.markdown
Normal file
61
po/i18n.markdown
Normal file
@ -0,0 +1,61 @@
|
||||
You are welcome to add translation to seafile client in your language.
|
||||
|
||||
## Step 1: Translate the basic client
|
||||
|
||||
### To create a new translation
|
||||
|
||||
For example, if you like to add Russian translation.
|
||||
|
||||
- Make sure you can [Build Seafile Client from source](https://github.com/haiwen/seafile/wiki/Build-and-use-seafile-client-from-source)
|
||||
|
||||
- Go to the `po/` directory
|
||||
|
||||
- Edit the `LINGUAS` file, insert the language code for Russian `ru` (Pay attention to keep the list of language codes in alphabetic order)
|
||||
|
||||
```
|
||||
de_DE
|
||||
fr
|
||||
ru
|
||||
zh_CN
|
||||
```
|
||||
|
||||
- Run `intltool-udpate --pot`, and copy `seafile.pot` to `ru.po`
|
||||
|
||||
- Edit the header part of the file `ru.po`. Change the header fileds:
|
||||
- Set the value of `Language` to `ru`
|
||||
- Set the value of `charset` to `UTF-8`
|
||||
|
||||
- Translate the entries of `ru.po` one by one
|
||||
|
||||
### To update or check an existing translation
|
||||
|
||||
For example, you want to update the Russian translation
|
||||
|
||||
- Go to the `po/` directory
|
||||
- Update the translation file by running:
|
||||
|
||||
```
|
||||
intltool-udpate ru
|
||||
```
|
||||
- Check and edit `ru.po`. Search for all messages marked **fuzzy**, and remov the word **fuzzy** when they are done.
|
||||
|
||||
- Continue running `intltool-update ru` and check that you have 0 fuzzy and 0 untranslated, then you're finished.
|
||||
|
||||
## Step 2: Translate the local web interface of Seafile Client
|
||||
|
||||
Translating the local web interface involves a bit more work to do. However, you can just finish the following steps and leave the rest work to seafile developers.
|
||||
|
||||
Again let's take Russian translation as an example.
|
||||
|
||||
- Go to the `web/i18n` directory
|
||||
- Create a directory `web/i18n/ru/LC_MESSAGES/`
|
||||
- Copy an existing translation as a template
|
||||
|
||||
```
|
||||
cp web/i18n/zh_CN/LC_MESSAGES/messages.po web/i18n/ru/LC_MESSAGES/
|
||||
```
|
||||
- Edit the `messages.po` entry by entry.
|
||||
|
||||
## Step 3: Contribute your translation to Seafile
|
||||
|
||||
Fork seafile and send us a pull request, we'll check and handle the rest of the work.
|
Loading…
Reference in New Issue
Block a user