[fixed] - Hardcoded Labels in Music Now Playing/Overlays

Discussion in 'MediaPortal 1.1.0 RC 1 & 2' started by mortstar, March 25, 2010.

  1. mortstar
    • Premium Supporter

    mortstar MP Donator

    Joined:
    January 30, 2008
    Messages:
    415
    Likes Received:
    41
    Ratings:
    +41 / 0
    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?
     
    • Like Like x 1
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. Dadeo
    • Premium Supporter

    Dadeo Docs Group Manager

    Joined:
    November 26, 2006
    Messages:
    5,340
    Likes Received:
    2,802
    Location:
    Himalayas, India
    Ratings:
    +3,053 / 0
    Home Country:
    Canada Canada
    Show System Specs
    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.
     
  4. chemelli
    • Premium Supporter

    chemelli Retired Team Member

    Joined:
    September 28, 2006
    Messages:
    6,159
    Likes Received:
    1,126
    Gender:
    Male
    Occupation:
    Activation Manager - Cloud Services
    Location:
    Trento, Italy
    Ratings:
    +1,127 / 0
    Home Country:
    Italy Italy
    You would like to remove those even if they are already localized ?

    Code (Text):
    1.  
    2. string strText = GUILocalizeStrings.Get(437); //    "Duration"
    3.         string strDuration = String.Format("{0} {1}", strText, Util.Utils.SecondsToHMSString(tag.Duration));
    4.  
    Code (Text):
    1.  
    2. strText = GUILocalizeStrings.Get(435); //   "Track"
    3.         string strTrack = String.Format("{0} {1}", strText, tag.Track);
    4.  
    Code (Text):
    1.  
    2. strText = GUILocalizeStrings.Get(436); //   "Year"
    3.         string strYear = String.Format("{0} {1}", strText, tag.Year);
    4.  
    Simone
     
  5. Dadeo
    • Premium Supporter

    Dadeo Docs Group Manager

    Joined:
    November 26, 2006
    Messages:
    5,340
    Likes Received:
    2,802
    Location:
    Himalayas, India
    Ratings:
    +3,053 / 0
    Home Country:
    Canada Canada
    Show System Specs
    @ 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?
     
  6. chemelli
    • Premium Supporter

    chemelli Retired Team Member

    Joined:
    September 28, 2006
    Messages:
    6,159
    Likes Received:
    1,126
    Gender:
    Male
    Occupation:
    Activation Manager - Cloud Services
    Location:
    Trento, Italy
    Ratings:
    +1,127 / 0
    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
     
  7. joostzilla
    • Premium Supporter

    joostzilla Retired Team Member

    Joined:
    August 10, 2006
    Messages:
    818
    Likes Received:
    955
    Gender:
    Male
    Location:
    Drunen
    Ratings:
    +1,030 / 2
    Home Country:
    Netherlands Netherlands
    I guess skin developers do not mind updating their skins. Especially the devs of popular and upcoming skins :D
     
    • Like Like x 1
  8. Dadeo
    • Premium Supporter

    Dadeo Docs Group Manager

    Joined:
    November 26, 2006
    Messages:
    5,340
    Likes Received:
    2,802
    Location:
    Himalayas, India
    Ratings:
    +3,053 / 0
    Home Country:
    Canada Canada
    Show System Specs
    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
     
  9. ltfearme
    • Premium Supporter

    ltfearme Community Plugin Dev

    Joined:
    June 10, 2007
    Messages:
    6,457
    Likes Received:
    4,241
    Gender:
    Male
    Occupation:
    Software Test Engineer
    Location:
    Sydney
    Ratings:
    +5,385 / 0
    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.
     
    • Like Like x 1
  10. tourettes
    • Premium Supporter

    tourettes Retired Team Member

    Joined:
    January 7, 2005
    Messages:
    17,301
    Likes Received:
    4,595
    Ratings:
    +4,810 / 3
    Definitely a new feature -> not for 1.1.0.
     
  11. Dadeo
    • Premium Supporter

    Dadeo Docs Group Manager

    Joined:
    November 26, 2006
    Messages:
    5,340
    Likes Received:
    2,802
    Location:
    Himalayas, India
    Ratings:
    +3,053 / 0
    Home Country:
    Canada Canada
    Show System Specs
    @ 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?
     
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!