From b84a4f74e8b3dc981c8e8d8f01686b8cc5773dc9 Mon Sep 17 00:00:00 2001 From: Andre Rodrigues Date: Wed, 24 Nov 2010 15:50:01 -0800 Subject: [PATCH] Fixing a few more unlocalized exceptions. --HG-- branch : dev --- .../Modules/Orchard.Roles/Services/RoleService.cs | 4 ++-- src/Orchard/FileSystems/Media/FileSystemStorageProvider.cs | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Orchard.Web/Modules/Orchard.Roles/Services/RoleService.cs b/src/Orchard.Web/Modules/Orchard.Roles/Services/RoleService.cs index 051150e49..9e6815a38 100644 --- a/src/Orchard.Web/Modules/Orchard.Roles/Services/RoleService.cs +++ b/src/Orchard.Web/Modules/Orchard.Roles/Services/RoleService.cs @@ -84,7 +84,7 @@ namespace Orchard.Roles.Services { } } } - throw new ArgumentException("Permission " + permissionName + " was not found in any of the installed modules."); + throw new ArgumentException(T("Permission {0} was not found in any of the installed modules.", permissionName).ToString()); } private string GetPermissionDescription(string permissionName) { @@ -95,7 +95,7 @@ namespace Orchard.Roles.Services { } } } - throw new ArgumentException("Permission " + permissionName + " was not found in any of the installed modules."); + throw new ArgumentException(T("Permission {0} was not found in any of the installed modules.", permissionName).ToString()); } public void DeleteRole(int id) { diff --git a/src/Orchard/FileSystems/Media/FileSystemStorageProvider.cs b/src/Orchard/FileSystems/Media/FileSystemStorageProvider.cs index 26472144b..19e024a59 100644 --- a/src/Orchard/FileSystems/Media/FileSystemStorageProvider.cs +++ b/src/Orchard/FileSystems/Media/FileSystemStorageProvider.cs @@ -208,8 +208,12 @@ namespace Orchard.FileSystems.Media { public FileSystemStorageFolder(string path, DirectoryInfo directoryInfo) { _path = path; _directoryInfo = directoryInfo; + + T = NullLocalizer.Instance; } + public Localizer T { get; set; } + #region Implementation of IStorageFolder public string GetPath() { @@ -232,7 +236,7 @@ namespace Orchard.FileSystems.Media { if (_directoryInfo.Parent != null) { return new FileSystemStorageFolder(Path.GetDirectoryName(_path), _directoryInfo.Parent); } - throw new ArgumentException("Directory " + _directoryInfo.Name + " does not have a parent directory"); + throw new ArgumentException(T("Directory {0} does not have a parent directory", _directoryInfo.Name).ToString()); } #endregion