Moodle
  1. Moodle
  2. MDL-10970

Something in get_string() prevents other languages to work...

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.8.2, 1.9
    • Fix Version/s: 1.6.6, 1.7.3, 1.8.3, 1.9
    • Component/s: Language
    • Labels:
      None
    • Database:
      Any
    • Affected Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_16_STABLE, MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE
    • Rank:
      28676

      Description

      I've checked this in my test server and, although, I'm not 100% sure if it's something I'm missing it should be reviewed, IMO.

      In my test server I've the Spanish file: gradereport_grader.php properly installed and translated. It's contents are:

      <?PHP // $Id: gradereport_grader.php,v 1.1 2007/06/23 12:04:38 barias Exp $
      // gradereport_grader.php - created with Moodle 1.8 + (2007021502)

      $string['grader:manage'] = 'Gestionar informe del calificador';
      $string['grader:view'] = 'Ver informe del calificador';
      $string['modulename'] = 'Calificador';

      ?>

      But, when I go to the gradebook page I get all the report, export and import plugins in English!

      Not sure if it's something related with the use of the 4th parameter of the get_string() function or so, but it seems that the Spanish translation is never raised and should be.

      Ciao

        Activity

        Hide
        Eloy Lafuente (stronk7) added a comment -

        Adding some people here....

        Show
        Eloy Lafuente (stronk7) added a comment - Adding some people here....
        Hide
        Koen Roggemans added a comment -

        Me to, allthough I remember clearly that I have them translated

        Show
        Koen Roggemans added a comment - Me to, allthough I remember clearly that I have them translated
        Hide
        Martin Dougiamas added a comment -

        Out to Nicolas on his new laptop!

        Show
        Martin Dougiamas added a comment - Out to Nicolas on his new laptop!
        Hide
        Nicolas Martignoni added a comment -

        Confirming.

        Show
        Nicolas Martignoni added a comment - Confirming.
        Hide
        Nicolas Connault added a comment -

        MDL-10970 Someone was using
        $locations = array('location1');
        $locations += array('location2', 'location3', 'location4');

        to save the hassle of doing one $locations[] = 'location1'; for each location.

        But += doesn't add any entry if the key of the new array already exists in the original array. So, using my example, the resulting array would be:

        $locations: array('location1', 'location3', 'location4');

        The bug was identical in all versions since 1.6

        Show
        Nicolas Connault added a comment - MDL-10970 Someone was using $locations = array('location1'); $locations += array('location2', 'location3', 'location4'); to save the hassle of doing one $locations[] = 'location1'; for each location. But += doesn't add any entry if the key of the new array already exists in the original array. So, using my example, the resulting array would be: $locations: array('location1', 'location3', 'location4'); The bug was identical in all versions since 1.6
        Hide
        Nicolas Martignoni added a comment -

        Verified on fresh 1.9beta+ from CVS. Closing.

        Show
        Nicolas Martignoni added a comment - Verified on fresh 1.9beta+ from CVS. Closing.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: