Skip to content

Commit

Permalink
Merge pull request #177 from catenax-ng/release/v2.1.0-i18n
Browse files Browse the repository at this point in the history
[ 4° ] - Release/v2.1.0 i18n: Multi-language EN and DE
  • Loading branch information
saudkhan116 authored Feb 2, 2024
2 parents 526c40f + c0ae264 commit df416eb
Show file tree
Hide file tree
Showing 33 changed files with 1,673 additions and 985 deletions.
20 changes: 6 additions & 14 deletions src/assets/styles/components/general/header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,11 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
@media (max-width: 585px) {
.header-container{
padding: 0px 14px 0 0px!important;
@media (max-width: 585px) {
.header-container {
padding: 0px 14px 0 0px !important;
}
}

}

.header-container {
position: fixed;
Expand Down Expand Up @@ -110,21 +109,14 @@
line-height: 1.42857;
.language {
color: $catena-x-blue;
margin: 0px 16px 0px 0px;
font-weight: 500;
cursor: pointer;
}
.active {
font-weight: 500;
color: black;
border-bottom: 2px solid;
}

.inactive {
color: rgb(15 113 203 / 50%);
font-weight: 500;
cursor: not-allowed;
margin: 0px 16px 0px 0px;
line-height: 1.42857;
}
}

.role {
Expand Down
4 changes: 2 additions & 2 deletions src/components/general/Dialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<v-card class="dialog-container">
<v-card-title class="title-container">
<v-icon start size="small" icon="mdi-information-outline"> </v-icon>
<slot name="title"> Description </slot>
<slot name="title"> {{ $t("dialog.description") }} </slot>
<v-card-actions class="close-btn-container">
<v-btn class="close-btn-container" block @click="dialog = false">
<v-icon start md icon="mdi-close"></v-icon
Expand All @@ -40,7 +40,7 @@
<v-card-text class="dialog-text">
<slot name="text">
<h2>404</h2>
<p>No description</p>
<p>{{ $t("dialog.noDescription") }}</p>
</slot>
</v-card-text>
</v-card>
Expand Down
267 changes: 152 additions & 115 deletions src/components/general/ErrorComponent.vue
Original file line number Diff line number Diff line change
@@ -1,115 +1,152 @@
<!--
Catena-X - Product Passport Consumer Frontend

Copyright (c) 2022, 2023 BASF SE, BMW AG, Henkel AG & Co. KGaA

See the NOTICE file(s) distributed with this work for additional
information regarding copyright ownership.

This program and the accompanying materials are made available under the
terms of the Apache License, Version 2.0 which is available at
https://www.apache.org/licenses/LICENSE-2.0.

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied. See the
License for the specific language govern in permissions and limitations
under the License.

SPDX-License-Identifier: Apache-2.0
-->


<template>
<v-container class="page-not-found fill-height align-self-center justify-center">
<v-row class="justify-center">
<v-col class="v-col-auto justify-center" style="height: fit-content">
<img src="@/media/404.svg" class="h-100">
</v-col>
<v-col class="v-col-sm-12 v-col-md-6 v-col-lg-6">
<v-container fluid>
<template v-if="title">
<v-row>
<v-col><span class="title">{{ title }}</span></v-col>
</v-row>
</template>
<template v-if="subTitle">
<v-row>
<v-col><span class="subTitle">{{ subTitle }}</span></v-col>
</v-row>
</template>
<template v-if="explanation || description || adminLabel">
<v-row>
<v-col><span class="description"><template v-if="description">{{ description }}</template> <template v-if="explanation">{{ explanation }}</template> <template v-if="adminLabel"><a :href="'mailto:'+adminEmail">{{adminLabel}}</a></template></span></v-col>
</v-row>
</template>
<template v-if="buttonsVisible">
<v-row class="justify-center">
<v-col class="v-col-auto"><v-btn size="large" class="btn" rounded="pill" color="primary" :prepend-icon="reloadIcon" @click="$router.go(back)">{{reloadLabel}}</v-btn></v-col>
<v-col class="v-col-auto"><v-btn size="large" class="btn" rounded="pill" variant="outlined" :href="homepage">Homepage</v-btn></v-col>
</v-row>
</template>
</v-container>
</v-col>
</v-row>
</v-container>
</template>

<script>
import { ADMIN_EMAIL } from "@/services/service.const";
export default {
name: "ErrorComponent",
props: {
title: {
type: [String,Number],
default: "404 Not Found",
},
subTitle:{
type: [String,Number],
default: "Oops, Something went wrong..."
},
description: {
type: Number,
default: null
},
explanation: {
type: String,
default: "The server encountered an internal error or misconfiguration and was unable to complete your request."
},
adminLabel:{
type: String,
default: "Please contact your admin"
},
adminEmail:{
type: String,
default: ADMIN_EMAIL,
},
buttonsVisible:{
type: Boolean,
default: true
},
back:{
type: [String, Number],
default: -1
},
homepage:{
type: String,
default: "/"
},
reloadLabel:{
type: String,
default: "Reload Page"
},
reloadIcon:{
type: String,
default: null
}
}
};
</script>
<style scoped>
.error {
width: 110%;
}
</style>

<!--
Catena-X - Product Passport Consumer Frontend

Copyright (c) 2022, 2023 BASF SE, BMW AG, Henkel AG & Co. KGaA

See the NOTICE file(s) distributed with this work for additional
information regarding copyright ownership.

This program and the accompanying materials are made available under the
terms of the Apache License, Version 2.0 which is available at
https://www.apache.org/licenses/LICENSE-2.0.

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied. See the
License for the specific language govern in permissions and limitations
under the License.

SPDX-License-Identifier: Apache-2.0
-->


<template>
<v-container
class="page-not-found fill-height align-self-center justify-center"
>
<v-row class="justify-center">
<v-col class="v-col-auto justify-center" style="height: fit-content">
<img src="@/media/404.svg" class="h-100" />
</v-col>
<v-col class="v-col-sm-12 v-col-md-6 v-col-lg-6">
<v-container fluid>
<template v-if="title">
<v-row>
<v-col
><span class="title">{{ $t(title) }}</span></v-col
>
</v-row>
</template>
<template v-if="subTitle">
<v-row>
<v-col
><span class="subTitle">{{ $t(subTitle) }}</span></v-col
>
</v-row>
</template>
<template v-if="explanation || description || adminLabel">
<v-row>
<v-col
><span class="description"
><template v-if="description">{{ $t(description) }}</template>
<template v-if="explanation">{{ $t(explanation) }}</template>
<template v-if="adminLabel"
><a :href="'mailto:' +adminEmail">{{
$t(adminLabel)
}}</a></template
></span
></v-col
>
</v-row>
</template>
<template v-if="buttonsVisible">
<v-row class="justify-center">
<v-col class="v-col-auto"
><v-btn
size="large"
class="btn"
rounded="pill"
color="primary"
:prepend-icon="reloadIcon"
@click="$router.go(back)"
>{{ $t(reloadLabel) }}</v-btn
></v-col
>
<v-col class="v-col-auto"
><v-btn
size="large"
class="btn"
rounded="pill"
variant="outlined"
:href="homepage"
>{{ $t("homepage") }}</v-btn
></v-col
>
</v-row>
</template>
</v-container>
</v-col>
</v-row>
</v-container>
</template>

<script>
import { ADMIN_EMAIL } from "@/services/service.const";
export default {
name: "ErrorComponent",
props: {
title: {
type: [String,Number],
default: "404 Not Found",
},
subTitle:{
type: [String,Number],
default: "Oops, Something went wrong..."
},
description: {
type: Number,
default: null
},
explanation: {
type: String,
default: "The server encountered an internal error or misconfiguration and was unable to complete your request."
},
adminLabel:{
type: String,
default: "Please contact your admin"
},
adminEmail:{
type: String,
default: ADMIN_EMAIL,
},
buttonsVisible:{
type: Boolean,
default: true
},
back:{
type: [String, Number],
default: -1
},
homepage:{
type: String,
default: "/"
},
reloadLabel:{
type: String,
default: "Reload Page"
},
reloadIcon:{
type: String,
default: null
}
}
};
</script>
<style scoped>
.error {
width: 110%;
}
</style>

Loading

0 comments on commit df416eb

Please sign in to comment.