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

Name and description internationalization issues in service administration

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.0
    • 1.9.1
    • Administration, MNet
    • None
    • Any
    • MOODLE_19_STABLE
    • MOODLE_20_STABLE

      This is a small issue that appears when we want to add a custom XML-RPC service for a Moodle activity module.

      Originally, when adding a new rpc service definition, it will have a parent_type and a parent. When browing to the peers service administration page, services are presented using, at line §33 :

      <h3><?php echo get_string($name.'name', $version['parent_type'].''.$version['parent'] , $mnet_peer->name); ?></h3>

      This suitable for "auth" and "mnet" hardcoded services, but not for modules : if we decide to give the "mod" parent_type value, and lets say 'tracker' module name as "parent", we get a "mod_tracker" string domain selector, although the common use of internationalization domains is to use the simple module name as selector key ('tracker').

      Here comes a fix proposal in mnet_services.html that avoids this side effect (from §26 upwards) :

      <table cellpadding="9" cellspacing="0" >
      <?php
      foreach($myservices as $name => $versions) {
      $version = current($versions);
      $stringdomain = ($version['parent_type'] == 'mod') ? $version['parent'] : $version['parent_type'].'_'.$version['parent'] ; // MAKES A SUITABLE KEY FOR MODS
      ?>
      <tr>
      <td align="left" valign="top" colspan="2">
      <h3><?php echo get_string($name.'_name', $stringdomain , $mnet_peer->name); ?></h3> // USE THE KEY
      <?php echo get_string($name.'_description', $stringdomain, $mnet_peer->name); ?> // USE THE KEY
      <?php
      $breakstring = '';

            mjollnir Penny Leach
            vf Valery Fremaux
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

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