You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@answer.apache.org by "liruohrh (via GitHub)" <gi...@apache.org> on 2025/12/06 17:29:31 UTC
[PR] feat(i18n): Add ANSWER_I18N_ROOT env to optimize secondary development [answer]
liruohrh opened a new pull request, #1451:
URL: https://github.com/apache/answer/pull/1451
- Avoid version control conflicts when modifying built-in i18n files during secondary development
- Support custom i18n directories (e.g., `data` directory or other paths) for developers
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org
For additional commands, e-mail: issues-help@answer.apache.org
Re: [PR] feat(i18n): Add ANSWER_I18N_ROOT env to optimize secondary development [answer]
Posted by "liruohrh (via GitHub)" <gi...@apache.org>.
liruohrh commented on PR #1451:
URL: https://github.com/apache/answer/pull/1451#issuecomment-3635338283
ok, i will close it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org
For additional commands, e-mail: issues-help@answer.apache.org
Re: [PR] feat(i18n): Add ANSWER_I18N_ROOT env to optimize secondary development [answer]
Posted by "liruohrh (via GitHub)" <gi...@apache.org>.
liruohrh closed pull request #1451: feat(i18n): Add ANSWER_I18N_ROOT env to optimize secondary development
URL: https://github.com/apache/answer/pull/1451
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org
For additional commands, e-mail: issues-help@answer.apache.org
Re: [PR] feat(i18n): Add ANSWER_I18N_ROOT env to optimize secondary development [answer]
Posted by "shuashuai (via GitHub)" <gi...@apache.org>.
shuashuai commented on PR #1451:
URL: https://github.com/apache/answer/pull/1451#issuecomment-3625447668
> Yes, this makes it easier for developers to manage i18n—e.g., by merging custom and built-in Answer translations into /data/answer/i18n without modifying Answer's built-in files, keeping things clean and organized.
According to the description, it appears that when using this variable, users are required to handle the merging of file content themselves. However, the submitted code does not involve this part of the operation, which may cause confusion for users regarding this variable.
If this environment variable is only used in development mode, is it sufficient to define it only in your `.env*.local` file? Because this file will not be submitted to the code repository.
The environment variables we currently use are all explained in the `confiugs/config.yaml` file. [config file docs](https://answer.apache.org/docs/configfile/),
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org
For additional commands, e-mail: issues-help@answer.apache.org
Re: [PR] feat(i18n): Add ANSWER_I18N_ROOT env to optimize secondary development [answer]
Posted by "shuashuai (via GitHub)" <gi...@apache.org>.
shuashuai commented on PR #1451:
URL: https://github.com/apache/answer/pull/1451#issuecomment-3624264079
> Avoid version control conflicts when modifying built-in i18n files during secondary development
What do we mean by version control conflicts? Are you referring to avoiding code conflicts caused by merging new versions from Answer each time by customizing the i18n file path to implement your own language file directory?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org
For additional commands, e-mail: issues-help@answer.apache.org
Re: [PR] feat(i18n): Add ANSWER_I18N_ROOT env to optimize secondary development [answer]
Posted by "liruohrh (via GitHub)" <gi...@apache.org>.
liruohrh commented on PR #1451:
URL: https://github.com/apache/answer/pull/1451#issuecomment-3624313779
Yes, this makes it easier for developers to manage i18n—e.g., by merging custom and built-in Answer translations into /data/answer/i18n without modifying Answer's built-in files, keeping things clean and organized.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org
For additional commands, e-mail: issues-help@answer.apache.org
Re: [PR] feat(i18n): Add ANSWER_I18N_ROOT env to optimize secondary development [answer]
Posted by "liruohrh (via GitHub)" <gi...@apache.org>.
liruohrh commented on PR #1451:
URL: https://github.com/apache/answer/pull/1451#issuecomment-3632542231
yes, it shoule be in .env*.local. it like dir /data.
like `REACT_APP_API_URL = http://10.0.20.84:8080/` in .env.development, i need .env.local to set to`http://127.0.0.1/`.
"merging custom and built-in" is my way to handle custom i18n(by write /cmd/i18nmerge in my local repo).
I think perhaps others might need it too, so I created this pr,
for if has the env, we do not need to modify ui/config-overrides.js.
actually it must alaways is /data/i18n (same with backend i18n in data dir).
> such as, i run /cmd/i18nmerge to merge /data/i18n and /answer/myi18n to /data/i18n, backend and frontend both use /data/i18n. (/answer/ is the source code repo).
> [create-answer-plugin](https://github.com/answerdev/create-answer-plugin). also use ANSWER_I18N_PATH(which will invoke `answer i18n` after install plugin to merge plugin i18n).
for create-answer-plugin, i decide to change ANSWER_I18N_ROOT to ANSWER_I18N_PATH.
and i add some code comments for ANSWER_I18N_PATH.
so, how do you feel now?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org
For additional commands, e-mail: issues-help@answer.apache.org
Re: [PR] feat(i18n): Add ANSWER_I18N_ROOT env to optimize secondary development [answer]
Posted by "shuashuai (via GitHub)" <gi...@apache.org>.
shuashuai commented on PR #1451:
URL: https://github.com/apache/answer/pull/1451#issuecomment-3635199123
Thank you very much for the contribution!
After reviewing the latest updates and discussion, we have decided not to merge this PR at this moment, mainly for the following reasons:
1. this PR is still not a “complete solution” from the project’s perspective.
2. regarding the merging of plugin languages, there are actually corresponding command instructions in the [documentation](https://answer.apache.org/docs/development/plugins/plugin-translation).
3. The use case is highly customized and not common enough to become a built-in feature. exposing this as an official configuration may increase the complexity for ordinary users without providing clear overall benefits.
So I suggest you can create your own local env file, such as `ui/.env.development.local`, so that you can easily customize environment variables. You can keep the changes to the `ui/config-overrides.js` file locally and ignore submitting this file when contributing.
We truly appreciate your effort and ideas.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org
For additional commands, e-mail: issues-help@answer.apache.org