Move translations initialization to SparkleUI and add translations to Mac UI
This commit is contained in:
parent
04dcdb72a2
commit
80eadff9e1
|
@ -105,7 +105,7 @@ namespace SparkleLib {
|
|||
config = config.Replace ("fetch = +refs/heads/*:refs/remotes/origin/*",
|
||||
"fetch = +refs/heads/*:refs/remotes/origin/*" + Environment.NewLine +
|
||||
"\tfetch = +refs/notes/*:refs/notes/*");
|
||||
Console.WriteLine (">>>>>>>>>>>>>>>" + config);
|
||||
|
||||
// Add user info
|
||||
string n = Environment.NewLine;
|
||||
XmlDocument xml = new XmlDocument();
|
||||
|
|
|
@ -96,6 +96,81 @@
|
|||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Info.plist" />
|
||||
<None Include="..\..\po\ar.po">
|
||||
<Link>Translations\ar.po</Link>
|
||||
</None>
|
||||
<None Include="..\..\po\bg.po">
|
||||
<Link>Translations\bg.po</Link>
|
||||
</None>
|
||||
<None Include="..\..\po\ca.po">
|
||||
<Link>Translations\ca.po</Link>
|
||||
</None>
|
||||
<None Include="..\..\po\cs_CZ.po">
|
||||
<Link>Translations\cs_CZ.po</Link>
|
||||
</None>
|
||||
<None Include="..\..\po\da.po">
|
||||
<Link>Translations\da.po</Link>
|
||||
</None>
|
||||
<None Include="..\..\po\de.po">
|
||||
<Link>Translations\de.po</Link>
|
||||
</None>
|
||||
<None Include="..\..\po\el.po">
|
||||
<Link>Translations\el.po</Link>
|
||||
</None>
|
||||
<None Include="..\..\po\eo.po">
|
||||
<Link>Translations\eo.po</Link>
|
||||
</None>
|
||||
<None Include="..\..\po\es.po">
|
||||
<Link>Translations\es.po</Link>
|
||||
</None>
|
||||
<None Include="..\..\po\fi.po">
|
||||
<Link>Translations\fi.po</Link>
|
||||
</None>
|
||||
<None Include="..\..\po\fr.po">
|
||||
<Link>Translations\fr.po</Link>
|
||||
</None>
|
||||
<None Include="..\..\po\he.po">
|
||||
<Link>Translations\he.po</Link>
|
||||
</None>
|
||||
<None Include="..\..\po\hu.po">
|
||||
<Link>Translations\hu.po</Link>
|
||||
</None>
|
||||
<None Include="..\..\po\it.po">
|
||||
<Link>Translations\it.po</Link>
|
||||
</None>
|
||||
<None Include="..\..\po\ja.po">
|
||||
<Link>Translations\ja.po</Link>
|
||||
</None>
|
||||
<None Include="..\..\po\nl.po">
|
||||
<Link>Translations\nl.po</Link>
|
||||
</None>
|
||||
<None Include="..\..\po\no_NO.po">
|
||||
<Link>Translations\no_NO.po</Link>
|
||||
</None>
|
||||
<None Include="..\..\po\pl.po">
|
||||
<Link>Translations\pl.po</Link>
|
||||
</None>
|
||||
<None Include="..\..\po\pt_BR.po">
|
||||
<Link>Translations\pt_BR.po</Link>
|
||||
</None>
|
||||
<None Include="..\..\po\ru.po">
|
||||
<Link>Translations\ru.po</Link>
|
||||
</None>
|
||||
<None Include="..\..\po\sv.po">
|
||||
<Link>Translations\sv.po</Link>
|
||||
</None>
|
||||
<None Include="..\..\po\te.po">
|
||||
<Link>Translations\te.po</Link>
|
||||
</None>
|
||||
<None Include="..\..\po\uk.po">
|
||||
<Link>Translations\uk.po</Link>
|
||||
</None>
|
||||
<None Include="..\..\po\zh_CN.po">
|
||||
<Link>Translations\zh_CN.po</Link>
|
||||
</None>
|
||||
<None Include="..\..\po\zh_TW.po">
|
||||
<Link>Translations\zh_TW.po</Link>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\Mono\MonoMac\v0.0\Mono.MonoMac.targets" />
|
||||
|
@ -170,12 +245,10 @@
|
|||
<Content Include="..\..\data\icons\document-moved-12.png">
|
||||
<Link>Pixmaps\document-moved-12.png</Link>
|
||||
</Content>
|
||||
<Content Include="..\..\data\html\jquery.js">
|
||||
<Link>HTML\jquery.js</Link>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Pixmaps\" />
|
||||
<Folder Include="HTML\" />
|
||||
<Folder Include="Translations\" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -21,6 +21,7 @@ using System.Drawing;
|
|||
using System.IO;
|
||||
using System.Timers;
|
||||
|
||||
using Mono.Unix;
|
||||
using MonoMac.Foundation;
|
||||
using MonoMac.AppKit;
|
||||
using MonoMac.ObjCRuntime;
|
||||
|
@ -71,6 +72,11 @@ namespace SparkleShare {
|
|||
Dlfcn.dlopen (growl_path, 0);
|
||||
NSApplication.Init ();
|
||||
|
||||
// Use translations
|
||||
Catalog.Init ("sparkleshare",
|
||||
Path.Combine (NSBundle.MainBundle.ResourcePath, "Translations"));
|
||||
|
||||
|
||||
using (NSAutoreleasePool pool = new NSAutoreleasePool ()) {
|
||||
|
||||
// Needed for Growl
|
||||
|
|
|
@ -45,9 +45,6 @@ namespace SparkleShare {
|
|||
|
||||
public static void Main (string [] args)
|
||||
{
|
||||
// Use translations
|
||||
Catalog.Init (Defines.GETTEXT_PACKAGE, Defines.LOCALE_DIR);
|
||||
|
||||
// Don't allow running as root on Linux or Mac
|
||||
if ((SparkleBackend.Platform == PlatformID.Unix ||
|
||||
SparkleBackend.Platform == PlatformID.MacOSX) &&
|
||||
|
|
|
@ -49,6 +49,9 @@ namespace SparkleShare {
|
|||
// Initialize the application
|
||||
Application.Init ();
|
||||
|
||||
// Use translations
|
||||
Catalog.Init (Defines.GETTEXT_PACKAGE, Defines.LOCALE_DIR);
|
||||
|
||||
// Create the statusicon
|
||||
StatusIcon = new SparkleStatusIcon ();
|
||||
|
||||
|
|
Loading…
Reference in a new issue