android2po icon indicating copy to clipboard operation
android2po copied to clipboard

line wrapping width system dependent

Open farindk opened this issue 9 years ago • 3 comments
trafficstars

I am using a2po for the same project on two different systems (Ubuntu 14.04 and 16.04). Apparently a2po is using different paragraph widths for line wrapping on both systems, which results in a lot of diffs like this:

-"The image file is missing. Unfortunately, you cannot edit the image without.\n" +"The image file is missing. Unfortunately, you cannot edit the image " +"without.\n"

when switching between systems. It would be great to fix the paragraph width with a command line parameter to prevent this problem.

farindk avatar Sep 27 '16 21:09 farindk

It appears that I might have been wrong. It is not a2po using different line widths, but poedit saving at a different width.

Still, it would be very helpful to specify the line width on the command line to use the same width as your favourite editor.

farindk avatar Oct 06 '16 12:10 farindk

I had this problem myself but never came around to fixing it. A pull request would be welcome.

miracle2k avatar Oct 11 '16 12:10 miracle2k

Here's a pull request: https://github.com/miracle2k/android2po/pull/60

However, when using PoEdit, it is only useful when completely disabling the line wrapping (by specifying 0 and disabling it in poedit settings). This is not really an issue for us and makes more sense from version control perspective anyway.

Why fixed width wrapping is problematic is because it seems there's different logic in the wrapping engines.. For example: spaces:

-"this ends with a space "
-"and it wraps like this"
+"this ends with a space"
+" and it wraps like this"

or links:

-"this ends with a link http://"
-"www.google.com"
+"this ends with a link "
+"http://www.google.com"

There might be other difference in rendering and I haven't figured out any config for it yet.

rv0 avatar Sep 06 '19 07:09 rv0