[RELEASE] XBMC language file download tool, for Transifex translations
#1
Exclamation 
Hi all addon and skin developers !

As I promised, for those, who signed up for the Transifex translation program, I created a nice tool, which you can use to download fresh language files recently synced from Transifex to the XBMC-translations github repository.
This tool really does things easy. Just type in one command and you have the fresh addon.xml, changelog.txt and all the language files. There is also a batch mode, where you can use an xml file to specify a list of addons with local directories to download.

Please check the README before using it first.

Important: your local addon.xml, changelog.txt, language files will be overwritten with the fresh files. So I suggest using "git commit" with your changes first and just after that, check possible loss of strings or entries with "git diff". In case some missing string, please re-add them. This could happen if you added the string AFTER my last sync happened on the translation repo. So it is always good to check your addon's last sync time.

The addon is vailable for Linux and Windows at the moment. Windows build can be downloaded from here.

I hope the tool will be a useful help for all of you.
Who want to sign up for Transifex translations and not yet done it, just check the corresponding thread how to do it !

Cheers,
Attila/TeamXBMC
Reply
#2
thx. one question: is there a fixed interval for syncing betw. transifex and xbmc translations repo? or is that done manually?
Donate: https://kodi.tv/contribute/donate (foundation), 146Gr48FqHM7TPB9q33HHv6uWpgQqdz1yk (BTC personal)
Estuary: Kodis new default skin - ExtendedInfo Script - KodiDevKit
Reply
#3
Thanks for the question.
I do things manually at the moment, because there is always some syntax, whitespace etc. problem for one or two of the language files, which I need to correct manually to get the full sync happen. (This is why it is the best if you guys can pull in ALL files, including the English one. They might include some format corrections.)

I'll try to do syncs in every 1-2 days, but since I was working on this tool it went up to 3-4 days sometimes.
I try my best in the future.

Cheers
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
#4
thx!
My GitHub. My Add-ons:
Image
Reply
#5
This is fantastic - great work! It will really save some time getting things ready for addon updates.
Reply
#6
Just tried my first update but got an error.

Here's the log -

Code:
2013-01-03 21:07+0000   INFO    XBMC-LANGDLOAD v0.8

2013-01-03 21:07+0000   INFO    Reading xbmc-txupdate.xml file for project: xbmc-addons
2013-01-03 21:07+0000   INFO    Reading xbmc-txupdate.xml file for project: xbmc-main-frodo
2013-01-03 21:07+0000   INFO    Reading xbmc-txupdate.xml file for project: xbmc-skins
2013-01-03 21:07+0000   INFO    Detected a total 87 resources hosted in 3 projects at xbmc/translations Github repo

2013-01-03 21:07+0000   INFO    **********************************************************
2013-01-03 21:07+0000   INFO    DOWNLOADING RESOURCE: xbmc-skins/skin.xeebo FROM XBMC REPO
2013-01-03 21:07+0000   INFO    **********************************************************
2013-01-03 21:07+0000   INFO      ResHandler: addon.xml downloaded for resource: xbmc-skins/skin.xeebo
2013-01-03 21:07+0000   INFO      ResHandler: changelog.txt downloaded for resource: xbmc-skins/skin.xeebo
2013-01-03 21:07+0000   INFO      ResHandler: Downloadeding language files:
Chinese (Simple)2013-01-03 21:07+0000  ERROR     FileUtils: WriteFileFromStr failed for file: C:\Users\Kevin.HAL\AppData\Roaming\XBMC\addons\skin.xeebo\language\Chinese (Simple)\strings.po
Reply
#7
Yeah, I found a bug in windows if you you use an absolute directory.
For now, please copy the xbmc-langdload.exe file into your C:\Users\Kevin.HAL\AppData\Roaming\XBMC\addons directory.
After that just execute it in that directory

Code:
cd C:\Users\Kevin.HAL\AppData\Roaming\XBMC\addons
xbmc-langdload.exe xbmc-skins/skin.xeebo skin.xeebo

It should be fine. Like my output:

Code:
C:\Users\Atti\Documents\Dev\xbmc-langdload\vc_project\Release>xbmc-langdload.exe xbmc-skins/skin.xeebo test2
2013-01-04 20:55+0000   INFO    XBMC-LANGDLOAD v0.8

2013-01-04 20:55+0000   INFO    Reading xbmc-txupdate.xml file for project: xbmc-addons
2013-01-04 20:55+0000   INFO    Reading xbmc-txupdate.xml file for project: xbmc-main-frodo
2013-01-04 20:55+0000   INFO    Reading xbmc-txupdate.xml file for project: xbmc-skins
2013-01-04 20:55+0000   INFO    Detected a total 87 resources hosted in 3 projects at xbmc/translations Github repo

2013-01-04 20:55+0000   INFO    **********************************************************
2013-01-04 20:55+0000   INFO    DOWNLOADING RESOURCE: xbmc-skins/skin.xeebo FROM XBMC REPO
2013-01-04 20:55+0000   INFO    **********************************************************
2013-01-04 20:55+0000   INFO      ResHandler: addon.xml downloaded for resource: xbmc-skins/skin.xeebo
2013-01-04 20:55+0000   INFO      ResHandler: changelog.txt downloaded for resource: xbmc-skins/skin.xeebo
2013-01-04 20:55+0000   INFO      ResHandler: Downloadeding language files:
Chinese (Simple) Czech English French German Korean Norwegian Polish Portuguese (Brazil) Spanish Swedish Turkish

2013-01-04 20:55+0000   INFO      ResHandler: 12 language files were downloaded for resource: skin.xeebo

2013-01-04 20:55+0000   INFO    ********************************
2013-01-04 20:55+0000   INFO    PROCESS FINISHED WITH 0 WARNINGS
2013-01-04 20:55+0000   INFO    ********************************

I'll correct this bug asap.

Thanks, 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.
Reply
#8
Same error unfortunately.

Code:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\Kevin.HAL>cd C:\Users\Kevin.HAL\AppData\Roaming\XBMC\addons

C:\Users\Kevin.HAL\AppData\Roaming\XBMC\addons>xbmc-langdload.exe xbmc-skins/ski
n.xeebo skin.xeebo
2013-01-04 21:51+0000   INFO    XBMC-LANGDLOAD v0.8

2013-01-04 21:51+0000   INFO    Reading xbmc-txupdate.xml file for project: xbmc
-addons
2013-01-04 21:51+0000   INFO    Reading xbmc-txupdate.xml file for project: xbmc
-main-frodo
2013-01-04 21:51+0000   INFO    Reading xbmc-txupdate.xml file for project: xbmc
-skins
2013-01-04 21:51+0000   INFO    Detected a total 87 resources hosted in 3 projec
ts at xbmc/translations Github repo

2013-01-04 21:51+0000   INFO    ************************************************
**********
2013-01-04 21:51+0000   INFO    DOWNLOADING RESOURCE: xbmc-skins/skin.xeebo FROM
XBMC REPO
2013-01-04 21:51+0000   INFO    ************************************************
**********
2013-01-04 21:51+0000   INFO      ResHandler: addon.xml downloaded for resource:
xbmc-skins/skin.xeebo
2013-01-04 21:51+0000   INFO      ResHandler: changelog.txt downloaded for resou
rce: xbmc-skins/skin.xeebo
2013-01-04 21:51+0000   INFO      ResHandler: Downloadeding language files:
Chinese (Simple)2013-01-04 21:51+0000  ERROR     FileUtils: WriteFileFromStr fa
iled for file: skin.xeebo\language\Chinese (Simple)\strings.po
Reply
#9
Yes, the other problem could be if you don't have access to create a directory there.
Please try to run the command prompt in admin mode.

Thx
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
#10
It's already being run as administrator.

EDIT: It definitely seems to be a permission problem as it works fine on another drive using a temp skin folder. Perhaps the EXE needs to be run as administrator as well?

Thanks.
Reply
#11
I'm guessing the filenames are just too long for Windows. When trying to get the sources from github the github client complained it could not write two files from the xbmc-main-frodo\.httpcache folders for Simplified Chinese. And thats just starting from D:\data\github\.

EDIT: Save the guesswork. I opened the vc project and tried to reproduce. At first it would not save the Afrikaans files. When I created the folder manually, the string.po was written to disk.
After that it complained it could not write the Albanian file. Big Grin
So there's a bug in CFile::MakeDir(std:Confusedtring Path)
Reply
#12
I got my copy of the vc_project to work by checking the DWORD returned by GetFileAttributes for failure and/or having the directory bit being set.
Will get this to github asap.

@alanwww1, will send you a pm with git diff.

Reply
#13
@biocoder
Thanks, I am not so good with windows stuff. It is even a miracle that I got curl working under windows :-)

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
#14
I updated the tool at the official XBMC translation github repository to version 0.82.
This includes:
  • Directory creating problems under windows (thanks @biocoder for this fix)
  • Automatic Git commit ability with usage of a commit message template, which can include the addon name and version

Note: Only use the git commit feature if you know what you are doing. Git push is not done for saftey of course.
Under windows the supported git client, is the official one at http://git-scm.com/downloads

More at the README
Download the win exe from here

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.
Reply
#15
Hey Attila,

what about OS X users?
My skins:

Amber
Quartz

Reply

Logout Mark Read Team Forum Stats Members Help
[RELEASE] XBMC language file download tool, for Transifex translations0