transloco-keys-manager
transloco-keys-manager copied to clipboard
feat: added delete missing keys option
Closes: #35
PR Type
[x] Feature
Issue Number: #35
What is the new behavior?
Added new flag to delete missing keys in existing translation before merge
Does this PR introduce a breaking change?
[x] No
I was not able to run tests and not sure how to test this changes, can you help me with it?
@Dedrus Thanks for the PR! I think you meant deleting extra keys? Can you update the PR title and files accordingly? 😄
@shaharkazaz actually, I think that this PR is meaningles, we must use replace option and that's it, there is no point in deleting extra keys in old files
@Dedrus I couldn't agree more 🙂 .
@shaharkazaz ok, I checked on friday, and replace actually not doing what I want 🤣 I thought it will read existing localization files and at least fill found keys values with previoys ones. So if I'm using replace I will always lose existing translation. Maybe we will reopen and I will finish PR? Or we must rework replace, it should at least read old localization files from existing values?
@Dedrus replace does what it says, replace the files with new ones and populate the keys found with the default value 🙂 .
We can maybe extend it to keep old translations, but I'm not sure if it should be part of replace
or indeed a new property of removeExtra
.
@shaharkazaz ok, I will finish my PR, as soon as I can. Can you reopen the issue?
@Dedrus Are you still on it? if not I will close this PR 🙂
I made this work in #89.
Merged in #89