For addon and skin developers

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
giftie Offline
Skilled Python Coder
Posts: 2,035
Joined: Mar 2010
Reputation: 35
Post: #1
Here is a simple converter for the new PO format to the old XML format. https://github.com/Giftie/po_to_xml

Follow the README for method of use.. This is based on the PO files that you would download from Transifex. It will automatically use the english string if the string has not yet been translated.

It should work for all addons..

[Image: e4f63e45ba34fe4695b3bb08eb2499d8e4ee484e...4c076g.jpg]
For troubleshooting and bug reporting please make sure you read this first you can also use XBMC Log Uploader Script.
Cinema Experience
Cinema Experience Wiki
cdART Manager
fanart.tv


find quote
Wanilton Offline
Fan
Posts: 655
Joined: Jun 2010
Reputation: 13
Location: Florianópolis - Brazil
Post: #2
Great News Giftie, thanks, I will try now, converting po files skin aeon.mq 4 to xml.

Gifite, work very well, easy to work, i am sending soon one Private Message to you, i need little help.

Thanks.

http://www.xbmcbrasil.net
XBMC Brazilian Community Forum
(This post was last modified: 2012-06-19 03:22 by Wanilton.)
find quote
giftie Offline
Skilled Python Coder
Posts: 2,035
Joined: Mar 2010
Reputation: 35
Post: #3
Hope it works.. I didn't test skins but it knows were the language files are... skin.folder/language

[Image: e4f63e45ba34fe4695b3bb08eb2499d8e4ee484e...4c076g.jpg]
For troubleshooting and bug reporting please make sure you read this first you can also use XBMC Log Uploader Script.
Cinema Experience
Cinema Experience Wiki
cdART Manager
fanart.tv


find quote
alanwww1 Offline
Team-XBMC Member
Posts: 1,299
Joined: Nov 2008
Reputation: 31
Location: Hungary
Post: #4
Thanks for the help Giftie !

Just ans an info you might already know: for Frodo addons we will soon be uploading addon PO files to an official Transifex project.

Thanks, Cheers, Attila

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
Wanilton Offline
Fan
Posts: 655
Joined: Jun 2010
Reputation: 13
Location: Florianópolis - Brazil
Post: #5
Thanks Giftie, for perfect tool, work great.

http://www.xbmcbrasil.net
XBMC Brazilian Community Forum
find quote
giftie Offline
Skilled Python Coder
Posts: 2,035
Joined: Mar 2010
Reputation: 35
Post: #6
(2012-06-19 08:35)alanwww1 Wrote:  Thanks for the help Giftie !

Just ans an info you might already know: for Frodo addons we will soon be uploading addon PO files to an official Transifex project.

Thanks, Cheers, Attila

Though they would only be for official repo addons

[Image: e4f63e45ba34fe4695b3bb08eb2499d8e4ee484e...4c076g.jpg]
For troubleshooting and bug reporting please make sure you read this first you can also use XBMC Log Uploader Script.
Cinema Experience
Cinema Experience Wiki
cdART Manager
fanart.tv


find quote
alanwww1 Offline
Team-XBMC Member
Posts: 1,299
Joined: Nov 2008
Reputation: 31
Location: Hungary
Post: #7
(2012-06-19 16:10)giftie Wrote:  
(2012-06-19 08:35)alanwww1 Wrote:  Thanks for the help Giftie !

Just ans an info you might already know: for Frodo addons we will soon be uploading addon PO files to an official Transifex project.

Thanks, Cheers, Attila

Though they would only be for official repo addons

Not necessarily. We can do a non-official repo addons project under the umbrella of the xbmc Transifex project with shared translation memory. We would need somebody to maintain it for sure, but with the tool I am creating, it will be really easy. We can also host it under the xbmc translations github repo.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
Hitcher Offline
Skilled Skinner
Posts: 9,921
Joined: Aug 2007
Reputation: 67
Location: Eastleigh, UK
Post: #8
I'm a bit confused as to what's meant to happen when running this.

I followed the instructions for one of my skins and it said 'Finished converting .po files' but nothing has changed in my language folder.

[Image: sig_zps3af3b48e.jpg]
find quote
Wanilton Offline
Fan
Posts: 655
Joined: Jun 2010
Reputation: 13
Location: Florianópolis - Brazil
Post: #9
Hitcher, you need po file in english, to convert to xml file (create one by script), for all languages, in my case i have

c:\skin\languages\english\strings.po
c:\skin\languages\french\strings.po

after script

c:\skin\languages\english\strings.po
c:\skin\languages\english\strings.xml

c:\skin\languages\french\strings.po
c:\skin\languages\french\strings.xml

Convert my po files to XML, work great, but you need PO files in english of course (source language).

http://www.xbmcbrasil.net
XBMC Brazilian Community Forum
(This post was last modified: 2012-06-19 20:09 by Wanilton.)
find quote
CutSickAss Offline
Fan
Posts: 425
Joined: Dec 2011
Reputation: 28
Location: Greece
Post: #10
I tried it with Python 3.2, and it doesn't seem to work. Worked like a treat with version 2.7. And the full path was not necessary for the script to work, at least in my case.

Also, here's a roundup of your Windows instructions for noobs like me (provided Python 2.7 is installed from here):
Go to the folder where "po_to_xml.py" is located -> Create a new text file, and enter the following in it:
Code:
"C:\Program Files\Python27\python.exe" po_to_xml.py skin

-> Save the file, and rename it to "po_to_xml.bat" -> Create a folder, and name it "skin" -> Create a folder in "skin", and name it "language" -> Create a folder in "language", name it "English", and place the English "strings.po" in it -> Repeat the previous step for every translation, naming the folders according to the language of the translation -> Go back, and run "po_to_xml.bat" -> A "strings.xml" file has been created in every language folder.
(This post was last modified: 2012-06-29 20:35 by CutSickAss.)
find quote
Post Reply