Skip to content

Commit

Permalink
Localize
Browse files Browse the repository at this point in the history
  • Loading branch information
Youssef1313 committed Jan 15, 2025
1 parent 5da45b5 commit 4b78c82
Show file tree
Hide file tree
Showing 15 changed files with 97 additions and 29 deletions.
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
Expand All @@ -26,36 +26,36 @@
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
Expand Down Expand Up @@ -138,6 +138,9 @@
<data name="TrxComparerToolOtherFileOptionDescription" xml:space="preserve">
<value>The TRX file to compare with the baseline</value>
</data>
<data name="TrxFileExistsAndWillBeOverwritten" xml:space="preserve">
<value>Warning: Trx file '{0}' already exists and is overwritten.</value>
</data>
<data name="TrxReportArtifactDescription" xml:space="preserve">
<value>Test session</value>
</data>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@
<target state="translated">Soubor TRX, který se má porovnat se standardními hodnotami</target>
<note />
</trans-unit>
<trans-unit id="TrxFileExistsAndWillBeOverwritten">
<source>Warning: Trx file '{0}' already exists and is overwritten.</source>
<target state="new">Warning: Trx file '{0}' already exists and is overwritten.</target>
<note />
</trans-unit>
<trans-unit id="TrxReportArtifactDescription">
<source>Test session</source>
<target state="translated">Relace testu</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@
<target state="translated">Die TRX-Datei, die mit der Baseline verglichen werden soll</target>
<note />
</trans-unit>
<trans-unit id="TrxFileExistsAndWillBeOverwritten">
<source>Warning: Trx file '{0}' already exists and is overwritten.</source>
<target state="new">Warning: Trx file '{0}' already exists and is overwritten.</target>
<note />
</trans-unit>
<trans-unit id="TrxReportArtifactDescription">
<source>Test session</source>
<target state="translated">Testsitzung</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@
<target state="translated">Archivo TRX que se va a comparar con la línea base</target>
<note />
</trans-unit>
<trans-unit id="TrxFileExistsAndWillBeOverwritten">
<source>Warning: Trx file '{0}' already exists and is overwritten.</source>
<target state="new">Warning: Trx file '{0}' already exists and is overwritten.</target>
<note />
</trans-unit>
<trans-unit id="TrxReportArtifactDescription">
<source>Test session</source>
<target state="translated">Sesión de prueba</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@
<target state="translated">Fichier TRX à comparer à la ligne de base</target>
<note />
</trans-unit>
<trans-unit id="TrxFileExistsAndWillBeOverwritten">
<source>Warning: Trx file '{0}' already exists and is overwritten.</source>
<target state="new">Warning: Trx file '{0}' already exists and is overwritten.</target>
<note />
</trans-unit>
<trans-unit id="TrxReportArtifactDescription">
<source>Test session</source>
<target state="translated">Session de test</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@
<target state="translated">File TRX da confrontare con la baseline</target>
<note />
</trans-unit>
<trans-unit id="TrxFileExistsAndWillBeOverwritten">
<source>Warning: Trx file '{0}' already exists and is overwritten.</source>
<target state="new">Warning: Trx file '{0}' already exists and is overwritten.</target>
<note />
</trans-unit>
<trans-unit id="TrxReportArtifactDescription">
<source>Test session</source>
<target state="translated">Sessione di test</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@
<target state="translated">ベースラインと比較する TRX ファイル</target>
<note />
</trans-unit>
<trans-unit id="TrxFileExistsAndWillBeOverwritten">
<source>Warning: Trx file '{0}' already exists and is overwritten.</source>
<target state="new">Warning: Trx file '{0}' already exists and is overwritten.</target>
<note />
</trans-unit>
<trans-unit id="TrxReportArtifactDescription">
<source>Test session</source>
<target state="translated">テスト セッション</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@
<target state="translated">기준과 비교할 TRX 파일입니다.</target>
<note />
</trans-unit>
<trans-unit id="TrxFileExistsAndWillBeOverwritten">
<source>Warning: Trx file '{0}' already exists and is overwritten.</source>
<target state="new">Warning: Trx file '{0}' already exists and is overwritten.</target>
<note />
</trans-unit>
<trans-unit id="TrxReportArtifactDescription">
<source>Test session</source>
<target state="translated">테스트 세션</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@
<target state="translated">Plik TRX do porównania z punktem odniesienia</target>
<note />
</trans-unit>
<trans-unit id="TrxFileExistsAndWillBeOverwritten">
<source>Warning: Trx file '{0}' already exists and is overwritten.</source>
<target state="new">Warning: Trx file '{0}' already exists and is overwritten.</target>
<note />
</trans-unit>
<trans-unit id="TrxReportArtifactDescription">
<source>Test session</source>
<target state="translated">Sesja testowa</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@
<target state="translated">O arquivo TRX a ser comparado com a linha de base</target>
<note />
</trans-unit>
<trans-unit id="TrxFileExistsAndWillBeOverwritten">
<source>Warning: Trx file '{0}' already exists and is overwritten.</source>
<target state="new">Warning: Trx file '{0}' already exists and is overwritten.</target>
<note />
</trans-unit>
<trans-unit id="TrxReportArtifactDescription">
<source>Test session</source>
<target state="translated">Sessão de teste</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@
<target state="translated">TRX-файл для сравнения с базовыми показателями</target>
<note />
</trans-unit>
<trans-unit id="TrxFileExistsAndWillBeOverwritten">
<source>Warning: Trx file '{0}' already exists and is overwritten.</source>
<target state="new">Warning: Trx file '{0}' already exists and is overwritten.</target>
<note />
</trans-unit>
<trans-unit id="TrxReportArtifactDescription">
<source>Test session</source>
<target state="translated">Тестовый сеанс</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@
<target state="translated">Taban çizgisiyle karşılaştırılacak TRX dosyası</target>
<note />
</trans-unit>
<trans-unit id="TrxFileExistsAndWillBeOverwritten">
<source>Warning: Trx file '{0}' already exists and is overwritten.</source>
<target state="new">Warning: Trx file '{0}' already exists and is overwritten.</target>
<note />
</trans-unit>
<trans-unit id="TrxReportArtifactDescription">
<source>Test session</source>
<target state="translated">Test oturumu</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@
<target state="translated">要与基线进行比较的 TRX 文件</target>
<note />
</trans-unit>
<trans-unit id="TrxFileExistsAndWillBeOverwritten">
<source>Warning: Trx file '{0}' already exists and is overwritten.</source>
<target state="new">Warning: Trx file '{0}' already exists and is overwritten.</target>
<note />
</trans-unit>
<trans-unit id="TrxReportArtifactDescription">
<source>Test session</source>
<target state="translated">测试会话</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@
<target state="translated">要與基準比較的 TRX 檔案</target>
<note />
</trans-unit>
<trans-unit id="TrxFileExistsAndWillBeOverwritten">
<source>Warning: Trx file '{0}' already exists and is overwritten.</source>
<target state="new">Warning: Trx file '{0}' already exists and is overwritten.</target>
<note />
</trans-unit>
<trans-unit id="TrxReportArtifactDescription">
<source>Test session</source>
<target state="translated">測試工作階段</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#endif
using System.Security.Cryptography;

using Microsoft.Testing.Extensions.TestReports.Resources;
using Microsoft.Testing.Platform.CommandLine;
using Microsoft.Testing.Platform.Configurations;
using Microsoft.Testing.Platform.Extensions;
Expand Down Expand Up @@ -205,8 +206,7 @@ public TrxReportEngine(IFileSystem fileSystem, ITestApplicationModuleInfo testAp
using IFileStream stream = _fileSystem.NewFileStream(finalFileName, isFileNameExplicitlyProvided ? FileMode.Create : FileMode.CreateNew);
await document.SaveAsync(stream.Stream, SaveOptions.None, _cancellationToken);
return isFileNameExplicitlyProvided && _fileSystem.Exists(finalFileName)
// TODO: Localize
? (finalFileName, $"Warning: Trx file '{finalFileName}' already exists and is overwritten.")
? (finalFileName, string.Format(CultureInfo.InvariantCulture, ExtensionResources.TrxFileExistsAndWillBeOverwritten, finalFileName))
: (finalFileName, null);
});

Expand Down

0 comments on commit 4b78c82

Please sign in to comment.