aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+about
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-08-12 10:40:04 +0200
committerChocobozzz <me@florianbigard.com>2020-08-14 10:28:30 +0200
commit66357162f8e1227495f09bd4f68446aad7071c6d (patch)
tree7d4429506deb512b2fe1d0267f38a28cda20af55 /client/src/app/+about
parent8c360747995e17eb5520e22fc3d7bd4c3d26eeee (diff)
downloadPeerTube-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/+about')
-rw-r--r--client/src/app/+about/about-instance/contact-admin-modal.component.ts8
1 files changed, 3 insertions, 5 deletions
diff --git a/client/src/app/+about/about-instance/contact-admin-modal.component.ts b/client/src/app/+about/about-instance/contact-admin-modal.component.ts
index 5199402e6..215e281bb 100644
--- a/client/src/app/+about/about-instance/contact-admin-modal.component.ts
+++ b/client/src/app/+about/about-instance/contact-admin-modal.component.ts
@@ -4,7 +4,6 @@ import { FormReactive, FormValidatorService, InstanceValidatorsService } from '@
4import { InstanceService } from '@app/shared/shared-instance' 4import { InstanceService } from '@app/shared/shared-instance'
5import { NgbModal } from '@ng-bootstrap/ng-bootstrap' 5import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
6import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref' 6import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref'
7import { I18n } from '@ngx-translate/i18n-polyfill'
8import { ServerConfig } from '@shared/models' 7import { ServerConfig } from '@shared/models'
9 8
10@Component({ 9@Component({
@@ -26,8 +25,7 @@ export class ContactAdminModalComponent extends FormReactive implements OnInit {
26 private instanceValidatorsService: InstanceValidatorsService, 25 private instanceValidatorsService: InstanceValidatorsService,
27 private instanceService: InstanceService, 26 private instanceService: InstanceService,
28 private serverService: ServerService, 27 private serverService: ServerService,
29 private notifier: Notifier, 28 private notifier: Notifier
30 private i18n: I18n
31 ) { 29 ) {
32 super() 30 super()
33 } 31 }
@@ -70,13 +68,13 @@ export class ContactAdminModalComponent extends FormReactive implements OnInit {
70 this.instanceService.contactAdministrator(fromEmail, fromName, subject, body) 68 this.instanceService.contactAdministrator(fromEmail, fromName, subject, body)
71 .subscribe( 69 .subscribe(
72 () => { 70 () => {
73 this.notifier.success(this.i18n('Your message has been sent.')) 71 this.notifier.success($localize`Your message has been sent.`)
74 this.hide() 72 this.hide()
75 }, 73 },
76 74
77 err => { 75 err => {
78 this.error = err.status === 403 76 this.error = err.status === 403
79 ? this.i18n('You already sent this form recently') 77 ? $localize`You already sent this form recently`
80 : err.message 78 : err.message
81 } 79 }
82 ) 80 )