From: Rigel Kent Date: Tue, 2 Jun 2020 15:53:32 +0000 (+0200) Subject: fix duplicate id in svg, empty alt in base email X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=81fe3c67c5d70e69aa2d965a41afd7331cd4fb76;p=oweals%2Fpeertube.git fix duplicate id in svg, empty alt in base email --- diff --git a/client/src/app/+about/about-peertube/about-peertube.component.html b/client/src/app/+about/about-peertube/about-peertube.component.html index e5a8b2097..1dbad3096 100644 --- a/client/src/app/+about/about-peertube/about-peertube.component.html +++ b/client/src/app/+about/about-peertube/about-peertube.component.html @@ -3,11 +3,11 @@ What is PeerTube? - mascot + mascot

- PeerTube is a self hosted federated (ActivityPub) video streaming platform using P2P directly in the web browser. + PeerTube is a self-hosted ActivityPub-federated video streaming platform using P2P directly in your web browser.

diff --git a/client/src/app/app.component.ts b/client/src/app/app.component.ts index aba91aad2..c77dc97de 100644 --- a/client/src/app/app.component.ts +++ b/client/src/app/app.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, ViewChild, AfterViewInit, Inject } from '@angular/core' +import { Component, OnInit, ViewChild, AfterViewInit, Inject, LOCALE_ID } from '@angular/core' import { DomSanitizer, SafeHtml } from '@angular/platform-browser' import { Event, GuardsCheckStart, NavigationEnd, Router, Scroll } from '@angular/router' import { AuthService, RedirectService, ServerService, ThemeService } from '@app/core' @@ -43,6 +43,7 @@ export class AppComponent implements OnInit, AfterViewInit { constructor ( @Inject(DOCUMENT) private document: Document, + @Inject(LOCALE_ID) private localeId: string, private i18n: I18n, private viewportScroller: ViewportScroller, private router: Router, @@ -97,6 +98,8 @@ export class AppComponent implements OnInit, AfterViewInit { this.location.onPopState(() => this.modalService.dismissAll(POP_STATE_MODAL_DISMISS)) this.openModalsIfNeeded() + + this.document.documentElement.lang = getShortLocale(this.localeId) } ngAfterViewInit () { @@ -171,16 +174,6 @@ export class AppComponent implements OnInit, AfterViewInit { filter(pathname => !pathname || pathname === '/' || is18nPath(pathname)) ).subscribe(() => this.redirectService.redirectToHomepage(true)) - navigationEndEvent.pipe( - map(() => window.location.pathname), - ).subscribe(pathname => { - if (is18nPath(pathname)) { - this.document.documentElement.lang = getShortLocale(pathname.split('/')[1]) - } else { - this.document.documentElement.lang = 'en' - } - }) - navigationEndEvent.subscribe(e => { this.hooks.runAction('action:router.navigation-end', 'common', { path: e.url }) }) diff --git a/client/src/app/modal/instance-config-warning-modal.component.html b/client/src/app/modal/instance-config-warning-modal.component.html index 44c994bc8..5a8290cda 100644 --- a/client/src/app/modal/instance-config-warning-modal.component.html +++ b/client/src/app/modal/instance-config-warning-modal.component.html @@ -5,7 +5,7 @@