[tasque/xbuild] [xbuild] Add Translate target
- From: Antonius Riha <antoniusri src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tasque/xbuild] [xbuild] Add Translate target
- Date: Tue, 18 Sep 2012 14:46:06 +0000 (UTC)
commit 5507fdfeb66b50bd85a352b7ba792cf6ee0a47e1
Author: Antonius Riha <antoniusriha gmail com>
Date: Tue Sep 18 12:09:08 2012 +0200
[xbuild] Add Translate target
This target provides the service to merge translations into translatable
text files (e.g. a .desktop file)
build/Tasque.targets | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
---
diff --git a/build/Tasque.targets b/build/Tasque.targets
index e8f89a4..27878b6 100644
--- a/build/Tasque.targets
+++ b/build/Tasque.targets
@@ -4,6 +4,10 @@
<_tmpInstallFileNames>obj\Tasque.RelInstallFileNames.txt</_tmpInstallFileNames>
<OutputPath>.</OutputPath>
<SrcDir Condition=" '$(SrcDir)' == '' ">.</SrcDir>
+ <!-- TopBuildDir is usually TopSrcDir, hence default to TopSrcDir -->
+ <TopBuildDir Condition=" '$(TopBuildDir)' == '' ">$(TopSrcDir)</TopBuildDir>
+ <PoSrcDir Condition=" '$(PoSrcDir)' == '' ">$(AbsTopSrcDir)\po</PoSrcDir>
+ <PoBuildDir Condition=" '$(PoBuildDir)' == '' ">$(TopBuildDir)\po</PoBuildDir>
<LibDir Condition=" '$(LibDir)' == '' ">$(Prefix)\lib</LibDir>
<BinDir Condition=" '$(BinDir)' == '' ">$(Prefix)\bin</BinDir>
<PkgLibDir Condition=" '$(PkgLibDir)' == '' ">$(LibDir)\$(PackageName)</PkgLibDir>
@@ -15,6 +19,18 @@
<Wrapper Condition=" '$(Wrapper)' == '' ">$(PackageName)</Wrapper>
<Version Condition=" '$(Version)' == '' ">1.0.0</Version>
</PropertyGroup>
+ <Choose>
+ <When Condition=" '$(OS)' == 'Windows_NT' ">
+ <PropertyGroup>
+ <IntlToolMerge Condition=" '$(IntlToolMerge)' == '' ">$(MSBuildProgramFiles32)\GnuWin32\bin\intltool-merge.exe</IntlToolMerge>
+ </PropertyGroup>
+ </When>
+ <Otherwise>
+ <PropertyGroup>
+ <IntlToolMerge Condition=" '$(IntlToolMerge)' == '' ">intltool-merge</IntlToolMerge>
+ </PropertyGroup>
+ </Otherwise>
+ </Choose>
<ItemGroup>
<InstallFileName Include="$(TargetFileName)" />
<Substitution Include="@prefix@|$(Prefix)|text" />
@@ -44,6 +60,14 @@
<Substitute SourceFiles="@(_SubstSourceFiles)" DestinationFiles="@(_SubstDestFiles)" Substitutions="@(Substitution)" />
</Target>
+ <!-- Translate -->
+ <Target Name="Translate" DependsOnTargets="BeforeTranslate;CoreTranslate;AfterTranslate" />
+ <Target Name="BeforeTranslate" />
+ <Target Name="AfterTranslate" />
+ <Target Name="CoreTranslate" Condition=" '@(Translate)' != '' ">
+ <Exec Command="LC_ALL=C $(IntlToolMerge) -d -u -c $(PoBuildDir)\.intltool-merge-cache $(PoSrcDir) $(SrcDir)\%(Translate.RelativeDir)%(FileName)%(Extension) %(RelativeDir)%(FileName)" />
+ </Target>
+
<!-- Uninstall -->
<Target Name="Uninstall" DependsOnTargets="BeforeUninstall;CoreUninstall;AfterUninstall" />
<Target Name="BeforeUninstall" />
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]