Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package cockpit-agama for openSUSE:Factory 
checked in at 2023-10-26 17:14:42
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/cockpit-agama (Old)
 and      /work/SRC/openSUSE:Factory/.cockpit-agama.new.24901 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "cockpit-agama"

Thu Oct 26 17:14:42 2023 rev:5 rq:1120475 version:0

Changes:
--------
--- /work/SRC/openSUSE:Factory/cockpit-agama/cockpit-agama.changes      
2023-10-23 23:41:31.768758709 +0200
+++ /work/SRC/openSUSE:Factory/.cockpit-agama.new.24901/cockpit-agama.changes   
2023-10-26 17:15:51.815452208 +0200
@@ -1,0 +2,6 @@
+Thu Oct 26 05:31:28 UTC 2023 - Imobach Gonzalez Sosa <igonzalezs...@suse.com>
+
+- Fix client initialization to avoid a useless reconnection
+  (gh#openSUSE/agama#819).
+
+-------------------------------------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ cockpit-agama.spec ++++++
--- /var/tmp/diff_new_pack.iG2JP7/_old  2023-10-26 17:15:53.219503774 +0200
+++ /var/tmp/diff_new_pack.iG2JP7/_new  2023-10-26 17:15:53.231504215 +0200
@@ -1,7 +1,7 @@
 #
-# spec file for package cockpit-agama
+# spec file for package cockpit-machines
 #
-# Copyright (c) 2023 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -31,10 +31,10 @@
 %include %_sourcedir/node_modules.spec.inc
 BuildArch:      noarch
 Requires:       cockpit
-BuildRequires:  appstream-glib
 BuildRequires:  cockpit
 BuildRequires:  cockpit-devel >= 243
 BuildRequires:  local-npm-registry
+BuildRequires:  appstream-glib
 
 %description
 Cockpit module for the experimental Agama installer.

++++++ _service ++++++
--- /var/tmp/diff_new_pack.iG2JP7/_old  2023-10-26 17:15:53.547515821 +0200
+++ /var/tmp/diff_new_pack.iG2JP7/_new  2023-10-26 17:15:53.579516996 +0200
@@ -1,10 +1,10 @@
 <services>
-  <service mode="manual" name="obs_scm">
-    <param name="url">https://github.com/openSUSE/agama.git</param>
-    <param name="versionformat">@PARENT_TAG@</param>
+  <service name="obs_scm" mode="manual">
+    <param name="versionformat">@PARENT_TAG@+@TAG_OFFSET@</param>
     <param name="versionrewrite-pattern">v(.*)</param>
+    <param name="url">http://github.com/openSUSE/agama.git</param>
     <param name="scm">git</param>
-    <param name="revision">v5</param>
+    <param name="revision">master</param>
     <param name="subdir">web</param>
     <param name="without-version">enable</param>
     <param name="extract">package-lock.json</param>

++++++ agama.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/agama/.eslintrc.json new/agama/.eslintrc.json
--- old/agama/.eslintrc.json    2023-10-23 14:02:31.000000000 +0200
+++ new/agama/.eslintrc.json    2023-10-26 07:54:33.000000000 +0200
@@ -20,8 +20,9 @@
         },
         "sourceType": "module"
     },
-    "plugins": ["flowtype", "i18next", "react", "react-hooks", 
"@typescript-eslint"],
+    "plugins": ["agama-i18n", "flowtype", "i18next", "react", "react-hooks", 
"@typescript-eslint"],
     "rules": {
+        "agama-i18n/string-literals": "error",
         "i18next/no-literal-string": "error",
         "indent": ["error", 2,
             {
@@ -66,6 +67,13 @@
         "rules": {
           "i18next/no-literal-string": "off"
         }
+      },
+      {
+        // do not check translation arguments in the test, it checks some 
internals by passing variables
+        "files": ["i18n.test.js"],
+        "rules": {
+          "agama-i18n/string-literals": "off"
+        }
       }
     ],
     "globals": {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/agama/eslint-plugin-agama-i18n/README.md 
new/agama/eslint-plugin-agama-i18n/README.md
--- old/agama/eslint-plugin-agama-i18n/README.md        1970-01-01 
01:00:00.000000000 +0100
+++ new/agama/eslint-plugin-agama-i18n/README.md        2023-10-26 
07:54:33.000000000 +0200
@@ -0,0 +1,31 @@
+# The ESLint Plugin
+
+This directory contains an ESLint plugin which checks that only string literals
+are passed to the translation functions.
+
+It is bundled here because it is closely tied to the Agama project and probably
+does not make sense for other projects.
+
+## Disabling the Check
+
+In some rare cases using a variable instead of a string literal is correct. In
+that case disable the check locally:
+
+```js
+const SIZES = [ N_("small"), N_("medium"), N_("large") ];
+
+// returns one of the sizes above
+const sz = getSize();
+
+// eslint-disable-next-line agama-i18n/string-literals
+return <span>{_(sz)}</span>;
+```
+
+## Links
+
+- https://eslint.org/docs/latest/extend/custom-rule-tutorial - tutorial for
+  writing an ESLint plugin
+- https://eslint.org/docs/latest/extend/custom-rules - documentation for
+  writing an ESLint plugin
+- https://astexplorer.net - online tool for browsing a parsed AST tree,
+  useful for inspecting the properties of parsed source code
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/agama/eslint-plugin-agama-i18n/eslint-plugin-agama-i18n.js 
new/agama/eslint-plugin-agama-i18n/eslint-plugin-agama-i18n.js
--- old/agama/eslint-plugin-agama-i18n/eslint-plugin-agama-i18n.js      
1970-01-01 01:00:00.000000000 +0100
+++ new/agama/eslint-plugin-agama-i18n/eslint-plugin-agama-i18n.js      
2023-10-26 07:54:33.000000000 +0200
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) [2023] SUSE LLC
+ *
+ * All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of version 2 of the GNU General Public License as published
+ * by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, contact SUSE LLC.
+ *
+ * To contact SUSE LLC about this file by physical or electronic mail, you may
+ * find current contact information at www.suse.com.
+ */
+
+const stringLiteralsRule = require("./string-literals");
+
+module.exports = {
+  rules: {
+    // name of the rule
+    "string-literals": stringLiteralsRule
+  }
+};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/agama/eslint-plugin-agama-i18n/package.json 
new/agama/eslint-plugin-agama-i18n/package.json
--- old/agama/eslint-plugin-agama-i18n/package.json     1970-01-01 
01:00:00.000000000 +0100
+++ new/agama/eslint-plugin-agama-i18n/package.json     2023-10-26 
07:54:33.000000000 +0200
@@ -0,0 +1,5 @@
+{
+  "name": "eslint-plugin-agama-i18n",
+  "version": "0.0.1",
+  "main": "eslint-plugin-agama-i18n.js"
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/agama/eslint-plugin-agama-i18n/string-literals.js 
new/agama/eslint-plugin-agama-i18n/string-literals.js
--- old/agama/eslint-plugin-agama-i18n/string-literals.js       1970-01-01 
01:00:00.000000000 +0100
+++ new/agama/eslint-plugin-agama-i18n/string-literals.js       2023-10-26 
07:54:33.000000000 +0200
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) [2023] SUSE LLC
+ *
+ * All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of version 2 of the GNU General Public License as published
+ * by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, contact SUSE LLC.
+ *
+ * To contact SUSE LLC about this file by physical or electronic mail, you may
+ * find current contact information at www.suse.com.
+ */
+
+// names of all translation functions
+const translations = ["_", "n_", "N_", "Nn_"];
+// names of the plural translation functions
+const plurals = ["n_", "Nn_"];
+
+const errorMsgLiteral = "Use a string literal argument in the translation 
functions";
+const errorMsgMissing = "Missing argument";
+
+/**
+ * Check whether the AST tree node is a string literal
+ * @param {Object} node the node
+ * @returns {boolean} true if the node is a string literal
+ */
+function isStringLiteral(node) {
+  if (!node) return false;
+
+  return node.type === "Literal" && (typeof node.value === "string");
+}
+
+/**
+ * Check whether the ATS node is a string literal
+ * @param {Object} node the node to check
+ * @param {Object} parentNode parent node for reporting error if `node` is 
undefined
+ * @param {Object} context the context for reporting an error
+ */
+function checkNode(node, parentNode, context) {
+  if (node) {
+    // string literal?
+    if (!isStringLiteral(node)) {
+      context.report(node, errorMsgLiteral);
+    }
+  } else {
+    // missing argument
+    context.report(parentNode, errorMsgMissing);
+  }
+}
+
+// define the eslint rule
+module.exports = {
+  meta: {
+    type: "problem",
+    docs: {
+      description: "Check that only string literals are passed to the 
translation functions.",
+    },
+  },
+  create: function (context) {
+    return {
+      // callback for handling function calls
+      CallExpression(node) {
+        // not a translation function, skip it
+        if (!translations.includes(node.callee.name)) return;
+
+        // check the first argument
+        checkNode(node.arguments[0], node, context);
+
+        // check also the second argument for the plural forms
+        if (plurals.includes(node.callee.name)) {
+          checkNode(node.arguments[1], node, context);
+        }
+      }
+    };
+  }
+};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/agama/eslint-plugin-agama-i18n/string-literals.test.js 
new/agama/eslint-plugin-agama-i18n/string-literals.test.js
--- old/agama/eslint-plugin-agama-i18n/string-literals.test.js  1970-01-01 
01:00:00.000000000 +0100
+++ new/agama/eslint-plugin-agama-i18n/string-literals.test.js  2023-10-26 
07:54:33.000000000 +0200
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) [2023] SUSE LLC
+ *
+ * All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of version 2 of the GNU General Public License as published
+ * by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, contact SUSE LLC.
+ *
+ * To contact SUSE LLC about this file by physical or electronic mail, you may
+ * find current contact information at www.suse.com.
+ */
+
+const { RuleTester } = require("eslint");
+const stringLiteralsRule = require("./string-literals");
+
+const ruleTester = new RuleTester({
+  parserOptions: { ecmaVersion: 2015 }
+});
+
+ruleTester.run(
+  "string-literals",
+  stringLiteralsRule,
+  {
+    // valid code examples, these should pass
+    valid: [
+      { code: "_(\"foo\")" },
+      { code: "_('foo')" },
+      { code: "n_(\"one\", \"many\", count)" },
+      { code: "n_('one', 'many', count)" },
+    ],
+    // invalid examples, these should fail
+    invalid: [
+      // string literal errors
+      { code: "_(null)", errors: 1 },
+      { code: "_(undefined)", errors: 1 },
+      { code: "_(42)", errors: 1 },
+      { code: "_(foo)", errors: 1 },
+      { code: "_(foo())", errors: 1 },
+      { code: "_(`foo`)", errors: 1 },
+      { code: "_(\"foo\" + \"bar\")", errors: 1 },
+      { code: "_('foo' + 'bar')", errors: 1 },
+      // missing argument errors
+      { code: "_()", errors: 1 },
+      { code: "n_('foo')", errors: 1 },
+      { code: "n_(\"foo\")", errors: 1 },
+      // string literal + missing argument errors
+      { code: "n_(foo)", errors: 2 },
+      // string literal error twice
+      { code: "n_(foo, bar)", errors: 2 },
+      { code: "Nn_(foo, bar)", errors: 2 },
+    ],
+  }
+);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/agama/package/cockpit-agama.changes 
new/agama/package/cockpit-agama.changes
--- old/agama/package/cockpit-agama.changes     2023-10-23 14:02:31.000000000 
+0200
+++ new/agama/package/cockpit-agama.changes     2023-10-26 07:54:33.000000000 
+0200
@@ -1,4 +1,10 @@
 -------------------------------------------------------------------
+Thu Oct 26 05:31:28 UTC 2023 - Imobach Gonzalez Sosa <igonzalezs...@suse.com>
+
+- Fix client initialization to avoid a useless reconnection
+  (gh#openSUSE/agama#819).
+
+-------------------------------------------------------------------
 Mon Oct 23 11:33:53 UTC 2023 - Imobach Gonzalez Sosa <igonzalezs...@suse.com>
 
 - Version 5
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/agama/package-lock.json new/agama/package-lock.json
--- old/agama/package-lock.json 2023-10-23 14:02:31.000000000 +0200
+++ new/agama/package-lock.json 2023-10-26 07:54:33.000000000 +0200
@@ -53,6 +53,7 @@
         "eslint-config-standard": "^17.0.0",
         "eslint-config-standard-jsx": "^11.0.0",
         "eslint-config-standard-react": "^13.0.0",
+        "eslint-plugin-agama-i18n": "file:eslint-plugin-agama-i18n",
         "eslint-plugin-flowtype": "^8.0.3",
         "eslint-plugin-i18next": "^6.0.3",
         "eslint-plugin-import": "^2.22.1",
@@ -97,6 +98,10 @@
         "node": ">=18"
       }
     },
+    "eslint-plugin-agama-i18n": {
+      "version": "0.1.0",
+      "dev": true
+    },
     "node_modules/@aashutoshrathi/word-wrap": {
       "version": "1.2.6",
       "resolved": 
"https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz";,
@@ -8503,6 +8508,10 @@
         "ms": "^2.1.1"
       }
     },
+    "node_modules/eslint-plugin-agama-i18n": {
+      "resolved": "eslint-plugin-agama-i18n",
+      "link": true
+    },
     "node_modules/eslint-plugin-es-x": {
       "version": "7.2.0",
       "resolved": 
"https://registry.npmjs.org/eslint-plugin-es-x/-/eslint-plugin-es-x-7.2.0.tgz";,
@@ -25128,6 +25137,9 @@
         }
       }
     },
+    "eslint-plugin-agama-i18n": {
+      "version": "file:eslint-plugin-agama-i18n"
+    },
     "eslint-plugin-es-x": {
       "version": "7.2.0",
       "resolved": 
"https://registry.npmjs.org/eslint-plugin-es-x/-/eslint-plugin-es-x-7.2.0.tgz";,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/agama/package.json new/agama/package.json
--- old/agama/package.json      2023-10-23 14:02:31.000000000 +0200
+++ new/agama/package.json      2023-10-26 07:54:33.000000000 +0200
@@ -54,6 +54,7 @@
     "eslint-config-standard": "^17.0.0",
     "eslint-config-standard-jsx": "^11.0.0",
     "eslint-config-standard-react": "^13.0.0",
+    "eslint-plugin-agama-i18n": "file:eslint-plugin-agama-i18n",
     "eslint-plugin-flowtype": "^8.0.3",
     "eslint-plugin-i18next": "^6.0.3",
     "eslint-plugin-import": "^2.22.1",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/agama/share/locales.json new/agama/share/locales.json
--- old/agama/share/locales.json        1970-01-01 01:00:00.000000000 +0100
+++ new/agama/share/locales.json        2023-10-26 07:54:33.000000000 +0200
@@ -0,0 +1,65 @@
+{
+  "af": "za",
+  "am": "et",
+  "ar": "eg",
+  "ast": "es",
+  "be": "by",
+  "bg": "bg",
+  "bn": "in",
+  "bs": "ba",
+  "ca": "es",
+  "cs": "cz",
+  "cy": "gb",
+  "da": "dk",
+  "de": "de",
+  "en": "us",
+  "el": "gr",
+  "es": "es",
+  "et": "ee",
+  "eu": "es",
+  "fa": "ir",
+  "fi": "fi",
+  "fr": "fr",
+  "gl": "es",
+  "gu": "in",
+  "he": "il",
+  "hi": "in",
+  "hr": "hr",
+  "hu": "hu",
+  "id": "id",
+  "it": "it",
+  "ja": "jp",
+  "ka": "kz",
+  "km": "kh",
+  "kn": "in",
+  "ko": "kr",
+  "lt": "lt",
+  "lv": "lv",
+  "mk": "mk",
+  "mr": "in",
+  "ms": "my",
+  "my": "mm",
+  "nb": "no",
+  "nds": "de",
+  "ne": "np",
+  "nl": "nl",
+  "nn": "no",
+  "pa": "in",
+  "pl": "pl",
+  "pt": "pt",
+  "ro": "ro",
+  "ru": "ru",
+  "si": "lk",
+  "sk": "sk",
+  "sl": "si",
+  "sq": "al",
+  "sr": "rs",
+  "sv": "se",
+  "ta": "in",
+  "tg": "tj",
+  "th": "th",
+  "tr": "tr",
+  "uk": "ua",
+  "vi": "vn",
+  "zu": "za"
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/agama/share/update-manifest.py 
new/agama/share/update-manifest.py
--- old/agama/share/update-manifest.py  1970-01-01 01:00:00.000000000 +0100
+++ new/agama/share/update-manifest.py  2023-10-26 07:54:33.000000000 +0200
@@ -0,0 +1,167 @@
+#!/usr/bin/env python3
+
+# Copyright (c) [2023] SUSE LLC
+#
+# All Rights Reserved.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of version 2 of the GNU General Public License as published
+# by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+# more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, contact SUSE LLC.
+#
+# To contact SUSE LLC about this file by physical or electronic mail, you may
+# find current contact information at www.suse.com.
+
+from argparse import ArgumentParser
+from langtable import language_name
+from pathlib import Path
+import json
+import re
+import subprocess
+
+
+class Locale:
+    language: str
+    territory: str
+
+    def __init__(self, language: str, territory: str = None):
+        self.language = language
+        self.territory = territory
+
+    def code(self):
+        return f"{self.language}-{self.territory}"
+
+    def name(self, include_territory: bool = False):
+        if include_territory:
+            return language_name(languageId=self.language,
+                                 territoryId=self.territory.upper())
+        else:
+            return language_name(languageId=self.language)
+
+
+class PoFile:
+    path: str
+    locale: Locale
+
+    def __init__(self, path: Path):
+        self.path = path
+        parts = self.path.stem.split("_")
+        self.locale = Locale(*parts)
+        self.__coverage = None
+
+    def coverage(self):
+        if self.__coverage is not None:
+            return self.__coverage
+
+        cmd = subprocess.run(["msgfmt", "--statistics", self.path],
+                             capture_output=True)
+        parts = cmd.stderr.decode("UTF-8").split(",")
+        numbers = []
+        for part in parts:
+            number, _rest = part.strip().split(" ", 1)
+            numbers.append(int(number))
+
+        total = sum(numbers)
+        self.__coverage = round(int(numbers[0]) / total * 100)
+        return self.__coverage
+
+    def language(self):
+        return self.path.stem
+
+
+class Manifest:
+    """ This class takes care of updating the manifest file"""
+
+    def __init__(self, path: Path):
+        self.path = path
+        self.__read__()
+
+    def __read__(self):
+        with open(self.path) as file:
+            self.content = json.load(file)
+
+    def update(self, po_files, lang2territory: str, threshold: int):
+        """
+        Updates the list of locales in the manifest file
+
+        It does not write the changes to file system. Use the write() function
+        for that.
+
+        :param po_directory   Directory where there are the po files
+        :param lang2territory Map of languages to default territories
+        :param threshold      Percentage of the strings that must be covered to
+                              include the locale in the manifest
+        """
+        supported = [Locale("en", "us")]
+
+        for path in po_files:
+            po_file = PoFile(path)
+            locale = po_file.locale
+            if locale.territory is None:
+                locale.territory = lang2territory.get(
+                    locale.language, None)
+
+            if locale.territory is None:
+                print(
+                    "could not find a territory for '{language}'"
+                    .format(language=locale.language)
+                )
+            elif po_file.coverage() < threshold:
+                print(
+                    "not enough coverage for '{language}' ({coverage}%)"
+                    .format(
+                        language=locale.code(),
+                        coverage=po_file.coverage())
+                )
+            else:
+                supported.append(locale)
+
+        languages = [loc.language for loc in supported]
+        self.content["locales"] = dict()
+        for locale in supported:
+            include_territory = languages.count(locale.language) > 1
+            self.content["locales"][locale.code()] = locale.name(
+                include_territory)
+
+    def write(self):
+        with open(self.path, "w+") as file:
+            json.dump(self.content, file, indent=4, ensure_ascii=False)
+
+
+def update_manifest(args):
+    """Command to update the manifest.json file"""
+    manifest = Manifest(Path(args.manifest))
+    paths = [path for path in Path(args.po_directory).glob("*.po")]
+    with open(args.territories) as file:
+        lang2territory = json.load(file)
+    manifest.update(paths, lang2territory, args.threshold)
+    manifest.write()
+
+
+if __name__ == "__main__":
+    parser = ArgumentParser(prog="locales.py")
+    parser.set_defaults(func=update_manifest)
+    parser.add_argument(
+        "manifest", type=str, help="Path to the manifest file",
+    )
+    parser.add_argument(
+        "--po-directory", type=str, help="Directory containing the po files",
+        default="web/po"
+    )
+    parser.add_argument(
+        "--territories", type=str, help="Path to language-territories map",
+        default="web/share/locales.json"
+    )
+    parser.add_argument(
+        "--threshold", type=int, help="threshold", default=70
+    )
+
+    parsed = parser.parse_args()
+    parsed.func(parsed)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/agama/src/components/storage/VolumeForm.jsx 
new/agama/src/components/storage/VolumeForm.jsx
--- old/agama/src/components/storage/VolumeForm.jsx     2023-10-23 
14:02:31.000000000 +0200
+++ new/agama/src/components/storage/VolumeForm.jsx     2023-10-26 
07:54:33.000000000 +0200
@@ -56,6 +56,7 @@
   return (
     <FormSelect { ...formSelectProps }>
       {/* the unit values are marked for translation in the utils.js file */}
+      {/* eslint-disable-next-line agama-i18n/string-literals */}
       { units.map(unit => <FormSelectOption key={unit} value={unit} 
label={_(unit)} />) }
     </FormSelect>
   );
@@ -295,6 +296,7 @@
             <Radio
               id={value}
               key={`size-${value}`}
+              // eslint-disable-next-line agama-i18n/string-literals
               label={_(SIZE_OPTION_LABELS[value] || value)}
               value={value}
               name="size-option"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/agama/src/context/agama.jsx 
new/agama/src/context/agama.jsx
--- old/agama/src/context/agama.jsx     2023-10-23 14:02:31.000000000 +0200
+++ new/agama/src/context/agama.jsx     2023-10-26 07:54:33.000000000 +0200
@@ -27,37 +27,21 @@
 import { SoftwareProvider } from "./software";
 import { NotificationProvider } from "./notification";
 
-const InternalProviders = ({ children }) => {
-  return (
-    <SoftwareProvider>
-      <NotificationProvider>
-        {children}
-      </NotificationProvider>
-    </SoftwareProvider>
-  );
-};
-
 /**
  * Combines all application providers.
  *
  * @param {object} props
  * @param {React.ReactNode} [props.children] - content to display within the 
provider.
- * @param {boolean} [props.disableL10n] - Disable l10n handling (to be used
- *   during tests). FIXME: this argument might not be needed anymore.
  */
-function AgamaProviders({ disableL10n, children }) {
-  if (disableL10n) {
-    return (
-      <InstallerClientProvider>
-        <InternalProviders>{children}</InternalProviders>
-      </InstallerClientProvider>
-    );
-  }
-
+function AgamaProviders({ children }) {
   return (
     <InstallerClientProvider>
       <L10nProvider>
-        <InternalProviders>{children}</InternalProviders>
+        <SoftwareProvider>
+          <NotificationProvider>
+            {children}
+          </NotificationProvider>
+        </SoftwareProvider>
       </L10nProvider>
     </InstallerClientProvider>
   );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/agama/src/context/installer.jsx 
new/agama/src/context/installer.jsx
--- old/agama/src/context/installer.jsx 2023-10-23 14:02:31.000000000 +0200
+++ new/agama/src/context/installer.jsx 2023-10-26 07:54:33.000000000 +0200
@@ -84,6 +84,7 @@
       if (await client.isConnected()) {
         setValue(client);
         setAttempt(0);
+        return;
       }
 
       console.warn(`Failed to connect to D-Bus (attempt ${attempt + 1})`);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/agama/src/context/installer.test.jsx 
new/agama/src/context/installer.test.jsx
--- old/agama/src/context/installer.test.jsx    2023-10-23 14:02:31.000000000 
+0200
+++ new/agama/src/context/installer.test.jsx    2023-10-26 07:54:33.000000000 
+0200
@@ -63,7 +63,7 @@
         <InstallerClientProvider interval={0.1}>
           <ClientStatus />
         </InstallerClientProvider>);
-      await screen.findByText("attempt: 2");
+      await screen.findByText("attempt: 1");
     });
   });
 

++++++ agama.obsinfo ++++++
--- /var/tmp/diff_new_pack.iG2JP7/_old  2023-10-26 17:15:53.963531100 +0200
+++ /var/tmp/diff_new_pack.iG2JP7/_new  2023-10-26 17:15:53.963531100 +0200
@@ -1,5 +1,5 @@
 name: agama
-version: 5
-mtime: 1698062551
-commit: 0b494c95fa1fa38d3d358131e2e2bb2e1c659714
+version: 5+13
+mtime: 1698299673
+commit: 320b5801b5c445167dacbc24b3451528b2ee8a90
 

++++++ package-lock.json ++++++
--- /var/tmp/diff_new_pack.iG2JP7/_old  2023-10-26 17:15:54.043534038 +0200
+++ /var/tmp/diff_new_pack.iG2JP7/_new  2023-10-26 17:15:54.051534332 +0200
@@ -53,6 +53,7 @@
         "eslint-config-standard": "^17.0.0",
         "eslint-config-standard-jsx": "^11.0.0",
         "eslint-config-standard-react": "^13.0.0",
+        "eslint-plugin-agama-i18n": "file:eslint-plugin-agama-i18n",
         "eslint-plugin-flowtype": "^8.0.3",
         "eslint-plugin-i18next": "^6.0.3",
         "eslint-plugin-import": "^2.22.1",
@@ -97,6 +98,10 @@
         "node": ">=18"
       }
     },
+    "eslint-plugin-agama-i18n": {
+      "version": "0.1.0",
+      "dev": true
+    },
     "node_modules/@aashutoshrathi/word-wrap": {
       "version": "1.2.6",
       "resolved": 
"https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz";,
@@ -8503,6 +8508,10 @@
         "ms": "^2.1.1"
       }
     },
+    "node_modules/eslint-plugin-agama-i18n": {
+      "resolved": "eslint-plugin-agama-i18n",
+      "link": true
+    },
     "node_modules/eslint-plugin-es-x": {
       "version": "7.2.0",
       "resolved": 
"https://registry.npmjs.org/eslint-plugin-es-x/-/eslint-plugin-es-x-7.2.0.tgz";,
@@ -25128,6 +25137,9 @@
         }
       }
     },
+    "eslint-plugin-agama-i18n": {
+      "version": "file:eslint-plugin-agama-i18n"
+    },
     "eslint-plugin-es-x": {
       "version": "7.2.0",
       "resolved": 
"https://registry.npmjs.org/eslint-plugin-es-x/-/eslint-plugin-es-x-7.2.0.tgz";,

Reply via email to