mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-05-06 14:56:51 +02:00
doc(readme): update readme.md
This commit is contained in:
19
README.md
19
README.md
@@ -247,7 +247,7 @@ Because meanTorrent autoload the movie info from [TMDB](https://www.themoviedb.o
|
||||
{name: 'zh', index: 1, class: 'flag-icon-cn', title: '中文'}
|
||||
],
|
||||
```
|
||||
Multilingual support, if you add a new translate string file, please add configuration here. The `name` if value of [ISO_639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes),
|
||||
Multilingual support, if you add a new translate string file, please add configuration here. The `name` is value of [ISO_639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes),
|
||||
The class is used origin [flag-icon-css](https://github.com/lipis/flag-icon-css), you can find flag icon at `/public/lib/flag-icon-css/flags`.
|
||||
|
||||
```javascript
|
||||
@@ -352,8 +352,23 @@ meanTorrent used module `nodemailer`, if you have any config question you can fi
|
||||
}
|
||||
},
|
||||
```
|
||||
#### <a name='howToAddTranslate'>How to add translated language
|
||||
## <a name='howToAddTranslate'>How to add translated language
|
||||
1. Copy a translate string original file from `modules/core/client/app/trans-string-en.js` to your want named file, such as 'trans-string-fr.js', and then translate all the strings.
|
||||
2. Add new language configure item in `config/env/torrent.js`.
|
||||
```javascript
|
||||
language: [
|
||||
{name: 'en', index: 0, class: 'flag-icon-gb', title: 'English'},
|
||||
{name: 'zh', index: 1, class: 'flag-icon-cn', title: '中文'},
|
||||
{name: 'fr', index: 2, class: 'flag-icon-fr', title: 'Français'} // this is added new language configure
|
||||
],
|
||||
```
|
||||
Note: the `name` is value of [ISO_639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes),
|
||||
The class is used origin [flag-icon-css](https://github.com/lipis/flag-icon-css),
|
||||
you can find flag icon at `/public/lib/flag-icon-css/flags`.
|
||||
|
||||
3. Of course, you can also delete unnecessary translate configure language item.
|
||||
4. Copy and translate all the .md files in `modules/*/client/templates/*.md`, notice the naming rules of files please.
|
||||
5. Restart meanTorrent.
|
||||
|
||||
## Deploying to PAAS
|
||||
|
||||
|
||||
@@ -90,10 +90,7 @@ module.exports = {
|
||||
'modules/*/client/scss/*.scss'
|
||||
],
|
||||
js: [
|
||||
'modules/core/client/app/config.js',
|
||||
'modules/core/client/app/init.js',
|
||||
'modules/core/client/app/trans-string-cn.js',
|
||||
'modules/core/client/app/trans-string-en.js',
|
||||
'modules/core/client/app/*.js',
|
||||
'modules/*/client/*.js',
|
||||
'modules/*/client/**/*.js'
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user