add spanish language

This commit is contained in:
刘浩远 2020-06-26 14:03:22 +08:00
parent 363353b556
commit 1df58a8012
8 changed files with 19 additions and 3 deletions

2
.github/FUNDING.yml vendored
View File

@ -9,4 +9,4 @@ community_bridge: # Replace with a single Community Bridge project-name e.g., cl
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: ["https://www.paypal.me/yang991178", "https://hyliu.me/fluent-reader/imgs/alipay.jpg", "https://hyliu.me/fluent-reader/imgs/wechat-pay.jpg"]
custom: ["https://www.paypal.me/yang991178", "https://hyliu.me/fluent-reader/imgs/alipay.jpg"]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 93 KiB

View File

@ -37,7 +37,8 @@
"languages": [
"zh-CN",
"en-US",
"fr-FR"
"fr-FR",
"es"
],
"showNameOnTiles": true,
"setBuildNumber": true

View File

@ -80,6 +80,7 @@ class AppTab extends React.Component<AppTabProps, AppTabState> {
languageOptions = (): IDropdownOption[] => [
{ key: "default", text: intl.get("followSystem") },
{ key: "en-US", text: "English" },
{ key: "es", text: "Español"},
{ key: "fr-FR", text: "Français"},
{ key: "zh-CN", text: "中文(简体)"},
]

View File

@ -0,0 +1,12 @@
## Internationalization
Currently, Fluent Reader supports the following languages.
| Locale | Language | Credit |
| --- | --- | --- |
| en-US | English | [@yang991178](https://github.com/yang991178) |
| es | Español | [@kant](https://github.com/kant) |
| fr-FR | Français | [@Toinane](https://github.com/Toinane) |
| zh-CN | 中文(简体) | [@yang991178](https://github.com/yang991178) |
Refer to the repo of [react-intl-universal](https://github.com/alibaba/react-intl-universal) to get started on internationalization.

View File

@ -1,11 +1,13 @@
import en_US from "./en-US.json"
import zh_CN from "./zh-CN.json"
import fr_FR from "./fr-FR.json"
import es from "./es.json"
const locales = {
"en-US": en_US,
"zh-CN": zh_CN,
"fr-FR": fr_FR,
"es": es,
}
export default locales

View File

@ -35,7 +35,7 @@ export async function parseRSS(url: string) {
throw new Error(result.statusText)
}
} catch {
throw new Error("A network error has occured.")
throw new Error("A network error has occurred.")
}
}