Closed x7bit closed 1 year ago
@x7bit I added a localization script - but the snippet you posted won't do anything, because nothing changed from source (left) to target (right).
Sorry @tiptronic, I think I didn't explain myself clearly enough. I put a complete json, specifically in spanish (es.json
):
{
"Description": "Usa esto para crear tu propio plugin",
"Name": "Stream Deck Template",
"Category": "Templates",
"com.elgato.template.action": {
"Name": "Action",
"Tooltip": "Esto es sólo el action de este plugin"
},
"Localization": {
"More info": "Más info",
"Message": "Mensaje",
"Click Me": "Púlsame",
"Button": "Botón"
}
}
Description and Tooltip are are translated correctly, but all elements of Localization (More info, Message, Click Me, Button) are not (that correspond to HTML elements with 'data-localize').
Not sure what you mean... I just copied your strings into an es.json
and set my machine's language to spanish - and it works just fine... (using the script provided - that doesn't even need the data-localize
tag to work).
As far as the data-localize
tag is concerned, I'll take another look tomorrow...
Sorry @tiptronic, my fault. In the inspector.js
there is a comment that says:
/**
* Provide window level functions to use in the external window
* (this can be removed if the external window is not used)
*/
I thought that from there on down I could delete everything since my plugin has no external windows, and I had not noticed that the localization functions are at the bottom. I also thought that the form localization was something inherent to the library. Anyway, sorry for the misunderstanding.
@x7bit np - we're working on something much better... so just keep your [data-localize]
attributes intact and standby a little ;)
Thank you @tiptronic, I will stay tuned!
The 'Localization' key/section inside the localization json doesn't work. This worked with the old pi-samples libraries, but not with the new ones.