diff --git a/src/corelib/CurrentApp.cs b/src/corelib/CurrentApp.cs index ae5e0358..9944b3fc 100644 --- a/src/corelib/CurrentApp.cs +++ b/src/corelib/CurrentApp.cs @@ -212,7 +212,7 @@ public CurrentApp(bool IsPortable, string AppName) } // Generating User-Agent header for outgoing HTTP queries... - UserAgent = string.Format(Properties.Resources.AppDefUA, Platform.OSFriendlyName, Platform.UASuffix, Environment.OSVersion.Version.Major, Environment.OSVersion.Version.Minor, CultureInfo.CurrentCulture.Name, AppVersion, AppName, SystemArch); + UserAgent = string.Format(Properties.Resources.AppUserAgentTemplate, Platform.OSFriendlyName, Platform.UserAgentSuffix, Environment.OSVersion.Version.Major, Environment.OSVersion.Version.Minor, CultureInfo.CurrentCulture.Name, AppVersion, AppName, SystemArch); } } } diff --git a/src/corelib/CurrentPlatform.cs b/src/corelib/CurrentPlatform.cs index 76a54ae6..285f3bcc 100644 --- a/src/corelib/CurrentPlatform.cs +++ b/src/corelib/CurrentPlatform.cs @@ -250,7 +250,7 @@ public virtual void StartServiceRepair(string FullBinPath) /// /// Get platform-dependent suffix for HTTP_USER_AGENT header. /// - public virtual string UASuffix => Properties.Resources.AppUASuffixOther; + public virtual string UserAgentSuffix => Properties.Resources.AppUserAgentSuffixOther; /// /// Get current operating system ID. diff --git a/src/corelib/IPlatform.cs b/src/corelib/IPlatform.cs index 0e94f065..a2a27e83 100644 --- a/src/corelib/IPlatform.cs +++ b/src/corelib/IPlatform.cs @@ -80,7 +80,7 @@ public interface IPlatform /// /// Get platform-dependent suffix for HTTP_USER_AGENT header. /// - string UASuffix { get; } + string UserAgentSuffix { get; } /// /// Show the specified file in default file manager. diff --git a/src/corelib/PlatformWindows.cs b/src/corelib/PlatformWindows.cs index bc3c83b9..ec463b11 100644 --- a/src/corelib/PlatformWindows.cs +++ b/src/corelib/PlatformWindows.cs @@ -55,7 +55,7 @@ public override int StartElevatedProcess(string FileName, string Arguments) /// /// Get platform-dependent suffix for HTTP_USER_AGENT header. /// - public override string UASuffix => Properties.Resources.AppUASuffixWin; + public override string UserAgentSuffix => Properties.Resources.AppUserAgentSuffixWin; /// /// Get current operating system ID. diff --git a/src/corelib/Properties/Resources.Designer.cs b/src/corelib/Properties/Resources.Designer.cs index 66ef838e..606d0327 100644 --- a/src/corelib/Properties/Resources.Designer.cs +++ b/src/corelib/Properties/Resources.Designer.cs @@ -60,15 +60,6 @@ internal Resources() { } } - /// - /// Looks up a localized string similar to Mozilla/5.0 ({0} {1} {2}.{3}; {4}; rv:{5}) {6} ({7}). - /// - internal static string AppDefUA { - get { - return ResourceManager.GetString("AppDefUA", resourceCulture); - } - } - /// /// Looks up a localized string similar to "{0}". /// @@ -99,18 +90,27 @@ internal static string AppOpenHandlerMac { /// /// Looks up a localized string similar to (mono). /// - internal static string AppUASuffixOther { + internal static string AppUserAgentSuffixOther { get { - return ResourceManager.GetString("AppUASuffixOther", resourceCulture); + return ResourceManager.GetString("AppUserAgentSuffixOther", resourceCulture); } } /// /// Looks up a localized string similar to NT. /// - internal static string AppUASuffixWin { + internal static string AppUserAgentSuffixWin { + get { + return ResourceManager.GetString("AppUserAgentSuffixWin", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Mozilla/5.0 ({0} {1} {2}.{3}; {4}; rv:{5}) {6} ({7}). + /// + internal static string AppUserAgentTemplate { get { - return ResourceManager.GetString("AppUASuffixWin", resourceCulture); + return ResourceManager.GetString("AppUserAgentTemplate", resourceCulture); } } diff --git a/src/corelib/Properties/Resources.resx b/src/corelib/Properties/Resources.resx index ec8fdc84..f44f6f47 100644 --- a/src/corelib/Properties/Resources.resx +++ b/src/corelib/Properties/Resources.resx @@ -117,9 +117,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - Mozilla/5.0 ({0} {1} {2}.{3}; {4}; rv:{5}) {6} ({7}) - "{0}" @@ -129,12 +126,15 @@ open - + (mono) - + NT + + Mozilla/5.0 ({0} {1} {2}.{3}; {4}; rv:{5}) {6} ({7}) + backups