Opened 18 months ago
Closed 16 months ago
#5455 closed defect (fixed)
update-po and update-pot result in different output from different machines
Reported by: | strk | Owned by: | robe |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS 3.5.0 |
Component: | l18n | Version: | master |
Keywords: | Cc: |
Description
Line length in .pot files changes depending on version of poxml and this can be annoying as different developers would keep pushing changes with no reason.
Change History (10)
comment:1 by , 18 months ago
follow-up: 5 comment:2 by , 18 months ago
We should maybe avoid line wrapping as a whole. Incidentally it looks like weblate at some point used to remove line wrapping, I'm not sure this is still the case. Commit with no line wrapping from weblate: [a0db0dbf4afab21b67d534bb9fff53fe4751f3d3/git]
The above commit is the last one coming from weblate, maybe a component was disabled ?
comment:3 by , 18 months ago
Line wrapping could be disabled on the weblate side too, from here: https://weblate.osgeo.org/addons/postgis/postgis/69/
I verified that on my 2 contending systems disabling line wrapping works effectively at avoiding the war (between those two machines)
comment:4 by , 18 months ago
I've sent an email to gettext bug and was told the component responsible for line wrapping is libunistring. The version of that library is indeed different between the two machines I was testing on. (1.0 vs. 0.9.10). The upstream suggestion is to completely avoid text wrapping if the files are meant to be translated using tools (like weblate for example). I've mixed feelings about this
comment:5 by , 17 months ago
Replying to strk:
We should maybe avoid line wrapping as a whole. Incidentally it looks like weblate at some point used to remove line wrapping, I'm not sure this is still the case. Commit with no line wrapping from weblate: [a0db0dbf4afab21b67d534bb9fff53fe4751f3d3/git]
The above commit is the last one coming from weblate, maybe a component was disabled ?
Yah there is a component add-on in weblate that controls line wrapping. https://weblate.osgeo.org/addons/postgis/postgis/
It's called "Customize gettext output" and is set to break after 77. I think when we started we didn't have that add-on enabled and WEblate's default behavior was to not linewrap. I think you were the one that suggested we install this plugin to force line wrapping at 77.
Should we disable it. I think we might need to disable for each individual component, cause the add-ons I think are only copied via the component discovery add-on when they are first created.
comment:6 by , 17 months ago
Actually maybe this one is needed to also remove line wrapping. I can't remember. But the options for the plugin are:
- Wrap lines at 77 characters and at new lines (this is what we have it set to currently) (xgettext — default)
- Only wrap lines at new lines (xgettext —no-wrap)
- No line wrapping
comment:7 by , 17 months ago
Milestone: | PostGIS 3.4.0 → PostGIS 3.5.0 |
---|
push back if you get to it before 3.4.0 release time.
This contending pot format is happening between machines with poxml 4:20.12.0-1 and machines with poxml 4:21.12.3-0ubuntu1. Running
make update-pot
on one and on the other result in different newlines, like:The problem seem to not be even fixable with msgattrib, although from the same version. Both machines have msgattrib from GNU gettext-tools 0.21, but when running this command against the SAME version of po/templates/administration.xml.pot:
They give these two different answers: 1:
2:
Note that the —no-wrap call results in the SAME output: