Sfoglia il codice sorgente

🌐 i18n: add more translations

jmacura 4 anni fa
parent
commit
0bc1a92020
2 ha cambiato i file con 10 aggiunte e 2 eliminazioni
  1. 8 1
      src/app.module.ts
  2. 2 1
      src/app.service.ts

+ 8 - 1
src/app.module.ts

@@ -10,6 +10,7 @@ import {
   NgModule,
 } from '@angular/core';
 import {BrowserModule} from '@angular/platform-browser';
+import {TranslateModule} from '@ngx-translate/core';
 import {UpgradeModule} from '@angular/upgrade/static';
 
 import {BootstrapComponent} from 'hslayers-ng/bootstrap.component';
@@ -19,7 +20,13 @@ import {AdjusterModule} from './adjuster';
 import {AppService} from './app.service';
 
 @NgModule({
-  imports: [BrowserModule, UpgradeModule, HsCoreModule, AdjusterModule],
+  imports: [
+    BrowserModule,
+    UpgradeModule,
+    HsCoreModule,
+    AdjusterModule,
+    TranslateModule,
+  ],
   exports: [],
   declarations: [],
   providers: [

+ 2 - 1
src/app.service.ts

@@ -29,7 +29,8 @@ export class AppService {
         panel: 'adjuster',
         module: 'pra.adjuster',
         order: 0,
-        title: 'Adjust factors',
+        title: () =>
+          this.hsLanguageService.getTranslation('ADJUSTER.adjustFactors'),
         description: 'Adjust factors for computation',
         icon: 'icon-analytics-piechart',
       });