From 005529cda86638050841110d8dec0f44ad31972a Mon Sep 17 00:00:00 2001 From: sephrat <34862846+sephrat@users.noreply.github.com> Date: Fri, 12 Nov 2021 23:11:51 +0100 Subject: [PATCH] =?UTF-8?q?=20fix(translations):=20=F0=9F=8C=90=20Localize?= =?UTF-8?q?=20more=20places=20(#4400)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Localize a few isolated strings * Localize paginator * Localize a few isolated strings * Make button width dynamic for better i18n * Localize a few isolated strings * Fix technical typo --- src/Ombi/ClientApp/src/app/app.module.ts | 7 ++++ .../src/app/errors/not-found.component.ts | 2 +- .../components/details/details.component.html | 2 +- .../src/app/localization/MatPaginatorI18n.ts | 34 +++++++++++++++++++ .../movie/movie-details.component.html | 2 +- .../movie-information-panel.component.html | 2 +- .../tv-information-panel.component.html | 4 +-- .../tv-requests-panel.component.html | 5 +-- .../media-details.component.scss | 3 +- .../app/requests/movierequests.component.html | 2 +- .../music/musicrequests.component.html | 2 +- .../app/requests/tvrequests.component.html | 2 +- .../shared/chat-box/chat-box.component.html | 6 ++-- .../genre-select/genre-select.component.html | 2 +- .../keyword-search.component.html | 2 +- .../watch-providers-select.component.html | 2 +- .../unsubscribe-confirm.component.html | 2 +- src/Ombi/wwwroot/translations/en.json | 25 ++++++++++++-- 18 files changed, 84 insertions(+), 22 deletions(-) create mode 100644 src/Ombi/ClientApp/src/app/localization/MatPaginatorI18n.ts diff --git a/src/Ombi/ClientApp/src/app/app.module.ts b/src/Ombi/ClientApp/src/app/app.module.ts index b4e78087c..082ce80d2 100644 --- a/src/Ombi/ClientApp/src/app/app.module.ts +++ b/src/Ombi/ClientApp/src/app/app.module.ts @@ -65,6 +65,9 @@ import { TooltipModule } from "primeng/tooltip"; import { TranslateHttpLoader } from "@ngx-translate/http-loader"; import { UnauthorizedInterceptor } from "./auth/unauthorized.interceptor"; import { environment } from "../environments/environment"; +import { MatPaginatorIntl } from "@angular/material/paginator"; +import { TranslateService } from "@ngx-translate/core"; +import { MatPaginatorI18n } from "./localization/MatPaginatorI18n"; const routes: Routes = [ { path: "*", component: PageNotFoundComponent }, @@ -212,6 +215,10 @@ export function JwtTokenGetter() { useClass: UnauthorizedInterceptor, multi: true }, + { + provide: MatPaginatorIntl, deps: [TranslateService], + useFactory: (translateService: TranslateService) => new MatPaginatorI18n(translateService).getPaginatorIntl() + }, ], bootstrap: [AppComponent], }) diff --git a/src/Ombi/ClientApp/src/app/errors/not-found.component.ts b/src/Ombi/ClientApp/src/app/errors/not-found.component.ts index f102d0449..25269ecd1 100644 --- a/src/Ombi/ClientApp/src/app/errors/not-found.component.ts +++ b/src/Ombi/ClientApp/src/app/errors/not-found.component.ts @@ -1,6 +1,6 @@ import { Component } from "@angular/core"; @Component({ - template: "