Untabifying Text class

This commit is contained in:
Lombiq
2015-04-15 20:34:28 +02:00
committed by Zoltán Lehóczky
parent ef135d348c
commit 566d23ec55

View File

@@ -22,17 +22,17 @@ namespace Orchard.Localization {
Logger.Debug("{0} localizing '{1}'", _scope, textHint);
var workContext = _workContextAccessor.GetContext();
if (workContext != null) {
var currentCulture = workContext.CurrentCulture;
var localizedFormat = _localizedStringManager.GetLocalizedString(_scope, textHint, currentCulture);
if (workContext != null) {
var currentCulture = workContext.CurrentCulture;
var localizedFormat = _localizedStringManager.GetLocalizedString(_scope, textHint, currentCulture);
return args.Length == 0
? new LocalizedString(localizedFormat, _scope, textHint, args)
: new LocalizedString(string.Format(GetFormatProvider(currentCulture), localizedFormat, args), _scope, textHint, args);
}
return args.Length == 0
? new LocalizedString(localizedFormat, _scope, textHint, args)
: new LocalizedString(string.Format(GetFormatProvider(currentCulture), localizedFormat, args), _scope, textHint, args);
}
return new LocalizedString(textHint, _scope, textHint, args);
return new LocalizedString(textHint, _scope, textHint, args);
}
private static IFormatProvider GetFormatProvider(string currentCulture) {