Bug 2166295

Summary: RFE: Recognize %{python3_sitelib}/notebook/i18n/nl/LC_MESSAGES/notebook.mo as a %lang(nl) file
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: pyproject-rpm-macrosAssignee: Lumír Balhar <lbalhar>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: lbalhar, maxwell, mhroncok, pviktori, python-packagers-sig
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: pyproject-rpm-macros-1.6.2-1.fc39 pyproject-rpm-macros-1.6.2-1.fc38 pyproject-rpm-macros-1.6.2-1.fc37 pyproject-rpm-macros-1.6.2-1.fc36 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-02-13 10:27:13 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Miro Hrončok 2023-02-01 13:02:15 UTC
Currently, with pyproject-rpm-macros 1.6.0, the logic to recognize %lang() files is:

If the file suffix is .mo and there is /locale/ in the path, parse the segment after /locale/ as the language code.

E.g. %{python3_sitelib}/notebook/locale/nl/LC_MESSAGES/notebook.mo is recognized as %lang(nl).

However, this does not work for paths without /locale/.
A more flexible check might be to see if /LC_MESSAGES/ is in the path, parse the segment before /LC_MESSAGES/ as the language code.

That should work with:

- %{python3_sitelib}/notebook/locale/nl/LC_MESSAGES/notebook.mo
- %{python3_sitelib}/notebook/i18n/nl/LC_MESSAGES/notebook.mo
- %{python3_sitelib}/notebook/translations/nl/LC_MESSAGES/notebook.mo
- %{_datadir}/locale/nl/LC_MESSAGES/notebook.mo

We might even recognize more LC_... directories (ideally according to some gettext specification).

Comment 1 Fedora Update System 2023-02-13 10:24:12 UTC
FEDORA-2023-8014f581aa has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-8014f581aa

Comment 2 Fedora Update System 2023-02-13 10:24:30 UTC
FEDORA-2023-8baee8466a has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-8baee8466a

Comment 3 Fedora Update System 2023-02-13 10:27:13 UTC
FEDORA-2023-8baee8466a has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 4 Fedora Update System 2023-02-13 10:29:49 UTC
FEDORA-2023-f706deb47c has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2023-f706deb47c

Comment 5 Fedora Update System 2023-02-13 10:31:01 UTC
FEDORA-2023-c832ab9400 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2023-c832ab9400

Comment 6 Fedora Update System 2023-02-13 10:39:13 UTC
FEDORA-2023-8014f581aa has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 7 Fedora Update System 2023-02-14 01:58:14 UTC
FEDORA-2023-c832ab9400 has been pushed to the Fedora 37 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-c832ab9400`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-c832ab9400

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 8 Fedora Update System 2023-02-14 03:25:09 UTC
FEDORA-2023-f706deb47c has been pushed to the Fedora 36 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-f706deb47c`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-f706deb47c

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 9 Fedora Update System 2023-02-17 18:16:24 UTC
FEDORA-2023-c832ab9400 has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 10 Fedora Update System 2023-03-01 03:09:33 UTC
FEDORA-2023-f706deb47c has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.