settings.xml help=""
#1
Is there a way to have settings.xml in Matrix show raw help text which is not yet in strings.po?  It is a nice feature but during development it takes two steps to getting it looking right.

Martin
Reply
#2
Right now there isn't. To convert old-style add-on settings (which support this) to core-style add-on settings there's a workaround for this in CAddonSettings but it's not present for core-style settings. I agree that it can be a bit cumbersome during development but in the end all of your label and help strings must be translatable. If we would allow this "shortcut" it would increase the chance of someone forgetting to replace those strings with translatable labels / IDs.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#3
Thanks. Is there any style guide  strings.po?   To help with the  conversion what I would like to do is keep me current settings together with the help by adding 10000 to the current label id and put a notice at the end of the file that.   This will mean the ID's aren't ordered and are not sequential.
Code:
msgctxt "#30003"
msgid "Enable TimeShift with Live TV"
msgstr ""

msgctxt "#40003"
msgid "Help for Timeshift"
msgstr ""

msgctxt "#30004"
msgid "Download TV Guide Artwork"
msgstr ""

msgctxt "#40004"
msgid "Warning will currently cause slowdowns in Matrix"
msgstr ""

...
# Note message 40000-49999 are reserved for help

Martin
Reply
#4
I'm no expert on strings.po so I have no idea if the order matters but normally msgctxt can be anything and usually not a number I don't think that order matters. In this case it just makes it easier to avoid using the name number / ID twice.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#5
Ok thanks I thought it had to be a number based on this comment https://github.com/xbmc/xbmc/blob/master....po#L16353  I will see what happens if I just append an H and insert them in order with the existing values

Martin
Reply
#6
AFAIK, the No. in msgctxt is the string ID used by Kodi to localize the language with either $LOCALIZE[string ID] in skins, or g_localizeStrings.Get(string ID) in core.
Learning Linux the hard way !!
Reply
#7
I just tried with the H and that didn't work since it gets scanned to the same number.   I will keep them out of order but instead of adding 10000 I will add 500.  I am at 172  now, but that should be ok.

I also noted that if you use a number outside the range 33000 thru 33999 the addon will use the common value

Martin
Reply
#8
Kodi requires it to be a number but in general the gettext PO format doesn't require it to be a number. That's why I reasoned that it doesn't have to be in order.

And yes there's a limited range of available IDs for add-ons.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#9
This change is pretty far reaching, it is not just help it is every value in the setting.   There does seem to be an issue in the logic since using this example https://kodi.wiki/view/Add-on_settings_c...2select.22  since there seem to be now no way to give a pick list of numbers without having the numbers in strings.po

Martin
Reply
#10
That example could be covered by using
xml:

<constraints>
  <min>11</min>
  <step>1</step>
  <max>14</max>
</constraints>
but yes the <options> tag only supports translatable labels.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#11
On a hunch I removed the label and the integer values show up so that solves this issue.

Martin
Reply
#12
If I have the same id in multiple categories or in the same category I end up with user settings.xml with duplicate id's stored.  Is this is the expected behavior? 

If so is there any way to update the same id with different controls with different options (in my case a PVR backend with multiple backends).

Martin
Reply

Logout Mark Read Team Forum Stats Members Help
settings.xml help=""0