Skip to content

Commit

Permalink
MDL-55564 output: Single select label wasn't translated
Browse files Browse the repository at this point in the history
Part of MDL-55071
  • Loading branch information
Frederic Massart authored and danpoltawski committed Sep 23, 2016
1 parent cd7a164 commit 58357d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lib/outputcomponents.php
Original file line number Diff line number Diff line change
Expand Up @@ -948,9 +948,9 @@ public function export_for_template(renderer_base $output) {
$nothing = ['' => $this->nothing];
$hasnothing = true;
} else if (is_array($this->nothing)) {
$key = key($this->nothing);
if ($key === 'choose' || $key === 'choosedots') {
$nothing = [$key => get_string('choosedots')];
$nothingvalue = reset($this->nothing);
if ($nothingvalue === 'choose' || $nothingvalue === 'choosedots') {
$nothing = [key($this->nothing) => get_string('choosedots')];
} else {
$nothing = $this->nothing;
}
Expand Down
2 changes: 1 addition & 1 deletion theme/noname/templates/core/single_select.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<div class="form-group">
{{#label}}
<label for="{{id}}" {{#labelattributes}}{{name}}="{{value}}" {{/labelattributes}}>
{{label}}
{{{label}}}
</label>
{{/label}}
{{#helpicon}}
Expand Down

0 comments on commit 58357d4

Please sign in to comment.