3
namespace = "MonoDevelop"
4
name = "Gettext Translations Support"
5
author = "Rafael 'Monoman' Teixeira\nDavid Makovský"
7
url = "http://www.monodevelop.com/"
8
description = "Provides support for adding/editing PO files."
9
category = "IDE extensions"
13
<Import assembly = "MonoDevelop.Gettext.dll"/>
17
<Addin id="Core" version="4.0.12"/>
18
<Addin id="Ide" version="4.0.12"/>
19
<Addin id="DesignerSupport" version="4.0.12"/>
20
<Addin id="Autotools" version="4.0.12"/>
21
<Addin id="Deployment" version="4.0.12"/>
24
<!-- Extension Points -->
26
<ExtensionPoint path = "/MonoDevelop/Deployment/ProjectBrowser/ContextMenu/TranslationProject" name="Translation project context menu">
27
<ExtensionNodeSet id="MonoDevelop.Components.Commands.ItemSet"/>
30
<ExtensionPoint path = "/MonoDevelop/Deployment/ProjectBrowser/ContextMenu/Translation" name="Translation context menu">
31
<ExtensionNodeSet id="MonoDevelop.Components.Commands.ItemSet"/>
34
<ExtensionPoint path = "/MonoDevelop/Gettext/FileScanners" name="File scanners">
35
<ExtensionNode name="Scanner" />
36
<ExtensionNode name="RegexScanner" type="MonoDevelop.Gettext.ExtensionNodes.RegexScannerExtensionNode" />
37
<ExtensionNode name="XmlRegexScanner" type="MonoDevelop.Gettext.ExtensionNodes.XmlRegexScannerExtensionNode" />
42
<Extension path = "/MonoDevelop/Core/Applications">
43
<Application id = "gettext-update" class = "MonoDevelop.Gettext.GettextTool" description = "Gettext update tool"/>
46
<Extension path = "/MonoDevelop/Ide/Commands">
47
<Command id = "MonoDevelop.Gettext.Commands.AddTranslation"
48
icon = "md-gettext-locale"
49
_label = "_Add Translation..."
50
_description = "Add another translation (language) for a solution or project" />
51
<Command id = "MonoDevelop.Gettext.Commands.UpdateTranslations"
52
_label = "U_pdate Translations"
53
_description = "Updates all translation files." />
54
<Command id = "MonoDevelop.Gettext.Commands.UpdateTranslation"
55
_label = "_Update Translation"
56
_description = "Updates this translation." />
57
<Command id = "MonoDevelop.Gettext.Commands.ScanForTranslations"
59
_label = "_Scan for Translations"
60
_description = "Include this file in the translations scan." />
63
<Extension path = "/MonoDevelop/Core/StockIcons">
64
<StockIcon stockid = "md-gettext-locale" resource = "locale_22x22.png" />
65
<StockIcon stockid = "md-gettext-locale" resource = "locale_16x16.png" size = "Menu" />
66
<StockIcon stockid = "md-gettext-locale" resource = "locale_22x22.png" size = "Button" />
67
<StockIcon stockid = "md-gettext-locale" resource = "locale_32x32.png" size = "Dnd" />
68
<StockIcon stockid = "md-gettext-project" icon = "md-project|res:gettext-overlay-16.png" size = "Menu" />
69
<StockIcon stockid = "md-gettext-project" icon = "md-project|res:gettext-overlay-32.png" size = "Dnd"/>
70
<StockIcon stockid = "md-po-file" resource = "locale_22x22.png" />
71
<StockIcon stockid = "md-po-file" resource = "locale_16x16.png" size = "Menu" />
72
<StockIcon stockid = "md-po-file" resource = "locale_22x22.png" size = "Button" />
73
<StockIcon stockid = "md-po-file" resource = "locale_32x32.png" size = "Dnd" />
74
<!-- <StockIcon stockid = "md-translation-fuzzy" resource = "translation-fuzzy-16.png" size = "Menu"/>
75
<StockIcon stockid = "md-translation-missing" resource = "translation-missing-16.png" size = "Menu"/>
76
<StockIcon stockid = "md-translation-valid" resource = "translation-valid-16.png" size = "Menu"/>-->
77
<StockIcon stockid = "silk_accept" resource = "silk_accept.png" size = "Menu"/>
78
<StockIcon stockid = "silk_error" resource = "silk_error.png" size = "Menu"/>
79
<StockIcon stockid = "silk_exclamation" resource = "silk_exclamation.png" size = "Menu"/>
82
<Extension path = "/MonoDevelop/Core/MimeTypes">
83
<MimeType id="text/x-gettext-translation" icon="md-po-file" isText="true">
84
<File pattern="*.po" />
88
<Extension path = "/MonoDevelop/Ide/FileFilters">
89
<FileFilter id = "PoFiles" _label = "PO Files" extensions = "*.po"/>
92
<Extension path = "/MonoDevelop/Ide/DisplayBindings">
93
<DisplayBinding id = "GettextEditor" insertbefore ="DefaultDisplayBinding" class = "MonoDevelop.Gettext.GettextEditorDisplayBinding"/>
96
<Extension path = "/MonoDevelop/ProjectModel/SerializableClasses">
97
<DataType class = "MonoDevelop.Gettext.TranslationProject" />
98
<DataType class = "MonoDevelop.Gettext.TranslationProjectConfiguration" />
101
<Extension path = "/MonoDevelop/Ide/ContextMenu/ProjectPad">
102
<Condition id="ItemType" value="MonoDevelop.Gettext.Translation">
103
<CommandItem id = "MonoDevelop.Ide.Commands.ViewCommands.Open" insertafter="ActionsSectionEnd" />
104
<CommandItem id = "MonoDevelop.Gettext.Commands.UpdateTranslation" />
106
<Condition id="ItemType" value="MonoDevelop.Gettext.TranslationProject">
107
<CommandItem id = "MonoDevelop.Gettext.Commands.UpdateTranslations" />
108
<CommandItem id = "MonoDevelop.Gettext.Commands.AddTranslation"/>
112
<Extension path = "/MonoDevelop/Ide/ContextMenu/ProjectPad/QuickProperties">
113
<Condition id="ItemType" value="ProjectFile">
114
<CommandItem id = "MonoDevelop.Gettext.Commands.ScanForTranslations"
115
insertafter = "MonoDevelop.Autotools.Commands.SynchWithMakefile" />
119
<Extension path = "/MonoDevelop/Ide/ProjectTemplates">
120
<ProjectTemplate id = "MonoDevelop.Gettext.TranslationInfo" resource = "TranslationProject.xpt.xml" />
123
<Extension path = "/MonoDevelop/Ide/Pads/ProjectPad">
124
<NodeBuilder class = "MonoDevelop.Gettext.NodeBuilders.TranslationProjectNodeBuilder"/>
125
<NodeBuilder class = "MonoDevelop.Gettext.NodeBuilders.TranslationNodeBuilder"/>
126
<NodeBuilder class = "MonoDevelop.Gettext.NodeBuilders.ProjectFileNodeBuilderExtension"/>
129
<Extension path = "/MonoDevelop/DesignerSupport/PropertyProviders">
130
<Class class = "MonoDevelop.Gettext.PropertyProvider"/>
133
<Extension path = "/MonoDevelop/ProjectModel/ExtendedProperties">
134
<ItemProperty class = "MonoDevelop.Projects.ProjectFile"
135
name = "Gettext.ScanForTranslations" type = "System.Boolean" />
138
<Extension path = "/MonoDevelop/Ide/ProjectFeatures">
139
<Class class = "MonoDevelop.Gettext.GettextFeature" />
142
<Extension path = "/MonoDevelop/Autotools/MakefileHandlers">
143
<Class class = "MonoDevelop.Gettext.MakefileHandler"/>
146
<Extension path = "/MonoDevelop/Gettext/FileScanners">
147
<XmlRegexScanner extension="glade">
148
<Include regex='translatable\s*=\s*"yes"\s*>([^<]*)<' escapeMode="Xml" />
150
<XmlRegexScanner extension="xml" mimeType="application/xml">
151
<Include regex='\s_[-A-Za-z0-9._:]+\s*=\s*"([^"]+)"' escapeMode="Xml" />
152
<Include regex="<_[^>]+>((?:.|\n)*?)</_[^>]+>" escapeMode="Xml" />
154
<RegexScanner extension="vb">
155
<Exclude regex='".*?[^"]"(?!")' /> <!-- Strings-->
156
<Exclude regex="'(?:(?!').)*" /> <!-- Line comments -->
157
<Include regex='GetString\s*\(\s*"(.*?[^\\])"' />
158
<Include regex='GetPluralString\s*\(\s*"(.*?[^\\])"\s*,\s*"(.*?[^\\])"' plural="true"/>
159
<Transform regex='""' value='"' />
161
<RegexScanner extension="boo">
162
<Exclude regex='".*?"' /> <!-- Strings -->
163
<Exclude regex="'.*?'" /> <!-- Strings -->
164
<Exclude regex='"""(?:.|\n)*?"""' /> <!-- Strings -->
165
<Exclude regex='//(?:(?!//).)*' /> <!-- Line comments -->
166
<Exclude regex='/\*(?:.|\n)*?\*/' /> <!-- Block comments -->
167
<Include regex='GetString\s*\(\s*"(.*?[^\\])"' />
168
<Include regex='GetPluralString\s*\(\s*"(.*?[^\\])"\s*,\s*"(.*?[^\\])"' plural="true"/>
170
<RegexScanner extension="cs">
171
<Exclude regex='@".*?"' /> <!-- Strings starting with @ -->
172
<Exclude regex='(?<!@)".*?(?<!\\)"' /> <!-- Strings-->
173
<Exclude regex='//(?:(?!//).)*' /> <!-- Line comments -->
174
<Exclude regex='/\*(?:.|\n)*?\*/' /> <!-- Block comments -->
176
<Include regex='\[\s*LocalizedDisplayName?\s*\(\s*"(.*?[^\\])"\s*\)\s*\]' regexOptions="Singleline" escapeMode="CSharp"/>
177
<Include regex='\[\s*LocalizedDescription\s*\(\s*"(.*?[^\\])"\s*\)\s*\]' regexOptions="Singleline" escapeMode="CSharp"/>
178
<Include regex='\[\s*LocalizedCategory\s*\(\s*"(.*?[^\\])"\s*\)\s*\]' regexOptions="Singleline" escapeMode="CSharp"/>
180
<Include regex='GetString\s*\(\s*"(.*?[^\\])"\s*[,\)]' regexOptions="Singleline" escapeMode="CSharp"/>
181
<Include regex='GetString\s*\(\s*"(.*?[^\\])"\s*[,\)]' regexOptions="Singleline" escapeMode="CSharp"/>
183
<Include regex='GetString\s*\(\s*"(.*?[^\\])"\s*[,\)]' regexOptions="Singleline" escapeMode="CSharp"/>
185
<Include regex='GetString\s*\(\s*"(.*?[^\\])"\s*[,\)]' regexOptions="Singleline" escapeMode="CSharp"/>
186
<Include regex='GetPluralString\s*\(\s*"(.*?[^\\])"\s*,\s*"(.*?[^\\])"\s*[,\)]' plural="true" regexOptions="Singleline" escapeMode="CSharp"/>
187
<Include regex='GetString\s*\(\s*@"(.*?[^\\])"\s*[,\)]' regexOptions="Singleline" escapeMode="CSharpVerbatim"/>
188
<Include regex='GetPluralString\s*\(\s*@"(.*?[^\\])"\s*,\s*@"(.*?[^\\])"\s*[,\)]' plural="true" regexOptions="Singleline" escapeMode="CSharpVerbatim"/>
189
<Transform regex='([^\\])"\s*\+\s*"' value='$1' regexOptions="Singleline"/><!-- strip out "+" concatenations -->
191
<Include regex='\[\s*IssueDescription\s*\(\s*"(.*?[^\\])".*\)\s*\]' regexOptions="Singleline" escapeMode="CSharp"/>
192
<Include regex='\[\s*ContextAction\s*\(\s*"(.*?[^\\])".*\)\s*\]' regexOptions="Singleline" escapeMode="CSharp"/>
193
<Include regex='TranslateString\s*\(\s*"(.*?[^\\])"\s*[\)]' regexOptions="Singleline" escapeMode="CSharp"/>