Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possibility to scan and add missing keys from file to db without update exists translations? #263

Open
CrazyFreeMan opened this issue Dec 28, 2022 · 0 comments

Comments

@CrazyFreeMan
Copy link

CrazyFreeMan commented Dec 28, 2022

In my case, I need to check the files for new keys and add them to the database, without updating/overwriting the values for the existing translations.
On local add new translation to file, then upload to prod server, ansible run seeders and i need scan new translation from file and add to Database.
Its possible? Or only need manualy add keys from UI to db? Thx

For my case i extended driver, add parameter $update, and change line

if ($update) {
      $lang->translations()->updateOrCreate($attributes, $values);
  } else {
      $lang->translations()->firstOrCreate($attributes, $values);
  }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant