Kodi Community Forum
Overriding context menu strings - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: OS independent / Other (https://forum.kodi.tv/forumdisplay.php?fid=228)
+---- Thread: Overriding context menu strings (/showthread.php?tid=377930)



Overriding context menu strings - Caithness - 2024-06-17

Is there a guide somewhere that will tell me how to override the strings in the context menu? If not can someone explain how?

Basically the way I'm using Favourites is to maintain a list of series (eg The Saint, Homeland) that we're currently watching and I'd like to replace the references to "Favourites" with "Watching". Changing the main menu was a doddle but I've tried copying the entry from the system strings.po to the skin one, and altering the system strings.po (which I'd prefer not to do) with zero success "Add to favourites" stays stubbornly as just that. 


RE: Overriding context menu strings - Hitcher - 2024-06-17

Well it's definitely coming from the system string file.

https://raw.githubusercontent.com/xbmc/xbmc/master/addons/resource.language.en_gb/resources/strings.po


RE: Overriding context menu strings - Caithness - 2024-06-18

OK, its in there but how do I get it to use a different string?

I've edited msgstr in C:\Program Files\Kodi\addons\resource.language.en_gb\resources\strings.po, I also copied the two entries in the system strings.po and placed in AppData\Roaming\Kodi\addons\skin.experimental\language\resource.language.en_gb\strings.po both with changing msgctxt to a new value and leaving it alone.

I'm obviously doing something wrong.


RE: Overriding context menu strings - Karellen - 2024-06-18

Which skin are you using?


RE: Overriding context menu strings - Caithness - 2024-06-18

Estuary with a few small mods - End Time added back, larger fonts for the blurb, film duration not file size, TV menu items reordered to put Recordings first


RE: Overriding context menu strings - Karellen - 2024-06-18

(2024-06-18, 12:08)Caithness Wrote: Estuary
Change the label tag to <label>Watching</label>
https://github.com/xbmc/xbmc/blob/master/addons/skin.estuary/xml/Home.xml#L1031


RE: Overriding context menu strings - pkscout - 2024-06-18

If you haven't yet, try restarting Kodi.  The language strings are all loaded at startup, so if you change things while Kodi is running, you won't see those changes until you restart.


RE: Overriding context menu strings - Caithness - 2024-06-18

Thanks for the suggestion but that's home.xml which, unless I'm missing something, does not cover the strings used in the context menu


RE: Overriding context menu strings - Caithness - 2024-06-18

Restarted and rebooted (just in case). Also done a contents search of the SSD to see in "Add to favourites" is any other file - and no.


RE: Overriding context menu strings - Fuchs2468 - 2024-06-18

(2024-06-18, 08:56)Caithness Wrote: and placed in AppData\Roaming\Kodi\addons\skin.experimental\language\resource.language.en_gb\strings.po

This is definitely the wrong place.

The edited resource.language.en_gb needs to go there.
"AppData\Roaming\Kodi\addons\language\resource.language.en_gb\strings.po"


RE: Overriding context menu strings - Caithness - 2024-06-19

Tried that folder with different versions of string.po with no success


RE: Overriding context menu strings - Hitcher - 2024-06-19

Before:
Image

Open Kodi\addons\language\resource.language.en_gb\strings.po
Image

Edit:
Image

After restart:
Image


RE: Overriding context menu strings - Caithness - 2024-06-19

Thanks - that works but 2 points:

I have to alter the version in Program Files which means it will get overwritten on update - or so I believe

and from the wiki

Take note, in Kodi, these are used as follows:

msgctxt "#label_id"
msgid label_text
msgstr translation

label_text defines the English text for the label.
translation is empty for "en_GB" labels, and the translation for other languages with msgid retaining the English text.
The important thing is that you cannot refer to the label with msgid in the settings.py file, you need to use the label_id which must be encoded in msgctxt as above.


which from my reading and understanding of it (obviously wrong) meant I should change the translation