You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report
[ ] Performance issue
[x] Feature request
[ ] Documentation issue or request
[ ] Support request
[ ] Other... Please describe:
Current behavior
I'm currently working in an Nx monorepo with multiple applications and libraries. Some translations are common across multiple apps and libs (for example, Back, Next, our company name, etc).
It'd be very helpful if we could define a common/shared translation file with a key to denote the 'scope' that those translations fall under.
We are currently using merge-jsons-webpack-plugin with the @angular-builders/custom-webpack builder with the following example jsons:
app en.json
{
"app": {"title": "My App"}
}
common en.json
{
"common": {
"next": "Next",
"back": "Back",
"companyName": "My Company
}
}
However, when running the key manager, it updates the app json to be:
{
"app": {"title": "My App"},
"common": {
"next": "Missing value for 'common.next'!",
"back": "Missing value for 'common.back'!",
"companyName": "Missing value for 'common.companyName'!
}
}
At runtime, this isn't a problem since the jsons are merged and the app values are overwritten, but it's not ideal to have these values since it's not really representative of what's actually happening.
Expected behavior
Ideally, it'd be great to be able to define commonTranslations with a key and path value inside the config. For example:
I'm submitting a...
Current behavior
I'm currently working in an Nx monorepo with multiple applications and libraries. Some translations are common across multiple apps and libs (for example,
Back
,Next
, our company name, etc).It'd be very helpful if we could define a common/shared translation file with a key to denote the 'scope' that those translations fall under.
We are currently using merge-jsons-webpack-plugin with the
@angular-builders/custom-webpack
builder with the following example jsons:app en.json
common en.json
However, when running the key manager, it updates the app json to be:
At runtime, this isn't a problem since the jsons are merged and the app values are overwritten, but it's not ideal to have these values since it's not really representative of what's actually happening.
Expected behavior
Ideally, it'd be great to be able to define
commonTranslations
with akey
andpath
value inside the config. For example:Missing keys could then be inserted into the json files at the path instead of the application/lib file.
What is the motivation / use case for changing the behavior?
Our main motivation for this is to remove repetition for common localized phrases/text across a larger multi-project monorepo.
Environment
The text was updated successfully, but these errors were encountered: