From 10b2083d3e34cd332d6152526baf9dadbdf9b103 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Tue, 29 Oct 2019 14:01:07 +0100 Subject: [PATCH] extensionPrefs: Trick xgettext into accepting odd number of backticks Xgettext learned about template strings now, which is good. However it's still buggy, so instead of the "classic" xgettext issue with backticks, we now have exciting new issues to find work-arounds for. One issue is that it doesn't detect backticks inside string constants as regular characters, so having an odd number of backticks throws off its regex. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/792 --- js/extensionPrefs/main.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/js/extensionPrefs/main.js b/js/extensionPrefs/main.js index 9c5e3ecc0..86afa34ee 100644 --- a/js/extensionPrefs/main.js +++ b/js/extensionPrefs/main.js @@ -159,14 +159,14 @@ var Application = GObject.registerClass({ // markdown for pasting in gitlab issues let lines = [ `The settings of extension ${row.uuid} had an error:`, - '```', + '```', // '`' (xgettext throws up on odd number of backticks) `${exc}`, - '```', + '```', // '`' '', 'Stack trace:', - '```', + '```', // '`' exc.stack.replace(/\n$/, ''), // stack without trailing newline - '```', + '```', // '`' '' ]; clipboard.set_text(lines.join('\n'), -1);