Moodle

wrong translation of edit questions categories

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.9.5
  • Fix Version/s: 1.9.7
  • Component/s: Quiz
  • Labels:
    None
  • Environment:
    any
  • Difficulty:
    Easy
  • Affected Branches:
    MOODLE_19_STABLE
  • Fixed Branches:
    MOODLE_19_STABLE

Description

I just noticed that the tooltip for editing questions categories in the list of categories , and also the legend in editing a category incorrecty show 'edit this course category' and not 'edit this question category'.

This is due to missing 'quiz' second parameter in get_string calls in category_class.php script

ppollet@prope:~/web/moodle.195/question$ svn diff -rHEAD
Index: category_class.php
===================================================================
— category_class.php (rĂ©vision 246)
+++ category_class.php (copie de travail)
@@ -62,7 +62,7 @@
function set_icon_html($first, $last, &$lastitem){
global $CFG;
$category = $this->item;

  • $this->icons['edit']= $this->image_icon(get_string('editthiscategory'),
    + $this->icons['edit']= $this->image_icon(get_string('editthiscategory','quiz'), <--here
    "{$CFG->wwwroot}/question/category.php?".$this->parentlist->pageurl->get_query_string(array('edit'=>$category->id)), 'edit');
    parent::set_icon_html($first, $last, $lastitem);
    $toplevel = ($this->parentlist->parentitem === null);//this is a top level item
    @@ -148,7 +148,7 @@
    $this->str->delete = get_string('delete');
    $this->str->moveup = get_string('moveup');
    $this->str->movedown = get_string('movedown');
  • $this->str->edit = get_string('editthiscategory');
    + $this->str->edit = get_string('editthiscategory','quiz'); <--here
    $this->str->hide = get_string('hide');
    $this->str->publish = get_string('publish', 'quiz');
    $this->str->order = get_string('order');

This also requires adding the missing translation string editthiscategory' in en_utf8/quiz.php and also in other langages

Cheers.

Activity

Hide
Tim Hunt added a comment -

Err. I can't see the string editthiscategory in http://cvs.moodle.org/moodle/lang/en_utf8/quiz.php?view=markup&pathrev=MOODLE_19_STABLE, so we also need to add that string, or something.

Show
Tim Hunt added a comment - Err. I can't see the string editthiscategory in http://cvs.moodle.org/moodle/lang/en_utf8/quiz.php?view=markup&pathrev=MOODLE_19_STABLE, so we also need to add that string, or something.
Hide
Patrick Pollet added a comment -

That what I said just above

"This also requires adding the missing translation string editthiscategory' in en_utf8/quiz.php and also in other langages "

Show
Patrick Pollet added a comment - That what I said just above "This also requires adding the missing translation string editthiscategory' in en_utf8/quiz.php and also in other langages "
Hide
Tim Hunt added a comment -

Oh, you expect me to actually read what you said, before I have had my first cup of coffee of the morning

Since it needs a new lang string, it had better go in after the impending 1.9.6 release.

Show
Tim Hunt added a comment - Oh, you expect me to actually read what you said, before I have had my first cup of coffee of the morning Since it needs a new lang string, it had better go in after the impending 1.9.6 release.
Hide
Tim Hunt added a comment -

OK fixed. thank you for noticing this.

Show
Tim Hunt added a comment - OK fixed. thank you for noticing this.
Hide
Andrew Davis added a comment -

well spotted. closing.

Show
Andrew Davis added a comment - well spotted. closing.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: