Welcome to mirror list, hosted at ThFree Co, Russian Federation.

MonoDevelop.Gettext.addin.xml « MonoDevelop.Gettext « addins « src « main - github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 8b82012596177be3a4a4401f405e3e351c347f89 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
<Addin
        id = "Gettext"
        namespace = "MonoDevelop"
        name = "Gettext Translations Support"
        author = "Rafael 'Monoman' Teixeira\nDavid Makovský"
        copyright = "X11"
        url = "http://www.monodevelop.com/"
        description = "Provides support for adding/editing PO files."
        category = "IDE extensions"
        version = "2.8.2">

	<Runtime>
		<Import assembly = "MonoDevelop.Gettext.dll"/>
	</Runtime>

	<Dependencies>
		<Addin id="Core" version="2.8.2"/>
		<Addin id="Ide" version="2.8.2"/>
		<Addin id="DesignerSupport" version="2.8.2"/>
		<Addin id="Autotools" version="2.8.2"/>
		<Addin id="Deployment" version="2.8.2"/>
	</Dependencies>
	
	<!-- Extension Points -->
	
	<ExtensionPoint path = "/MonoDevelop/Deployment/ProjectBrowser/ContextMenu/TranslationProject" name="Translation project context menu">
		<ExtensionNodeSet id="MonoDevelop.Components.Commands.ItemSet"/>
	</ExtensionPoint>
	
	<ExtensionPoint path = "/MonoDevelop/Deployment/ProjectBrowser/ContextMenu/Translation" name="Translation context menu">
		<ExtensionNodeSet id="MonoDevelop.Components.Commands.ItemSet"/>
	</ExtensionPoint>

	<ExtensionPoint path = "/MonoDevelop/Gettext/FileScanners" name="File scanners">
		<ExtensionNode name="Scanner" />
		<ExtensionNode name="RegexScanner" type="MonoDevelop.Gettext.ExtensionNodes.RegexScannerExtensionNode" />
		<ExtensionNode name="XmlRegexScanner" type="MonoDevelop.Gettext.ExtensionNodes.XmlRegexScannerExtensionNode" />
	</ExtensionPoint>
	
	<!-- Extensions -->

	<Extension path = "/MonoDevelop/Core/Applications">
		<Application id = "gettext-update" class = "MonoDevelop.Gettext.GettextTool" description = "Gettext update tool"/>
	</Extension>
	
	<Extension path = "/MonoDevelop/Ide/Commands">
		<Command id   = "MonoDevelop.Gettext.Commands.AddTranslation"
		         icon = "md-gettext-locale"
		         _label = "_Add Translation..."
			     _description = "Add another translation (language) for a solution or project" />
		<Command id   = "MonoDevelop.Gettext.Commands.UpdateTranslations"
		         _label = "U_pdate Translations"
		         _description = "Updates all translation files." />
		<Command id   = "MonoDevelop.Gettext.Commands.UpdateTranslation"
		         _label = "_Update Translation"
		         _description = "Updates this translation." />
		<Command id           = "MonoDevelop.Gettext.Commands.ScanForTranslations"
		         type         = "check"
		         _label       = "_Scan for Translations"
		         _description = "Include this file in the translations scan." />
	</Extension>
	
	<Extension path = "/MonoDevelop/Core/StockIcons">
		<StockIcon stockid = "md-gettext-locale" resource = "locale_22x22.png" />
		<StockIcon stockid = "md-gettext-locale" resource = "locale_16x16.png" size = "Menu" />
		<StockIcon stockid = "md-gettext-locale" resource = "locale_22x22.png" size = "Button" />
		<StockIcon stockid = "md-gettext-locale" resource = "locale_32x32.png" size = "Dnd" />
		<StockIcon stockid = "md-gettext-project" icon = "md-project|res:gettext-overlay-16.png" size = "Menu" />
		<StockIcon stockid = "md-gettext-project" icon = "md-project|res:gettext-overlay-32.png" size = "Dnd"/>
		<StockIcon stockid = "md-po-file" resource = "locale_22x22.png" />
		<StockIcon stockid = "md-po-file" resource = "locale_16x16.png" size = "Menu" />
		<StockIcon stockid = "md-po-file" resource = "locale_22x22.png" size = "Button" />
		<StockIcon stockid = "md-po-file" resource = "locale_32x32.png" size = "Dnd" />
<!--		<StockIcon stockid = "md-translation-fuzzy" resource = "translation-fuzzy-16.png" size = "Menu"/>
		<StockIcon stockid = "md-translation-missing" resource = "translation-missing-16.png" size = "Menu"/>
		<StockIcon stockid = "md-translation-valid" resource = "translation-valid-16.png" size = "Menu"/>-->
		<StockIcon stockid = "silk_accept" resource = "silk_accept.png" size = "Menu"/>
		<StockIcon stockid = "silk_error" resource = "silk_error.png" size = "Menu"/>
		<StockIcon stockid = "silk_exclamation" resource = "silk_exclamation.png" size = "Menu"/>
	</Extension>
	
	<Extension path = "/MonoDevelop/Core/MimeTypes">
		<MimeType id="text/x-gettext-translation" icon="md-po-file" isText="true">
			<File pattern="*.po" />
		</MimeType>
	</Extension>
	
	<Extension path = "/MonoDevelop/Ide/FileFilters">
		<FileFilter id = "PoFiles" _label = "PO Files" extensions = "*.po"/>
	</Extension>
	
	<Extension path = "/MonoDevelop/Ide/DisplayBindings">
		<DisplayBinding id = "GettextEditor" insertbefore ="DefaultDisplayBinding" class = "MonoDevelop.Gettext.GettextEditorDisplayBinding"/>
	</Extension>
	
	<Extension path = "/MonoDevelop/ProjectModel/SerializableClasses">
		<DataType class = "MonoDevelop.Gettext.TranslationProject" />
		<DataType class = "MonoDevelop.Gettext.TranslationProjectConfiguration" />
	</Extension>

	<Extension path = "/MonoDevelop/Ide/ContextMenu/ProjectPad">
		<Condition id="ItemType" value="MonoDevelop.Gettext.Translation">
			<CommandItem id = "MonoDevelop.Ide.Commands.ViewCommands.Open" insertafter="ActionsSectionEnd" />
			<CommandItem id = "MonoDevelop.Gettext.Commands.UpdateTranslation" />
		</Condition>
		<Condition id="ItemType" value="MonoDevelop.Gettext.TranslationProject">
			<CommandItem id = "MonoDevelop.Gettext.Commands.UpdateTranslations" />
			<CommandItem id = "MonoDevelop.Gettext.Commands.AddTranslation"/>
		</Condition>
	</Extension>
	
	<Extension path = "/MonoDevelop/Ide/ContextMenu/ProjectPad/QuickProperties">
		<Condition id="ItemType" value="ProjectFile">
			<CommandItem id = "MonoDevelop.Gettext.Commands.ScanForTranslations"
		             insertafter = "MonoDevelop.Autotools.Commands.SynchWithMakefile" />
		</Condition>
	</Extension>
	
	<Extension path = "/MonoDevelop/Ide/ProjectTemplates">
		<ProjectTemplate id = "MonoDevelop.Gettext.TranslationInfo" resource = "TranslationProject.xpt.xml" />
	</Extension>
	
	<Extension path = "/MonoDevelop/Ide/Pads/ProjectPad">
		<NodeBuilder class = "MonoDevelop.Gettext.NodeBuilders.TranslationProjectNodeBuilder"/>
		<NodeBuilder class = "MonoDevelop.Gettext.NodeBuilders.TranslationNodeBuilder"/>
		<NodeBuilder class = "MonoDevelop.Gettext.NodeBuilders.ProjectFileNodeBuilderExtension"/>
	</Extension>
	
	<Extension path = "/MonoDevelop/DesignerSupport/PropertyProviders">
		<Class class = "MonoDevelop.Gettext.PropertyProvider"/>
	</Extension>
	
	<Extension path = "/MonoDevelop/ProjectModel/ExtendedProperties">
		<ItemProperty class = "MonoDevelop.Projects.ProjectFile"
			name = "Gettext.ScanForTranslations" type = "System.Boolean" />
	</Extension>
	
	<Extension path = "/MonoDevelop/Ide/ProjectFeatures">
		<Class class = "MonoDevelop.Gettext.GettextFeature" />
	</Extension>

	<Extension path = "/MonoDevelop/Autotools/MakefileHandlers">
		<Class class = "MonoDevelop.Gettext.MakefileHandler"/>
	</Extension>
	
	<Extension path = "/MonoDevelop/Gettext/FileScanners">
		<XmlRegexScanner extension="glade">
			<Include regex='translatable\s*=\s*"yes"\s*&gt;([^&lt;]*)&lt;' escapeMode="Xml" />
		</XmlRegexScanner>
		<XmlRegexScanner extension="xml" mimeType="application/xml">
			<Include regex='\s_[-A-Za-z0-9._:]+\s*=\s*"([^"]+)"' escapeMode="Xml" />
			<Include regex="&lt;_[^&gt;]+&gt;((?:.|\n)*?)&lt;/_[^&gt;]+&gt;" escapeMode="Xml" />
		</XmlRegexScanner>
		<RegexScanner extension="vb">
			<Exclude regex='".*?[^"]"(?!")' />   <!-- Strings-->
			<Exclude regex="'(?:(?!').)*" />     <!-- Line comments -->
			<Include regex='GetString\s*\(\s*"(.*?[^\\])"' />
			<Include regex='GetPluralString\s*\(\s*"(.*?[^\\])"\s*,\s*"(.*?[^\\])"' plural="true"/>
			<Transform regex='""' value='"' />
		</RegexScanner>
		<RegexScanner extension="boo">
			<Exclude regex='".*?"' />               <!-- Strings -->
			<Exclude regex="'.*?'" />               <!-- Strings -->
			<Exclude regex='"""(?:.|\n)*?"""' />    <!-- Strings -->
			<Exclude regex='//(?:(?!//).)*' />      <!-- Line comments -->
			<Exclude regex='/\*(?:.|\n)*?\*/' />    <!-- Block comments -->
			<Include regex='GetString\s*\(\s*"(.*?[^\\])"' />
			<Include regex='GetPluralString\s*\(\s*"(.*?[^\\])"\s*,\s*"(.*?[^\\])"' plural="true"/>
		</RegexScanner>
		<RegexScanner extension="cs">
			<Exclude regex='@".*?"' />	                  <!-- Strings starting with @ -->
			<Exclude regex='(?&lt;!@)".*?(?&lt;!\\)"' />  <!-- Strings-->
			<Exclude regex='//(?:(?!//).)*' />            <!-- Line comments -->
			<Exclude regex='/\*(?:.|\n)*?\*/' />          <!-- Block comments -->
			
			<Include regex='\[\s*LocalizedDisplayName?\s*\(\s*"(.*?[^\\])"\s*\)\s*\]' regexOptions="Singleline" escapeMode="CSharp"/>
			<Include regex='\[\s*LocalizedDescription\s*\(\s*"(.*?[^\\])"\s*\)\s*\]' regexOptions="Singleline" escapeMode="CSharp"/>
			<Include regex='\[\s*LocalizedCategory\s*\(\s*"(.*?[^\\])"\s*\)\s*\]' regexOptions="Singleline" escapeMode="CSharp"/>
			
			<Include regex='GetString\s*\(\s*"(.*?[^\\])"\s*[,\)]' regexOptions="Singleline" escapeMode="CSharp"/>
			<Include regex='GetString\s*\(\s*"(.*?[^\\])"\s*[,\)]' regexOptions="Singleline" escapeMode="CSharp"/>

			<Include regex='GetString\s*\(\s*"(.*?[^\\])"\s*[,\)]' regexOptions="Singleline" escapeMode="CSharp"/>

			<Include regex='GetString\s*\(\s*"(.*?[^\\])"\s*[,\)]' regexOptions="Singleline" escapeMode="CSharp"/>
			<Include regex='GetPluralString\s*\(\s*"(.*?[^\\])"\s*,\s*"(.*?[^\\])"\s*[,\)]' plural="true" regexOptions="Singleline" escapeMode="CSharp"/>
			<Include regex='GetString\s*\(\s*@"(.*?[^\\])"\s*[,\)]' regexOptions="Singleline" escapeMode="CSharpVerbatim"/>
			<Include regex='GetPluralString\s*\(\s*@"(.*?[^\\])"\s*,\s*@"(.*?[^\\])"\s*[,\)]' plural="true" regexOptions="Singleline" escapeMode="CSharpVerbatim"/>
			<Transform regex='([^\\])"\s*\+\s*"' value='$1' regexOptions="Singleline"/><!-- strip out "+" concatenations -->
		</RegexScanner>
	</Extension>
</Addin>