Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Edit a Language File Module - Blank Strings
12-04-2017, 09:30 PM,
#11
RE: Edit a Language File Module - Blank Strings
(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


Attached Files
.php   FixPO.php (Size: 2.12 KB / Downloads: 2)
Reply
12-04-2017, 11:01 PM,
#12
RE: Edit a Language File Module - Blank Strings
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.
https://www.linkedin.com/in/eclipsepaulbecker
Reply
12-04-2017, 11:17 PM,
#13
RE: Edit a Language File Module - Blank Strings
Not just en_US but all the locales have this problem. Running my script should fix it.

Tim
Reply
12-22-2017, 04:02 PM,
#14
RE: Edit a Language File Module - Blank Strings
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.
Phil Daintree
webERP Admin
Logic Works Ltd
http://www.logicworks.co.nz
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)