]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/shared-forms/select/select-checkbox.component.ts
Migrate to $localize
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / shared-forms / select / select-checkbox.component.ts
index fd683ae5d1a382d789bedbeca53e6f75323d0ef5..eb0c49034c126dbe4e0f7416d48c3fc68bf16bf4 100644 (file)
@@ -1,7 +1,6 @@
-import { Component, Input, forwardRef, OnInit } from '@angular/core'
-import { NG_VALUE_ACCESSOR, ControlValueAccessor } from '@angular/forms'
+import { Component, forwardRef, Input, OnInit } from '@angular/core'
+import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'
 import { SelectOptionsItem } from './select-options.component'
-import { I18n } from '@ngx-translate/i18n-polyfill'
 
 export type ItemSelectCheckboxValue = { id?: string | number, group?: string } | string
 
@@ -25,12 +24,8 @@ export class SelectCheckboxComponent implements OnInit, ControlValueAccessor {
   @Input() maxSelectedItems: number
   @Input() placeholder: string
 
-  constructor (
-    private i18n: I18n
-  ) {}
-
   ngOnInit () {
-    if (!this.placeholder) this.placeholder = this.i18n('Add a new option')
+    if (!this.placeholder) this.placeholder = $localize`Add a new option`
   }
 
   propagateChange = (_: any) => { /* empty */ }