annotate client/src/main.js @ 1586:3a30a6f4c96d

unattended imports: translations added
author Thomas Junk <thomas.junk@intevation.de>
date Fri, 14 Dec 2018 11:02:46 +0100
parents 15d736a402c9
children 2ee243f9a7ee
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1243
24797f66f268 Client: remove (minor) superfluous things
Bernhard Reiter <bernhard@intevation.de>
parents: 1163
diff changeset
1 /* This is Free Software under GNU Affero General Public License v >= 3.0
1019
ca628dce90dd Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents: 880
diff changeset
2 * without warranty, see README.md and license for details.
1243
24797f66f268 Client: remove (minor) superfluous things
Bernhard Reiter <bernhard@intevation.de>
parents: 1163
diff changeset
3 *
1019
ca628dce90dd Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents: 880
diff changeset
4 * SPDX-License-Identifier: AGPL-3.0-or-later
ca628dce90dd Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents: 880
diff changeset
5 * License-Filename: LICENSES/AGPL-3.0.txt
1243
24797f66f268 Client: remove (minor) superfluous things
Bernhard Reiter <bernhard@intevation.de>
parents: 1163
diff changeset
6 *
1363
d0c4d17ee7ab add missing authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1299
diff changeset
7 * Copyright (C) 2018 by via donau
1019
ca628dce90dd Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents: 880
diff changeset
8 * – Österreichische Wasserstraßen-Gesellschaft mbH
ca628dce90dd Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents: 880
diff changeset
9 * Software engineering by Intevation GmbH
1243
24797f66f268 Client: remove (minor) superfluous things
Bernhard Reiter <bernhard@intevation.de>
parents: 1163
diff changeset
10 *
1019
ca628dce90dd Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents: 880
diff changeset
11 * Author(s):
ca628dce90dd Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents: 880
diff changeset
12 * Thomas Junk <thomas.junk@intevation.de>
1363
d0c4d17ee7ab add missing authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1299
diff changeset
13 * Markus Kottländer <markus@intevation.de>
1019
ca628dce90dd Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents: 880
diff changeset
14 */
ca628dce90dd Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents: 880
diff changeset
15
3
1597506a2241 merge with vue-cli
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
16 import Vue from "vue";
1272
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents: 1243
diff changeset
17 import App from "./components/App.vue";
3
1597506a2241 merge with vue-cli
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
18 import router from "./router";
1597506a2241 merge with vue-cli
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
19 import store from "./store";
141
Thomas Junk <thomas.junk@intevation.de>
parents: 30
diff changeset
20 import GetTextPlugin from "vue-gettext";
1272
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents: 1243
diff changeset
21 import translations from "./locale/translations.json";
159
3d9341f6da4e feat: Locale of browser determines the default language
Thomas Junk <thomas.junk@intevation.de>
parents: 141
diff changeset
22 import locale2 from "locale2";
1368
d1d8c7bd16a1 switched from vue2-toastr to vue-snotify
Thomas Junk <thomas.junk@intevation.de>
parents: 1363
diff changeset
23 import Snotify, { SnotifyPosition } from "vue-snotify";
159
3d9341f6da4e feat: Locale of browser determines the default language
Thomas Junk <thomas.junk@intevation.de>
parents: 141
diff changeset
24 import "../node_modules/bootstrap/dist/css/bootstrap.min.css";
428
d7a06b9fffc9 feat: Usability for usermanagement improved.
Thomas Junk <thomas.junk@intevation.de>
parents: 375
diff changeset
25 import "../node_modules/animate.css/animate.min.css";
159
3d9341f6da4e feat: Locale of browser determines the default language
Thomas Junk <thomas.junk@intevation.de>
parents: 141
diff changeset
26 import "../node_modules/ol/ol.css";
713
badbc0207418 feat: systeminformation feature added
Thomas Junk <thomas.junk@intevation.de>
parents: 565
diff changeset
27 import "../node_modules/highlight.js/styles/paraiso-dark.css";
1368
d1d8c7bd16a1 switched from vue2-toastr to vue-snotify
Thomas Junk <thomas.junk@intevation.de>
parents: 1363
diff changeset
28 import "../node_modules/vue-snotify/styles/material.css";
565
4bc27eea4f09 feat: Added tooltips for user roles
Thomas Junk <thomas.junk@intevation.de>
parents: 428
diff changeset
29 import VTooltip from "v-tooltip";
1097
874d19f32015 added fontawesome5 and implemented one example icon on login screen
Markus Kottlaender <markus@intevation.de>
parents: 1019
diff changeset
30 import { library } from "@fortawesome/fontawesome-svg-core";
1299
2738a6ae9ad8 fontawesome 4 -> 5
Markus Kottlaender <markus@intevation.de>
parents: 1272
diff changeset
31 import {
1429
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1399
diff changeset
32 faAngleDown,
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1399
diff changeset
33 faAngleLeft,
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1399
diff changeset
34 faAngleRight,
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1399
diff changeset
35 faAngleUp,
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1399
diff changeset
36 faBars,
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1399
diff changeset
37 faBook,
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1399
diff changeset
38 faChartArea,
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1399
diff changeset
39 faCheck,
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1399
diff changeset
40 faCity,
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1399
diff changeset
41 faClipboardCheck,
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1399
diff changeset
42 faClock,
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1399
diff changeset
43 faCopy,
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1399
diff changeset
44 faDrawPolygon,
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1399
diff changeset
45 faExclamationTriangle,
1299
2738a6ae9ad8 fontawesome 4 -> 5
Markus Kottlaender <markus@intevation.de>
parents: 1272
diff changeset
46 faEye,
2738a6ae9ad8 fontawesome 4 -> 5
Markus Kottlaender <markus@intevation.de>
parents: 1272
diff changeset
47 faEyeSlash,
1429
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1399
diff changeset
48 faFilePdf,
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1399
diff changeset
49 faFolderPlus,
1299
2738a6ae9ad8 fontawesome 4 -> 5
Markus Kottlaender <markus@intevation.de>
parents: 1272
diff changeset
50 faInfo,
2738a6ae9ad8 fontawesome 4 -> 5
Markus Kottlaender <markus@intevation.de>
parents: 1272
diff changeset
51 faLayerGroup,
1429
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1399
diff changeset
52 faMapMarkedAlt,
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1399
diff changeset
53 faMinus,
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1399
diff changeset
54 faPaperPlane,
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1399
diff changeset
55 faPencilAlt,
1586
3a30a6f4c96d unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents: 1554
diff changeset
56 faPlay,
1429
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1399
diff changeset
57 faPlus,
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1399
diff changeset
58 faPowerOff,
1299
2738a6ae9ad8 fontawesome 4 -> 5
Markus Kottlaender <markus@intevation.de>
parents: 1272
diff changeset
59 faRuler,
2738a6ae9ad8 fontawesome 4 -> 5
Markus Kottlaender <markus@intevation.de>
parents: 1272
diff changeset
60 faSearch,
2738a6ae9ad8 fontawesome 4 -> 5
Markus Kottlaender <markus@intevation.de>
parents: 1272
diff changeset
61 faShip,
1429
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1399
diff changeset
62 faSortAmountDown,
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1399
diff changeset
63 faSortAmountUp,
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1399
diff changeset
64 faSpinner,
1299
2738a6ae9ad8 fontawesome 4 -> 5
Markus Kottlaender <markus@intevation.de>
parents: 1272
diff changeset
65 faStar,
1429
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1399
diff changeset
66 faTasks,
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1399
diff changeset
67 faTimes,
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1399
diff changeset
68 faTrash,
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1399
diff changeset
69 faUpload,
1299
2738a6ae9ad8 fontawesome 4 -> 5
Markus Kottlaender <markus@intevation.de>
parents: 1272
diff changeset
70 faUser,
1429
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1399
diff changeset
71 faUsersCog,
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1399
diff changeset
72 faWater,
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1399
diff changeset
73 faWrench
1299
2738a6ae9ad8 fontawesome 4 -> 5
Markus Kottlaender <markus@intevation.de>
parents: 1272
diff changeset
74 } from "@fortawesome/free-solid-svg-icons";
2738a6ae9ad8 fontawesome 4 -> 5
Markus Kottlaender <markus@intevation.de>
parents: 1272
diff changeset
75 import { faAdn } from "@fortawesome/free-brands-svg-icons";
1097
874d19f32015 added fontawesome5 and implemented one example icon on login screen
Markus Kottlaender <markus@intevation.de>
parents: 1019
diff changeset
76 import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
1163
fb5c83d4ea1d added copy coordinates button to fairway profile
Markus Kottlaender <markus@intevation.de>
parents: 1097
diff changeset
77 import VueClipboard from "vue-clipboard2";
1097
874d19f32015 added fontawesome5 and implemented one example icon on login screen
Markus Kottlaender <markus@intevation.de>
parents: 1019
diff changeset
78
1299
2738a6ae9ad8 fontawesome 4 -> 5
Markus Kottlaender <markus@intevation.de>
parents: 1272
diff changeset
79 library.add(
1429
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1399
diff changeset
80 faAdn,
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1399
diff changeset
81 faAngleDown,
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1399
diff changeset
82 faAngleLeft,
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1399
diff changeset
83 faAngleRight,
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1399
diff changeset
84 faAngleUp,
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1399
diff changeset
85 faBars,
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1399
diff changeset
86 faBook,
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1399
diff changeset
87 faChartArea,
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1399
diff changeset
88 faCheck,
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1399
diff changeset
89 faCity,
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1399
diff changeset
90 faClipboardCheck,
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1399
diff changeset
91 faClock,
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1399
diff changeset
92 faCopy,
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1399
diff changeset
93 faDrawPolygon,
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1399
diff changeset
94 faExclamationTriangle,
1299
2738a6ae9ad8 fontawesome 4 -> 5
Markus Kottlaender <markus@intevation.de>
parents: 1272
diff changeset
95 faEye,
2738a6ae9ad8 fontawesome 4 -> 5
Markus Kottlaender <markus@intevation.de>
parents: 1272
diff changeset
96 faEyeSlash,
1429
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1399
diff changeset
97 faFilePdf,
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1399
diff changeset
98 faFolderPlus,
1299
2738a6ae9ad8 fontawesome 4 -> 5
Markus Kottlaender <markus@intevation.de>
parents: 1272
diff changeset
99 faInfo,
2738a6ae9ad8 fontawesome 4 -> 5
Markus Kottlaender <markus@intevation.de>
parents: 1272
diff changeset
100 faLayerGroup,
1429
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1399
diff changeset
101 faMapMarkedAlt,
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1399
diff changeset
102 faMinus,
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1399
diff changeset
103 faPaperPlane,
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1399
diff changeset
104 faPencilAlt,
1586
3a30a6f4c96d unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents: 1554
diff changeset
105 faPlay,
1429
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1399
diff changeset
106 faPlus,
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1399
diff changeset
107 faPowerOff,
1299
2738a6ae9ad8 fontawesome 4 -> 5
Markus Kottlaender <markus@intevation.de>
parents: 1272
diff changeset
108 faRuler,
2738a6ae9ad8 fontawesome 4 -> 5
Markus Kottlaender <markus@intevation.de>
parents: 1272
diff changeset
109 faSearch,
2738a6ae9ad8 fontawesome 4 -> 5
Markus Kottlaender <markus@intevation.de>
parents: 1272
diff changeset
110 faShip,
1429
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1399
diff changeset
111 faSortAmountDown,
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1399
diff changeset
112 faSortAmountUp,
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1399
diff changeset
113 faSpinner,
1299
2738a6ae9ad8 fontawesome 4 -> 5
Markus Kottlaender <markus@intevation.de>
parents: 1272
diff changeset
114 faStar,
1429
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1399
diff changeset
115 faTasks,
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1399
diff changeset
116 faTimes,
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1399
diff changeset
117 faTrash,
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1399
diff changeset
118 faUpload,
1299
2738a6ae9ad8 fontawesome 4 -> 5
Markus Kottlaender <markus@intevation.de>
parents: 1272
diff changeset
119 faUser,
1429
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1399
diff changeset
120 faUsersCog,
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1399
diff changeset
121 faWater,
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1399
diff changeset
122 faWrench
1299
2738a6ae9ad8 fontawesome 4 -> 5
Markus Kottlaender <markus@intevation.de>
parents: 1272
diff changeset
123 );
1532
44e094330272 automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents: 1526
diff changeset
124 import ToggleButton from "vue-js-toggle-button";
1549
b03db5726ca5 importqueue detail view
Thomas Junk <thomas.junk@intevation.de>
parents: 1543
diff changeset
125
1532
44e094330272 automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents: 1526
diff changeset
126 Vue.use(ToggleButton);
44e094330272 automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents: 1526
diff changeset
127
1097
874d19f32015 added fontawesome5 and implemented one example icon on login screen
Markus Kottlaender <markus@intevation.de>
parents: 1019
diff changeset
128 Vue.component("font-awesome-icon", FontAwesomeIcon);
565
4bc27eea4f09 feat: Added tooltips for user roles
Thomas Junk <thomas.junk@intevation.de>
parents: 428
diff changeset
129
4bc27eea4f09 feat: Added tooltips for user roles
Thomas Junk <thomas.junk@intevation.de>
parents: 428
diff changeset
130 Vue.use(VTooltip);
295
22deb76dff2c feat: Added vue2-toastr
Thomas Junk <thomas.junk@intevation.de>
parents: 159
diff changeset
131
1368
d1d8c7bd16a1 switched from vue2-toastr to vue-snotify
Thomas Junk <thomas.junk@intevation.de>
parents: 1363
diff changeset
132 const options = {
d1d8c7bd16a1 switched from vue2-toastr to vue-snotify
Thomas Junk <thomas.junk@intevation.de>
parents: 1363
diff changeset
133 toast: {
d1d8c7bd16a1 switched from vue2-toastr to vue-snotify
Thomas Junk <thomas.junk@intevation.de>
parents: 1363
diff changeset
134 position: SnotifyPosition.centerBottom
d1d8c7bd16a1 switched from vue2-toastr to vue-snotify
Thomas Junk <thomas.junk@intevation.de>
parents: 1363
diff changeset
135 }
295
22deb76dff2c feat: Added vue2-toastr
Thomas Junk <thomas.junk@intevation.de>
parents: 159
diff changeset
136 };
22deb76dff2c feat: Added vue2-toastr
Thomas Junk <thomas.junk@intevation.de>
parents: 159
diff changeset
137
1368
d1d8c7bd16a1 switched from vue2-toastr to vue-snotify
Thomas Junk <thomas.junk@intevation.de>
parents: 1363
diff changeset
138 Vue.use(Snotify, options);
d1d8c7bd16a1 switched from vue2-toastr to vue-snotify
Thomas Junk <thomas.junk@intevation.de>
parents: 1363
diff changeset
139
d1d8c7bd16a1 switched from vue2-toastr to vue-snotify
Thomas Junk <thomas.junk@intevation.de>
parents: 1363
diff changeset
140 Vue.use(VueClipboard);
141
Thomas Junk <thomas.junk@intevation.de>
parents: 30
diff changeset
141
159
3d9341f6da4e feat: Locale of browser determines the default language
Thomas Junk <thomas.junk@intevation.de>
parents: 141
diff changeset
142 let browserLanguage = locale2;
3d9341f6da4e feat: Locale of browser determines the default language
Thomas Junk <thomas.junk@intevation.de>
parents: 141
diff changeset
143
1526
4f62e2610740 Translation: improve language detection code and correct language name
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1506
diff changeset
144 // planned also RS, BiH, UA
159
3d9341f6da4e feat: Locale of browser determines the default language
Thomas Junk <thomas.junk@intevation.de>
parents: 141
diff changeset
145 const supportedLanguages = {
3d9341f6da4e feat: Locale of browser determines the default language
Thomas Junk <thomas.junk@intevation.de>
parents: 141
diff changeset
146 en_GB: "British English",
1456
dadf309eec51 translations: add language Solvak
Bernhard Reiter <bernhard@intevation.de>
parents: 1429
diff changeset
147 de_AT: "Deutsch",
1506
bf32ef5dfb04 Translation: add aditional languages for translation
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1491
diff changeset
148 sk_SK: "slovenčina",
1526
4f62e2610740 Translation: improve language detection code and correct language name
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1506
diff changeset
149 hu_HU: "Magyar",
1506
bf32ef5dfb04 Translation: add aditional languages for translation
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1491
diff changeset
150 hr_HR: "Hrvatska",
bf32ef5dfb04 Translation: add aditional languages for translation
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1491
diff changeset
151 bg_BG: "български",
bf32ef5dfb04 Translation: add aditional languages for translation
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1491
diff changeset
152 ro_RO: "Română"
159
3d9341f6da4e feat: Locale of browser determines the default language
Thomas Junk <thomas.junk@intevation.de>
parents: 141
diff changeset
153 };
3d9341f6da4e feat: Locale of browser determines the default language
Thomas Junk <thomas.junk@intevation.de>
parents: 141
diff changeset
154
1543
240bd1db49c0 Translation: improve language detection code
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1532
diff changeset
155 let isAvailableLanguage = Object.keys(supportedLanguages).filter(language => {
240bd1db49c0 Translation: improve language detection code
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1532
diff changeset
156 return browserLanguage.replace("-", "_") === language;
1526
4f62e2610740 Translation: improve language detection code and correct language name
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1506
diff changeset
157 });
1456
dadf309eec51 translations: add language Solvak
Bernhard Reiter <bernhard@intevation.de>
parents: 1429
diff changeset
158
1543
240bd1db49c0 Translation: improve language detection code
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1532
diff changeset
159 if (isAvailableLanguage.length === 0) {
240bd1db49c0 Translation: improve language detection code
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1532
diff changeset
160 isAvailableLanguage = Object.keys(supportedLanguages).filter(language => {
240bd1db49c0 Translation: improve language detection code
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1532
diff changeset
161 return language.substr(0, 2) === browserLanguage.substr(0, 2);
240bd1db49c0 Translation: improve language detection code
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1532
diff changeset
162 });
240bd1db49c0 Translation: improve language detection code
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1532
diff changeset
163 }
240bd1db49c0 Translation: improve language detection code
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1532
diff changeset
164
1526
4f62e2610740 Translation: improve language detection code and correct language name
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1506
diff changeset
165 let defaultLanguage =
4f62e2610740 Translation: improve language detection code and correct language name
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1506
diff changeset
166 isAvailableLanguage.length > 0 ? isAvailableLanguage[0] : "en_GB";
141
Thomas Junk <thomas.junk@intevation.de>
parents: 30
diff changeset
167
Thomas Junk <thomas.junk@intevation.de>
parents: 30
diff changeset
168 Vue.use(GetTextPlugin, {
Thomas Junk <thomas.junk@intevation.de>
parents: 30
diff changeset
169 translations: translations,
159
3d9341f6da4e feat: Locale of browser determines the default language
Thomas Junk <thomas.junk@intevation.de>
parents: 141
diff changeset
170 availableLanguages: supportedLanguages,
141
Thomas Junk <thomas.junk@intevation.de>
parents: 30
diff changeset
171 defaultLanguage: defaultLanguage
Thomas Junk <thomas.junk@intevation.de>
parents: 30
diff changeset
172 });
Thomas Junk <thomas.junk@intevation.de>
parents: 30
diff changeset
173
3
1597506a2241 merge with vue-cli
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
174 Vue.config.productionTip = false;
1597506a2241 merge with vue-cli
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
175
295
22deb76dff2c feat: Added vue2-toastr
Thomas Junk <thomas.junk@intevation.de>
parents: 159
diff changeset
176 const app = new Vue({
3
1597506a2241 merge with vue-cli
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
177 router,
1597506a2241 merge with vue-cli
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
178 store,
1597506a2241 merge with vue-cli
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
179 render: h => h(App)
1597506a2241 merge with vue-cli
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
180 }).$mount("#app");
295
22deb76dff2c feat: Added vue2-toastr
Thomas Junk <thomas.junk@intevation.de>
parents: 159
diff changeset
181
22deb76dff2c feat: Added vue2-toastr
Thomas Junk <thomas.junk@intevation.de>
parents: 159
diff changeset
182 export default app;