Skip to content

Commit

Permalink
Fixes #339, localization not working on custom attributes.
Browse files Browse the repository at this point in the history
  • Loading branch information
NightOwl888 committed Aug 1, 2014
1 parent 6e10aef commit a32c298
Showing 1 changed file with 5 additions and 5 deletions.
Expand Up @@ -23,11 +23,9 @@ public void HandleResourceAttribute(string attributeName, ref string value, ref
if (((trimmedText.Length > 10)) && trimmedText.ToLower(CultureInfo.InvariantCulture).StartsWith("$resources:", StringComparison.Ordinal))
{
resourceString = trimmedText.Substring(11);
string resourceLocation;
string resourceName;
var index = resourceString.IndexOf(',');
resourceLocation = resourceString.Substring(0, index);
resourceName = resourceString.Substring(index + 1);
string resourceLocation = resourceString.Substring(0, index);
string resourceName = resourceString.Substring(index + 1);
var length = resourceName.IndexOf(',');
if (length != -1)
{
Expand All @@ -36,7 +34,9 @@ public void HandleResourceAttribute(string attributeName, ref string value, ref
}
else
{
value = null;
// Fixes #339, return string datatype (rather than null) so custom
// attributes can still be identified as string vs another datatype.
value = string.Empty;
}
if (explicitResourceKeys == null)
{
Expand Down

0 comments on commit a32c298

Please sign in to comment.