Skip to content

Commit

Permalink
fix: incorrect i18n key
Browse files Browse the repository at this point in the history
  • Loading branch information
lukashornych committed Aug 28, 2024
1 parent 4669e9a commit cfa58b9
Show file tree
Hide file tree
Showing 25 changed files with 110 additions and 110 deletions.
6 changes: 3 additions & 3 deletions src/modules/entity-viewer/viewer/component/EntityViewer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ function preselectEntityProperties(): void {
if (notFoundProperties.length > 0) {
toaster.info(t(
'entityGrid.grid.notification.failedToFindRequestedProperties',
'entityViewer.grid.notification.failedToFindRequestedProperties',
{ keys: notFoundProperties.map(it => `'${it}'`).join(', ') }
))
}
Expand Down Expand Up @@ -343,10 +343,10 @@ async function executeQuery(): Promise<void> {
@grid-updated="gridUpdated"
/>
<div v-else class="data-grid__init-screen">
<p>{{ t('entityGrid.loadedDataWarning') }}</p>
<p>{{ t('entityViewer.loadedDataWarning') }}</p>
<VBtn @click="executeQueryManually">
{{ t('common.button.executeQuery') }}
<VActionTooltip :command="Command.EntityGrid_ExecuteQuery"/>
<VActionTooltip :command="Command.EntityViewer_ExecuteQuery"/>
</VBtn>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/modules/entity-viewer/viewer/component/LocaleSelector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ defineExpose<{
<VIcon v-if="!selected">mdi-translate-off</VIcon>
<VIcon v-else>mdi-translate</VIcon>

<VActionTooltip :command="Command.EntityGrid_ChangeDataLocale" />
<VActionTooltip :command="Command.EntityViewer_ChangeDataLocale" />

<VMenu activator="parent">
<VList
Expand All @@ -69,7 +69,7 @@ defineExpose<{
<VListItem
value="none"
>
<VListItemTitle>{{ t('entityGrid.dataLocaleSelector.item.none') }}</VListItemTitle>
<VListItemTitle>{{ t('entityViewer.dataLocaleSelector.item.none') }}</VListItemTitle>
</VListItem>

<VListItemDivider />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import VActionTooltip from '@/modules/base/component/VActionTooltip.vue'
const { t } = useI18n()
const priceTypes: any[] = [
{ title: t(`entityGrid.priceTypeSelector.${QueryPriceMode.WithTax}`), value: QueryPriceMode.WithTax },
{ title: t(`entityGrid.priceTypeSelector.${QueryPriceMode.WithoutTax}`), value: QueryPriceMode.WithoutTax }
{ title: t(`entityViewer.priceTypeSelector.${QueryPriceMode.WithTax}`), value: QueryPriceMode.WithTax },
{ title: t(`entityViewer.priceTypeSelector.${QueryPriceMode.WithoutTax}`), value: QueryPriceMode.WithoutTax }
];
const props = defineProps<{
Expand Down Expand Up @@ -56,7 +56,7 @@ defineExpose<{
>
<VIcon>mdi-cash-100</VIcon>

<VActionTooltip :command="Command.EntityGrid_ChangePriceType" />
<VActionTooltip :command="Command.EntityViewer_ChangePriceType" />

<VMenu activator="parent">
<VList
Expand Down
34 changes: 17 additions & 17 deletions src/modules/entity-viewer/viewer/component/QueryInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -122,30 +122,30 @@ function executeQuery(): void {
workspaceService.addTabHistoryRecord(orderByHistoryKey.value, props.orderBy)
} catch (e) {
console.error(e)
toaster.error(new UnexpectedError(t('entityGrid.queryInput.notification.failedToSaveQueryToHistory')))
toaster.error(new UnexpectedError(t('entityViewer.queryInput.notification.failedToSaveQueryToHistory')))
}
emit('executeQuery')
}
onMounted(() => {
// register grid specific keyboard shortcuts
keymap.bind(Command.EntityGrid_ExecuteQuery, tabProps.id, () => executeQuery())
keymap.bind(Command.EntityGrid_ChangeQueryLanguage, tabProps.id, () => queryLanguageSelectorRef.value?.focus())
keymap.bind(Command.EntityGrid_FilterBy, tabProps.id, () => filterByInputView.value?.focus())
keymap.bind(Command.EntityGrid_OrderBy, tabProps.id, () => orderByInputView.value?.focus())
keymap.bind(Command.EntityGrid_ChangeDataLocale, tabProps.id, () => dataLocaleSelectorRef.value?.focus())
keymap.bind(Command.EntityGrid_ChangePriceType, tabProps.id, () => priceTypeSelectorRef.value?.focus())
keymap.bind(Command.EntityGrid_OpenPropertySelector, tabProps.id, () => showPropertiesSelect.value = true)
keymap.bind(Command.EntityViewer_ExecuteQuery, tabProps.id, () => executeQuery())
keymap.bind(Command.EntityViewer_ChangeQueryLanguage, tabProps.id, () => queryLanguageSelectorRef.value?.focus())
keymap.bind(Command.EntityViewer_FilterBy, tabProps.id, () => filterByInputView.value?.focus())
keymap.bind(Command.EntityViewer_OrderBy, tabProps.id, () => orderByInputView.value?.focus())
keymap.bind(Command.EntityViewer_ChangeDataLocale, tabProps.id, () => dataLocaleSelectorRef.value?.focus())
keymap.bind(Command.EntityViewer_ChangePriceType, tabProps.id, () => priceTypeSelectorRef.value?.focus())
keymap.bind(Command.EntityViewer_OpenPropertySelector, tabProps.id, () => showPropertiesSelect.value = true)
})
onUnmounted(() => {
// unregister grid specific keyboard shortcuts
keymap.unbind(Command.EntityGrid_ExecuteQuery, tabProps.id)
keymap.unbind(Command.EntityGrid_ChangeQueryLanguage, tabProps.id)
keymap.unbind(Command.EntityGrid_FilterBy, tabProps.id)
keymap.unbind(Command.EntityGrid_OrderBy, tabProps.id)
keymap.unbind(Command.EntityGrid_ChangeDataLocale, tabProps.id)
keymap.unbind(Command.EntityGrid_ChangePriceType, tabProps.id)
keymap.unbind(Command.EntityGrid_OpenPropertySelector, tabProps.id)
keymap.unbind(Command.EntityViewer_ExecuteQuery, tabProps.id)
keymap.unbind(Command.EntityViewer_ChangeQueryLanguage, tabProps.id)
keymap.unbind(Command.EntityViewer_FilterBy, tabProps.id)
keymap.unbind(Command.EntityViewer_OrderBy, tabProps.id)
keymap.unbind(Command.EntityViewer_ChangeDataLocale, tabProps.id)
keymap.unbind(Command.EntityViewer_ChangePriceType, tabProps.id)
keymap.unbind(Command.EntityViewer_OpenPropertySelector, tabProps.id)
})
</script>

Expand All @@ -161,7 +161,7 @@ onUnmounted(() => {
<VInlineQueryEditor
:model-value="filterBy"
prepend-inner-icon="mdi-filter-menu-outline"
:placeholder="`Filter by (${keymap.prettyPrint(Command.EntityGrid_FilterBy)})`"
:placeholder="`Filter by (${keymap.prettyPrint(Command.EntityViewer_FilterBy)})`"
@update:model-value="emit('update:filterBy', $event)"
@update:history-clear="workspaceService.clearTabHistory(filterByHistoryKey)"
@update:editor="filterByInputView = $event.view"
Expand All @@ -175,7 +175,7 @@ onUnmounted(() => {
<VInlineQueryEditor
:model-value="orderBy"
prepend-inner-icon="mdi-sort"
:placeholder="`Order by (${keymap.prettyPrint(Command.EntityGrid_OrderBy)})`"
:placeholder="`Order by (${keymap.prettyPrint(Command.EntityViewer_OrderBy)})`"
@update:model-value="emit('update:orderBy', $event)"
@update:history-clear="workspaceService.clearTabHistory(orderByHistoryKey)"
@update:editor="orderByInputView = $event.view"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ defineExpose<{
density="comfortable"
>
<VIcon>{{ selectedIcon }}</VIcon>
<VActionTooltip :command="Command.EntityGrid_ChangeQueryLanguage" />
<VActionTooltip :command="Command.EntityViewer_ChangeQueryLanguage" />

<VMenu activator="parent">
<VList
Expand Down
6 changes: 3 additions & 3 deletions src/modules/entity-viewer/viewer/component/Toolbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ const shareTabButtonRef = ref<InstanceType<typeof ShareTabButton> | undefined>()
onMounted(() => {
// register grid specific keyboard shortcuts
keymap.bind(Command.EntityGrid_ShareTab, tabProps.id, () => shareTabButtonRef.value?.share())
keymap.bind(Command.EntityViewer_ShareTab, tabProps.id, () => shareTabButtonRef.value?.share())
})
onUnmounted(() => {
// unregister grid specific keyboard shortcuts
keymap.unbind(Command.EntityGrid_ShareTab, tabProps.id)
keymap.unbind(Command.EntityViewer_ShareTab, tabProps.id)
})
</script>

Expand All @@ -68,7 +68,7 @@ onUnmounted(() => {
/>

<VExecuteQueryButton :loading="loading" @click="emit('executeQuery')">
<VActionTooltip :command="Command.EntityGrid_ExecuteQuery" />
<VActionTooltip :command="Command.EntityViewer_ExecuteQuery" />
{{ t('common.button.run') }}
</VExecuteQueryButton>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const propertyDetailValue = ref<EntityPropertyValue | EntityPropertyValue[] | un
function getPropertyDescriptor(key: string): EntityPropertyDescriptor | undefined {
const descriptor = entityPropertyDescriptorIndex.value.get(key)
if (descriptor == undefined) {
toaster.error(new UnexpectedError(t('entityGrid.grid.notification.failedToFindProperty', { key })))
toaster.error(new UnexpectedError(t('entityViewer.grid.notification.failedToFindProperty', { key })))
}
return descriptor
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ function copyValue(): void {
>
<span class="data-grid-cell__body">
<template v-if="noLocaleSelected">
<span class="text-disabled">{{ t('entityGrid.grid.cell.placeholder.noLocaleSelected') }}</span>
<span class="text-disabled">{{ t('entityViewer.grid.cell.placeholder.noLocaleSelected') }}</span>
</template>
<template v-else-if="emptyArray">
<span class="text-disabled">{{ t('common.placeholder.emptyArray') }}</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ const componentDataType = computed<Scalar | ExtraEntityObjectType | undefined>((
>
{{ headerPrependIcon }}
</VIcon>
<span>{{ propertyDescriptor?.flattenedTitle || t('entityGrid.grid.cell.detail.placeholder.unknownProperty') }}</span>
<span>{{ propertyDescriptor?.flattenedTitle || t('entityViewer.grid.cell.detail.placeholder.unknownProperty') }}</span>
</template>
<template #actions>
<DetailOutputFormatSelector
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const formattedValue = computed<string>(() => {
} catch (e: any) {
console.error(e)
return t(
'entityGrid.grid.codeRenderer.placeholder.failedToFormatValue',
'entityViewer.grid.codeRenderer.placeholder.failedToFormatValue',
{
codeLanguage: props.codeLanguage,
message: e?.message ? `${e.message}.` : ''
Expand All @@ -67,7 +67,7 @@ const codeBlockExtensions = computed<Extension[]>(() => {
case EntityPropertyValueSupportedCodeLanguage.Xml:
return [xml()]
default:
toaster.error(new UnexpectedError(t('entityGrid.grid.codeRenderer.notification.unsupportedCodeLanguage')))
toaster.error(new UnexpectedError(t('entityViewer.grid.codeRenderer.notification.unsupportedCodeLanguage')))
return []
}
})
Expand Down Expand Up @@ -100,7 +100,7 @@ function createActions(): Map<CodeDetailRendererActionType, MenuAction<CodeDetai
CodeDetailRendererActionType.PrettyPrint,
new MenuAction<CodeDetailRendererActionType>(
CodeDetailRendererActionType.PrettyPrint,
prettyPrint.value ? t('entityGrid.grid.renderer.button.displayRawValue') : t('entityGrid.grid.renderer.button.prettyPrintValue'),
prettyPrint.value ? t('entityViewer.grid.renderer.button.displayRawValue') : t('entityViewer.grid.renderer.button.prettyPrintValue'),
prettyPrint.value ? 'mdi-raw' : 'mdi-auto-fix',
() => prettyPrint.value = !prettyPrint.value
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const emit = defineEmits<{
>
<VIcon>mdi-code-braces</VIcon>
<VTooltip activator="parent">
{{ t('entityGrid.grid.renderer.button.selectOutputFormat') }}
{{ t('entityViewer.grid.renderer.button.selectOutputFormat') }}
</VTooltip>
</VBtn>
</template>
Expand All @@ -38,22 +38,22 @@ const emit = defineEmits<{
@update:selected="emit('update:modelValue', $event[0] as EntityPropertyValueDesiredOutputFormat)"
>
<VListItem :value="EntityPropertyValueDesiredOutputFormat.AutoPrettyPrint" prepend-icon="mdi-auto-fix">
{{ t(`entityGrid.grid.renderer.format.${EntityPropertyValueDesiredOutputFormat.AutoPrettyPrint}`) }}
{{ t(`entityViewer.grid.renderer.format.${EntityPropertyValueDesiredOutputFormat.AutoPrettyPrint}`) }}
</VListItem>
<VListItem :value="EntityPropertyValueDesiredOutputFormat.Raw" prepend-icon="mdi-text">
{{ t(`entityGrid.grid.renderer.format.${EntityPropertyValueDesiredOutputFormat.Raw}`) }}
{{ t(`entityViewer.grid.renderer.format.${EntityPropertyValueDesiredOutputFormat.Raw}`) }}
</VListItem>
<VListItem :value="EntityPropertyValueDesiredOutputFormat.Markdown" prepend-icon="mdi-language-markdown-outline">
{{ t(`entityGrid.grid.renderer.format.${EntityPropertyValueDesiredOutputFormat.Markdown}`) }}
{{ t(`entityViewer.grid.renderer.format.${EntityPropertyValueDesiredOutputFormat.Markdown}`) }}
</VListItem>
<VListItem :value="EntityPropertyValueDesiredOutputFormat.Json" prepend-icon="mdi-code-json">
{{ t(`entityGrid.grid.renderer.format.${EntityPropertyValueDesiredOutputFormat.Json}`) }}
{{ t(`entityViewer.grid.renderer.format.${EntityPropertyValueDesiredOutputFormat.Json}`) }}
</VListItem>
<VListItem :value="EntityPropertyValueDesiredOutputFormat.Xml" prepend-icon="mdi-xml">
{{ t(`entityGrid.grid.renderer.format.${EntityPropertyValueDesiredOutputFormat.Xml}`) }}
{{ t(`entityViewer.grid.renderer.format.${EntityPropertyValueDesiredOutputFormat.Xml}`) }}
</VListItem>
<VListItem :value="EntityPropertyValueDesiredOutputFormat.Html" prepend-icon="mdi-language-html5">
{{ t(`entityGrid.grid.renderer.format.${EntityPropertyValueDesiredOutputFormat.Html}`) }}
{{ t(`entityViewer.grid.renderer.format.${EntityPropertyValueDesiredOutputFormat.Html}`) }}
</VListItem>
</VList>
</VMenu>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const props = withDefaults(defineProps<{
const formattedValue = computed<string>(() => {
if (props.value instanceof Array || typeof (props.value as EntityPropertyValue).value() !== 'string') {
return t('entityGrid.grid.htmlRenderer.placeholder.failedToRenderHtml')
return t('entityViewer.grid.htmlRenderer.placeholder.failedToRenderHtml')
}
return DOMPurify.sanitize((props.value as EntityPropertyValue).toPreviewString())
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ const formattedValue = computed<string>(() => {
}
} catch (e) {
console.error(e)
return t('entityGrid.grid.cell.detail.placeholder.invalidValue')
return t('entityViewer.grid.cell.detail.placeholder.invalidValue')
}
})
Expand Down Expand Up @@ -263,8 +263,8 @@ function createActions(): Map<
new MenuAction<MarkdownDetailRendererActionType>(
MarkdownDetailRendererActionType.PrettyPrint,
prettyPrint.value
? t('entityGrid.grid.renderer.button.displayRawValue')
: t('entityGrid.grid.renderer.button.prettyPrintValue'),
? t('entityViewer.grid.renderer.button.displayRawValue')
: t('entityViewer.grid.renderer.button.prettyPrintValue'),
prettyPrint.value ? 'mdi-raw' : 'mdi-auto-fix',
() => (prettyPrint.value = !prettyPrint.value)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const priceInnerRecordHandling = computed<PriceInnerRecordHandling>(() => {
})
const entityPricingProperties = computed<Property[]>(() => [
{
name: t('entityGrid.grid.priceRenderer.label.priceInnerRecordHandling'),
name: t('entityViewer.grid.priceRenderer.label.priceInnerRecordHandling'),
value: new PropertyValue(
new KeywordValue(priceInnerRecordHandling.value)
),
Expand All @@ -103,7 +103,7 @@ const entityPricingProperties = computed<Property[]>(() => [
const prices = computed<EntityPrices>(() => {
if (!(props.value instanceof EntityPrices)) {
toaster.error(
t('entityGrid.grid.priceRenderer.notification.invalidPricesObject')
t('entityViewer.grid.priceRenderer.notification.invalidPricesObject')
)
return new EntityPrices(undefined, [])
}
Expand Down Expand Up @@ -273,14 +273,14 @@ preselectFilterFromQuery()

<div>
<header>
<h3>{{ t('entityGrid.grid.priceRenderer.title') }}</h3>
<h3>{{ t('entityViewer.grid.priceRenderer.title') }}</h3>
</header>

<VMarkdown
v-if="prices.priceForSale == undefined"
:source="
t(
'entityGrid.grid.priceRenderer.filter.help.computePriceForSale'
'entityViewer.grid.priceRenderer.filter.help.computePriceForSale'
)
"
/>
Expand Down
Loading

0 comments on commit cfa58b9

Please sign in to comment.