[gnome-shell] extensionPrefs: Trick xgettext into accepting odd number of backticks
- From: Marco Trevisan <marcotrevi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] extensionPrefs: Trick xgettext into accepting odd number of backticks
- Date: Tue, 29 Oct 2019 18:34:04 +0000 (UTC)
commit 10b2083d3e34cd332d6152526baf9dadbdf9b103
Author: Florian Müllner <fmuellner gnome org>
Date: Tue Oct 29 14:01:07 2019 +0100
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 9c5e3ecc00..86afa34eee 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]