Kodi Community Forum

Full Version: [Solved] Use default string from XBMC core in addon settings
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi.

Is it possible, in addon settings (e.g. settings.xml) to use string ID from XBMC core strings.po.

For example, in settings.xml addon file :

Code:
<setting label="14092" type="lsep"/>
<setting id="logEnabled" type="bool" label="20191" default="false"/>

Because with this code, label are void Sad

I hope it's possible because why create and translate new strings in strings.po from addon when those strings exists in strings.po from XBMC core.

Thanks.
No one can help me Sad ?
Screenshot with no label :

French :

Image

English :

Image

XML :

Code:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<settings>
    <category label="32991">
        <setting id="loop" type="bool" label="32001" default="false"/>
        <setting id="downvolume" label="32002" type="slider" default="0" range="0,1,60" format="%1.f db" />
        <setting id="fadeOut" type="bool" label="32008" default="true"/>
        <setting id="fadeIn" type="bool" label="32013" default="false"/>
        <setting id="shuffle" type="bool" label="32010" default="true"/>
        <setting id="random" type="bool" label="32011" default="false"/>
        <setting id="movielist" type="bool" label="32016" default="false"/>
        <setting id="tvlist" type="bool" label="32017" default="false"/>
    </category>
    <category label="32992">
        <setting id="exact_match" type="bool" label="32009" default="true"/>
        <setting id="multiThemeDownload" type="bool" label="32014" default="false"/>
        <setting id="searchMovieDownload" type="bool" label="32015" default="false"/>
    </category>
    <category label="32993">
        <setting id="smb_share" type="bool" label="32003" default="false"/>
        <setting id="smb_login" enable="eq(-1,true)" type="text" label="32004" default="" />
        <setting id="smb_psw" enable="eq(-2,true)" type="text" option="hidden" label="32005" default="" />
        <setting id="custom_path_enable" type="bool" label="32006" default="false"/>
        <setting id="custom_path" enable="eq(-1,true)" type="folder" source="files" label="32007" default="" />
        <setting label="14092" type="lsep"/>
        <setting id="logEnabled" type="bool" label="20191" default="false"/>
    </category>
    <category label="32012">
        <setting id="mp3" type="text" label="MP3" enable="false" default="true"/>
        <setting id="wma" type="bool" label="WMA" default="true"/>
        <setting id="flac" type="bool" label="FLAC" default="true"/>
        <setting id="m4a" type="bool" label="M4A" default="true"/>
        <setting id="wav" type="bool" label="WAV" default="true"/>
    </category>
</settings>

Strings.po from XBMC Core (C:\Program Files\XBMC-Frodo\language\French\strings.po) :

Code:
msgctxt "#14092"
msgid "Debugging"
msgstr "Debogage"

...

msgctxt "#20191"
msgid "Enable debug logging"
msgstr "Activer le mode debug"
One reason might be that it's useful for add-ons to be self-contained. We can (and probably will) change strings in core at some point, at which time your add-on will be broken, or be displaying something non-sensical.

I'm not sure if we pool strings when translating on Transifex or not - seems like it might be something that is doable?
Yes, you are right.

Using XBMC core label can give some unexpected label if XBMC team change label for a given ID.

It's better that addon use there own labels.

Thanks.