Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-27098

Hard coded strings in the file manager

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.2
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      All Moodle servers
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_20_STABLE

      Description

      I found a hard coded "Add..." in the file manager. I think that this is a big problem for the usability because you will find this file manager in different contexts. If you add a file to a course then the problem will be minimal. But if someone tries to add a folder what will he think about the button "Add..." ... perhaps he will think that he should add the folder with this button ... or should he use the next one "Create folder"?

      function form_filemanager_render($options) {
      .....
      $straddfile = get_string('add', 'repository') . '...'; <------ please look here ------
      $strmakedir = get_string('makeafolder', 'moodle');
      $strdownload = get_string('downloadfolder', 'repository');
      $strloading = get_string('loading', 'repository');

      The problem has an easy solution ... the code should be the following code

      $straddfile = get_string('addfile', 'repository');

      I hope you will get it fast.

      Best regards, Ralf

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              krause Ralf Krause added a comment -

              Sorry, I forgot to remove the hard coded dots from the string. Now it should be correct.

              Show
              krause Ralf Krause added a comment - Sorry, I forgot to remove the hard coded dots from the string. Now it should be correct.
              Hide
              krause Ralf Krause added a comment -

              It's a code problem that results a language problem.

              Show
              krause Ralf Krause added a comment - It's a code problem that results a language problem.
              Hide
              dongsheng Dongsheng Cai added a comment -

              Copied from MDL-27100

              Found hardcoded string "Moving" in the files dialog. Also the string "Files" is hardcoded.

              dialog.set('innerHTML', '<div class="hd">Moving</div><div class="bd"><div id="fm-move-div">'M.str.repository.nopathselected'</div><div id="fm-tree"></div></div>');

              var textnode =

              Unknown macro: {label}

              ;

              Show
              dongsheng Dongsheng Cai added a comment - Copied from MDL-27100 Found hardcoded string "Moving" in the files dialog. Also the string "Files" is hardcoded. dialog.set('innerHTML', '<div class="hd">Moving</div><div class="bd"><div id="fm-move-div">'M.str.repository.nopathselected'</div><div id="fm-tree"></div></div>'); var textnode = Unknown macro: {label} ;
              Hide
              dongsheng Dongsheng Cai added a comment -

              pull requests submitted

              Show
              dongsheng Dongsheng Cai added a comment - pull requests submitted

                People

                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: