• 1
  • 3
  • 4
  • 5
  • 6
  • 7(current)
Kodi skin localize VS Code extension
#91
Quote:
xml:

msgctxt "#31395"
msgid "Resolution Media Flag Color"
msgstr ""

(for the sake of argument, assume in Kodi's main files, even though it is my personal file) > The string does not show up, however, when I switch it to:

xml:

msgctxt "#31395"
msgid "Resolution Media Flag Color"
msgstr "Resolution Media Flag Color"

Then the string shows up. When I right click to see what its definition should be, it should just take me there, regardless of what file it is no?

This occurs often from what I've seen where Kodi's main language has the string in msgid, but not msgstr and if not, then I add it to my local file for operation.

I'm not sure I understand, are you saying the definition only shows up if both msgid and msgstr have values? Because the only value I return is msgid, so it shouldn't matter if msgstr is empty.

Could you give an example of a Kodi string that fails please, so I can test.

Quote:Is it possible for it to navigate to Kodi's definition? And if it is not a normal operation most would want, make it a settings option to enable it for those that may want it?

The problem is the extension has no possible way to know where the Kodi po files are located. In order to decorate string from the Kodi po files I download a copy from the main Kodi github page to match against, however this isn't a VSCode document and thus can't be used to match definitions against.
Reply
#92
For the first question about needing both values, it could be anywhere in my skin code where I would right click on some $localize value. One example was when I was adding options to the color picker when it needed updating. I would follow the kodi .po structure, leaving the 2nd value blank, when I was in the admin panel, the "new work" was in place, but the value was not displayed, only when I added the "2nd" value, then refreshed, the value then showed up in the admin thing I was fixing.

I see this lot, one 1 value populated, which I recall is a localization thing, so when I use your extension on some rando $localize string, most times when it doesn't work, I find the 2nd value is not there. Example: The string "red" has some localize value in Kodi's .po file, but when I "use" that value, red doesn't show up, so I have to create my own version of that value in my local files, make both the same text, and then it automagically works. Not entirely sure that is how it is supposed to work, but that has been the case as recently as 48 hours ago when I was working on media flag color changing options... I just figured your extension should take to you where ever, what ever, $localize file it is being pulled from. Mostly likely nothing wrong with your extension, more of a user flow experience like when you code in C or C++, if there is a definition, and you say, take me there, it does... regardless of it is editable or not... because you want to know its source location and show you what it is seeing during a compile... but as you mention in your second point, that may not be possible here, yet VSCODE still provides the context of "go to definition" which is very annoying if can't actually do that.

It's not a hill I'm ready to die on for, just some of the things I've run across, either way, your extension is a god send to make things a hell of a lot 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 Embuary >> TMDB Helper || Start: 6/3/2024 End: God knows || Status Complete: Movies: 10% TV Shows: 0% Music: 0%
Reply
  • 1
  • 3
  • 4
  • 5
  • 6
  • 7(current)

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