transloco
transloco copied to clipboard
Feature(scope): make transloco.config.js from "workspace level" to "application/project level"
Is there an existing issue for this?
- [X] I have searched the existing issues
Which Transloco package(s) will this feature affect?
Schematics
Is your feature request related to a problem? Please describe
We are building a frontend team which my company didn't have before. We decide to use Angular 12 + Nx + Transloco.
Under Nx mono-report multi-project scenario, I want to install transloco for each different project under nx apps/ folder, by using --project option in ng-add schematics.
I find out in the transloco.config.js, the rootTranslationsPath will be under project.sourceRoot:
const sourceRoot = (project && project.sourceRoot) || 'src'; const assetsPath =
${sourceRoot}/${options.path}
;
However, the transloco.config.js itself won't be moved into project.sourceRoot accordingly.
Describe the solution you'd like
I don't know what's the origin design for transloco.config.js, but I expect it to be "application/project level".
As a result, the rootTranslationsPath referring to ${project.sourceRoot}/${options.path}/transloco.config.js
make sense to me.
if this is the future plan or roadmap for transloco.config.js, I can try to make a pull request for you kindly review:
function createConfig() in /libs/transloco-schematics/src/utils/transloco.ts
Describe alternatives you've considered
No response
Describe alternatives you've considered
none
Describe alternatives you've considered
none
Additional context
No response
I would like to make a pull request for this feature
Yes 🚀