Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion dashboard/src/composables/useConfigTextResolver.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ export function useConfigTextResolver(props = {}) {

const translateIfKey = (value) => {
if (!value || typeof value !== 'string') return value
return getRaw(value) ? tm(value) : value
if (!value.includes('.')) return value
return getRaw(value) ? tm(value) : null
Comment thread
sourcery-ai[bot] marked this conversation as resolved.
Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

If value is a plain text string that contains a dot (for example, version numbers like "v1.0", IP addresses like "127.0.0.1", or descriptions containing sentences with periods like "Timeout (e.g. 5s)"), !value.includes('.') will evaluate to false.

Since it is not a valid i18n key, getRaw(value) will return null, causing translateIfKey to return null. This will result in fallbackText becoming '' (empty string) in resolveConfigText, making these plain text labels, descriptions, or hints completely disappear from the UI.

To prevent this regression, we should return the original value as a fallback when getRaw(value) is falsy, rather than returning null.

Suggested change
return getRaw(value) ? tm(value) : null
return getRaw(value) ? tm(value) : value

}

const hasPluginI18n = () => {
Expand Down