incubator-answer icon indicating copy to clipboard operation
incubator-answer copied to clipboard

i18n configs in "/data" folder doesn't work as expected

Open surapuramakhil opened this issue 1 year ago • 1 comments

Describe the bug

changing values in i18n folder in data folder is not getting reflected. even when you restart go server.

but if we run make UI command, then changes are reflected

To Reproduce

Steps to reproduce the behavior:

This is Dev setup repo steps. Same works in Prod setup (docker version & containers)

  1. initialize the project
go run cmd/answer/main.go init -C ./answer-data
  1. Run answer
go run cmd/answer/main.go run -C ./answer-data
  1. Since you have done init. you will be having files in answer-data folder
  2. go to i18n folder choose config file based on language you have used
  3. Make change to the config file
  4. Check you i18n changes are getting reflected. If Not try restart answer server to see changes are getting reflected
  5. Verdit Changes are Not reflected

But only if we do changes in i18n folder (in repo not in answer-data folder) and go through build process then changes are getting reflected

Expected behavior

configs are supposed to work as expected

Screenshots

If applicable, add screenshots or video to help explain your problem.

Platform

  • Device: [e.g. Desktop, Mobile]
  • OS: [e.g. macOS]
  • Browser and version: [e.g. Chrome, Safari]
  • Version: [e.g. v1.2.0]

surapuramakhil avatar Feb 07 '24 03:02 surapuramakhil

@surapuramakhil Normally the default English language files are compiled into the front-end code, while the other language files are read through the API. So, if you modify a source file(en), it must be compiled. If it is other non-source files, then it can be restarted and take effect directly without compilation.

LinkinStars avatar Feb 18 '24 09:02 LinkinStars