Bugfixes! (#2187)
* Updated readme to have progress bars on localization to help motivate users. * Fixed a bug where downloads could trigger on lazy loaded module boundaries. * Updated all packages to latest * Fixed a bug where remove from on deck would show on all series cards when it shouldn't have. * Fixed a bug where virtualized reading list page wasn't showing the correct order on the UI * Localization fixes from shakeout * Fixed fullscreen mode broken in nightly from localization. * Fixed a bug where duplicate series add events could show duplicate items in library detail page. * Translations update from Hosted Weblate (#2184) * Added translation using Weblate (Kannada) * Added translation using Weblate (Hindi) * Added translation using Weblate (German) * Added translation using Weblate (Russian) * Added translation using Weblate (Malay) * Translated using Weblate (Dutch) Currently translated at 20.8% (296 of 1423 strings) Translation: Kavita/ui Translate-URL: https://hosted.weblate.org/projects/kavita/ui/nl/ * Translated using Weblate (Portuguese) Currently translated at 5.2% (75 of 1423 strings) Translation: Kavita/ui Translate-URL: https://hosted.weblate.org/projects/kavita/ui/pt/ * Translated using Weblate (German) Currently translated at 98.7% (156 of 158 strings) Translation: Kavita/backend Translate-URL: https://hosted.weblate.org/projects/kavita/backend/de/ * Translated using Weblate (Japanese) Currently translated at 1.9% (28 of 1423 strings) Translation: Kavita/ui Translate-URL: https://hosted.weblate.org/projects/kavita/ui/ja/ * Translated using Weblate (Spanish) Currently translated at 1.8% (3 of 158 strings) Translation: Kavita/backend Translate-URL: https://hosted.weblate.org/projects/kavita/backend/es/ * Translated using Weblate (Hindi) Currently translated at 100.0% (158 of 158 strings) Translation: Kavita/backend Translate-URL: https://hosted.weblate.org/projects/kavita/backend/hi/ * Translated using Weblate (German) Currently translated at 7.3% (105 of 1423 strings) Translation: Kavita/ui Translate-URL: https://hosted.weblate.org/projects/kavita/ui/de/ * Deleted translation using Weblate (Undetermined) * Added translation using Weblate (Italian) --------- Co-authored-by: Shashank Pujari <shashankppujari@gmail.com> Co-authored-by: Andre <andruecha32@gmail.com> Co-authored-by: Hans Kalisvaart <hans.kalisvaart@gmail.com> Co-authored-by: Duarte Silva <smallflake@protonmail.com> Co-authored-by: Andre Smith <andrepsmithjr@gmail.com> Co-authored-by: ThePromidius <thepromidiusyt@gmail.com> Co-authored-by: majora2007 <kavitareader@gmail.com> Co-authored-by: Tomas Battistini <tomas.battistini@gmail.com> --------- Co-authored-by: Weblate (bot) <hosted@weblate.org> Co-authored-by: Shashank Pujari <shashankppujari@gmail.com> Co-authored-by: Andre <andruecha32@gmail.com> Co-authored-by: Hans Kalisvaart <hans.kalisvaart@gmail.com> Co-authored-by: Duarte Silva <smallflake@protonmail.com> Co-authored-by: Andre Smith <andrepsmithjr@gmail.com> Co-authored-by: ThePromidius <thepromidiusyt@gmail.com> Co-authored-by: majora2007 <kavitareader@gmail.com> Co-authored-by: Tomas Battistini <tomas.battistini@gmail.com>
This commit is contained in:
parent
e9f8ecfc27
commit
7358ba7220
30 changed files with 7838 additions and 771 deletions
|
@ -1,5 +1,9 @@
|
|||
/// <reference types="@angular/localize" />
|
||||
import {APP_INITIALIZER, importProvidersFrom, isDevMode} from '@angular/core';
|
||||
import {
|
||||
APP_INITIALIZER, ApplicationConfig,
|
||||
importProvidersFrom,
|
||||
isDevMode,
|
||||
} from '@angular/core';
|
||||
import { AppComponent } from './app/app.component';
|
||||
import { NgCircleProgressModule } from 'ng-circle-progress';
|
||||
import { ToastrModule } from 'ngx-toastr';
|
||||
|
@ -9,18 +13,20 @@ import { SAVER, getSaver } from './app/shared/_providers/saver.provider';
|
|||
import { Title, BrowserModule, bootstrapApplication } from '@angular/platform-browser';
|
||||
import { JwtInterceptor } from './app/_interceptors/jwt.interceptor';
|
||||
import { ErrorInterceptor } from './app/_interceptors/error.interceptor';
|
||||
import {HTTP_INTERCEPTORS, withInterceptorsFromDi, provideHttpClient, HttpClient} from '@angular/common/http';
|
||||
import {TRANSLOCO_CONFIG, TranslocoConfig, TranslocoModule, TranslocoService} from "@ngneat/transloco";
|
||||
import {environment} from "./environments/environment";
|
||||
import {HttpLoader, translocoLoader} from "./httpLoader";
|
||||
import {HTTP_INTERCEPTORS, withInterceptorsFromDi, provideHttpClient} from '@angular/common/http';
|
||||
import {
|
||||
TRANSLOCO_PERSIST_LANG_STORAGE,
|
||||
TranslocoPersistLangModule,
|
||||
provideTransloco,
|
||||
TranslocoService
|
||||
} from "@ngneat/transloco";
|
||||
import {environment} from "./environments/environment";
|
||||
import {HttpLoader} from "./httpLoader";
|
||||
import {
|
||||
provideTranslocoPersistLang,
|
||||
} from '@ngneat/transloco-persist-lang';
|
||||
import {PERSIST_TRANSLATIONS_STORAGE, TranslocoPersistTranslationsModule} from "@ngneat/transloco-persist-translations";
|
||||
import {TranslocoLocaleModule} from "@ngneat/transloco-locale";
|
||||
import {AccountService} from "./app/_services/account.service";
|
||||
import {switchMap} from "rxjs";
|
||||
import {provideTranslocoLocale} from "@ngneat/transloco-locale";
|
||||
import {provideTranslocoPersistTranslations} from "@ngneat/transloco-persist-translations";
|
||||
|
||||
const disableAnimations = !('animate' in document.documentElement);
|
||||
|
||||
|
@ -40,6 +46,7 @@ export function preloadUser(userService: AccountService, transloco: TranslocoSer
|
|||
};
|
||||
}
|
||||
|
||||
|
||||
export const preLoad = {
|
||||
provide: APP_INITIALIZER,
|
||||
multi: true,
|
||||
|
@ -74,6 +81,23 @@ const languageCodes = [
|
|||
'zh-SG', 'zh-TW', 'zu', 'zu-ZA', 'zh_Hans'
|
||||
];
|
||||
|
||||
const translocoOptions = {
|
||||
config: {
|
||||
reRenderOnLangChange: true,
|
||||
availableLangs: languageCodes,
|
||||
prodMode: environment.production,
|
||||
defaultLang: 'en',
|
||||
fallbackLang: 'en',
|
||||
missingHandler: {
|
||||
useFallbackTranslation: true,
|
||||
allowEmpty: false,
|
||||
},
|
||||
flatten: {
|
||||
aot: !isDevMode()
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
bootstrapApplication(AppComponent, {
|
||||
providers: [
|
||||
importProvidersFrom(BrowserModule,
|
||||
|
@ -87,46 +111,26 @@ bootstrapApplication(AppComponent, {
|
|||
autoDismiss: true
|
||||
}),
|
||||
NgCircleProgressModule.forRoot(),
|
||||
TranslocoModule,
|
||||
TranslocoPersistLangModule.forRoot({
|
||||
storage: {
|
||||
provide: TRANSLOCO_PERSIST_LANG_STORAGE,
|
||||
useValue: localStorage,
|
||||
},
|
||||
}),
|
||||
TranslocoLocaleModule.forRoot(),
|
||||
TranslocoPersistTranslationsModule.forRoot({
|
||||
loader: HttpLoader,
|
||||
storage: {
|
||||
provide: PERSIST_TRANSLATIONS_STORAGE,
|
||||
useValue: sessionStorage
|
||||
}
|
||||
})
|
||||
),
|
||||
provideTransloco(translocoOptions),
|
||||
provideTranslocoLocale({
|
||||
defaultLocale: 'en'
|
||||
}),
|
||||
provideTranslocoPersistTranslations({
|
||||
loader: HttpLoader,
|
||||
storage: { useValue: localStorage }
|
||||
}),
|
||||
provideTranslocoPersistLang({
|
||||
storage: {
|
||||
useValue: localStorage,
|
||||
},
|
||||
}),
|
||||
{ provide: HTTP_INTERCEPTORS, useClass: ErrorInterceptor, multi: true },
|
||||
{ provide: HTTP_INTERCEPTORS, useClass: JwtInterceptor, multi: true },
|
||||
{
|
||||
provide: TRANSLOCO_CONFIG,
|
||||
useValue: {
|
||||
reRenderOnLangChange: true,
|
||||
availableLangs: languageCodes,
|
||||
prodMode: environment.production,
|
||||
defaultLang: 'en',
|
||||
fallbackLang: 'en',
|
||||
missingHandler: {
|
||||
useFallbackTranslation: true,
|
||||
allowEmpty: false,
|
||||
},
|
||||
flatten: {
|
||||
aot: !isDevMode()
|
||||
}
|
||||
|
||||
} as TranslocoConfig
|
||||
},
|
||||
preLoad,
|
||||
Title,
|
||||
{ provide: SAVER, useFactory: getSaver },
|
||||
provideHttpClient(withInterceptorsFromDi())
|
||||
]
|
||||
})
|
||||
} as ApplicationConfig)
|
||||
.catch(err => console.error(err));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue