diff options
author | Chocobozzz <me@florianbigard.com> | 2020-08-12 10:40:04 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-08-14 10:28:30 +0200 |
commit | 66357162f8e1227495f09bd4f68446aad7071c6d (patch) | |
tree | 7d4429506deb512b2fe1d0267f38a28cda20af55 /client/src/app/+videos/+video-edit/video-add-components/video-import-url.component.ts | |
parent | 8c360747995e17eb5520e22fc3d7bd4c3d26eeee (diff) | |
download | PeerTube-66357162f8e1227495f09bd4f68446aad7071c6d.tar.gz PeerTube-66357162f8e1227495f09bd4f68446aad7071c6d.tar.zst PeerTube-66357162f8e1227495f09bd4f68446aad7071c6d.zip |
Migrate to $localize
* Remove i18n polyfill to translate things in components
* Reduce bundle sizes
* Improve runtime perf
* Reduce a lot the time to make a full client build
* Reduce client build complexity
* We don't need a service to translate things anymore (so we will be able to translate title pages etc)
Unfortunately we may loose some translations in the migration process.
I'll put a message on weblate to notify translators
Diffstat (limited to 'client/src/app/+videos/+video-edit/video-add-components/video-import-url.component.ts')
-rw-r--r-- | client/src/app/+videos/+video-edit/video-add-components/video-import-url.component.ts | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/client/src/app/+videos/+video-edit/video-add-components/video-import-url.component.ts b/client/src/app/+videos/+video-edit/video-add-components/video-import-url.component.ts index da25663d7..8bad81097 100644 --- a/client/src/app/+videos/+video-edit/video-add-components/video-import-url.component.ts +++ b/client/src/app/+videos/+video-edit/video-add-components/video-import-url.component.ts | |||
@@ -5,10 +5,9 @@ import { AuthService, CanComponentDeactivate, Notifier, ServerService } from '@a | |||
5 | import { getAbsoluteAPIUrl, scrollToTop } from '@app/helpers' | 5 | import { getAbsoluteAPIUrl, scrollToTop } from '@app/helpers' |
6 | import { FormValidatorService } from '@app/shared/shared-forms' | 6 | import { FormValidatorService } from '@app/shared/shared-forms' |
7 | import { VideoCaptionService, VideoEdit, VideoImportService, VideoService } from '@app/shared/shared-main' | 7 | import { VideoCaptionService, VideoEdit, VideoImportService, VideoService } from '@app/shared/shared-main' |
8 | import { VideoSend } from './video-send' | ||
9 | import { LoadingBarService } from '@ngx-loading-bar/core' | 8 | import { LoadingBarService } from '@ngx-loading-bar/core' |
10 | import { I18n } from '@ngx-translate/i18n-polyfill' | ||
11 | import { VideoPrivacy, VideoUpdate } from '@shared/models' | 9 | import { VideoPrivacy, VideoUpdate } from '@shared/models' |
10 | import { VideoSend } from './video-send' | ||
12 | 11 | ||
13 | @Component({ | 12 | @Component({ |
14 | selector: 'my-video-import-url', | 13 | selector: 'my-video-import-url', |
@@ -42,9 +41,8 @@ export class VideoImportUrlComponent extends VideoSend implements OnInit, CanCom | |||
42 | protected videoService: VideoService, | 41 | protected videoService: VideoService, |
43 | protected videoCaptionService: VideoCaptionService, | 42 | protected videoCaptionService: VideoCaptionService, |
44 | private router: Router, | 43 | private router: Router, |
45 | private videoImportService: VideoImportService, | 44 | private videoImportService: VideoImportService |
46 | private i18n: I18n | 45 | ) { |
47 | ) { | ||
48 | super() | 46 | super() |
49 | } | 47 | } |
50 | 48 | ||
@@ -137,7 +135,7 @@ export class VideoImportUrlComponent extends VideoSend implements OnInit, CanCom | |||
137 | .subscribe( | 135 | .subscribe( |
138 | () => { | 136 | () => { |
139 | this.isUpdatingVideo = false | 137 | this.isUpdatingVideo = false |
140 | this.notifier.success(this.i18n('Video to import updated.')) | 138 | this.notifier.success($localize`Video to import updated.`) |
141 | 139 | ||
142 | this.router.navigate([ '/my-account', 'video-imports' ]) | 140 | this.router.navigate([ '/my-account', 'video-imports' ]) |
143 | }, | 141 | }, |