• 1
  • 2
  • 3
  • 4(current)
  • 5
  • 6
  • 7
Kodi skin localize VS Code extension
#46
Thanks, I've got the download if you now want to remove the link (now sure if you want it out in the wild yet, I should of asked you to PM it to me). I'll do some testing over the next couple of days.
Reply
#47
Ok, I think I see the issue and it's something I noted way back in post #4.

The wiki says skins are only supposed to use the 31000-31999 range.

https://kodi.wiki/view/Language_support#...gs.po_file
Code:
These IDs are reserved by Kodi:
strings 30000 thru 30999 reserved for plugins and plugin settings
strings 31000 thru 31999 reserved for skins
strings 32000 thru 32999 reserved for scripts
strings 33000 thru 33999 reserved for common strings used in add-ons

All the strings in your skin that are not showing up are in the 32000 range which should be reserved for scripts.

I'll post a new version in the next couple of days that look through the entire range 30000-33999.
Reply
#48
@kittmaster Please test this version:- https://github.com/roidy/kodi-localize/r...0.2.1.vsix
Reply
#49
(2024-08-06, 19:47)roidy Wrote: Ok, I think I see the issue and it's something I noted way back in post #4.

The wiki says skins are only supposed to use the 31000-31999 range.

https://kodi.wiki/view/Language_support#...gs.po_file
Code:
These IDs are reserved by Kodi:
strings 30000 thru 30999 reserved for plugins and plugin settings
strings 31000 thru 31999 reserved for skins
strings 32000 thru 32999 reserved for scripts
strings 33000 thru 33999 reserved for common strings used in add-ons

All the strings in your skin that are not showing up are in the 32000 range which should be reserved for scripts.

I'll post a new version in the next couple of days that look through the entire range 30000-33999.

ooohhh. Yeah, with all that's going on, didn't even think to look at ranges... I am not passing the buck, I may have added them and not realized the implication of doing so. I see the new link, I'll try it out. Thanks for having a look!
Kodi: Nexus v20.5 | Skin Dev: Madnox Omega/Nexus: v20.01.02 | Madnox ForumRoot | Madnox Repov1.0.09 | Mr. V'sSource | Kodi Texture Tool (Takeover): v3.0.1 | Batch Texture Resize (Irfanview): Tutorial
Working On
: Replacing Embruary >> TMDB Helper || Start: 6/3/2024 End: God knows || Status Complete: Movies: 80% TV Shows: 40% Music: 20%
Reply
#50
Installed no issue, restarted VSCODE, please verify on your end:

Line# 294 OK
Line# 300 OK
Line# 306 Not OK $Localize 33054 but within range

First 2 did not work prior, after install, popped up ok, 3, not ok.

Also of note, but not related to this, same exact file:

Line# 241 <label>$VAR[EmbuaryInfoVideoContainerLabel, ]</label>, right click, go to definition > Not found. But line 236, similar but not the same <texture>$VAR[EmbuaryInfoVideoContainerIcon]</texture>, right click, go to definition, jumps to definition. Even if I just highlight EmbuaryInfoVideoContainerLabel and try, it still fails to go to def, since it is a $var, I thought it would work, is there something I am doing wrong? Do I need to select or not select in that particular instance? Just curious since it works great everywhere else.
Kodi: Nexus v20.5 | Skin Dev: Madnox Omega/Nexus: v20.01.02 | Madnox ForumRoot | Madnox Repov1.0.09 | Mr. V'sSource | Kodi Texture Tool (Takeover): v3.0.1 | Batch Texture Resize (Irfanview): Tutorial
Working On
: Replacing Embruary >> TMDB Helper || Start: 6/3/2024 End: God knows || Status Complete: Movies: 80% TV Shows: 40% Music: 20%
Reply
#51
Quote:Line# 306 Not OK $Localize 33054 but within range

But 33054 isn't in your strings.po file so it won't show up. I'm guessing 33054 belongs to a script or plugin but the extension would have no way of knowing which. It can only show items that are in your skins po file or Kodi's default po file.
 
Quote:Line# 241 <label>$VAR[EmbuaryInfoVideoContainerLabel, ]</label>, right click, go to definition > Not found.

This new version should fix this, please test:- https://github.com/roidy/kodi-localize/r...0.2.1.vsix

I haven't updated the version number so you may need to uninstall the old extension before installing the new one. I'll bump the version number and post a proper release once you confirm it's working, thanks.
Reply
#52
(2024-08-06, 21:23)roidy Wrote:
Quote:Line# 306 Not OK $Localize 33054 but within range

But 33054 isn't in your strings.po file so it won't show up. I'm guessing 33054 belongs to a script or plugin but the extension would have no way of knowing which. It can only show items that are in your skins po file or Kodi's default po file.
 
Quote:Line# 241 <label>$VAR[EmbuaryInfoVideoContainerLabel, ]</label>, right click, go to definition > Not found.

This new version should fix this, please test:- https://github.com/roidy/kodi-localize/r...0.2.1.vsix

I haven't updated the version number so you may need to uninstall the old extension before installing the new one. I'll bump the version number and post a proper release once you confirm it's working, thanks.
OMG... I'm an idiot... with so many "not working"... didn't dawn on me that I missed adding some of the necessary strings....durrrrrr. Nice catch!

Goto Def is working now... sweet!! Thx. What a great addon.
Kodi: Nexus v20.5 | Skin Dev: Madnox Omega/Nexus: v20.01.02 | Madnox ForumRoot | Madnox Repov1.0.09 | Mr. V'sSource | Kodi Texture Tool (Takeover): v3.0.1 | Batch Texture Resize (Irfanview): Tutorial
Working On
: Replacing Embruary >> TMDB Helper || Start: 6/3/2024 End: God knows || Status Complete: Movies: 80% TV Shows: 40% Music: 20%
Reply
#53
Question: Is there any merit to have it follow the font definition to the .xml file the font definitions live?

<font>Font36_Reg_11</font>

I've got a ton of different font defs and it would be a nice to have if it could follow it.
Kodi: Nexus v20.5 | Skin Dev: Madnox Omega/Nexus: v20.01.02 | Madnox ForumRoot | Madnox Repov1.0.09 | Mr. V'sSource | Kodi Texture Tool (Takeover): v3.0.1 | Batch Texture Resize (Irfanview): Tutorial
Working On
: Replacing Embruary >> TMDB Helper || Start: 6/3/2024 End: God knows || Status Complete: Movies: 80% TV Shows: 40% Music: 20%
Reply
#54
I was just thinking the same, I know fonts don't tend to change as often as variables or expressions but I think it would be useful to have. I'll add it over the weekend.
Reply
#55
(2024-08-08, 18:24)roidy Wrote: I was just thinking the same, I know fonts don't tend to change as often as variables or expressions but I think it would be useful to have. I'll add it over the weekend.

Sweet, the new functionality of dropping to the includes and variables has been very helpful. I'm surprised VSCODE doesn't have this built into it as it does for higher languages, like some kind of parser to track as project or something like that... but whatever, this addons makes life so much easier.
Kodi: Nexus v20.5 | Skin Dev: Madnox Omega/Nexus: v20.01.02 | Madnox ForumRoot | Madnox Repov1.0.09 | Mr. V'sSource | Kodi Texture Tool (Takeover): v3.0.1 | Batch Texture Resize (Irfanview): Tutorial
Working On
: Replacing Embruary >> TMDB Helper || Start: 6/3/2024 End: God knows || Status Complete: Movies: 80% TV Shows: 40% Music: 20%
Reply
#56
Something I noticed using the extension, I verified it throughout, I think there is some type of default showing up that is invalid. I keep seeing "music" everywhere, the string is always the same and it isn't localized, so I'm unclear as to why it keeps pointing to music when the label should be "empty". I've include 3 different screenshots which you could find the same in my code snapshot you have:

Image

Image

Image


On another note: Not sure how you handle error checking, but Mike S and I just ran into this where he was helping solve the TMDB foundation. What occurred was he delivered some code that got merged and what I found by accident when I was using the VSCODE search, I happened across my "plot" variable VideoInfoPlotVar and it happened to be defined twice in the same file about 700 lines apart. While the 2nd wasn't causing an issue, clearly there shouldn't be two of the same exact named variable anywhere in the code especially the same file. So that brings me, does you plugin look for that or does it know if there may be two of the same variable and if so, what does it do if two or more exists???

Clearly most wouldn't make this mistake, but collabs can lead to this which clearly it has already. Anyway, just figured I'd bring up an "edge" case if you haven't thought of it already.
Kodi: Nexus v20.5 | Skin Dev: Madnox Omega/Nexus: v20.01.02 | Madnox ForumRoot | Madnox Repov1.0.09 | Mr. V'sSource | Kodi Texture Tool (Takeover): v3.0.1 | Batch Texture Resize (Irfanview): Tutorial
Working On
: Replacing Embruary >> TMDB Helper || Start: 6/3/2024 End: God knows || Status Complete: Movies: 80% TV Shows: 40% Music: 20%
Reply
#57
(2024-08-09, 01:03)kittmaster Wrote: Something I noticed using the extension, I verified it throughout, I think there is some type of default showing up that is invalid. I keep seeing "music" everywhere, the string is always the same and it isn't localized, so I'm unclear as to why it keeps pointing to music when the label should be "empty".

Yep, it's a false positive, the decorator is really simple and just looks for numbers, so it sees the number 2 at the end of ListItem.Label2 and thinks the 2 is a Kodi string, which if you look through the default Kodi Strings.po is the value for "Music".

The entire decorator patten matching code needs to be rewritten as it currently returns a lot of false positives.

Quote:On another note: Not sure how you handle error checking, but Mike S and I just ran into this where he was helping solve the TMDB foundation. What occurred was he delivered some code that got merged and what I found by accident when I was using the VSCODE search, I happened across my "plot" variable VideoInfoPlotVar and it happened to be defined twice in the same file about 700 lines apart. While the 2nd wasn't causing an issue, clearly there shouldn't be two of the same exact named variable anywhere in the code especially the same file. So that brings me, does you plugin look for that or does it know if there may be two of the same variable and if so, what does it do if two or more existsHuh

The declaration look up just scans and stops at the first instance it finds, mainly for speed (no point scanning any further once found as a second declaration shouldn't exist). VSCode's declaration handler only allows you to "goto" a single declaration, however I suppose I could continue scanning the files after the first declaration is found and if more are found then pop up an error.

I'm thinking about rewriting the whole extension as it was only really meant to do localizations and everything else just got slapped on top of the code and it's ended up a bit of a mess.
Reply
#58
The whole thing kicks ass the way it is, but you would know best for it, just wanted to bring up the points, clearly point 1 is no big deal, more annoyance than anything else.... 

#2 can be more sinister because, well, you know, could be race conflicts, sometimes it pulls this variable, sometimes that variable... or even worse, you as a user are editing the wrong one it is using and you see no change and down the rabbit hold you go (line numbering...it matters, but who's watching?!) ... LOL.

Anyway, just wanted to provide some feedback.. Smile
Kodi: Nexus v20.5 | Skin Dev: Madnox Omega/Nexus: v20.01.02 | Madnox ForumRoot | Madnox Repov1.0.09 | Mr. V'sSource | Kodi Texture Tool (Takeover): v3.0.1 | Batch Texture Resize (Irfanview): Tutorial
Working On
: Replacing Embruary >> TMDB Helper || Start: 6/3/2024 End: God knows || Status Complete: Movies: 80% TV Shows: 40% Music: 20%
Reply
#59
v0.2.2

Add font definition + code cleanup
Reply
#60
I'm out and about, will have a look when I get home. Thanks for the efforts and the updates!

Another quick question, you set the range for the strings based on what Kodi "says" etc... any merit in allow the user to put in their own values for like issues you found with mine?

It could also have a set to defaults as needed?

Just a thought.
Kodi: Nexus v20.5 | Skin Dev: Madnox Omega/Nexus: v20.01.02 | Madnox ForumRoot | Madnox Repov1.0.09 | Mr. V'sSource | Kodi Texture Tool (Takeover): v3.0.1 | Batch Texture Resize (Irfanview): Tutorial
Working On
: Replacing Embruary >> TMDB Helper || Start: 6/3/2024 End: God knows || Status Complete: Movies: 80% TV Shows: 40% Music: 20%
Reply
  • 1
  • 2
  • 3
  • 4(current)
  • 5
  • 6
  • 7

Logout Mark Read Team Forum Stats Members Help
Kodi skin localize VS Code extension0