Getting undefined when trying to use SUGAR.language.get with a custom string in $app_strings

Hello. I am trying to use a custom string that is defined in the location custom/Extension/application/Ext/Language/ as described in the guide Language Strings :: SuiteCRM Documentation.

I plan to use this string in a js file that has been added to the edit view of a module

Example

In app/suitecrm/custom/Extension/application/Ext/Language/en_us.validations.php

<?php

$app_strings['LBL_TESTING'] = "Just testing";

Then I have

  1. Do a Admin / Repair / “Quick Repair and Rebuild”
  2. Do a Admin / Repair / “Rebuild Javascript Languages”

I have subsequently confirmed that in app/suitecrm/cache/jsLanguage/en_us.js the object assigned to SUGAR.language.setLanguage('app_strings', {...} contains the tag

But when using it for example this way

alert(SUGAR.language.get("app_strings", "LBL_TESTING"));

I always get undifined

Could you suggest me how to correct this problem? Thanks in advance

Maybe try a few more JavaScript repairs, the ones that rebuild the groupings and the minified files.

Maybe you will also need to force a rebuild of the cached view templates.