Skip to content

Commit

Permalink
update locale generator
Browse files Browse the repository at this point in the history
  • Loading branch information
MacSergey committed Nov 18, 2022
1 parent 473afbe commit 204fac9
Show file tree
Hide file tree
Showing 22 changed files with 307 additions and 3,274 deletions.
2 changes: 1 addition & 1 deletion ModsCommon
Submodule ModsCommon updated from e6728f to fafe52
150 changes: 73 additions & 77 deletions NoBigTruck.sln

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion NoBigTruck/Mod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public class Mod : BasePatcherMod<Mod>
#endif
protected override string IdRaw => nameof(NoBigTruck);

protected override ResourceManager LocalizeManager => Localize.ResourceManager;
protected override LocalizeManager LocalizeManager => Localize.LocaleManager;
protected override List<BaseDependencyInfo> DependencyInfos
{
get
Expand Down
147 changes: 109 additions & 38 deletions NoBigTruck/NoBigTruck.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</PropertyGroup>

<PropertyGroup>
<AssemblyVersion>1.3.0.30</AssemblyVersion>
<AssemblyVersion>1.3.0.32</AssemblyVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)' == 'Stable Release' OR '$(Configuration)' == 'Stable Debug'">
Expand Down Expand Up @@ -70,26 +70,94 @@
<Reference Include="System.Xml.Linq">
<Private>true</Private>
</Reference>
<EmbeddedResource Remove="Properties\Localize.cs-CZ.resx" />
<EmbeddedResource Remove="Properties\Localize.da-DK.resx" />
<EmbeddedResource Remove="Properties\Localize.de-DE.resx" />
<EmbeddedResource Remove="Properties\Localize.en-GB.resx" />
<EmbeddedResource Remove="Properties\Localize.es-ES.resx" />
<EmbeddedResource Remove="Properties\Localize.fi-FI.resx" />
<EmbeddedResource Remove="Properties\Localize.fr-FR.resx" />
<EmbeddedResource Remove="Properties\Localize.hu-HU.resx" />
<EmbeddedResource Remove="Properties\Localize.it-IT.resx" />
<EmbeddedResource Remove="Properties\Localize.ja-JP.resx" />
<EmbeddedResource Remove="Properties\Localize.ko-KR.resx" />
<EmbeddedResource Remove="Properties\Localize.nl-NL.resx" />
<EmbeddedResource Remove="Properties\Localize.pl-PL.resx" />
<EmbeddedResource Remove="Properties\Localize.pt-PT.resx" />
<EmbeddedResource Remove="Properties\Localize.resx" />
<EmbeddedResource Remove="Properties\Localize.ro-RO.resx" />
<EmbeddedResource Remove="Properties\Localize.ru-RU.resx" />
<EmbeddedResource Remove="Properties\Localize.tr-TR.resx" />
<EmbeddedResource Remove="Properties\Localize.zh-CN.resx" />
<EmbeddedResource Remove="Properties\Localize.zh-TW.resx" />
</ItemGroup>


<ItemGroup>
<Compile Update="Properties\Localize.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Localize.resx</DependentUpon>
</Compile>
<None Include="Properties\Localize.cs-CZ.resx">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Properties\Localize.da-DK.resx">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Properties\Localize.de-DE.resx">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Properties\Localize.es-ES.resx">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Properties\Localize.fi-FI.resx">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Properties\Localize.fr-FR.resx">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Properties\Localize.hu-HU.resx">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Properties\Localize.it-IT.resx">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Properties\Localize.ja-JP.resx">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Properties\Localize.ko-KR.resx">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Properties\Localize.nl-NL.resx">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Properties\Localize.pl-PL.resx">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Properties\Localize.pt-PT.resx">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Properties\Localize.resx">
<Generator>LocalizeGenerator</Generator>
<LastGenOutput>Localize.cs</LastGenOutput>
<CustomToolNamespace>NoBigTruck</CustomToolNamespace>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Properties\Localize.ro-RO.resx">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Properties\Localize.ru-RU.resx">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Properties\Localize.tr-TR.resx">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Properties\Localize.zh-CN.resx">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>


<ItemGroup>
<EmbeddedResource Update="Properties\Localize.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>Localize.Designer.cs</LastGenOutput>
<CustomToolNamespace>NoBigTruck</CustomToolNamespace>
</EmbeddedResource>
<Compile Update="Properties\Localize.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>Localize.resx</DependentUpon>
</Compile>
</ItemGroup>

<Import Project="..\ModsCommon\ModShared\ModsCommonShared.projitems" Label="Shared" />
Expand All @@ -99,12 +167,8 @@
<Import Project="..\ModsCommon\XmlExtension\XmlExtension.projitems" Label="Shared" />
<Import Project="..\ModsCommon\HeaderShared\HeaderShared.projitems" Label="Shared" />
<Import Project="..\ModsCommon\PluginsShared\PluginsShared.projitems" Label="Shared" />
<Import Project="..\ModsCommon\LocalizeShared\ru\LocalizeShared.ru.projitems" Label="Shared" />
<Import Project="..\ModsCommon\LocalizeShared\LocalizeShared.projitems" Label="Shared" />
<Import Project="..\ModsCommon\DependencyShared\DependencyShared.projitems" Label="Shared" />
<Import Project="..\ModsCommon\LocalizeShared\fi\LocalizeShared.fi.projitems" Label="Shared" />
<Import Project="..\ModsCommon\LocalizeShared\ja\LocalizeShared.ja.projitems" Label="Shared" />
<Import Project="..\ModsCommon\LocalizeShared\de\LocalizeShared.de.projitems" Label="Shared" />
<Import Project="..\ModsCommon\SingletonShared\SingletonShared.projitems" Label="Shared" />
<Import Project="..\ModsCommon\LoggerShared\LoggerShared.projitems" Label="Shared" />
<Import Project="..\ModsCommon\AutoLayoutPanelShared\AutoLayoutPanelShared.projitems" Label="Shared" />
Expand All @@ -114,19 +178,24 @@
<Import Project="..\ModsCommon\HarmonyReportShared\HarmonyReportShared.projitems" Label="Shared" />
<Import Project="..\ModsCommon\LoadExtensionShared\LoadExtensionShared.projitems" Label="Shared" />
<Import Project="..\ModsCommon\ColorsShared\ColorsShared.projitems" Label="Shared" />
<Import Project="..\ModsCommon\LocalizeShared\nl\LocalizeShared.nl.projitems" Label="Shared" />
<Import Project="..\ModsCommon\LocalizeShared\zh-CN\LocalizeShared.zh-CN.projitems" Label="Shared" />
<Import Project="..\ModsCommon\LocalizeShared\it\LocalizeShared.it.projitems" Label="Shared" />
<Import Project="..\ModsCommon\LocalizeShared\es\LocalizeShared.es.projitems" Label="Shared" />
<Import Project="..\ModsCommon\LocalizeShared\ko\LocalizeShared.ko.projitems" Label="Shared" />
<Import Project="..\ModsCommon\LocalizeShared\hu\LocalizeShared.hu.projitems" Label="Shared" />
<Import Project="..\ModsCommon\LocalizeShared\da\LocalizeShared.da.projitems" Label="Shared" />
<Import Project="..\ModsCommon\LocalizeShared\pt\LocalizeShared.pt.projitems" Label="Shared" />
<Import Project="..\ModsCommon\LocalizeShared\tr\LocalizeShared.tr.projitems" Label="Shared" />
<Import Project="..\ModsCommon\LocalizeShared\fr\LocalizeShared.fr.projitems" Label="Shared" />
<Import Project="..\ModsCommon\LocalizeShared\pl\LocalizeShared.pl.projitems" Label="Shared" />
<Import Project="..\ModsCommon\LocalizeShared\ro\LocalizeShared.ro.projitems" Label="Shared" />
<Import Project="..\ModsCommon\LocalizeShared\cs\LocalizeShared.cs.projitems" Label="Shared" />
<Import Project="..\ModsCommon\LocalizeShared\LocalizeManager\LocalizeManager.projitems" Label="Shared" />
<Import Project="..\ModsCommon\LocalizeShared\cs-CZ\LocalizeShared.cs-CZ.projitems" Label="Shared" />
<Import Project="..\ModsCommon\LocalizeShared\da-DK\LocalizeShared.da-DK.projitems" Label="Shared" />
<Import Project="..\ModsCommon\LocalizeShared\de-DE\LocalizeShared.de-DE.projitems" Label="Shared" />
<Import Project="..\ModsCommon\LocalizeShared\es-ES\LocalizeShared.es-ES.projitems" Label="Shared" />
<Import Project="..\ModsCommon\LocalizeShared\fi-FI\LocalizeShared.fi-FI.projitems" Label="Shared" />
<Import Project="..\ModsCommon\LocalizeShared\fr-FR\LocalizeShared.fr-FR.projitems" Label="Shared" />
<Import Project="..\ModsCommon\LocalizeShared\hu-HU\LocalizeShared.hu-HU.projitems" Label="Shared" />
<Import Project="..\ModsCommon\LocalizeShared\it-IT\LocalizeShared.it-IT.projitems" Label="Shared" />
<Import Project="..\ModsCommon\LocalizeShared\ja-JP\LocalizeShared.ja-JP.projitems" Label="Shared" />
<Import Project="..\ModsCommon\LocalizeShared\ko-KR\LocalizeShared.ko-KR.projitems" Label="Shared" />
<Import Project="..\ModsCommon\LocalizeShared\nl-NL\LocalizeShared.nl-NL.projitems" Label="Shared" />
<Import Project="..\ModsCommon\LocalizeShared\pl-PL\LocalizeShared.pl-PL.projitems" Label="Shared" />
<Import Project="..\ModsCommon\LocalizeShared\pt-PT\LocalizeShared.pt-PT.projitems" Label="Shared" />
<Import Project="..\ModsCommon\LocalizeShared\ro-RO\LocalizeShared.ro-RO.projitems" Label="Shared" />
<Import Project="..\ModsCommon\LocalizeShared\ru-RU\LocalizeShared.ru-RU.projitems" Label="Shared" />
<Import Project="..\ModsCommon\LocalizeShared\tr-TR\LocalizeShared.tr-TR.projitems" Label="Shared" />


<PropertyGroup Condition="'$(Configuration)' == 'Stable Release' OR '$(Configuration)' == 'Stable Debug'">
Expand All @@ -146,19 +215,21 @@


<Target Name="PdbToMdb" AfterTargets="Build">
<!--<Message Text="Convert pdb to mdb" Importance="high" />
<PropertyGroup>
<UnityPath>$(MSBuildExtensionsPath64)\..\Unity\</UnityPath>
<UnityPath Condition="! Exists ('$(UnityPath)')">..\Unity\</UnityPath>
<MonoDir>$(UnityPath)Editor\Data\MonoBleedingEdge\</MonoDir>
</PropertyGroup>
<Exec Command='"$(MonoDir)bin\mono.exe" "$(MonoDir)lib\mono\4.5\pdb2mdb.exe" "$(TargetPath)"' />-->
<ItemGroup>
<FilesToDelete Include="$(OutDir)*.pdb" />
</ItemGroup>
<Delete Files="@(FilesToDelete)" />

<ItemGroup>
<LocalizeToMove Include="$(OutDir)Properties\*.resx" />
</ItemGroup>
<Move SourceFiles="@(LocalizeToMove)" DestinationFiles="@(LocalizeToMove->'$(OutDir)Localize\%(Filename)%(Extension)')" />
<RemoveDir Directories="$(OutDir)Properties" />

<ItemGroup>
<CommonLocalizeToMove Include="$(OutDir)*.resx" />
</ItemGroup>
<Move SourceFiles="@(CommonLocalizeToMove)" DestinationFiles="@(CommonLocalizeToMove->'$(OutDir)Localize\%(Filename)%(Extension)')" />
</Target>

<Target Name="DeployToLocal" AfterTargets="PdbToMdb">
Expand Down
Loading

0 comments on commit 204fac9

Please sign in to comment.