cockpit-po-plugin: Fix crash with plural forms
Declare the `pos` variable. Fixes regression introduced in commit
7f6ef51c12.
Add plural forms to German translations to exercise this code path.
This commit is contained in:
parent
7f6ef51c12
commit
d1ffa295d6
2 changed files with 2 additions and 1 deletions
|
|
@ -59,7 +59,7 @@ module.exports = class {
|
|||
|
||||
// We know the brace in is the location to insert our function
|
||||
if (plurals) {
|
||||
pos = output.indexOf('{', 1);
|
||||
const pos = output.indexOf('{', 1);
|
||||
output = output.substr(0, pos + 1) + "'plural-forms':" + String(plurals) + "," + output.substr(pos + 1);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue