Loading...
 
Multi-Language Add-In for Visual Studio

Multi-Language Add-In for Visual Studio


Please Help: Value is already present when rescan solution.

Hi All,

I am currently doing translation for my Web Solution, exactly just added new Japanese language.

My web is developed long ago, and already has Chinese translation. However, recently we have request to add new control as well as adding Japanese translation.
(some meta:resourcekey="" is added by hand before)
__
So now, when i rescan the solution again, it said that "Value 'CustomerManagement.aspx.ML_0159.Text' is already present"
and
"The changes you requested to the table were not successfull because they would create duplicate values in the index, primary key or relationship ... "
__
I aware that it not allow to insert duplicate data in the resource file. But dont know how to solve this.

Please help me!!! Thanks a lot and waiting for your kind help.

Germany

It would really help if you could send me the exact information in the error dialog, including the stack trace (and if I am lucky, the exact line number of the error). You should be able to send me this information simply by clicking on the Email button.

There is also a log file which might be useful. The exact path of the log file is displayed at the bottom of the error dialog (and you can select it with the mouse). Maybe you could attach this to the mail.

In the meantime I will try to figure out what the problem could be without this information.

Phil


Thanks for looking into my case.
Here is the information in the error dialog in case email could not reach you.

Error in Multi-Language Add-In for VS.NET
Date: 12/23/2009 6:48:15 PM
Version: 4.60.0000
Exception: System.Data.OleDb.OleDbException
Description:
The changes you requested to the table were not successful because they would create duplicate values in the index, primary key, or relationship. Change the data in the field or fields that contain duplicate data, remove the index, or redefine the index to permit duplicate entries and try again.
Additional Info:
Unhandled error
Stack Trace:
at System.Data.Common.DbDataAdapter.UpdatedRowStatusErrors(RowUpdatedEventArgs rowUpdatedEvent, BatchCommandInfo[] batchCommands, Int32 commandCount)
at System.Data.Common.DbDataAdapter.UpdatedRowStatus(RowUpdatedEventArgs rowUpdatedEvent, BatchCommandInfo[] batchCommands, Int32 commandCount)
at System.Data.Common.DbDataAdapter.Update(DataRow[] dataRows, DataTableMapping tableMapping)
at System.Data.Common.DbDataAdapter.Update(DataRow[] dataRows)
at MultiLang.MdbTranslationStoreTableAdapters.LanguagesTableAdapter.Update(DataRow dataRow)
at MultiLang.MdbTranslationStore.AddLanguage(String IetfTag, Int32 LCID, String Name, String SortKey)
at MultiLang.MyCultureInfoCollection.AddToPdb(MyCultureInfo mci, ITranslationStore Store)
at MultiLang.clsProject.GetOriginalLanguage()
at MultiLang.clsProject.InitAttributes()
at MultiLang.ctlToolWindow.ProjectInit(clsProject NewProject)

Thanks a lot.

Germany

Hi

can you download and install the latest version (currently 4.65.0051).

You can use this link:
http://www.jollans.com/SetupMultiLang2005.exe

I don't know whether the problem is already fixed, but I would prefer not to spend a lot of time looking for an error in an old version.

Phil


Hi Phil,

I already faced it with the latest version, that's why i chose to uninstall new version and install the older one, the one that used to scan the solution at the first time.

Here is the log for the latest version
Error in Multi-Language Add-In for VS.NET
Date: 12/24/2009 8:26:24 AM
Version: 4.65.0051
Windows: Microsoft Windows NT 5.1.2600 Service Pack 3
Exception: System.Data.ConstraintException
Description:
Column 'NodeName' is constrained to be unique. Value 'CustomerManagement.aspx.ML_0159.Text' is already present.
Additional Info:
Unhandled error
Stack Trace:
at System.Data.UniqueConstraint.CheckConstraint(DataRow row, DataRowAction action)
at System.Data.DataTable.RaiseRowChanging(DataRowChangeEventArgs args, DataRow eRow, DataRowAction eAction, Boolean fireEvent)
at System.Data.DataTable.SetNewRecordWorker(DataRow row, Int32 proposedRecord, DataRowAction action, Boolean isInMerge, Int32 position, Boolean fireEvent, Exception& deferredException)
at System.Data.DataTable.InsertRow(DataRow row, Int32 proposedID, Int32 pos, Boolean fireEvent)
at System.Data.DataRowCollection.Add(DataRow row)
at MultiLang.HtmlScanResultsCache.HtmlScanResultsDataTable.AddHtmlScanResultsRow(String NodeName, Boolean Expanded, String OriginalText, String CurrentLanguage) in D:\MultiLang.NET\ML_2005_NewGrid\MultiLang\DataSets\HtmlScanResults.Designer.vb:line 371
at MultiLang.ctlToolWindow.InitHtmlCache(TreeGridNodeCollection Nodes, HtmlScanResultsDataTable hsrDataTable) in D:\MultiLang.NET\ML_2005_NewGrid\MultiLang\Controls\ctlToolWindow.vb:line 16221
at MultiLang.ctlToolWindow.InitHtmlCache(TreeGrid

Hopefully this will help you to tract the cause.
Thanks a lot.

Germany

Hi.

I think that you have got two ASP tags in the module CustomerManagement.aspx with the attribute meta:resourcekey="ML_0159" and at least one of them does not have an ID attribute.

At least, I was able to reproduce the error with this scenario.

If that is the case, I suggest that you remove the attribute meta:resourcekey from one of the tags. When you rescan the project, it will show that the text in this tag is not selected for translation. If you select the text again, the Add-In will assign a new ID and resourcekey.

I will try to fix this problem in the Add-In, but for now, I think that is your best (and quickest) solution.

Phil


If i remove meta:resourcekey the old translation will be lost?
confused

Germany

Hi,

No, it won't be lost, because it is still in the project database.

You will have to click on the checkbox in the grid to select the attribute again, but then it will locate the original translation and use it again.

Phil