mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-06-01 11:34:04 +02:00
Go fuck yourself CurrentCulture and stop messing with string interpolation
This commit is contained in:
parent
8de7e13aa3
commit
9811f40a53
@ -2,7 +2,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Globalization;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
@ -13,7 +12,7 @@ static class BrowserUtils{
|
|||||||
|
|
||||||
public static string HeaderAcceptLanguage{
|
public static string HeaderAcceptLanguage{
|
||||||
get{
|
get{
|
||||||
string culture = CultureInfo.CurrentCulture.Name;
|
string culture = Program.Culture.Name;
|
||||||
|
|
||||||
if (culture == "en"){
|
if (culture == "en"){
|
||||||
return "en-us,en";
|
return "en-us,en";
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
using CefSharp;
|
using CefSharp;
|
||||||
using System;
|
using System;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
using System.Globalization;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
@ -51,9 +52,15 @@ static class Program{
|
|||||||
public static UserConfig UserConfig { get; private set; }
|
public static UserConfig UserConfig { get; private set; }
|
||||||
public static SystemConfig SystemConfig { get; private set; }
|
public static SystemConfig SystemConfig { get; private set; }
|
||||||
public static Reporter Reporter { get; private set; }
|
public static Reporter Reporter { get; private set; }
|
||||||
|
public static CultureInfo Culture { get; }
|
||||||
|
|
||||||
public static event EventHandler UserConfigReplaced;
|
public static event EventHandler UserConfigReplaced;
|
||||||
|
|
||||||
|
static Program(){
|
||||||
|
Culture = CultureInfo.CurrentCulture;
|
||||||
|
Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
|
||||||
|
CultureInfo.DefaultThreadCurrentCulture = CultureInfo.InvariantCulture;
|
||||||
|
|
||||||
[STAThread]
|
[STAThread]
|
||||||
private static void Main(){
|
private static void Main(){
|
||||||
Application.EnableVisualStyles();
|
Application.EnableVisualStyles();
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Globalization;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
@ -32,7 +31,7 @@ public bool Log(string data){
|
|||||||
build.Append("Please, report all issues to: https://github.com/chylex/TweetDuck/issues\r\n\r\n");
|
build.Append("Please, report all issues to: https://github.com/chylex/TweetDuck/issues\r\n\r\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
build.Append("[").Append(DateTime.Now.ToString("G", CultureInfo.CurrentCulture)).Append("]\r\n");
|
build.Append("[").Append(DateTime.Now.ToString("G", Program.Culture)).Append("]\r\n");
|
||||||
build.Append(data).Append("\r\n\r\n");
|
build.Append(data).Append("\r\n\r\n");
|
||||||
|
|
||||||
try{
|
try{
|
||||||
|
Loading…
Reference in New Issue
Block a user