Skip to content

Commit

Permalink
Work done under this commit: (#302)
Browse files Browse the repository at this point in the history
1) Create xlf file for all language
2) Create language resx file from xlf file
3) create satellite dll
  • Loading branch information
Faizan2304 authored Dec 23, 2016
1 parent dffd8fb commit 78167e9
Show file tree
Hide file tree
Showing 30 changed files with 117 additions and 91 deletions.
4 changes: 2 additions & 2 deletions scripts/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Param(

[Parameter(Mandatory=$false)]
[Alias("loc")]
[System.Boolean] $Localized = $false,
[Switch] $LocalizedBuild = $false,

[Parameter(Mandatory=$false)]
[Alias("ci")]
Expand Down Expand Up @@ -155,7 +155,7 @@ function Invoke-Build

Write-Log ".. .. Build: Source: $TPB_Solution"
Write-Verbose "$dotnetExe build $TPB_Solution --configuration $TPB_Configuration --version-suffix $TPB_VersionSuffix -v:minimal -p:Version=$TPB_Version"
& $dotnetExe build $TPB_Solution --configuration $TPB_Configuration --version-suffix $TPB_VersionSuffix -v:minimal -p:Version=$TPB_Version -p:CIBuild=$TPB_CIBuild
& $dotnetExe build $TPB_Solution --configuration $TPB_Configuration --version-suffix $TPB_VersionSuffix -v:minimal -p:Version=$TPB_Version -p:CIBuild=$TPB_CIBuild -p:LocalizedBuild=$LocalizedBuild
Write-Log ".. .. Build: Complete."

if ($lastExitCode -ne 0) {
Expand Down
34 changes: 32 additions & 2 deletions scripts/build/TestPlatform.targets
Original file line number Diff line number Diff line change
@@ -1,8 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<TestPlatformRoot Condition="$(TestPlatformRoot) == ''">$(MSBuildThisFileDirectory)../../</TestPlatformRoot>
<TestPlatformRoot Condition="$(TestPlatformRoot) == ''">$(MSBuildThisFileDirectory)..\..\</TestPlatformRoot>
<TestPlatformPackageDir>$(TestPlatformRoot)packages\</TestPlatformPackageDir>
</PropertyGroup>

<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<ItemGroup>
<ResourceFiles Include="$(ProjectDir)Resources\*.resx" />
<ResxLang Include="cs;de;es;fr;it;ja;ko;pl;pt-BR;ru;tr;zh-Hans;zh-Hant" />
</ItemGroup>

<Target Name="BeforeBuild" Condition="$(TestProject) =='' and $(TestProject) !='true' and @(ResourceFiles) != ''">
<CallTarget Targets="CreateLocalizeXLF;CreateLocalizeResx"/>
</Target>

<Target Name="CreateLocalizeXLF">
<CreateItem Include="@(ResourceFiles)" AdditionalMetadata="Language=%(ResxLang.Identity)">
<Output ItemName="LocResourceFile" TaskParameter="Include"/>
</CreateItem>
<Exec Command="$(TestPlatformPackageDir)fmdev.xlftool\0.1.2\tools\xlftool.exe update -Resx %(LocResourceFile.Identity) -Xlf $(ProjectDir)Resources\xlf\%(LocResourceFile.Filename).%(LocResourceFile.Language).xlf" />
<Exec Command="$(TestPlatformPackageDir)fmdev.xlftool\0.1.2\tools\xlftool.exe update -Resx %(ResourceFiles.Identity) -Xlf $(ProjectDir)Resources\xlf\%(ResourceFiles.Filename).xlf" />
</Target>

<Target Name="CreateLocalizeResx" Condition="'$(LocalizedBuild)' == 'true'">
<CreateItem Include="@(ResourceFiles)" AdditionalMetadata="Language=%(ResxLang.Identity)">
<Output ItemName="LocResourceFile" TaskParameter="Include"/>
</CreateItem>
<PropertyGroup>
<OutputResxDir>$(ProjectDir)obj\Resx</OutputResxDir>
</PropertyGroup>
<MakeDir Directories="$(OutputResxDir)" Condition="!Exists($(OutputResxDir))" />
<Exec Command="$(TestPlatformPackageDir)fmdev.xlftool\0.1.2\tools\xlftool.exe writeTarget -Xlf $(ProjectDir)Resources\xlf\%(LocResourceFile.Filename).%(LocResourceFile.Language).xlf -Resx $(ProjectDir)obj\Resx\%(LocResourceFile.Filename).%(LocResourceFile.Language).resx -verbose" />
<ItemGroup>
<EmbeddedResource Include="$(ProjectDir)obj\Resx\*.resx" />
</ItemGroup>
</Target>
</Project>
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<TestPlatformRoot Condition="$(TestPlatformRoot) == ''">../../</TestPlatformRoot>
<TestPlatformRoot Condition="$(TestPlatformRoot) == ''">..\..\</TestPlatformRoot>
</PropertyGroup>
<Import Project="$(TestPlatformRoot)scripts/build/TestPlatform.Settings.targets" />

<PropertyGroup>
<AssemblyName>Microsoft.TestPlatform.Build</AssemblyName>
<TargetFrameworks>netstandard1.3;net46</TargetFrameworks>
<WarningsAsErrors>true</WarningsAsErrors>
<PackageTargetFallback Condition=" '$(TargetFramework)' == 'netstandard1.3' ">$(PackageTargetFallback);dnxcore50;portable-net45+win8;portable-net45+wp80+win8+wpa81+dnxcore50</PackageTargetFallback>
</PropertyGroup>

<ItemGroup>
<Compile Include="**\*.cs" />
<Compile Include="**\*.cs" />
<Content Include="Microsoft.TestPlatform.targets">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>

<ItemGroup>
<PackageReference Include="NETStandard.Library">
<Version>1.6.0</Version>
Expand All @@ -35,10 +32,9 @@
<Version>4.0.0</Version>
</PackageReference>
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net46' ">
<Reference Include="System" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>
<Import Project="$(TestPlatformRoot)scripts\build\TestPlatform.targets" />
</Project>
</Project>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<TestPlatformRoot Condition="$(TestPlatformRoot) == ''">../../</TestPlatformRoot>
<TestPlatformRoot Condition="$(TestPlatformRoot) == ''">..\..\</TestPlatformRoot>
</PropertyGroup>
<Import Project="$(TestPlatformRoot)scripts/build/TestPlatform.Settings.targets" />
<PropertyGroup>
Expand All @@ -11,7 +11,7 @@
</PropertyGroup>
<ItemGroup>
<Compile Include="**\*.cs" />
<EmbeddedResource Include="Resources\*.resx;compiler\resources\**\*" Exclude="bin\**;obj\**;**\*.xproj;packages\**" />
<EmbeddedResource Include="Resources\*.resx;compiler\resources\**\*" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Microsoft.TestPlatform.ObjectModel\Microsoft.TestPlatform.ObjectModel.csproj" />
Expand Down Expand Up @@ -51,4 +51,4 @@
<RootNamespace>Microsoft.VisualStudio.TestPlatform.Client</RootNamespace>
</PropertyGroup>
<Import Project="$(TestPlatformRoot)scripts\build\TestPlatform.targets" />
</Project>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
</trans-unit>
</body>
</file>
</xliff>
</xliff>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<TestPlatformRoot Condition="$(TestPlatformRoot) == ''">../../</TestPlatformRoot>
<TestPlatformRoot Condition="$(TestPlatformRoot) == ''">..\..\</TestPlatformRoot>
</PropertyGroup>
<Import Project="$(TestPlatformRoot)scripts/build/TestPlatform.Settings.targets" />
<PropertyGroup>
Expand All @@ -19,7 +19,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="**\*.cs" />
<EmbeddedResource Include="Resources\*.resx;compiler\resources\**\*" Exclude="bin\**;obj\**;**\*.xproj;packages\**" />
<EmbeddedResource Include="Resources\*.resx;compiler\resources\**\*" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Microsoft.TestPlatform.ObjectModel\Microsoft.TestPlatform.ObjectModel.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,4 @@
</trans-unit>
</body>
</file>
</xliff>
</xliff>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<TestPlatformRoot Condition="$(TestPlatformRoot) == ''">../../</TestPlatformRoot>
<TestPlatformRoot Condition="$(TestPlatformRoot) == ''">..\..\</TestPlatformRoot>
</PropertyGroup>
<Import Project="$(TestPlatformRoot)scripts/build/TestPlatform.Settings.targets" />
<PropertyGroup>
Expand All @@ -12,7 +12,7 @@
</PropertyGroup>
<ItemGroup>
<Compile Include="**\*.cs" />
<EmbeddedResource Include="Resources\*.resx;compiler\resources\**\*" Exclude="bin\**;obj\**;**\*.xproj;packages\**" />
<EmbeddedResource Include="Resources\*.resx;compiler\resources\**\*" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Microsoft.TestPlatform.CoreUtilities\Microsoft.TestPlatform.CoreUtilities.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@
</trans-unit>
</body>
</file>
</xliff>
</xliff>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<TestPlatformRoot Condition="$(TestPlatformRoot) == ''">../../</TestPlatformRoot>
<TestPlatformRoot Condition="$(TestPlatformRoot) == ''">..\..\</TestPlatformRoot>
</PropertyGroup>
<Import Project="$(TestPlatformRoot)scripts/build/TestPlatform.Settings.targets" />
<PropertyGroup>
Expand All @@ -10,7 +10,7 @@
</PropertyGroup>
<ItemGroup>
<Compile Include="**\*.cs" />
<EmbeddedResource Include="Resources\*.resx;compiler\resources\**\*" Exclude="bin\**;obj\**;**\*.xproj;packages\**" />
<EmbeddedResource Include="Resources\*.resx;compiler\resources\**\*" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.5' ">
<PackageReference Include="NETStandard.Library">
Expand Down Expand Up @@ -57,4 +57,4 @@
<RootNamespace>Microsoft.VisualStudio.TestPlatform.CoreUtilities</RootNamespace>
</PropertyGroup>
<Import Project="$(TestPlatformRoot)scripts\build\TestPlatform.targets" />
</Project>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@
</trans-unit>
</body>
</file>
</xliff>
</xliff>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<TestPlatformRoot Condition="$(TestPlatformRoot) == ''">../../</TestPlatformRoot>
<TestPlatformRoot Condition="$(TestPlatformRoot) == ''">..\..\</TestPlatformRoot>
</PropertyGroup>
<Import Project="$(TestPlatformRoot)scripts/build/TestPlatform.Settings.targets" />
<PropertyGroup>
Expand All @@ -12,7 +12,7 @@
</PropertyGroup>
<ItemGroup>
<Compile Include="**\*.cs" />
<EmbeddedResource Include="Resources\*.resx;compiler\resources\**\*" Exclude="bin\**;obj\**;**\*.xproj;packages\**" />
<EmbeddedResource Include="Resources\*.resx;compiler\resources\**\*" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Microsoft.TestPlatform.CommunicationUtilities\Microsoft.TestPlatform.CommunicationUtilities.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,16 @@
<source>No tests matched the filter because it contains one or more properties that are not valid ({0}). Specify filter expression containing valid properties ({1}) and try again.</source>
<note></note>
</trans-unit>
<trans-unit id="NoDotnetExeFound">
<source>Could not find {0}. Make sure that the dotnet is installed on the machine.</source>
<target state="new">Could not find {0}. Make sure that the dotnet is installed on the machine.</target>
<note></note>
</trans-unit>
<trans-unit id="NoTestHostFileExist">
<source>Could not find testhost.dll for source '{0}'. Make sure test project has a nuget reference of package "microsoft.testplatform.testhost".</source>
<target state="new">Could not find testhost.dll for source '{0}'. Make sure test project has a nuget reference of package "microsoft.testplatform.testhost".</target>
<note></note>
</trans-unit>
</body>
</file>
</xliff>
</xliff>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<TestPlatformRoot Condition="$(TestPlatformRoot) == ''">../../</TestPlatformRoot>
<TestPlatformRoot Condition="$(TestPlatformRoot) == ''">..\..\</TestPlatformRoot>
</PropertyGroup>
<Import Project="$(TestPlatformRoot)scripts/build/TestPlatform.Settings.targets" />
<PropertyGroup>
Expand All @@ -17,7 +17,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="**\*.cs" />
<EmbeddedResource Include="Resources\*.resx;compiler\resources\**\*" Exclude="bin\**;obj\**;**\*.xproj;packages\**" />
<EmbeddedResource Include="Resources\*.resx;compiler\resources\**\*" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Microsoft.TestPlatform.ObjectModel\Microsoft.TestPlatform.ObjectModel.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,4 +125,4 @@ Error Details: {1}:{2}</source>
</trans-unit>
</body>
</file>
</xliff>
</xliff>
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<TestPlatformRoot Condition="$(TestPlatformRoot) == ''">../../</TestPlatformRoot>
<TestPlatformRoot Condition="$(TestPlatformRoot) == ''">..\..\</TestPlatformRoot>
</PropertyGroup>
<Import Project="$(TestPlatformRoot)scripts/build/TestPlatform.Settings.targets" />
<PropertyGroup>
<AssemblyName>Microsoft.VisualStudio.TestPlatform.ObjectModel</AssemblyName>
<TargetFrameworks>net46;netstandard1.5</TargetFrameworks>
<PackageTargetFallback Condition=" '$(TargetFramework)' == 'netstandard1.5' ">$(PackageTargetFallback);dnxcore50;portable-net45+win8</PackageTargetFallback>
<PackageTargetFallback Condition=" '$(TargetFramework)' == 'netstandard1.5' ">$(PackageTargetFallback);dnxcore50;portable-net45+win8</PackageTargetFallback>
</PropertyGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net46' ">
<PackageReference Include="Microsoft.Internal.Dia.Interop">
Expand All @@ -21,7 +21,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="**\*.cs" />
<EmbeddedResource Include="Resources\*.resx;compiler\resources\**\*" Exclude="bin\**;obj\**;**\*.xproj;packages\**" />
<EmbeddedResource Include="Resources\*.resx;compiler\resources\**\*" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\CommonResources.tt">
Expand Down Expand Up @@ -108,4 +108,4 @@
<RootNamespace>Microsoft.VisualStudio.TestPlatform.ObjectModel</RootNamespace>
</PropertyGroup>
<Import Project="$(TestPlatformRoot)scripts\build\TestPlatform.targets" />
</Project>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
</trans-unit>
</body>
</file>
</xliff>
</xliff>
Original file line number Diff line number Diff line change
Expand Up @@ -255,4 +255,4 @@
</trans-unit>
</body>
</file>
</xliff>
</xliff>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<TestPlatformRoot Condition="$(TestPlatformRoot) == ''">../../</TestPlatformRoot>
<TestPlatformRoot Condition="$(TestPlatformRoot) == ''">..\..\</TestPlatformRoot>
</PropertyGroup>
<Import Project="$(TestPlatformRoot)scripts/build/TestPlatform.Settings.targets" />
<PropertyGroup>
Expand All @@ -10,7 +10,7 @@
</PropertyGroup>
<ItemGroup>
<Compile Include="**\*.cs" />
<EmbeddedResource Include="Resources\*.resx;compiler\resources\**\*" Exclude="bin\**;obj\**;**\*.xproj;packages\**" />
<EmbeddedResource Include="Resources\*.resx;compiler\resources\**\*" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Microsoft.TestPlatform.CoreUtilities\Microsoft.TestPlatform.CoreUtilities.csproj" />
Expand Down Expand Up @@ -43,4 +43,4 @@
<RootNamespace>Microsoft.VisualStudio.TestPlatform.Utilities</RootNamespace>
</PropertyGroup>
<Import Project="$(TestPlatformRoot)scripts\build\TestPlatform.targets" />
</Project>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@
</trans-unit>
</body>
</file>
</xliff>
</xliff>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<TestPlatformRoot Condition="$(TestPlatformRoot) == ''">../../</TestPlatformRoot>
<TestPlatformRoot Condition="$(TestPlatformRoot) == ''">..\..\</TestPlatformRoot>
</PropertyGroup>
<Import Project="$(TestPlatformRoot)scripts/build/TestPlatform.Settings.targets" />
<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<TestPlatformRoot Condition="$(TestPlatformRoot) == ''">../../</TestPlatformRoot>
<TestPlatformRoot Condition="$(TestPlatformRoot) == ''">..\..\</TestPlatformRoot>
</PropertyGroup>
<Import Project="$(TestPlatformRoot)scripts/build/TestPlatform.Settings.targets" />
<PropertyGroup>
Expand All @@ -12,7 +12,7 @@
</PropertyGroup>
<ItemGroup>
<Compile Include="**\*.cs" />
<EmbeddedResource Include="Resources\*.resx;compiler\resources\**\*" Exclude="bin\**;obj\**;**\*.xproj;packages\**" />
<EmbeddedResource Include="Resources\*.resx;compiler\resources\**\*" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Microsoft.TestPlatform.Common\Microsoft.TestPlatform.Common.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@
</trans-unit>
</body>
</file>
</xliff>
</xliff>
Loading

0 comments on commit 78167e9

Please sign in to comment.