Skip to content

Commit 30be966

Browse files
committed
Merge remote-tracking branch 'origin/support/2.13.0' into support/2.14.0
2 parents 4472338 + 8aaec8a commit 30be966

6 files changed

Lines changed: 454 additions & 3 deletions

File tree

RoboFilePlugin.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,16 @@ public function localesPull($percent = 70) {
130130
* @return void
131131
*/
132132
public function localesMo() {
133-
$this->_exec('./tools/release --compile-mo');
133+
$po_files = preg_grep('/\.po$/', scandir('./locales'));
134+
foreach ($po_files as $po_file) {
135+
$mo_file = preg_replace('/\.po$/', '.mo', $po_file);
136+
echo("Processing {$po_file}\n");
137+
passthru("cd ./locales && msgfmt -f -o {$mo_file} {$po_file}", $exit_code);
138+
if ($exit_code > 0) {
139+
exit($exit_code);
140+
}
141+
}
142+
134143
return $this;
135144
}
136145

inc/field/multiselectfield.class.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434

3535
use Dropdown;
3636
use Html;
37+
use Glpi\Toolbox\Sanitizer;
3738

3839
class MultiSelectField extends CheckboxesField
3940
{
@@ -55,8 +56,10 @@ public function getRenderedHtml($domain, $canEdit = true): string {
5556
$fieldName = 'formcreator_field_' . $id;
5657
$values = $this->getAvailableValues();
5758
$translatedValues = [];
59+
5860
foreach ($values as $key => $value) {
59-
$translatedValues[$key] = __($value, $domain);
61+
$unsanitized = Sanitizer::unsanitize(__($value, $domain));
62+
$translatedValues[$key] = $unsanitized;
6063
}
6164
if (!empty($values)) {
6265
$html .= Dropdown::showFromArray($fieldName, $translatedValues, [

install/install.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ class PluginFormcreatorInstall {
8282
'2.13.3' => '2.13.4',
8383
'2.13.4' => '2.13.5',
8484
'2.13.5' => '2.13.6',
85+
'2.13.6' => '2.13.7',
8586
'2.13.6' => '2.14',
8687
];
8788

0 commit comments

Comments
 (0)