diff --git a/frontend/.dockerignore b/frontend/.dockerignore
index 4ecd8c2b7..9fd5bc54a 100644
--- a/frontend/.dockerignore
+++ b/frontend/.dockerignore
@@ -1,3 +1,8 @@
+# Copyright (c) 2020-2021 - for information on the respective copyright owner
+# see the NOTICE file and/or the repository at
+# https://github.com/hyperledger-labs/business-partner-agent
+#
+# SPDX-License-Identifier: Apache-2.0
node_modules
dist
diff --git a/frontend/.env b/frontend/.env
index b85781abb..19bce0934 100644
--- a/frontend/.env
+++ b/frontend/.env
@@ -1,3 +1,9 @@
+# Copyright (c) 2020-2021 - for information on the respective copyright owner
+# see the NOTICE file and/or the repository at
+# https://github.com/hyperledger-labs/business-partner-agent
+#
+# SPDX-License-Identifier: Apache-2.0
+
VUE_APP_TITLE=Business Partner Agent
VUE_APP_API_BASE_URL=/api
#VUE_APP_EVENTS_HOST=localhost:8000
diff --git a/frontend/.eslintrc.js b/frontend/.eslintrc.js
index 4a9eeebbf..9a7bad3de 100644
--- a/frontend/.eslintrc.js
+++ b/frontend/.eslintrc.js
@@ -1,3 +1,10 @@
+/*
+ * Copyright (c) 2020-2021 - for information on the respective copyright owner
+ * see the NOTICE file and/or the repository at
+ * https://github.com/hyperledger-labs/business-partner-agent
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
module.exports = {
root: true,
env: {
@@ -10,5 +17,8 @@ module.exports = {
rules: {
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
+ "vue/multi-word-component-names": "off",
+ "vue/no-mutating-props": "warn",
+ "vue/valid-v-slot": "warn",
},
-};
\ No newline at end of file
+};
diff --git a/frontend/babel.config.js b/frontend/babel.config.js
index 162a3ea97..a09a8b475 100644
--- a/frontend/babel.config.js
+++ b/frontend/babel.config.js
@@ -1,3 +1,10 @@
+/*
+ * Copyright (c) 2020-2021 - for information on the respective copyright owner
+ * see the NOTICE file and/or the repository at
+ * https://github.com/hyperledger-labs/business-partner-agent
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
module.exports = {
presets: ["@vue/cli-plugin-babel/preset"],
};
diff --git a/frontend/jest.config.js b/frontend/jest.config.js
index 2c1e1b75e..84cf2dc58 100644
--- a/frontend/jest.config.js
+++ b/frontend/jest.config.js
@@ -1,3 +1,10 @@
+/*
+ * Copyright (c) 2020-2021 - for information on the respective copyright owner
+ * see the NOTICE file and/or the repository at
+ * https://github.com/hyperledger-labs/business-partner-agent
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
module.exports = {
preset: "@vue/cli-plugin-unit-jest",
verbose: true,
diff --git a/frontend/package.json b/frontend/package.json
index d8df3e43a..26d91c10e 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -1,13 +1,14 @@
{
- "name": "company-agent-frontend",
+ "name": "business-partner-agent-frontend",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"test:unit": "vue-cli-service test:unit",
"build": "vue-cli-service build",
- "lint": "vue-cli-service lint",
- "license-check": "license-checker --production --json --onlyAllow 'MIT;Python-2.0;Apache-2.0;BSD-2-Clause;BSD-3-Clause' --excludePackages 'company-agent-frontend@0.1.0'",
+ "lint": "vue-cli-service lint && npm run license-file-headers-add",
+ "license-file-headers-add": "license-check-and-add add -f licenses/config.json -r 2021",
+ "license-check": "license-checker --production --json --onlyAllow 'MIT;Python-2.0;Apache-2.0;BSD-2-Clause;BSD-3-Clause' --excludePackages 'business-partner-agent-frontend@0.1.0'",
"license": "generate-attribution -o ./licenses",
"i18n:report": "vue-cli-service i18n:report --src './src/**/*.?(js|vue)' --locales './src/locales/**/*.json'"
},
@@ -44,10 +45,11 @@
"@vue/eslint-config-prettier": "^6.0.0",
"@vue/test-utils": "^1.1.1",
"babel-eslint": "^10.1.0",
- "eslint": "^6.7.2",
+ "eslint": "^6.8.0",
"eslint-plugin-prettier": "^3.1.4",
- "eslint-plugin-vue": "^6.2.2",
+ "eslint-plugin-vue": "^8.1.0",
"husky": "^4.3.0",
+ "license-check-and-add": "^4.0.3",
"license-checker": "25.0.1",
"lint-staged": "^10.4.2",
"node-sass": "^5.0.0",
@@ -68,6 +70,7 @@
}
},
"lint-staged": {
- "**/*.{js,vue}": "prettier --write"
+ "**/*.{html,xml,ts,css,scss,env,dockerignore,sh}": "license-check-and-add add -f licenses/config.json -r 2021",
+ "**/*.{js,vue}": ["license-check-and-add add -f licenses/config.json -r 2021", "prettier --write"]
}
}
diff --git a/frontend/public/index.html b/frontend/public/index.html
index 1b87b2a63..ddcd31f8e 100644
--- a/frontend/public/index.html
+++ b/frontend/public/index.html
@@ -1,3 +1,10 @@
+
diff --git a/frontend/src/App.vue b/frontend/src/App.vue
index 67eecf7bf..1405e3c73 100644
--- a/frontend/src/App.vue
+++ b/frontend/src/App.vue
@@ -1,7 +1,7 @@
@@ -17,28 +17,32 @@
>
-
-
- {{ getNavDisplayName }}
+ >
+ {{
+ getNavDisplayName
+ }}
@@ -140,10 +144,10 @@
$vuetify.icons.settings
@@ -182,14 +186,15 @@
-
@@ -298,7 +303,8 @@
import { EventBus } from "./main";
import Taa from "./components/taa/TransactionAuthorAgreement";
import BasicMessages from "@/components/messages/BasicMessages";
-import merge from 'deepmerge';
+import merge from "deepmerge";
+import i18n from "@/plugins/i18n";
export default {
components: {
@@ -333,7 +339,7 @@ export default {
agent: {
enabled: true,
default: true,
- 'show-name': true
+ "show-name": true,
},
},
about: {
@@ -379,10 +385,13 @@ export default {
return this.$store.getters.messagesCount;
},
notificationsCount() {
- return this.$store.getters.taskNotificationsCount + this.$store.getters.activityNotificationsCount;
+ return (
+ this.$store.getters.taskNotificationsCount +
+ this.$store.getters.activityNotificationsCount
+ );
},
getAgentName() {
- let bpaName = "Business Partner Agent";
+ let bpaName = this.$t("app.bpaDefaultName");
const nameSettingValue = this.$store.getters.getSettingByKey("agentName");
if (nameSettingValue) {
bpaName = nameSettingValue;
@@ -397,7 +406,7 @@ export default {
return "";
},
getNavDisplayName() {
- if (this.ux.navigation.avatar.agent['show-name']) {
+ if (this.ux.navigation.avatar.agent["show-name"]) {
const result = this.getOrganizationName;
return result ? result : this.getAgentName;
}
@@ -418,18 +427,34 @@ export default {
this.$vuetify.theme.dark = this.ux.theme.dark
? this.ux.theme.dark
: false;
- this.$vuetify.theme.themes.light = merge(this.$vuetify.theme.themes.light, this.ux.theme.themes.light);
+ this.$vuetify.theme.themes.light = merge(
+ this.$vuetify.theme.themes.light,
+ this.ux.theme.themes.light
+ );
}
+
const uiColor = localStorage.getItem("uiColor");
+
if (uiColor) {
// if the user stored an override of the primary color, load it.
this.$vuetify.theme.themes.light.primary = uiColor;
}
+
const uiColorIcons = localStorage.getItem("uiColorIcons");
+
if (uiColorIcons) {
// if the user stored an override of the icons color, load it.
this.$vuetify.theme.themes.light.icons = uiColorIcons;
}
+
+ const locale =
+ localStorage.getItem("locale") ||
+ navigator.language.split("-")[0] ||
+ process.env.VUE_APP_I18N_LOCALE ||
+ "en";
+ i18n.locale = locale;
+ this.$vuetify.lang.current = locale;
+
// Load up an alternate favicon
if (this.ux.favicon) {
const favicon = document.getElementById("favicon");
@@ -487,7 +512,7 @@ export default {
}
// now, open or close it
this.chatWindow = !this.chatWindow;
- }
+ },
},
};
diff --git a/frontend/src/assets/scss/style.scss b/frontend/src/assets/scss/style.scss
index 778a01168..ded51db49 100644
--- a/frontend/src/assets/scss/style.scss
+++ b/frontend/src/assets/scss/style.scss
@@ -1,3 +1,10 @@
+/*
+ * Copyright (c) 2020-2021 - for information on the respective copyright owner
+ * see the NOTICE file and/or the repository at
+ * https://github.com/hyperledger-labs/business-partner-agent
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
/*
* This globally extends the base Vuetify style
*/
diff --git a/frontend/src/components/ActivityList.vue b/frontend/src/components/ActivityList.vue
index d6ac25315..4b3b89a1c 100644
--- a/frontend/src/components/ActivityList.vue
+++ b/frontend/src/components/ActivityList.vue
@@ -1,7 +1,7 @@
@@ -9,7 +9,7 @@
- Refresh
+ {{
+ $t("button.refresh")
+ }}
true,
},
- headers: {
- type: Array,
- default: () => [
- {
- text: "",
- value: "indicator",
- sortable: false,
- filterable: false,
- },
- {
- text: "Type",
- value: "type",
- },
- {
- text: "Connection",
- value: "partner",
- },
- {
- text: "Update at",
- value: "updatedAt",
- },
- {
- text: "State",
- value: "state",
- },
- ],
+ showRole: {
+ type: Boolean,
+ default: () => false,
},
},
mounted() {
@@ -135,7 +114,6 @@ export default {
isBusy: true,
items: [],
filter: null,
- filterList: [{ text: "Type", value: "type" }],
filterValue: null,
filterValueList: [],
};
@@ -156,6 +134,46 @@ export default {
},
},
computed: {
+ filterList() {
+ return [
+ {
+ text: this.headers.find((x) => x.value === "type").text,
+ value: "type",
+ },
+ ];
+ },
+ headers() {
+ return [
+ {
+ text: "",
+ value: "indicator",
+ sortable: false,
+ filterable: false,
+ },
+ {
+ text: this.$t("component.activityList.tableHeaders.type"),
+ value: "type",
+ },
+ {
+ text: this.$t("component.activityList.tableHeaders.partner"),
+ value: "partner",
+ },
+ {
+ text: this.$t("component.activityList.tableHeaders.updatedAt"),
+ value: "updatedAt",
+ },
+ this.showRole
+ ? {
+ text: this.$t("component.activityList.tableHeaders.role"),
+ value: "role",
+ }
+ : {},
+ {
+ text: this.$t("component.activityList.tableHeaders.state"),
+ value: "state",
+ },
+ ];
+ },
newMessageIconType() {
return this.tasks ? "task" : "activity";
},
@@ -248,7 +266,9 @@ export default {
return o ? o.label : role;
},
partnerLabel(partner) {
- return partner ? partner.name : "Unknown";
+ return partner
+ ? partner.name
+ : this.$t("component.activityList.labelPartnerUnknown");
},
},
};
diff --git a/frontend/src/components/AddSchema.vue b/frontend/src/components/AddSchema.vue
index ef4578343..dce7d9f31 100644
--- a/frontend/src/components/AddSchema.vue
+++ b/frontend/src/components/AddSchema.vue
@@ -1,25 +1,27 @@
- Import Schema
+
+ {{ $t("component.addSchema.title") }}
+
- Schema Name:
+ {{ $t("component.addSchema.schemaName") }}:
- Schema ID:
+ {{ $t("component.addSchema.schemaId") }}:
- Cancel
+ {{
+ $t("button.cancel")
+ }}
Submit{{ $t("button.submit") }}
@@ -83,19 +85,20 @@ export default {
schemaId: "",
},
isBusy: false,
- rules: {
- required: (value) => !!value || "Can't be empty",
- },
};
},
computed: {
+ rules() {
+ return {
+ required: (value) => !!value || this.$t("app.rules.required"),
+ };
+ },
fieldsEmpty() {
return (
this.schema.label.length === 0 || this.schema.schemaId.length === 0
);
},
},
- watch: {},
methods: {
async submit() {
this.isBusy = true;
@@ -104,7 +107,10 @@ export default {
.then((result) => {
this.isBusy = false;
if (result.status === 200) {
- EventBus.$emit("success", "Schema added successfully");
+ EventBus.$emit(
+ "success",
+ this.$t("component.addSchema.eventSuccess")
+ );
this.$emit("success");
}
})
diff --git a/frontend/src/components/BpaButton.js b/frontend/src/components/BpaButton.js
index 87073f67a..66da9795d 100644
--- a/frontend/src/components/BpaButton.js
+++ b/frontend/src/components/BpaButton.js
@@ -1,10 +1,10 @@
/*
- Copyright (c) 2021 - for information on the respective copyright owner
-see the NOTICE file and/or the repository at
-https://github.com/hyperledger-labs/organizational-agent
-
- SPDX-License-Identifier: Apache-2.0
-*/
+ * Copyright (c) 2020-2021 - for information on the respective copyright owner
+ * see the NOTICE file and/or the repository at
+ * https://github.com/hyperledger-labs/business-partner-agent
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
import { VBtn } from "vuetify/lib";
import Routable from "vuetify/es5/mixins/routable/index";
diff --git a/frontend/src/components/CreateSchema.vue b/frontend/src/components/CreateSchema.vue
index eb0f8ccc4..1620250a4 100644
--- a/frontend/src/components/CreateSchema.vue
+++ b/frontend/src/components/CreateSchema.vue
@@ -1,34 +1,36 @@
- Create Schema
+
+ {{ $t("component.createSchema.title") }}
+
- Schema Information
+ {{ $t("component.createSchema.schemaInformation") }}
- Schema Attributes
+ {{ $t("component.createSchema.schemaAttributes") }}
@@ -57,12 +59,20 @@
Name
+ {{ $t("component.createSchema.headersColumn.name") }}
+
Is Default
+ {{ $t("component.createSchema.headersColumn.isDefault") }}
+
- Action
+
+ {{ $t("component.createSchema.headersColumn.action") }}
+
+
- Cancel
+ {{
+ $t("button.cancel")
+ }}
Submit{{ $t("button.submit") }}
@@ -147,30 +159,37 @@ export default {
schemaAttributeText: "",
schemaAttributes: [{ defaultAttribute: true, text: "" }],
isBusy: false,
- rules: {
- required: (value) => !!value || "Can't be empty",
- version: (value) =>
- textUtils.isValidSchemaVersion(value) ||
- "Must be follow common version numbering (ex. 1.2 or 1.2.3)",
- schemaName: (value) =>
- textUtils.isValidSchemaName(value) ||
- "Must be alphanumeric with optional '_' or '-'.",
- schemaAttributeName: (value) =>
- textUtils.isValidSchemaAttributeName(value) ||
- "Must be lowercase alpha with optional '_'.",
- },
};
},
computed: {
fieldsEmpty() {
return (
this.schemaLabel.length === 0 ||
- this.schemaName.length === 0 || !textUtils.isValidSchemaName(this.schemaName) ||
- this.schemaVersion.length === 0 || !textUtils.isValidSchemaVersion(this.schemaVersion) ||
- this.schemaAttributes.filter((x) => x.text.trim().length).length === 0 ||
- this.schemaAttributes.filter((x) => x.text.trim().length).some(x => !textUtils.isValidSchemaAttributeName(x.text))
+ this.schemaName.length === 0 ||
+ !textUtils.isValidSchemaName(this.schemaName) ||
+ this.schemaVersion.length === 0 ||
+ !textUtils.isValidSchemaVersion(this.schemaVersion) ||
+ this.schemaAttributes.filter((x) => x.text.trim().length).length ===
+ 0 ||
+ this.schemaAttributes
+ .filter((x) => x.text.trim().length)
+ .some((x) => !textUtils.isValidSchemaAttributeName(x.text))
);
},
+ rules() {
+ return {
+ required: (value) => !!value || this.$t("app.rules.required"),
+ version: (value) =>
+ textUtils.isValidSchemaVersion(value) ||
+ this.$t("app.rules.validVersion"),
+ schemaName: (value) =>
+ textUtils.isValidSchemaName(value) ||
+ this.$t("app.rules.validSchema"),
+ schemaAttributeName: (value) =>
+ textUtils.isValidSchemaAttributeName(value) ||
+ this.$t("app.rules.validAttributeName"),
+ };
+ },
},
methods: {
makeDefaultAttribute(idx, val) {
@@ -229,7 +248,10 @@ export default {
try {
const _schema = await this.saveSchema();
if (_schema) {
- EventBus.$emit("success", "Schema created successfully");
+ EventBus.$emit(
+ "success",
+ this.$t("component.createSchema.eventSuccess")
+ );
this.resetForm();
this.$emit("success");
}
diff --git a/frontend/src/components/CredExList.vue b/frontend/src/components/CredExList.vue
index 6f9d15439..7cea18a47 100644
--- a/frontend/src/components/CredExList.vue
+++ b/frontend/src/components/CredExList.vue
@@ -1,7 +1,7 @@
@@ -270,37 +270,6 @@ import { CredentialExchangeRoles, CredentialExchangeStates } from "@/constants";
export default {
props: {
items: Array,
- headers: {
- type: Array,
- default: () => [
- {
- text: "",
- value: "indicator",
- sortable: false,
- filterable: false,
- },
- {
- text: "Type",
- value: "displayText",
- },
- {
- text: "Issued to",
- value: "partner.name",
- },
- {
- text: "Updated at",
- value: "updatedAt",
- },
- {
- text: "State",
- value: "state",
- },
- {
- text: "Revocation",
- value: "revocable",
- },
- ],
- },
isActiveFn: {
type: Function,
default: (item) =>
@@ -309,6 +278,10 @@ export default {
item.state === CredentialExchangeStates.DONE,
},
isLoading: Boolean,
+ headerRole: {
+ type: Boolean,
+ default: false,
+ },
openItemById: String,
},
created() {
@@ -333,6 +306,39 @@ export default {
}
},
computed: {
+ headers() {
+ return [
+ {
+ text: "",
+ value: "indicator",
+ sortable: false,
+ filterable: false,
+ },
+ {
+ text: this.$t("component.credExList.headers.displayText"),
+ value: "displayText",
+ },
+ {
+ text:
+ this.headerRole === true
+ ? this.$t("component.credExList.headers.role")
+ : this.$t("component.credExList.headers.partnerName"),
+ value: this.headerRole === true ? "role" : "partner.name",
+ },
+ {
+ text: this.$t("component.credExList.headers.updatedAt"),
+ value: "updatedAt",
+ },
+ {
+ text: this.$t("component.credExList.headers.state"),
+ value: "state",
+ },
+ {
+ text: this.$t("component.credExList.headers.revocable"),
+ value: "revocable",
+ },
+ ];
+ },
partnerList: {
get() {
return this.$store.getters.getPartnerSelectList;
diff --git a/frontend/src/components/Credential.vue b/frontend/src/components/Credential.vue
index 092aeec4a..aeca85b64 100644
--- a/frontend/src/components/Credential.vue
+++ b/frontend/src/components/Credential.vue
@@ -1,7 +1,7 @@
@@ -16,8 +16,7 @@
>
-
+
- Issuer
+ {{ $t("component.credential.issuerTitle") }}
-
+
{
- return this.intDoc[this.documentDataType][key] !=
- this.origIntDoc[this.documentDataType][key]
- ? true
- : false;
- }
- )
- ? true
- : false;
+ const isDirty = !!Object.keys(
+ this.origIntDoc[this.documentDataType]
+ ).find((key) => {
+ return (
+ this.intDoc[this.documentDataType][key] !==
+ this.origIntDoc[this.documentDataType][key]
+ );
+ });
this.$emit("doc-data-field-changed", isDirty);
},
@@ -153,12 +147,12 @@ export default {
// return null if we do not have a schema id.
if (!schemaId) return null;
const schemas = this.$store.getters.getSchemas;
- let schema = schemas.find((schema) => {
- return schema.schemaId === schemaId;
+ let schema = schemas.find((s) => {
+ return s.schemaId === schemaId;
});
if (schema) {
//TODO check if fields already available
- let objectTemplate = Object.assign(schema, {
+ return Object.assign(schema, {
fields: schema.schemaAttributeNames.map((key) => {
return {
type: key,
@@ -166,7 +160,6 @@ export default {
};
}),
});
- return objectTemplate;
}
return null;
},
@@ -178,7 +171,7 @@ export default {
return val;
}
});
- const s = {
+ return {
type: objData.type,
label: "",
fields: Object.keys(dataType ? objData[dataType] : objData).map(
@@ -190,11 +183,10 @@ export default {
}
),
};
- return s;
},
docFieldChanged(propertyName, event) {
- if (this.origIntDoc[propertyName] != event) {
+ if (this.origIntDoc[propertyName] !== event) {
this.intDoc[propertyName] = event;
} else {
this.intDoc[propertyName] = event;
@@ -221,7 +213,6 @@ export default {
this.documentDataType = field;
this.intDoc = this.document;
this.intCopy();
- return;
}
});
}
diff --git a/frontend/src/components/CredentialCard.vue b/frontend/src/components/CredentialCard.vue
index 23e2c11b9..62ab75299 100644
--- a/frontend/src/components/CredentialCard.vue
+++ b/frontend/src/components/CredentialCard.vue
@@ -1,7 +1,7 @@
@@ -31,7 +31,7 @@
- Details
+ {{ $t("component.credentialCard.details") }}
$expand
diff --git a/frontend/src/components/CredentialDefinitions.vue b/frontend/src/components/CredentialDefinitions.vue
index 43ad6a723..a1c0b4bfc 100644
--- a/frontend/src/components/CredentialDefinitions.vue
+++ b/frontend/src/components/CredentialDefinitions.vue
@@ -1,7 +1,7 @@
@@ -11,174 +11,177 @@
$vuetify.icons.save
$vuetify.icons.delete
-
+
$vuetify.icons.cancel
- Add Credential Definition
+ {{
+ $t("component.credentialDefinitions.buttonAddCredDef")
+ }}
diff --git a/frontend/src/components/DashboardCard.vue b/frontend/src/components/DashboardCard.vue
index 9cbb83100..d20b1d7ff 100644
--- a/frontend/src/components/DashboardCard.vue
+++ b/frontend/src/components/DashboardCard.vue
@@ -1,26 +1,32 @@
- {{this.title}}
+ {{ this.title }}
- {{this.icon}}
+
+ {{ this.icon }}
+
- {{this.count}}
+ {{ this.count }}
- {{this.newCountDisplay}}
+ {{ this.newCountDisplay }}
@@ -28,49 +34,50 @@
- $vuetify.icons.dashboardGo
-
+ $vuetify.icons.dashboardGo
+
diff --git a/frontend/src/components/IssueCredential.vue b/frontend/src/components/IssueCredential.vue
index 301d7dcb2..faccf14ea 100644
--- a/frontend/src/components/IssueCredential.vue
+++ b/frontend/src/components/IssueCredential.vue
@@ -1,7 +1,7 @@
@@ -115,7 +115,6 @@
:key="field.type"
:label="field.label"
v-model="credentialFields[field.type]"
- placeholder=""
outlined
dense
@blur="enableSubmit"
@@ -145,15 +144,15 @@
- Cancel
+ {{
+ $t("button.cancel")
+ }}
Submit{{ $t("button.submit") }}
@@ -367,13 +366,17 @@ export default {
reader.onerror = (evt) => {
EventBus.$emit(
"error",
- `Error reading file '${v.name}'. ${evt.message}`
+ `${this.$t(
+ "component.issueCredential.expertLoad.errorMessages.readFile"
+ )} '${v.name}'. ${evt.message}`
);
};
} catch (e) {
EventBus.$emit(
"error",
- `Error reading file '${v.name}'. ${e.message}`
+ `${this.$t(
+ "component.issueCredential.expertLoad.errorMessages.readFile"
+ )} '${v.name}'. ${e.message}`
);
}
}
diff --git a/frontend/src/components/ManageSchema.vue b/frontend/src/components/ManageSchema.vue
index fd2d69f06..0899f4c85 100644
--- a/frontend/src/components/ManageSchema.vue
+++ b/frontend/src/components/ManageSchema.vue
@@ -1,7 +1,7 @@
@@ -30,7 +30,7 @@
readonly
outlined
dense
- label="Schema ID"
+ :label="$t('component.manageSchema.labelSchemaId')"
:append-icon="'$vuetify.icons.copy'"
@click:append="copySchemaId"
>
@@ -38,7 +38,7 @@
- Close
+ {{
+ $t("button.close")
+ }}
@@ -111,7 +113,6 @@ export default {
type: Boolean,
default: () => false,
},
- schema: Object,
trustedIssuers: {
type: Boolean,
default: () => true,
@@ -120,6 +121,7 @@ export default {
type: Boolean,
default: () => true,
},
+ value: {},
},
components: {
VBpaButton,
@@ -134,7 +136,6 @@ export default {
}
},
},
- created() {},
data: () => {
return {
tab: null,
@@ -142,15 +143,31 @@ export default {
};
},
computed: {
+ schema: {
+ get() {
+ return this.value;
+ },
+ set(val) {
+ this.$emit("input", val);
+ },
+ },
items() {
- const tabs = [{ title: "Schema Attributes", key: "schema-attributes" }];
+ const tabs = [
+ {
+ title: this.$t("component.manageSchema.tabs.schemaAttributes"),
+ key: "schema-attributes",
+ },
+ ];
if (this.credentialDefinitions)
tabs.push({
- title: "Credential Definitions",
+ title: this.$t("component.manageSchema.tabs.credentialDefinitions"),
key: "credential-definitions",
});
if (!this.schema.isMine && this.trustedIssuers)
- tabs.push({ title: "Trusted Issuers", key: "trusted-issuers" });
+ tabs.push({
+ title: this.$t("component.manageSchema.tabs.trustedIssuers"),
+ key: "trusted-issuers",
+ });
return tabs;
},
},
@@ -158,15 +175,21 @@ export default {
copySchemaId() {
let idEl = document.querySelector("#schemaId");
idEl.select();
- let successfull;
+ let successful;
try {
- successfull = document.execCommand("copy");
+ successful = document.execCommand("copy");
} catch (err) {
- successfull = false;
+ successful = false;
}
- successfull
- ? EventBus.$emit("success", "Schema ID copied")
- : EventBus.$emit("error", "Can't copy Schema ID");
+ successful
+ ? EventBus.$emit(
+ "success",
+ this.$t("component.manageSchema.eventSuccessCopy")
+ )
+ : EventBus.$emit(
+ "error",
+ this.$t("component.manageSchema.eventErrorCopy")
+ );
idEl.blur();
window.getSelection().removeAllRanges();
},
@@ -176,7 +199,10 @@ export default {
.then((result) => {
console.log(result);
if (result.status === 200) {
- EventBus.$emit("success", "Schema deleted");
+ EventBus.$emit(
+ "success",
+ this.$t("component.manageSchema.eventSuccessDelete")
+ );
this.$emit("changed");
this.$emit("deleted");
}
diff --git a/frontend/src/components/MyCredentialList.vue b/frontend/src/components/MyCredentialList.vue
index dc30232c8..ac7674e45 100644
--- a/frontend/src/components/MyCredentialList.vue
+++ b/frontend/src/components/MyCredentialList.vue
@@ -1,7 +1,7 @@
@@ -95,8 +95,8 @@
diff --git a/frontend/src/components/OrganizationalProfile.vue b/frontend/src/components/OrganizationalProfile.vue
index 208b0fd6b..b69a5323c 100644
--- a/frontend/src/components/OrganizationalProfile.vue
+++ b/frontend/src/components/OrganizationalProfile.vue
@@ -1,7 +1,7 @@
@@ -16,8 +16,7 @@
diff --git a/frontend/src/components/PresentationExList.vue b/frontend/src/components/PresentationExList.vue
index 2265bc1db..e86ca37d1 100644
--- a/frontend/src/components/PresentationExList.vue
+++ b/frontend/src/components/PresentationExList.vue
@@ -1,7 +1,7 @@
@@ -150,14 +150,14 @@ import PresentationRecordV2 from "@/components/PresentationRecordV2";
import VBpaButton from "@/components/BpaButton";
export default {
props: {
- items: Array,
+ value: Array,
openItemById: String,
},
mounted() {
// Open Item directly. Is used for links from notifications/activity
if (this.openItemById) {
// FIXME: items observable is typically not resolved yet. Then items is empty
- const item = this.items.find((item) => item.id === this.openItemById);
+ const item = this.items.find((i) => i.id === this.openItemById);
if (item) {
this.openItem(item);
} else {
@@ -179,7 +179,19 @@ export default {
isLoading: false,
isWaitingForMatchingCreds: false,
declineReasonText: "",
- headers: [
+ };
+ },
+ computed: {
+ items: {
+ get() {
+ return this.value;
+ },
+ set(val) {
+ this.$emit("input", val);
+ },
+ },
+ headers() {
+ return [
{
text: "",
value: "indicator",
@@ -187,25 +199,23 @@ export default {
filterable: false,
},
{
- text: "Name",
+ text: this.$t("component.presentationExList.table.label"),
value: "label",
},
{
- text: "Role",
+ text: this.$t("component.presentationExList.table.role"),
value: "role",
},
{
- text: "Updated at",
+ text: this.$t("component.presentationExList.table.updatedAt"),
value: "updatedAt",
},
{
- text: "State",
+ text: this.$t("component.presentationExList.table.state"),
value: "state",
},
- ],
- };
- },
- computed: {
+ ];
+ },
showV2() {
return (
this.record.state &&
@@ -241,7 +251,10 @@ export default {
const payload = this.prepareApprovePayload();
try {
await proofExService.approveProofRequest(this.record.id, payload);
- EventBus.$emit("success", "Proof has been sent");
+ EventBus.$emit(
+ "success",
+ this.$t("component.presentationExList.eventSuccessApprove")
+ );
this.closeDialog();
this.$emit("changed");
} catch (e) {
@@ -254,7 +267,10 @@ export default {
this.record.id,
this.declineReasonText
);
- EventBus.$emit("success", "Presentation request declined");
+ EventBus.$emit(
+ "success",
+ this.$t("component.presentationExList.eventSuccessDecline")
+ );
this.closeDialog();
this.$emit("changed");
} catch (e) {
@@ -302,7 +318,10 @@ export default {
(item) => item.id === this.record.id
);
this.items.splice(idx, 1);
- EventBus.$emit("success", "Presentation record deleted");
+ EventBus.$emit(
+ "success",
+ this.$t("component.presentationExList.eventSuccessDelete")
+ );
this.closeDialog();
}
} catch (e) {
@@ -411,7 +430,6 @@ export default {
});
this.record.canBeFullfilled = this.canBeFullfilled();
-
this.isWaitingForMatchingCreds = false;
});
},
diff --git a/frontend/src/components/PresentationRecord.vue b/frontend/src/components/PresentationRecord.vue
index 31da093ca..b301e3912 100644
--- a/frontend/src/components/PresentationRecord.vue
+++ b/frontend/src/components/PresentationRecord.vue
@@ -1,7 +1,7 @@
@@ -10,7 +10,7 @@
- Role
+ {{ $t("view.presentationRecord.role") }}
{{ record.role | capitalize }}
@@ -19,7 +19,7 @@
- State
+ {{ $t("view.presentationRecord.state") }}
{{ (record.state ? record.state.replace("_", " ") : "") | capitalize }}
@@ -28,7 +28,7 @@
- Request Name
+ {{ $t("view.presentationRecord.requestName") }}
{{ record.proofRequest ? record.proofRequest.name : "" }}
@@ -39,7 +39,7 @@
- Request Content:
+ {{ $t("view.presentationRecord.requestContent") }}:
@@ -62,14 +62,16 @@
class="ml-n4 mb-4"
>
- Issuer
+ {{ $t("view.presentationRecord.issuer") }}
{{ group.proofData.identifier.issuerLabel }}
- Data fields
+
+ {{ $t("view.presentationRecord.dataFields") }}
+
@@ -104,9 +106,10 @@
Restrictions{{
+ $t("view.presentationRecord.restrictions")
+ }}
-
- Presentation is valid
+ {{ $t("view.presentationRecord.presentationValid") }}
- Presentation is not valid
+ {{ $t("view.presentationRecord.presentationNotValid") }}
@@ -273,7 +276,9 @@ export default {
return `${credInfo.credentialId} ${revokedLabel}`;
}
} else {
- return "No info found";
+ return this.$t(
+ "view.presentationRecord.matchingCredentials.noInfoFound"
+ );
}
},
renderSchemaLabel(attrGroupName) {
diff --git a/frontend/src/components/PresentationRecordV2.vue b/frontend/src/components/PresentationRecordV2.vue
index 142a776ad..b1efaf42c 100644
--- a/frontend/src/components/PresentationRecordV2.vue
+++ b/frontend/src/components/PresentationRecordV2.vue
@@ -1,7 +1,7 @@
@@ -11,16 +11,16 @@
- Presentation is valid
+ {{ $t("view.presentationRecord.presentationValid") }}
- Presentation is not valid
+ {{ $t("view.presentationRecord.presentationNotValid") }}
- Request Content:
+ {{ $t("view.presentationRecord.requestContent") }}
- About
+ {{
+ $t("view.presentationRecord.about")
+ }}
@@ -46,7 +48,7 @@
- Role
+ {{ $t("view.presentationRecord.role") }}
{{ record.role | capitalize }}
@@ -57,7 +59,7 @@
- State
+ {{ $t("view.presentationRecord.state") }}
{{
@@ -72,7 +74,7 @@
- Request Name
+ {{ $t("view.presentationRecord.requestName") }}
{{ record.proofRequest ? record.proofRequest.name : "" }}
@@ -181,7 +183,9 @@ export default {
return credInfo.credentialId;
}
} else {
- return "No info found";
+ return this.$t(
+ "view.presentationRecord.matchingCredentials.noInfoFound"
+ );
}
},
renderSchemaLabel(attrGroupName) {
diff --git a/frontend/src/components/Profile.vue b/frontend/src/components/Profile.vue
index e7aa59189..614414b26 100644
--- a/frontend/src/components/Profile.vue
+++ b/frontend/src/components/Profile.vue
@@ -1,7 +1,7 @@
@@ -13,7 +13,7 @@
$t("component.profile.organizationalProfile.title")
}}
@@ -87,15 +87,14 @@
diff --git a/frontend/src/views/AddSchema.vue b/frontend/src/views/AddSchema.vue
index 76d642fd5..2e8073df7 100644
--- a/frontend/src/views/AddSchema.vue
+++ b/frontend/src/views/AddSchema.vue
@@ -1,7 +1,7 @@
@@ -12,17 +12,17 @@
$vuetify.icons.prev
- Add Schema
+ {{ $t("view.addSchema.title") }}
- Schema Name:
+ {{ $t("view.addSchema.schemaName") }}:
- Schema ID:
+ {{ $t("view.addSchema.schemaId") }}:
- Submit
+ {{ $t("button.submit") }}
@@ -71,7 +71,7 @@
diff --git a/frontend/src/views/ContactPerson.vue b/frontend/src/views/ContactPerson.vue
index 65fc0b69b..2b46c8ff4 100644
--- a/frontend/src/views/ContactPerson.vue
+++ b/frontend/src/views/ContactPerson.vue
@@ -1,7 +1,7 @@
@@ -10,7 +10,7 @@
- Cancel
+ {{
+ $t("button.cancel")
+ }}
Save{{ $t("button.save") }}
@@ -112,18 +104,49 @@
diff --git a/frontend/src/views/Credential.vue b/frontend/src/views/Credential.vue
index 94721c672..bd4a3c1f7 100644
--- a/frontend/src/views/Credential.vue
+++ b/frontend/src/views/Credential.vue
@@ -1,7 +1,7 @@
@@ -9,12 +9,7 @@
-
+
$vuetify.icons.prev
@@ -54,14 +49,14 @@
- Cancel
+ {{
+ $t("button.cancel")
+ }}
Save{{ $t("button.save") }}
@@ -69,7 +64,7 @@
Show raw data{{ $t("showRawData") }}
@@ -81,9 +76,9 @@
diff --git a/frontend/src/views/Document.vue b/frontend/src/views/Document.vue
index f8450ff61..411447b15 100644
--- a/frontend/src/views/Document.vue
+++ b/frontend/src/views/Document.vue
@@ -1,7 +1,7 @@
@@ -28,7 +28,7 @@
- Verification
- Request a verification
+ {{
+ $t("view.document.verification")
+ }}
+ {{
+ $t("view.document.verificationSubtitle")
+ }}
-
-
- Document modified, please save before start verification
+ {{ $t("view.document.modified") }}
@@ -104,9 +102,9 @@
v-model="useV2Exchange"
:label="$t('button.useV2')"
>
- Cancel
+ {{
+ $t("button.cancel")
+ }}
Save & Close{{ $t("button.saveAndClose") }}
@@ -127,7 +125,7 @@
Show raw data{{ $t("showRawData") }}
@@ -177,10 +175,10 @@ export default {
},
created() {
if (this.id && !this.type) {
- EventBus.$emit("title", "Edit Document");
+ EventBus.$emit("title", this.$t("view.document.titleExisting"));
this.getDocument();
} else {
- EventBus.$emit("title", "Create new Document");
+ EventBus.$emit("title", this.$t("view.document.titleNew"));
this.document.type = this.type;
this.document.schemaId = this.schemaId;
this.document.isPublic = this.isProfile(this.document.type);
@@ -230,7 +228,12 @@ export default {
this.document = result.data;
this.intDoc = { ...this.document };
this.isReady = true;
- EventBus.$emit("title", "Edit (" + this.document.typeLabel + ")");
+ EventBus.$emit(
+ "title",
+ `${this.$t("view.document.titleEdit")} (${
+ this.document.typeLabel
+ })`
+ );
}
})
.catch((e) => {
@@ -258,7 +261,10 @@ export default {
} else {
this.$router.go(this.$router.currentRoute);
}
- EventBus.$emit("success", "Success");
+ EventBus.$emit(
+ "success",
+ this.$t("view.document.eventSuccessSaveEdit")
+ );
})
.catch((e) => {
this.isBusy = false;
@@ -284,7 +290,10 @@ export default {
});
this.isBusy = false;
this.$router.go(-1);
- EventBus.$emit("success", "Success");
+ EventBus.$emit(
+ "success",
+ this.$t("view.document.eventSuccessSaveNew")
+ );
})
.catch((e) => {
this.isBusy = false;
@@ -297,7 +306,10 @@ export default {
.delete(`${this.$apiBaseUrl}/wallet/document/${this.id}`)
.then((result) => {
if (result.status === 200) {
- EventBus.$emit("success", "Document deleted");
+ EventBus.$emit(
+ "success",
+ this.$t("view.document.eventSuccessDelete")
+ );
this.$router.go(-1);
}
})
diff --git a/frontend/src/views/Identity.vue b/frontend/src/views/Identity.vue
index 0bcb6068a..87d64c66e 100644
--- a/frontend/src/views/Identity.vue
+++ b/frontend/src/views/Identity.vue
@@ -1,7 +1,7 @@
@@ -9,7 +9,7 @@
- Identity Information
+ {{ $t("view.identity.titleInfo") }}
@@ -18,12 +18,12 @@
diff --git a/frontend/src/views/settings/SchemaSettings.vue b/frontend/src/views/settings/SchemaSettings.vue
index 05baa1f5f..b93cb23a2 100644
--- a/frontend/src/views/settings/SchemaSettings.vue
+++ b/frontend/src/views/settings/SchemaSettings.vue
@@ -1,7 +1,7 @@
@@ -12,7 +12,7 @@
$vuetify.icons.prev
- Schemas
+ {{ $t("view.schemaSettings.title") }}
- Create Schema
+ {{
+ $t("view.schemaSettings.buttonCreateSchema")
+ }}
- Import Schema
+ {{
+ $t("view.schemaSettings.buttonImportSchema")
+ }}
{
return {
@@ -76,7 +75,6 @@ export default {
createSchemaDialog: false,
};
},
- computed: {},
methods: {
onSchemaAdded() {
store.dispatch("loadSchemas");
diff --git a/frontend/src/views/settings/Settings.vue b/frontend/src/views/settings/Settings.vue
index 7bfcaa200..c297d0fdc 100644
--- a/frontend/src/views/settings/Settings.vue
+++ b/frontend/src/views/settings/Settings.vue
@@ -1,14 +1,28 @@
- Settings
+ {{
+ $t("view.settings.title")
+ }}
+
+
+ {{ $t("view.settings.language") }}
+
+
+
{{ $t("view.settings.walletDID") }}
@@ -37,7 +51,7 @@
Tags{{ $t("view.settings.tags") }}
@@ -48,7 +62,7 @@
- Frontend Color
+ {{ $t("view.settings.frontendColor") }}
- Icons Color
+ {{ $t("view.settings.iconsColor") }}
-
{{ setting.text }}
{{ setting.value }}
-
@@ -123,51 +135,85 @@