You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Completely agree, about two years ago it was removed when the actions were migrated to UA and since then I always patched in localy like:
abstract class MyModel extends Model
{
protected function init(): void
{
parent::init();
// ask user for confirmation when delete button is pressed
$this->getUserAction('delete')->confirmation = 'Do you want to delete this record?';
}
}
If we add any text here in atk4/data, how is it supposed to work with translation in the future? We cannot import/support anything about translations in atk4/data.
I would propose to add the possibility in atk4/data to add a (localised) text handling function. If not added, it uses its own hard-wired system texts. If it is defined, you can then set any localistion _t function - as extensively discussed with the community, the texts should have unique identifiers like model.delete.confirmation.
This is a separate topic, and not related to this PR: We have plenty of system texts in atk4/data that cannot be localised. As long as we do not have a localisation interface for atk4/data, we should continue implementing texts in hard-wired English in atk4/data.
Steps to reproduce:
Expected behaviour:
By default, there should be a confirmation required before deletion
So adding
'confirmation' = 'Do you really want to delete this record?'
heredata/src/Model/UserActionsTrait.php
Line 135 in 448e308
The text was updated successfully, but these errors were encountered: