gp_translations_imported
doesn't pass imported string IDs
#1467
Labels
gp_translations_imported
doesn't pass imported string IDs
#1467
Problem
gp_translations_imported
only passes the ID of the translation set:GlotPress/gp-includes/things/translation-set.php
Lines 366 to 373 in 3d975df
I'd like my callback to know which strings were imported, so that I can add activity notifications to a BuddyPress installation.
Desired Solution
It seems like the simplest approach would be for the action to pass an array of imported translation IDs to its callbacks, similar to what
gp_translation_set_bulk_action_post
does.e.g.,
Other solutions I considered
gp_translation_created | gp_translation_saved
- It's not performant to process them individually, since the processing involves an HTTP request and database write. To avoid that using these actions, I'd have to store each ID in aglobal
/static
var, and then run my logic for all of the entries once the process is done.$_FILES['import-file']
- That requires duplicating a lot of the logic of the import process, and still wouldn't let me know which were imported (where$create = true
)The text was updated successfully, but these errors were encountered: