slang
slang copied to clipboard
Running slang apply duplicates map
Describe the bug Running slang apply duplicates map obkects into a non-mapped version
To Reproduce Steps to reproduce the behavior:
- Create en-US and fr-FR files
- Add a map to en-US
- Run
dart run slang analyze
followed bydart run slang apply
- Observed behaviour below (see // fr-FR
// en-US
"couponValidations(map)": {
"CouponNotExist": "There is no box with this code",
"CouponAlreadyUsed": "You have already claimed this box",
"CouponLimitReached": "Too late! This box has no more claims available",
"CouponExpired": "Too late! This box has expired"
},
// fr-FR
"couponValidations(map)": { <-- this gets added as expected
"CouponNotExist": "There is no box with this code",
"CouponAlreadyUsed": "You have already claimed this box",
"CouponLimitReached": "Too late! This box has no more claims available",
"CouponExpired": "Too late! This box has expired"
},
"couponValidations": { <-- This object gets added after running `slang apply`
"CouponNotExist": "There is no box with this code",
"CouponAlreadyUsed": "You have already claimed this box",
"CouponLimitReached": "Too late! This box has no more claims available",
"CouponExpired": "Too late! This box has expired"
}
Expected behavior The object should not be duplicated
Additional context
This seems to only happen with (map)
. Also, the duplicate does not exist in _missing_translations.json