mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 15:28:37 +08:00
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:
@ -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
|
||||
|
Reference in New Issue
Block a user