Contents of Resources.resx

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
1/23/2007 11:39:33 AM
Gravatar
Total Posts 488

Contents of Resources.resx

As I can see, now Resources.resx contain only strings and there are 2 types of them:
1. Strings for the web site that are localizable.
2. Some settings that are not culture specific, but web site specific.

As far as I can see, most of strings of the second type are access keys for web forms buttons.
As these settings are not culture-specific, in my opinion it's not good to store them in the same resource file as it becomes difficult to make a complete translation (needs additional efforts to see if there are some unlocalized strings that really need to be localized).

Possible solutions are:
1. Create Web.config section for access keys (stored in external file not to make Web.config too long).
2. As there is good support for resources in ASP.NET 2.0 (including autogenerated classes), just move access keys to another resource file.

From architecture point of view I prefer the fist variant, but from practice - the second one.
1/23/2007 11:56:38 AM
Gravatar
Total Posts 18439

Re: Contents of Resources.resx

Hi Alexander,

"From architecture point of view I prefer the fist variant, but from practice - the second one."
I like that, reminds me of the saying "In theory there is no difference between theory and practice but in practice there is" 

I think the second approach is better too, as in some cases it may be that we want to use different access keys for different cultures so as not to interfere with browser specific access keys that vary by culture. Though I did use numbers for the access keys in hopes to avoid those issues.

If this is important to you, would you like to implement this change and send me a patch?

I implemented access keys but in practice it seems there are a lot of issues with it.

Here are some of the things I've read:
http://www.nomensa.com/resources/articles/access-keys.html

http://www.cs.tut.fi/~jkorpela/forms/accesskey.html

The recommendations I'm seeing are to use a Skip links approach instead of access keys, so I implemented that too and made it possible to disable access keys in Web.config.

Joe
2/5/2007 11:39:36 AM
Gravatar
Total Posts 488

Re: Contents of Resources.resx

After performing this refactoring (I'll send you a patch soon) I found some settings that shold be in Web.config, but not in resources (as they are not locale-based):

1. StopRefreshImage
2. NeatUploadRefreshImage
3. ForumThreadImage

May be, there are some more. I shall tell you if I find any.
2/9/2007 11:08:01 AM
Gravatar
Total Posts 488

Re: Contents of Resources.resx

Also these IMHO are for Web.config, but not resources:

CancelUploadImage
DeleteLinkImage
EditContentImage
RefreshImage
RSSImageFileName
2/9/2007 2:22:36 PM
Gravatar
Total Posts 80

Re: Contents of Resources.resx

I agree. It should be extremely easy to change the look and feel of the site's images. I changed the default icons and it involved editing a lot of .aspx, .aspc and .cs files.
2/9/2007 5:38:10 PM
Gravatar
Total Posts 18439

Re: Contents of Resources.resx

I will look into making get these images from the skin folder.
It will have to wait until I finish e-commerce though.

Thanks,

Joe
2/12/2007 6:41:33 AM
Gravatar
Total Posts 488

Re: Contents of Resources.resx

Also very strange to see in localizable resource file:

XmlModuleXmlSourceSetting
XmlModuleXslSourceSetting
2/12/2007 9:13:48 AM
Gravatar
Total Posts 18439

Re: Contents of Resources.resx

I will remove those. They are legacy.

Thanks,

Joe
5/21/2007 9:08:50 AM
Gravatar
Total Posts 488

Re: Contents of Resources.resx

Still in resources.resx:

1. BlogDateTimeFormatString (see http://www.mojoportal.com/ForumThreadView.aspx?thread=709&forumid=9&ItemID=9)

2. Settings that IMHO are not culture-specific but site-specific and should be in Web.config:

DeleteLinkImage
EditContentImage
ForumNotificationEmailSubject
ForumPostReplyPrefix
ForumThreadImage
RefreshImage
RSSImageFileName
StopRefreshImage

6/6/2007 12:21:06 PM
Gravatar
Total Posts 488

Re: Contents of Resources.resx

Thanks for the work done, I just finished this in a patch I sent you today.

6/7/2007 7:04:06 AM
Gravatar
Total Posts 488

Re: Contents of Resources.resx

One more:

ModuleDefinitionsDefaultControlSource

6/7/2007 2:20:13 PM
Gravatar
Total Posts 18439

Re: Contents of Resources.resx

That one is used in ModuleDefinitions.aspx.cs

Joe

6/7/2007 2:25:12 PM
Gravatar
Total Posts 488

Re: Contents of Resources.resx

Yes, it is used. But I suppose it is not be localizable, so it should be moved to web.config.

6/7/2007 2:54:15 PM
Gravatar
Total Posts 18439

Re: Contents of Resources.resx

I think moving it to web.config makes it look like an important setting which it is not.

I just didn't want to hard code it and I still think someone may want to localize it even if it is not very localizable. In english it is Modules/SomeModule.ascx, maybe someone would want to translate the word "Some" into something slightly better for their language. I could leave it blank but it gives an idea of the expected input.

Joe

6/8/2007 2:40:51 AM
Gravatar
Total Posts 488

Re: Contents of Resources.resx

I am not sure I agree with your logic, but the decision is up to you.

6/14/2007 3:48:34 AM
Gravatar
Total Posts 488

Re: Contents of Resources.resx

As I can see, you did not apply part of my patch where I excluded "ForumNotificationEmailSubject" and "ForumPostReplyPrefix" from resources.

Let me explain why did I do that.

I agree that these strings can be localized in some way. But I disagree with the way it is being done now. The problem is that when one replies to forum thread, this strings are taken for the one's locale, but shown to other people!

For example, what happens if these strings are localized to french and someone with french browser settings replies to this post? I will recieve e-mail notification with subject written in french and see the title written in french. But I don't understand that language!

Now this does not happen because thiese strings are not localized. But if they do, we will have the problems described.

So, my opinion is:

1. Now it can be web.config properties, site settings, forum module settings - everything, but not localizable resources.

2. "ForumNotificationEmailSubject" can potentially be localized, but in this case we should have some profile property like "prefered language" and determine the locale from it instead of the way it is determined now.

 

6/14/2007 1:30:21 PM
Gravatar
Total Posts 18439

Re: Contents of Resources.resx

I agree with your reasoning, it should use the default culture of the site not the user's.

I have implemented a solution I think you will approve of, I have moved those strings in text files in Data/MessageTemplates.

It will be in trunk by the end of the day.

6/15/2007 3:09:16 AM
Gravatar
Total Posts 488

Re: Contents of Resources.resx

Thanks, I agree with this solution.

P.S. StopRefreshImage is somehow back to resources.

UPDATE: thanks for removing this.

You must sign in to post in the forums. This thread is closed to new posts.