.ba
Foreca Weather Plugin
-
- Foreca
- peter.721970
- Thread is marked as Resolved.
-
-
You asked for feedback for dreamboxes. Plugin installed (ipk file) and everything works. DM800se , Atv 7.3.
-
Problem with Foreca 3.3.5
Don`t show name of day
Zgemma H7, OpenPLi Develop
-
-
I downloaded version 3.3.5, Which one should I download?
-
Ok on ATv and PLi
try this.. add in setup , selecion server
if select server is NO: the server are online in to txt in git
or language sigle are the server: nz - ba - com - hr etc
1_0_19_C30_3A2_110_EEEE0000_0_0_0_20241228140007.jpg
-
With the latest update the plugin works on openpli 9.0 while on openpli 8.3 the initial screen appears with the words wait please...
-
With the latest update the plugin works on openpli 9.0 while on openpli 8.3 the initial screen appears with the words wait please...
I always want to point out that I don't have all the images in this world.
What should bother 8.3
infobar? (even on pli7.3) it doesn't work
But I don't use dated or EOL images anymore.
Of course 30 downloads and 1 Like..
You know I care..
This way you discourage even the Pope
-
Display More
With the latest update the plugin works on openpli 9.0 while on openpli 8.3 the initial screen appears with the words wait please...
I always want to point out that I don't have all the images in this world.
What should bother 8.3
infobar? (even on pli7.3) it doesn't work
But I don't use dated or EOL images anymore.
Of course 30 downloads and 1 Like..
You know I care..
This way you discourage even the Pope
Dear developer, can translation be added to these three places? All other places in this plug-in can be translated, except these three... Thank you!
-
well my friend
although I put a gettext() code to translate, the .pot file does not take this code and so it will be the only part not translated, unless we directly give it the translation..
Maybe try it, it might work.
Code
Display Morewhile x < timeEntries: description[x] = self.konvert_uml(str(sub(r'<[^>]*>', "", description[x]))) feels[x] = self.konvert_uml(str(sub(r'<[^>]*>', "", feels[x]))) precip[x] = self.konvert_uml(str(sub(r'<[^>]*>', "", precip[x]))) humidity[x] = self.konvert_uml(str(sub(r'<[^>]*>', "", humidity[x]))) windSpeed[x] = self.filter_dia(windSpeed[x]) description[x] = _(description[x]) feels[x] = _(feels[x]) precip[x] = _(precip[x]) humidity[x] = _(humidity[x]) windSpeed[x] = _(windSpeed[x])
description[x] = _(description[x])
feels[x] = _(feels[x])
precip[x] = _(precip[x])
humidity[x] = _(humidity[x])
windSpeed[x] = _(windSpeed[x])Other .po and .pot are here on Git
-
-
Display More
well my friend
although I put a gettext() code to translate, the .pot file does not take this code and so it will be the only part not translated, unless we directly give it the translation..
Maybe try it, it might work.
Code
Display Morewhile x < timeEntries: description[x] = self.konvert_uml(str(sub(r'<[^>]*>', "", description[x]))) feels[x] = self.konvert_uml(str(sub(r'<[^>]*>', "", feels[x]))) precip[x] = self.konvert_uml(str(sub(r'<[^>]*>', "", precip[x]))) humidity[x] = self.konvert_uml(str(sub(r'<[^>]*>', "", humidity[x]))) windSpeed[x] = self.filter_dia(windSpeed[x]) description[x] = _(description[x]) feels[x] = _(feels[x]) precip[x] = _(precip[x]) humidity[x] = _(humidity[x]) windSpeed[x] = _(windSpeed[x])
description[x] = _(description[x])
feels[x] = _(feels[x])
precip[x] = _(precip[x])
humidity[x] = _(humidity[x])
windSpeed[x] = _(windSpeed[x])Here is the Chinese translation file, thanks again for sharing, the method I used before was not scientific.Here's what I did before.
Code
Display More#### 体感温度 x, y, w, h = self.valText2 textsechs=self.x[6] textsechs=textsechs.replace("°", "") + tempUnit textsechs=textsechs.replace("Feels Like:", "体感温度:") self.res.append(MultiContentEntryText(pos=(x, y), size=(w, h), font=2, text=textsechs, color=mblau, color_sel=mblau)) ###降雨几率 x, y, w, h = self.valText3 textsechs=self.x[7] textsechs=textsechs.replace("Precip chance:", "降雨几率:") self.res.append(MultiContentEntryText(pos=(x, y), size=(w, h), font=2, text=textsechs, color=mblau, color_sel=mblau)) ###湿度 x, y, w, h = self.valText4 textsechs=self.x[8] textsechs=textsechs.replace("Humidity:", "湿 度:") self.res.append(MultiContentEntryText(pos=(x, y), size=(w, h), font=2, text=textsechs, color=mblau, color_sel=mblau)) # Wind x, y, w, h = self.valWind self.res.append(MultiContentEntryText(pos=(x, y), size=(w, h), font=0, text=_("Wind"), color=weiss, color_sel=weiss)) x, y, w, h = self.valWindUnits textsechs=self.x[4] textsechs=textsechs.replace("kmh", "千米/时") self.res.append(MultiContentEntryText(pos=(x, y), size=(w, h), font=2, text=textsechs, color=violetred, color_sel=violetred))1_0_1_6525_2326_7327_0_0_0_0_20241230232153.jpg
for chinese,new:Foreca.po
-
I changed the code, it becomes like this, it shows duplicates ....
no, it doesn't work like that. .You can't think only to yourself, then we would have 1000 ui.py code..
Let's leave it..
Read Discussion with pr2
Translations for Enigma 2: Please post them here! - Page 108 - [EN] Enduser supportPage 108 of 108 - Translations for Enigma 2: Please post them here! - posted in [EN] Enduser support: Every plugin came with its own po file for translation.…forums.openpli.org -
v.3.3.6 at top of topic
-removed code unnecessary
-picon changed
-thumb changed
-
Those (Feels like, Precip chance and Humidity) can be translated like this :
# Text
x, y, w, h = self.valText1
self.res.append(MultiContentEntryText(pos=(x, y), size=(w, h), font=3, text=_(self.x[5]), color=weiss, color_sel=weiss))
x, y, w, h = self.valText2
textsechs = self.x[6]
textsechs = textsechs.replace("°", "") + tempUnit
textsechs = textsechs.replace("Feels Like:", _("Feels like:"))
self.res.append(MultiContentEntryText(pos=(x, y), size=(w, h), font=2, text=textsechs, color=mblau, color_sel=mblau))
x, y, w, h = self.valText3
textsechs = self.x[7]
textsechs = textsechs.replace("Precip chance:", _("Precip chance:"))
self.res.append(MultiContentEntryText(pos=(x, y), size=(w, h), font=2, text=textsechs, color=mblau, color_sel=mblau))
x, y, w, h = self.valText4
textsechs=self.x[8]
textsechs=textsechs.replace("Humidity:", _("Humidity:"))
self.res.append(MultiContentEntryText(pos=(x, y), size=(w, h), font=2, text=textsechs, color=mblau, color_sel=mblau))
Then add these to Foreca.po and translate them to your language:
msgid "Feels like:"
msgstr ""
msgid "Precip chance:"
msgstr ""
msgid "Humidity:"
msgstr ""
-
to be clearer
I attach the dictionary
English=German
if the box is configured for German language = de
will take the attached file that starts with dedict.txt
and foreca work total 100%
get box language
command for description
Code# translate_description translation_dict = self.load_translation_dict(lng) description[x] = self.konvert_uml(str(sub(r'<[^>]*>', "", description[x]))) description[x] = self.translate_description(description[x], translation_dict)def for dict and value
Code
Display Moredef load_translation_dict(self, lng): dict_file = resolveFilename(SCOPE_PLUGINS) + "Extensions/Foreca/dict/%sdict.txt" % lng if not exists(dict_file): dict_file = resolveFilename(SCOPE_PLUGINS) + "Extensions/Foreca/dict/endict.txt" print('dict_file=', dict_file) translation_dict = {} with open(dict_file, 'r') as file: for line in file: parts = line.strip().split('=') if len(parts) == 2: key, value = parts translation_dict[key.strip().lower()] = value.strip() return translation_dict def translate_description(self, description, translation_dict): cleaned_description = sub(r'[\t\r\n]', ' ', description).strip() if cleaned_description.lower() in translation_dict: return translation_dict[cleaned_description.lower()] words = cleaned_description.split() return ' '.join([translation_dict.get(word.lower(), word) for word in words])
-
this is dict
en=enyou will have to translate from english to your language
on the left leave english
on the right replace with your translated language
folder update dict are attched.. -
Display More
Those (Feels like, Precip chance and Humidity) can be translated like this :
# Text
x, y, w, h = self.valText1
self.res.append(MultiContentEntryText(pos=(x, y), size=(w, h), font=3, text=_(self.x[5]), color=weiss, color_sel=weiss))
x, y, w, h = self.valText2
textsechs = self.x[6]
textsechs = textsechs.replace("&WCF_AMPERSAND°", "") + tempUnit
textsechs = textsechs.replace("Feels Like:", _("Feels like:"))
self.res.append(MultiContentEntryText(pos=(x, y), size=(w, h), font=2, text=textsechs, color=mblau, color_sel=mblau))
x, y, w, h = self.valText3
textsechs = self.x[7]
textsechs = textsechs.replace("Precip chance:", _("Precip chance:"))
self.res.append(MultiContentEntryText(pos=(x, y), size=(w, h), font=2, text=textsechs, color=mblau, color_sel=mblau))
x, y, w, h = self.valText4
textsechs=self.x[8]
textsechs=textsechs.replace("Humidity:", _("Humidity:"))
self.res.append(MultiContentEntryText(pos=(x, y), size=(w, h), font=2, text=textsechs, color=mblau, color_sel=mblau))
Then add these to Foreca.po and translate them to your language:
msgid "Feels like:"
msgstr ""
msgid "Precip chance:"
msgstr ""
msgid "Humidity:"
msgstr ""
i have applied your suggest ;)
thank'syou just need to update the .pot in your language, I can't do it..
if you attach it I can insert it in git and plugin
-
Yes with these changes to ui.py:
titel[0] = str(sub(r'<[^>]*>', "", titel[0]))
textsechs = titel[0]
textsechs = textsechs.replace("Monday", _("Monday"))
textsechs = textsechs.replace("Tuesday", _("Tuesday"))
textsechs = textsechs.replace("Wednesday", _("Wednesday"))
textsechs = textsechs.replace("Thursday", _("Thursday"))
textsechs = textsechs.replace("Friday", _("Friday"))
textsechs = textsechs.replace("Saturday", _("Saturday"))
textsechs = textsechs.replace("Sunday", _("Sunday"))
textsechs = textsechs.replace("January", _("January"))
textsechs = textsechs.replace("February", _("February"))
textsechs = textsechs.replace("March", _("March"))
textsechs = textsechs.replace("April", _("April"))
textsechs = textsechs.replace("May", _("May"))
textsechs = textsechs.replace("June", _("June"))
textsechs = textsechs.replace("July", _("July"))
textsechs = textsechs.replace("August", _("August"))
textsechs = textsechs.replace("September", _("September"))
textsechs = textsechs.replace("October", _("October"))
textsechs = textsechs.replace("November", _("November"))
textsechs = textsechs.replace("December", _("December"))
print(pluginPrintname, "titel[0]=", textsechs)
datum = textsechs
-
you have tryed ?
work this system ?
Thanks to the developer, Chinese is now available!
-
Display More
Yes with these changes to ui.py:
titel[0] = str(sub(r'<[^>]*>', "", titel[0]))
textsechs = titel[0]
textsechs = textsechs.replace("Monday", _("Monday"))
textsechs = textsechs.replace("Tuesday", _("Tuesday"))
textsechs = textsechs.replace("Wednesday", _("Wednesday"))
textsechs = textsechs.replace("Thursday", _("Thursday"))
textsechs = textsechs.replace("Friday", _("Friday"))
textsechs = textsechs.replace("Saturday", _("Saturday"))
textsechs = textsechs.replace("Sunday", _("Sunday"))
textsechs = textsechs.replace("January", _("January"))
textsechs = textsechs.replace("February", _("February"))
textsechs = textsechs.replace("March", _("March"))
textsechs = textsechs.replace("April", _("April"))
textsechs = textsechs.replace("May", _("May"))
textsechs = textsechs.replace("June", _("June"))
textsechs = textsechs.replace("July", _("July"))
textsechs = textsechs.replace("August", _("August"))
textsechs = textsechs.replace("September", _("September"))
textsechs = textsechs.replace("October", _("October"))
textsechs = textsechs.replace("November", _("November"))
textsechs = textsechs.replace("December", _("December"))
print(pluginPrintname, "titel[0]=", textsechs)
datum = textsechs
Code
Display Moretranslations = { "Monday": _("Monday"), "Tuesday": _("Tuesday"), "Wednesday": _("Wednesday"), "Thursday": _("Thursday"), "Friday": _("Friday"), "Saturday": _("Saturday"), "Sunday": _("Sunday"), "January": _("January"), "February": _("February"), "March": _("March"), "April": _("April"), "May": _("May"), "June": _("June"), "July": _("July"), "August": _("August"), "September": _("September"), "October": _("October"), "November": _("November"), "December": _("December"), } textsechs = titel[0] for key, value in translations.items(): textsechs = textsechs.replace(key, value)new .pot locale attached
-
Your source for Enigma2 weather plugins
Find downloads and support for tools that show detailed local forecasts, severe weather alerts, and animated radar displays on your device. Discover Enigma2 weather plugins for your receiver. Access downloads and support to display local forecasts and real-time weather information directly on screen.
