Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
Overriding context menu strings
#1
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. 
Reply
#2
Well it's definitely coming from the system string file.

https://raw.githubusercontent.com/xbmc/x...strings.po
Reply
#3
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.
Reply
#4
Which skin are you using?
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#5
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
Reply
#6
(2024-06-18, 12:08)Caithness Wrote: Estuary
Change the label tag to <label>Watching</label>
https://github.com/xbmc/xbmc/blob/master....xml#L1031
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#7
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.
Reply
#8
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
Reply
#9
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.
Reply
#10
(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"
Reply
#11
Tried that folder with different versions of string.po with no success
Reply
#12
Before:
Image

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

Edit:
Image

After restart:
Image
Reply
#13
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
Reply

Logout Mark Read Team Forum Stats Members Help
Overriding context menu strings0