mirror of https://github.com/odrling/Aegisub
Add msbuild target for building translations. Closes #1076.
This commit is contained in:
parent
9a2b8fc408
commit
73696b8efa
|
@ -185,4 +185,15 @@
|
||||||
<ProjectTools Include="AegisubConfig" />
|
<ProjectTools Include="AegisubConfig" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<!-- Compile translations if msgfmt is available -->
|
||||||
|
<Target Name="Translations"
|
||||||
|
AfterTargets="ClCompile"
|
||||||
|
Condition="'$(MsgFmtPath)'!=''"
|
||||||
|
Inputs="@(MsgFmt)"
|
||||||
|
Outputs="$(AegisubBinaryDir)locale\%(Filename)\aegisub.mo"
|
||||||
|
>
|
||||||
|
<Error Condition="!Exists($(MsgFmtPath))" Text="$(MsgFmtPath) not found" />
|
||||||
|
<MakeDir Directories="$(AegisubBinaryDir)locale\%(MsgFmt.Filename)" />
|
||||||
|
<Exec Command="$(MsgFmtPath) -o $(AegisubBinaryDir)locale\%(MsgFmt.Filename)\aegisub.mo %(MsgFmt.Identity)" />
|
||||||
|
</Target>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -459,6 +459,9 @@
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ResourceCompile Include="$(SrcDir)res.rc" />
|
<ResourceCompile Include="$(SrcDir)res.rc" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<MsgFmt Include="$(AegisubSourceBase)po\*.po" />
|
||||||
|
</ItemGroup>
|
||||||
<ImportGroup Label="ExtensionTargets">
|
<ImportGroup Label="ExtensionTargets">
|
||||||
<Import Project="$(MSBuildThisFileDirectory)Aegisub.targets" />
|
<Import Project="$(MSBuildThisFileDirectory)Aegisub.targets" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
|
|
|
@ -78,6 +78,12 @@
|
||||||
DisplayName="Update Checker URL"
|
DisplayName="Update Checker URL"
|
||||||
Description="URL to get for updates."
|
Description="URL to get for updates."
|
||||||
/>
|
/>
|
||||||
|
<StringProperty
|
||||||
|
Name="MsgFmtPath"
|
||||||
|
Category="Config"
|
||||||
|
DisplayName="msgfmt.exe location"
|
||||||
|
Description="Location of msgfmt.exe, for compiling translations"
|
||||||
|
/>
|
||||||
|
|
||||||
<!-- External Libraries -->
|
<!-- External Libraries -->
|
||||||
<BoolProperty
|
<BoolProperty
|
||||||
|
|
Loading…
Reference in New Issue