Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-cron-descriptor for 
openSUSE:Factory checked in at 2023-08-09 17:26:09
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-cron-descriptor (Old)
 and      /work/SRC/openSUSE:Factory/.python-cron-descriptor.new.11712 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-cron-descriptor"

Wed Aug  9 17:26:09 2023 rev:5 rq:1103084 version:1.4

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-cron-descriptor/python-cron-descriptor.changes
    2022-12-03 10:04:10.743421179 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-cron-descriptor.new.11712/python-cron-descriptor.changes
 2023-08-09 17:26:13.817745239 +0200
@@ -1,0 +2,35 @@
+Wed Aug  9 07:28:16 UTC 2023 - Dirk Müller <dmuel...@suse.com>
+
+- update to 1.4:
+  * support Vietnamese
+  * Possible BC - Parsing call was moved from
+    `ExpressionDescriptor.get_description` to
+    `ExpressionDescriptor.__init__`  that means parsing
+    exceptions are thrown when calling `ExpressionDescriptor`
+    constructor and not when calling
+    `ExpressionDescriptor.get_description`  modify your exception
+    handling accordingly...
+  * Possible BC - Option `throw_exception_on_parse_error`
+    (boolean) was removed, code now works as if
+    `throw_exception_on_parse_error=True` (default - always throw
+    exceptions). Remove `throw_exception_on_parse_error` option
+    from your code if you were using it.
+  * Added missing spanish translation string
+  * Add possibility to use custom .mo files, locally
+  * Slovak translation
+  * Fixes #31
+  * Fixes #36
+  * Added Korean support by @hanqyu
+  * Added Persian support by @Davoodeh
+  * Added Tamil support by @sankarhari
+  * Added Japanese support by @tho-asterist
+  * fixes unclosed open translation file by Rafael Reuber
+  * various fixes around
+  * Fix CI Build/Deploy on new version
+  * Fixes some issues ( #14 #17 ) and some small code refactoring
+  * Fixes #13
+  * Fixes #10
+  * Relase fixing issue #6
+  * Release solving issue #4
+
+-------------------------------------------------------------------

Old:
----
  cron_descriptor-1.2.32.tar.gz

New:
----
  cron_descriptor-1.4.tar.gz

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

Other differences:
------------------
++++++ python-cron-descriptor.spec ++++++
--- /var/tmp/diff_new_pack.b4CZqo/_old  2023-08-09 17:26:14.449749173 +0200
+++ /var/tmp/diff_new_pack.b4CZqo/_new  2023-08-09 17:26:14.453749199 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-cron-descriptor
 #
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-cron-descriptor
-Version:        1.2.32
+Version:        1.4
 Release:        0
 Summary:        Python library that converts cron expressions into human 
readable strings
 License:        MIT

++++++ cron_descriptor-1.2.32.tar.gz -> cron_descriptor-1.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/cron-descriptor-1.2.32/.github/workflows/python-test.yml 
new/cron-descriptor-1.4/.github/workflows/python-test.yml
--- old/cron-descriptor-1.2.32/.github/workflows/python-test.yml        
2022-11-15 20:11:02.000000000 +0100
+++ new/cron-descriptor-1.4/.github/workflows/python-test.yml   2023-05-19 
09:40:44.000000000 +0200
@@ -6,10 +6,11 @@
 
 jobs:
   build:
-    runs-on: ubuntu-latest
+    # see 
https://github.com/actions/setup-python/issues/162#issuecomment-1325307787
+    runs-on: ubuntu-20.04
     strategy:
       matrix:
-        python-version: ["2.7", "3.6", "3.7", "3.8", "3.9", "3.10", 
"3.11.0-alpha - 3.11"]
+        python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11.0-alpha - 
3.11"]
 
     steps:
     - uses: actions/checkout@v1
@@ -20,6 +21,6 @@
     - name: Install dependencies
       run: |
         python -m pip install --upgrade pip
-        pip install pep8 flake8 pep8-naming
+        pip install mock pep8 flake8 pep8-naming
     - name: Test
       run: python setup.py test
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cron-descriptor-1.2.32/.gitignore 
new/cron-descriptor-1.4/.gitignore
--- old/cron-descriptor-1.2.32/.gitignore       2022-11-15 20:11:02.000000000 
+0100
+++ new/cron-descriptor-1.4/.gitignore  2023-05-19 09:40:44.000000000 +0200
@@ -89,5 +89,6 @@
 .ropeproject
 
 .idea
+.DS_Store
 
 # Created by .ignore support plugin (hsz.mobi)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cron-descriptor-1.2.32/.gitlab-ci.yml 
new/cron-descriptor-1.4/.gitlab-ci.yml
--- old/cron-descriptor-1.2.32/.gitlab-ci.yml   2022-11-15 20:11:02.000000000 
+0100
+++ new/cron-descriptor-1.4/.gitlab-ci.yml      2023-05-19 09:40:44.000000000 
+0200
@@ -8,7 +8,7 @@
   stage: test
   script:
     - apt-get update -qy
-    - apt-get install python3-setuptools ca-certificates python3-pip -qy
+    - apt-get install python3-setuptools ca-certificates python3-pip 
python3-mock -qy
     - python3 setup.py test
   tags:
     - debian
@@ -16,7 +16,7 @@
 test:archlinux:
   stage: test
   script:
-    - pacman -Syu python-setuptools python-pip --noconfirm
+    - pacman -Syu python-setuptools python-pip python-mock --noconfirm
     - python setup.py test
   tags:
     - archlinux
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cron-descriptor-1.2.32/README.md 
new/cron-descriptor-1.4/README.md
--- old/cron-descriptor-1.2.32/README.md        2022-11-15 20:11:02.000000000 
+0100
+++ new/cron-descriptor-1.4/README.md   2023-05-19 09:40:44.000000000 +0200
@@ -42,8 +42,7 @@
 
 descriptor = ExpressionDescriptor(
     expression = "*/10 * * * *",
-    throw_exception_on_parse_error = True, 
-    casing_type = CasingTypeEnum.Sentence, 
+    casing_type = CasingTypeEnum.Sentence,
     use_24hour_time_format = True
 )
 
@@ -54,7 +53,6 @@
 # Or passing Options class as second argument:
 
 options = Options()
-options.throw_exception_on_parse_error = True
 options.casing_type = CasingTypeEnum.Sentence
 options.use_24hour_time_format = True
 descriptor = ExpressionDescriptor("*/10 * * * *", options)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cron-descriptor-1.2.32/archlinux/PKGBUILD 
new/cron-descriptor-1.4/archlinux/PKGBUILD
--- old/cron-descriptor-1.2.32/archlinux/PKGBUILD       2022-11-15 
20:11:02.000000000 +0100
+++ new/cron-descriptor-1.4/archlinux/PKGBUILD  2023-05-19 09:40:44.000000000 
+0200
@@ -1,5 +1,5 @@
 pkgname=python-cron-descriptor
-pkgver=1.2.32
+pkgver=1.4
 pkgdesc="A Python library that converts cron expressions into human readable 
strings."
 pkgrel=1
 arch=('any')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/cron-descriptor-1.2.32/cron_descriptor/ExpressionDescriptor.py 
new/cron-descriptor-1.4/cron_descriptor/ExpressionDescriptor.py
--- old/cron-descriptor-1.2.32/cron_descriptor/ExpressionDescriptor.py  
2022-11-15 20:11:02.000000000 +0100
+++ new/cron-descriptor-1.4/cron_descriptor/ExpressionDescriptor.py     
2023-05-19 09:40:44.000000000 +0200
@@ -44,7 +44,6 @@
     _expression = ''
     _options = None
     _expression_parts = []
-    _parsed = False
 
     def __init__(self, expression, options=None, **kwargs):
         """Initializes a new instance of the ExpressionDescriptor
@@ -61,7 +60,6 @@
         self._expression = expression
         self._options = options
         self._expression_parts = []
-        self._parsed = False
 
         # if kwargs in _options, overwrite it, if not raise exception
         for kwarg in kwargs:
@@ -71,7 +69,11 @@
                 raise WrongArgumentException("Unknown {} configuration 
argument".format(kwarg))
 
         # Initializes localization
-        self.get_text = GetText(options.locale_code)
+        self.get_text = GetText(options.locale_code, options.locale_location)
+
+        # Parse expression
+        parser = ExpressionParser(self._expression, self._options)
+        self._expression_parts = parser.parse()
 
     def _(self, message):
         return self.get_text.trans.gettext(message)
@@ -84,35 +86,22 @@
         Returns:
             The cron expression description
         Raises:
-            Exception: if throw_exception_on_parse_error is True
+            Exception:
 
         """
-        try:
-            if self._parsed is False:
-                parser = ExpressionParser(self._expression, self._options)
-                self._expression_parts = parser.parse()
-                self._parsed = True
-
-            choices = {
-                DescriptionTypeEnum.FULL: self.get_full_description,
-                DescriptionTypeEnum.TIMEOFDAY: 
self.get_time_of_day_description,
-                DescriptionTypeEnum.HOURS: self.get_hours_description,
-                DescriptionTypeEnum.MINUTES: self.get_minutes_description,
-                DescriptionTypeEnum.SECONDS: self.get_seconds_description,
-                DescriptionTypeEnum.DAYOFMONTH: 
self.get_day_of_month_description,
-                DescriptionTypeEnum.MONTH: self.get_month_description,
-                DescriptionTypeEnum.DAYOFWEEK: 
self.get_day_of_week_description,
-                DescriptionTypeEnum.YEAR: self.get_year_description,
-            }
-
-            description = choices.get(description_type, 
self.get_seconds_description)()
-
-        except Exception as ex:
-            if self._options.throw_exception_on_parse_error:
-                raise
-            else:
-                description = str(ex)
-        return description
+        choices = {
+            DescriptionTypeEnum.FULL: self.get_full_description,
+            DescriptionTypeEnum.TIMEOFDAY: self.get_time_of_day_description,
+            DescriptionTypeEnum.HOURS: self.get_hours_description,
+            DescriptionTypeEnum.MINUTES: self.get_minutes_description,
+            DescriptionTypeEnum.SECONDS: self.get_seconds_description,
+            DescriptionTypeEnum.DAYOFMONTH: self.get_day_of_month_description,
+            DescriptionTypeEnum.MONTH: self.get_month_description,
+            DescriptionTypeEnum.DAYOFWEEK: self.get_day_of_week_description,
+            DescriptionTypeEnum.YEAR: self.get_year_description,
+        }
+
+        return choices.get(description_type, self.get_seconds_description)()
 
     def get_full_description(self):
         """Generates the FULL description
@@ -120,7 +109,7 @@
         Returns:
             The FULL description
         Raises:
-            FormatException: if formatting fails and 
throw_exception_on_parse_error is True
+            FormatException: if formatting fails
 
         """
 
@@ -144,8 +133,7 @@
             description = self._(
                 "An error occurred when generating the expression description. 
 Check the cron expression syntax."
             )
-            if self._options.throw_exception_on_parse_error:
-                raise FormatException(description)
+            raise FormatException(description)
 
         return description
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cron-descriptor-1.2.32/cron_descriptor/GetText.py 
new/cron-descriptor-1.4/cron_descriptor/GetText.py
--- old/cron-descriptor-1.2.32/cron_descriptor/GetText.py       2022-11-15 
20:11:02.000000000 +0100
+++ new/cron-descriptor-1.4/cron_descriptor/GetText.py  2023-05-19 
09:40:44.000000000 +0200
@@ -39,13 +39,13 @@
     Handles language translations
     """
 
-    def __init__(self, locale_code):
+    def __init__(self, locale_code, locale_location=None):
         """
         Initialize GetText
         :param locale_code selected locale
         """
         try:
-            self.trans = self.load_locale(locale_code)
+            self.trans = self.load_locale(locale_code, locale_location)
         except IOError:
             logger.debug('Failed to find locale {}'.format(locale_code))
             logger.debug('Attempting to load en_US as fallback')
@@ -55,8 +55,11 @@
         # support for _("") or _("")
         self.trans.add_fallback(FallBackNull())
 
-    def load_locale(self, locale_code):
-        filename = os.path.join(os.path.dirname(os.path.abspath(__file__)), 
'locale', '{}.mo'.format(locale_code))
+    def load_locale(self, locale_code, locale_location=None):
+        if locale_location is None:
+            filename = 
os.path.join(os.path.dirname(os.path.abspath(__file__)), 'locale', 
'{}.mo'.format(locale_code))
+        else:
+            filename = os.path.join(locale_location, 
'{}.mo'.format(locale_code))
         with open(filename, "rb") as f:
             trans = gettext.GNUTranslations(f)
         logger.debug('{} Loaded'.format(filename))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cron-descriptor-1.2.32/cron_descriptor/Options.py 
new/cron-descriptor-1.4/cron_descriptor/Options.py
--- old/cron-descriptor-1.2.32/cron_descriptor/Options.py       2022-11-15 
20:11:02.000000000 +0100
+++ new/cron-descriptor-1.4/cron_descriptor/Options.py  2023-05-19 
09:40:44.000000000 +0200
@@ -32,11 +32,11 @@
     """
 
     def __init__(self):
-        self.throw_exception_on_parse_error = True
         self.casing_type = CasingTypeEnum.Sentence
         self.verbose = False
         self.day_of_week_start_index_zero = True
         self.use_24hour_time_format = False
+        self.locale_location = None
 
         code, encoding = locale.getlocale()
         self.locale_code = code
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cron-descriptor-1.2.32/cron_descriptor/__init__.py 
new/cron-descriptor-1.4/cron_descriptor/__init__.py
--- old/cron-descriptor-1.2.32/cron_descriptor/__init__.py      2022-11-15 
20:11:02.000000000 +0100
+++ new/cron-descriptor-1.4/cron_descriptor/__init__.py 2023-05-19 
09:40:44.000000000 +0200
@@ -27,6 +27,6 @@
 from .Exception import MissingFieldException, FormatException, 
WrongArgumentException
 
 
-__version__ = '1.2.32'
+__version__ = '1.4.0'
 __all__ = ['Options', 'ExpressionDescriptor', 'get_description', 
'DescriptionTypeEnum',
            'CasingTypeEnum', 'MissingFieldException', 'FormatException', 
'WrongArgumentException']
Binary files old/cron-descriptor-1.2.32/cron_descriptor/locale/es_ES.mo and 
new/cron-descriptor-1.4/cron_descriptor/locale/es_ES.mo differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/cron-descriptor-1.2.32/cron_descriptor/locale/es_ES.po 
new/cron-descriptor-1.4/cron_descriptor/locale/es_ES.po
--- old/cron-descriptor-1.2.32/cron_descriptor/locale/es_ES.po  2022-11-15 
20:11:02.000000000 +0100
+++ new/cron-descriptor-1.4/cron_descriptor/locale/es_ES.po     2023-05-19 
09:40:44.000000000 +0200
@@ -8,8 +8,8 @@
 "Project-Id-Version: 1.0\n"
 "Report-Msgid-Bugs-To: adam.schub...@sg1-game.net\n"
 "POT-Creation-Date: 2016-01-19 02:00+0100\n"
-"PO-Revision-Date: 2016-01-19 02:00+0100\n"
-"Last-Translator: Adam Schubert <adam.schub...@sg1-game.net>\n"
+"PO-Revision-Date: 2023-01-25 10:00+0100\n"
+"Last-Translator: Dario M. García Carretero <dario.avi...@gmail.com>\n"
 "Language-Team: \n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=utf-8\n"
@@ -216,3 +216,8 @@
 #: ExpressionDescriptor.py:434
 msgid ", every hour"
 msgstr ", cada hora"
+
+#: ExpressionDescriptor.py:489
+#, python-brace-format
+msgid ", starting {0}"
+msgstr ", empezando {0}"
\ No newline at end of file
Binary files old/cron-descriptor-1.2.32/cron_descriptor/locale/sk_SK.mo and 
new/cron-descriptor-1.4/cron_descriptor/locale/sk_SK.mo differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/cron-descriptor-1.2.32/cron_descriptor/locale/sk_SK.po 
new/cron-descriptor-1.4/cron_descriptor/locale/sk_SK.po
--- old/cron-descriptor-1.2.32/cron_descriptor/locale/sk_SK.po  1970-01-01 
01:00:00.000000000 +0100
+++ new/cron-descriptor-1.4/cron_descriptor/locale/sk_SK.po     2023-05-19 
09:40:44.000000000 +0200
@@ -0,0 +1,217 @@
+# Translation of cron_descriptor
+# Copyright (C) 2023
+# This file is distributed under the same license as the cron_descriptor 
package.
+# Erik Telepovský <e...@pragmaticmates.com>, 2023.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: 1.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2023-01-25 15:08+0200\n"
+"PO-Revision-Date: 2023-01-25 15:44+0100\n"
+"Last-Translator: Erik Telepovský <e...@pragmaticmates.com>\n"
+"Language-Team: \n"
+"Language: sk_SK\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 3.2.2\n"
+
+#: ExpressionDescriptor.py:130
+msgid ""
+"An error occured when generating the expression description.  Check the cron "
+"expression syntax."
+msgstr "Nastala chyba pri generovaní popisu výrazu. Skontrolujte syntax 
výrazu."
+
+#: ExpressionDescriptor.py:151
+msgid "At "
+msgstr "O "
+
+#: ExpressionDescriptor.py:160
+#, python-brace-format
+msgid "Every minute between {0} and {1}"
+msgstr "Každú minútu medzi {0} a {1}"
+
+#: ExpressionDescriptor.py:165
+msgid "At"
+msgstr "O"
+
+#: ExpressionDescriptor.py:175
+msgid " and"
+msgstr " a"
+
+#: ExpressionDescriptor.py:201
+msgid "every second"
+msgstr "každú sekúndu"
+
+#: ExpressionDescriptor.py:201
+#, python-brace-format
+msgid "every {0} seconds"
+msgstr "každých {0} sekúnd"
+
+#: ExpressionDescriptor.py:201
+#, python-brace-format
+msgid "seconds {0} through {1} past the minute"
+msgstr "{0} až {1} sekúnd"
+
+#: ExpressionDescriptor.py:201
+#, python-brace-format
+msgid "at {0} seconds past the minute"
+msgstr "{0} sekúnd po minúte"
+
+#: ExpressionDescriptor.py:209
+msgid "every minute"
+msgstr "každú minútu"
+
+#: ExpressionDescriptor.py:209
+#, python-brace-format
+msgid "every {0} minutes"
+msgstr "každých {0} minút"
+
+#: ExpressionDescriptor.py:209
+#, python-brace-format
+msgid "minutes {0} through {1} past the hour"
+msgstr "{0} až {1} minút"
+
+#: ExpressionDescriptor.py:209
+#, python-brace-format
+msgid "at {0} minutes past the hour"
+msgstr "o {0}. minúte"
+
+#: ExpressionDescriptor.py:218
+msgid "every hour"
+msgstr "každú hodinu"
+
+#: ExpressionDescriptor.py:218
+#, python-brace-format
+msgid "every {0} hours"
+msgstr "každých {0} hodin"
+
+#: ExpressionDescriptor.py:218
+#, python-brace-format
+msgid "between {0} and {1}"
+msgstr "medzi {0} a {1}"
+
+#: ExpressionDescriptor.py:218
+#, python-brace-format
+msgid "at {0}"
+msgstr "o {0}"
+
+#: ExpressionDescriptor.py:241
+msgid "first"
+msgstr "prvý"
+
+#: ExpressionDescriptor.py:243
+msgid "second"
+msgstr "druhý"
+
+#: ExpressionDescriptor.py:245
+msgid "third"
+msgstr "tretí"
+
+#: ExpressionDescriptor.py:247
+msgid "forth"
+msgstr "štvrtý"
+
+#: ExpressionDescriptor.py:249
+msgid "fifth"
+msgstr "piaty"
+
+#: ExpressionDescriptor.py:251
+msgid ", on the "
+msgstr ", na "
+
+#: ExpressionDescriptor.py:252
+#, python-brace-format
+msgid " {0} of the month"
+msgstr " {0} mesiaca"
+
+#: ExpressionDescriptor.py:254
+#, python-brace-format
+msgid ", on the last {0} of the month"
+msgstr ", posledú {0} mesiaca"
+
+#: ExpressionDescriptor.py:256
+#, python-brace-format
+msgid ", only on {0}"
+msgstr ", iba {0}"
+
+#: ExpressionDescriptor.py:260 ExpressionDescriptor.py:303
+#: ExpressionDescriptor.py:435
+msgid ", every day"
+msgstr ", každý deň"
+
+#: ExpressionDescriptor.py:260
+#, python-brace-format
+msgid ", every {0} days of the week"
+msgstr ", každých {0} dní v týždni"
+
+#: ExpressionDescriptor.py:260 ExpressionDescriptor.py:274
+#: ExpressionDescriptor.py:318
+#, python-brace-format
+msgid ", {0} through {1}"
+msgstr ", {0} do {1}"
+
+#: ExpressionDescriptor.py:272
+#, python-brace-format
+msgid ", every {0} months"
+msgstr ", každý {0} mesiac"
+
+#: ExpressionDescriptor.py:275 ExpressionDescriptor.py:319
+#, python-brace-format
+msgid ", only in {0}"
+msgstr ", iba {0}"
+
+#: ExpressionDescriptor.py:288
+msgid ", on the last day of the month"
+msgstr ", posledný deň mesiaca"
+
+#: ExpressionDescriptor.py:290
+msgid ", on the last weekday of the month"
+msgstr ", posledný pracovný deň mesiaca"
+
+#: ExpressionDescriptor.py:297
+msgid "first weekday"
+msgstr "prvý víkendový deň"
+
+#: ExpressionDescriptor.py:297
+#, python-brace-format
+msgid "weekday nearest day {0}"
+msgstr "najbližší pracovný deň k {0}"
+
+#: ExpressionDescriptor.py:299
+#, python-brace-format
+msgid ", on the {0} of the month"
+msgstr ", {0} mesiaca"
+
+#: ExpressionDescriptor.py:303
+#, python-brace-format
+msgid ", every {0} days"
+msgstr ", každých {0} dní"
+
+#: ExpressionDescriptor.py:304
+#, python-brace-format
+msgid ", between day {0} and {1} of the month"
+msgstr ", medzi {0}. a {1}. dňom mesiaca"
+
+#: ExpressionDescriptor.py:304
+#, python-brace-format
+msgid ", on day {0} of the month"
+msgstr ", {0}. deň mesiaca"
+
+#: ExpressionDescriptor.py:316
+#, python-brace-format
+msgid ", every {0} years"
+msgstr ", každý {0}. rok"
+
+#: ExpressionDescriptor.py:385
+msgid " and "
+msgstr " a "
+
+#: ExpressionDescriptor.py:433
+msgid ", every minute"
+msgstr ", každú minútu"
+
+#: ExpressionDescriptor.py:434
+msgid ", every hour"
+msgstr ", každú hodinu"
Binary files old/cron-descriptor-1.2.32/cron_descriptor/locale/vi_VN.mo and 
new/cron-descriptor-1.4/cron_descriptor/locale/vi_VN.mo differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/cron-descriptor-1.2.32/cron_descriptor/locale/vi_VN.po 
new/cron-descriptor-1.4/cron_descriptor/locale/vi_VN.po
--- old/cron-descriptor-1.2.32/cron_descriptor/locale/vi_VN.po  1970-01-01 
01:00:00.000000000 +0100
+++ new/cron-descriptor-1.4/cron_descriptor/locale/vi_VN.po     2023-05-19 
09:40:44.000000000 +0200
@@ -0,0 +1,222 @@
+# Translation of cron_descriptor
+# Copyright (C) 2016
+# This file is distributed under the same license as the cron_descriptor 
package.
+# Doan Bui <h...@bxdoan.com>, 2023.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: 1.0\n"
+"Report-Msgid-Bugs-To: h...@bxdoan.com\n"
+"POT-Creation-Date: 2016-01-19 02:00+0100\n"
+"PO-Revision-Date: 2023-05-19 01:40+0700\n"
+"Last-Translator: Doan Bui <h...@bxdoan.com>\n"
+"Language-Team: \n"
+"Language: vi_VN\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 3.3.1\n"
+
+#: ExpressionDescriptor.py:145
+msgid ""
+"An error occured when generating the expression description.  Check the cron "
+"expression syntax."
+msgstr "Đã xảy ra lỗi khi tạo mô tả biểu thức. Hãy kiểm tra 
cú pháp biểu thức cron."
+
+#: ExpressionDescriptor.py:169
+msgid "At "
+msgstr "Tại "
+
+#: ExpressionDescriptor.py:180
+#, python-brace-format
+msgid "Every minute between {0} and {1}"
+msgstr "Mỗi phút giữa {0} và {1}"
+
+#: ExpressionDescriptor.py:186
+msgid "At"
+msgstr "Tại"
+
+#: ExpressionDescriptor.py:196
+msgid " and"
+msgstr " và"
+
+#: ExpressionDescriptor.py:226
+msgid "every second"
+msgstr "mỗi giây"
+
+#: ExpressionDescriptor.py:228
+#, python-brace-format
+msgid "every {0} seconds"
+msgstr "mỗi {0} giây"
+
+#: ExpressionDescriptor.py:229
+#, python-brace-format
+msgid "seconds {0} through {1} past the minute"
+msgstr "từ giây {0} đến giây {1} mỗi phút"
+
+#: ExpressionDescriptor.py:230
+#, python-brace-format
+msgid "at {0} seconds past the minute"
+msgstr "tại giây {0} mỗi phút"
+
+#: ExpressionDescriptor.py:243
+msgid "every minute"
+msgstr "mỗi phút"
+
+#: ExpressionDescriptor.py:245
+#, python-brace-format
+msgid "every {0} minutes"
+msgstr "mỗi {0} phút"
+
+#: ExpressionDescriptor.py:246
+#, python-brace-format
+msgid "minutes {0} through {1} past the hour"
+msgstr "từ phút {0} đến phút {1} mỗi giờ"
+
+#: ExpressionDescriptor.py:247
+#, python-brace-format
+msgid "at {0} minutes past the hour"
+msgstr "từ phút {0} mỗi giờ"
+
+#: ExpressionDescriptor.py:260
+msgid "every hour"
+msgstr "mỗi giờ"
+
+#: ExpressionDescriptor.py:262
+#, python-brace-format
+msgid "every {0} hours"
+msgstr "mỗi {0} giờ"
+
+#: ExpressionDescriptor.py:263
+#, python-brace-format
+msgid "between {0} and {1}"
+msgstr "giữa {0} và {1}"
+
+#: ExpressionDescriptor.py:264
+#, python-brace-format
+msgid "at {0}"
+msgstr "lúc {0}"
+
+#: ExpressionDescriptor.py:295
+msgid "first"
+msgstr "đầu tiên"
+
+#: ExpressionDescriptor.py:296
+msgid "second"
+msgstr "thứ hai"
+
+#: ExpressionDescriptor.py:297
+msgid "third"
+msgstr "thứ ba"
+
+#: ExpressionDescriptor.py:298
+msgid "forth"
+msgstr "thứ tư"
+
+#: ExpressionDescriptor.py:299
+msgid "fifth"
+msgstr "thứ năm"
+
+#: ExpressionDescriptor.py:305
+msgid ", on the "
+msgstr ", vào "
+
+#: ExpressionDescriptor.py:306
+#, python-brace-format
+msgid " {0} of the month"
+msgstr " {0} của tháng"
+
+#: ExpressionDescriptor.py:308
+#, python-brace-format
+msgid ", on the last {0} of the month"
+msgstr ", vào {0} cuối cùng của tháng"
+
+#: ExpressionDescriptor.py:310
+#, python-brace-format
+msgid ", only on {0}"
+msgstr ", chỉ trên {0}"
+
+#: ExpressionDescriptor.py:316 ExpressionDescriptor.py:366
+#: ExpressionDescriptor.py:368 ExpressionDescriptor.py:554
+msgid ", every day"
+msgstr ", mỗi ngày"
+
+#: ExpressionDescriptor.py:318
+#, python-brace-format
+msgid ", every {0} days of the week"
+msgstr ", mỗi ngày {0} của tuần"
+
+#: ExpressionDescriptor.py:319 ExpressionDescriptor.py:335
+#: ExpressionDescriptor.py:398 ExpressionDescriptor.py:467
+#, python-brace-format
+msgid ", {0} through {1}"
+msgstr ", từ {0} đến {1}"
+
+#: ExpressionDescriptor.py:334
+#, python-brace-format
+msgid ", every {0} months"
+msgstr ", mỗi {0} tháng"
+
+#: ExpressionDescriptor.py:336 ExpressionDescriptor.py:399
+#, python-brace-format
+msgid ", only in {0}"
+msgstr ", chỉ vào {0}"
+
+#: ExpressionDescriptor.py:350
+msgid ", on the last day of the month"
+msgstr ", vào ngày cuối của tháng"
+
+#: ExpressionDescriptor.py:352
+msgid ", on the last weekday of the month"
+msgstr ", vào tuần cuối của tháng"
+
+#: ExpressionDescriptor.py:359
+msgid "first weekday"
+msgstr "ngày đầu tiên của tuần"
+
+#: ExpressionDescriptor.py:359
+#, python-brace-format
+msgid "weekday nearest day {0}"
+msgstr "ngày trong tuần gần ngày {0}"
+
+#: ExpressionDescriptor.py:361
+#, python-brace-format
+msgid ", on the {0} of the month"
+msgstr ", vào {0} của tháng"
+
+#: ExpressionDescriptor.py:368
+#, python-brace-format
+msgid ", every {0} days"
+msgstr ", mỗi {0} ngày"
+
+#: ExpressionDescriptor.py:369
+#, python-brace-format
+msgid ", between day {0} and {1} of the month"
+msgstr ", giữa {0} và {1} của mỗi tháng"
+
+#: ExpressionDescriptor.py:370
+#, python-brace-format
+msgid ", on day {0} of the month"
+msgstr ", vào ngày {0} của mỗi tháng"
+
+#: ExpressionDescriptor.py:397
+#, python-brace-format
+msgid ", every {0} years"
+msgstr ", mỗi {0} năm"
+
+#: ExpressionDescriptor.py:449
+#, python-brace-format
+msgid ", starting {0}"
+msgstr ", bắt đầu lúc {0}"
+
+#: ExpressionDescriptor.py:462
+msgid " and "
+msgstr " và  "
+
+#: ExpressionDescriptor.py:552
+msgid ", every minute"
+msgstr ", mỗi phút"
+
+#: ExpressionDescriptor.py:553
+msgid ", every hour"
+msgstr ", mỗi giờ"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cron-descriptor-1.2.32/setup.py 
new/cron-descriptor-1.4/setup.py
--- old/cron-descriptor-1.2.32/setup.py 2022-11-15 20:11:02.000000000 +0100
+++ new/cron-descriptor-1.4/setup.py    2023-05-19 09:40:44.000000000 +0200
@@ -32,7 +32,7 @@
     
     setuptools.setup(
         name="cron_descriptor",
-        version="1.2.32",
+        version="1.4.0",
         description="A Python library that converts cron expressions "
                     "into human readable strings.",
         author="Adam Schubert",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cron-descriptor-1.2.32/tests/TestExceptions.py 
new/cron-descriptor-1.4/tests/TestExceptions.py
--- old/cron-descriptor-1.2.32/tests/TestExceptions.py  2022-11-15 
20:11:02.000000000 +0100
+++ new/cron-descriptor-1.4/tests/TestExceptions.py     2023-05-19 
09:40:44.000000000 +0200
@@ -31,47 +31,23 @@
     """
 
     def test_none_cron_expression_exception(self):
-        self.options.throw_exception_on_parse_error = True
-        ceh = ExpressionDescriptor(None, self.options)
-        self.assertRaises(
-            MissingFieldException,
-            ceh.get_description,
-            DescriptionTypeEnum.FULL)
+        with self.assertRaises(MissingFieldException):
+            ceh = ExpressionDescriptor(None, self.options)
+            ceh.get_description(DescriptionTypeEnum.FULL)
 
     def test_empty_cron_expression_exception(self):
-        self.options.throw_exception_on_parse_error = True
-        ceh = ExpressionDescriptor('', self.options)
-        self.assertRaises(
-            MissingFieldException,
-            ceh.get_description,
-            DescriptionTypeEnum.FULL)
-
-    def test_none_cron_expression_error(self):
-        self.options.throw_exception_on_parse_error = False
-        ceh = ExpressionDescriptor(None, self.options)
-        self.assertEqual(
-            "Field 'ExpressionDescriptor.expression' not found.",
-            ceh.get_description(DescriptionTypeEnum.FULL))
+
+        with self.assertRaises(MissingFieldException):
+            ceh = ExpressionDescriptor('', self.options)
+            ceh.get_description(DescriptionTypeEnum.FULL)
 
     def test_invalid_cron_expression_exception(self):
-        self.options.throw_exception_on_parse_error = True
-        ceh = ExpressionDescriptor("INVALID", self.options)
-        self.assertRaises(
-            FormatException,
-            ceh.get_description,
-            DescriptionTypeEnum.FULL)
-
-    def test_invalid_cron_expression_error(self):
-        self.options.throw_exception_on_parse_error = False
-        ceh = ExpressionDescriptor("INVALID CRON", self.options)
-        self.assertEqual(
-            "Error: Expression only has 2 parts.  At least 5 part are 
required.",
-            ceh.get_description(DescriptionTypeEnum.FULL))
+        with self.assertRaises(FormatException):
+            ceh = ExpressionDescriptor('INVALID', self.options)
+            ceh.get_description(DescriptionTypeEnum.FULL)
 
     def test_invalid_syntax_exception(self):
-        self.options.throw_exception_on_parse_error = True
         ceh = ExpressionDescriptor("* $ * * *", self.options)
-        self.assertRaises(
-            FormatException,
-            ceh.get_description,
-            DescriptionTypeEnum.FULL)
+        with self.assertRaises(FormatException):
+            ceh.get_description(DescriptionTypeEnum.FULL)
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cron-descriptor-1.2.32/tests/TestLocale.py 
new/cron-descriptor-1.4/tests/TestLocale.py
--- old/cron-descriptor-1.2.32/tests/TestLocale.py      2022-11-15 
20:11:02.000000000 +0100
+++ new/cron-descriptor-1.4/tests/TestLocale.py 2023-05-19 09:40:44.000000000 
+0200
@@ -22,6 +22,9 @@
 
 import tests.TestCase as TestCase
 from cron_descriptor import Options, ExpressionDescriptor
+from unittest.mock import patch
+import tempfile, shutil, os
+import logging
 
 
 class TestLocale(TestCase.TestCase):
@@ -33,3 +36,19 @@
         self.assertEqual(
             "Jede Minute",
             ExpressionDescriptor("* * * * *", options).get_description())
+
+    def test_locale_de_custom_location(self):
+        logger = logging.getLogger('cron_descriptor.GetText')
+        with patch.object(logger, "debug") as mock_logger:
+            # Copy existing .mo file to temp directory:
+            temp_dir = tempfile.gettempdir()
+            temp_path = os.path.join(temp_dir, 'de_DE.mo')
+            
shutil.copyfile(os.path.join(os.path.dirname(os.path.abspath(__file__)), 
'../cron_descriptor/locale/', 'de_DE.mo'), temp_path)
+
+            options = Options()
+            options.locale_location = temp_dir
+            options.locale_code = 'de_DE'
+            options.use_24hour_time_format = True
+            
+            self.assertEqual("Jede Minute", ExpressionDescriptor("* * * * *", 
options).get_description())
+            mock_logger.assert_called_once_with("{temp_path} 
Loaded".format(**{"temp_path":temp_path}))
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cron-descriptor-1.2.32/tests/__init__.py 
new/cron-descriptor-1.4/tests/__init__.py
--- old/cron-descriptor-1.2.32/tests/__init__.py        2022-11-15 
20:11:02.000000000 +0100
+++ new/cron-descriptor-1.4/tests/__init__.py   2023-05-19 09:40:44.000000000 
+0200
@@ -20,7 +20,8 @@
 from tests.TestFormats import TestFormats
 from tests.TestApi import TestApi
 from tests.TestImport import TestImport
+from tests.TestLocale import TestLocale
 
-__all__ = ['TestCasing', 'TestExceptions', 'TestFormats', 'TestApi', 
'TestImport']
+__all__ = ['TestCasing', 'TestExceptions', 'TestFormats', 'TestApi', 
'TestImport', 'TestLocale']
 __author__ = "Adam Schubert <adam.schub...@sg1-game.net>"
 __date__ = "$2016-01-17 14:51:02$"

Reply via email to