Uploaded image for project: 'Moodle Community Sites'
  1. Moodle Community Sites
  2. MDLSITE-7810

AMOS shows backslash \ in language strings in plugins that should not be there

      This was reported in my plugin https://github.com/lmscloud-io/moodle-tool_vault/issues/14 and the report confused me initially.

      Then I realised that it is a problem with how AMOS imports plugin strings.

      In my language file I have

      $string['loginexplanation'] = "Create an account on {\$a} to be able to backup or restore the site. With the <b>free account</b> you will be able to backup and restore small sites and store them up to 7 days in the cloud.";
      

      which displays correctly in English. In fact, if I do not use \ in front of '$a' , I get errors

      Warning: Undefined variable $a in /.../admin/tool/vault/lang/en/tool_vault.php on line 164
      

      But when my plugin's strings are imported into AMOS they appear in the AMOS UI like this:

            daniel.urena@moodle.com Daniel Ureña
            marina Marina Glancy
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.