{"head_branch": "nightly", "contributor": "markotoplak", "sha_fail": "d54275b61d018de1027878ce5ac738c280a0f48f", "sha_success": "34ac519e0facc8c6961c1c1aefee53e24c884dec", "language": "Python", "repo_owner": "biolab", "repo_name": "orange3", "workflow_name": "Check translations", "workflow_filename": "translations.yml", "workflow_path": ".github/workflows/translations.yml", "workflow": "name: Check translations\n\non:\n push:\n branches:\n - master\n pull_request:\n branches:\n - master\n\njobs:\n build:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v4\n\n - name: Setup Python\n uses: actions/setup-python@v4\n with:\n python-version: '3.x'\n\n - name: Install Trubar\n run: |\n pip install trubar\n\n - name: Collect translations\n run: |\n cd i18n\n trubar collect -s ../Orange new.jaml\n trubar merge -u Obsolete.jaml si.jaml new.jaml\n trubar missing -o Missing.jaml new.jaml\n if [ ! -s Missing.jaml ]\n then\n rm Missing.jaml\n fi\n\n - name: Check translations\n run: |\n cd i18n\n for fn in Obsolete Missing\n do\n if [ -f $fn.jaml ]\n then\n echo \"::group::$fn translations\"\n cat $fn.jaml\n echo \"::endgroup::\"\n fi\n done\n echo \"-------------------------------\"\n trubar stat new.jaml\n echo \"-------------------------------\"\n if [ -f Missing.jaml ] || [ -f Obsolete.jaml ]\n then\n echo \"### Missing or obsolete translations\" >> $GITHUB_STEP_SUMMARY\n echo \"::error::Missing or obsolete translations\"\n echo \"Run 'trubar collect -s Orange i18n/si.jaml'\"\n echo \"and see the changes in the message file, i18n/si.jaml\"\n exit 1\n else\n echo \"### All translations are up to date\" >> $GITHUB_STEP_SUMMARY\n fi\n", "logs": "\u001b[36;1m cat $fn.jaml\u001b[0m\n\u001b[36;1m echo \"::endgroup::\"\u001b[0m\n\u001b[36;1m fi\u001b[0m\n\u001b[36;1mdone\u001b[0m\n\u001b[36;1mecho \"-------------------------------\"\u001b[0m\n\u001b[36;1mtrubar stat new.jaml\u001b[0m\n\u001b[36;1mecho \"-------------------------------\"\u001b[0m\n\u001b[36;1mif [ -f Missing.jaml ] || [ -f Obsolete.jaml ]\u001b[0m\n\u001b[36;1mthen\u001b[0m\n\u001b[36;1m echo \"### Missing or obsolete translations\" >> $GITHUB_STEP_SUMMARY\u001b[0m\n\u001b[36;1m echo \"::error::Missing or obsolete translations\"\u001b[0m\n\u001b[36;1m echo \"Run 'trubar collect -s Orange i18n/si.jaml'\"\u001b[0m\n\u001b[36;1m echo \"and see the changes in the message file, i18n/si.jaml\"\u001b[0m\n\u001b[36;1m exit 1\u001b[0m\n\u001b[36;1melse\u001b[0m\n\u001b[36;1m echo \"### All translations are up to date\" >> $GITHUB_STEP_SUMMARY\u001b[0m\n\u001b[36;1mfi\u001b[0m\nshell: /usr/bin/bash -e {0}\nenv:\n pythonLocation: /opt/hostedtoolcache/Python/3.12.0/x64\n PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.12.0/x64/lib/pkgconfig\n Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.0/x64\n Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.0/x64\n Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.0/x64\n LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.0/x64/lib\n##[endgroup]\n##[group]Missing translations\ntests/sql/base.py:\n class `DataBaseTest`:\n def `_check_db`:\n def `ensure_db`:\n {} module is required for this database: null\n Database is not running: null\n No connection provided for {}: null\n Unsupported database: null\n##[endgroup]\n-------------------------------\nTotal messages: 11238\n\nTranslated: 3711 33.0%\nKept unchanged: 331 2.9%\nProgrammatic: 7192 64.0%\nTotal completed: 11234 100.0%\n\nUntranslated: 4 0.0%\n-------------------------------\n##[error]Missing or obsolete translations\nRun 'trubar collect -s Orange i18n/si.jaml'\nand see the changes in the message file, i18n/si.jaml\n##[error]Process completed with exit code 1.\n", "diff": "diff --git a/Orange/tests/sql/base.py b/Orange/tests/sql/base.py\nindex 75b084b37..c396274bc 100644\n--- a/Orange/tests/sql/base.py\n+++ b/Orange/tests/sql/base.py\n@@ -340,22 +340,19 @@ class DataBaseTest:\n i = db.find(\"<\")\n db, ver = db[:i], db[i:]\n \n- def ensure_db(db):\n- if db in cls.db_conn:\n- if not cls.db_conn[db].is_module:\n- raise unittest.SkipTest(\n- \"{} module is required for this database\".format(\n- cls.db_conn[db].module))\n-\n- elif not cls.db_conn[db].is_active:\n- raise unittest.SkipTest(\"Database is not running\")\n- else:\n- if db in test_connections.keys():\n- raise unittest.SkipTest(\"No connection provided for {}\".format(db))\n- else:\n- raise Exception(\"Unsupported database\")\n+ if db in cls.db_conn:\n+ if not cls.db_conn[db].is_module:\n+ raise unittest.SkipTest(\n+ \"{} module is required for this database\".format(\n+ cls.db_conn[db].module))\n \n- ensure_db(db)\n+ elif not cls.db_conn[db].is_active:\n+ raise unittest.SkipTest(\"Database is not running\")\n+ else:\n+ if db in test_connections.keys():\n+ raise unittest.SkipTest(\"No connection provided for {}\".format(db))\n+ else:\n+ raise Exception(\"Unsupported database\")\n \n if ver is not None:\n if ver[0] == \">\" and cls.db_conn[db].version <= int(ver[1:]):\n"}