You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cockpit/SOURCES/0004-Include-pkg-shell-modu...

29 lines
1.4 KiB

From 6beacc90bdaa4fc3af4f5ae6b627de59aa08fb55 Mon Sep 17 00:00:00 2001
From: Eugene Zamriy <ezamriy@msvsphere-os.ru>
Date: Tue, 21 Nov 2023 00:04:04 +0300
Subject: [PATCH 4/6] Include pkg/shell module translations in other modules
This is required to fix the sudo button translation which is
located in pkg/shell/superuser.jsx but used in different places
like pkg/sosreport module.
---
pkg/lib/cockpit-po-plugin.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pkg/lib/cockpit-po-plugin.js b/pkg/lib/cockpit-po-plugin.js
index a7f31ca64..c3594d0ce 100644
--- a/pkg/lib/cockpit-po-plugin.js
+++ b/pkg/lib/cockpit-po-plugin.js
@@ -70,7 +70,7 @@ function buildFile(po_file, subdir, webpack_module, webpack_compilation) {
for (const [msgid, translation] of Object.entries(context)) {
/* Only include msgids which appear in this source directory */
const references = translation.comments.reference.split(/\s/);
- if (!references.some(str => str.startsWith(`pkg/${subdir}`) || str.startsWith(config.src_directory) || str.startsWith(`pkg/lib`)))
+ if (!references.some(str => str.startsWith(`pkg/${subdir}`) || str.startsWith(config.src_directory) || str.startsWith(`pkg/lib`) || str.startsWith(`pkg/shell`)))
continue;
if (translation.comments.flag?.match(/\bfuzzy\b/))
--
2.43.0