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" />
|
||||
</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>
|
||||
|
|
|
@ -459,6 +459,9 @@
|
|||
<ItemGroup>
|
||||
<ResourceCompile Include="$(SrcDir)res.rc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<MsgFmt Include="$(AegisubSourceBase)po\*.po" />
|
||||
</ItemGroup>
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
<Import Project="$(MSBuildThisFileDirectory)Aegisub.targets" />
|
||||
</ImportGroup>
|
||||
|
|
|
@ -78,6 +78,12 @@
|
|||
DisplayName="Update Checker URL"
|
||||
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 -->
|
||||
<BoolProperty
|
||||
|
|
Loading…
Reference in New Issue