Skip to content

fix(spi): replace hardcoded Chinese "成功" in JdbcUtils.testConnect wit… - #1900

Merged
openai0229 merged 1 commit into
OtterMind:mainfrom
liulipengju:fix/test-connect-i18n-hardcode
Jul 21, 2026
Merged

openai0229 merged 1 commit into
OtterMind:mainfrom
liulipengju:fix/test-connect-i18n-hardcode

Conversation

@liulipengju

Copy link
Copy Markdown
Contributor

Problem

JdbcUtils.testConnect set the connection-test result description to the hardcoded Chinese string "成功":

…n message

JdbcUtils.testConnect set the connection-test result description to
the hardcoded Chinese string "成功", which is returned to the frontend
as-is via DataSourceConnect.description. Under non-Chinese locales
(en-US, es-ES, ko-KR) the UI would still display Chinese, breaking
i18n consistency.

The sibling class DefaultSQLExecutor uses the exact same pattern to
set success descriptions:

    executeResult.setDescription(I18nUtils.getMessage("sqlResult.success"));

The i18n key `sqlResult.success` is already defined in all locale
resource bundles (zh_CN=执行成功, en_US=Execution successful, es_ES,
ko_KR, plus the default bundle). This change reuses the same key, so:

- Chinese users now see "执行成功" (consistent with SQL execution success)
- English / other-locale users see the properly localized message
- No new i18n keys are introduced

Change is 2 lines: add the existing import, replace the string literal.
@liulipengju
liulipengju force-pushed the fix/test-connect-i18n-hardcode branch from 405918a to 0e118b6 Compare July 21, 2026 08:56
@openai0229
openai0229 merged commit f5d2a7c into OtterMind:main Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants