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

mortstar

MP Donator
  • Premium Supporter
  • January 30, 2008
    415
    41
    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
    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
    46
    Milano, Italy
    Italy Italy
    Country flag
    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
    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
    46
    Milano, Italy
    Italy Italy
    Country flag
    yes to both: it's easy and they will be still localized.

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

    Simone
     

    joostzilla

    Retired Team Member
  • Premium Supporter
  • August 10, 2006
    818
    1,057
    49
    Drunen
    Netherlands Netherlands
    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
    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,700
    7,084
    Sydney
    Australia Australia
    Country flag
    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
    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 (Users: 0, Guests: 1)

    OP Similar threads Forum Replies Date
    azzuro [fixed] 5011: Version label in Splash screen - pos, size from skin MediaPortal 1 61
    S Titan tile label position MediaPortal 1 Talk 3
    B some music videos stutter Watch / Listen Media 0
    horned_reaper [solved] When playing music Fanart does not shuffle Fanart Handler 20
    horned_reaper [solved] When playing music Fanart does not appear immediately after downloading Fanart Handler 272
    horned_reaper [Music] 5012: Start current music track from the beginning Improvement Suggestions 37
    horned_reaper [solved] 5012: Restart current music track General Support 13
    atlantic How to use Spotify inside Mediaportal? Listen Music 18
    horned_reaper [solved] Music playback hangs General Support 58
    globaldonkey Music Database Error Listen Music 1
    joecrow Music on Headphones Listen Music 8
    2BitSculptor MP 1.23.. music stops playing General Support 6
    Sarxas What Music Are You Listening To? OffTopic 0
    Edwardfc [solved] Mp 2.2.1 Configuration Issues - Goes to Sleep while playing Music General 6
    G [fixed] [MP2-786] Party Music Player can only play playlists with less than 1000 items 2.2 Archive 7
    KlausWirn Music crash Bass crash no change to play music Installation, configuration support 2
    BlueMax1916 [confirm] Music: Every 2nd track skipped MediaPortal 2 30
    N Music player help Listen Music 4
    N How to shuffle all my music, and how to sort by album artist General 4
    R MP 2.2 client spielt audio-titel kurz an und springt dann zum nächten Allgemeines Support- und Diskussionsforum 9
    joecrow Music: Fade Out not working 1.20 Pre Release 0
    M Music playback stops after certain files 1.19 0
    Top Bottom