[libvirt PATCH 00/51] Use permutable format strings in translations
Daniel P. Berrangé
berrange at redhat.com
Fri Mar 31 16:00:29 UTC 2023
On Fri, Mar 31, 2023 at 05:56:52PM +0200, Jiri Denemark wrote:
> On Fri, Mar 31, 2023 at 16:52:50 +0100, Daniel P. Berrangé wrote:
> > On Fri, Mar 31, 2023 at 05:43:16PM +0200, Jiri Denemark wrote:
> > > On Fri, Mar 31, 2023 at 16:26:42 +0100, Daniel P. Berrangé wrote:
> > > > On Thu, Mar 30, 2023 at 11:37:55AM +0200, Jiri Denemark wrote:
> > > > > On Mon, Mar 27, 2023 at 15:37:34 +0100, Daniel P. Berrangé wrote:
> > > > > > On Mon, Mar 27, 2023 at 01:08:09PM +0200, Jiri Denemark wrote:
> > > > > > > On Fri, Mar 10, 2023 at 17:14:32 +0000, Daniel P. Berrangé wrote:
> > > > > > > > Even if fixed, it might be worth switching the .pot file anyway, but
> > > > > > > > this can't be done without us bulk updating the translations, and
> > > > > > > > bulk re-importing them, which will be challenging. We'll almost
> > > > > > > > certainly want to try this on a throw-away repo in weblate first,
> > > > > > > > not our main repo.
> > > > > > >
> > > > > > > I was able to come up with steps leading to the desired state:
> > > > > > >
> > > > > > > 0. lock weblate repository
> > > > > > > 1. update libvirt.pot from the most recent potfile job
> > > > > > > 2. push to libvirt.git
> > > > > > > 2. wait for translations update from Fedora Weblate and merge it
> > > > > > > 3. pull from libvirt.git
> > > > > > > 4. apply the first 50 patches from this seires (with required changes
> > > > > > > to make sure all translation strings are updated)
> > > > > > > 5. update all po files with the attached script
> > > > > > > 6. update libvirt.pot by running meson compile libvirt-pot
> > > > > > > 7. apply patch 51 of this series
> > > > > > > 8. push to libvirt.git
> > > > > > > 9. wait for translations update from Fedora Weblate and merge it
> > > > > > > 10. unlock weblate repository
> > > >
> > > > This looks ok, but I'm wondering if weblate will remember all
> > > > our obsolete msgids when we do step 8 ? IOW, will our po files
> > > > get the 10,000 current msgids, plus another 5,000 non-position
> > > > based msgids marked with '#~ msgid' ?
> > >
> > > No, apparently it doesn't do so. Looking at the last commit in
> > > https://gitlab.com/jirkade/libvirt/-/commits/format-strings which is an
> > > update from weblate after all the changes, there's not a single new
> > > "#~ msgid" line added. The overall statistics of the patch is
> > >
> > > 46 files changed, 28392 insertions(+), 19137 deletions(-)
> > >
> > > and it is caused by weblate (or rather msgmerge) wrapping lines as they
> > > got longer when format strings were updated using the script.
> >
> > Ok, I wonder where our existing '#~ msgids' lines are coming
> > from !
>
> They seem to be added only when a msgid in .po does not exist in .pot
> anymore. But since we're pushing both .pot and .po updates at the same
> time, msgid strings match.
Ahh ok, that makes sense now.
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
More information about the libvir-list
mailing list