Page 3 of 6

Posted: Tue 21 Jan 2014, 02:26
by vicmz
dejan555 wrote:Thank you very much vicmz, I will look at it, does it have to be translated for every version or we can introduce some kind of language file?

Meanwhile I've made some changes, look at changelog in first post
Language files. This is by applying gettext to the scripts. Ideally, gettext code should be applied once, as it must be applied manually and takes time depending on the amount of GUI lines, then when new GUI lines are added to the script those lines can be gettexted, too. Extract the scripts from the pet above to see which parts have gettext, you may even learn to apply it yourself. The tar file above has the .mo file which is the one containing the translations. For each language you can have a different .mo located in individual folders, see /usr/share/locale in any Puppy, that's the directory where gettext translations are stored.

If you speak another language, you can even make a whole Puppy langpack in your language, see Menu > Utilities > Momanager and Menu > Help > HOWTO internationalization.

Posted: Tue 21 Jan 2014, 07:54
by dejan555
OK, btw, which is gtk theme that you use in that screenshot?

EDIT: Also, since .mo files are compiled do you have .po es file I can look at, or Momanager doesn't save it?
It would probably be needed to supply as source file too

EDIT2: Ok, found out they can be converted back to .po with msgunfmt

EDIT3: So I get how this works now, the only string I changed for new version is auto-changer tooltip I think because I let user define interval in config file instead being fixed 30 minutes. (Meh, does anyone even use this feature? :P)

Posted: Tue 21 Jan 2014, 14:31
by vicmz
dejan555 wrote:OK, btw, which is gtk theme that you use in that screenshot?

EDIT: Also, since .mo files are compiled do you have .po es file I can look at, or Momanager doesn't save it?
It would probably be needed to supply as source file too

EDIT2: Ok, found out they can be converted back to .po with msgunfmt

EDIT3: So I get how this works now, the only string I changed for new version is auto-changer tooltip I think because I let user define interval in config file instead being fixed 30 minutes. (Meh, does anyone even use this feature? :P)
The GTK theme in my screenshot above is Nodoka Midnight (available in the gtk-theme-collection.pet from here, and in most Pemasu's puppies).

Momanager doesn't need a .po file as long as the gettexted scripts are installed. You can post a .pot for translators to rename to .po and edit with POedit, but again after installing the new gettexted version Momanager generates the new .po and opens it in POedit, even merging translations from the old .mo file with the new translatable strings. This means every time you release a new version of your application, you only need to apply gettext on the new GUI lines, and let translators manage the rest.

Posted: Tue 21 Jan 2014, 15:32
by vicmz
Here is v0.1.9 gettexted, with .mo for Spanish language updated. You can add changes over these scripts directly and easily apply gettext code into the new GUI strings. See:

http://murga-linux.com/puppy/viewtopic.php?t=84178

http://murga-linux.com/puppy/viewtopic.php?t=84086

Simple GTK Radio

Posted: Tue 21 Jan 2014, 16:21
by labbe5
Hi,

Just to say thanks for this app.
Works nice and easy.
I like best ad-free Paradise radio.

It's a pet that finds itself in each of my Puppies. I would see it join Pmusic in Multimedia category in future Puppies.

Posted: Tue 21 Jan 2014, 18:37
by keniv
Hi All,

Thanks for the information on what BBC streams work outside the UK. Glad so many did. I have also noticed that they seem to take a little time to start playing. This little app is getting better and better.

Regards,

Ken.

Posted: Tue 21 Jan 2014, 19:43
by robwoj44
Polish language for Simple GTK Radio

Posted: Tue 21 Jan 2014, 20:31
by dejan555
Wow, thanks, didn't expect this kind of response for this little app :)
I will package es and pl translations with next update.
Question though:
Should these translations take effect if I change locale from Chooselocale setup in puppy (session not saved but I restarted X)
Not working for me, see screenie.

Posted: Tue 21 Jan 2014, 20:49
by vovchik
Dear Dejan,

It is a nice little app. I tested it in Cinnamon Mint 16, which I also have installed, and it runs perfectly once you unstall a recent gtkdialog and the few other dependencies. And it runs fine from '/home/vovchik' as user 'vovchik', too, so you wrote it very universally and, once installed, it does not write anything into dirs that require root privileges. Nice.:)

With kind regards,
vovchik

Posted: Tue 21 Jan 2014, 21:14
by robwoj44
Should these translations take effect if I change locale from Chooselocale setup in puppy (session not saved but I restarted X)
Yes if you use vicmz's gettexted version of simplegtkradio
http://www.murga-linux.com/puppy/viewto ... 719#752719

Posted: Tue 21 Jan 2014, 21:49
by dejan555
I did, and I just uploaded new version with gettexted changes, language files and code for playlist choice, see first post for instructions how to setup.

Also, tlchost gave me information about this radio player's streams database with 24000+ stations which can be downloaded link, so I converted stations in simple gtk radio format and split them in playlists of 500 entries each, just unpack, move playlists in $HOME/.config/simplegtkradio/playlists and enable playlist chooser as mentioned in first post and there you have 23K+ stations (haven't converted streams starting with mms://) to choose from (some will play, some not, haven't tested if all playlists load but I think I have removed all charachters from station names that can cause errors)

Get playlists: playlists.rsdb.tar.bz2 582 KB

vovchik, good to know that it works on other distros too, yeah I had multiple users in mind, I also tested on dpup 486 as different user I have multiuser thing going to some point there

Posted: Tue 21 Jan 2014, 23:44
by dejan555
And here's serbian language file attached, will add to main pet in next version

Posted: Wed 22 Jan 2014, 00:11
by vicmz
This is an updated Spanish .mo for v0.1.11

Posted: Wed 22 Jan 2014, 01:25
by vicmz
Portuguese and Italian

Note: for some weird reason the first time Simple GTK Radio v0.1.11 is launched it says "Radio stopped" in English when it should say it in the system language, but this gets fixed after you do stop the radio broadcast by clicking the "stop" button.

Posted: Wed 22 Jan 2014, 05:53
by robwoj44
Polish language for Simple GTK Radio updated

Posted: Wed 22 Jan 2014, 07:02
by dejan555
vicmz wrote: Note: for some weird reason the first time Simple GTK Radio v0.1.11 is launched it says "Radio stopped" in English when it should say it in the system language, but this gets fixed after you do stop the radio broadcast by clicking the "stop" button.
Hmm, yeah I noticed, you gettexted all occurences of phrase though in both scripts.

Posted: Wed 22 Jan 2014, 09:39
by sc0ttman
there's lots of radio streams in vlc-gtk ... and also a script around somewhere for importing all the stations fom icecast ... maybe here: http://murga-linux.com/puppy/viewtopic.php?t=80021

Posted: Wed 22 Jan 2014, 22:34
by dejan555
Thanks sc0ttman I'll take a look.
Uploaded new version with new translations and search function, see first post.
Attachments piled up so I archived all older versions in one tar

Posted: Wed 22 Jan 2014, 22:52
by vovchik
Dear Dejan,

Very nice implementation of search and very fast. Congratulations....

With kind regards,
vovchik

Posted: Fri 24 Jan 2014, 00:04
by vicmz
Spanish updated for v.0.1.12
The GUI seems to be a little bit inflexible for translations. I like the new search feature. :D