Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Italian translation improvements #29

Open
daghemo opened this issue Jan 17, 2019 · 0 comments
Open

Italian translation improvements #29

daghemo opened this issue Jan 17, 2019 · 0 comments

Comments

@daghemo
Copy link

daghemo commented Jan 17, 2019

The italian translation may not be perfect in certain circumstances.

E.g., "* 0-7,19-23 * * *" would returns:

Ogni minuto, alle 00:00 al 07:59 e 19:00 al 23:59

I've used the following snippet:

import cron_descriptor
descripter = cron_descriptor.ExpressionDescriptor("* 0-7,19-23 * * *", use_24hour_time_format=True, locale_code='it_IT')
print(descripter.get_description())

The correct result should be:

Ogni minuto, dalle 00:00 alle 07:59 e dalle 19:00 alle 23:59

This can be obtained modifying the it_IT.po as follows:

# diff -ruN it_IT.po.orig it_IT.po
--- it_IT.po.orig       2019-01-17 11:24:15.033002345 +0100
+++ it_IT.po    2019-01-17 11:25:45.237514411 +0100
@@ -96,7 +96,7 @@
 #: ExpressionDescriptor.py:218
 #, python-brace-format
 msgid "at {0}"
-msgstr "alle {0}"
+msgstr "dalle {0}"

 #: ExpressionDescriptor.py:241
 msgid "first"
@@ -151,7 +151,7 @@
 #: ExpressionDescriptor.py:318
 #, python-brace-format
 msgid ", {0} through {1}"
-msgstr ", {0} al {1}"
+msgstr ", {0} alle {1}"

 #: ExpressionDescriptor.py:272
 #, python-brace-format
@@ -207,7 +207,7 @@

 #: ExpressionDescriptor.py:385
 msgid " and "
-msgstr " e "
+msgstr " e dalle "

 #: ExpressionDescriptor.py:433
 msgid ", every minute"

But I think that this would lead to errors in other circumstances (e.g. "0,30 6-17 * * *").
That's why using the "between {0} and {1}" syntax as follows should be a better option:

Ogni minuto, tra le 00:00 e le 07:59 e tra le 19:00 e le 23:59

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants