mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-02 13:45:10 -05:00
Merge pull request #247 from paperless-ngx/locale-chinese-simplified
Add Chinese localization
This commit is contained in:
commit
b43aae84ab
@ -31,7 +31,8 @@
|
|||||||
"ro-RO": "src/locale/messages.ro_RO.xlf",
|
"ro-RO": "src/locale/messages.ro_RO.xlf",
|
||||||
"ru-RU": "src/locale/messages.ru_RU.xlf",
|
"ru-RU": "src/locale/messages.ru_RU.xlf",
|
||||||
"sl-SI": "src/locale/messages.sl_SI.xlf",
|
"sl-SI": "src/locale/messages.sl_SI.xlf",
|
||||||
"sv-SE": "src/locale/messages.sv_SE.xlf"
|
"sv-SE": "src/locale/messages.sv_SE.xlf",
|
||||||
|
"zh-CN": "src/locale/messages.zh_CN.xlf"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"architect": {
|
"architect": {
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { BrowserModule } from '@angular/platform-browser'
|
import { BrowserModule } from '@angular/platform-browser'
|
||||||
import { NgModule } from '@angular/core'
|
import { NgModule } from '@angular/core'
|
||||||
|
|
||||||
import { AppRoutingModule } from './app-routing.module'
|
import { AppRoutingModule } from './app-routing.module'
|
||||||
import { AppComponent } from './app.component'
|
import { AppComponent } from './app.component'
|
||||||
import {
|
import {
|
||||||
@ -84,6 +83,7 @@ import localeRo from '@angular/common/locales/ro'
|
|||||||
import localeRu from '@angular/common/locales/ru'
|
import localeRu from '@angular/common/locales/ru'
|
||||||
import localeSl from '@angular/common/locales/sl'
|
import localeSl from '@angular/common/locales/sl'
|
||||||
import localeSv from '@angular/common/locales/sv'
|
import localeSv from '@angular/common/locales/sv'
|
||||||
|
import localeZh from '@angular/common/locales/zh'
|
||||||
|
|
||||||
registerLocaleData(localeCs)
|
registerLocaleData(localeCs)
|
||||||
registerLocaleData(localeDa)
|
registerLocaleData(localeDa)
|
||||||
@ -101,6 +101,7 @@ registerLocaleData(localeRo)
|
|||||||
registerLocaleData(localeRu)
|
registerLocaleData(localeRu)
|
||||||
registerLocaleData(localeSl)
|
registerLocaleData(localeSl)
|
||||||
registerLocaleData(localeSv)
|
registerLocaleData(localeSv)
|
||||||
|
registerLocaleData(localeZh)
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [
|
||||||
|
@ -264,6 +264,12 @@ export class SettingsService {
|
|||||||
englishName: 'Swedish',
|
englishName: 'Swedish',
|
||||||
dateInputFormat: 'yyyy-mm-dd',
|
dateInputFormat: 'yyyy-mm-dd',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
code: "zh-cn",
|
||||||
|
name: $localize`Chinese Simplified`,
|
||||||
|
englishName: "Chinese Simplified",
|
||||||
|
dateInputFormat: "yyyy-mm-dd"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
// Sort languages by localized name at runtime
|
// Sort languages by localized name at runtime
|
||||||
|
@ -315,6 +315,7 @@ LANGUAGES = [
|
|||||||
("ru-ru", _("Russian")),
|
("ru-ru", _("Russian")),
|
||||||
("sl-si", _("Slovenian")),
|
("sl-si", _("Slovenian")),
|
||||||
("sv-se", _("Swedish")),
|
("sv-se", _("Swedish")),
|
||||||
|
("zh-cn", _("Chinese Simplified")),
|
||||||
]
|
]
|
||||||
|
|
||||||
LOCALE_PATHS = [os.path.join(BASE_DIR, "locale")]
|
LOCALE_PATHS = [os.path.join(BASE_DIR, "locale")]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user