Kodi Community Forum
[Solved] Use default string from XBMC core in addon settings - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Translations and Languages (https://forum.kodi.tv/forumdisplay.php?fid=90)
+--- Thread: [Solved] Use default string from XBMC core in addon settings (/showthread.php?tid=175484)



[Solved] Use default string from XBMC core in addon settings - mikebzh44 - 2013-10-11

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.


RE: Use default string from XBMC core in addon settings - mikebzh44 - 2013-10-15

No one can help me Sad ?


RE: Use default string from XBMC core in addon settings - mikebzh44 - 2013-10-15

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"



RE: Use default string from XBMC core in addon settings - jmarshall - 2013-10-16

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?


RE: Use default string from XBMC core in addon settings - mikebzh44 - 2013-10-16

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.