dify icon indicating copy to clipboard operation
dify copied to clipboard

feat: add i18n checker (ui)

Open kindy opened this issue 10 months ago • 1 comments

Summary

When trying to fix issue in #16966, seems it's quit hard to import languages resources(which defined in i18n/i18next-config.ts) in node.js, so I create a page to do the check.

  • page url: /dev-i18n-checker

Screenshots

image

Checklist

[!IMPORTANT]
Please review the checklist below before submitting your pull request.

  • [ ] This change requires a documentation update, included: Dify Document
  • [x] I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • [ ] I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • [ ] I've updated the documentation accordingly.
  • [ ] I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods

kindy avatar Apr 01 '25 12:04 kindy

@crazywoola please take a look this pr, for i18n checker.

kindy avatar Apr 01 '25 12:04 kindy

This page seems to be public available. I think this page should be disabled for production environment.

@crazywoola do we have some examples for this use case?

kindy avatar Apr 02 '25 04:04 kindy

@crazywoola I create a folder dev-only and move i18n-checker there. this path /dev-only/** can only access in development environments.

kindy avatar Apr 02 '25 05:04 kindy

Thanks, this is quite cool.

A few suggestions you could refine later.

  • Use tab to navigate the missing translations
  • Cleanup the dead code, the scripts seems not needed any longer.

crazywoola avatar Apr 02 '25 05:04 crazywoola