Bug 1569004 - ValueError: plural forms expression could be dangerous
Summary: ValueError: plural forms expression could be dangerous
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: python-meh
Version: 38
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Anaconda Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-18 13:41 UTC by Nerijus Baliūnas
Modified: 2023-07-11 13:44 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)
patch (596 bytes, patch)
2019-05-02 20:06 UTC, Nerijus Baliūnas
no flags Details | Diff

Description Nerijus Baliūnas 2018-04-18 13:41:07 UTC
Please see bug 1334960 and bug 1364114.

There is a typo in python-meh/po/lt.po (Lithuanian translation):

"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 or n%100>=20) 

should be ("or" is considered to be an identifier by gettext):

"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20)

Please fix Plural-Forms headers (s/or/||/).

Comment 1 Martin Kolman 2018-04-19 13:31:43 UTC
This looks like the translation data itself[0] is wrong on Zanata. Not sure who should/can fix it though - adding Make Fabian from the l18n team to CC.



[0] https://fedora.zanata.org/project/view/python-meh

Comment 2 Mike FABIAN 2018-04-23 12:31:54 UTC
I downloaded 

https://fedora.zanata.org/rest/file/translation/python-meh/master/lt/po?docId=python-meh

and it contained:

"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
"(n%100<10 || n%100>=20) ? 1 : 2)\n"

So maybe this is fixed already?

Comment 3 Nerijus Baliūnas 2019-05-02 20:05:40 UTC
Not fixed yet.

Comment 4 Nerijus Baliūnas 2019-05-02 20:06:58 UTC
Created attachment 1561970 [details]
patch

Patch attached.

Comment 5 Ben Cotton 2019-05-02 20:19:35 UTC
This message is a reminder that Fedora 28 is nearing its end of life.
On 2019-May-28 Fedora will stop maintaining and issuing updates for
Fedora 28. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora 'version' of '28'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 28 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 6 Ben Cotton 2020-04-30 22:09:16 UTC
This message is a reminder that Fedora 30 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 30 on 2020-05-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '30'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 30 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 7 Nerijus Baliūnas 2020-05-05 07:58:29 UTC
Still not fixed in python3-meh-0.48-2.fc32.noarch.rpm.

Comment 8 Fedora Program Management 2021-04-29 15:54:04 UTC
This message is a reminder that Fedora 32 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 32 on 2021-05-25.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '32'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 32 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 9 Ben Cotton 2022-05-12 14:57:00 UTC
This message is a reminder that Fedora Linux 34 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 34 on 2022-06-07.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '34'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 34 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 10 Nerijus Baliūnas 2022-05-12 17:04:48 UTC
Still not fixed in python3-meh-0.50-5.fc36.noarch.rpm.

Comment 11 Nerijus Baliūnas 2022-05-12 17:34:45 UTC
I see that translations are now at https://translate.fedoraproject.org/projects/python-meh/ and there is no Lithuanian language anymore.

As written in python-meh.spec:
# This tarball was created from upstream git:
#   git clone https://github.com/rhinstaller/python-meh
#   cd python-meh && make archive

after make archive I got python-meh-0.50.tar.gz which does not have lt.po file in po directory.
So just the package rebuild with a new archive should help to remove bogus translation file.
BTW, https://github.com/rhinstaller/python-meh/tags has a newer release 0.50.1.

Comment 12 Ben Cotton 2023-04-25 16:38:36 UTC
This message is a reminder that Fedora Linux 36 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 36 on 2023-05-16.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '36'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 36 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 13 Nerijus Baliūnas 2023-04-25 17:01:19 UTC
Still not fixed in python3-meh-0.51-1.fc38.noarch.rpm.

Comment 14 Jiri Konecny 2023-05-16 13:54:57 UTC
Hello this translation shouldn't be part of the project because it's not between localized languages here: https://translate.fedoraproject.org/projects/python-meh/ not sure why.

Comment 15 Nerijus Baliūnas 2023-05-16 14:23:49 UTC
python-meh.spec has:

# This is a Red Hat maintained package which is specific to
# our distribution.  Thus the source is only available from
# within this srpm.
# This tarball was created from upstream git:
#   git clone https://github.com/rhinstaller/python-meh
#   cd python-meh && make archive
Source0: https://github.com/rhinstaller/python-meh/archive/%{name}-%{version}.tar.gz

As it is unknown how the python-meh-0.51.tar.gz file is obtained, only you can fix this.

Comment 16 Nerijus Baliūnas 2023-05-16 14:36:39 UTC
I did "make archive" and generated python-meh-0.51.tar.gz does not have lt.po (it has 36 *.po files, while python-meh-0.51-1.fc38.src.rpm has 117). The additional files are added from somewhere else.

Comment 17 Jiri Konecny 2023-07-11 13:44:51 UTC
Yes, that is expected.

"make archive" will download current weblate repository (unfortunately not pinning the SHA on release). Unfortunately, seems that our src.rpm files on release has a wrong translations not the updated ones.

I need to check what happening there and add the missing translations back.


Note You need to log in before you can comment on or make changes to this bug.