diff --git a/packages/auth/form/src/auth-form/auth-form.component.ts b/packages/auth/form/src/auth-form/auth-form.component.ts index 54e5d0ae6..36d0b8ea0 100644 --- a/packages/auth/form/src/auth-form/auth-form.component.ts +++ b/packages/auth/form/src/auth-form/auth-form.component.ts @@ -20,8 +20,8 @@ import { AuthMicrosoftb2cComponent } from '@igo2/auth/microsoft'; import { ConfigService } from '@igo2/core/config'; +import { IgoLanguageModule } from '@igo2/core/language'; -import { TranslateModule } from '@ngx-translate/core'; import { filter } from 'rxjs/operators'; import { AuthFormOptions } from '../shared'; @@ -40,7 +40,7 @@ import { AuthFormOptions } from '../shared'; AuthFacebookComponent, AuthInternComponent, MatButtonModule, - TranslateModule + IgoLanguageModule ] }) export class AuthFormComponent implements OnInit { diff --git a/packages/auth/internal/src/auth-intern/auth-intern.component.ts b/packages/auth/internal/src/auth-intern/auth-intern.component.ts index ba2ff2390..60e9c0319 100644 --- a/packages/auth/internal/src/auth-intern/auth-intern.component.ts +++ b/packages/auth/internal/src/auth-intern/auth-intern.component.ts @@ -20,8 +20,7 @@ import { MatProgressSpinner } from '@angular/material/progress-spinner'; import { AuthService } from '@igo2/auth'; import { LanguageService } from '@igo2/core/language'; - -import { TranslateModule } from '@ngx-translate/core'; +import { IgoLanguageModule } from '@igo2/core/language'; @Component({ selector: 'igo-auth-intern', @@ -37,7 +36,7 @@ import { TranslateModule } from '@ngx-translate/core'; MatButtonModule, MatProgressSpinner, NgIf, - TranslateModule + IgoLanguageModule ] }) export class AuthInternComponent { diff --git a/packages/auth/microsoft/src/auth-microsoft/auth-microsoft.component.ts b/packages/auth/microsoft/src/auth-microsoft/auth-microsoft.component.ts index 11f53600f..5b42c2cf9 100644 --- a/packages/auth/microsoft/src/auth-microsoft/auth-microsoft.component.ts +++ b/packages/auth/microsoft/src/auth-microsoft/auth-microsoft.component.ts @@ -11,6 +11,7 @@ import { MatButtonModule } from '@angular/material/button'; import { AuthService } from '@igo2/auth'; import { IconSvg, IgoIconComponent, MICROSOFT_ICON } from '@igo2/common'; import { ConfigService } from '@igo2/core/config'; +import { IgoLanguageModule } from '@igo2/core/language'; import { MSAL_GUARD_CONFIG, @@ -25,7 +26,6 @@ import { PublicClientApplication, SilentRequest } from '@azure/msal-browser'; -import { TranslateModule } from '@ngx-translate/core'; import { Subject } from 'rxjs'; import { filter, takeUntil } from 'rxjs/operators'; @@ -40,7 +40,7 @@ import { styleUrls: ['./auth-microsoft.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, - imports: [MatButtonModule, TranslateModule, IgoIconComponent] + imports: [MatButtonModule, IgoLanguageModule, IgoIconComponent] }) export class AuthMicrosoftComponent { private options?: AuthMicrosoftOptions; diff --git a/packages/auth/microsoft/src/auth-microsoftb2c/auth-microsoftb2c.component.ts b/packages/auth/microsoft/src/auth-microsoftb2c/auth-microsoftb2c.component.ts index e01aa7dca..77a7b7508 100644 --- a/packages/auth/microsoft/src/auth-microsoftb2c/auth-microsoftb2c.component.ts +++ b/packages/auth/microsoft/src/auth-microsoftb2c/auth-microsoftb2c.component.ts @@ -11,6 +11,7 @@ import { MatButtonModule } from '@angular/material/button'; import { AuthService } from '@igo2/auth'; import { IconSvg, IgoIconComponent, MICROSOFT_ICON } from '@igo2/common'; import { ConfigService } from '@igo2/core/config'; +import { IgoLanguageModule } from '@igo2/core/language'; import { MSAL_GUARD_CONFIG } from '@azure/msal-angular'; import { @@ -21,7 +22,6 @@ import { PublicClientApplication, SilentRequest } from '@azure/msal-browser'; -import { TranslateModule } from '@ngx-translate/core'; import { Subject } from 'rxjs'; import { filter, takeUntil } from 'rxjs/operators'; @@ -38,7 +38,7 @@ import { MsalServiceb2c } from './auth-msalServiceb2c.service'; styleUrls: ['./auth-microsoftb2c.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, - imports: [MatButtonModule, TranslateModule, IgoIconComponent], + imports: [MatButtonModule, IgoLanguageModule, IgoIconComponent], providers: [MsalServiceb2c] }) export class AuthMicrosoftb2cComponent { diff --git a/packages/auth/monitoring/src/auth-monitoring/auth-monitoring.service.spec.ts b/packages/auth/monitoring/src/auth-monitoring/auth-monitoring.service.spec.ts index f2287cbd6..dc3f6201b 100644 --- a/packages/auth/monitoring/src/auth-monitoring/auth-monitoring.service.spec.ts +++ b/packages/auth/monitoring/src/auth-monitoring/auth-monitoring.service.spec.ts @@ -4,7 +4,7 @@ import { TestBed } from '@angular/core/testing'; import { AuthService } from '@igo2/auth'; import { IgoAuthFormModule } from '@igo2/auth/form'; import { ConfigService } from '@igo2/core/config'; -import { provideMockRootTranslation } from '@igo2/core/language'; +import { provideMockTranslation } from '@igo2/core/language'; import { MessageService } from '@igo2/core/message'; import { AnyMonitoringOptions, @@ -22,7 +22,7 @@ const initialize = ( TestBed.configureTestingModule({ imports: [ HttpClientModule, - provideMockRootTranslation(), + provideMockTranslation(), IgoAuthFormModule, ToastrModule ], diff --git a/packages/auth/src/lib/shared/auth.service.spec.ts b/packages/auth/src/lib/shared/auth.service.spec.ts index 3171e94cd..7cc4fa1eb 100644 --- a/packages/auth/src/lib/shared/auth.service.spec.ts +++ b/packages/auth/src/lib/shared/auth.service.spec.ts @@ -1,10 +1,7 @@ import { HttpClientModule } from '@angular/common/http'; import { TestBed, inject } from '@angular/core/testing'; -import { - IgoLanguageModule, - provideMockRootTranslation -} from '@igo2/core/language'; +import { IgoLanguageModule, provideMockTranslation } from '@igo2/core/language'; import { IgoMessageModule } from '@igo2/core/message'; import { AuthService } from './auth.service'; @@ -14,7 +11,7 @@ describe('AuthService', () => { TestBed.configureTestingModule({ imports: [ HttpClientModule, - provideMockRootTranslation(), + provideMockTranslation(), IgoLanguageModule, IgoMessageModule ], diff --git a/packages/common/src/lib/action/actionbar/actionbar-item.component.ts b/packages/common/src/lib/action/actionbar/actionbar-item.component.ts index 77495a7ef..a5f522253 100644 --- a/packages/common/src/lib/action/actionbar/actionbar-item.component.ts +++ b/packages/common/src/lib/action/actionbar/actionbar-item.component.ts @@ -14,7 +14,8 @@ import { MatIconModule } from '@angular/material/icon'; import { MatListModule } from '@angular/material/list'; import { MatTooltipModule } from '@angular/material/tooltip'; -import { TranslateModule } from '@ngx-translate/core'; +import { IgoLanguageModule } from '@igo2/core/language'; + import { BehaviorSubject, Subscription, isObservable } from 'rxjs'; import { IgoIconComponent } from '../../icons'; @@ -38,7 +39,7 @@ import { Action } from '../shared/action.interfaces'; MatIconModule, MatCheckboxModule, AsyncPipe, - TranslateModule, + IgoLanguageModule, IgoIconComponent ] }) diff --git a/packages/common/src/lib/action/actionbar/actionbar.component.ts b/packages/common/src/lib/action/actionbar/actionbar.component.ts index 5164a556f..cd1905bf8 100644 --- a/packages/common/src/lib/action/actionbar/actionbar.component.ts +++ b/packages/common/src/lib/action/actionbar/actionbar.component.ts @@ -22,9 +22,9 @@ import { } from '@angular/material/menu'; import { MatTooltipModule } from '@angular/material/tooltip'; +import { IgoLanguageModule } from '@igo2/core/language'; import { Media, MediaService } from '@igo2/core/media'; -import { TranslateModule } from '@ngx-translate/core'; import { BehaviorSubject } from 'rxjs'; import { EntityStoreWatcher } from '../../entity'; @@ -54,7 +54,7 @@ import { ActionbarItemComponent } from './actionbar-item.component'; MatMenuModule, MatCardModule, AsyncPipe, - TranslateModule + IgoLanguageModule ] }) export class ActionbarComponent implements OnDestroy, OnChanges { diff --git a/packages/common/src/lib/color-picker-form-field/color-picker-form-field.component.ts b/packages/common/src/lib/color-picker-form-field/color-picker-form-field.component.ts index 8419a3e60..3078f83da 100644 --- a/packages/common/src/lib/color-picker-form-field/color-picker-form-field.component.ts +++ b/packages/common/src/lib/color-picker-form-field/color-picker-form-field.component.ts @@ -11,7 +11,8 @@ import { MatButtonModule } from '@angular/material/button'; import { MatFormFieldModule } from '@angular/material/form-field'; import { MatInputModule } from '@angular/material/input'; -import { TranslateModule } from '@ngx-translate/core'; +import { IgoLanguageModule } from '@igo2/core/language'; + import { ColorEvent } from 'ngx-color'; import { ColorChromeModule } from 'ngx-color/chrome'; import tinycolor, { ColorInput } from 'tinycolor2'; @@ -37,7 +38,7 @@ type ColorFormat = 'hex' | 'rgba' | 'hsla'; CdkConnectedOverlay, ColorChromeModule, MatButtonModule, - TranslateModule + IgoLanguageModule ] }) export class ColorPickerFormFieldComponent implements ControlValueAccessor { diff --git a/packages/common/src/lib/confirm-dialog/confirm-dialog.component.ts b/packages/common/src/lib/confirm-dialog/confirm-dialog.component.ts index 6737e5857..5290774f7 100644 --- a/packages/common/src/lib/confirm-dialog/confirm-dialog.component.ts +++ b/packages/common/src/lib/confirm-dialog/confirm-dialog.component.ts @@ -7,7 +7,7 @@ import { MatDialogTitle } from '@angular/material/dialog'; -import { TranslateModule } from '@ngx-translate/core'; +import { IgoLanguageModule } from '@igo2/core/language'; @Component({ selector: 'igo-confirm-dialog', @@ -19,7 +19,7 @@ import { TranslateModule } from '@ngx-translate/core'; MatDialogContent, MatDialogActions, MatButtonModule, - TranslateModule + IgoLanguageModule ] }) export class ConfirmDialogComponent { diff --git a/packages/common/src/lib/entity/entity-table/entity-table.component.ts b/packages/common/src/lib/entity/entity-table/entity-table.component.ts index d9c70b21d..6bb952f3f 100644 --- a/packages/common/src/lib/entity/entity-table/entity-table.component.ts +++ b/packages/common/src/lib/entity/entity-table/entity-table.component.ts @@ -48,9 +48,9 @@ import { MatSortModule } from '@angular/material/sort'; import { MatTableDataSource, MatTableModule } from '@angular/material/table'; import { MatTooltipModule } from '@angular/material/tooltip'; +import { IgoLanguageModule } from '@igo2/core/language'; import { StringUtils } from '@igo2/utils'; -import { TranslateModule } from '@ngx-translate/core'; import { default as moment } from 'moment'; import { BehaviorSubject, Observable, Subscription } from 'rxjs'; import { debounceTime, map } from 'rxjs/operators'; @@ -125,7 +125,7 @@ interface RowData { SanitizeHtmlPipe, SecureImagePipe, StopPropagationDirective, - TranslateModule + IgoLanguageModule ] }) export class EntityTableComponent implements OnInit, OnChanges, OnDestroy { diff --git a/packages/common/src/lib/form-dialog/form-dialog.component.ts b/packages/common/src/lib/form-dialog/form-dialog.component.ts index c01556421..4b4c6ed2f 100644 --- a/packages/common/src/lib/form-dialog/form-dialog.component.ts +++ b/packages/common/src/lib/form-dialog/form-dialog.component.ts @@ -9,8 +9,8 @@ import { } from '@angular/material/dialog'; import { LanguageService } from '@igo2/core/language'; +import { IgoLanguageModule } from '@igo2/core/language'; -import { TranslateModule } from '@ngx-translate/core'; import { BehaviorSubject } from 'rxjs'; import { CustomHtmlComponent } from '../custom-html/custom-html.component'; @@ -42,7 +42,7 @@ import { FormDialogData } from './form-dialog.interface'; MatButtonModule, CustomHtmlComponent, AsyncPipe, - TranslateModule + IgoLanguageModule ] }) export class FormDialogComponent { diff --git a/packages/common/src/lib/form/form-field/form-field-select.component.ts b/packages/common/src/lib/form/form-field/form-field-select.component.ts index 0279f3a99..b93820833 100644 --- a/packages/common/src/lib/form/form-field/form-field-select.component.ts +++ b/packages/common/src/lib/form/form-field/form-field-select.component.ts @@ -12,7 +12,8 @@ import { MatFormFieldModule } from '@angular/material/form-field'; import { MatIconModule } from '@angular/material/icon'; import { MatSelectModule } from '@angular/material/select'; -import { TranslateModule } from '@ngx-translate/core'; +import { IgoLanguageModule } from '@igo2/core/language'; + import { BehaviorSubject } from 'rxjs'; import { IgoFormFieldComponent } from '../shared/form-field-component'; @@ -41,7 +42,7 @@ import { NgIf, MatIconModule, AsyncPipe, - TranslateModule + IgoLanguageModule ] }) export class FormFieldSelectComponent implements OnInit { diff --git a/packages/common/src/lib/form/form-field/form-field-text.component.ts b/packages/common/src/lib/form/form-field/form-field-text.component.ts index f0af38576..e4f2119df 100644 --- a/packages/common/src/lib/form/form-field/form-field-text.component.ts +++ b/packages/common/src/lib/form/form-field/form-field-text.component.ts @@ -13,7 +13,8 @@ import { MatFormFieldModule } from '@angular/material/form-field'; import { MatIconModule } from '@angular/material/icon'; import { MatInputModule } from '@angular/material/input'; -import { TranslateModule } from '@ngx-translate/core'; +import { IgoLanguageModule } from '@igo2/core/language'; + import { BehaviorSubject } from 'rxjs'; import { IgoFormFieldComponent } from '../shared/form-field-component'; @@ -40,7 +41,7 @@ import { MatIconModule, MatButtonModule, AsyncPipe, - TranslateModule + IgoLanguageModule ] }) export class FormFieldTextComponent implements OnInit { diff --git a/packages/common/src/lib/form/form-field/form-field-textarea.component.ts b/packages/common/src/lib/form/form-field/form-field-textarea.component.ts index 9cc972979..f0f745f84 100644 --- a/packages/common/src/lib/form/form-field/form-field-textarea.component.ts +++ b/packages/common/src/lib/form/form-field/form-field-textarea.component.ts @@ -11,7 +11,8 @@ import { MatFormFieldModule } from '@angular/material/form-field'; import { MatIconModule } from '@angular/material/icon'; import { MatInputModule } from '@angular/material/input'; -import { TranslateModule } from '@ngx-translate/core'; +import { IgoLanguageModule } from '@igo2/core/language'; + import { BehaviorSubject } from 'rxjs'; import { IgoFormFieldComponent } from '../shared/form-field-component'; @@ -37,7 +38,7 @@ import { NgIf, MatIconModule, AsyncPipe, - TranslateModule + IgoLanguageModule ] }) export class FormFieldTextareaComponent implements OnInit { diff --git a/packages/common/src/lib/form/form-group/form-group.component.ts b/packages/common/src/lib/form/form-group/form-group.component.ts index eab892a07..2e1cb85d1 100644 --- a/packages/common/src/lib/form/form-group/form-group.component.ts +++ b/packages/common/src/lib/form/form-group/form-group.component.ts @@ -3,7 +3,7 @@ import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; import { UntypedFormGroup } from '@angular/forms'; import { MatFormFieldModule } from '@angular/material/form-field'; -import { TranslateModule } from '@ngx-translate/core'; +import { IgoLanguageModule } from '@igo2/core/language'; import { FormFieldComponent } from '../form-field/form-field.component'; import { FormField, FormFieldGroup } from '../shared/form.interfaces'; @@ -26,7 +26,7 @@ import { getControlErrorMessage } from '../shared/form.utils'; NgClass, FormFieldComponent, MatFormFieldModule, - TranslateModule + IgoLanguageModule ] }) export class FormGroupComponent { diff --git a/packages/common/src/lib/home-button/home-button.component.ts b/packages/common/src/lib/home-button/home-button.component.ts index a6a128ba6..c8a79ff23 100644 --- a/packages/common/src/lib/home-button/home-button.component.ts +++ b/packages/common/src/lib/home-button/home-button.component.ts @@ -3,14 +3,14 @@ import { MatButtonModule } from '@angular/material/button'; import { MatIconModule } from '@angular/material/icon'; import { MatTooltipModule } from '@angular/material/tooltip'; -import { TranslateModule } from '@ngx-translate/core'; +import { IgoLanguageModule } from '@igo2/core/language'; @Component({ selector: 'igo-home-button', templateUrl: './home-button.component.html', styleUrls: ['./home-button.component.scss'], standalone: true, - imports: [MatButtonModule, MatTooltipModule, MatIconModule, TranslateModule] + imports: [MatButtonModule, MatTooltipModule, MatIconModule, IgoLanguageModule] }) export class HomeButtonComponent { @Output() unselectButton = new EventEmitter(); diff --git a/packages/common/src/lib/interactive-tour/interactive-tour.component.ts b/packages/common/src/lib/interactive-tour/interactive-tour.component.ts index 17e0b3147..0ace72ce8 100644 --- a/packages/common/src/lib/interactive-tour/interactive-tour.component.ts +++ b/packages/common/src/lib/interactive-tour/interactive-tour.component.ts @@ -4,7 +4,8 @@ import { MatButtonModule } from '@angular/material/button'; import { MatIconModule } from '@angular/material/icon'; import { MatTooltipModule } from '@angular/material/tooltip'; -import { TranslateModule } from '@ngx-translate/core'; +import { IgoLanguageModule } from '@igo2/core/language'; + import { Observable, of } from 'rxjs'; import { @@ -28,7 +29,7 @@ import { InteractiveTourService } from './interactive-tour.service'; MatTooltipModule, MatIconModule, AsyncPipe, - TranslateModule, + IgoLanguageModule, IgoIconComponent ] }) diff --git a/packages/common/src/lib/select-value-dialog/select-value-check-radio-dialog.component.ts b/packages/common/src/lib/select-value-dialog/select-value-check-radio-dialog.component.ts index 4a75be1e7..c9e180eb9 100644 --- a/packages/common/src/lib/select-value-dialog/select-value-check-radio-dialog.component.ts +++ b/packages/common/src/lib/select-value-dialog/select-value-check-radio-dialog.component.ts @@ -17,8 +17,8 @@ import { import { MatRadioChange, MatRadioModule } from '@angular/material/radio'; import { LanguageService } from '@igo2/core/language'; +import { IgoLanguageModule } from '@igo2/core/language'; -import { TranslateModule } from '@ngx-translate/core'; import { BehaviorSubject } from 'rxjs'; import { SelectValueDialogType } from './select-value-dialog.enums'; @@ -40,7 +40,7 @@ import { SelectValueData } from './select-value-dialog.interface'; MatDialogActions, MatButtonModule, AsyncPipe, - TranslateModule + IgoLanguageModule ] }) export class SelectValueCheckRadioDialogComponent implements OnInit { diff --git a/packages/common/src/lib/table/table.component.ts b/packages/common/src/lib/table/table.component.ts index 8d4e3c7ca..adf54b187 100644 --- a/packages/common/src/lib/table/table.component.ts +++ b/packages/common/src/lib/table/table.component.ts @@ -19,9 +19,9 @@ import { MatInputModule } from '@angular/material/input'; import { MatSort, MatSortModule } from '@angular/material/sort'; import { MatTableModule } from '@angular/material/table'; +import { IgoLanguageModule } from '@igo2/core/language'; import { ObjectUtils } from '@igo2/utils'; -import { TranslateModule } from '@ngx-translate/core'; import { fromEvent } from 'rxjs'; import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; @@ -46,7 +46,7 @@ import { TableModel } from './table-model.interface'; NgClass, MatButtonModule, MatIconModule, - TranslateModule + IgoLanguageModule ] }) export class TableComponent implements OnChanges, OnInit, AfterViewInit { diff --git a/packages/context/src/lib/context-import-export/context-import-export/context-import-export.component.ts b/packages/context/src/lib/context-import-export/context-import-export/context-import-export.component.ts index 469ba0803..d1c5b108b 100644 --- a/packages/context/src/lib/context-import-export/context-import-export/context-import-export.component.ts +++ b/packages/context/src/lib/context-import-export/context-import-export/context-import-export.component.ts @@ -17,11 +17,11 @@ import { MatSelectModule } from '@angular/material/select'; import { SpinnerComponent } from '@igo2/common'; import { ConfigService } from '@igo2/core/config'; +import { IgoLanguageModule } from '@igo2/core/language'; import { MessageService } from '@igo2/core/message'; import { Layer, VectorLayer } from '@igo2/geo'; import type { IgoMap } from '@igo2/geo'; -import { TranslateModule } from '@ngx-translate/core'; import { BehaviorSubject, Subscription } from 'rxjs'; import { take } from 'rxjs/operators'; @@ -55,7 +55,7 @@ import { MatDividerModule, NgFor, AsyncPipe, - TranslateModule + IgoLanguageModule ] }) export class ContextImportExportComponent implements OnInit, OnDestroy { diff --git a/packages/context/src/lib/context-manager/context-edit/context-edit.component.ts b/packages/context/src/lib/context-manager/context-edit/context-edit.component.ts index 1526f6b31..0788008b0 100644 --- a/packages/context/src/lib/context-manager/context-edit/context-edit.component.ts +++ b/packages/context/src/lib/context-manager/context-edit/context-edit.component.ts @@ -7,7 +7,7 @@ import { Output } from '@angular/core'; -import { TranslateModule } from '@ngx-translate/core'; +import { IgoLanguageModule } from '@igo2/core/language'; import { ContextFormComponent } from '../context-form/context-form.component'; import { Context } from '../shared/context.interface'; @@ -16,7 +16,7 @@ import { Context } from '../shared/context.interface'; selector: 'igo-context-edit', templateUrl: './context-edit.component.html', standalone: true, - imports: [NgIf, ContextFormComponent, TranslateModule] + imports: [NgIf, ContextFormComponent, IgoLanguageModule] }) export class ContextEditComponent { @Input() diff --git a/packages/context/src/lib/context-manager/context-form/context-form.component.ts b/packages/context/src/lib/context-manager/context-form/context-form.component.ts index df42220af..df0f5719a 100644 --- a/packages/context/src/lib/context-manager/context-form/context-form.component.ts +++ b/packages/context/src/lib/context-manager/context-form/context-form.component.ts @@ -12,11 +12,10 @@ import { MatIconModule } from '@angular/material/icon'; import { MatInputModule } from '@angular/material/input'; import { MatTooltipModule } from '@angular/material/tooltip'; +import { IgoLanguageModule } from '@igo2/core/language'; import { MessageService } from '@igo2/core/message'; import { Clipboard, ObjectUtils } from '@igo2/utils'; -import { TranslateModule } from '@ngx-translate/core'; - import { Context } from '../shared/context.interface'; @Component({ @@ -33,7 +32,7 @@ import { Context } from '../shared/context.interface'; MatButtonModule, MatTooltipModule, MatIconModule, - TranslateModule + IgoLanguageModule ] }) export class ContextFormComponent implements OnInit { diff --git a/packages/context/src/lib/context-manager/context-item/context-item.component.ts b/packages/context/src/lib/context-manager/context-item/context-item.component.ts index de26c2c69..66a36e820 100644 --- a/packages/context/src/lib/context-manager/context-item/context-item.component.ts +++ b/packages/context/src/lib/context-manager/context-item/context-item.component.ts @@ -13,10 +13,9 @@ import { MatTooltipModule } from '@angular/material/tooltip'; import { AuthService } from '@igo2/auth'; import { CollapseDirective, StopPropagationDirective } from '@igo2/common'; +import { IgoLanguageModule } from '@igo2/core/language'; import { StorageService } from '@igo2/core/storage'; -import { TranslateModule } from '@ngx-translate/core'; - import { TypePermission } from '../shared/context.enum'; import { DetailedContext } from '../shared/context.interface'; @@ -35,7 +34,7 @@ import { DetailedContext } from '../shared/context.interface'; MatTooltipModule, MatIconModule, CollapseDirective, - TranslateModule + IgoLanguageModule ] }) export class ContextItemComponent { diff --git a/packages/context/src/lib/context-manager/context-list/context-list.component.ts b/packages/context/src/lib/context-manager/context-list/context-list.component.ts index 7dd738dac..ad66793c9 100644 --- a/packages/context/src/lib/context-manager/context-list/context-list.component.ts +++ b/packages/context/src/lib/context-manager/context-list/context-list.component.ts @@ -30,10 +30,10 @@ import { } from '@igo2/common'; import { ConfigService } from '@igo2/core/config'; import { LanguageService } from '@igo2/core/language'; +import { IgoLanguageModule } from '@igo2/core/language'; import { StorageService } from '@igo2/core/storage'; import type { IgoMap } from '@igo2/geo'; -import { TranslateModule } from '@ngx-translate/core'; import { BehaviorSubject, ReplaySubject, Subscription, timer } from 'rxjs'; import { take } from 'rxjs/operators'; import { debounce } from 'rxjs/operators'; @@ -73,7 +73,7 @@ import { ContextListControlsEnum } from './context-list.enum'; ListItemDirective, AsyncPipe, KeyValuePipe, - TranslateModule + IgoLanguageModule ] }) export class ContextListComponent implements OnInit, OnDestroy { diff --git a/packages/context/src/lib/context-manager/context-permissions/context-permissions.component.ts b/packages/context/src/lib/context-manager/context-permissions/context-permissions.component.ts index aa9dbb65d..6e37425ba 100644 --- a/packages/context/src/lib/context-manager/context-permissions/context-permissions.component.ts +++ b/packages/context/src/lib/context-manager/context-permissions/context-permissions.component.ts @@ -32,8 +32,8 @@ import { StopPropagationDirective } from '@igo2/common'; import { ConfigService } from '@igo2/core/config'; +import { IgoLanguageModule } from '@igo2/core/language'; -import { TranslateModule } from '@ngx-translate/core'; import { Subscription } from 'rxjs'; import { TypePermission } from '../shared/context.enum'; @@ -67,7 +67,7 @@ import { StopPropagationDirective, MatTooltipModule, KeyValuePipe, - TranslateModule + IgoLanguageModule ] }) export class ContextPermissionsComponent implements OnInit { diff --git a/packages/context/src/lib/context-map-button/bookmark-button/bookmark-button.component.ts b/packages/context/src/lib/context-map-button/bookmark-button/bookmark-button.component.ts index b975af5f5..8e5929f2f 100644 --- a/packages/context/src/lib/context-map-button/bookmark-button/bookmark-button.component.ts +++ b/packages/context/src/lib/context-map-button/bookmark-button/bookmark-button.component.ts @@ -4,10 +4,10 @@ import { MatDialog } from '@angular/material/dialog'; import { MatIconModule } from '@angular/material/icon'; import { MatTooltipModule } from '@angular/material/tooltip'; +import { IgoLanguageModule } from '@igo2/core/language'; import { MessageService } from '@igo2/core/message'; import type { IgoMap } from '@igo2/geo'; -import { TranslateModule } from '@ngx-translate/core'; import { take } from 'rxjs/operators'; import { ContextService } from '../../context-manager/shared/context.service'; @@ -18,7 +18,7 @@ import { BookmarkDialogComponent } from './bookmark-dialog.component'; templateUrl: './bookmark-button.component.html', styleUrls: ['./bookmark-button.component.scss'], standalone: true, - imports: [MatButtonModule, MatTooltipModule, MatIconModule, TranslateModule] + imports: [MatButtonModule, MatTooltipModule, MatIconModule, IgoLanguageModule] }) export class BookmarkButtonComponent { @Input() diff --git a/packages/context/src/lib/context-map-button/bookmark-button/bookmark-dialog.component.ts b/packages/context/src/lib/context-map-button/bookmark-button/bookmark-dialog.component.ts index 7019cf4d3..6fee14b0d 100644 --- a/packages/context/src/lib/context-map-button/bookmark-button/bookmark-dialog.component.ts +++ b/packages/context/src/lib/context-map-button/bookmark-button/bookmark-dialog.component.ts @@ -10,7 +10,7 @@ import { import { MatFormFieldModule } from '@angular/material/form-field'; import { MatInputModule } from '@angular/material/input'; -import { TranslateModule } from '@ngx-translate/core'; +import { IgoLanguageModule } from '@igo2/core/language'; @Component({ selector: 'igo-bookmark-dialog', @@ -24,7 +24,7 @@ import { TranslateModule } from '@ngx-translate/core'; FormsModule, MatDialogActions, MatButtonModule, - TranslateModule + IgoLanguageModule ] }) export class BookmarkDialogComponent { diff --git a/packages/context/src/lib/context-map-button/poi-button/poi-button.component.ts b/packages/context/src/lib/context-map-button/poi-button/poi-button.component.ts index 3e3d51b9d..00a27b8d6 100644 --- a/packages/context/src/lib/context-map-button/poi-button/poi-button.component.ts +++ b/packages/context/src/lib/context-map-button/poi-button/poi-button.component.ts @@ -10,6 +10,7 @@ import { MatSelectModule } from '@angular/material/select'; import { AuthService } from '@igo2/auth'; import { ConfirmDialogService, StopPropagationDirective } from '@igo2/common'; import { LanguageService } from '@igo2/core/language'; +import { IgoLanguageModule } from '@igo2/core/language'; import { MessageService } from '@igo2/core/message'; import type { IgoMap } from '@igo2/geo'; @@ -17,7 +18,6 @@ import * as oleasing from 'ol/easing'; import olPoint from 'ol/geom/Point'; import * as olproj from 'ol/proj'; -import { TranslateModule } from '@ngx-translate/core'; import { Subscription } from 'rxjs'; import { take } from 'rxjs/operators'; @@ -38,7 +38,7 @@ import { PoiService } from './shared/poi.service'; MatIconModule, MatDividerModule, NgFor, - TranslateModule + IgoLanguageModule ], providers: [PoiService] }) diff --git a/packages/context/src/lib/context-map-button/poi-button/poi-dialog.component.ts b/packages/context/src/lib/context-map-button/poi-button/poi-dialog.component.ts index 6cad0179a..803c864b1 100644 --- a/packages/context/src/lib/context-map-button/poi-button/poi-dialog.component.ts +++ b/packages/context/src/lib/context-map-button/poi-button/poi-dialog.component.ts @@ -10,7 +10,7 @@ import { import { MatFormFieldModule } from '@angular/material/form-field'; import { MatInputModule } from '@angular/material/input'; -import { TranslateModule } from '@ngx-translate/core'; +import { IgoLanguageModule } from '@igo2/core/language'; @Component({ selector: 'igo-poi-dialog', @@ -24,7 +24,7 @@ import { TranslateModule } from '@ngx-translate/core'; FormsModule, MatDialogActions, MatButtonModule, - TranslateModule + IgoLanguageModule ] }) export class PoiDialogComponent { diff --git a/packages/context/src/lib/context-map-button/user-button/user-button.component.ts b/packages/context/src/lib/context-map-button/user-button/user-button.component.ts index 2ac44479e..3132bd9c3 100644 --- a/packages/context/src/lib/context-map-button/user-button/user-button.component.ts +++ b/packages/context/src/lib/context-map-button/user-button/user-button.component.ts @@ -7,10 +7,9 @@ import { MatTooltipModule } from '@angular/material/tooltip'; import { AuthService } from '@igo2/auth'; import { ConfigService } from '@igo2/core/config'; +import { IgoLanguageModule } from '@igo2/core/language'; import type { IgoMap } from '@igo2/geo'; -import { TranslateModule } from '@ngx-translate/core'; - import { PoiButtonComponent } from '../poi-button/poi-button.component'; import { userButtonSlideInOut } from './user-button.animation'; import { UserDialogComponent } from './user-dialog.component'; @@ -27,7 +26,7 @@ import { UserDialogComponent } from './user-dialog.component'; MatButtonModule, MatTooltipModule, MatIconModule, - TranslateModule + IgoLanguageModule ] }) export class UserButtonComponent { diff --git a/packages/context/src/lib/context-map-button/user-button/user-dialog.component.ts b/packages/context/src/lib/context-map-button/user-button/user-dialog.component.ts index 273a460b2..7f1a2f2f9 100644 --- a/packages/context/src/lib/context-map-button/user-button/user-dialog.component.ts +++ b/packages/context/src/lib/context-map-button/user-button/user-dialog.component.ts @@ -8,10 +8,9 @@ import { } from '@angular/material/dialog'; import { AuthService } from '@igo2/auth'; +import { IgoLanguageModule } from '@igo2/core/language'; import { StorageService } from '@igo2/core/storage'; -import { TranslateModule } from '@ngx-translate/core'; - @Component({ selector: 'igo-user-dialog', templateUrl: './user-dialog.component.html', @@ -21,7 +20,7 @@ import { TranslateModule } from '@ngx-translate/core'; MatDialogContent, MatButtonModule, MatDialogActions, - TranslateModule + IgoLanguageModule ] }) export class UserDialogComponent { diff --git a/packages/context/src/lib/share-map/share-map/share-map-api.component.ts b/packages/context/src/lib/share-map/share-map/share-map-api.component.ts index f6bcc1bbd..c9c3195f2 100644 --- a/packages/context/src/lib/share-map/share-map/share-map-api.component.ts +++ b/packages/context/src/lib/share-map/share-map/share-map-api.component.ts @@ -14,12 +14,11 @@ import { MatTooltipModule } from '@angular/material/tooltip'; import { AuthService } from '@igo2/auth'; import { LanguageService } from '@igo2/core/language'; +import { IgoLanguageModule } from '@igo2/core/language'; import { MessageService } from '@igo2/core/message'; import type { IgoMap } from '@igo2/geo'; import { Clipboard, uuid } from '@igo2/utils'; -import { TranslateModule } from '@ngx-translate/core'; - import { ShareMapService } from '../shared/share-map.service'; @Component({ @@ -36,7 +35,7 @@ import { ShareMapService } from '../shared/share-map.service'; MatButtonModule, MatTooltipModule, MatIconModule, - TranslateModule + IgoLanguageModule ] }) export class ShareMapApiComponent implements OnInit { diff --git a/packages/context/src/lib/share-map/share-map/share-map-url.component.ts b/packages/context/src/lib/share-map/share-map/share-map-url.component.ts index 59a2c9582..aa45b1cfd 100644 --- a/packages/context/src/lib/share-map/share-map/share-map-url.component.ts +++ b/packages/context/src/lib/share-map/share-map/share-map-url.component.ts @@ -13,11 +13,11 @@ import { MatIconModule } from '@angular/material/icon'; import { MatInputModule } from '@angular/material/input'; import { CustomHtmlComponent } from '@igo2/common'; +import { IgoLanguageModule } from '@igo2/core/language'; import { MessageService } from '@igo2/core/message'; import type { IgoMap } from '@igo2/geo'; import { Clipboard } from '@igo2/utils'; -import { TranslateModule } from '@ngx-translate/core'; import { Subscription, combineLatest } from 'rxjs'; import { ShareMapService } from '../shared/share-map.service'; @@ -34,7 +34,7 @@ import { ShareMapService } from '../shared/share-map.service'; MatIconModule, NgIf, CustomHtmlComponent, - TranslateModule + IgoLanguageModule ] }) export class ShareMapUrlComponent implements AfterViewInit, OnInit, OnDestroy { diff --git a/packages/context/src/lib/share-map/share-map/share-map.component.ts b/packages/context/src/lib/share-map/share-map/share-map.component.ts index 63fd252fe..91c480e0c 100644 --- a/packages/context/src/lib/share-map/share-map/share-map.component.ts +++ b/packages/context/src/lib/share-map/share-map/share-map.component.ts @@ -3,10 +3,9 @@ import { Component, Input } from '@angular/core'; import { MatTabsModule } from '@angular/material/tabs'; import { ConfigService } from '@igo2/core/config'; +import { IgoLanguageModule } from '@igo2/core/language'; import type { IgoMap } from '@igo2/geo'; -import { TranslateModule } from '@ngx-translate/core'; - import { ShareMapApiComponent } from './share-map-api.component'; import { ShareMapUrlComponent } from './share-map-url.component'; @@ -20,7 +19,7 @@ import { ShareMapUrlComponent } from './share-map-url.component'; MatTabsModule, ShareMapApiComponent, ShareMapUrlComponent, - TranslateModule + IgoLanguageModule ] }) export class ShareMapComponent { diff --git a/packages/context/src/lib/sidenav/sidenav.component.ts b/packages/context/src/lib/sidenav/sidenav.component.ts index caf8374e8..c40435c88 100644 --- a/packages/context/src/lib/sidenav/sidenav.component.ts +++ b/packages/context/src/lib/sidenav/sidenav.component.ts @@ -13,6 +13,7 @@ import { Tool, getEntityTitle } from '@igo2/common'; +import { IgoLanguageModule } from '@igo2/core/language'; import type { Media } from '@igo2/core/media'; import { Feature, @@ -24,8 +25,6 @@ import type { IgoMap } from '@igo2/geo'; import olFormatGeoJSON from 'ol/format/GeoJSON'; -import { TranslateModule } from '@ngx-translate/core'; - @Component({ selector: 'igo-sidenav', templateUrl: './sidenav.component.html', @@ -40,7 +39,7 @@ import { TranslateModule } from '@ngx-translate/core'; MatTooltipModule, MatIconModule, FeatureDetailsComponent, - TranslateModule + IgoLanguageModule ] }) export class SidenavComponent { diff --git a/packages/core/language/src/shared/language-mock.provider.ts b/packages/core/language/src/shared/language-mock.provider.ts index abe218a7b..62e3bd5a2 100644 --- a/packages/core/language/src/shared/language-mock.provider.ts +++ b/packages/core/language/src/shared/language-mock.provider.ts @@ -1,9 +1,27 @@ -import { ImportProvidersSource, Provider } from '@angular/core'; +import { + EnvironmentProviders, + Provider, + importProvidersFrom, + makeEnvironmentProviders +} from '@angular/core'; -import { TranslateModule } from '@ngx-translate/core'; +import { + TranslateFakeLoader, + TranslateLoader, + TranslateModule +} from '@ngx-translate/core'; -export function provideMockRootTranslation( +export function provideMockTranslation( loader?: Provider -): ImportProvidersSource { - return TranslateModule.forRoot(); +): EnvironmentProviders { + return makeEnvironmentProviders([ + importProvidersFrom( + TranslateModule.forRoot({ + loader: { + provide: TranslateLoader, + useClass: TranslateFakeLoader + } + }) + ) + ]); } diff --git a/packages/core/package.json b/packages/core/package.json index f9ad5ce50..5a894bd0e 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -110,6 +110,8 @@ "@sentry/angular-ivy": "^7.87.0", "ngx-indexed-db": "^11.0.2", "ngx-toastr": "^18.0.0", + "@ngx-translate/core": "^15.0.0", + "@ngx-translate/http-loader": "^8.0.0", "rxjs": "^7.8.0" }, "devDependencies": { diff --git a/packages/geo/src/lib/catalog/catalog-browser/catalog-browser-group.component.ts b/packages/geo/src/lib/catalog/catalog-browser/catalog-browser-group.component.ts index 021d6ca46..54d4b831f 100644 --- a/packages/geo/src/lib/catalog/catalog-browser/catalog-browser-group.component.ts +++ b/packages/geo/src/lib/catalog/catalog-browser/catalog-browser-group.component.ts @@ -19,8 +19,8 @@ import { ListItemDirective } from '@igo2/common'; import type { EntityStateManager } from '@igo2/common'; +import { IgoLanguageModule } from '@igo2/core/language'; -import { TranslateModule } from '@ngx-translate/core'; import { BehaviorSubject } from 'rxjs'; import { IgoMap } from '../../map/shared/map'; @@ -55,7 +55,7 @@ import { CatalogBrowserLayerComponent } from './catalog-browser-layer.component' CatalogBrowserLayerComponent, ListItemDirective, AsyncPipe, - TranslateModule + IgoLanguageModule ] }) export class CatalogBrowserGroupComponent implements OnInit, OnDestroy { diff --git a/packages/geo/src/lib/catalog/catalog-browser/catalog-browser-layer.component.ts b/packages/geo/src/lib/catalog/catalog-browser/catalog-browser-layer.component.ts index 8c327df86..8f54d725a 100644 --- a/packages/geo/src/lib/catalog/catalog-browser/catalog-browser-layer.component.ts +++ b/packages/geo/src/lib/catalog/catalog-browser/catalog-browser-layer.component.ts @@ -19,8 +19,8 @@ import { getEntityIcon, getEntityTitle } from '@igo2/common'; +import { IgoLanguageModule } from '@igo2/core/language'; -import { TranslateModule } from '@ngx-translate/core'; import { BehaviorSubject, Subscription } from 'rxjs'; import { first } from 'rxjs/operators'; @@ -53,7 +53,7 @@ import { AddedChangeEmitter, CatalogItemLayer } from '../shared'; IgoBadgeIconDirective, LayerLegendComponent, AsyncPipe, - TranslateModule + IgoLanguageModule ] }) export class CatalogBrowserLayerComponent implements OnInit, OnDestroy { diff --git a/packages/geo/src/lib/catalog/catalog-library/add-catalog-dialog.component.ts b/packages/geo/src/lib/catalog/catalog-library/add-catalog-dialog.component.ts index 8cfeeba7f..c0c31597b 100644 --- a/packages/geo/src/lib/catalog/catalog-library/add-catalog-dialog.component.ts +++ b/packages/geo/src/lib/catalog/catalog-library/add-catalog-dialog.component.ts @@ -26,8 +26,8 @@ import { MatTooltipModule } from '@angular/material/tooltip'; import { EntityStore } from '@igo2/common'; import { ConfigService } from '@igo2/core/config'; import { LanguageService } from '@igo2/core/language'; +import { IgoLanguageModule } from '@igo2/core/language'; -import { TranslateModule } from '@ngx-translate/core'; import { BehaviorSubject, Subscription } from 'rxjs'; import { TypeCapabilities } from '../../datasource/shared/capabilities.interface'; @@ -55,7 +55,7 @@ import { Catalog } from '../shared/catalog.abstract'; MatDialogActions, MatButtonModule, AsyncPipe, - TranslateModule + IgoLanguageModule ] }) export class AddCatalogDialogComponent implements OnInit, OnDestroy { diff --git a/packages/geo/src/lib/catalog/catalog-library/catalog-library-item.component.ts b/packages/geo/src/lib/catalog/catalog-library/catalog-library-item.component.ts index 16935f462..a1349d5c8 100644 --- a/packages/geo/src/lib/catalog/catalog-library/catalog-library-item.component.ts +++ b/packages/geo/src/lib/catalog/catalog-library/catalog-library-item.component.ts @@ -12,8 +12,7 @@ import { MatListModule } from '@angular/material/list'; import { MatTooltipModule } from '@angular/material/tooltip'; import { getEntityTitle } from '@igo2/common'; - -import { TranslateModule } from '@ngx-translate/core'; +import { IgoLanguageModule } from '@igo2/core/language'; import { IgoMap } from '../../map/shared/map'; import { Catalog } from '../shared/catalog.abstract'; @@ -33,7 +32,7 @@ import { Catalog } from '../shared/catalog.abstract'; MatIconModule, MatTooltipModule, MatButtonModule, - TranslateModule + IgoLanguageModule ] }) export class CatalogLibaryItemComponent { diff --git a/packages/geo/src/lib/catalog/catalog-library/catalog-library.component.ts b/packages/geo/src/lib/catalog/catalog-library/catalog-library.component.ts index f861e6a64..7bcfeb59e 100644 --- a/packages/geo/src/lib/catalog/catalog-library/catalog-library.component.ts +++ b/packages/geo/src/lib/catalog/catalog-library/catalog-library.component.ts @@ -20,11 +20,11 @@ import { ListComponent, ListItemDirective } from '@igo2/common'; +import { IgoLanguageModule } from '@igo2/core/language'; import { MessageService } from '@igo2/core/message'; import { StorageService } from '@igo2/core/storage'; import { ObjectUtils } from '@igo2/utils'; -import { TranslateModule } from '@ngx-translate/core'; import { Observable, Subscription } from 'rxjs'; import { catchError } from 'rxjs/operators'; import { Md5 } from 'ts-md5'; @@ -55,7 +55,7 @@ import { CatalogLibaryItemComponent } from './catalog-library-item.component'; MatTooltipModule, MatIconModule, AsyncPipe, - TranslateModule + IgoLanguageModule ] }) export class CatalogLibaryComponent implements OnInit, OnDestroy { diff --git a/packages/geo/src/lib/directions/directions-buttons/directions-buttons.component.ts b/packages/geo/src/lib/directions/directions-buttons/directions-buttons.component.ts index 385d3d357..37dd58904 100644 --- a/packages/geo/src/lib/directions/directions-buttons/directions-buttons.component.ts +++ b/packages/geo/src/lib/directions/directions-buttons/directions-buttons.component.ts @@ -5,11 +5,11 @@ import { MatIconModule } from '@angular/material/icon'; import { MatTooltipModule } from '@angular/material/tooltip'; import { LanguageService } from '@igo2/core/language'; +import { IgoLanguageModule } from '@igo2/core/language'; import { MessageService } from '@igo2/core/message'; import { RouteService } from '@igo2/core/route'; import { Clipboard } from '@igo2/utils'; -import { TranslateModule } from '@ngx-translate/core'; import { BehaviorSubject, Subject } from 'rxjs'; import { roundCoordTo } from '../../map/shared/map.utils'; @@ -38,7 +38,7 @@ import { MatIconModule, NgIf, AsyncPipe, - TranslateModule + IgoLanguageModule ] }) export class DirectionsButtonsComponent { diff --git a/packages/geo/src/lib/directions/directions-inputs/directions-inputs.component.ts b/packages/geo/src/lib/directions/directions-inputs/directions-inputs.component.ts index 9c56c9182..397abb159 100644 --- a/packages/geo/src/lib/directions/directions-inputs/directions-inputs.component.ts +++ b/packages/geo/src/lib/directions/directions-inputs/directions-inputs.component.ts @@ -26,11 +26,11 @@ import { MatInputModule } from '@angular/material/input'; import { MatTooltipModule } from '@angular/material/tooltip'; import { LanguageService } from '@igo2/core/language'; +import { IgoLanguageModule } from '@igo2/core/language'; import * as olObservable from 'ol/Observable'; import * as olProj from 'ol/proj'; -import { TranslateModule } from '@ngx-translate/core'; import pointOnFeature from '@turf/point-on-feature'; import { Feature } from '../../feature/shared/feature.interfaces'; @@ -65,7 +65,7 @@ import { StopsFeatureStore, StopsStore } from '../shared/store'; MatOptionModule, CdkDragHandle, AsyncPipe, - TranslateModule + IgoLanguageModule ] }) export class DirectionsInputsComponent implements OnDestroy { diff --git a/packages/geo/src/lib/directions/directions-results/directions-results.component.ts b/packages/geo/src/lib/directions/directions-results/directions-results.component.ts index da0e3163d..74c6ffb5d 100644 --- a/packages/geo/src/lib/directions/directions-results/directions-results.component.ts +++ b/packages/geo/src/lib/directions/directions-results/directions-results.component.ts @@ -15,12 +15,12 @@ import { MatListModule } from '@angular/material/list'; import { MatSelectModule } from '@angular/material/select'; import { LanguageService } from '@igo2/core/language'; +import { IgoLanguageModule } from '@igo2/core/language'; import olFeature from 'ol/Feature'; import OlGeoJSON from 'ol/format/GeoJSON'; import * as olGeom from 'ol/geom'; -import { TranslateModule } from '@ngx-translate/core'; import { Subscription } from 'rxjs'; import { debounceTime } from 'rxjs/operators'; @@ -55,7 +55,7 @@ import { RoutesFeatureStore, StepFeatureStore } from '../shared/store'; MatListModule, MatIconModule, NgClass, - TranslateModule + IgoLanguageModule ] }) export class DirectionsResultsComponent implements OnInit, OnDestroy { diff --git a/packages/geo/src/lib/directions/directions.component.ts b/packages/geo/src/lib/directions/directions.component.ts index e395d3cb9..105b20f3e 100644 --- a/packages/geo/src/lib/directions/directions.component.ts +++ b/packages/geo/src/lib/directions/directions.component.ts @@ -9,6 +9,7 @@ import { MatSlideToggleModule } from '@angular/material/slide-toggle'; import { EntityStoreWatcher } from '@igo2/common'; import { LanguageService } from '@igo2/core/language'; +import { IgoLanguageModule } from '@igo2/core/language'; import { ChangeUtils, ObjectUtils } from '@igo2/utils'; import Collection from 'ol/Collection'; @@ -18,7 +19,6 @@ import { SelectEvent } from 'ol/interaction/Select'; import { TranslateEvent } from 'ol/interaction/Translate'; import * as olProj from 'ol/proj'; -import { TranslateModule } from '@ngx-translate/core'; import { Subject, Subscription } from 'rxjs'; import { debounceTime, distinctUntilChanged, map } from 'rxjs/operators'; @@ -64,7 +64,7 @@ import { DirectionsButtonsComponent, DirectionsInputsComponent, DirectionsResultsComponent, - TranslateModule + IgoLanguageModule ] }) export class DirectionsComponent implements OnInit, OnDestroy { diff --git a/packages/geo/src/lib/download/download-button/download-button.component.ts b/packages/geo/src/lib/download/download-button/download-button.component.ts index 22f7e9ab4..5a123a905 100644 --- a/packages/geo/src/lib/download/download-button/download-button.component.ts +++ b/packages/geo/src/lib/download/download-button/download-button.component.ts @@ -4,7 +4,7 @@ import { MatButtonModule } from '@angular/material/button'; import { MatIconModule } from '@angular/material/icon'; import { MatTooltipModule } from '@angular/material/tooltip'; -import { TranslateModule } from '@ngx-translate/core'; +import { IgoLanguageModule } from '@igo2/core/language'; import { Layer } from '../../layer/shared/layers/layer'; import { DownloadDataSourceOptions } from '../shared/download.interface'; @@ -21,7 +21,7 @@ import { DownloadService } from '../shared/download.service'; MatButtonModule, MatTooltipModule, MatIconModule, - TranslateModule + IgoLanguageModule ] }) export class DownloadButtonComponent { diff --git a/packages/geo/src/lib/draw/draw/draw-layer-popup.component.ts b/packages/geo/src/lib/draw/draw/draw-layer-popup.component.ts index 1b1d77e46..0f8ab12fb 100644 --- a/packages/geo/src/lib/draw/draw/draw-layer-popup.component.ts +++ b/packages/geo/src/lib/draw/draw/draw-layer-popup.component.ts @@ -8,7 +8,7 @@ import { import { MatFormFieldModule } from '@angular/material/form-field'; import { MatInputModule } from '@angular/material/input'; -import { TranslateModule } from '@ngx-translate/core'; +import { IgoLanguageModule } from '@igo2/core/language'; export interface DialogData { label: string; @@ -25,7 +25,7 @@ export interface DialogData { MatInputModule, MatDialogActions, MatButtonModule, - TranslateModule + IgoLanguageModule ] }) export class DrawLayerPopupComponent { diff --git a/packages/geo/src/lib/draw/draw/draw-popup.component.ts b/packages/geo/src/lib/draw/draw/draw-popup.component.ts index 3e9b413e5..26ddcd04b 100644 --- a/packages/geo/src/lib/draw/draw/draw-popup.component.ts +++ b/packages/geo/src/lib/draw/draw/draw-popup.component.ts @@ -17,6 +17,7 @@ import { MatRadioModule } from '@angular/material/radio'; import { MatSelectModule } from '@angular/material/select'; import { LanguageService } from '@igo2/core/language'; +import { IgoLanguageModule } from '@igo2/core/language'; import OlFeature from 'ol/Feature'; import Circle from 'ol/geom/Circle'; @@ -24,8 +25,6 @@ import { fromCircle } from 'ol/geom/Polygon'; import { transform } from 'ol/proj'; import { getLength } from 'ol/sphere'; -import { TranslateModule } from '@ngx-translate/core'; - import { IgoMap, roundCoordTo } from '../../map/shared'; import { MeasureAreaUnit, @@ -61,7 +60,7 @@ import { DDtoDMS } from '../shared/draw.utils'; MatOptionModule, MatDialogActions, MatButtonModule, - TranslateModule + IgoLanguageModule ] }) export class DrawPopupComponent { diff --git a/packages/geo/src/lib/draw/draw/draw-shorcuts.component.ts b/packages/geo/src/lib/draw/draw/draw-shorcuts.component.ts index 732a8cdce..e6965827e 100644 --- a/packages/geo/src/lib/draw/draw/draw-shorcuts.component.ts +++ b/packages/geo/src/lib/draw/draw/draw-shorcuts.component.ts @@ -8,8 +8,7 @@ import { import { MatIconModule } from '@angular/material/icon'; import { IconSvg, IgoIconComponent, KEYBOARD_ESC_ICON } from '@igo2/common'; - -import { TranslateModule } from '@ngx-translate/core'; +import { IgoLanguageModule } from '@igo2/core/language'; @Component({ selector: 'igo-draw-shorcuts', @@ -22,7 +21,7 @@ import { TranslateModule } from '@ngx-translate/core'; MatDialogActions, MatButtonModule, MatDialogClose, - TranslateModule, + IgoLanguageModule, IgoIconComponent ] }) diff --git a/packages/geo/src/lib/draw/draw/draw.component.ts b/packages/geo/src/lib/draw/draw/draw.component.ts index 3ab0aee99..f1b6f86c3 100644 --- a/packages/geo/src/lib/draw/draw/draw.component.ts +++ b/packages/geo/src/lib/draw/draw/draw.component.ts @@ -44,6 +44,7 @@ import { EntityTableTemplate } from '@igo2/common'; import { LanguageService } from '@igo2/core/language'; +import { IgoLanguageModule } from '@igo2/core/language'; import OlFeature from 'ol/Feature'; import OlOverlay from 'ol/Overlay'; @@ -60,7 +61,6 @@ import OlVectorSource from 'ol/source/Vector'; import { getDistance, getLength } from 'ol/sphere'; import * as OlStyle from 'ol/style'; -import { TranslateModule } from '@ngx-translate/core'; import { BehaviorSubject, Subscription } from 'rxjs'; import { first, skip } from 'rxjs/operators'; @@ -146,7 +146,7 @@ import { DrawShorcutsComponent } from './draw-shorcuts.component'; EntityTableComponent, MatBadgeModule, AsyncPipe, - TranslateModule + IgoLanguageModule ] }) export class DrawComponent implements OnInit, OnDestroy { diff --git a/packages/geo/src/lib/feature/feature-details/feature-details.component.ts b/packages/geo/src/lib/feature/feature-details/feature-details.component.ts index fb4b5363f..6785b422f 100644 --- a/packages/geo/src/lib/feature/feature-details/feature-details.component.ts +++ b/packages/geo/src/lib/feature/feature-details/feature-details.component.ts @@ -28,11 +28,11 @@ import { } from '@igo2/common'; import type { Toolbox } from '@igo2/common'; import { ConfigService } from '@igo2/core/config'; +import { IgoLanguageModule } from '@igo2/core/language'; import { MessageService } from '@igo2/core/message'; import { ConnectionState, NetworkService } from '@igo2/core/network'; import { Clipboard } from '@igo2/utils'; -import { TranslateModule } from '@ngx-translate/core'; import { Subject } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; @@ -55,7 +55,7 @@ import { Feature } from '../shared'; AsyncPipe, JsonPipe, KeyValuePipe, - TranslateModule, + IgoLanguageModule, SecureImagePipe ] }) diff --git a/packages/geo/src/lib/filter/ogc-filter-button/ogc-filter-button.component.ts b/packages/geo/src/lib/filter/ogc-filter-button/ogc-filter-button.component.ts index 31b2967b6..498a3c62d 100644 --- a/packages/geo/src/lib/filter/ogc-filter-button/ogc-filter-button.component.ts +++ b/packages/geo/src/lib/filter/ogc-filter-button/ogc-filter-button.component.ts @@ -11,8 +11,7 @@ import { MatIconModule } from '@angular/material/icon'; import { MatTooltipModule } from '@angular/material/tooltip'; import { ListItemDirective } from '@igo2/common'; - -import { TranslateModule } from '@ngx-translate/core'; +import { IgoLanguageModule } from '@igo2/core/language'; import { Layer } from '../../layer/shared/layers/layer'; import { MapBase } from '../../map'; @@ -36,7 +35,7 @@ import { MatBadgeModule, OgcFilterableItemComponent, ListItemDirective, - TranslateModule + IgoLanguageModule ] }) export class OgcFilterButtonComponent implements OnInit { diff --git a/packages/geo/src/lib/filter/ogc-filter-form/ogc-filter-form.component.ts b/packages/geo/src/lib/filter/ogc-filter-form/ogc-filter-form.component.ts index ae7b8114b..9b2807749 100644 --- a/packages/geo/src/lib/filter/ogc-filter-form/ogc-filter-form.component.ts +++ b/packages/geo/src/lib/filter/ogc-filter-form/ogc-filter-form.component.ts @@ -13,7 +13,8 @@ import { MatInputModule } from '@angular/material/input'; import { MatSelectModule } from '@angular/material/select'; import { MatTooltipModule } from '@angular/material/tooltip'; -import { TranslateModule } from '@ngx-translate/core'; +import { IgoLanguageModule } from '@igo2/core/language'; + import { BehaviorSubject, Observable, of } from 'rxjs'; import { SourceFieldsOptionsParams } from '../../datasource/shared/datasources/datasource.interface'; @@ -48,7 +49,7 @@ import { OgcFilterTimeComponent } from '../ogc-filter-time/ogc-filter-time.compo OgcFilterTimeComponent, AsyncPipe, KeyValuePipe, - TranslateModule + IgoLanguageModule ] }) export class OgcFilterFormComponent implements OnInit { diff --git a/packages/geo/src/lib/filter/ogc-filter-selection/ogc-filter-selection.component.ts b/packages/geo/src/lib/filter/ogc-filter-selection/ogc-filter-selection.component.ts index ebbac14b4..2218a9add 100644 --- a/packages/geo/src/lib/filter/ogc-filter-selection/ogc-filter-selection.component.ts +++ b/packages/geo/src/lib/filter/ogc-filter-selection/ogc-filter-selection.component.ts @@ -27,8 +27,8 @@ import { MatTooltipModule } from '@angular/material/tooltip'; import { DOMOptions, DOMService, DOMValue } from '@igo2/common'; import { ConfigService } from '@igo2/core/config'; +import { IgoLanguageModule } from '@igo2/core/language'; -import { TranslateModule } from '@ngx-translate/core'; import { BehaviorSubject, Observable } from 'rxjs'; import { debounceTime, map } from 'rxjs/operators'; @@ -71,7 +71,7 @@ import { OGCFilterService } from '../shared/ogc-filter.service'; MatAutocompleteModule, OgcFilterTimeComponent, AsyncPipe, - TranslateModule + IgoLanguageModule ] }) export class OgcFilterSelectionComponent implements OnInit { diff --git a/packages/geo/src/lib/filter/ogc-filter-time/ogc-filter-time.component.ts b/packages/geo/src/lib/filter/ogc-filter-time/ogc-filter-time.component.ts index 04eb3dedc..9f8532ec0 100644 --- a/packages/geo/src/lib/filter/ogc-filter-time/ogc-filter-time.component.ts +++ b/packages/geo/src/lib/filter/ogc-filter-time/ogc-filter-time.component.ts @@ -24,7 +24,8 @@ import { MatSelectModule } from '@angular/material/select'; import { MatSlideToggleModule } from '@angular/material/slide-toggle'; import { MatTooltipModule } from '@angular/material/tooltip'; -import { TranslateModule } from '@ngx-translate/core'; +import { IgoLanguageModule } from '@igo2/core/language'; + import { default as moment } from 'moment'; import { OgcFilterOperator } from '../../filter/shared/ogc-filter.enum'; @@ -56,7 +57,7 @@ import { OgcFilterTimeSliderComponent } from './ogc-filter-time-slider.component ReactiveFormsModule, NgFor, MatOptionModule, - TranslateModule + IgoLanguageModule ], providers: [OGCFilterTimeService, provideMomentDateAdapter()] }) diff --git a/packages/geo/src/lib/filter/ogc-filterable-item/ogc-filterable-item.component.ts b/packages/geo/src/lib/filter/ogc-filterable-item/ogc-filterable-item.component.ts index ff2bd9f34..a0a74f5bd 100644 --- a/packages/geo/src/lib/filter/ogc-filterable-item/ogc-filterable-item.component.ts +++ b/packages/geo/src/lib/filter/ogc-filterable-item/ogc-filterable-item.component.ts @@ -9,8 +9,8 @@ import { MatListModule } from '@angular/material/list'; import { MatTooltipModule } from '@angular/material/tooltip'; import { CollapseDirective } from '@igo2/common'; +import { IgoLanguageModule } from '@igo2/core/language'; -import { TranslateModule } from '@ngx-translate/core'; import { BehaviorSubject, Subscription } from 'rxjs'; import { WFSDataSourceOptionsParams } from '../../datasource/shared/datasources/wfs-datasource.interface'; @@ -48,7 +48,7 @@ import { OGCFilterService } from '../shared/ogc-filter.service'; MatCheckboxModule, FormsModule, AsyncPipe, - TranslateModule + IgoLanguageModule ], providers: [OGCFilterService] }) diff --git a/packages/geo/src/lib/filter/ogc-filterable-list/ogc-filterable-list.component.ts b/packages/geo/src/lib/filter/ogc-filterable-list/ogc-filterable-list.component.ts index 040d3937b..57f8c164b 100644 --- a/packages/geo/src/lib/filter/ogc-filterable-list/ogc-filterable-list.component.ts +++ b/packages/geo/src/lib/filter/ogc-filterable-list/ogc-filterable-list.component.ts @@ -2,8 +2,7 @@ import { NgFor, NgIf } from '@angular/common'; import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; import { ListComponent, ListItemDirective } from '@igo2/common'; - -import { TranslateModule } from '@ngx-translate/core'; +import { IgoLanguageModule } from '@igo2/core/language'; import { Layer } from '../../layer/shared/layers/layer'; import { MapBase } from '../../map/shared/map.abstract'; @@ -22,7 +21,7 @@ import { FilterableDataSourcePipe } from '../shared/filterable-datasource.pipe'; NgFor, OgcFilterableItemComponent, ListItemDirective, - TranslateModule, + IgoLanguageModule, FilterableDataSourcePipe ] }) diff --git a/packages/geo/src/lib/filter/spatial-filter/spatial-filter-item/spatial-filter-item.component.ts b/packages/geo/src/lib/filter/spatial-filter/spatial-filter-item/spatial-filter-item.component.ts index c4370a4dc..84fd9a715 100644 --- a/packages/geo/src/lib/filter/spatial-filter/spatial-filter-item/spatial-filter-item.component.ts +++ b/packages/geo/src/lib/filter/spatial-filter/spatial-filter-item/spatial-filter-item.component.ts @@ -37,6 +37,7 @@ import { EntityTableTemplate } from '@igo2/common'; import { LanguageService } from '@igo2/core/language'; +import { IgoLanguageModule } from '@igo2/core/language'; import { MessageService } from '@igo2/core/message'; import OlFeature from 'ol/Feature'; @@ -45,7 +46,6 @@ import OlPoint from 'ol/geom/Point'; import * as olproj from 'ol/proj'; import * as olStyle from 'ol/style'; -import { TranslateModule } from '@ngx-translate/core'; import { BehaviorSubject, Subscription } from 'rxjs'; import { debounceTime } from 'rxjs/operators'; @@ -95,7 +95,7 @@ import { SpatialFilterThematic } from './../../shared/spatial-filter.interface'; MatTooltipModule, EntityTableComponent, AsyncPipe, - TranslateModule + IgoLanguageModule ] }) export class SpatialFilterItemComponent implements OnDestroy, OnInit { diff --git a/packages/geo/src/lib/filter/spatial-filter/spatial-filter-list/spatial-filter-list.component.ts b/packages/geo/src/lib/filter/spatial-filter/spatial-filter-list/spatial-filter-list.component.ts index 53b2b756c..fb79da882 100644 --- a/packages/geo/src/lib/filter/spatial-filter/spatial-filter-list/spatial-filter-list.component.ts +++ b/packages/geo/src/lib/filter/spatial-filter/spatial-filter-list/spatial-filter-list.component.ts @@ -20,9 +20,9 @@ import { MatInputModule } from '@angular/material/input'; import { MatSelectModule } from '@angular/material/select'; import { EntityStore } from '@igo2/common'; +import { IgoLanguageModule } from '@igo2/core/language'; import { MessageService } from '@igo2/core/message'; -import { TranslateModule } from '@ngx-translate/core'; import { Subscription } from 'rxjs'; import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; @@ -51,7 +51,7 @@ import { SpatialFilterService } from './../../shared/spatial-filter.service'; MatOptionModule, MatSelectModule, AsyncPipe, - TranslateModule + IgoLanguageModule ] }) export class SpatialFilterListComponent implements OnInit, OnDestroy { diff --git a/packages/geo/src/lib/filter/spatial-filter/spatial-filter-type/spatial-filter-type.component.ts b/packages/geo/src/lib/filter/spatial-filter/spatial-filter-type/spatial-filter-type.component.ts index 115624c27..32f4e9b16 100644 --- a/packages/geo/src/lib/filter/spatial-filter/spatial-filter-type/spatial-filter-type.component.ts +++ b/packages/geo/src/lib/filter/spatial-filter/spatial-filter-type/spatial-filter-type.component.ts @@ -17,8 +17,7 @@ import { MatTabsModule } from '@angular/material/tabs'; import { MatTooltipModule } from '@angular/material/tooltip'; import { EntityStore } from '@igo2/common'; - -import { TranslateModule } from '@ngx-translate/core'; +import { IgoLanguageModule } from '@igo2/core/language'; import { Feature } from '../../../feature'; import { Layer } from '../../../layer'; @@ -48,7 +47,7 @@ import { SpatialFilterListComponent } from '../spatial-filter-list/spatial-filte MatButtonToggleModule, MatTooltipModule, MatIconModule, - TranslateModule + IgoLanguageModule ] }) export class SpatialFilterTypeComponent implements OnInit { diff --git a/packages/geo/src/lib/filter/time-filter-button/time-filter-button.component.ts b/packages/geo/src/lib/filter/time-filter-button/time-filter-button.component.ts index d47f8f9d2..d5badba04 100644 --- a/packages/geo/src/lib/filter/time-filter-button/time-filter-button.component.ts +++ b/packages/geo/src/lib/filter/time-filter-button/time-filter-button.component.ts @@ -11,8 +11,7 @@ import { MatIconModule } from '@angular/material/icon'; import { MatTooltipModule } from '@angular/material/tooltip'; import { ListItemDirective } from '@igo2/common'; - -import { TranslateModule } from '@ngx-translate/core'; +import { IgoLanguageModule } from '@igo2/core/language'; import { TimeFilterableDataSourceOptions } from '../../datasource/shared/datasources/wms-datasource.interface'; import { WMSDataSourceOptions } from '../../datasource/shared/datasources/wms-datasource.interface'; @@ -34,7 +33,7 @@ import { TimeFilterItemComponent } from '../time-filter-item/time-filter-item.co MatBadgeModule, TimeFilterItemComponent, ListItemDirective, - TranslateModule + IgoLanguageModule ] }) export class TimeFilterButtonComponent implements OnInit { diff --git a/packages/geo/src/lib/filter/time-filter-form/time-filter-form.component.ts b/packages/geo/src/lib/filter/time-filter-form/time-filter-form.component.ts index 8d3107ca3..9403c9d8f 100644 --- a/packages/geo/src/lib/filter/time-filter-form/time-filter-form.component.ts +++ b/packages/geo/src/lib/filter/time-filter-form/time-filter-form.component.ts @@ -23,10 +23,11 @@ import { MatSlideToggleModule } from '@angular/material/slide-toggle'; import { MatSlider, MatSliderModule } from '@angular/material/slider'; import { MatTooltipModule } from '@angular/material/tooltip'; +import { IgoLanguageModule } from '@igo2/core/language'; + import olSourceImageWMS from 'ol/source/ImageWMS'; import { MatDatetimepickerModule } from '@mat-datetimepicker/core'; -import { TranslateModule } from '@ngx-translate/core'; import { default as moment } from 'moment'; import { Layer } from '../../layer/shared/layers/layer'; @@ -53,7 +54,7 @@ import { TimeFilterOptions } from '../shared/time-filter.interface'; MatTooltipModule, MatButtonModule, MatIconModule, - TranslateModule + IgoLanguageModule ] }) export class TimeFilterFormComponent implements OnInit { diff --git a/packages/geo/src/lib/filter/time-filter-item/time-filter-item.component.ts b/packages/geo/src/lib/filter/time-filter-item/time-filter-item.component.ts index 443f1119c..69074288b 100644 --- a/packages/geo/src/lib/filter/time-filter-item/time-filter-item.component.ts +++ b/packages/geo/src/lib/filter/time-filter-item/time-filter-item.component.ts @@ -6,8 +6,8 @@ import { MatListModule } from '@angular/material/list'; import { MatTooltipModule } from '@angular/material/tooltip'; import { CollapseDirective } from '@igo2/common'; +import { IgoLanguageModule } from '@igo2/core/language'; -import { TranslateModule } from '@ngx-translate/core'; import { BehaviorSubject, Subscription } from 'rxjs'; import { TimeFilterableDataSource } from '../../datasource/shared/datasources/wms-datasource'; @@ -33,7 +33,7 @@ import { TimeFilterFormComponent } from '../time-filter-form/time-filter-form.co LayerLegendComponent, TimeFilterFormComponent, AsyncPipe, - TranslateModule + IgoLanguageModule ], providers: [TimeFilterService] }) diff --git a/packages/geo/src/lib/geometry/geometry-form-field/geometry-form-field.component.ts b/packages/geo/src/lib/geometry/geometry-form-field/geometry-form-field.component.ts index e1acacc9c..8948ae757 100644 --- a/packages/geo/src/lib/geometry/geometry-form-field/geometry-form-field.component.ts +++ b/packages/geo/src/lib/geometry/geometry-form-field/geometry-form-field.component.ts @@ -18,11 +18,11 @@ import { MatIconModule } from '@angular/material/icon'; import { MatInputModule } from '@angular/material/input'; import { IgoFormFieldComponent } from '@igo2/common'; +import { IgoLanguageModule } from '@igo2/core/language'; import type { Type } from 'ol/geom/Geometry'; import { StyleLike as OlStyleLike } from 'ol/style/Style'; -import { TranslateModule } from '@ngx-translate/core'; import { BehaviorSubject, Subscription } from 'rxjs'; import { IgoMap } from '../../map/shared/map'; @@ -50,7 +50,7 @@ import { GeometryFormFieldInputComponent } from './geometry-form-field-input.com MatInputModule, MatIconModule, AsyncPipe, - TranslateModule + IgoLanguageModule ] }) export class GeometryFormFieldComponent implements OnInit, OnDestroy { diff --git a/packages/geo/src/lib/import-export/export-button/export-button.component.ts b/packages/geo/src/lib/import-export/export-button/export-button.component.ts index 20f076eb5..acf2d66ca 100644 --- a/packages/geo/src/lib/import-export/export-button/export-button.component.ts +++ b/packages/geo/src/lib/import-export/export-button/export-button.component.ts @@ -4,7 +4,7 @@ import { MatButtonModule } from '@angular/material/button'; import { MatIconModule } from '@angular/material/icon'; import { MatTooltipModule } from '@angular/material/tooltip'; -import { TranslateModule } from '@ngx-translate/core'; +import { IgoLanguageModule } from '@igo2/core/language'; import { DataSourceOptions } from '../../datasource/shared/datasources'; import { VectorLayer } from '../../layer/shared'; @@ -21,7 +21,7 @@ import { Layer } from '../../layer/shared/layers/layer'; MatButtonModule, MatTooltipModule, MatIconModule, - TranslateModule + IgoLanguageModule ] }) export class ExportButtonComponent { diff --git a/packages/geo/src/lib/import-export/import-export/import-export.component.ts b/packages/geo/src/lib/import-export/import-export/import-export.component.ts index fdb521697..021e3b48a 100644 --- a/packages/geo/src/lib/import-export/import-export/import-export.component.ts +++ b/packages/geo/src/lib/import-export/import-export/import-export.component.ts @@ -37,6 +37,7 @@ import { import type { WorkspaceStore } from '@igo2/common'; import { ConfigService } from '@igo2/core/config'; import { LanguageService } from '@igo2/core/language'; +import { IgoLanguageModule } from '@igo2/core/language'; import { MessageService } from '@igo2/core/message'; import { StorageService } from '@igo2/core/storage'; import { strEnum } from '@igo2/utils'; @@ -46,7 +47,6 @@ import { circular } from 'ol/geom/Polygon'; import olClusterSource from 'ol/source/Cluster'; import olVectorSource from 'ol/source/Vector'; -import { TranslateModule } from '@ngx-translate/core'; import { BehaviorSubject, Subscription } from 'rxjs'; import { skipWhile } from 'rxjs/operators'; @@ -103,7 +103,7 @@ import { MatInputModule, AsyncPipe, KeyValuePipe, - TranslateModule + IgoLanguageModule ], providers: [ConfirmDialogService] }) diff --git a/packages/geo/src/lib/layer/layer-item/layer-item.component.ts b/packages/geo/src/lib/layer/layer-item/layer-item.component.ts index ab19e68e0..d8ea315bf 100644 --- a/packages/geo/src/lib/layer/layer-item/layer-item.component.ts +++ b/packages/geo/src/lib/layer/layer-item/layer-item.component.ts @@ -18,9 +18,9 @@ import { MatIconModule } from '@angular/material/icon'; import { MatListModule } from '@angular/material/list'; import { MatTooltipModule } from '@angular/material/tooltip'; +import { IgoLanguageModule } from '@igo2/core/language'; import { ConnectionState, NetworkService } from '@igo2/core/network'; -import { TranslateModule } from '@ngx-translate/core'; import { BehaviorSubject, Subscription } from 'rxjs'; import { MetadataLayerOptions } from '../../metadata/shared/metadata.interface'; @@ -46,7 +46,7 @@ import { TooltipType } from '../shared/layers/layer.interface'; NgClass, LayerLegendComponent, AsyncPipe, - TranslateModule + IgoLanguageModule ] }) export class LayerItemComponent implements OnInit, OnDestroy { diff --git a/packages/geo/src/lib/layer/layer-legend-list/layer-legend-list.component.ts b/packages/geo/src/lib/layer/layer-legend-list/layer-legend-list.component.ts index 23e6d42eb..851a394d4 100644 --- a/packages/geo/src/lib/layer/layer-legend-list/layer-legend-list.component.ts +++ b/packages/geo/src/lib/layer/layer-legend-list/layer-legend-list.component.ts @@ -13,8 +13,8 @@ import { MatSlideToggleModule } from '@angular/material/slide-toggle'; import { MatTooltipModule } from '@angular/material/tooltip'; import { ListComponent, ListItemDirective } from '@igo2/common'; +import { IgoLanguageModule } from '@igo2/core/language'; -import { TranslateModule } from '@ngx-translate/core'; import { BehaviorSubject, EMPTY, @@ -43,7 +43,7 @@ import { Layer } from '../shared/layers/layer'; LayerLegendItemComponent, ListItemDirective, AsyncPipe, - TranslateModule + IgoLanguageModule ] }) export class LayerLegendListComponent implements OnInit, OnDestroy { diff --git a/packages/geo/src/lib/layer/layer-legend/layer-legend.component.ts b/packages/geo/src/lib/layer/layer-legend/layer-legend.component.ts index c17aa635c..be3ca4072 100644 --- a/packages/geo/src/lib/layer/layer-legend/layer-legend.component.ts +++ b/packages/geo/src/lib/layer/layer-legend/layer-legend.component.ts @@ -27,8 +27,8 @@ import { } from '@igo2/common'; import { ConfigService } from '@igo2/core/config'; import { LanguageService } from '@igo2/core/language'; +import { IgoLanguageModule } from '@igo2/core/language'; -import { TranslateModule } from '@ngx-translate/core'; import { BehaviorSubject, Observable, Subscription, of } from 'rxjs'; import { catchError, map } from 'rxjs/operators'; @@ -63,7 +63,7 @@ import { ImageErrorDirective, NgStyle, AsyncPipe, - TranslateModule, + IgoLanguageModule, SanitizeHtmlPipe ] }) diff --git a/packages/geo/src/lib/layer/layer-list-tool/layer-list-tool.component.ts b/packages/geo/src/lib/layer/layer-list-tool/layer-list-tool.component.ts index 45695183a..0564dd1f7 100644 --- a/packages/geo/src/lib/layer/layer-list-tool/layer-list-tool.component.ts +++ b/packages/geo/src/lib/layer/layer-list-tool/layer-list-tool.component.ts @@ -20,8 +20,8 @@ import { MatInputModule } from '@angular/material/input'; import { MatTooltipModule } from '@angular/material/tooltip'; import { IgoBadgeIconDirective } from '@igo2/common'; +import { IgoLanguageModule } from '@igo2/core/language'; -import { TranslateModule } from '@ngx-translate/core'; import { BehaviorSubject, Subscription } from 'rxjs'; import { LayerListControlsOptions } from './layer-list-tool.interface'; @@ -42,7 +42,7 @@ import { LayerListControlsOptions } from './layer-list-tool.interface'; MatIconModule, MatBadgeModule, IgoBadgeIconDirective, - TranslateModule + IgoLanguageModule ] }) export class LayerListToolComponent implements OnInit, OnDestroy { diff --git a/packages/geo/src/lib/layer/layer-list/layer-list.component.ts b/packages/geo/src/lib/layer/layer-list/layer-list.component.ts index 2a822f9f8..2f554fcbf 100644 --- a/packages/geo/src/lib/layer/layer-list/layer-list.component.ts +++ b/packages/geo/src/lib/layer/layer-list/layer-list.component.ts @@ -30,10 +30,10 @@ import { MAGNIFY_SCAN_ICON, PanelComponent } from '@igo2/common'; +import { IgoLanguageModule } from '@igo2/core/language'; import * as olextent from 'ol/extent'; -import { TranslateModule } from '@ngx-translate/core'; import { BehaviorSubject, EMPTY, @@ -90,7 +90,7 @@ import { LayerListSelectVisibleEnum } from './layer-list.enum'; NgTemplateOutlet, FormsModule, AsyncPipe, - TranslateModule + IgoLanguageModule ] }) export class LayerListComponent implements OnInit, OnDestroy { diff --git a/packages/geo/src/lib/layer/track-feature-button/track-feature-button.component.ts b/packages/geo/src/lib/layer/track-feature-button/track-feature-button.component.ts index 25b17ac19..70bf2bc1b 100644 --- a/packages/geo/src/lib/layer/track-feature-button/track-feature-button.component.ts +++ b/packages/geo/src/lib/layer/track-feature-button/track-feature-button.component.ts @@ -9,7 +9,7 @@ import { MatButtonModule } from '@angular/material/button'; import { MatIconModule } from '@angular/material/icon'; import { MatTooltipModule } from '@angular/material/tooltip'; -import { TranslateModule } from '@ngx-translate/core'; +import { IgoLanguageModule } from '@igo2/core/language'; import { VectorLayer } from '../shared/layers/vector-layer'; import { VectorLayerOptions } from '../shared/layers/vector-layer.interface'; @@ -25,7 +25,7 @@ import { VectorLayerOptions } from '../shared/layers/vector-layer.interface'; MatButtonModule, MatTooltipModule, MatIconModule, - TranslateModule + IgoLanguageModule ] }) export class TrackFeatureButtonComponent implements OnInit { diff --git a/packages/geo/src/lib/map/baselayers-switcher/baselayers-switcher.component.ts b/packages/geo/src/lib/map/baselayers-switcher/baselayers-switcher.component.ts index 02e31c225..701cc5092 100644 --- a/packages/geo/src/lib/map/baselayers-switcher/baselayers-switcher.component.ts +++ b/packages/geo/src/lib/map/baselayers-switcher/baselayers-switcher.component.ts @@ -4,9 +4,9 @@ import { MatButtonModule } from '@angular/material/button'; import { MatIconModule } from '@angular/material/icon'; import { MatTooltipModule } from '@angular/material/tooltip'; +import { IgoLanguageModule } from '@igo2/core/language'; import { Media, MediaService } from '@igo2/core/media'; -import { TranslateModule } from '@ngx-translate/core'; import { Subscription } from 'rxjs'; import { Layer } from '../../layer/shared'; @@ -28,7 +28,7 @@ import { MiniBaseMapComponent } from './mini-basemap.component'; MatIconModule, NgFor, MiniBaseMapComponent, - TranslateModule + IgoLanguageModule ] }) export class BaseLayersSwitcherComponent implements AfterViewInit, OnDestroy { diff --git a/packages/geo/src/lib/map/geolocate-button/geolocate-button.component.ts b/packages/geo/src/lib/map/geolocate-button/geolocate-button.component.ts index be108da42..322229fa0 100644 --- a/packages/geo/src/lib/map/geolocate-button/geolocate-button.component.ts +++ b/packages/geo/src/lib/map/geolocate-button/geolocate-button.component.ts @@ -5,8 +5,8 @@ import { MatIconModule } from '@angular/material/icon'; import { MatTooltipModule } from '@angular/material/tooltip'; import { ConfigService } from '@igo2/core/config'; +import { IgoLanguageModule } from '@igo2/core/language'; -import { TranslateModule } from '@ngx-translate/core'; import { BehaviorSubject, Subscription } from 'rxjs'; import { IgoMap } from '../shared/map'; @@ -22,7 +22,7 @@ import { IgoMap } from '../shared/map'; MatTooltipModule, MatIconModule, AsyncPipe, - TranslateModule + IgoLanguageModule ] }) export class GeolocateButtonComponent implements AfterContentInit, OnDestroy { diff --git a/packages/geo/src/lib/map/home-extent-button/home-extent-button.component.ts b/packages/geo/src/lib/map/home-extent-button/home-extent-button.component.ts index e61211938..f431851f7 100644 --- a/packages/geo/src/lib/map/home-extent-button/home-extent-button.component.ts +++ b/packages/geo/src/lib/map/home-extent-button/home-extent-button.component.ts @@ -4,11 +4,10 @@ import { MatIconModule } from '@angular/material/icon'; import { MatTooltipModule } from '@angular/material/tooltip'; import { ConfigService } from '@igo2/core/config'; +import { IgoLanguageModule } from '@igo2/core/language'; import * as olproj from 'ol/proj'; -import { TranslateModule } from '@ngx-translate/core'; - import { IgoMap } from '../shared/map'; import { MapExtent } from '../shared/map.interface'; import { HomeExtentButtonOptions } from './home-extent-button.interface'; @@ -21,7 +20,7 @@ Button to center the map to the home extent templateUrl: './home-extent-button.component.html', styleUrls: ['./home-extent-button.component.scss'], standalone: true, - imports: [MatButtonModule, MatTooltipModule, MatIconModule, TranslateModule] + imports: [MatButtonModule, MatTooltipModule, MatIconModule, IgoLanguageModule] }) export class HomeExtentButtonComponent { @Input() map: IgoMap; diff --git a/packages/geo/src/lib/map/menu-button/menu-button.component.ts b/packages/geo/src/lib/map/menu-button/menu-button.component.ts index 12c6815cc..048cde669 100644 --- a/packages/geo/src/lib/map/menu-button/menu-button.component.ts +++ b/packages/geo/src/lib/map/menu-button/menu-button.component.ts @@ -5,8 +5,7 @@ import { MatIconModule } from '@angular/material/icon'; import { MatTooltipModule } from '@angular/material/tooltip'; import { ConfigService } from '@igo2/core/config'; - -import { TranslateModule } from '@ngx-translate/core'; +import { IgoLanguageModule } from '@igo2/core/language'; @Component({ selector: 'igo-menu-button', @@ -18,7 +17,7 @@ import { TranslateModule } from '@ngx-translate/core'; NgClass, MatTooltipModule, MatIconModule, - TranslateModule + IgoLanguageModule ] }) export class MenuButtonComponent { diff --git a/packages/geo/src/lib/map/offline-button/offline-button.component.ts b/packages/geo/src/lib/map/offline-button/offline-button.component.ts index 40cac5d1d..bb6d6eb82 100644 --- a/packages/geo/src/lib/map/offline-button/offline-button.component.ts +++ b/packages/geo/src/lib/map/offline-button/offline-button.component.ts @@ -4,7 +4,7 @@ import { MatButtonModule } from '@angular/material/button'; import { MatIconModule } from '@angular/material/icon'; import { MatTooltipModule } from '@angular/material/tooltip'; -import { TranslateModule } from '@ngx-translate/core'; +import { IgoLanguageModule } from '@igo2/core/language'; import { IgoMap } from '../shared/map'; @@ -18,7 +18,7 @@ import { IgoMap } from '../shared/map'; MatTooltipModule, NgClass, MatIconModule, - TranslateModule + IgoLanguageModule ] }) export class OfflineButtonComponent implements OnInit { diff --git a/packages/geo/src/lib/map/rotation-button/rotation-button.component.ts b/packages/geo/src/lib/map/rotation-button/rotation-button.component.ts index 6f022c187..b2080e2f7 100644 --- a/packages/geo/src/lib/map/rotation-button/rotation-button.component.ts +++ b/packages/geo/src/lib/map/rotation-button/rotation-button.component.ts @@ -4,7 +4,8 @@ import { MatButtonModule } from '@angular/material/button'; import { MatIconModule } from '@angular/material/icon'; import { MatTooltipModule } from '@angular/material/tooltip'; -import { TranslateModule } from '@ngx-translate/core'; +import { IgoLanguageModule } from '@igo2/core/language'; + import { bearingToAzimuth } from '@turf/helpers'; import { BehaviorSubject } from 'rxjs'; @@ -22,7 +23,7 @@ import { IgoMap } from '../shared/map'; MatIconModule, NgStyle, AsyncPipe, - TranslateModule + IgoLanguageModule ] }) export class RotationButtonComponent implements AfterContentInit { diff --git a/packages/geo/src/lib/map/wake-lock-button/wake-lock-button.component.ts b/packages/geo/src/lib/map/wake-lock-button/wake-lock-button.component.ts index 3dda14885..e98a5232a 100644 --- a/packages/geo/src/lib/map/wake-lock-button/wake-lock-button.component.ts +++ b/packages/geo/src/lib/map/wake-lock-button/wake-lock-button.component.ts @@ -4,10 +4,10 @@ import { MatButtonModule } from '@angular/material/button'; import { MatIconModule } from '@angular/material/icon'; import { MatTooltipModule } from '@angular/material/tooltip'; +import { IgoLanguageModule } from '@igo2/core/language'; import { StorageService } from '@igo2/core/storage'; import { userAgent } from '@igo2/utils'; -import { TranslateModule } from '@ngx-translate/core'; import NoSleep from 'nosleep.js'; import { BehaviorSubject } from 'rxjs'; @@ -21,7 +21,7 @@ import { BehaviorSubject } from 'rxjs'; MatTooltipModule, MatIconModule, AsyncPipe, - TranslateModule + IgoLanguageModule ] }) diff --git a/packages/geo/src/lib/map/zoom-button/zoom-button.component.ts b/packages/geo/src/lib/map/zoom-button/zoom-button.component.ts index 6a6591be8..8b5000a62 100644 --- a/packages/geo/src/lib/map/zoom-button/zoom-button.component.ts +++ b/packages/geo/src/lib/map/zoom-button/zoom-button.component.ts @@ -3,7 +3,7 @@ import { MatButtonModule } from '@angular/material/button'; import { MatIconModule } from '@angular/material/icon'; import { MatTooltipModule } from '@angular/material/tooltip'; -import { TranslateModule } from '@ngx-translate/core'; +import { IgoLanguageModule } from '@igo2/core/language'; import { IgoMap } from '../shared/map'; @@ -12,7 +12,7 @@ import { IgoMap } from '../shared/map'; templateUrl: './zoom-button.component.html', styleUrls: ['./zoom-button.component.scss'], standalone: true, - imports: [MatButtonModule, MatTooltipModule, MatIconModule, TranslateModule] + imports: [MatButtonModule, MatTooltipModule, MatIconModule, IgoLanguageModule] }) export class ZoomButtonComponent { @Input() map: IgoMap; diff --git a/packages/geo/src/lib/measure/measurer/measurer-dialog.component.ts b/packages/geo/src/lib/measure/measurer/measurer-dialog.component.ts index 3bfdfbc89..2f2e9dfeb 100644 --- a/packages/geo/src/lib/measure/measurer/measurer-dialog.component.ts +++ b/packages/geo/src/lib/measure/measurer/measurer-dialog.component.ts @@ -7,7 +7,7 @@ import { MatDialogTitle } from '@angular/material/dialog'; -import { TranslateModule } from '@ngx-translate/core'; +import { IgoLanguageModule } from '@igo2/core/language'; import { MeasureAreaUnit, MeasureLengthUnit } from '../shared/measure.enum'; import { MeasurerDialogData } from '../shared/measure.interfaces'; @@ -22,7 +22,7 @@ import { MeasureFormatPipe } from './measure-format.pipe'; MatDialogTitle, MatDialogContent, NgIf, - TranslateModule, + IgoLanguageModule, MeasureFormatPipe ] }) diff --git a/packages/geo/src/lib/measure/measurer/measurer-item.component.ts b/packages/geo/src/lib/measure/measurer/measurer-item.component.ts index d2c025b36..a60624bd5 100644 --- a/packages/geo/src/lib/measure/measurer/measurer-item.component.ts +++ b/packages/geo/src/lib/measure/measurer/measurer-item.component.ts @@ -12,7 +12,8 @@ import { MatFormFieldModule } from '@angular/material/form-field'; import { MatInputModule } from '@angular/material/input'; import { MatSelectModule } from '@angular/material/select'; -import { TranslateModule } from '@ngx-translate/core'; +import { IgoLanguageModule } from '@igo2/core/language'; + import { BehaviorSubject, Subscription } from 'rxjs'; import { @@ -42,7 +43,7 @@ import { MeasureFormatPipe } from './measure-format.pipe'; NgFor, MatOptionModule, AsyncPipe, - TranslateModule, + IgoLanguageModule, MeasureFormatPipe ] }) diff --git a/packages/geo/src/lib/measure/measurer/measurer.component.ts b/packages/geo/src/lib/measure/measurer/measurer.component.ts index 70b7ca4e1..11779560d 100644 --- a/packages/geo/src/lib/measure/measurer/measurer.component.ts +++ b/packages/geo/src/lib/measure/measurer/measurer.component.ts @@ -22,6 +22,7 @@ import { EntityTableTemplate } from '@igo2/common'; import { LanguageService } from '@igo2/core/language'; +import { IgoLanguageModule } from '@igo2/core/language'; import { StorageScope, StorageService } from '@igo2/core/storage'; import { uuid } from '@igo2/utils'; @@ -35,7 +36,6 @@ import OlVectorSource from 'ol/source/Vector'; import { VectorSourceEvent as OlVectorSourceEvent } from 'ol/source/Vector'; import OlStyle from 'ol/style/Style'; -import { TranslateModule } from '@ngx-translate/core'; import { BehaviorSubject, Subscription } from 'rxjs'; import { skip } from 'rxjs/operators'; @@ -96,7 +96,7 @@ import { MeasurerItemComponent } from './measurer-item.component'; MatIconModule, EntityTableComponent, AsyncPipe, - TranslateModule + IgoLanguageModule ] }) export class MeasurerComponent implements OnInit, OnDestroy { diff --git a/packages/geo/src/lib/metadata/metadata-button/metadata-button.component.ts b/packages/geo/src/lib/metadata/metadata-button/metadata-button.component.ts index f804a19bb..f145c2b05 100644 --- a/packages/geo/src/lib/metadata/metadata-button/metadata-button.component.ts +++ b/packages/geo/src/lib/metadata/metadata-button/metadata-button.component.ts @@ -18,7 +18,7 @@ import { import { MatIconModule } from '@angular/material/icon'; import { MatTooltipModule } from '@angular/material/tooltip'; -import { TranslateModule } from '@ngx-translate/core'; +import { IgoLanguageModule } from '@igo2/core/language'; import { Layer } from '../../layer/shared/layers/layer'; import { @@ -38,7 +38,7 @@ import { MetadataService } from '../shared/metadata.service'; MatButtonModule, MatTooltipModule, MatIconModule, - TranslateModule, + IgoLanguageModule, MatDialogModule ] }) diff --git a/packages/geo/src/lib/print/print-form/print-form.component.ts b/packages/geo/src/lib/print/print-form/print-form.component.ts index 8724d7b03..3924bfd6f 100644 --- a/packages/geo/src/lib/print/print-form/print-form.component.ts +++ b/packages/geo/src/lib/print/print-form/print-form.component.ts @@ -15,9 +15,9 @@ import { MatInputModule } from '@angular/material/input'; import { MatSelectModule } from '@angular/material/select'; import { MatSlideToggleModule } from '@angular/material/slide-toggle'; +import { IgoLanguageModule } from '@igo2/core/language'; import { MediaService } from '@igo2/core/media'; -import { TranslateModule } from '@ngx-translate/core'; import { BehaviorSubject } from 'rxjs'; import { PrintOptions } from '../shared/print.interface'; @@ -48,7 +48,7 @@ import { MatButtonModule, AsyncPipe, KeyValuePipe, - TranslateModule + IgoLanguageModule ] }) export class PrintFormComponent implements OnInit { diff --git a/packages/geo/src/lib/query/shared/query.service.spec.ts b/packages/geo/src/lib/query/shared/query.service.spec.ts index d92cc2185..77486e69d 100644 --- a/packages/geo/src/lib/query/shared/query.service.spec.ts +++ b/packages/geo/src/lib/query/shared/query.service.spec.ts @@ -1,16 +1,19 @@ import { HttpClientModule } from '@angular/common/http'; import { TestBed, inject } from '@angular/core/testing'; +import { IgoLanguageModule } from '@igo2/core/language'; import { IgoMessageModule } from '@igo2/core/message'; -import { TranslateModule } from '@ngx-translate/core'; - import { QueryService } from './query.service'; describe('QueryService', () => { beforeEach(() => { TestBed.configureTestingModule({ - imports: [HttpClientModule, TranslateModule.forRoot(), IgoMessageModule], + imports: [ + HttpClientModule, + IgoLanguageModule.forRoot(), + IgoMessageModule + ], providers: [QueryService] }); }); diff --git a/packages/geo/src/lib/search/search-bar/search-bar.component.ts b/packages/geo/src/lib/search/search-bar/search-bar.component.ts index aa18043ee..7ad3a9278 100644 --- a/packages/geo/src/lib/search/search-bar/search-bar.component.ts +++ b/packages/geo/src/lib/search/search-bar/search-bar.component.ts @@ -23,8 +23,8 @@ import { MatTooltipModule } from '@angular/material/tooltip'; import { EntityStore } from '@igo2/common'; import { ConfigService } from '@igo2/core/config'; +import { IgoLanguageModule } from '@igo2/core/language'; -import { TranslateModule } from '@ngx-translate/core'; import { BehaviorSubject, Subscription, timer } from 'rxjs'; import { debounce, distinctUntilChanged } from 'rxjs/operators'; @@ -58,7 +58,7 @@ import { SearchService } from '../shared/search.service'; SearchSelectorComponent, SearchSettingsComponent, AsyncPipe, - TranslateModule + IgoLanguageModule ] }) export class SearchBarComponent implements OnInit, OnDestroy { diff --git a/packages/geo/src/lib/search/search-results/save-feature-dialog.component.ts b/packages/geo/src/lib/search/search-results/save-feature-dialog.component.ts index 27b8b34d1..e3f63a724 100644 --- a/packages/geo/src/lib/search/search-results/save-feature-dialog.component.ts +++ b/packages/geo/src/lib/search/search-results/save-feature-dialog.component.ts @@ -23,8 +23,8 @@ import { MatListModule } from '@angular/material/list'; import { ListComponent, ListItemDirective } from '@igo2/common'; import { LanguageService } from '@igo2/core/language'; +import { IgoLanguageModule } from '@igo2/core/language'; -import { TranslateModule } from '@ngx-translate/core'; import { Observable } from 'rxjs'; import { map, startWith } from 'rxjs/operators'; @@ -54,7 +54,7 @@ import { SearchResultsItemComponent } from './search-results-item.component'; MatDialogActions, MatButtonModule, AsyncPipe, - TranslateModule + IgoLanguageModule ] }) export class SaveFeatureDialogComponent implements OnInit { diff --git a/packages/geo/src/lib/search/search-results/search-results-add-button.component.ts b/packages/geo/src/lib/search/search-results/search-results-add-button.component.ts index db3d8cd26..b5d496481 100644 --- a/packages/geo/src/lib/search/search-results/search-results-add-button.component.ts +++ b/packages/geo/src/lib/search/search-results/search-results-add-button.component.ts @@ -17,6 +17,7 @@ import { IgoBadgeIconDirective, StopPropagationDirective } from '@igo2/common'; +import { IgoLanguageModule } from '@igo2/core/language'; import { Media, MediaService } from '@igo2/core/media'; import OlOverlay from 'ol/Overlay'; @@ -26,7 +27,6 @@ import Fill from 'ol/style/Fill'; import Stroke from 'ol/style/Stroke'; import Style from 'ol/style/Style'; -import { TranslateModule } from '@ngx-translate/core'; import { BehaviorSubject, Subscription, take } from 'rxjs'; import { DataSourceService } from '../../datasource/shared/datasource.service'; @@ -66,7 +66,7 @@ import { SaveFeatureDialogComponent } from './save-feature-dialog.component'; MatBadgeModule, IgoBadgeIconDirective, AsyncPipe, - TranslateModule + IgoLanguageModule ] }) export class SearchResultAddButtonComponent implements OnInit, OnDestroy { diff --git a/packages/geo/src/lib/search/search-results/search-results.component.ts b/packages/geo/src/lib/search/search-results/search-results.component.ts index c43ff19fe..79fc848d4 100644 --- a/packages/geo/src/lib/search/search-results/search-results.component.ts +++ b/packages/geo/src/lib/search/search-results/search-results.component.ts @@ -23,8 +23,8 @@ import { ListItemDirective } from '@igo2/common'; import { ConfigService } from '@igo2/core/config'; +import { IgoLanguageModule } from '@igo2/core/language'; -import { TranslateModule } from '@ngx-translate/core'; import { BehaviorSubject, EMPTY, Observable, Subscription, timer } from 'rxjs'; import { debounce, map } from 'rxjs/operators'; @@ -60,7 +60,7 @@ export enum SearchResultMode { ListItemDirective, MatTabsModule, AsyncPipe, - TranslateModule + IgoLanguageModule ] }) export class SearchResultsComponent implements OnInit, OnDestroy { diff --git a/packages/geo/src/lib/search/search-selector/search-selector.component.ts b/packages/geo/src/lib/search/search-selector/search-selector.component.ts index ba5b608b7..188f9c452 100644 --- a/packages/geo/src/lib/search/search-selector/search-selector.component.ts +++ b/packages/geo/src/lib/search/search-selector/search-selector.component.ts @@ -14,7 +14,8 @@ import { MatMenuModule } from '@angular/material/menu'; import { MatRadioModule } from '@angular/material/radio'; import { MatTooltipModule } from '@angular/material/tooltip'; -import { TranslateModule } from '@ngx-translate/core'; +import { IgoLanguageModule } from '@igo2/core/language'; + import { BehaviorSubject, Subscription } from 'rxjs'; import { distinctUntilChanged } from 'rxjs/operators'; @@ -43,7 +44,7 @@ import { SEARCH_TYPES } from '../shared/search.enums'; MatRadioModule, NgFor, AsyncPipe, - TranslateModule + IgoLanguageModule ] }) export class SearchSelectorComponent implements OnInit, OnDestroy { diff --git a/packages/geo/src/lib/search/search-settings/search-settings.component.spec.ts b/packages/geo/src/lib/search/search-settings/search-settings.component.spec.ts index 8389af583..d06a0ef59 100644 --- a/packages/geo/src/lib/search/search-settings/search-settings.component.spec.ts +++ b/packages/geo/src/lib/search/search-settings/search-settings.component.spec.ts @@ -14,7 +14,7 @@ import { MatTooltipModule } from '@angular/material/tooltip'; import { IgoLanguageModule } from '@igo2/core/language'; -import { TranslateLoader, TranslateModule } from '@ngx-translate/core'; +import { TranslateLoader, IgoLanguageModule } from '@ngx-translate/core'; import { TranslateHttpLoader } from '@ngx-translate/http-loader'; import { SearchSourceService } from '../shared/search-source.service'; @@ -43,7 +43,7 @@ describe('SearchSettingsComponent', () => { TestBed.configureTestingModule({ imports: [ HttpClientModule, - TranslateModule.forRoot({ + IgoLanguageModule.forRoot({ loader: { provide: TranslateLoader, useFactory: HttpLoaderFactory, diff --git a/packages/geo/src/lib/search/search-settings/search-settings.component.ts b/packages/geo/src/lib/search/search-settings/search-settings.component.ts index fbdf4f4fa..85ff0465f 100644 --- a/packages/geo/src/lib/search/search-settings/search-settings.component.ts +++ b/packages/geo/src/lib/search/search-settings/search-settings.component.ts @@ -20,11 +20,10 @@ import { MatRadioChange, MatRadioModule } from '@angular/material/radio'; import { MatSlideToggleModule } from '@angular/material/slide-toggle'; import { MatTooltipModule } from '@angular/material/tooltip'; +import { IgoLanguageModule } from '@igo2/core/language'; import { MediaService } from '@igo2/core/media'; import { StorageService } from '@igo2/core/storage'; -import { TranslateModule } from '@ngx-translate/core'; - import { SearchSourceService } from '../shared/search-source.service'; import { sourceCanReverseSearch, @@ -64,7 +63,7 @@ import { MatRadioModule, MatDividerModule, MatSlideToggleModule, - TranslateModule + IgoLanguageModule ] }) export class SearchSettingsComponent implements OnInit { diff --git a/packages/geo/src/lib/style/style-modal/drawing/style-modal-drawing.component.ts b/packages/geo/src/lib/style/style-modal/drawing/style-modal-drawing.component.ts index 463019d75..0573b7730 100644 --- a/packages/geo/src/lib/style/style-modal/drawing/style-modal-drawing.component.ts +++ b/packages/geo/src/lib/style/style-modal/drawing/style-modal-drawing.component.ts @@ -21,8 +21,7 @@ import { MatInputModule } from '@angular/material/input'; import { MatSelectModule } from '@angular/material/select'; import { ColorPickerFormFieldComponent } from '@igo2/common'; - -import { TranslateModule } from '@ngx-translate/core'; +import { IgoLanguageModule } from '@igo2/core/language'; import { FontType } from '../../shared/font.enum'; import { DrawStyleService } from '../../style-service/draw-style.service'; @@ -51,7 +50,7 @@ import { MatOptionModule, MatDialogActions, MatButtonModule, - TranslateModule + IgoLanguageModule ] }) export class StyleModalDrawingComponent implements OnInit { diff --git a/packages/geo/src/lib/style/style-modal/layer-button/style-modal-layer-button.component.ts b/packages/geo/src/lib/style/style-modal/layer-button/style-modal-layer-button.component.ts index fe2524d5b..3bbcb762a 100644 --- a/packages/geo/src/lib/style/style-modal/layer-button/style-modal-layer-button.component.ts +++ b/packages/geo/src/lib/style/style-modal/layer-button/style-modal-layer-button.component.ts @@ -4,7 +4,7 @@ import { MatDialog } from '@angular/material/dialog'; import { MatIconModule } from '@angular/material/icon'; import { MatTooltipModule } from '@angular/material/tooltip'; -import { TranslateModule } from '@ngx-translate/core'; +import { IgoLanguageModule } from '@igo2/core/language'; import { VectorLayer } from '../../../layer/shared/layers/vector-layer'; import { StyleModalLayerComponent } from '../layer/style-modal-layer.component'; @@ -16,7 +16,7 @@ import { LayerMatDialogData } from '../shared/style-modal.interface'; styleUrls: ['./style-modal-layer-button.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, - imports: [MatButtonModule, MatTooltipModule, MatIconModule, TranslateModule] + imports: [MatButtonModule, MatTooltipModule, MatIconModule, IgoLanguageModule] }) export class StyleModalLayerButtonComponent { @Input() layer: VectorLayer; diff --git a/packages/geo/src/lib/style/style-modal/layer/style-modal-layer.component.ts b/packages/geo/src/lib/style/style-modal/layer/style-modal-layer.component.ts index 49f97cc28..dae61400e 100644 --- a/packages/geo/src/lib/style/style-modal/layer/style-modal-layer.component.ts +++ b/packages/geo/src/lib/style/style-modal/layer/style-modal-layer.component.ts @@ -17,12 +17,11 @@ import { import { MatIconModule } from '@angular/material/icon'; import { ColorPickerFormFieldComponent } from '@igo2/common'; +import { IgoLanguageModule } from '@igo2/core/language'; import { asArray as ColorAsArray } from 'ol/color'; import olStyle from 'ol/style/Style'; -import { TranslateModule } from '@ngx-translate/core'; - import { LayerMatDialogData, StyleModalData @@ -43,7 +42,7 @@ import { ColorPickerFormFieldComponent, MatDialogActions, MatButtonModule, - TranslateModule + IgoLanguageModule ] }) export class StyleModalLayerComponent implements OnInit { diff --git a/packages/integration/src/lib/about/about-tool/about-tool.component.ts b/packages/integration/src/lib/about/about-tool/about-tool.component.ts index 724510f19..a209b49f1 100644 --- a/packages/integration/src/lib/about/about-tool/about-tool.component.ts +++ b/packages/integration/src/lib/about/about-tool/about-tool.component.ts @@ -14,8 +14,8 @@ import { } from '@igo2/common'; import { ConfigService, version } from '@igo2/core/config'; import { LanguageService } from '@igo2/core/language'; +import { IgoLanguageModule } from '@igo2/core/language'; -import { TranslateModule } from '@ngx-translate/core'; import { of } from 'rxjs'; import type { Observable } from 'rxjs'; @@ -40,7 +40,7 @@ import { AllEnvironmentOptions } from '../../environment'; MatMenuModule, NgFor, CustomHtmlComponent, - TranslateModule + IgoLanguageModule ] }) export class AboutToolComponent implements OnInit { diff --git a/packages/integration/src/lib/import-export/import-export-tool/import-export-tool.component.ts b/packages/integration/src/lib/import-export/import-export-tool/import-export-tool.component.ts index eb48ca457..173969d06 100644 --- a/packages/integration/src/lib/import-export/import-export-tool/import-export-tool.component.ts +++ b/packages/integration/src/lib/import-export/import-export-tool/import-export-tool.component.ts @@ -10,6 +10,7 @@ import { MatTabsModule } from '@angular/material/tabs'; import { ToolComponent } from '@igo2/common'; import type { WorkspaceStore } from '@igo2/common'; import { ContextImportExportComponent } from '@igo2/context'; +import { IgoLanguageModule } from '@igo2/core/language'; import { ExportOptions, IgoMap, @@ -17,8 +18,6 @@ import { ProjectionsLimitationsOptions } from '@igo2/geo'; -import { TranslateModule } from '@ngx-translate/core'; - import { ContextState } from '../../context/context.state'; import { MapState } from '../../map/map.state'; import { WorkspaceState } from '../../workspace/workspace.state'; @@ -45,7 +44,7 @@ import { ImportExportComponent, ContextImportExportComponent, AsyncPipe, - TranslateModule + IgoLanguageModule ] }) export class ImportExportToolComponent implements OnInit { diff --git a/packages/integration/src/lib/map/advanced-map-tool/advanced-coordinates/advanced-coordinates.component.ts b/packages/integration/src/lib/map/advanced-map-tool/advanced-coordinates/advanced-coordinates.component.ts index 3b2caff42..4cc9a840d 100644 --- a/packages/integration/src/lib/map/advanced-map-tool/advanced-coordinates/advanced-coordinates.component.ts +++ b/packages/integration/src/lib/map/advanced-map-tool/advanced-coordinates/advanced-coordinates.component.ts @@ -23,6 +23,7 @@ import { MatSlideToggleModule } from '@angular/material/slide-toggle'; import { ConfigService } from '@igo2/core/config'; import { LanguageService } from '@igo2/core/language'; +import { IgoLanguageModule } from '@igo2/core/language'; import { MessageService } from '@igo2/core/message'; import { StorageScope, StorageService } from '@igo2/core/storage'; import { @@ -36,7 +37,6 @@ import { Clipboard } from '@igo2/utils'; import * as olproj from 'ol/proj'; -import { TranslateModule } from '@ngx-translate/core'; import { BehaviorSubject, Subscription } from 'rxjs'; import { debounceTime } from 'rxjs/operators'; @@ -64,7 +64,7 @@ import { MapState } from '../../map.state'; MatSlideToggleModule, AsyncPipe, DecimalPipe, - TranslateModule + IgoLanguageModule ] }) export class AdvancedCoordinatesComponent implements OnInit, OnDestroy { diff --git a/packages/integration/src/lib/map/advanced-map-tool/advanced-map-tool.component.ts b/packages/integration/src/lib/map/advanced-map-tool/advanced-map-tool.component.ts index 95bd80715..203b1ddeb 100644 --- a/packages/integration/src/lib/map/advanced-map-tool/advanced-map-tool.component.ts +++ b/packages/integration/src/lib/map/advanced-map-tool/advanced-map-tool.component.ts @@ -4,8 +4,7 @@ import { MatDividerModule } from '@angular/material/divider'; import { MatSlideToggleModule } from '@angular/material/slide-toggle'; import { ToolComponent } from '@igo2/common'; - -import { TranslateModule } from '@ngx-translate/core'; +import { IgoLanguageModule } from '@igo2/core/language'; import { MapState } from '../map.state'; import { AdvancedCoordinatesComponent } from './advanced-coordinates/advanced-coordinates.component'; @@ -30,7 +29,7 @@ import { AdvancedSwipeComponent } from './advanced-swipe/advanced-swipe.componen AdvancedCoordinatesComponent, MatSlideToggleModule, AsyncPipe, - TranslateModule + IgoLanguageModule ] }) export class AdvancedMapToolComponent { diff --git a/packages/integration/src/lib/map/advanced-map-tool/advanced-swipe/advanced-swipe.component.ts b/packages/integration/src/lib/map/advanced-map-tool/advanced-swipe/advanced-swipe.component.ts index 1d46fbc90..79cc2349d 100644 --- a/packages/integration/src/lib/map/advanced-map-tool/advanced-swipe/advanced-swipe.component.ts +++ b/packages/integration/src/lib/map/advanced-map-tool/advanced-swipe/advanced-swipe.component.ts @@ -15,14 +15,13 @@ import { MatListModule } from '@angular/material/list'; import { MatSelectModule } from '@angular/material/select'; import { MatSlideToggleModule } from '@angular/material/slide-toggle'; +import { IgoIconComponent, LAYER_PLUS_ICON } from '@igo2/common'; import { ContextService, DetailedContext } from '@igo2/context'; +import { IgoLanguageModule } from '@igo2/core/language'; import { IgoMap, Layer, VectorLayer } from '@igo2/geo'; -import { TranslateModule } from '@ngx-translate/core'; - import { ToolState } from '../../../tool/tool.state'; import { MapState } from '../../map.state'; -import { IgoIconComponent, LAYER_PLUS_ICON } from '@igo2/common'; @Component({ selector: 'igo-advanced-swipe', @@ -41,7 +40,7 @@ import { IgoIconComponent, LAYER_PLUS_ICON } from '@igo2/common'; MatSlideToggleModule, MatListModule, MatIconModule, - TranslateModule, + IgoLanguageModule, IgoIconComponent ] }) diff --git a/packages/integration/src/lib/map/map-details-tool/map-details-tool.component.ts b/packages/integration/src/lib/map/map-details-tool/map-details-tool.component.ts index e2d688bd3..be494652a 100644 --- a/packages/integration/src/lib/map/map-details-tool/map-details-tool.component.ts +++ b/packages/integration/src/lib/map/map-details-tool/map-details-tool.component.ts @@ -4,6 +4,7 @@ import { MatIconModule } from '@angular/material/icon'; import { MatListModule } from '@angular/material/list'; import { ToolComponent } from '@igo2/common'; +import { IgoLanguageModule } from '@igo2/core/language'; import { ExportButtonComponent, ExportOptions, @@ -21,7 +22,6 @@ import { sourceCanSearch } from '@igo2/geo'; -import { TranslateModule } from '@ngx-translate/core'; import { Observable } from 'rxjs'; import { map } from 'rxjs/operators'; @@ -56,7 +56,7 @@ import { MapState } from './../map.state'; MatListModule, MatIconModule, AsyncPipe, - TranslateModule + IgoLanguageModule ] }) export class MapDetailsToolComponent implements OnInit { diff --git a/packages/integration/src/lib/map/map-legend/map-legend-tool.component.ts b/packages/integration/src/lib/map/map-legend/map-legend-tool.component.ts index 5df9b04a4..8474880f8 100644 --- a/packages/integration/src/lib/map/map-legend/map-legend-tool.component.ts +++ b/packages/integration/src/lib/map/map-legend/map-legend-tool.component.ts @@ -10,6 +10,7 @@ import { MatIconModule } from '@angular/material/icon'; import { MatListModule } from '@angular/material/list'; import { ToolComponent } from '@igo2/common'; +import { IgoLanguageModule } from '@igo2/core/language'; import { IgoMap, Layer, @@ -20,7 +21,6 @@ import { sourceCanSearch } from '@igo2/geo'; -import { TranslateModule } from '@ngx-translate/core'; import { BehaviorSubject, Observable, @@ -50,7 +50,7 @@ import { MapState } from './../map.state'; MatListModule, MatIconModule, AsyncPipe, - TranslateModule + IgoLanguageModule ] }) export class MapLegendToolComponent implements OnInit, OnDestroy { diff --git a/packages/integration/src/lib/map/map-proximity-tool/map-proximity-tool.component.ts b/packages/integration/src/lib/map/map-proximity-tool/map-proximity-tool.component.ts index 7e8549196..9e104f770 100644 --- a/packages/integration/src/lib/map/map-proximity-tool/map-proximity-tool.component.ts +++ b/packages/integration/src/lib/map/map-proximity-tool/map-proximity-tool.component.ts @@ -13,11 +13,11 @@ import { ToolComponent } from '@igo2/common'; import { LanguageService } from '@igo2/core/language'; +import { IgoLanguageModule } from '@igo2/core/language'; import { MessageService } from '@igo2/core/message'; import { Feature, IgoMap } from '@igo2/geo'; import { Clipboard, NumberUtils } from '@igo2/utils'; -import { TranslateModule } from '@ngx-translate/core'; import { Subscription } from 'rxjs'; import { MapProximityState } from '../map-proximity.state'; @@ -46,7 +46,7 @@ import { MapState } from '../map.state'; MatRadioModule, FormsModule, AsyncPipe, - TranslateModule + IgoLanguageModule ] }) export class MapProximityToolComponent implements OnInit, OnDestroy { diff --git a/packages/integration/src/lib/map/map-tool/map-tool.component.ts b/packages/integration/src/lib/map/map-tool/map-tool.component.ts index 6d5d6694e..afd3d4613 100644 --- a/packages/integration/src/lib/map/map-tool/map-tool.component.ts +++ b/packages/integration/src/lib/map/map-tool/map-tool.component.ts @@ -6,6 +6,7 @@ import { ContextListBindingDirective, ContextListComponent } from '@igo2/context'; +import { IgoLanguageModule } from '@igo2/core/language'; import { ExportButtonComponent, ExportOptions, @@ -21,8 +22,6 @@ import { TrackFeatureButtonComponent } from '@igo2/geo'; -import { TranslateModule } from '@ngx-translate/core'; - import { ImportExportMode, ImportExportState @@ -57,7 +56,7 @@ import { MapState } from './../map.state'; MetadataButtonComponent, ContextListComponent, ContextListBindingDirective, - TranslateModule + IgoLanguageModule ] }) export class MapToolComponent { diff --git a/packages/integration/src/lib/map/map-tools/map-tools.component.ts b/packages/integration/src/lib/map/map-tools/map-tools.component.ts index 95cd2360e..353f938ec 100644 --- a/packages/integration/src/lib/map/map-tools/map-tools.component.ts +++ b/packages/integration/src/lib/map/map-tools/map-tools.component.ts @@ -12,6 +12,7 @@ import { MatListModule } from '@angular/material/list'; import { MatTabChangeEvent, MatTabsModule } from '@angular/material/tabs'; import { ToolComponent } from '@igo2/common'; +import { IgoLanguageModule } from '@igo2/core/language'; import { ExportButtonComponent, ExportOptions, @@ -33,7 +34,6 @@ import { sourceCanSearch } from '@igo2/geo'; -import { TranslateModule } from '@ngx-translate/core'; import { BehaviorSubject, Observable, Subscription, combineLatest } from 'rxjs'; import { debounceTime, map } from 'rxjs/operators'; @@ -77,7 +77,7 @@ import { MapState } from '../map.state'; MatListModule, MatIconModule, AsyncPipe, - TranslateModule + IgoLanguageModule ] }) export class MapToolsComponent implements OnInit, OnDestroy { diff --git a/packages/integration/src/lib/search/search-results-tool/search-results-tool.component.ts b/packages/integration/src/lib/search/search-results-tool/search-results-tool.component.ts index fc262b2ba..1605569ec 100644 --- a/packages/integration/src/lib/search/search-results-tool/search-results-tool.component.ts +++ b/packages/integration/src/lib/search/search-results-tool/search-results-tool.component.ts @@ -23,6 +23,7 @@ import { getEntityTitle } from '@igo2/common'; import { ConfigService } from '@igo2/core/config'; +import { IgoLanguageModule } from '@igo2/core/language'; import { FEATURE, Feature, @@ -51,7 +52,6 @@ import type { default as OlGeometry } from 'ol/geom/Geometry'; import olPoint from 'ol/geom/Point'; import * as olProj from 'ol/proj'; -import { TranslateModule } from '@ngx-translate/core'; import pointOnFeature from '@turf/point-on-feature'; import { BehaviorSubject, Observable, Subscription, combineLatest } from 'rxjs'; import { debounceTime, map } from 'rxjs/operators'; @@ -86,7 +86,7 @@ import { SearchState } from '../search.state'; MatBadgeModule, FeatureDetailsComponent, AsyncPipe, - TranslateModule, + IgoLanguageModule, SanitizeHtmlPipe ] }) diff --git a/packages/integration/src/lib/workspace/workspace-button/workspace-button.component.ts b/packages/integration/src/lib/workspace/workspace-button/workspace-button.component.ts index 08e5cbfcd..9cd6da02f 100644 --- a/packages/integration/src/lib/workspace/workspace-button/workspace-button.component.ts +++ b/packages/integration/src/lib/workspace/workspace-button/workspace-button.component.ts @@ -10,9 +10,9 @@ import { MatButtonModule } from '@angular/material/button'; import { MatIconModule } from '@angular/material/icon'; import { MatTooltipModule } from '@angular/material/tooltip'; +import { IgoLanguageModule } from '@igo2/core/language'; import type { Layer } from '@igo2/geo'; -import { TranslateModule } from '@ngx-translate/core'; import { BehaviorSubject, Subscription, combineLatest } from 'rxjs'; import { WorkspaceState } from '../workspace.state'; @@ -29,7 +29,7 @@ import { WorkspaceState } from '../workspace.state'; MatTooltipModule, MatIconModule, AsyncPipe, - TranslateModule + IgoLanguageModule ] }) export class WorkspaceButtonComponent implements OnInit, OnDestroy {