Add --no-overwrite Option to Translation Import Command #146
Closed
lvdigitalaaank
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Problem Statement
Currently, the import process overwrites all entries in the phrases table, regardless of whether they have been modified via the UI. The --fresh flag controls whether the table is cleared before import, but even without it, existing entries are always updated.
Proposed Solution
Benefits
Integration in SyncPhrasesAction::execute
The SyncPhrasesAction::execute method should check if the overwrite variable is set, default should be true, If not, instead of calling updateOrCreate(), it should only call create() if the entry does not already exist.
execute(Translation $source, $key, $value, $locale, $file, $ovewrite = true)
Modify ImportTranslationsCommand to accept the --no-overwrite flag and pass it to SyncPhrasesAction::execute
Beta Was this translation helpful? Give feedback.
All reactions