There are cases where passing a reactive or computed property as the msgid argument to the $pgettext function, will throw an error from the
normalizeMsgId function (src/utilities.ts):
Example:
<script setup>
const store = useStore()
const getSomeComputedValue = computed(() => store.state.someStateProperty)
</script>
<template>
<div>{{ $pgettext('some-context', getSomeComputedValue ) }}</div>
</template>
Should an early return be added to handle cases where the key arg is null/undefined, perhaps?
Or is this example a wrong usage of the pgettext function?
There are cases where passing a reactive or computed property as the
msgidargument to the$pgettextfunction, will throw an error from thenormalizeMsgIdfunction (src/utilities.ts):Example:
Should an early
returnbe added to handle cases where the key arg isnull/undefined, perhaps?Or is this example a wrong usage of the pgettext function?