Skip to content

Commit

Permalink
Merge pull request #200 from Progress1/translate_warn
Browse files Browse the repository at this point in the history
Remove false translation warnings, correct some tooltips, don't try translate user strings
  • Loading branch information
Progress1 authored Mar 7, 2024
2 parents b81c9a7 + 010b8de commit 8c2d9a5
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 33 deletions.
10 changes: 5 additions & 5 deletions src/gui/src/components/assets/ToolbarFilterAssets.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@
<!-- FAVORITES -->
<v-chip-group v-bind="UI.TOOLBAR.GROUP.FAVORITES">
<v-chip v-bind="UI.TOOLBAR.CHIP.GROUP" @click="filterVulnerable">
<v-icon v-bind="UI.TOOLBAR.ICON.FAVORITES_CHIP" :title="$t('assess.tooltip.filter_read')">{{ UI.ICON.VULNERABLE }}</v-icon>
<v-icon v-bind="UI.TOOLBAR.ICON.FAVORITES_CHIP" :title="$t('assets.tooltip.filter_vulnerable')">{{ UI.ICON.VULNERABLE }}</v-icon>
</v-chip>
</v-chip-group>

<!-- SORT -->
<v-chip-group v-bind="UI.TOOLBAR.GROUP.SORT">
<v-chip v-bind="UI.TOOLBAR.CHIP.GROUP" @click="filterSort('ALPHABETICAL')" :title="$t('assess.tooltip.sort.date.descending')">
<v-chip v-bind="UI.TOOLBAR.CHIP.GROUP" @click="filterSort('ALPHABETICAL')" :title="$t('assets.tooltip.sort.alphabetical.ascending')">
<v-icon v-bind="UI.TOOLBAR.ICON.SORT_CHIP_A">{{ UI.ICON.ALPHABETICAL }}</v-icon>
<v-icon v-bind="UI.TOOLBAR.ICON.SORT_CHIP_B">{{ UI.ICON.DESC }}</v-icon>
<v-icon v-bind="UI.TOOLBAR.ICON.SORT_CHIP_B">{{ UI.ICON.ASC }}</v-icon>
</v-chip>
<v-chip v-bind="UI.TOOLBAR.CHIP.GROUP" @click="filterSort('VULNERABILITY')" :title="$t('assess.tooltip.sort.date.ascending')">
<v-chip v-bind="UI.TOOLBAR.CHIP.GROUP" @click="filterSort('VULNERABILITY')" :title="$t('assets.tooltip.sort.vulnerability.descending')">
<v-icon v-bind="UI.TOOLBAR.ICON.SORT_CHIP_A">{{ UI.ICON.VULNERABLE }}</v-icon>
<v-icon v-bind="UI.TOOLBAR.ICON.SORT_CHIP_B">{{ UI.ICON.ASC }}</v-icon>
<v-icon v-bind="UI.TOOLBAR.ICON.SORT_CHIP_B">{{ UI.ICON.DESC }}</v-icon>
</v-chip>
</v-chip-group>
</v-col>
Expand Down
5 changes: 4 additions & 1 deletion src/gui/src/components/common/Navigation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
<v-list-item class="px-1" v-for="link in filteredLinks" :key="link.id" router :to="link.route">
<v-list-item-content class="py-2" v-if="!link.separator">
<v-icon color="cx-drawer-text">{{ link.icon }}</v-icon>
<v-list-item-title class="cx-drawer-text--text caption">{{ $t(link.title) }}</v-list-item-title>
<v-list-item-title class="cx-drawer-text--text caption">
<span v-if="link.translate">{{ $t(link.title) }}</span>
<span v-else>{{ link.title }}</span>
</v-list-item-title>
</v-list-item-content>
<v-list-item-content class="separator py-0 blue-grey" v-else>
<v-divider class="section-divider " color="white"></v-divider>
Expand Down
18 changes: 16 additions & 2 deletions src/gui/src/i18n/en/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,7 @@ const messages_en = {
MONTH: 'Show news items for the last month'
},
sort: {
time: {
date: {
ascending: 'Sort news items by collected date ascending',
descending: 'Sort news items by collected date descending'
},
Expand Down Expand Up @@ -832,6 +832,20 @@ const messages_en = {
},
},

assets: {
tooltip: {
filter_vulnerable: "Show/hide vulnerable assets",
sort: {
vulnerability: {
descending: 'Sort assets by vulnerability in descending order',
},
alphabetical: {
ascending: 'Sort assets alphabetically in ascending order',
},
},
}
},

publish: {
tooltip: {
range: {
Expand All @@ -841,7 +855,7 @@ const messages_en = {
MONTH: 'Show products for the last month'
},
sort: {
time: {
date: {
ascending: 'Sort products by creation date ascending',
descending: 'Sort products by creation date descending'
}
Expand Down
36 changes: 18 additions & 18 deletions src/gui/src/views/nav/ConfigNav.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,31 +16,31 @@
},
data: () => ({
links: [
{ id: 1, icon: 'mdi-account-group', title: 'nav_menu.users', route: '/config/users', permission: 'CONFIG_USER_ACCESS' },
{ id: 2, icon: 'mdi-office-building', title: 'nav_menu.organizations', route: '/config/organizations', permission: 'CONFIG_ORGANIZATION_ACCESS' },
{ id: 3, icon: 'mdi-account-arrow-right', title: 'nav_menu.roles', route: '/config/roles', permission: 'CONFIG_ROLE_ACCESS' },
{ id: 4, icon: 'mdi-lock-check', title: 'nav_menu.acls', route: '/config/acls', permission: 'CONFIG_ACL_ACCESS' },
{ id: 1, icon: 'mdi-account-group', title: 'nav_menu.users', route: '/config/users', permission: 'CONFIG_USER_ACCESS', translate: '1' },
{ id: 2, icon: 'mdi-office-building', title: 'nav_menu.organizations', route: '/config/organizations', permission: 'CONFIG_ORGANIZATION_ACCESS', translate: '1' },
{ id: 3, icon: 'mdi-account-arrow-right', title: 'nav_menu.roles', route: '/config/roles', permission: 'CONFIG_ROLE_ACCESS', translate: '1' },
{ id: 4, icon: 'mdi-lock-check', title: 'nav_menu.acls', route: '/config/acls', permission: 'CONFIG_ACL_ACCESS', translate: '1' },
{ id: 5, separator: '1' },
{ id: 6, icon: 'mdi-server-network', title: 'nav_menu.collectors_nodes', route: '/config/collectors/nodes', permission: 'CONFIG_COLLECTORS_NODE_ACCESS' },
{ id: 7, icon: 'mdi-animation-outline', title: 'nav_menu.osint_sources', route: '/config/collectors/sources', permission: 'CONFIG_OSINT_SOURCE_ACCESS'},
{ id: 8, icon: 'mdi-folder-multiple', title: 'nav_menu.osint_source_groups', route: '/config/collectors/groups', permission: 'CONFIG_OSINT_SOURCE_GROUP_ACCESS'},
{ id: 6, icon: 'mdi-server-network', title: 'nav_menu.collectors_nodes', route: '/config/collectors/nodes', permission: 'CONFIG_COLLECTORS_NODE_ACCESS', translate: '1' },
{ id: 7, icon: 'mdi-animation-outline', title: 'nav_menu.osint_sources', route: '/config/collectors/sources', permission: 'CONFIG_OSINT_SOURCE_ACCESS', translate: '1' },
{ id: 8, icon: 'mdi-folder-multiple', title: 'nav_menu.osint_source_groups', route: '/config/collectors/groups', permission: 'CONFIG_OSINT_SOURCE_GROUP_ACCESS', translate: '1' },
{ id: 9, separator: '1' },
{ id: 10, icon: 'mdi-server-network', title: 'nav_menu.presenters_nodes', route: '/config/presenters/nodes', permission: 'CONFIG_PRESENTERS_NODE_ACCESS' },
{ id: 12, icon: 'mdi-file-document-outline', title: 'nav_menu.product_types', route: '/config/product/types', permission: 'CONFIG_PRODUCT_TYPE_ACCESS' },
{ id: 10, icon: 'mdi-server-network', title: 'nav_menu.presenters_nodes', route: '/config/presenters/nodes', permission: 'CONFIG_PRESENTERS_NODE_ACCESS', translate: '1' },
{ id: 12, icon: 'mdi-file-document-outline', title: 'nav_menu.product_types', route: '/config/product/types', permission: 'CONFIG_PRODUCT_TYPE_ACCESS', translate: '1' },
{ id: 13, separator: '1' },
{ id: 14, icon: 'mdi-server-network', title: 'nav_menu.publishers_nodes', route: '/config/publishers/nodes', permission: 'CONFIG_PUBLISHERS_NODE_ACCESS' },
{ id: 15, icon: 'mdi-file-star-outline', title: 'nav_menu.publisher_presets', route: '/config/publishers/presets', permission: 'CONFIG_PUBLISHER_PRESET_ACCESS' },
{ id: 14, icon: 'mdi-server-network', title: 'nav_menu.publishers_nodes', route: '/config/publishers/nodes', permission: 'CONFIG_PUBLISHERS_NODE_ACCESS', translate: '1' },
{ id: 15, icon: 'mdi-file-star-outline', title: 'nav_menu.publisher_presets', route: '/config/publishers/presets', permission: 'CONFIG_PUBLISHER_PRESET_ACCESS', translate: '1' },
{ id: 16, separator: '1' },
{ id: 17, icon: 'mdi-application-variable-outline', title: 'nav_menu.attributes', route: '/config/reportitems/attributes', permission: 'CONFIG_ATTRIBUTE_ACCESS' },
{id: 18, icon: 'mdi-file-table-outline', title: 'nav_menu.report_types', route: '/config/reportitems/types', permission: 'CONFIG_REPORT_TYPE_ACCESS' },
{ id: 17, icon: 'mdi-application-variable-outline', title: 'nav_menu.attributes', route: '/config/reportitems/attributes', permission: 'CONFIG_ATTRIBUTE_ACCESS', translate: '1' },
{ id: 18, icon: 'mdi-file-table-outline', title: 'nav_menu.report_types', route: '/config/reportitems/types', permission: 'CONFIG_REPORT_TYPE_ACCESS', translate: '1' },
{ id: 19, separator: '1' },
{id: 20, icon: 'mdi-format-list-text', title: 'nav_menu.word_lists', route: '/config/wordlists', permission: 'CONFIG_WORD_LIST_ACCESS' },
{ id: 20, icon: 'mdi-format-list-text', title: 'nav_menu.word_lists', route: '/config/wordlists', permission: 'CONFIG_WORD_LIST_ACCESS', translate: '1' },
{ id: 21, separator: '1'},
{ id: 22, icon: 'mdi-remote-desktop', title: 'nav_menu.remote_access', route: '/config/remote/access', permission: 'CONFIG_REMOTE_ACCESS_ACCESS' },
{ id: 23, icon: 'mdi-share-variant', title: 'nav_menu.remote_nodes', route: '/config/remote/nodes', permission: 'CONFIG_REMOTE_NODE_ACCESS' },
{ id: 22, icon: 'mdi-remote-desktop', title: 'nav_menu.remote_access', route: '/config/remote/access', permission: 'CONFIG_REMOTE_ACCESS_ACCESS', translate: '1' },
{ id: 23, icon: 'mdi-share-variant', title: 'nav_menu.remote_nodes', route: '/config/remote/nodes', permission: 'CONFIG_REMOTE_NODE_ACCESS', translate: '1' },
{ id: 24, separator: '1'},
{ id: 25, icon: 'mdi-server-network', title: 'nav_menu.bots_nodes', route: '/config/bots/nodes', permission: 'CONFIG_BOTS_NODE_ACCESS' },
{ id: 26, icon: 'mdi-robot', title: 'nav_menu.bot_presets', route: '/config/bots/presets', permission: 'CONFIG_BOT_PRESET_ACCESS' },
{ id: 25, icon: 'mdi-server-network', title: 'nav_menu.bots_nodes', route: '/config/bots/nodes', permission: 'CONFIG_BOTS_NODE_ACCESS', translate: '1' },
{ id: 26, icon: 'mdi-robot', title: 'nav_menu.bot_presets', route: '/config/bots/presets', permission: 'CONFIG_BOT_PRESET_ACCESS', translate: '1' },
]
})
}
Expand Down
3 changes: 1 addition & 2 deletions src/gui/src/views/nav/DashboardNav.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
},
data: () => ({
links: [
]
links: []
})
}
</script>
6 changes: 3 additions & 3 deletions src/gui/src/views/nav/ExternalConfigNav.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
},
data: () => ({
links: [
{ id: 1, icon: 'mdi-account-group', title: 'nav_menu.users', route: '/config/external/users' },
{ id: 2, icon: 'mdi-folder-multiple', title: 'nav_menu.asset_groups', route: '/config/external/groups'},
{ id: 3, icon: 'mdi-email-multiple-outline', title: 'nav_menu.notification_templates', route: '/config/external/templates'},
{ id: 1, icon: 'mdi-account-group', title: 'nav_menu.users', route: '/config/external/users', translate: '1' },
{ id: 2, icon: 'mdi-folder-multiple', title: 'nav_menu.asset_groups', route: '/config/external/groups', translate: '1' },
{ id: 3, icon: 'mdi-email-multiple-outline', title: 'nav_menu.notification_templates', route: '/config/external/templates', translate: '1' },
]
})
}
Expand Down
3 changes: 1 addition & 2 deletions src/gui/src/views/nav/PublishNav.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
Navigation
},
data: () => ({
links: [
]
links: []
})
}
</script>

0 comments on commit 8c2d9a5

Please sign in to comment.