1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / Custom resource class, Filtering

Custom resource class, Filtering

9 posts, 0 answered
  1. Le Corbu
    Le Corbu avatar
    16 posts
    Registered:
    27 Apr 2006
    24 Mar 2011
    Link to this post
    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

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    30 Mar 2011
    Link to this post
    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
  3. Daniel Plomp
    Daniel Plomp avatar
    952 posts
    Registered:
    18 Feb 2004
    11 Oct 2011
    Link to this post
    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
  4. Victor Velev
    Victor Velev avatar
    1345 posts
    Registered:
    06 Jul 2015
    12 Oct 2011
    Link to this post
    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
  5. Daniel Plomp
    Daniel Plomp avatar
    952 posts
    Registered:
    18 Feb 2004
    13 Oct 2011
    Link to this post
    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
  6. Daniel Plomp
    Daniel Plomp avatar
    952 posts
    Registered:
    18 Feb 2004
    13 Oct 2011
    Link to this post
    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
  7. Milena
    Milena avatar
    75 posts
    Registered:
    05 Apr 2017
    18 Oct 2011
    Link to this post
    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
  8. Daniel Plomp
    Daniel Plomp avatar
    952 posts
    Registered:
    18 Feb 2004
    18 Oct 2011
    Link to this post
    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
  9. Teodor
    Teodor avatar
    52 posts
    Registered:
    24 Sep 2012
    20 Oct 2011
    Link to this post
    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
9 posts, 0 answered