File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -77,8 +77,6 @@ for example `docker run --name rssbot -d -e RSSBOT_TOKEN=123456:abcdef123456-U f
7777| proxy.host | PROXY_HOST | null | proxy host |
7878| proxy.port | PROXY_PORT | null | proxy port |
7979
80- language can be setting in ` zh-cn ` or ` en `
81-
8280fetch_gap can be setting in how many minutes or hours。m for minute, h for hour
8381
8482for example 5m means every 5 minutes, 1h means every 1 hour
@@ -87,6 +85,14 @@ for example 5m means every 5 minutes, 1h means every 1 hour
8785
8886translate the file in ` i18n ` in the another yaml and make a pull request (๑•̀ㅂ•́)و✧
8987
88+ ## support language
89+
90+ set ` lang ` setting using one of the following language
91+
92+ - en English
93+ - zh-cn Chinese
94+ - es-es Spanish provided by @NPueyo
95+
9096---
9197
9298# 中文文档
@@ -186,3 +192,11 @@ viewall 只能在私聊中使用
186192# i18n
187193
188194在 ` i18n ` 目录翻译 yaml 文件然后来个 ·pr· (๑•̀ㅂ•́)و✧
195+
196+ ## support language
197+
198+ 以下任意一个语言作为` lang ` 配置项
199+
200+ - en English
201+ - zh-cn 中文
202+ - es-es Spanish provided by @NPueyo
Original file line number Diff line number Diff line change @@ -38,3 +38,5 @@ CHANNEL_ADMIN_REQUIRE: Necesitas agregar este bot como administrador del canal y
3838YES : YES
3939NO : NO
4040CANCEL : Cancelar
41+ PAGE_PRE : pagina anterior
42+ PAGE_NEXT : siguiente página
Original file line number Diff line number Diff line change @@ -4,8 +4,13 @@ const path = require('path');
44const config = require ( '../config' ) ;
55const yamlPath = path . join ( __dirname , `${ config . lang } .yaml` ) ;
66
7+ let base = fs . readFileSync ( path . join ( __dirname , 'en.yaml' ) , {
8+ encoding : 'utf-8'
9+ } ) ;
10+ base = yaml . safeLoad ( base ) ;
11+
712const yamlStr = fs . readFileSync ( yamlPath , {
813 encoding : 'utf-8'
914} ) ;
1015
11- module . exports = yaml . safeLoad ( yamlStr ) ;
16+ module . exports = Object . assign ( base , yaml . safeLoad ( yamlStr ) ) ;
You can’t perform that action at this time.
0 commit comments