-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
1.0.0: dist
targed does not check is po/POTFILES.in is up-to-date
#11338
Comments
dist
targed is not checking is po/POTFILES.in is up-to-datedist
targed does not check is po/POTFILES.in is up-to-date
The GNU autotools have both Meson only has However it doesn't attempt to run maintainer targets, and neither should you when building the project. It is, after all, a maintainer target -- not a user target. It's not obvious that updating po files should be regularly done, because it modifies comments and metadata every time. It's really only useful immediately before running Running it, even if it succeeds, is totally pointless for users, because the results aren't actually used unless you want to upload the resulting .po files to a service like transifex, or use it in weblate, or unless you're personally interested in translating the software yourself, in person. What are you trying to accomplish? |
That is not true. It changes .po files only when something has been changed in files listed in POTFILES.in (changed line number where is translated string or string has been changed).
On building my rpm packages packages I'm always calling [tkloczko@devel-g2v SPECS]$ grep "%make_build -C po update-po" *spec | wc -l; grep "%meson_build .*-update-po" *spec | wc -l
76
129 You would be surprised how many projects dist tar balls provides .po files with sometimes even 50% "garbage" because maintainer never executed Meson Most of the maintainers are not aware of the fact that .po files should be updated before make release. |
No. Again, the timestamps embedded as POT-Creation-Date are updated every time, regardless of whether anything else changed.
Sounds like an upstream bug that should be reported to the project.
... Why on earth not? How exactly are translations supposed to work, then? Does anyone ever contribute translations to those projects? I am not used to seeing such issues, the projects I dealt with had this as part of the release checklist. Maybe these projects need help to use weblate or something though. |
If it is true that is another gettext issue.
Indeed however in all those cases when I've been trying to inform about that all that where refused because more or less "dist does not show anything".
In most of the cases translations are only provided to what is in .po files.
OK. To show you how bad it is I made small test. %build
%meson \
-D docs=true \
-D extensions=true \
-D introspection=true \
-D profiling=false \
-D selinux=true \
-D tests=headless \
%{nil}
%meson_build %{name}-update-po
%meson_build With above: [tkloczko@devel-g2v Packages]$ rpm -qpi nautilus-44.alpha-2.g2v.x86_64.rpm
Summary : File manager for GNOME
Name : nautilus
Version : 44.alpha
Release : 2.g2v
Architecture: x86_64
Install Date: (not installed)
Group : Unspecified
Size : 8349230
License : GPL-3.0-or-later (https://spdx.org/licenses/GPL-3.0-or-later.html), LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later.html)
Signature : (none)
Source RPM : nautilus-44.alpha-2.g2v.src.rpm
Build Date : Fri Jan 13 01:26:57 2023
Build Host : domek.lan
URL : https://wiki.gnome.org/Apps/Nautilus/
VCS : https://gitlab.gnome.org/GNOME/nautilus/
Description :
Nautilus is the file manager and graphical shell for the GNOME desktop that
makes it easy to manage your files and the rest of your system. It allows to
browse directories on local and remote filesystems, preview files and launch
applications associated with them. It is also responsible for handling the icons
on the GNOME desktop. and with commented [tkloczko@devel-g2v RPMS]$ rpm -qpi nautilus-44.alpha-2.g2v.x86_64.rpm
Summary : File manager for GNOME
Name : nautilus
Version : 44.alpha
Release : 2.g2v
Architecture: x86_64
Install Date: (not installed)
Group : Unspecified
Size : 13399830
License : GPL-3.0-or-later (https://spdx.org/licenses/GPL-3.0-or-later.html), LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later.html)
Signature : (none)
Source RPM : nautilus-44.alpha-2.g2v.src.rpm
Build Date : Thu Jan 26 05:42:26 2023
Build Host : domek.lan
URL : https://wiki.gnome.org/Apps/Nautilus/
VCS : https://gitlab.gnome.org/GNOME/nautilus/
Description :
Nautilus is the file manager and graphical shell for the GNOME desktop that
makes it easy to manage your files and the rest of your system. It allows to
browse directories on local and remote filesystems, preview files and launch
applications associated with them. It is also responsible for handling the icons
on the GNOME desktop. With [tkloczko@devel-g2v RPMS]$ echo "13399830-8349230" |bc -q
5050600 ~FIVE MEGABYTEST LESS. |
Just in case .. In whole workflow of projects translations updates needs to be fed somehow with proper set of strings to translate or update (in case of fuzzy entries). |
Any updaets/conclutions? 🤔 Just found another case with gnome project which has been released with faulty po/POTFILES.in |
And yet another one https://gitlab.gnome.org/GNOME/console/-/issues/263 |
I gave it a try, and it is true,
If we do that, then I think it makes sense to run update-po as dist script. |
First step: #11400 |
I think this is a gettext issue, ask gettext upstream to fix this. |
I still don't understand what this is trying to solve. Running the update-po target is something the upstream maintainers need to do from a live checkout, and commit the results, and update something like transifex or weblate with. Running it as a dist script, on the other hand, is totally pointless since it will only run inside the unpacked dist tarball and won't inform the person running it that anything has changed. They still need to manually run it as part of a release checklist. As for checking whether POTFILES.in is up to date... Who cares? I mean it, really I do. You cannot "automatically" detect when it's missing files, only when it has too many. And frankly, I don't want to detect that either, because... updating POTFILES.in is a maintainer task to be done once as part of the release checklist, it doesn't need to be constantly updated during development and then amended again and again, if development reworks the list of source files. Checking this at all encourages people to commit updated po files, anyway. In contrast, |
ahahahahahh... good joke. TBH if you want to change gettext just write it from scratch and everyone will be super happy.
Hm, it's true that a dist script is run after the check for dirty tree, so that's not good. While I agree it is maintainers' job, it is also Meson's job to facilitate their work, and clearly many maintainers forgets about updating po files before a release. Maybe we could just do a "dry run" of update-po in mdist and print a warning? |
I still don't understand how that's supposed to help... dist scripts run inside the unpacked dist tarball, not inside the git repo. It doesn't even matter whether we check if the tree is dirty before or after... Running a dist script won't make the tree dirty. |
@eli-schwartz A dist script (added automatically by i18n module) could do a dry run of update-po and return an error if any file needs to be updated. Or just print a warning if we think it's not too bad. |
That could also be done as a test. For example gnome.gtkdoc() optionally add a test that fails if any function is not documented, we could do the same with a test that verify po files are up to date. Do we have a way to run some tests only during dist? |
Any update? 🤔 |
Another case caused by this issue https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2840 |
Any update? 🤔 Yet another such case https://gitlab.gnome.org/GNOME/gnome-music/-/issues/596 |
Yes. |
May I as for short comment? |
The ticket has been open for a year and I still haven't heard a convincing argument that it is correct to make such a change. |
|\ho issues with increasing not updated many meson based projects translations is not enough argument? 🤔 |
Describe the bug
On building just released gnome-disk-utility found that
gnome-disk-utility-update-po
fails becausepo/POTFILES.in
is not up-to-date.https://gitlab.gnome.org/GNOME/gnome-disk-utility/-/issues/283
With GNU automake
make dist-check
is noit only forming dist tar ball but is checkig is it possible to build everything of such tar ball.To Reproduce
Expected behavior
dist
targed thould try to veryfi generated dist tart ball.Eventually shpuld be provided like with automake
sist-check
targe which part should be as well<project>-update-po
.system parameters
Native
Linux x86_64
3.8.16
meson --version
1.0.0
ninja --version
if it's a Ninja build1.11.1
The text was updated successfully, but these errors were encountered: