Skip to content

Commit

Permalink
feat(#1510): add i18n
Browse files Browse the repository at this point in the history
  • Loading branch information
SteKoe committed Oct 5, 2023
1 parent 38622bf commit 9aed2d6
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import { faStopCircle as farStopCircle } from '@fortawesome/free-regular-svg-ico
import { faTimesCircle as farTimesCircle } from '@fortawesome/free-regular-svg-icons/faTimesCircle';
import {
faAngleDoubleLeft,
faCogs,
faEye,
faCogs, faExpand,
faEye, faList,
faPowerOff,
faUndoAlt,
} from '@fortawesome/free-solid-svg-icons';
Expand Down Expand Up @@ -91,6 +91,8 @@ library.add(
faInfoCircle,
faExclamationCircle,
faHome,
faList,
faExpand,
faMapMarkerAlt,
faCheckCircle,
faMinusCircle,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"suppress": "Unterdrücken",
"time": "Zeit",
"unsuppress": "Reaktivieren",
"no_group": "Keine Gruppe",
"username": "Username",
"go_to_previous_page": "Gehe zur vorherigen Seite",
"go_to_page_n": "Gehe zu Seite {page}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
"suppress": "Suppress",
"time": "Time",
"unsuppress": "Unsuppress",
"no_group": "Keine Gruppe",
"username": "Username",
"go_to_previous_page": "Go to previous page",
"go_to_page_n": "Go to page {page}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,20 @@
<template v-else>
<div class="text-right mb-6" v-if="groupNames.length > 1">
<sba-button-group>
<sba-button @click="() => setGroupingFunction('application')">By Application</sba-button>
<sba-button @click="() => setGroupingFunction('group')">By Group</sba-button>
<sba-button @click="() => setGroupingFunction('application')">
<font-awesome-icon icon="list"/>
</sba-button>
<sba-button @click="() => setGroupingFunction('group')">
<font-awesome-icon icon="expand"/>
</sba-button>
</sba-button-group>
</div>

<sba-panel
v-for="group in grouped"
:key="group.name"
:seamless="true"
:title="group.name"
:title="t(group.name)"
:subtitle="t('term.instances_tc', {count: group.instances?.length ?? 0})"
class="application-group"
@titleClick="() => toggleGroup(group.name)"
Expand Down Expand Up @@ -185,7 +189,7 @@ type InstancesListType = {

const groupingFunctions = {
'application': (instance: Instance) => instance.registration.name,
'group': (instance: Instance) => instance.registration.metadata?.['group'] ?? "Ungrouped",
'group': (instance: Instance) => instance.registration.metadata?.['group'] ?? "term.no_group",
}

export default defineComponent({
Expand Down

0 comments on commit 9aed2d6

Please sign in to comment.