marek 1 месяц назад
Родитель
Сommit
c4dcbb523d
4 измененных файлов с 47 добавлено и 35 удалено
  1. 23 16
      lang/en.js
  2. 22 17
      lang/sk.js
  3. 1 1
      templates/en/history/property.eta
  4. 1 1
      templates/sk/history/property.eta

+ 23 - 16
lang/en.js

@@ -1,3 +1,22 @@
+const general = {
+    dateFormats: {
+        months: {
+            [`01`]: () => `January`,
+            [`02`]: () => `February`,
+            [`03`]: () => `March`,
+            [`04`]: () => `April`,
+            [`05`]: () => `May`,
+            [`06`]: () => `June`,
+            [`07`]: () => `July`,
+            [`08`]: () => `August`,
+            [`09`]: () => `September`,
+            [`10`]: () => `October`,
+            [`11`]: () => `November`,
+            [`12`]: () => `December`,
+        }
+    },
+}
+
 const icons = {
     tempIcon: () => `
         <svg class="icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
@@ -34,6 +53,9 @@ const icons = {
 }
 
 export default {
+    general,
+    icons,
+    
     settings: {
         errors: {
             noCloudURL: () => `you need to provide a cloud url.`,
@@ -55,21 +77,6 @@ export default {
             outdoorAltitude: () => `${icons.altitudeIcon()} outdoor altitude`,
         },
 
-        dateFormats: {            
-            months: {
-                [`01`]: () => `January`,
-                [`02`]: () => `February`,
-                [`03`]: () => `March`,
-                [`04`]: () => `April`,
-                [`05`]: () => `May`,
-                [`06`]: () => `June`,
-                [`07`]: () => `July`,
-                [`08`]: () => `August`,
-                [`09`]: () => `September`,
-                [`10`]: () => `October`,
-                [`11`]: () => `November`,
-                [`12`]: () => `December`,
-            }
-        }
+
     }
 }

+ 22 - 17
lang/sk.js

@@ -1,3 +1,22 @@
+const general = {
+    dateFormats: {
+        months: {
+            [`01`]: () => `január`,
+            [`02`]: () => `február`,
+            [`03`]: () => `marec`,
+            [`04`]: () => `apríl`,
+            [`05`]: () => `máj`,
+            [`06`]: () => `jún`,
+            [`07`]: () => `júl`,
+            [`08`]: () => `august`,
+            [`09`]: () => `september`,
+            [`10`]: () => `október`,
+            [`11`]: () => `november`,
+            [`12`]: () => `december`,
+        }
+    },
+}
+
 const icons = {
     tempIcon: () => `
         <svg class="icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
@@ -34,6 +53,9 @@ const icons = {
 }
 
 export default {
+    general,
+    icons,
+
     settings: {
         errors: {
             noCloudURL: () => `musíte zadať cloud url.`,
@@ -54,22 +76,5 @@ export default {
             outdoorHumidity: () => `${icons.humidityIcon()} vonkajšia vlhkosť`,
             outdoorAltitude: () => `${icons.altitudeIcon()} vonkajšia nadmorská výška`,
         },
-
-        dateFormats: {
-            months: {
-                [`01`]: () => `január`,
-                [`02`]: () => `február`,
-                [`03`]: () => `marec`,
-                [`04`]: () => `apríl`,
-                [`05`]: () => `máj`,
-                [`06`]: () => `jún`,
-                [`07`]: () => `júl`,
-                [`08`]: () => `august`,
-                [`09`]: () => `september`,
-                [`10`]: () => `október`,
-                [`11`]: () => `november`,
-                [`12`]: () => `december`,
-            }
-        }
     }
 }

+ 1 - 1
templates/en/history/property.eta

@@ -38,7 +38,7 @@
             <label for="month">month</label>
             <select id="month" name="month">
                 <% for (const item of it?.dateMap?.months) { %>
-                    <option value="<%= item %>" <%= item === it?.selected?.month ? `selected` : `` %> > <%= it?.lang?.history.dateFormats.months?.[item]() %></option>
+                    <option value="<%= item %>" <%= item === it?.selected?.month ? `selected` : `` %> > <%= it?.lang?.general.dateFormats.months?.[item]() %></option>
                 <% } %>
             </select>
             </div>

+ 1 - 1
templates/sk/history/property.eta

@@ -38,7 +38,7 @@
             <label for="month">mesiac</label>
             <select id="month" name="month">
                 <% for (const item of it?.dateMap?.months) { %>
-                    <option value="<%= item %>" <%= item === it?.selected?.month ? `selected` : `` %> > <%= it?.lang?.history.dateFormats.months?.[item]() %></option>
+                    <option value="<%= item %>" <%= item === it?.selected?.month ? `selected` : `` %> > <%= it?.lang?.general.dateFormats.months?.[item]() %></option>
                 <% } %>
             </select>
             </div>