start using gettext-cs-utils (try: "SparkleShare --help" after setting language in Main)
This commit is contained in:
parent
19a3bcbc96
commit
adfad82bcf
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -41,6 +41,7 @@ build/m4/shave/shave-libtool
|
||||||
SparkleLib/Defines.cs
|
SparkleLib/Defines.cs
|
||||||
SparkleLib/windows/Defines.cs
|
SparkleLib/windows/Defines.cs
|
||||||
SparkleLib/windows/GlobalAssemblyInfo.cs
|
SparkleLib/windows/GlobalAssemblyInfo.cs
|
||||||
|
SparkleShare/Windows/Strings.cs
|
||||||
SparkleShare/sparkleshare
|
SparkleShare/sparkleshare
|
||||||
po/sparkleshare.pot
|
po/sparkleshare.pot
|
||||||
SparkleShare/Nautilus/sparkleshare-nautilus-extension.py
|
SparkleShare/Nautilus/sparkleshare-nautilus-extension.py
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
using System.Globalization;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
@ -44,7 +45,7 @@ namespace SparkleShare {
|
||||||
#if __MonoCS__
|
#if __MonoCS__
|
||||||
return Catalog.GetString (s);
|
return Catalog.GetString (s);
|
||||||
#else
|
#else
|
||||||
return s;
|
return Strings.T(s);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,6 +54,9 @@ namespace SparkleShare {
|
||||||
#endif
|
#endif
|
||||||
public static void Main (string [] args)
|
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
|
// Parse the command line options
|
||||||
bool show_help = false;
|
bool show_help = false;
|
||||||
OptionSet option_set = new OptionSet () {
|
OptionSet option_set = new OptionSet () {
|
||||||
|
|
|
@ -55,7 +55,12 @@
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="CefSharp, Version=0.3.4006.34354, Culture=neutral, processorArchitecture=x86" />
|
<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" />
|
||||||
|
<Reference Include="System.configuration" />
|
||||||
<Reference Include="System.Core">
|
<Reference Include="System.Core">
|
||||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
@ -137,6 +142,11 @@
|
||||||
<Compile Include="controls\TablessControl.cs">
|
<Compile Include="controls\TablessControl.cs">
|
||||||
<SubType>Component</SubType>
|
<SubType>Component</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="Strings.cs">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
<DependentUpon>Strings.tt</DependentUpon>
|
||||||
|
</Compile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\..\SparkleLib\Windows\SparkleLib.csproj">
|
<ProjectReference Include="..\..\SparkleLib\Windows\SparkleLib.csproj">
|
||||||
|
@ -271,5 +281,125 @@
|
||||||
<Link>plugins\own-server.xml</Link>
|
<Link>plugins\own-server.xml</Link>
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</None>
|
</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>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
10
SparkleShare/Windows/Strings.tt
Normal file
10
SparkleShare/Windows/Strings.tt
Normal 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" #>
|
|
@ -7,6 +7,11 @@ set msbuild="%WinDirNet%\v3.5\msbuild.exe"
|
||||||
if not exist %msbuild% set msbuild="%WinDirNet%\v4.0.30319\msbuild.exe"
|
if not exist %msbuild% set msbuild="%WinDirNet%\v4.0.30319\msbuild.exe"
|
||||||
set wixBinDir=%WIX%\bin
|
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
|
%msbuild% /t:Rebuild /p:Configuration=Release /p:Platform="Any CPU" %~dp0\SparkleShare.sln
|
||||||
|
|
||||||
if "%1"=="installer" (
|
if "%1"=="installer" (
|
||||||
|
|
Loading…
Reference in a new issue