diff options
author | Matt Ward <matt.ward@xamarin.com> | 2017-06-12 13:42:14 +0300 |
---|---|---|
committer | Matt Ward <matt.ward@xamarin.com> | 2017-06-12 13:42:14 +0300 |
commit | 7f492a4deb7625208596a64307e89d95b27317ef (patch) | |
tree | d5c4eeedc6ec20cf8924f7004ba53f87cb2c9308 /main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Codons | |
parent | 6d1da6cf5783eed561498d818eb6bbe367a40f41 (diff) |
[Ide] Fix project template categories not added to translations
The project template categories were defined in the .addin.xml file
using an attribute without an underscore so they were not added
to the translations. The project template categories now use _name
for the category name so they are added to the translations. To
maintain backwards compatibility the name attribute without the
underscore is still supported.
<Category id="library" _name="Library">
Diffstat (limited to 'main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Codons')
-rw-r--r-- | main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Codons/TemplateCategoryCodon.cs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Codons/TemplateCategoryCodon.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Codons/TemplateCategoryCodon.cs index 575bdbb12b..14ac00dea9 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Codons/TemplateCategoryCodon.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Codons/TemplateCategoryCodon.cs @@ -27,6 +27,7 @@ using Mono.Addins;
using MonoDevelop.Ide.Templates;
using MonoDevelop.Core;
+using System;
using System.Linq;
namespace MonoDevelop.Ide.Codons
@@ -34,9 +35,13 @@ namespace MonoDevelop.Ide.Codons [ExtensionNode (Description="A template category.")]
internal class TemplateCategoryCodon : ExtensionNode
{
+ [ObsoleteAttribute ("This is ignored when generating translations.")]
[NodeAttribute ("name", "Name of the category.", Localizable=true)]
string name;
+ [NodeAttribute ("_name", "Name of the category.", Localizable=true)]
+ string _name;
+
[NodeAttribute("icon", "Icon for the category.")]
string icon;
@@ -48,7 +53,7 @@ namespace MonoDevelop.Ide.Codons public TemplateCategory ToTemplateCategory ()
{
- var category = new TemplateCategory (Id, name, icon);
+ var category = new TemplateCategory (Id, _name ?? name, icon);
category.MappedCategories = mappedCategories;
category.IsDefault = IsDefaultCategory ();
|