X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fshared%2Fshared-forms%2Fselect%2Fselect-checkbox.component.ts;h=c2523f15cdfa2ca6f5564559450ccda816326943;hb=8f608a4cb22ab232cfab20665050764b38bac9c7;hp=fd683ae5d1a382d789bedbeca53e6f75323d0ef5;hpb=857961f0ee39f90dc3267cebd2b5e3f718115d06;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/shared/shared-forms/select/select-checkbox.component.ts b/client/src/app/shared/shared-forms/select/select-checkbox.component.ts index fd683ae5d..c2523f15c 100644 --- a/client/src/app/shared/shared-forms/select/select-checkbox.component.ts +++ b/client/src/app/shared/shared-forms/select/select-checkbox.component.ts @@ -1,7 +1,6 @@ -import { Component, Input, forwardRef, OnInit } from '@angular/core' -import { NG_VALUE_ACCESSOR, ControlValueAccessor } from '@angular/forms' -import { SelectOptionsItem } from './select-options.component' -import { I18n } from '@ngx-translate/i18n-polyfill' +import { Component, forwardRef, Input, OnInit } from '@angular/core' +import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms' +import { SelectOptionsItem } from '../../../../types/select-options-item.model' 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 */ }