As the administration UI is written in angular, translations must also be available in different javascript section of the page.
The response array of this method returns all messages keys which will be assigned:
Example:
php
public function getJsTranslationMessages()
{
return ['js_ngrest_rm_page', 'js_ngrest_rm_confirm', 'js_ngrest_error'],
}
Assuming the aboved keys are also part of the translation messages files.
In the javascript code you can access assigned js translation message like followed:
js
i18n['js_ngrest_rm_page'];