SCM

[#1010204] Centralize the Resource file and Generate Strong-type class by ResGen.

View Trackers | Patches | Download .csv | Monitor

Date:
2007-11-30 08:06
Priority:
3
State:
Open
Submitted by:
Tao Wang (dancefire)
Assigned to:
Nobody (None)
Category:
Group:
Resolution:
None
 
Summary:
Centralize the Resource file and Generate Strong-type class by ResGen.

Detailed description
Centralize the resources files can esay tranlation job. Generate strong-type class for the resource file can easy any resource string reference in code. This patch do the job.

The package contains following files:

Resources.cs
contains class Npgsql.Resources, which is generated by ResGen.

Resources.resx
contains all strings of current every .resx file (English).
Resources.*.resx (* are [cs,de,es,fi,ja,zh-CN])
locale resource file. generate by copy Resources.resx first, and replace existing translated string.

Resources.patch
The patch for affected files, which are:

NpgsqlParameter.cs
NpgsqlTransaction.cs
NpgsqlCommand.cs
NpgsqlParameterCollection.cs
NpgsqlCommandBuilder.cs
NpgsqlEventLog.cs
NpgsqlState.cs
NpgsqlConnection.cs
NpgsqlClosedState.cs
NpgsqlException.cs
PGUtil.cs

One thing should be notice is that, since no need for ResourceManager anymore, the NpgsqlEventLog.LogMsg(), previous is:
internal static void LogMsg(ResourceManager resman, string ResourceString, LogLevel msglevel, params Object[] Parameters)
new one is:
internal static void LogMsg(string message, LogLevel msglevel, params Object[] Parameters)

And a file 'NpgsqlConnectionStringBuilder.cs', this file is seperate with the patch, the reason is this file is current not existing in CVS, so I cannot generate a patch against CVS Head. So please merge it manually if needed.

After apply the patch, all existing *.resx in Npgsql,NpgsqlType are not necessary, can be removed.

Followup

No Followups Have Been Posted

Attached Files:

Attachments:
Resources.zip

Changes:

Field Old Value Date By
File Added274: Resources.zip2007-11-30 08:06dancefire
Powered By FusionForge