mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-02 13:45:10 -05:00
Add Chinese localization
Addresses https://github.com/paperless-ngx/paperless-ngx/issues/134#issuecomment-1062950795
This commit is contained in:
parent
4184988c0c
commit
37c6201a5a
@ -31,7 +31,8 @@
|
||||
"ro-RO": "src/locale/messages.ro_RO.xlf",
|
||||
"ru-RU": "src/locale/messages.ru_RU.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": {
|
||||
|
@ -1,6 +1,5 @@
|
||||
import { BrowserModule } from '@angular/platform-browser'
|
||||
import { NgModule } from '@angular/core'
|
||||
|
||||
import { AppRoutingModule } from './app-routing.module'
|
||||
import { AppComponent } from './app.component'
|
||||
import {
|
||||
@ -84,6 +83,7 @@ import localeRo from '@angular/common/locales/ro'
|
||||
import localeRu from '@angular/common/locales/ru'
|
||||
import localeSl from '@angular/common/locales/sl'
|
||||
import localeSv from '@angular/common/locales/sv'
|
||||
import localeZh from '@angular/common/locales/zh'
|
||||
|
||||
registerLocaleData(localeCs)
|
||||
registerLocaleData(localeDa)
|
||||
@ -101,6 +101,7 @@ registerLocaleData(localeRo)
|
||||
registerLocaleData(localeRu)
|
||||
registerLocaleData(localeSl)
|
||||
registerLocaleData(localeSv)
|
||||
registerLocaleData(localeZh)
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
|
@ -264,6 +264,12 @@ export class SettingsService {
|
||||
englishName: 'Swedish',
|
||||
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
|
||||
|
@ -315,6 +315,7 @@ LANGUAGES = [
|
||||
("ru-ru", _("Russian")),
|
||||
("sl-si", _("Slovenian")),
|
||||
("sv-se", _("Swedish")),
|
||||
("zh-cn", _("Chinese Simplified")),
|
||||
]
|
||||
|
||||
LOCALE_PATHS = [os.path.join(BASE_DIR, "locale")]
|
||||
|
Loading…
x
Reference in New Issue
Block a user