DEV: Add a rake task to export/import translation overrides (#18487)

Use `bin/rake export:translation_overrides` to export to a file. Then,
copy that file to a new site and run `bin/rake import:file["filename"].
This commit is contained in:
Penar Musaraj
2022-10-05 15:22:16 -04:00
committed by GitHub
parent 15f192447b
commit 4d8011032e
7 changed files with 60 additions and 0 deletions

View File

@ -178,6 +178,12 @@ module ImportExport
data
end
def export_translation_overrides
@export_data[:translation_overrides] = TranslationOverride.all.select(:locale, :translation_key, :value)
self
end
def default_filename_prefix
raise "Overwrite me!"
end