Author: mkrueger
Date: 2007-08-09 05:05:52 -0400 (Thu, 09 Aug 2007)
New Revision: 83720
Added:
trunk/monodevelop/Extras/MonoDevelop.Gettext/MonoDevelop.Gettext/PropertyProvider.cs
Modified:
trunk/monodevelop/Extras/MonoDevelop.Gettext/ChangeLog
trunk/monodevelop/Extras/MonoDevelop.Gettext/Makefile.am
trunk/monodevelop/Extras/MonoDevelop.Gettext/MonoDevelop.Gettext.NodeBuilders/TranslationProjectNodeBuilder.cs
trunk/monodevelop/Extras/MonoDevelop.Gettext/MonoDevelop.Gettext.addin.xml
trunk/monodevelop/Extras/MonoDevelop.Gettext/MonoDevelop.Gettext.mdp
trunk/monodevelop/Extras/MonoDevelop.Gettext/MonoDevelop.Gettext/TranslationProject.cs
trunk/monodevelop/Extras/MonoDevelop.Gettext/gtk-gui/MonoDevelop.Gettext.Editor.CatalogHeadersWidget.cs
Log:
* MonoDevelop.Gettext.addin.xml,
MonoDevelop.Gettext.NodeBuilders/TranslationProjectNodeBuilder.cs,
MonoDevelop.Gettext/PropertyProvider.cs,
MonoDevelop.Gettext/TranslationProject.cs: Fixed bug 82334: Gettext
addin: can't choose which files to translate. It's now possible to
choose, if a file can be translated in the file properties.
Modified: trunk/monodevelop/Extras/MonoDevelop.Gettext/ChangeLog
===================================================================
--- trunk/monodevelop/Extras/MonoDevelop.Gettext/ChangeLog 2007-08-09
08:43:05 UTC (rev 83719)
+++ trunk/monodevelop/Extras/MonoDevelop.Gettext/ChangeLog 2007-08-09
09:05:52 UTC (rev 83720)
@@ -1,5 +1,14 @@
2007-08-09 Mike Krüger <[EMAIL PROTECTED]>
+ * MonoDevelop.Gettext.addin.xml,
+ MonoDevelop.Gettext.NodeBuilders/TranslationProjectNodeBuilder.cs,
+ MonoDevelop.Gettext/PropertyProvider.cs,
+ MonoDevelop.Gettext/TranslationProject.cs: Fixed bug 82334: Gettext
+ addin: can't choose which files to translate. It's now possible to
+ choose, if a file can be translated in the file properties.
+
+2007-08-09 Mike Krüger <[EMAIL PROTECTED]>
+
* gtk-gui/MonoDevelop.Gettext.Translator.LanguageChooserDialog.cs:
Fixed Bug 82341: Gettext addin: Language selection combo too big.
Modified: trunk/monodevelop/Extras/MonoDevelop.Gettext/Makefile.am
===================================================================
--- trunk/monodevelop/Extras/MonoDevelop.Gettext/Makefile.am 2007-08-09
08:43:05 UTC (rev 83719)
+++ trunk/monodevelop/Extras/MonoDevelop.Gettext/Makefile.am 2007-08-09
09:05:52 UTC (rev 83720)
@@ -40,6 +40,7 @@
MonoDevelop.Gettext/CatalogParser.cs \
MonoDevelop.Gettext/IsoCodes.cs \
MonoDevelop.Gettext/PluralForms.cs \
+ MonoDevelop.Gettext/PropertyProvider.cs \
MonoDevelop.Gettext/Translation.cs \
MonoDevelop.Gettext/TranslationProject.cs \
MonoDevelop.Gettext/TranslationProjectOptionsDialog.cs \
Added:
trunk/monodevelop/Extras/MonoDevelop.Gettext/MonoDevelop.Gettext/PropertyProvider.cs
===================================================================
---
trunk/monodevelop/Extras/MonoDevelop.Gettext/MonoDevelop.Gettext/PropertyProvider.cs
2007-08-09 08:43:05 UTC (rev 83719)
+++
trunk/monodevelop/Extras/MonoDevelop.Gettext/MonoDevelop.Gettext/PropertyProvider.cs
2007-08-09 09:05:52 UTC (rev 83720)
@@ -0,0 +1,52 @@
+
+
+using System;
+using System.ComponentModel;
+
+using MonoDevelop.Projects;
+using MonoDevelop.DesignerSupport;
+
+namespace MonoDevelop.Gettext
+{
+ public class PropertyProvider : IPropertyProvider
+ {
+ public bool SupportsObject (object o)
+ {
+ return o is ProjectFile;
+ }
+
+ public object CreateProvider (object o)
+ {
+ return new ProjectFileWrapper ((ProjectFile)o);
+ }
+
+ public class ProjectFileWrapper: CustomDescriptor
+ {
+ ProjectFile file;
+
+ public ProjectFileWrapper (ProjectFile file)
+ {
+ this.file = file;
+ }
+
+ const string scanForTranslationsProperty =
"Gettext.ScanForTranslations";
+ [Category ("Gettext translation")]
+ [DisplayName ("Scan for translations")]
+ [Description ("Include this file in the translation
scan.")]
+ public bool ScanForTranslations {
+ get {
+ object result = file.ExtendedProperties
[scanForTranslationsProperty];
+ return result == null ? true :
(bool)result;
+ }
+ set {
+ if (value) {
+ file.ExtendedProperties.Remove
(scanForTranslationsProperty);
+ } else {
+ file.ExtendedProperties
[scanForTranslationsProperty] = value;
+ }
+ }
+ }
+ }
+
+ }
+}
Modified:
trunk/monodevelop/Extras/MonoDevelop.Gettext/MonoDevelop.Gettext/TranslationProject.cs
===================================================================
---
trunk/monodevelop/Extras/MonoDevelop.Gettext/MonoDevelop.Gettext/TranslationProject.cs
2007-08-09 08:43:05 UTC (rev 83719)
+++
trunk/monodevelop/Extras/MonoDevelop.Gettext/MonoDevelop.Gettext/TranslationProject.cs
2007-08-09 09:05:52 UTC (rev 83720)
@@ -435,9 +435,6 @@
[ItemProperty]
bool isIncluded;
- [ItemProperty]
- List<string> excludedFiles = new List<string> ();
-
public string ProjectName {
get { return projectName; }
set { projectName = value; }
@@ -448,10 +445,6 @@
set { isIncluded = value; }
}
- public ReadOnlyCollection<string> ExcludedFiles {
- get { return excludedFiles.AsReadOnly (); }
- }
-
public TranslationProjectInformation ()
{
}
Modified:
trunk/monodevelop/Extras/MonoDevelop.Gettext/MonoDevelop.Gettext.NodeBuilders/TranslationProjectNodeBuilder.cs
===================================================================
---
trunk/monodevelop/Extras/MonoDevelop.Gettext/MonoDevelop.Gettext.NodeBuilders/TranslationProjectNodeBuilder.cs
2007-08-09 08:43:05 UTC (rev 83719)
+++
trunk/monodevelop/Extras/MonoDevelop.Gettext/MonoDevelop.Gettext.NodeBuilders/TranslationProjectNodeBuilder.cs
2007-08-09 09:05:52 UTC (rev 83720)
@@ -192,7 +192,9 @@
monitor.Log.WriteLine
(String.Format (GettextCatalog.GetString ("Scanning project {0}..."), p.Name));
monitor.Step (1);
foreach (ProjectFile file in
p.ProjectFiles) {
-
TranslationService.UpdateTranslation (project, file.FilePath, monitor);
+
PropertyProvider.ProjectFileWrapper wrapper = new
PropertyProvider.ProjectFileWrapper (file);
+ if
(wrapper.ScanForTranslations)
+
TranslationService.UpdateTranslation (project, file.FilePath, monitor);
}
}
Modified:
trunk/monodevelop/Extras/MonoDevelop.Gettext/MonoDevelop.Gettext.addin.xml
===================================================================
--- trunk/monodevelop/Extras/MonoDevelop.Gettext/MonoDevelop.Gettext.addin.xml
2007-08-09 08:43:05 UTC (rev 83719)
+++ trunk/monodevelop/Extras/MonoDevelop.Gettext/MonoDevelop.Gettext.addin.xml
2007-08-09 09:05:52 UTC (rev 83720)
@@ -103,4 +103,14 @@
<Extension path = "/MonoDevelop/IDE/StartupHandlers">
<Class class =
"MonoDevelop.Gettext.TranslationServiceStartupCommand"/>
</Extension>
+
+ <Extension path = "/MonoDevelop/DesignerSupport/PropertyProviders">
+ <Class class = "MonoDevelop.Gettext.PropertyProvider"/>
+ </Extension>
+
+ <Extension path =
"/SharpDevelop/Workbench/Serialization/ExtendedProperties">
+ <ItemProperty class = "MonoDevelop.Projects.ProjectFile"
+ name = "Gettext.ScanForTranslations" type =
"System.Boolean" />
+ </Extension>
+
</Addin>
Modified: trunk/monodevelop/Extras/MonoDevelop.Gettext/MonoDevelop.Gettext.mdp
===================================================================
--- trunk/monodevelop/Extras/MonoDevelop.Gettext/MonoDevelop.Gettext.mdp
2007-08-09 08:43:05 UTC (rev 83719)
+++ trunk/monodevelop/Extras/MonoDevelop.Gettext/MonoDevelop.Gettext.mdp
2007-08-09 09:05:52 UTC (rev 83720)
@@ -53,6 +53,7 @@
<File name="./MonoDevelop.Gettext/PluralForms.cs" subtype="Code"
buildaction="Compile" />
<File name="./MonoDevelop.Gettext/IsoCodes.cs" subtype="Code"
buildaction="Compile" />
<File name="./Makefile.am" subtype="Code" buildaction="Nothing" />
+ <File name="./MonoDevelop.Gettext/PropertyProvider.cs" subtype="Code"
buildaction="Compile" />
</Contents>
<References>
<ProjectReference type="Gac" localcopy="True" refto="System,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
Modified:
trunk/monodevelop/Extras/MonoDevelop.Gettext/gtk-gui/MonoDevelop.Gettext.Editor.CatalogHeadersWidget.cs
===================================================================
---
trunk/monodevelop/Extras/MonoDevelop.Gettext/gtk-gui/MonoDevelop.Gettext.Editor.CatalogHeadersWidget.cs
2007-08-09 08:43:05 UTC (rev 83719)
+++
trunk/monodevelop/Extras/MonoDevelop.Gettext/gtk-gui/MonoDevelop.Gettext.Editor.CatalogHeadersWidget.cs
2007-08-09 09:05:52 UTC (rev 83720)
@@ -84,7 +84,7 @@
this.notebook1 = new Gtk.Notebook();
this.notebook1.CanFocus = true;
this.notebook1.Name = "notebook1";
- this.notebook1.CurrentPage = 1;
+ this.notebook1.CurrentPage = 0;
this.notebook1.TabPos = ((Gtk.PositionType)(0));
this.notebook1.BorderWidth = ((uint)(8));
// Container child notebook1.Gtk.Notebook+NotebookChild
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches