webERP Forum

Full Version: Edit a Language File Module - Blank Strings
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
(12-04-2017 09:06 AM)falkoner Wrote: [ -> ]Phil is right that the no-wrap parameter is needed on msmerge as well as xgettext, but if I remember correctly if the file you are merging into already has the line breaks then they will persist after the merge regardless of this setting. Though my knowledge is a few years old so it may have changed, but it sounds from what Paul is saying that this is still the case.

I do remember writing a bash script to remove these, but I have had a quick look around and can't immediately see this so it may have got lost on one of my laptop thefts or hard disk crashes Sad

Tim

The attached is a quickly hacked command line PHP script that _should_ remove the line wraps from a messages.po file. You may need to change the path to the command line php executable on line 1 (I am using PHP7) and the two directories on line 4 and 5 will need changing to yours. It is then run with a command similar to this:

./FixPO.php en US

Note please test and check before replacing the actual messages.po file

Thanks
Tim
Tim & Phil,

Thank you both for your input and feedback into this issue.

Correct... The problem is that the EN_US PO file included with webERP has broken lines so perhaps it should be repaired before the next version is released.
Not just en_US but all the locales have this problem. Running my script should fix it.

Tim
I just changed the msgmerge cohimand to
Code:
msgmerge -U -N --backup=off --no-wrap locale/.............................
and this worked nicely recreating all the .po files losing the blank lines.
Pages: 1 2
Reference URL's