Sfoglia il codice sorgente

⏪ switch back to static JSON for i18n strings

jmacura 3 anni fa
parent
commit
93e5529b99
3 ha cambiato i file con 50 aggiunte e 50 eliminazioni
  1. 2 2
      src/app/app.service.ts
  2. 48 0
      src/app/translations.json
  3. 0 48
      src/app/translations.ts

+ 2 - 2
src/app/app.service.ts

@@ -19,7 +19,7 @@ import {
   HsSidebarService,
 } from 'hslayers-ng';
 
-import {translationOverrides} from "./translations";
+import i18n from './translations.json';
 import {CalculatorService} from './calculator/calculator.service';
 import {imageWmsTLayer} from './calculator/image-wms-t-layer';
 
@@ -239,7 +239,7 @@ export class AppService {
           }),
         }),
       ],
-      translationOverrides
+      translationOverrides: i18n,
     }, 'default');
     this.hsLanguageService.setLanguage("en", null);
   }

+ 48 - 0
src/app/translations.json

@@ -0,0 +1,48 @@
+{
+  "cs": {
+    "CALCULATOR": {
+      "blurNone": "žádné",
+      "getDates": "VYBRAT DATUM",
+      "getZones": "ZÍSKAT ZÓNY",
+      "errorLoading": "Chyba při načítání dat",
+      "errorLoadingDates": "Nebylo možné načíst seznam možných dat ze serveru. Zkuste to prosím později.",
+      "errorLoadingZones": "Nebylo možné načíst zóny pole ze serveru. Pravděpodobně z důvodu přílišné oblačnosti snímku. Zkuste jiný datum.",
+      "loading": "Načítám",
+      "panelHeader": "Výpočet indexů pole",
+      "selectBlur": "Vyhlazení hran zón",
+      "selectDate": "Chci datum",
+      "selectField": "Vyberte pole kliknutím do mapy. Více polí můžete vybrat podržením klávesy SHIFT.",
+      "selectMore": "Více polí můžete vybrat podržením klávesy SHIFT",
+      "selectedField": "Vybráno pole",
+      "selectedFields": "Vybrána pole",
+      "selectFieldAndIndex": "Nejprve vyberte index a pole v mapě",
+      "selectIndex": "Vypočítat index",
+      "selectIndexHint": "Vyberte z dostupných indexů",
+      "selectQuantiles": "Počet kvantilů",
+      "zoomIn": "Pro výběr pole je potřeba mapu přiblížit."
+    }
+  },
+  "en": {
+    "CALCULATOR": {
+      "blurNone": "none",
+      "getDates": "GET DATES",
+      "getZones": "GET ZONES",
+      "errorLoading": "Error loading data",
+      "errorLoadingDates": "It was not possible to load available dates from the server. Please, try again later.",
+      "errorLoadingZones": "It was not possible to load field zones from the server. This is probably due to the high cloudiness of the source image. Try another date.",
+      "loading": "Loading",
+      "panelHeader": "Field calculation",
+      "selectBlur": "Smoothing zone edges",
+      "selectDate": "I want a date",
+      "selectField": "Select a field by clicking in the map. You can select more fields by press and holding the SHIFT key.",
+      "selectMore": "You can select more fields by press and holding the SHIFT key",
+      "selectedField": "Selected field",
+      "selectedFields": "Selected fields",
+      "selectFieldAndIndex": "Select an index and a field in the map to continue",
+      "selectIndex": "Calculate index",
+      "selectIndexHint": "Select one of the available indices",
+      "selectQuantiles": "Quantiles count",
+      "zoomIn": "In order to select the field, you must zoom the map in."
+    }
+  }
+}

+ 0 - 48
src/app/translations.ts

@@ -1,48 +0,0 @@
-export const translationOverrides = {
-  cs: {
-    CALCULATOR: {
-      blurNone: 'žádné',
-      getDates: 'VYBRAT DATUM',
-      getZones: 'ZÍSKAT ZÓNY',
-      errorLoading: 'Chyba při načítání dat',
-      errorLoadingDates: 'Nebylo možné načíst seznam možných dat ze serveru. Zkuste to prosím později.',
-      errorLoadingZones: 'Nebylo možné načíst zóny pole ze serveru. Pravděpodobně z důvodu přílišné oblačnosti snímku. Zkuste jiný datum.',
-      loading: 'Načítám',
-      panelHeader: 'Výpočet indexů pole',
-      selectBlur: 'Vyhlazení hran zón',
-      selectDate: 'Chci datum',
-      selectField: 'Vyberte pole kliknutím do mapy. Více polí můžete vybrat podržením klávesy SHIFT.',
-      selectMore: 'Více polí můžete vybrat podržením klávesy SHIFT',
-      selectedField: 'Vybráno pole',
-      selectedFields: 'Vybrána pole',
-      selectFieldAndIndex: 'Nejprve vyberte index a pole v mapě',
-      selectIndex: 'Vypočítat index',
-      selectIndexHint: 'Vyberte z dostupných indexů',
-      selectQuantiles: 'Počet kvantilů',
-      zoomIn: 'Pro výběr pole je potřeba mapu přiblížit.'
-    }
-  },
-  en: {
-    CALCULATOR: {
-      blurNone: 'none',
-      getDates: 'GET DATES',
-      getZones: 'GET ZONES',
-      errorLoading: 'Error loading data',
-      errorLoadingDates: 'It was not possible to load available dates from the server. Please, try again later.',
-      errorLoadingZones: 'It was not possible to load field zones from the server. This is probably due to the high cloudiness of the source image. Try another date.',
-      loading: 'Loading',
-      panelHeader: 'Field calculation',
-      selectBlur: 'Smoothing zone edges',
-      selectDate: 'I want a date',
-      selectField: 'Select a field by clicking in the map. You can select more fields by press and holding the SHIFT key.',
-      selectMore: 'You can select more fields by press and holding the SHIFT key',
-      selectedField: 'Selected field',
-      selectedFields: 'Selected fields',
-      selectFieldAndIndex: 'Select an index and a field in the map to continue',
-      selectIndex: 'Calculate index',
-      selectIndexHint: 'Select one of the available indices',
-      selectQuantiles: 'Quantiles count',
-      zoomIn: 'In order to select the field, you must zoom the map in.'
-    }
-  }
-};