home recent topics recent posts search faq  

Schaudin.com Forum



register | lost password | |

MichaelTR - all messages by user

28.02.2011 09:41:19
Topic:
WPF Translation

MichaelTR
MichaelTR
Hello
I'm trying to translate a WPF program.

There are two options in RC-WinTrans:

1. Use the exe as a source.
This produces a .resources.dll file under a folder called after the choosen language (e.g. "en").
How can I choose this language at program startup?
I tried
Thread.CurrentThread.CurrentUICulture = new CultureInfo("en");
Thread.CurrentThread.CurrentCulture = new CultureInfo("en");
in the construcor of the App to no avail.
Is there something else I have to do, or is there a sample available to use this method?

2. Use the xaml files as a source (this would be my preferred way, because I already use RC WinTrans to translate the resource files for C++ and Windows Forms apps).
This produces _en.xaml files for each source file.
How can I now integrate these files into my app?
 
BTW: I already took a look at the samples in WPFProjects folder. It's not possible to build these projects, because of missing files.
 
TIA Michael
02.03.2011 15:30:11
Topic:
WPF Translation

MichaelTR
MichaelTR
I now found a problem, which maybe a bug in RCWinTrans.

In AssemblyInfo.cs Microsoft says:
//In order to begin building localizable applications, set
//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file
//inside a <PropertyGroup>.


If I do this, RCWinTrans cannot find any WPF resources in the exe anymore.

If I omit this line the exe crashes immediately.
02.03.2011 15:47:04
Topic:
WPF Translation

MichaelTR
MichaelTR
Support wrote:
You can use RC-WinTrans to prepare a Visual Studio WPF project (the XAML files) with the required "x:Uid" attributes.
Use: "Tools" | "WPF" | ".NET Project update "x:Uid" attributes..."
Select your Visual Studio project file (e.g. for C#: .csproj) . Then rebuild your WPF project to create the assembly (EXE or DLL) newly.


Doesn't do anything.

Running MSBuild.exe ...
C:\Programme\RC-WinTrans\RC-WinTrans 9 Global\WPFProjects\BAMLBuild2010\MSBuild.exe /t:updateuid C:\mist\WpfSprachumschaltung\WpfSprachumschaltung\WpfSprachumschaltung.csproj
Output:
03.03.2011 09:33:11
Topic:
WPF Translation

MichaelTR
MichaelTR
Support wrote:

Nothing happens in RC-WinTrans but for your Visual Studio project. RC-WinTrans call the msbuild.exe (Microsoft command line tool) to add the "x:Uid" attributes to your VS project's source XAML files. Check the XAML files -- the elements should have "x:Uid" attribute now.


No, it doesn't add any x:Uid to the elements in xaml.

Shouldn't there be any output message in the RCWinTrans output?
04.03.2011 08:03:44
Topic:
Error (305)

MichaelTR
MichaelTR
Our translators in China get the error message
COpenXLIFFFilesystemDBbased::Init: Data file could not be extracted from database! Language: "zh-CHS"
Error (305): The data file (DOM) could not be loaded: "zh-CHS."

What does that mean?

They are using RC-WinTrans 9.1 Translator on a .NET Winforms project translating resx files.

Their statusbar shows translation status of 100%/100%, but if they send us the file, we see that only 83% are translated.
04.03.2011 08:12:36
Topic:
Databinding in WPF

MichaelTR
MichaelTR
In WPF it's possible to bind the text of controls to properties instead of typing the text directly into the xaml.
Something like this:
<MenuItem x:Uid="helpButton" Header="{Binding RelativeSource={RelativeSource Self}, Path=Command.Text}"
Command="ApplicationCommands.Help"
x:Name="helpButton" />


I think it would be better, if RCWinTrans would exclude such text from translation by default.
You could check for '{'.

If the translators modify this text, the program doesn't work anymore.
04.03.2011 11:41:44
Topic:
WPF Translation

MichaelTR
MichaelTR
It seems that RC-WinTrans is not able to start msbuild.exe. => no output and no uids

But putting the following lines into the prebuild event for the project did the trick:
$(MSBuildBinPath)\msbuild /t:updateuid $(ProjectPath)
$(MSBuildBinPath)\msbuild /t:checkuid $(ProjectPath)
17.03.2011 11:42:56
Topic:
Error (305)

MichaelTR
MichaelTR
I found the problem:
There were german umlauts in the file and pathnames of the resx files.
All these files could not be translated on a chinese PC.

I understand we shouldn't use these characters, but maybe you could fix this in the next release.
24.03.2011 08:22:20
Topic:
Error (305)

MichaelTR
MichaelTR
The problem exists also on a japanese PC.
It's not a problem of the target language, it's a problem of the PC used for tranlation.
24.03.2011 08:36:51
Topic:
Loosing Translation if Moving Control in WinForms

MichaelTR
MichaelTR
If I move a already translated control in a WindowsForm into a TableLayoutPanel or GroupBox in this form RCWinTrans looses the tranlation.
This shouldn't be the case, because the control has a specific name/ID and RCWinTrans knows this name.

RCWinTrans Version 9.1.0.8
25.03.2011 09:08:03
Topic:
Loosing Translation if Moving Control in WinForms

MichaelTR
MichaelTR
I think you could use the resx file instead of the parent to identify a control. This would help to get around this problem.

But anyway, if this is not possible I have a second suggestion:
To restore my lost translations I use the import feature with an older version of the same database.
Here it would help if I could import all languages at once. So in the dialog of the import it would be convenient to have the option of multiselection of multiple target languages to import.
28.04.2014 15:07:43
Topic:
One translation DB for multiple sources?

MichaelTR
MichaelTR
Is it possible to use one translation database (fsmdb) for multiple source files, where all source files have the same text to translate?

I'm using RC-WinTrans 9.2.0.5 to translate exe- and dll-files with C#/WPF-code into different languages. At the moment I take the release exe as source and RC-WinTrans generates the necessary satellite exe. This works like a charm, but has one big disadvantage. I cannot use the same translation database for different sources.

For example I am using the release exe as source, but what about the debug exe? The debug exe has exactly the same text to translate and therefor could work with the same database. The same is true for different target platforms (I'm compiling for x86, Any CPU and sometimes for x64). Also the release directory is not always the same (if I use the same VS-project in different solutions).

So is there a way (preferable via commandline), to tell RC-WinTrans to translate these files all with the same database?
Something like rwtcmd /WriteAllTargetFiles "mytrans.rwtproject" /UseAsSource MyProject\bin\x64\Release\mySource.exe that I could call multiple times with different paths to mySource.exe.

TIA
Michael
09.05.2014 14:51:57
Topic:
One translation DB for multiple sources?

MichaelTR
MichaelTR
Thank you for the information Werner.
This is simply not possible, so I go the other direction and put all text in resx-Files.
09.05.2014 15:56:28
Topic:
Opening Workspace Modifies fsmdb-Files

MichaelTR
MichaelTR
I'm using RC-WinTrans 9.2.0.5.
I put multiple projects into one workspace.
If I now open this workspace, RC-WinTrans modifies the fsmdb files of all projects, even if I didn't change anything.
As I use a source control system on these files, this is a bad thing.
Is there a way to tell RC-WinTrans not to modify the fsmdb files, if there was no modification to the translations?

TIA
Michael
16.05.2014 09:45:45
Topic:
Opening Workspace Modifies fsmdb-Files

MichaelTR
MichaelTR
I'm using the source control system git which doesn't have any check-out feature, so this is not possible.
pages: 1




Powered by AspNetForum 6.9.6.0 © 2006-2010 Jitbit Software