transloco-keys-manager icon indicating copy to clipboard operation
transloco-keys-manager copied to clipboard

feat: added delete missing keys option

Open Dedrus opened this issue 4 years ago • 8 comments

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 avatar Jul 23 '20 10:07 Dedrus

@Dedrus Thanks for the PR! I think you meant deleting extra keys? Can you update the PR title and files accordingly? 😄

shaharkazaz avatar Jul 31 '20 10:07 shaharkazaz

@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 avatar Aug 04 '20 14:08 Dedrus

@Dedrus I couldn't agree more 🙂 .

shaharkazaz avatar Aug 10 '20 07:08 shaharkazaz

@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 avatar Aug 10 '20 09:08 Dedrus

@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 avatar Aug 10 '20 09:08 shaharkazaz

@shaharkazaz ok, I will finish my PR, as soon as I can. Can you reopen the issue?

Dedrus avatar Aug 10 '20 09:08 Dedrus

@Dedrus Are you still on it? if not I will close this PR 🙂

shaharkazaz avatar Oct 02 '20 13:10 shaharkazaz

I made this work in #89.

rhuitl avatar Apr 08 '21 10:04 rhuitl

Merged in #89

shaharkazaz avatar Mar 11 '23 19:03 shaharkazaz