Just wanted to report errors on the Inline Lua Examples
First, on the TranslateDay lua code:
spanish = {'domingo','lunes','martes','mercredi','miércoles','viernes','sábado'},
Should be:
spanish = {'domingo','lunes','martes','miércoles','jueves','viernes','sábado'},
And the other errors are just display errors (which I haven't check exactly what the error is on the code, since I'm starting to learn lua).
TranslateDay: Header shows the literal [&MeasureScript:TranslateHeader('[#MainLang])'] string
ConvertTemp: Shows the literal [&MeasureScript:ConvertToCelsius([&MeasureTemp])]°C string on MouseOver, instead (I guess it should only show "°C"), may be the weather URL it uses doesn't work anymore. Because it doesn't even show any temperature, it only displays "°F".
On Load and MouseLeave:
MouseOver:
It is currently July 27th, 2024, 2:13 pm
Errors on Inline Lua Examples
-
- Posts: 303
- Joined: December 28th, 2022, 9:30 pm
- Location: México
Errors on Inline Lua Examples
You do not have the required permissions to view the files attached to this post.
-
- Posts: 107
- Joined: November 3rd, 2019, 12:00 am
Re: Errors on Inline Lua Examples
I have created a GitHub pull request #53 to the rainmeter/rainmeter-docs
I am learning Lua too.
If you have learnt the basic of Lua then learnt about Lua metatable (setmetatable(), __index),
you might be interested in the example code of Localization with Lua metatable (GitHub.com)
> Online testing for Lua code : https://onecompiler.com/lua/
I am learning Lua too.
If you have learnt the basic of Lua then learnt about Lua metatable (setmetatable(), __index),
you might be interested in the example code of Localization with Lua metatable (GitHub.com)
> Online testing for Lua code : https://onecompiler.com/lua/
-
- Posts: 303
- Joined: December 28th, 2022, 9:30 pm
- Location: México
Re: Errors on Inline Lua Examples
Thank you, and thank you for the resources I'll check them out.nek wrote: ↑February 16th, 2024, 2:48 am I have created a GitHub pull request #53 to the rainmeter/rainmeter-docs
I am learning Lua too.
If you have learnt the basic of Lua then learnt about Lua metatable (setmetatable(), __index),
you might be interested in the example code of Localization with Lua metatable (GitHub.com)
> Online testing for Lua code : https://onecompiler.com/lua/
By the way, for your localization skin, in case you want to include the Spanish translations for:
Code: Select all
_language = 'Español',
_region = 'España',
button_ok = 'Aceptar',
wx_conditions_sunny = 'Soleado',
wx_conditions_cloudy = 'Nublado',
wx_conditions_windy = 'Ventoso',
wx_conditions_rainy = 'Lluvioso',
menu_skin_scaling = 'Tamaño de piel',
-
- Posts: 107
- Joined: November 3rd, 2019, 12:00 am
Re: Errors on Inline Lua Examples
Thanks for the correction. I will update the code.
I don't have a good explanation in english, just a code for how Lua metatable __index works and useful.
I don't have a good explanation in english, just a code for how Lua metatable __index works and useful.
Code: Select all
local en = { ok = 'OK', cancel = 'Cancel' }
local es = { ok = 'Aceptar' }
-- Output: nil
print(es['cancel'])
setmetatable(es, { __index = en })
-- Output: Cancel
print(es['cancel'])
-
- Developer
- Posts: 22649
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Errors on Inline Lua Examples
I have applied your change request. The .rmskin is updated. Thanks for the help!nek wrote: ↑February 16th, 2024, 2:48 am I have created a GitHub pull request #53 to the rainmeter/rainmeter-docs
I am learning Lua too.
If you have learnt the basic of Lua then learnt about Lua metatable (setmetatable(), __index),
you might be interested in the example code of Localization with Lua metatable (GitHub.com)
> Online testing for Lua code : https://onecompiler.com/lua/