start using gettext-cs-utils (try: "SparkleShare --help" after setting language in Main)

This commit is contained in:
wimh 2011-12-15 22:20:48 +01:00
parent 7d5336c6fe
commit 6cda13852c
5 changed files with 151 additions and 1 deletions

1
.gitignore vendored
View file

@ -41,6 +41,7 @@ build/m4/shave/shave-libtool
SparkleLib/Defines.cs
SparkleLib/windows/Defines.cs
SparkleLib/windows/GlobalAssemblyInfo.cs
SparkleShare/Windows/Strings.cs
SparkleShare/sparkleshare
po/sparkleshare.pot
SparkleShare/Nautilus/sparkleshare-nautilus-extension.py

View file

@ -18,6 +18,7 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Runtime.InteropServices;
using System.Text;
@ -44,7 +45,7 @@ namespace SparkleShare {
#if __MonoCS__
return Catalog.GetString (s);
#else
return s;
return Strings.T(s);
#endif
}
@ -53,6 +54,9 @@ namespace SparkleShare {
#endif
public static void Main (string [] args)
{
//var culture = CultureInfo.GetCultureInfo ("en"); // FIXME: test only
//System.Threading.Thread.CurrentThread.CurrentUICulture = culture;
// Parse the command line options
bool show_help = false;
OptionSet option_set = new OptionSet () {

View file

@ -55,7 +55,12 @@
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>
<Reference Include="CefSharp, Version=0.3.4006.34354, Culture=neutral, processorArchitecture=x86" />
<Reference Include="Gettext.Cs, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\tools\gettext-cs-utils\Gettext.CsUtils\Core\Gettext.Cs\bin\Release\Gettext.Cs.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.configuration" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
@ -137,6 +142,11 @@
<Compile Include="controls\TablessControl.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Strings.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Strings.tt</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\SparkleLib\Windows\SparkleLib.csproj">
@ -271,5 +281,125 @@
<Link>plugins\own-server.xml</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="..\..\po\ar.po">
<Link>po\ar.po</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="..\..\po\bg.po">
<Link>po\bg.po</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="..\..\po\ca.po">
<Link>po\ca.po</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="..\..\po\cs_CZ.po">
<Link>po\cs_CZ.po</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="..\..\po\da.po">
<Link>po\da.po</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="..\..\po\de.po">
<Link>po\de.po</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="..\..\po\el.po">
<Link>po\el.po</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="..\..\po\eo.po">
<Link>po\eo.po</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="..\..\po\es.po">
<Link>po\es.po</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="..\..\po\fi.po">
<Link>po\fi.po</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="..\..\po\fr.po">
<Link>po\fr.po</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="..\..\po\he.po">
<Link>po\he.po</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="..\..\po\hu.po">
<Link>po\hu.po</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="..\..\po\it.po">
<Link>po\it.po</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="..\..\po\ja.po">
<Link>po\ja.po</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="..\..\po\nl.po">
<Link>po\nl.po</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="..\..\po\nn_NO.po">
<Link>po\nn_NO.po</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="..\..\po\no_NO.po">
<Link>po\no_NO.po</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="..\..\po\pl.po">
<Link>po\pl.po</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="..\..\po\pt_BR.po">
<Link>po\pt_BR.po</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="..\..\po\ru.po">
<Link>po\ru.po</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="..\..\po\sk.po">
<Link>po\sk.po</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="..\..\po\sl.po">
<Link>po\sl.po</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="..\..\po\sr_RS.po">
<Link>po\sr_RS.po</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="..\..\po\sv.po">
<Link>po\sv.po</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="..\..\po\te.po">
<Link>po\te.po</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="..\..\po\uk.po">
<Link>po\uk.po</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="..\..\po\zh_CN.po">
<Link>po\zh_CN.po</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="..\..\po\zh_TW.po">
<Link>po\zh_TW.po</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Strings.tt">
<Generator>TextTemplatingFileGenerator</Generator>
<LastGenOutput>Strings.cs</LastGenOutput>
</None>
</ItemGroup>
</Project>

View file

@ -0,0 +1,10 @@
<#@ assembly name="System.Configuration" #>
<#
this.ClassName = "Strings";
this.ResourceName = "Strings";
this.NamespaceName = "SparkleShare";
this.DefaultResourceDir = "po";
this.DefaultFileFormat = "{{culture}}.po";
#>
<#@ include file="..\..\tools\gettext-cs-utils\Gettext.CsUtils\Core\Gettext.Cs\Templates\Strings.tt" #>

View file

@ -7,6 +7,11 @@ set msbuild="%WinDirNet%\v3.5\msbuild.exe"
if not exist %msbuild% set msbuild="%WinDirNet%\v4.0.30319\msbuild.exe"
set wixBinDir=%WIX%\bin
%msbuild% /t:Rebuild /p:Configuration=Release /p:Platform="AnyCPU" %~dp0..\..\tools\gettext-cs-utils\Gettext.CsUtils\Core\Gettext.Cs\Gettext.Cs.csproj
%msbuild% /t:Rebuild /p:Configuration=Release /p:Platform="Any CPU" %~dp0\SparkleShare.sln
if "%1"=="installer" (