Custom resource class, Filtering

Posted by Community Admin on 03-Aug-2018 09:15

Custom resource class, Filtering

All Replies

Posted by Community Admin on 24-Mar-2011 00:00

Hi,

I created a custom resource class as described here and here.
Everything worked fine but I am not able to filter in "Interface Labels & Messages" page.
My custom type is displayed in the "Filter by type" list on the right, but when i click on the type I allways get the whole list.
Perhaps I forgot something?

Kind regards
Udo

Posted by Community Admin on 30-Mar-2011 00:00

Hello Le,

There is a known issue about custom resources. It is logged as a bug, but currently we have not schedule the time frame for the fix.

Kind regards,
Ivan Dimitrov
the Telerik team

Posted by Community Admin on 11-Oct-2011 00:00

Is it possible to create an item in PITS for this, then we can vote for it. It is a very 'annoying' bug. I know have to give my end users a list with the names of the resources that can be translated. Then they have to search for them and even then, the search sometimes failes.

Regards,
Daniel

Posted by Community Admin on 12-Oct-2011 00:00

Hi Daniel,

Here is the PITS item for you. The bug is with status reopened and we will try to fix it for our upcoming releases.

Best wishes,
Victor Velev
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 13-Oct-2011 00:00

What would be a workaround for this? I need some labels and literals to be translated by the end user.
Is it possible to also add the different languages inside the custom resource class, if there is no other solution?

Regards,
Daniel

Posted by Community Admin on 13-Oct-2011 00:00

What exactly is the bug?
I know have created two resources inside my class:

[ResourceEntry("Movies_Grid_Title", Value = "Movies", Description = "", LastModified = "2010/12/01")]
        public string Movies_Grid_Title
            get
                return this["Movies_Grid_Title"];
            
        
 
and

[ResourceEntry("Downloads_Grid_Title", Value = "Downloads", Description="", LastModified = "2010/12/01")]
       public string Downloads_Grid_Title
           get
               return this["Downloads_Grid_Title"];
           
       

If I do a search inside the "Interface Labels & Messages" page, it only finds the first one.
I register the custom resource class after the bootstrapper has initialized. Should this be somewhere else? It looks like newly added resources are not loaded.

Thanks,
Daniel

Posted by Community Admin on 18-Oct-2011 00:00

Hello Daniel,

I created a test class with resources CustomModuleResources  and registered it at Global.asax:

protected void Application_Start(object sender, EventArgs e)
       
            Bootstrapper.Initialized += new EventHandler<Telerik.Sitefinity.Data.ExecutedEventArgs>(this.AfterInit);
       

        private void AfterInit(object sender, ExecutedEventArgs args)
       
            Res.RegisterResource<CustomModuleResources>();
         

I was able to view and add additional resources via "Interface Labels & Messages" page.
interface.

Let me know if you still experience problems with resources! Thanks!

All the best,

Milena
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 18-Oct-2011 00:00

Hi Milena,

Thanks for your reply.
Yes, I did exactly how you described this. This went well the first time. After that, it is a total mess. Never getting the resources to show up. Only when the application has a cold start.

What I have to do now, to make translation work:

1. Create the custom class.
2. Initialize it like your example.
3. Manually add the Resource keys into a file named 'CustomTranslations.resx' inside my App_Data/Sitefinity/GlobalResources folder.

After these steps, I can search them inside "Interface Labels & Messages". I can adjust them and then it works.
But when I publish a new version of my website, I have to again translate all labels. So it seems the translations are not held inside the database (what I was assuming), but in other resource files, but they don't exist?

So, no idea what is the problem here.

Regards,
Daniel

Posted by Community Admin on 20-Oct-2011 00:00

Hi Daniel,

Your problem is the same as in this thread  :
http://www.sitefinity.com/devnet/forums/sitefinity-4-x/general-discussions/sessions-amp-external-pages.aspx#1440244

There is a pits issue which is logged for this bug.  

What i can suggest is to try to merge the resources. For example if you delete the resx file you will be able to save them again with all the new resource entries and then you can try to merge the resx files. 

Best wishes,
Teodor
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed