[Release] Simple PO Viewer for XBMC Frodo language files
#1
Video 


This tiny application reads the language files from the XBMC source tree and can show multiple languages side by side.

Features:
* Load the language data for xbmc-core and an addon (skin-confluence by default) at the same time.
* You can configure the application to automatically load a few (or more) languages at startup.
* Filter for strings with C-style placeholders (%).
* Filter for text in all loaded languages.
* Export your localized text to a tab delimited text file.
* Lookup localization strings by numeric ID.

I signed up on Transifex a few months ago because I want to improve the Indonesian translation of XBMC. I quickly found that,
although great for collaboration, the Transifex website is a bit overwhelming if the translation progress is not near 100%.
Even with 100 rows of localized text a page it's hard to see what needs review and what is already OK.

So I started coding a C# application that would show me the text side by side in a scrollable window.
I've tested this on the Mono runtime that comes with Ubuntu 12.04 and with .NET 4.0 Client Profile on Windows 7.
The program runs pretty good on Mono. However, there's one annoying thing: filling the ListView is slow. Since this may be fixed with updates from the mono runtime, I'm ignoring it.
I thought about doing this in C/C++ to make it more portable for less than a second because that wildly violates my KISS approach on this project. So have your favourite beverage ready when you want to run this on LinuxTongue

If I may say so myself, this viewer (since uploading modified .po files to Transifex is strongly discouraged) is pretty feature complete.
There is probably a lot of improvement possible for languages with a non-Latin character set. Since I can't read that myself, I skipped that for now.

binary
git home

Suggestions, comments welcome Blush
Reply
#2
Great work, highly appreciated ! I will put it in the official repo.

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
#3
Added to the official XBMC repo:
https://github.com/xbmc/translations/tre...ViewerXBMC

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
Ok, I cloned xbmc/translations. Slightly off-topic: I could not sync 2 files (fanart.tv resources in Simplied Chinese) in because the filenames are too long for Windows. As long as the tooling is not run on Windows that is fine Smile
Reply
#5
(2013-01-18, 01:21)biocoder Wrote: Ok, I cloned xbmc/translations. Slightly off-topic: I could not sync 2 files (fanart.tv resources in Simplied Chinese) in because the filenames are too long for Windows. As long as the tooling is not run on Windows that is fine Smile

Yes. I know about this problem. It comes from the way my sync tool creates cache filenames. It just simply uses the URL of the http address. This is why we have so long filenames.

Any idea how to make this better? I know some kind of hash code would be sufficient, but numerous times I HAVE TO edit the upstream language files coming from addon developers, due to incorrect syntax. So I have to find the cached file and make an edit on it. So a hash code would make it a little bit problematic to find.

Another idea is to make a directory structure using the '/' characters in the URL. I think I'll choose this option.
So if I have time i refactor the caching so that we won't have too long filenames.
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
#6
If you use the information describing the upstream files to create the directory structure, files would be easy to find and you would not create a huge tree of folders?

Do you process the .PO files for multiline resources before they are pushed to xmbc/xbmc/language? If I download a fresh PO for use from Transifex, it contains some multiline items in the English (and all other languages) that make the current code for SimplePOviewer throw an exception (Messagebox)

e.g.
Code:
msgctxt "#245"
msgid ""
"Sizing: (%i,%i)->(%i,%i) (Zoom x%2.2f) AR:%2.2f:1 (Pixels: %2.2f:1) (VShift:"
" %2.2f)"
msgstr "Sizing: (%i,%i)->(%i,%i) (Zoom x%2.2f) AR:%2.2f:1 (Pixels: %2.2f:1) (VShift: %2.2f)"

the files from github have a single line for this item:
Code:
msgctxt "#245"
msgid "Sizing: (%i,%i)->(%i,%i) (Zoom x%2.2f) AR:%2.2f:1 (Pixels: %2.2f:1) (VShift: %2.2f)"

I'll make a patch for the tool, but I'd like to know if the multiline thing is intentional.
Reply
#7
(2013-01-18, 12:40)biocoder Wrote: Do you process the .PO files for multiline resources before they are pushed to xmbc/xbmc/language? If I download a fresh PO for use from Transifex, it contains some multiline items in the English (and all other languages) that make the current code for SimplePOviewer throw an exception (Messagebox)

Yes my sync tool merges these multi line entries. It was team decision that we don't want to see such entries in XBMC language files.

This is why I strongly ask everyone to use the cleaned, formatted files in the xbmc/translations repo. This way we can also save some bandwidth for the Transifex guys.
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
I've updated the PO parsing to the specification at gnu.org (o why? Big Grin ). I've also added some support for plural forms on the main form.
Reply
#9
Just saw this thread. Nice work - great to see little helper apps like this Smile
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
#10
yep, nice work. thx Smile
Donate: https://kodi.tv/contribute/donate (foundation), 146Gr48FqHM7TPB9q33HHv6uWpgQqdz1yk (BTC personal)
Estuary: Kodis new default skin - ExtendedInfo Script - KodiDevKit
Reply

Logout Mark Read Team Forum Stats Members Help
[Release] Simple PO Viewer for XBMC Frodo language files0