Fixed issue #81, Unicode support, thanks to Colm.
Fixed a debug commit which made the CommandLine version exit immediately. Added a safeguard for broken language selections in the database. git-svn-id: https://duplicati.googlecode.com/svn/trunk@224 59da171f-624f-0410-aa54-27559c288bec
This commit is contained in:
@@ -27,9 +27,6 @@ namespace Duplicati.CommandLine
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Console.WriteLine(Strings.Program.AddedFoldersHeader);
|
||||
return;
|
||||
|
||||
List<string> cargs = new List<string>(args);
|
||||
string filter = Duplicati.Library.Core.FilenameFilter.EncodeAsFilter(Duplicati.Library.Core.FilenameFilter.ParseCommandLine(cargs, true));
|
||||
|
||||
|
||||
@@ -136,9 +136,17 @@ namespace Duplicati.GUI
|
||||
DataConnection = new DataFetcherWithRelations(new SQLiteDataProvider(con));
|
||||
|
||||
if (!string.IsNullOrEmpty(new Datamodel.ApplicationSettings(DataConnection).DisplayLanguage))
|
||||
System.Threading.Thread.CurrentThread.CurrentUICulture =
|
||||
System.Threading.Thread.CurrentThread.CurrentCulture =
|
||||
System.Globalization.CultureInfo.GetCultureInfo(new Datamodel.ApplicationSettings(DataConnection).DisplayLanguage);
|
||||
try
|
||||
{
|
||||
System.Threading.Thread.CurrentThread.CurrentUICulture =
|
||||
System.Threading.Thread.CurrentThread.CurrentCulture =
|
||||
System.Globalization.CultureInfo.GetCultureInfo(new Datamodel.ApplicationSettings(DataConnection).DisplayLanguage);
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
MessageBox.Show(string.Format(Strings.Program.LanguageSelectionError, ex.Message), Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
return;
|
||||
}
|
||||
|
||||
TrayIcon = new NotifyIcon();
|
||||
TrayIcon.ContextMenuStrip = new ContextMenuStrip();
|
||||
|
||||
+9
@@ -78,6 +78,15 @@ namespace Duplicati.GUI.Strings {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Failed to set the user interface language: {0}.
|
||||
/// </summary>
|
||||
internal static string LanguageSelectionError {
|
||||
get {
|
||||
return ResourceManager.GetString("LanguageSelectionError", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Quit.
|
||||
/// </summary>
|
||||
|
||||
@@ -125,6 +125,10 @@
|
||||
<value>Failed to create, open or upgrade the database.\r\nError message: {0}</value>
|
||||
<comment>An error message displayed when opening the database fails</comment>
|
||||
</data>
|
||||
<data name="LanguageSelectionError" xml:space="preserve">
|
||||
<value>Failed to set the user interface language: {0}</value>
|
||||
<comment>An error message displayed if the language cannot be selected</comment>
|
||||
</data>
|
||||
<data name="MenuQuit" xml:space="preserve">
|
||||
<value>Quit</value>
|
||||
<comment>Text for the quit menu in the trayicon context menu</comment>
|
||||
|
||||
@@ -235,7 +235,12 @@ namespace Duplicati.Library.Compression
|
||||
return new StreamWrapper(new Duplicati.Library.Core.TempFile(), PathFromFilesystem(file), m_zip);
|
||||
#else
|
||||
//This automatically sets DateTime to now
|
||||
m_stream.PutNextEntry(new ICSharpCode.SharpZipLib.Zip.ZipEntry(PathFromFilesystem(file)));
|
||||
ICSharpCode.SharpZipLib.Zip.ZipEntry ze = new ICSharpCode.SharpZipLib.Zip.ZipEntry(PathFromFilesystem(file));
|
||||
|
||||
//Encode filenames as unicode, we do this for all files, to avoid codepage issues
|
||||
ze.Flags |= (int)ICSharpCode.SharpZipLib.Zip.GeneralBitFlags.UnicodeText;
|
||||
|
||||
m_stream.PutNextEntry(ze);
|
||||
return new StreamWrapper2(m_stream);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
1.0.1 r215 05 jul 2009
|
||||
Fixes to a restore problem when restoring the setup
|
||||
Added a debug option for the SSH backend
|
||||
Added localization support
|
||||
|
||||
1.0.0 - 09 jun 2009
|
||||
Reference in New Issue
Block a user