[fixed] Hardcoded Labels in Music Now Playing/Overlays (1 Viewer)

mortstar

MP Donator
  • Premium Supporter
  • January 30, 2008
    415
    41
    Home Country
    England England
    MediaPortal Version: 1.1 RC1
    MediaPortal Skin: Maya
    Windows Version: Windows 7 x64
    CPU Type: Intel C2D E8200 2.66GHz
    HDD: WD 500Gb + WD 640Gb
    Memory: 2x 2Gb Geil Black Dragon
    Motherboard: Gigabyte GA-G33M-DS2R
    Video Card: Sapphire Radeon HD 5670 1GB
    Video Card Driver: Catalyst 10.2
    1. TV Card: BlackGold 6 in 1 BGT3540
    1. TV Card Type: Dual DVB-S & Dual DVB-T
    1. TV Card Driver: 6.0.0.49 (27/01/09)
    2. TV Card: Hauppauge Nova HD S2
    2. TV Card Type: Single DVB-S2
    MPEG2 Video Codec: Cyberlink PDVD9
    MPEG2 Audio Codec: ffdshow
    h.264 Video Codec: Cyberlink PDVD9
    Satelite/CableTV Provider: UK Freesat & UK Freeview
    HTPC Case: Antec Fusion v2 Silver
    Cooling: Scythe Mini Ninja
    Remote: MCE Remote via iMON OEM receiver
    TV: Panasonic TX-32LXD85
    TV - HTPC Connection: HDMI -> HDMI

    A Post relating to this issue was made back in November 2006(!). https://forum.team-mediaportal.com/...moving-track-year-properties-13287/#post93921

    As in the wiki some values, for example #Play.Current.Year, have hardcoded labels prefixing the value. This is not good for skinning. Can these be removed to only show the value?
     

    Dadeo

    Docs Group Manager
  • Premium Supporter
  • November 26, 2006
    5,340
    3,321
    Himalayas, India
    Home Country
    Canada Canada
    Yes Please!!! This has long been an issue! As Harley pointed out in his recent Blog Interview such hard coded elements are a problem for skinners! Thanks for bringing this up again morstar! It is easy enough for skins to add labels for Track and Year if they wish. Removing these labels will also make the display of scrolling data when media is playing, much better.
     

    chemelli

    Retired Team Member
  • Premium Supporter
  • September 28, 2006
    6,159
    2,264
    49
    Milano, Italy
    Home Country
    Italy Italy
    You would like to remove those even if they are already localized ?

    Code:
    string strText = GUILocalizeStrings.Get(437); //	"Duration"
            string strDuration = String.Format("{0} {1}", strText, Util.Utils.SecondsToHMSString(tag.Duration));

    Code:
    strText = GUILocalizeStrings.Get(435); //	"Track"
            string strTrack = String.Format("{0} {1}", strText, tag.Track);

    Code:
    strText = GUILocalizeStrings.Get(436); //	"Year"
            string strYear = String.Format("{0} {1}", strText, tag.Year);

    Simone
     

    Dadeo

    Docs Group Manager
  • Premium Supporter
  • November 26, 2006
    5,340
    3,321
    Himalayas, India
    Home Country
    Canada Canada
    @ Simone - I do not wish to remove them from the strings files where I believe they are already localized (though I did not check ALL the language string files ;)). Thus, they can still be added as localized labels in skin xml files. What I wish is that the properties #Play.Current.Track, #Play.Current.Year and #Play.Current.Duration do not hard code the labels as part of the output. Is that easy to change? It gives the skinner the option when and where to display these labels and since they are localized in the string files, they will still be translated right?
     

    chemelli

    Retired Team Member
  • Premium Supporter
  • September 28, 2006
    6,159
    2,264
    49
    Milano, Italy
    Home Country
    Italy Italy
    yes to both: it's easy and they will be still localized.

    Only drawback is that all skins need an update after...

    Simone
     
    J

    joostzilla

    Guest
    yes to both: it's easy and they will be still localized.

    Only drawback is that all skins need an update after...

    Simone

    I guess skin developers do not mind updating their skins. Especially the devs of popular and upcoming skins :D
     

    Dadeo

    Docs Group Manager
  • Premium Supporter
  • November 26, 2006
    5,340
    3,321
    Himalayas, India
    Home Country
    Canada Canada
    Chemelli has kindly offered to remove other hardcoded labels as well :D However, it is much easier for him to do this all at once.

    The only other case I could remember is the hard coded output of "Objects" with #itemcount. Personally I would love to see this removed as well as since then I can output different labels for #itemcount in different screens. You can still use #itemcount in a common window with a variable define code in each window for the text/label you would wish to display.

    Are there any other cases anyone is aware of? Let's take advantage of Chemilli's gracious offer! :D
     

    ltfearme

    Community Plugin Dev
  • Premium Supporter
  • June 10, 2007
    6,751
    7,196
    Sydney
    Home Country
    Australia Australia
    I agree that hard-coded labels should be removed as it should be up the skinner to present them. What would really help facilitate this is have the ability to join a localized string with a property or multiple localized strings e.g.

    <label>string.join(436, #Play.Current.Year)</label>

    or similar.

    Currently we would need to create two label controls and space them so the strings dont overlap...but you also need to consider scaling as well for different resolutions.
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    I agree that hard-coded labels should be removed as it should be up the skinner to present them. What would really help facilitate this is have the ability to join a localized string with a property or multiple localized strings e.g.

    <label>string.join(436, #Play.Current.Year)</label>

    or similar.

    Currently we would need to create two label controls and space them so the strings dont overlap...but you also need to consider scaling as well for different resolutions.

    Definitely a new feature -> not for 1.1.0.
     

    Dadeo

    Docs Group Manager
  • Premium Supporter
  • November 26, 2006
    5,340
    3,321
    Himalayas, India
    Home Country
    Canada Canada
    @ Damien - I do agree it would be nice to have the ability to use localized strings in combination with properties or text. I know many places where this would be helpful. And you have probably explained why those tags are hard coded. It was likely a much 'easier solution'. However, if we wish this, then I fear we will be stuck with those hard coded labels for a while longer, perhaps until MP2.

    So that is not the issue. The issue at present is if we wish to remove the hardcoded text or not. Hopefully your great idea can be added later. But I would like to be clear to skinners, that if we remove them now, they will have to adjust their skins.

    However, there are already many other places where we must all leave space for translations of labels. This is nothing new or different than what we do in many xmls. Take for example TVSeries Episode List in StreamedMP skin :p You add those nice blue labels for Aired, Rating, Writer, Director and must leave space for localization. How would it be any different if you choose to display Track, Year or Duration?
     

    Users who are viewing this thread

    Top Bottom