Reply to thread

Hey,

i have 2 small questions.


Question 1:

I added AtmoLight to the config/settings menu in MP2 a while ago, but what always bugged me was that the menu items are sorted alphabetically. The entries themselfs are sorted in the way i added them into the plugin.xml but not the menu items. And it makes it way harder to navigate in my opinion.

A screenshot of how it looks like:


[ATTACH=full]156929[/ATTACH]


However i would like it to be sorted like this:

General Settings

AtmoWin

Hyperion

Content Effects

Remote Buttons

Advanced Settings.


plugin.xml section: https://github.com/ambilight-4-mediaportal/AtmoLight/blob/DEV_rework_core/AtmoLight.MediaPortal2/plugin.xml#L38-L79


Is it possible to change the order? If so how? If not, any plans to add the possiblity (pretty please)?



Question 2:

Is it possible to get the strings from the language files within the plugin, so i can work with them?


I have this string in the file:

[code]<string name="AtmoLight.AtmoWinConnectionLost">Connection to [Target] lost!</string>[/code]


And i want to notify the user. However i would like to replace [Target] with something else within the plugin.

Atm im doing this:


[code]      ServiceRegistration.Get<INotificationService>().EnqueueNotification(NotificationType.Error, "[AtmoLight.Name]", "[AtmoLight.AtmoWinConnectionLost]", true);

[/code]


Which of course tells me that connection to "[Target]" got lost and not to e.g. AtmoWin.

Any method around that returns the string?

E.g.

GetStringFromLanguage("[AtmoLight.AtmoWinConnectionLost]") returns "Connection to [Target] lost!"


Edit: As soon as i posted this and went to the kitchen to make something to eat i of course knew how i get the answer to question 2 myself... :p


For everbody else curious:

[code]MediaPortal.Common.Localization.LocalizationHelper.Translate("[AtmoLight.AtmoWinConnectionLost]")[/code]


Thanks!


Top Bottom