monorepo: Machine generate: doesn't embed JSON children, uses path members
Problem
Looks like machine translate appends AI-generated translations to the end of the file as errors.fallbackText1: "..." instead of adding it as a member to the child object like { errors: { fallbackText1: "..." } }. Could cause problems when diffing the files.
Steps to reproduce
- Add a JSON child translation in the ref lang
- Run machine translate
- Notice key path members
Additional information (screenshots?)
- Browser:
- Operating system:
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 1
- Comments: 32 (30 by maintainers)
Update of the current state:
project.inlang.jsonand execute the command.Example:
This file is detected as flattened, and nested message IDs will be flattened.
I propose:
@inlang/plugins @felixhaeberle @samuelstroschein @dominikg @jonator Do you agree with that, or are there any concerns? 👍 / 👎
I have tested that expected behavior. It now works as proposed.
Assigning @NilsJacobsen after debugging -> probably the problem is in the json plugin. Test with
npx inlang@latest machine translate -fin thetest-appexample of thesdk-js. Implementation ofmachine translatecan be found here.Did you test it because @NiklasBuchfink added some fixes for the jsonPlugin last week?