Hi balala, I have this skin: https://visualskins.com/skin/google-calendar, stand alone google calendar skin, with the attached Reader.lua (in txt format). I want to translate months names, days names in italian. Tiabalala wrote: ↑October 21st, 2022, 5:55 pm Please help us to can help you, when you1re asking for help. For instance, which skin of the package are you working with? And what do you mean by "localize in other languages this part"? Would you want to get localized times? Sorry but at least for me, it's not really clear what you want.
It is currently September 1st, 2024, 2:04 am
Enigma Google Calendar Patch
-
- Posts: 9
- Joined: October 21st, 2022, 9:48 am
Re: Enigma Google Calendar Patch
You do not have the required permissions to view the files attached to this post.
-
- Rainmeter Sage
- Posts: 16485
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Enigma Google Calendar Patch
The simplest way to do this is in my opinion, to add so many Time measures as many articles you have in the skin, one for each. These measures can be easier made to get translated the month and day names.Nicknightfly wrote: ↑October 22nd, 2022, 7:57 am I want to translate months names, days names in italian.
For tryout, for first let's work ONLY with translating the date of first article. For this, please do the followings:
- Add the following measure to the code of the skin:
(I added this right before the [ItemWhen1] measure, but you can add it anywhere).
Code: Select all
[Measure1Date] Measure=Time Format=%#H:%M %A %b %d TimeStamp=#Item1Date# TimeStampFormat=%I:%M %p %A %b %d FormatLocale=it-IT DynamicVariables=1
- Modify the [ItemWhen1] meter as it follows:
As you can see, I replaced the Text option and added the MeasureName option.
Code: Select all
[ItemWhen1] Meter=STRING MeasureName=Measure1Date Group=FeedData MeterStyle=StyleReaderSubtext Text=%1
-
- Posts: 9
- Joined: October 21st, 2022, 9:48 am
Re: Enigma Google Calendar Patch
Thank you for the answer, but in my skin there isn't any [ItemWhen1] measure, or maybe I'm not so good to understand the corrections you propose me. If you open the attached Reader.lua(modified in .txt) you can see and maybe you can help me to understand where I must insert your modifications. I tried to insert them but the skin remain stuck in loading. Sorry for my bad englishbalala wrote: ↑October 22nd, 2022, 7:24 pm The simplest way to do this is in my opinion, to add so many Time measures as many articles you have in the skin, one for each. These measures can be easier made to get translated the month and day names.
For tryout, for first let's work ONLY with translating the date of first article. For this, please do the followings:Does it work as expected? If it does, you can modify the same way the other String meters as well, and add the appropriate Time measures. If you can't get it to properly work, please let me know.
- Add the following measure to the code of the skin:
(I added this right before the [ItemWhen1] measure, but you can add it anywhere).Code: Select all
[Measure1Date] Measure=Time Format=%#H:%M %A %b %d TimeStamp=#Item1Date# TimeStampFormat=%I:%M %p %A %b %d FormatLocale=it-IT DynamicVariables=1
- Modify the [ItemWhen1] meter as it follows:
As you can see, I replaced the Text option and added the MeasureName option.Code: Select all
[ItemWhen1] Meter=STRING MeasureName=Measure1Date Group=FeedData MeterStyle=StyleReaderSubtext Text=%1
-
- Rainmeter Sage
- Posts: 2731
- Joined: March 23rd, 2015, 5:26 pm
Re: Enigma Google Calendar Patch
Balala's suggestions were to insert the changes into the skin itself, not the Lua code. You cannot localize the Lua code, it is English only unfortunately, so the code cannot be changed as you are trying to do (actually, if localization worked in Rainmeter's implementation of Lua, you would not need to change anything). You can localize Rainmeter measures, so that is what balala was suggesting.Nicknightfly wrote: ↑October 23rd, 2022, 1:13 pm Thank you for the answer, but in my skin there isn't any [ItemWhen1] measure, or maybe I'm not so good to understand the corrections you propose me. If you open the attached Reader.lua(modified in .txt) you can see and maybe you can help me to understand where I must insert your modifications. I tried to insert them but the skin remain stuck in loading. Sorry for my bad english
-
- Posts: 9
- Joined: October 21st, 2022, 9:48 am
Re: Enigma Google Calendar Patch
Thank you, I don't know well how to programming rainmeter, only some basic things. Your explanation is much clear for a newbie like me!SilverAzide wrote: ↑October 23rd, 2022, 3:35 pm Balala's suggestions were to insert the changes into the skin itself, not the Lua code. You cannot localize the Lua code, it is English only unfortunately, so the code cannot be changed as you are trying to do (actually, if localization worked in Rainmeter's implementation of Lua, you would not need to change anything). You can localize Rainmeter measures, so that is what balala was suggesting.
-
- Posts: 9
- Joined: October 21st, 2022, 9:48 am
Re: Enigma Google Calendar Patch
After the explanation of "Silverazide" I managed to change language, I have to enter both measures for each event on the calendar (Measure1Date for Item1Date -Measure2Date for Item21Date, etc), but something is wrong, there are 2 more days in each event. The number of the day is correct and also the month, but for the days of the week it does not work, the events of Monday appear with the date Wednesday, those of Tuesday with the date Thursday and so on. If you can help me to correct the issue i really appreciate. TIANicknightfly wrote: ↑October 23rd, 2022, 1:13 pm Thank you for the answer, but in my skin there isn't any [ItemWhen1] measure, or maybe I'm not so good to understand the corrections you propose me. If you open the attached Reader.lua(modified in .txt) you can see and maybe you can help me to understand where I must insert your modifications. I tried to insert them but the skin remain stuck in loading. Sorry for my bad english
Last edited by Nicknightfly on October 23rd, 2022, 7:50 pm, edited 1 time in total.
-
- Rainmeter Sage
- Posts: 16485
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Enigma Google Calendar Patch
I suppose you've forgot is either to change the Item1Date variable into the [Measure2Date], [Measure3Date] (and so on) measures to TimeStamp=#Item2Date#, TimeStamp=#Item3Date# and so on, or to modify the measure name into the newly added MeasureName options of the [ItemWhen2], [ItemWhen3] (and so on) meters (these options obviously have to be MeasureName=Measure2Date, MeasureName=Measure3Date and so on). Or both...Nicknightfly wrote: ↑October 23rd, 2022, 6:07 pm After the explanation of "Silverazide" I managed to change language, something is wrong, every event in calendar have the same date lunedì(monday) 01 gen!
Which one did you forget?
-
- Posts: 9
- Joined: October 21st, 2022, 9:48 am
Re: Enigma Google Calendar Patch
I made the change you suggest for each event on the calendar (Measure1Date for Item1Date -Measure2Date for Item2Date, etc), but something is wrong with the year and consequently the days of the week. I added %Y to verify and the year displayed is 1900. If you can help me to correct the issue i really appreciate. TIAbalala wrote: ↑October 23rd, 2022, 6:53 pm I suppose you've forgot is either to change the Item1Date variable into the [Measure2Date], [Measure3Date] (and so on) measures to TimeStamp=#Item2Date#, TimeStamp=#Item3Date# and so on, or to modify the measure name into the newly added MeasureName options of the [ItemWhen2], [ItemWhen3] (and so on) meters (these options obviously have to be MeasureName=Measure2Date, MeasureName=Measure3Date and so on). Or both...
Which one did you forget?
-
- Posts: 9
- Joined: October 21st, 2022, 9:48 am
Re: Enigma Google Calendar Patch
Nicknightfly wrote: ↑October 23rd, 2022, 10:17 pm I made the change you suggest for each event on the calendar (Measure1Date for Item1Date -Measure2Date for Item2Date, etc), but something is wrong with the year and consequently the days of the week. I added %Y to verify and the year displayed is 1900. If you can help me to correct the issue i really appreciate. TIA
I resolved adding %y at TimeStampFormat=%I:%M %p %A %b %d %y
You are really helpful, thank you again.
-
- Rainmeter Sage
- Posts: 16485
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Enigma Google Calendar Patch
Nicknightfly wrote: ↑October 23rd, 2022, 10:17 pm I made the change you suggest for each event on the calendar (Measure1Date for Item1Date -Measure2Date for Item2Date, etc), but something is wrong with the year and consequently the days of the week. I added %Y to verify and the year displayed is 1900. If you can help me to correct the issue i really appreciate. TIA
I'm surprised if you had to add the %y parameter to the TimeStampFormat options, but if you got it working this way, it's good, I believe. Glad if it's working well.Nicknightfly wrote: ↑October 23rd, 2022, 10:41 pm I resolved adding %y at TimeStampFormat=%I:%M %p %A %b %d %y
You are really helpful, thank you again.