Skip to content

Commit

Permalink
Merge pull request #139 from fhstp/multilingual_new
Browse files Browse the repository at this point in the history
Multilingual new
  • Loading branch information
alex-rind committed Apr 30, 2024
2 parents 92a53e3 + b6e5fd7 commit ed402f0
Show file tree
Hide file tree
Showing 32 changed files with 1,376 additions and 502 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# easyNWK Version History

## version 2.2.0, released xx xxx 2024

* (feature) make the web app multi-linugal [#83](https://github.com/fhstp/easynwk-web/issues/83)

## version 2.1.0, released 26 Feb 2024

* (feature) create or duplicate network maps to document change over time [#118](https://github.com/fhstp/easynwk-web/issues/118)
Expand Down
337 changes: 177 additions & 160 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "easynwk",
"version": "2.1.0",
"version": "2.2.0",
"private": true,
"author": "Alexander Rind (https://github.com/alex-rind/)",
"repository": "https://github.com/fhstp/easynwk-web/",
Expand Down
16 changes: 10 additions & 6 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" type="image/svg+xml" href="./favicon.svg">
<link rel="icon" type="image/png" href="./favicon.png">
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<link rel="icon" type="image/svg+xml" href="./favicon.svg" />
<link rel="icon" type="image/png" href="./favicon.png" />
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
<strong
>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work
properly without JavaScript enabled. Please enable it to
continue.</strong
>
</noscript>
<!-- built files will be auto injected -->
<div id="app"></div>
Expand Down
10 changes: 10 additions & 0 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@ export default {
created(): void {
document.documentElement.setAttribute("lang", "de");
},
methods: {
onLangChange(event: any): void {
document.documentElement.setAttribute("lang", event.target.value);
},
},
data: function () {
return {
lang: "de",
};
},
};
</script>
<style></style>
25 changes: 19 additions & 6 deletions src/components/AlteriConnectionList.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<template>
<p class="label">Beziehungen von {{ alter.name }}</p>
<p class="label">{{ t("relationshipsof") }} {{ alter.name }}</p>
<p class="help">
Klicke auf einen Kontakt um diesen mit {{ alter.name }} zu verbinden bzw.
die Verbindung zu lösen.
{{ t("clickoncontacttoconnect") }} {{ alter.name }}
{{ t("clickoncontacttoconnect2") }}
</p>

<div class="columns">
<div class="column">
<p class="label">Mögliche Kontakte</p>
<p class="label">{{ t("possiblecontacts") }}</p>
<button
v-for="other in altersNotConnected"
:key="other.id"
Expand All @@ -18,7 +18,7 @@
</button>
</div>
<div class="column">
<p class="label">Verbundene Kontakte</p>
<p class="label">{{ t("connectedcontacts") }}</p>
<button
v-for="other in altersConnected"
:key="other.id"
Expand All @@ -33,7 +33,7 @@
<div class="field is-grouped is-grouped-centered">
<p class="control">
<button @click.stop="editAlterFinished()" class="button is-primary">
Fertig
{{ t("done") }}
</button>
</p>
</div>
Expand All @@ -44,8 +44,21 @@ import { defineComponent, computed, onMounted } from "vue";
import { useStore } from "@/store";
import { isConnectable } from "@/data/Alter";
import { TAB_CONNECTIONS } from "@/store/viewOptionsModule";
import de from "@/de";
import en from "@/en";
export default defineComponent({
mixins: [de, en],
methods: {
t(prop: string) {
return this[document.documentElement.lang][prop];
},
},
data() {
return {
lang: "de",
};
},
props: {
alter: {
type: Object,
Expand Down

0 comments on commit ed402f0

Please sign in to comment.