Some translations don’t seem to work
Hi Rahul,
I’ve noticed that some translations do not work. For example, using Loco Translate, I am changing string “Edited Answer” to “Edited Response”. Despite saving the string, this is not reflected in what is already posted. I expect that the values are being written to the database instead. Can you confirm ?
Thanks
SOLVED: Well – sort of.
I ended up installing the Code Snippets plugin, and adding this as a snippet, which works
function my_ap_activity_actions( $actions ) {
$actions[’new_a’][’verb’] = ‘Responded to discussion’;
$actions[’edit_a’][’verb’] = ‘Edited response’;
return $actions;
}
add_filter( ‘ap_activity_actions’, ‘my_ap_activity_actions’ );
My question here is why does this not work within the child theme functions.php file ? Or within the themes/anspress directory ?
Ok. This is still an issue. Changing class-activity-helper.php (see below) works
‘edit_a’ => array(
‘ref_type’ => ‘answer’,
‘verb’ => __( ‘Edited response‘, ‘anspress-question-answer’ ),
‘icon’ => ‘apicon-answer’,
),
But this function does not work at all
function my_ap_activity_actions( $actions ) {
$actions[’edit_a’][’verb’] = ‘Edited response‘;
return $actions;
}
add_filter( ‘ap_activity_actions’, ‘my_ap_activity_actions’ );
Any ideas please ?
Here it is:
https://gist.github.com/rahularyan/376fb0f31adb81d783dfb82a9ce3829c
Tried your code – pretty much the same as mine, and doesn’t seem to work ?
I’m also assuming that this function should be placed into the child theme functions.php file ?
Thanks Rahul,
I want to avoid overriding core files, which is why I’m asking. Can you please provide an example of the hook ?
Regards
May be you are adding codes in wrong place. You can ping me on slack with your code snippet.