Translate of addon with upstream repo existing
#16
well this appears to be working:

xml2po -o template.pot template.xml
xml2po -p LANG.po -o LANG.xml template.xml
Reply
#17
ventech Wrote:well this appears to be working:
xml2po -o template.pot template.xml
xml2po -p LANG.po -o LANG.xml template.xml

You have tried it with sample files ?
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.
Reply
#18
yes
Reply
#19
ventech Wrote:yes

Could you please enclose the sample files, for checking ?
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.
Reply
#20
template.xml: http://pastebin.com/aYBRg3YN
template.pot: http://pastebin.com/Fx0H8bQp
translation.po: http://pastebin.com/XkdMMixa
translation.xml: http://pastebin.com/cWQKkGAS
Reply
#21
Quote:xml2po -o template.pot template.xml
xml2po -p LANG.po -o LANG.xml template.xml

This works really well and easy.

At the end i get back the original xml file format only the translated parts show up as changed strings.

I was even made a test with a modified original xml file. With poedit (but i am sure launchpad also nows this function) i was able to make an update and the changed new strings appeared, the deleted strings disappeared with no problem. At the end i once again got back the correct translated xml file.

The only think to keep things maintained is to create the po template (pot) file from time to time using the current strings.xml files in svn or git and i guess upload to launchpad.

What do you think Spiff ? This could work out.

Can we make a test on xbmc launchpad ?
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.
Reply
#22
this looks promising. i'll discuss with those with the access needed.
Reply
#23
alanwww1 Wrote:The only think to keep things maintained is to create the po template (pot) file from time to time using the current strings.xml files in svn or git and i guess upload to launchpad.
actually, launchpad can automatically import from bazaar branches
Reply
#24
@Ventech
Thanks for the great suggestion with po2xml ! Big Grin

ventech Wrote:actually, launchpad can automatically import from bazaar branches

But doesn't Launchpad needs po or pot file for direct import ? In this case the developers would always have to keep a po file in their repositories.

Anyway in the worst case the xml files could be converted and moved to launchpad manually by anybody who can undertake this task.
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.
Reply
#25
it's not rocket science to script it.
Reply
#26
alanwww1 Wrote:But doesn't Launchpad needs po or pot file for direct import ? In this case the developers would always have to keep a po file in their repositories.
either; the person who adds a string also adds it to the .pot file, or you have a script that executes xml2po. i think the latter is the best because then you can export from launchpad too.
this way all files will stays synced. at least in theory..
Reply
#27
spiff Wrote:this looks promising. i'll discuss with those with the access needed.

Hi,

Any news on this ?
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.
Reply
#28
Hi, folks!

I'm also interested in a solution that makes everyone's job easier.

On my latest trac ticket with dharma-pre plugins translations, @spiff alerted me about the problem with the upstream versions of some addons. A git patch is cool, but he had to separate my plugins patch between addons with and without upstream version/svn/git... (and because I didn't realized it before, I made is work harder... sorry spiff).

And I agree that it may cause confusion and chaos maintaining a record of what was translated and what wasn't.
I know that apart from confluence and xbmc strings, I already translated scrapers and plugins. But because some weren't merged, my records are somewhat confusing and in need of a git code review to stay updated on work done.

So, in short, I'm all for a centralized translation system/tool/whatever.

One suggestion I read on the forums was an online community translation tool/site with someone responsible for a language (one person per language) to maintain all things tied together and review/approve translations for that language . I can be responsible for pt_PT. AFAIK, I'm the only PT translator for the last 1 1/2 years.

Anyway, I'm gonna continue translating to update dharma as best has I can.

Happy coding.

Cris
Reply
#29
Might not be as straight forward as it appeared.
When trying to convert the xml files to po files, you get duplicates

.pot:
Code:
#: en.xml:27(string) en.xml:48(string)
msgid "May"
msgstr ""
.po produced using xml2po -o no.po -r no.xml en.xml
Code:
#: en.xml:27(string) en.xml:48(string)
msgid "May"
msgstr "Mai"

[...]

#: en.xml:27(string) en.xml:48(string)
msgid "May"
msgstr "mai"
and this translation (capital and lowercase 'm') actually makes sense. This is what you get for building a sentence word by word instead of using a single formated string; so there's a lot of work to do.
Reply
#30
Work that we're most grateful for! The weather stuff is nasty as we're converting it token (word) by token (word).

Ideally we shouldn't be trying to translate the weather stuff at all - it's never going to work perfectly as we're always going to be missing some strings.
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.


Image
Reply

Logout Mark Read Team Forum Stats Members Help
Translate of addon with upstream repo existing0