Jump to content


Photo

Merging PO files with extra strings using poEdit


  • Please log in to reply
1 reply to this topic

#1 fernandok

fernandok

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 10 October 2017 - 04:05 PM

Greetings,

 

I know this is not the best approach, but I've made some changes on default files (account, contact) and added some custom code.

 

Now I have downloaded my .po language file, and wanted to merge/add my new Zurmo::t() strings into the existing .po file and use it locally. Is it possible/doable? I'm using poEdit but cannot read/extract strings from source files into .po...

 

Appreciate any help!



#2 fernandok

fernandok

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 13 October 2017 - 12:08 PM

I've been digging myself into this for a couple of days, and in case anyone faces this same situation, here's what I found:

 

1. poEdit uses xgettext to extract text from source code

2. Problem is that the keywords "Zurmo::t:1c,2" and "Yii::t:1c,2" won't be properly identified by xgettext because of the two collons.

3. Opened grepWin, replaced "Zurmo::t" by "Zurmottt", and "Yii::t" by "Yiittt" throughout code

4. Ran xgettext successfully with options --join-existing --keywords="Zurmottt:1c,2, Yiittt:1c,2"

5. Changed t calls back to original

 

Not an elegant solution, but worked... will check back here to see if any soul can better contribute with this topic !






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users