![]() |
Release IPTV Recorder - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33) +--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27) +---- Forum: Video Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=154) +---- Thread: Release IPTV Recorder (/showthread.php?tid=329991) |
RE: IPTV Recorder - primaeval - 2018-03-26 I've found a nice bit of code from @metate which looks promising. https://forum.kodi.tv/showthread.php?tid=268081 RE: IPTV Recorder - primaeval - 2018-03-26 Do you want to have a go with the languages? Just put a _("english string") around the strings you want to translate like this: https://github.com/primaeval/plugin.video.iptv.recorder/commit/5e135a15dee41c2afb88ff452adf06589ab56287#diff-5bc02cefb3ea9e27f1a6776eabd1935dR172 Then follow the instructions to install grep on Windows and run python language.py in the addon folder. It would be easier on linux. RE: IPTV Recorder - Chychy - 2018-03-26 I will give it a try, will do a PR when I'm done Something might be required to install the module on the final device, no ? RE: IPTV Recorder - primaeval - 2018-03-26 When the language.py file is run as part of the addon in Kodi it doesn't need the po module. It just runs the "else" section at the bottom which uses a dict to substitute the strings. https://github.com/primaeval/plugin.video.iptv.recorder/commit/5e135a15dee41c2afb88ff452adf06589ab56287#diff-90b1a08dbabf6d6c899871ab3bd8b06cR43 RE: IPTV Recorder - Chychy - 2018-03-26 I made a PR for the translation stuff, I created a French translation file, but it doesn't use it, do you have an idea why ? For the channel group scrolling, it's working the first time, but when you come back to the same page, there is a scroll again The scroll should only occur if we are on the first entry RE: IPTV Recorder - primaeval - 2018-03-26 Thanks. I should have guessed from your github name you were French. I was speaking to someone from Germany earlier. I don't know why it won't pull in the French strings. I've never had to switch the language on Kodi before. I've just spent an hour wondering why the scrolling jumps around. They've missed telling us about the "absolute" parameter you can add to SetFocus to go the correct position. RE: IPTV Recorder - Chychy - 2018-03-26 I still get the scroll when I come back to the page We probably need to check the current selection (maybe like https://forum.kodi.tv/showthread.php?tid=135205 ?) I fixed the translation issue, I just made a mess with "msgid" and "msgstr" tags, "msgstr" what empty so it fallback to english RE: IPTV Recorder - primaeval - 2018-03-27 I'm not if there is an easy way to do the Settings translations. Have you had a look? I fixed the scroll with a list selectItem call. http://mirrors.xbmc.org/docs/python-docs/16.x-jarvis/xbmcgui.html#ControlList-selectItem RE: IPTV Recorder - primaeval - 2018-03-27 The days of the week in the channel listing aren't getting translated either. I'm not sure how to do date translations. RE: IPTV Recorder - Chychy - 2018-03-27 There is no need of a translation setting, it's handled by Kodi, the local language will be loaded if available (eg: French), else fallback to English About the days, we can either translate them manually (not that good, we might have the same problem with months), or if there is any way we can get the local code (en, en_UK, ...), we can use the builtin functions (like locale.setLocal()) RE: IPTV Recorder - primaeval - 2018-03-27 I meant the xml Settings. https://github.com/primaeval/plugin.video.iptv.recorder/blob/master/resources/settings.xml There is a call to get some basic regional info from Kodi but that needs to be used to get regional datetime strings somehow. http://mirrors.kodi.tv/docs/python-docs/16.x-jarvis/xbmc.html#-getRegion RE: IPTV Recorder - Chychy - 2018-03-27 For the settings XML file, looks like we need to use the string ID For the language, it's possible to retrieve the 2 letter code from "getLanguage" function http://mirrors.kodi.tv/docs/python-docs/16.x-jarvis/xbmc.html#-getLanguage This returns something like "en", "fr", or with region option "en-UK", "fr-FR" Maybe something like that ?
RE: IPTV Recorder - primaeval - 2018-03-27 Good idea. It needs something else though. I put it at the top of main, changed true to True and it said. Error: unsupported locale setting loc is 'fr_be.utf8' RE: IPTV Recorder - primaeval - 2018-03-27 I don't know whether to automatically trigger a listing refresh or leave it up to the user. You can do a refresh with a keymap.xml setting like this:
RE: IPTV Recorder - Chychy - 2018-03-27 Looks like it's based on system packages, I have the same error on my testing env I need to check others addon to see how they are doing it |