But Visual Studio complains that umbraco.ui is obsolete and to "use ILocalizedTextService instead which is on the ApplicationContext.Services.TextService". I tried a few things with that class but I couldn't figure it out. Can someone lend me their expertise? I'm a little unsure what VS wants me to do, and how the refactored code should look.
So what this is doing is it looks in the translation file for the area actions for the key refreshNode (because ActionRefresh.Instance.Alias returns refreshNode):
umbraco.ui is obsolete
Hi,
I'm trying to use some code from a blog that adds the refresh action to a menu in a custom section like this:
But Visual Studio complains that umbraco.ui is obsolete and to "use ILocalizedTextService instead which is on the ApplicationContext.Services.TextService". I tried a few things with that class but I couldn't figure it out. Can someone lend me their expertise? I'm a little unsure what VS wants me to do, and how the refactored code should look.
Here is the blog I got the code from for context: http://www.nibble.be/?p=440
So what this is doing is it looks in the translation file for the area
actions
for the keyrefreshNode
(becauseActionRefresh.Instance.Alias
returnsrefreshNode
):This can be done using the testService as well:
You may need to add a using:
using Umbraco.Core.Services;
Of course it's better to keep using the constant value:
Hope that helps!
Thanks for the quick reply! Perfect solution! :)
is working on a reply...