padOsd: Work around xgettext confusion

Similar to the previous work-around, xgettext gets thrown off by
embedded quotes in template strings, in particular where a template
"breaks up" a pair of quotes.

Throw in some more comments to make xgettext happy, but whoever makes
the gettext toolchain not depend on fragile regular expressions will
be drowned in beverages of their choice ...

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/792
This commit is contained in:
Florian Müllner 2019-10-29 14:13:38 +01:00 committed by Florian Müllner
parent 10b2083d3e
commit db9249a1b7

View File

@ -350,7 +350,9 @@ var PadDiagram = GObject.registerClass({
return ('<?xml version="1.0" encoding="UTF-8" standalone="no"?>' +
'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" ' +
'xmlns:xi="http://www.w3.org/2001/XInclude" ' +
`width="${this._imageWidth}" height="${this._imageHeight}"> ` +
`width="${ // " (give xgettext the paired quotes it expects)
this._imageWidth
}" height="${this._imageHeight}"> ` + // "
'<style type="text/css">');
}