Kodi Community Forum
Kodi skin localize VS Code extension - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Skinning (https://forum.kodi.tv/forumdisplay.php?fid=12)
+--- Thread: Kodi skin localize VS Code extension (/showthread.php?tid=367861)

Pages: 1 2 3 4 5 6 7


RE: Kodi skin localize VS Code extension - kittmaster - 2024-08-05

would you be ok with a .rar or .zip file from my local server? My github is is really not the place I want to muck up with all shit I've got going on now and having people screw with it as I'm not fully comfortable with branching and all that mess... LMK.


RE: Kodi skin localize VS Code extension - kittmaster - 2024-08-05

(2024-08-05, 16:07)roidy Wrote: Forget that, I see the problem.

The extension looks in resource.language.en_gb your skin uses resource.language.en_us.

I'll make some changes to set the default language and put up a new version.

Ah, ok, great... TY!


RE: Kodi skin localize VS Code extension - roidy - 2024-08-05

Give me an hour or so and check back for a new version Big Grin


RE: Kodi skin localize VS Code extension - kittmaster - 2024-08-05

Will do, TY!


RE: Kodi skin localize VS Code extension - kittmaster - 2024-08-05

Here is another question on this great recent update, the feature of going one way of "go to definition, and peek definition" are absolute must needs... 

My question, is there a way to go in reverse? i.e. You are at the variable, you right click the name, it takes you to the "function"? That would be super useful IMHO. 

Just thinking out loud.


RE: Kodi skin localize VS Code extension - roidy - 2024-08-05

v0.2.0

Add setting for language file country code. The default value is en_gb. After changing the value you will need to restart VSCode.

Image


RE: Kodi skin localize VS Code extension - roidy - 2024-08-05

(2024-08-05, 16:50)kittmaster Wrote: My question, is there a way to go in reverse? i.e. You are at the variable, you right click the name, it takes you to the "function"? That would be super useful IMHO. 

Just thinking out loud.
Not really.

A variable, expression or even include could be used in multiple different places. Which place do you goto? Do you just list all the places? If so then it's no better than just doing a search for the name.


RE: Kodi skin localize VS Code extension - kittmaster - 2024-08-05

(2024-08-05, 18:08)roidy Wrote:
(2024-08-05, 16:50)kittmaster Wrote: My question, is there a way to go in reverse? i.e. You are at the variable, you right click the name, it takes you to the "function"? That would be super useful IMHO. 

Just thinking out loud.
Not really.

A variable, expression or even include could be used in multiple different places. Which place do you goto? Do you just list all the places? If so then it's no better than just doing a search for the name.

ah, I knew that would be the question and the real answer would be this if my logic makes any sense, could there be checkboxes that could select what the returns would be i.e. all_ / settings_ / custom_ / script_ / like you did for language_as_wildcard__?

Something in that vein?

Totally understand if it's a complete "fuck no" type of deal, it was just a thinking out loud thing... Smile


RE: Kodi skin localize VS Code extension - roidy - 2024-08-05

First did the country code option fix your problem?

Second, I'm really not sure what you mean with all_ / settings_ / custom_ / script_.

From my understanding you want to click "definition" on let's say a $VAR[myvar] and it takes you to that variables definition, that's what currently happens.

You then want to click on that variables definition and go where exactly? That variable could be used in 10 other places in the skin so which one do we want to goto Sad


RE: Kodi skin localize VS Code extension - kittmaster - 2024-08-05

(2024-08-05, 19:26)roidy Wrote: First did the country code option fix your problem?

Second, I'm really not sure what you mean with all_ / settings_ / custom_ / script_.

From my understanding you want to click "definition" on let's say a $VAR[myvar] and it takes you to that variables definition, that's what currently happens.

You then want to click on that variables definition and go where exactly? That variable could be used in 10 other places in the skin so which one do we want to goto Sad
There is an issue with it accepting the string. The settings box takes it, but the core seems to plant on en_gb. I created a video for you see to see in real time what it's doing hence the delay.

What I meant by the all_ etc... 

You said that the functions could be anywhere, my proposal would be, "only return files with the filename that start with custom_" that contain the variable or filename with script_ type of thing. The VSCODE search would be used if you had no idea where they all live, but lets say you are working with "plot" and you only care about where lives in the "scripts" xml files... but don't give a crap about music, or other areas... then you'd select checkbox in the searcher that would only return in those files... I can see in hindsight how that might become unwieldy... and way more BS than what it's worth.

http://www.kittmaster.com/imagedump/kodi/skin/KodiLocalizer.html

Here is what going on with the country code.


RE: Kodi skin localize VS Code extension - kittmaster - 2024-08-06

I was giving this a quick look, in localize.js, it looks like en_gb is hard coded:

async function loadKodiPO() {
    const response = await (0, node_fetch_1.default)('https://raw.githubusercontent.com/xbmc/xbmc/master/addons/resource.language.en_gb/resources/strings.po');

could this have anything do with it? I see 3 instances of it throughout the file... just curious. This was a new install on my laptop and it was working the same way as my office machine.


RE: Kodi skin localize VS Code extension - roidy - 2024-08-06

Your video at 40 seconds the column that says "Default" that will never change it just tells you what the default settings are for the extension, not what you have set them to.

"const response = await (0, node_fetch_1.default)('https://raw.githubusercontent.com/xbmc/xbmc/master/addons/resource.language.en_gb/resources/strings.po');"

That line just load the Kodi skin strings and has nothing to do with your own skin strings.

Please try uninstalling the extension and reinstalling, if that doesn't work I'll investigate further over the weekend.


RE: Kodi skin localize VS Code extension - roidy - 2024-08-06

I've tested again using a couple of other skins and it works fine. Could you zip up your Madnox skin and send me a copy so I can do some further testing. Thanks.


RE: Kodi skin localize VS Code extension - kittmaster - 2024-08-06

(2024-08-06, 18:01)roidy Wrote: I've tested again using a couple of other skins and it works fine. Could you zip up your Madnox skin and send me a copy so I can do some further testing. Thanks.

Sure, give me a few min....


RE: Kodi skin localize VS Code extension - kittmaster - 2024-08-06

Here is a snapshot of the skin:

Link Removed: Kittmaster