diff options
-rw-r--r-- | mcs/tools/monkeydoc/Monkeydoc/providers/ecma-provider.cs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/mcs/tools/monkeydoc/Monkeydoc/providers/ecma-provider.cs b/mcs/tools/monkeydoc/Monkeydoc/providers/ecma-provider.cs index 2da43b8367e..d21e2f85974 100644 --- a/mcs/tools/monkeydoc/Monkeydoc/providers/ecma-provider.cs +++ b/mcs/tools/monkeydoc/Monkeydoc/providers/ecma-provider.cs @@ -97,7 +97,7 @@ namespace MonkeyDoc.Providers var members = membersNode.Elements ("Member").ToLookup (m => m.Element ("MemberType").Value); foreach (var memberType in members) { // We pluralize the member type to get the caption and take the first letter as URL - var node = typeNode.CreateNode (memberType.Key + 's', memberType.Key[0].ToString ()); + var node = typeNode.CreateNode (PluralizeMemberType (memberType.Key), memberType.Key[0].ToString ()); int memberIndex = 0; // We do not escape much member name here foreach (var member in memberType) @@ -111,6 +111,16 @@ namespace MonkeyDoc.Providers } } + string PluralizeMemberType (string memberType) + { + switch (memberType) { + case "Property": + return "Properties"; + default: + return memberType + "s"; + } + } + string MakeMemberCaption (XElement member) { var caption = (string)member.Attribute ("MemberName"); |