Browse Source

Deleted some of the unused translation strings.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@552 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 20 years ago
parent
commit
a738c4ae12
  1. 3
      data/ConversionStyleSheets/SVNChangelogToXml.xsl
  2. BIN
      data/resources/StringResources.ar.resources
  3. BIN
      data/resources/StringResources.bg.resources
  4. BIN
      data/resources/StringResources.cn-big.resources
  5. BIN
      data/resources/StringResources.cn-gb.resources
  6. BIN
      data/resources/StringResources.cz.resources
  7. BIN
      data/resources/StringResources.de.resources
  8. BIN
      data/resources/StringResources.dk.resources
  9. BIN
      data/resources/StringResources.es-mx.resources
  10. BIN
      data/resources/StringResources.es.resources
  11. BIN
      data/resources/StringResources.fi.resources
  12. BIN
      data/resources/StringResources.fr.resources
  13. BIN
      data/resources/StringResources.hu.resources
  14. BIN
      data/resources/StringResources.it.resources
  15. BIN
      data/resources/StringResources.jp.resources
  16. BIN
      data/resources/StringResources.kr.resources
  17. BIN
      data/resources/StringResources.lt.resources
  18. BIN
      data/resources/StringResources.nl.resources
  19. BIN
      data/resources/StringResources.pl.resources
  20. BIN
      data/resources/StringResources.pt-br.resources
  21. BIN
      data/resources/StringResources.pt.resources
  22. BIN
      data/resources/StringResources.ro.resources
  23. BIN
      data/resources/StringResources.ru.resources
  24. BIN
      data/resources/StringResources.se.resources
  25. BIN
      data/resources/StringResources.sl.resources
  26. BIN
      data/resources/StringResources.sr.resources
  27. BIN
      data/resources/StringResources.tr.resources
  28. 50
      doc/ChangeLog.xml
  29. 11
      src/Main/Base/Project/Src/Gui/Workbench/DefaultWorkbench.cs
  30. 4
      src/Main/StartUp/Project/Dialogs/ExceptionBox.cs
  31. BIN
      src/Main/StartUp/Project/Resources/StringResources.resources
  32. 32
      src/Tools/StringResourceSniffer/AssemblyInfo.cs
  33. 104
      src/Tools/StringResourceSniffer/Main.cs
  34. 381
      src/Tools/StringResourceTool/MainForm.cs
  35. 38
      src/Tools/StringResourceTool/StringResourceTool.csproj
  36. 6
      src/Tools/StringResourceTool/StringResourceTool.sln
  37. 123
      src/Tools/StringResourceTool/TranslationServer.cs

3
data/ConversionStyleSheets/SVNChangelogToXml.xsl

@ -43,6 +43,9 @@ @@ -43,6 +43,9 @@
<xsl:when test="$orig_author = 'nikola'">
<xsl:text>Nikola Kavaldjiev</xsl:text>
</xsl:when>
<xsl:when test="$orig_author = 'mattward'">
<xsl:text>Matt Ward</xsl:text>
</xsl:when>
<xsl:when test="$orig_author = 'mathiassimmack'">
<xsl:text>Mathias Simmack</xsl:text>
</xsl:when>

BIN
data/resources/StringResources.ar.resources

Binary file not shown.

BIN
data/resources/StringResources.bg.resources

Binary file not shown.

BIN
data/resources/StringResources.cn-big.resources

Binary file not shown.

BIN
data/resources/StringResources.cn-gb.resources

Binary file not shown.

BIN
data/resources/StringResources.cz.resources

Binary file not shown.

BIN
data/resources/StringResources.de.resources

Binary file not shown.

BIN
data/resources/StringResources.dk.resources

Binary file not shown.

BIN
data/resources/StringResources.es-mx.resources

Binary file not shown.

BIN
data/resources/StringResources.es.resources

Binary file not shown.

BIN
data/resources/StringResources.fi.resources

Binary file not shown.

BIN
data/resources/StringResources.fr.resources

Binary file not shown.

BIN
data/resources/StringResources.hu.resources

Binary file not shown.

BIN
data/resources/StringResources.it.resources

Binary file not shown.

BIN
data/resources/StringResources.jp.resources

Binary file not shown.

BIN
data/resources/StringResources.kr.resources

Binary file not shown.

BIN
data/resources/StringResources.lt.resources

Binary file not shown.

BIN
data/resources/StringResources.nl.resources

Binary file not shown.

BIN
data/resources/StringResources.pl.resources

Binary file not shown.

BIN
data/resources/StringResources.pt-br.resources

Binary file not shown.

BIN
data/resources/StringResources.pt.resources

Binary file not shown.

BIN
data/resources/StringResources.ro.resources

Binary file not shown.

BIN
data/resources/StringResources.ru.resources

Binary file not shown.

BIN
data/resources/StringResources.se.resources

Binary file not shown.

BIN
data/resources/StringResources.sl.resources

Binary file not shown.

BIN
data/resources/StringResources.sr.resources

Binary file not shown.

BIN
data/resources/StringResources.tr.resources

Binary file not shown.

50
doc/ChangeLog.xml

@ -1,4 +1,26 @@ @@ -1,4 +1,26 @@
<ChangeLog project="SharpDevelop">
<Change author="Daniel Grunwald" date="10/09/2005">Fixed SD2-458: Tab is always replaced with 4 spaces</Change>
<Change author="Matt Ward" date="10/08/2005">Added support for commenting/uncommenting a selection of xml.</Change>
<Change author="Daniel Grunwald" date="10/08/2005">Fixed SD2-474: Allow targeting other .NET Framework versions.</Change>
<Change author="Matt Ward" date="10/08/2005">Fixed SD2-476. Goto definition now works for unit tests in a test fixture containing a SetUp method.</Change>
<Change author="Matt Ward" date="10/08/2005">GotoDefinition executed when double clicking an MbUnitPad test tree node.</Change>
<Change author="Daniel Grunwald" date="10/07/2005">Fixed SD2-472 (Cursor disappears off screen whilst pressing right arrow key) and a newly introduce performance problems with large files (&gt;5000 lines).
Added constructor insight support to BooBinding.</Change>
<Change author="Daniel Grunwald" date="10/07/2005">Added support for local variables and simple type inference to BooBinding.</Change>
<Change author="Daniel Grunwald" date="10/07/2005">Fixed assertion when typing a "RaiseEvent" statement (http://community.sharpdevelop.net/forums/1156/ShowPost.aspx)</Change>
<Change author="Daniel Grunwald" date="10/07/2005">Boo implicitly references System.dll and Boo.Lang.dll.</Change>
<Change author="Daniel Grunwald" date="10/07/2005">Fixed paths in BooBinding project files.</Change>
<Change author="Daniel Grunwald" date="10/07/2005">Add BooBinding.</Change>
<Change author="Matt Ward" date="10/07/2005">Fixed SD2-473. A KeyNotFound exception is no longer thrown if the highlighting strategy does not contain a LineComment property.</Change>
<Change author="Daniel Grunwald" date="10/05/2005">Improved handling of proportional fonts.</Change>
<Change author="Daniel Grunwald" date="10/04/2005">Run MsBuild in a separate thread =&gt; you can continue coding while your code is compiling.</Change>
<Change author="Daniel Grunwald" date="10/04/2005">Caret is now displayed at the correct position when using non-monospaced fonts. (but selecting with the mouse still doesn't work)</Change>
<Change author="Daniel Grunwald" date="10/03/2005">Use use static readonly collection instance for empty attribute, type parameter and parameter collections.</Change>
<Change author="Daniel Grunwald" date="10/03/2005">Fixed SD2-470: When there is a using statement for the current namespace, classes are shown twice in Ctrl+Space</Change>
<Change author="Mathias Simmack" date="10/03/2005">Help 2.0: fixed a bug when selecting the previous or next topic button (browser) with a hidden TOC control; there was an exception because, of course, there was no selection in the TOC control. Now I use the Get*FromUrl method with the current browser URL. btw: some other things changed</Change>
<Change author="Daniel Grunwald" date="10/02/2005">Fixed SD2-420: Non-generic classes and generic classes with the same name collide in the DOM.</Change>
<Change author="Daniel Grunwald" date="10/02/2005">Fixed SD2-460: Parse error (inner classes in generic types)</Change>
<Change author="Daniel Grunwald" date="10/01/2005">Fixed code completion bug regarding events. Fixed "run unit test in debugger".</Change>
<Change author="Mathias Simmack" date="10/01/2005">Pad layout: included some references for the dynamic help pad to solve issue #2 (http://community.sharpdevelop.net/forums/820/ShowPost.aspx)</Change>
<Change author="Daniel Grunwald" date="10/01/2005">Allow references to unbound types in typeof/GetType expressions.</Change>
<Change author="Daniel Grunwald" date="10/01/2005">Improved performance of "Replace all".</Change>
@ -29,7 +51,7 @@ Disadvantages: @@ -29,7 +51,7 @@ Disadvantages:
<Change author="Daniel Grunwald" date="09/27/2005">The "Load solution" and "New solution" buttons on the start page now work even when JavaScript is disabled in Internet Explorer.</Change>
<Change author="Daniel Grunwald" date="09/27/2005">Fixed exception when importing VS.NET project without ".user" file.</Change>
<Change author="David Srbecký" date="09/26/2005">Fixed bug that prevented recompiling due to files locked by the debugger</Change>
<Change author="mattward" date="09/26/2005">MbUnit Pad additions - Goto definition implemented, error list displayed after a test run with errors, and after a build the test tree auto-refreshes.</Change>
<Change author="Matt Ward" date="09/26/2005">MbUnit Pad additions - Goto definition implemented, error list displayed after a test run with errors, and after a build the test tree auto-refreshes.</Change>
<Change author="Mathias Simmack" date="09/25/2005">Help 2.0: solution structure changed (you can enable the Dynamic Help by copying the new Addin file)</Change>
<Change author="Mathias Simmack" date="09/25/2005">dynamic help: some improvements, works with expressions now (ignores documents with more than 1 DevLang attribute)</Change>
<Change author="Mathias Simmack" date="09/25/2005">Help 2.0: context.html updated</Change>
@ -43,7 +65,7 @@ Enabled AutoComplete for the ProjectImports combo box.</Change> @@ -43,7 +65,7 @@ Enabled AutoComplete for the ProjectImports combo box.</Change>
<Change author="Mathias Simmack" date="09/24/2005">Help 2.0: some little fixes</Change>
<Change author="Daniel Grunwald" date="09/24/2005">Fixed some P/Invoke declarations where FxCop complained they weren't portable to 64bit and some other complaints from FxCop.</Change>
<Change author="Daniel Grunwald" date="09/23/2005">Applied Fidalgo rev. 2075</Change>
<Change author="mattward" date="09/21/2005">Added 'Stop tests' toolbar button and context menus to the MbUnit pad. Go to definition context menu command is not currently working.</Change>
<Change author="Matt Ward" date="09/21/2005">Added 'Stop tests' toolbar button and context menus to the MbUnit pad. Go to definition context menu command is not currently working.</Change>
<Change author="Daniel Grunwald" date="09/21/2005">Fixed crash when using the "DefaultDebugger" instead of the debugger addin.</Change>
<Change author="Daniel Grunwald" date="09/21/2005">Fixed SD-371: Adding empty combine to a combine causes exception
and worked on SD2-425.</Change>
@ -58,11 +80,11 @@ and worked on SD2-425.</Change> @@ -58,11 +80,11 @@ and worked on SD2-425.</Change>
<Change author="Daniel Grunwald" date="09/14/2005">Application and Signing project options panels now use the translation database.</Change>
<Change author="Mathias Simmack" date="09/14/2005">tried to fix a Virtual PC (no SDK) crash; HiliteMatches restored for testing (it doesn't work here :o( )</Change>
<Change author="Mathias Simmack" date="09/13/2005">disable 'highlight matching topics' because it doesn't work with the WebBrowser control</Change>
<Change author="mattward" date="09/12/2005">File was not being identified as a 'code behind file' if it existed in a subfolder.</Change>
<Change author="Matt Ward" date="09/12/2005">File was not being identified as a 'code behind file' if it existed in a subfolder.</Change>
<Change author="Daniel Grunwald" date="09/12/2005">Ignore .svn folders when creating setup.</Change>
<Change author="Daniel Grunwald" date="09/12/2005">Add prepareRelease.bat (creates ChangeLog.xml and REVISION file)</Change>
<Change author="Daniel Grunwald" date="09/12/2005">Fixed InterfaceImplementorCodeGenerator bug (override keyword).</Change>
<Change author="mattward" date="09/12/2005">SD2-438. Form designer now creating, loading and saving resources.</Change>
<Change author="Matt Ward" date="09/12/2005">SD2-438. Form designer now creating, loading and saving resources.</Change>
<Change author="Mike Krüger" date="09/12/2005">Fixed SD2-402:Toolbar in bookmark pad.</Change>
<Change author="Mathias Simmack" date="09/12/2005">some changes/fixes, LoggingService used</Change>
<Change author="Daniel Grunwald" date="09/11/2005">Allow addins to have their project/file templates stored in the addin directory.</Change>
@ -87,7 +109,7 @@ Overall SD should use ca. 10 MB RAM less when working on a big solution like Sha @@ -87,7 +109,7 @@ Overall SD should use ca. 10 MB RAM less when working on a big solution like Sha
<Change author="Daniel Grunwald" date="09/08/2005">Fixed SD2-439: VB.Net event handlers are lost.
Save layout configuration before switching layout by starting debugger or pressing Shift+Escape.</Change>
<Change author="Daniel Grunwald" date="09/08/2005">Show error message when going to designer mode in a file with syntax errors instead of displaying an empty form.</Change>
<Change author="mattward" date="09/08/2005">SD2-437. Source code now generated in InitializeComponent method for non-visual components.</Change>
<Change author="Matt Ward" date="09/08/2005">SD2-437. Source code now generated in InitializeComponent method for non-visual components.</Change>
<Change author="Mathias Simmack" date="09/08/2005">dynamic help: some scripting improvements</Change>
<Change author="Mathias Simmack" date="09/08/2005">I changed some of the CSharp namespace names; there are no bug fixes in this upload</Change>
<Change author="Daniel Grunwald" date="09/04/2005">Fixed some bugs.</Change>
@ -116,8 +138,8 @@ Fixed crash when two classes with the same name were removed from a project cont @@ -116,8 +138,8 @@ Fixed crash when two classes with the same name were removed from a project cont
<Change author="Daniel Grunwald" date="08/25/2005">Fixed some NRefactory bugs (Generic method invocations in VB.NET and output visitor bugs)</Change>
<Change author="Daniel Grunwald" date="08/25/2005">Remove quotes from svn:keywords property.</Change>
<Change author="David Srbecký" date="08/24/2005">Added fullscreen options panel (no features implemented yet)</Change>
<Change author="mattward" date="08/24/2005">Fixed properties on newly added xml editor test files - removed quotes from the Revision keyword.</Change>
<Change author="mattward" date="08/24/2005">Added xml editor tests from Fidalgo branch. The XmlSchemaCompletionData class is now using the XmlSchemaAttribute's AttributeSchemaType property instead of the obsolete AttributeType which was causing a few of the attribute value tests to fail.</Change>
<Change author="Matt Ward" date="08/24/2005">Fixed properties on newly added xml editor test files - removed quotes from the Revision keyword.</Change>
<Change author="Matt Ward" date="08/24/2005">Added xml editor tests from Fidalgo branch. The XmlSchemaCompletionData class is now using the XmlSchemaAttribute's AttributeSchemaType property instead of the obsolete AttributeType which was causing a few of the attribute value tests to fail.</Change>
<Change author="Daniel Grunwald" date="08/24/2005">Fixed bug that prevented VB.Net windows forms applications from compiling.</Change>
<Change author="Daniel Grunwald" date="08/24/2005">Right click on class and member names (and method invocations) in the text editor now shows the "go to definition" command and the class browser context menu of that item.</Change>
<Change author="Daniel Grunwald" date="08/24/2005">Core bugfixes:
@ -136,7 +158,7 @@ Tried to fix ExternalException when accessing the clipboard.</Change> @@ -136,7 +158,7 @@ Tried to fix ExternalException when accessing the clipboard.</Change>
(implemented JMC - just my code)</Change>
<Change author="Daniel Grunwald" date="08/23/2005">Added CSharpBinding.Tests project.
Add "run in debugger" command to member bookmarks.</Change>
<Change author="mattward" date="08/23/2005">Designer generator now parses the form's code every time a component is added. This ensures that the InitializeComponent's position is correct when adding a new component.</Change>
<Change author="Matt Ward" date="08/23/2005">Designer generator now parses the form's code every time a component is added. This ensures that the InitializeComponent's position is correct when adding a new component.</Change>
<Change author="Daniel Grunwald" date="08/23/2005">Applied CSharpOutputVisitor patch from Rodrigo B. de Oliveira.
Make go to work with partial classes.
Show expression in tooltips while pressing Ctrl.
@ -161,7 +183,7 @@ Project templates can now specify the BuildAction and CopyToOutputDirectory prop @@ -161,7 +183,7 @@ Project templates can now specify the BuildAction and CopyToOutputDirectory prop
<Change author="David Srbecký" date="08/21/2005">External methods can be show/hidden using callstack context menu</Change>
<Change author="David Srbecký" date="08/21/2005">Local Variables pad cleared when debugger stops</Change>
<Change author="David Srbecký" date="08/21/2005">Fixed Base classes in Local Variables pad</Change>
<Change author="mattward" date="08/21/2005">Added support for included schemas, substitution groups and abstract elements. Tests not ported over from Fidalgo yet.</Change>
<Change author="Matt Ward" date="08/21/2005">Added support for included schemas, substitution groups and abstract elements. Tests not ported over from Fidalgo yet.</Change>
<Change author="Daniel Grunwald" date="08/20/2005">Improve project options panels and prepare editing different configurations.
Fixed bug when closing form designer while the property pad was active.</Change>
<Change author="David Srbecký" date="08/20/2005">Added first debugger test</Change>
@ -184,15 +206,15 @@ Removed SharpZipLib. @@ -184,15 +206,15 @@ Removed SharpZipLib.
Fixed SD2-415 and SD2-418.</Change>
<Change author="Daniel Grunwald" date="08/18/2005">Allow writing a space after "+=" completion without closing the completion window.</Change>
<Change author="Daniel Grunwald" date="08/17/2005">Add NUnit.Framework again.</Change>
<Change author="mattward" date="08/17/2005">Removed NUnit project reference from main SharpDevelop solution.</Change>
<Change author="mattward" date="08/17/2005">Main menu and toolbar initialised after all the pads so that keyboard shortcuts work for the various View-Pad menu items without needing the menu to be displayed at least once.</Change>
<Change author="Matt Ward" date="08/17/2005">Removed NUnit project reference from main SharpDevelop solution.</Change>
<Change author="Matt Ward" date="08/17/2005">Main menu and toolbar initialised after all the pads so that keyboard shortcuts work for the various View-Pad menu items without needing the menu to be displayed at least once.</Change>
<Change author="Mike Krüger" date="08/17/2005">Removed nunit and nprof</Change>
<Change author="Mike Krüger" date="08/17/2005">Changed some little translation issues. Re-Arranged tools menu.</Change>
<Change author="Daniel Grunwald" date="08/17/2005">Update English and German StringResources (combine -&gt; solution).</Change>
<Change author="Daniel Grunwald" date="08/17/2005">Fixed SD2-410: Goto definition doesn't work for array types</Change>
<Change author="Daniel Grunwald" date="08/17/2005">Fixed SD2-411: Code completition doesn't show parent class (nested classes)</Change>
<Change author="Daniel Grunwald" date="08/16/2005">Fixed forms designer to reparse the file when switching to the designer tab.</Change>
<Change author="mattward" date="08/16/2005">Show properties (F4) now works in form design mode.</Change>
<Change author="Matt Ward" date="08/16/2005">Show properties (F4) now works in form design mode.</Change>
<Change author="Daniel Grunwald" date="08/16/2005">Ported changes from Fidalgo rev 2038, ivokovacka.
Fixed more NRefactory bugs.</Change>
<Change author="Markus Palme" date="08/16/2005">added very basic event handler code completition (appears after typing '+='); still many things to do here</Change>
@ -208,10 +230,10 @@ Included bug fixes from docking suite's bug tracker on SF.</Change> @@ -208,10 +230,10 @@ Included bug fixes from docking suite's bug tracker on SF.</Change>
<Change author="Daniel Grunwald" date="08/13/2005">Improved C# -&gt; VB converter (For-Statement is converted to ForNextStatement).
Fixed VB parser (CSByte, CUShort, CUInt, CULng cast operators were missing).</Change>
<Change author="Mathias Simmack" date="08/13/2005">enabled an early version of F1 help</Change>
<Change author="mattward" date="08/13/2005">When displaying xml namespaces the autocompletion list now resizes to fit the longest string.</Change>
<Change author="Matt Ward" date="08/13/2005">When displaying xml namespaces the autocompletion list now resizes to fit the longest string.</Change>
<Change author="Daniel Grunwald" date="08/13/2005">SearchAndReplaceDialog remembers it's location and can be closed with Escape.
Fixed ExpressionFinder when cursor was at the end of the document.</Change>
<Change author="mattward" date="08/13/2005">Changed the namespace for the form designer context menu commands. Added ICSharpCode.SharpDevelop runtime to FormDesigner.addin. Form designer context menus now working.</Change>
<Change author="Matt Ward" date="08/13/2005">Changed the namespace for the form designer context menu commands. Added ICSharpCode.SharpDevelop runtime to FormDesigner.addin. Form designer context menus now working.</Change>
<Change author="Daniel Grunwald" date="08/13/2005">Added F1 help to text editor and forms designer.</Change>
<Change author="Daniel Grunwald" date="08/13/2005">Fixed SD2-385: After project run Source/Abstract Content tabs are missing</Change>
<Change author="Daniel Grunwald" date="08/12/2005">Fixed some bugs.

11
src/Main/Base/Project/Src/Gui/Workbench/DefaultWorkbench.cs

@ -11,6 +11,7 @@ using System.Collections; @@ -11,6 +11,7 @@ using System.Collections;
using System.Collections.Generic;
using System.Drawing;
using System.Diagnostics;
using System.Globalization;
using System.CodeDom.Compiler;
using System.Windows.Forms;
using System.ComponentModel;
@ -309,7 +310,10 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -309,7 +310,10 @@ namespace ICSharpCode.SharpDevelop.Gui
public Properties CreateMemento()
{
Properties properties = new Properties();
properties["bounds"] = normalBounds.X + "," + normalBounds.Y + "," + normalBounds.Width + "," + normalBounds.Height;
properties["bounds"] = normalBounds.X.ToString(NumberFormatInfo.InvariantInfo)
+ "," + normalBounds.Y.ToString(NumberFormatInfo.InvariantInfo)
+ "," + normalBounds.Width.ToString(NumberFormatInfo.InvariantInfo)
+ "," + normalBounds.Height.ToString(NumberFormatInfo.InvariantInfo);
if (FullScreen || WindowState == FormWindowState.Minimized)
properties["windowstate"] = defaultWindowState.ToString();
@ -325,7 +329,10 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -325,7 +329,10 @@ namespace ICSharpCode.SharpDevelop.Gui
if (properties != null && properties.Contains("bounds")) {
string[] bounds = properties["bounds"].Split(',');
if (bounds.Length == 4) {
Bounds = normalBounds = new Rectangle(Int32.Parse(bounds[0]), Int32.Parse(bounds[1]), Int32.Parse(bounds[2]), Int32.Parse(bounds[3]));
Bounds = normalBounds = new Rectangle(int.Parse(bounds[0], NumberFormatInfo.InvariantInfo),
int.Parse(bounds[1], NumberFormatInfo.InvariantInfo),
int.Parse(bounds[2], NumberFormatInfo.InvariantInfo),
int.Parse(bounds[3], NumberFormatInfo.InvariantInfo));
}
defaultWindowState = (FormWindowState)Enum.Parse(typeof(FormWindowState), properties["defaultstate"]);

4
src/Main/StartUp/Project/Dialogs/ExceptionBox.cs

@ -12,6 +12,7 @@ using System.Diagnostics; @@ -12,6 +12,7 @@ using System.Diagnostics;
using System.Resources;
using System.Reflection;
using System.Drawing;
using System.Globalization;
using ICSharpCode.Core;
namespace ICSharpCode.SharpDevelop
@ -55,6 +56,9 @@ namespace ICSharpCode.SharpDevelop @@ -55,6 +56,9 @@ namespace ICSharpCode.SharpDevelop
string str = "";
str += ".NET Version : " + Environment.Version.ToString() + Environment.NewLine;
str += "OS Version : " + Environment.OSVersion.ToString() + Environment.NewLine;
try {
str += "Current culture : " + CultureInfo.CurrentCulture.EnglishName + Environment.NewLine;
} catch {}
try {
if (SystemInformation.TerminalServerSession) {
str += "Terminal Server Session" + Environment.NewLine;

BIN
src/Main/StartUp/Project/Resources/StringResources.resources

Binary file not shown.

32
src/Tools/StringResourceSniffer/AssemblyInfo.cs

@ -1,32 +0,0 @@ @@ -1,32 +0,0 @@
using System.Reflection;
using System.Runtime.CompilerServices;
// Information about this assembly is defined by the following
// attributes.
//
// change them to the information which is associated with the assembly
// you compile.
[assembly: AssemblyTitle("")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// The assembly version has following format :
//
// Major.Minor.Build.Revision
//
// You can specify all values by your own or you can build default build and revision
// numbers with the '*' character (the default):
[assembly: AssemblyVersion("2.0.0.1")]
// The following attributes specify the key for the sign of your assembly. See the
// .NET Framework documentation for more information about signing.
// This is not required, if you don't want signing let these attributes like they're.
[assembly: AssemblyDelaySign(false)]
[assembly: AssemblyKeyFile("")]

104
src/Tools/StringResourceSniffer/Main.cs

@ -1,104 +0,0 @@ @@ -1,104 +0,0 @@
using System;
using System.Resources;
using System.Text.RegularExpressions;
using System.IO;
using System.Collections;
using System.Collections.Generic;
namespace StringResourceSniffer
{
class MainClass
{
readonly static Regex pattern = new Regex(@"\$\{res:([^\}]*)\}");
readonly static Regex resourceService = new Regex(@"ResourceService.GetString\(\""([^\""]*)\""\)");
readonly static Dictionary<string, bool> resources = new Dictionary<string, bool>();
static ResourceSet rs;
static string fileName;
static void TryMatch(string resourceName)
{
if (rs.GetString(resourceName) == null) {
Console.WriteLine("unknown: " + resourceName + " in " + fileName);
}
resources[resourceName] = true;
}
static void SearchFiles(List<string> files)
{
foreach (string file in files) {
fileName = file;
StreamReader sr = File.OpenText(file);
string content = sr.ReadToEnd();
sr.Close();
foreach (Match m in pattern.Matches(content)) {
TryMatch(m.Groups[1].Captures[0].Value);
}
foreach (Match m in resourceService.Matches(content)) {
TryMatch(m.Groups[1].Captures[0].Value);
}
}
}
public static void Main(string[] args)
{
rs = new ResourceSet(@"C:\Dokumente und Einstellungen\Omnibrain.DIABLO\Eigene Dateien\trunk\SharpDevelop\src\Main\StartUp\Resources\StringResources.resources");
SearchFiles(SearchDirectory(@"C:\Dokumente und Einstellungen\Omnibrain.DIABLO\Eigene Dateien\trunk\SharpDevelop\src",
"*.cs"));
SearchFiles(SearchDirectory(@"C:\Dokumente und Einstellungen\Omnibrain.DIABLO\Eigene Dateien\trunk\SharpDevelop\AddIns",
"*.addin"));
foreach (DictionaryEntry entry in rs) {
if (!resources.ContainsKey(entry.Key.ToString())) {
Console.WriteLine("Unused:" + entry.Key);
}
}
}
public static List<string> SearchDirectory(string directory, string filemask, bool searchSubdirectories, bool ignoreHidden)
{
List<string> collection = new List<string>();
SearchDirectory(directory, filemask, collection, searchSubdirectories, ignoreHidden);
return collection;
}
public static List<string> SearchDirectory(string directory, string filemask, bool searchSubdirectories)
{
return SearchDirectory(directory, filemask, searchSubdirectories, false);
}
public static List<string> SearchDirectory(string directory, string filemask)
{
return SearchDirectory(directory, filemask, true, false);
}
/// <summary>
/// Finds all files which are valid to the mask <paramref name="filemask"/> in the path
/// <paramref name="directory"/> and all subdirectories
/// (if <paramref name="searchSubdirectories"/> is true).
/// The found files are added to the List<string>
/// <paramref name="collection"/>.
/// If <paramref name="ignoreHidden"/> is true, hidden files and folders are ignored.
/// </summary>
static void SearchDirectory(string directory, string filemask, List<string> collection, bool searchSubdirectories, bool ignoreHidden)
{
string[] file = Directory.GetFiles(directory, filemask);
foreach (string f in file) {
if (ignoreHidden && (File.GetAttributes(f) & FileAttributes.Hidden) == FileAttributes.Hidden) {
continue;
}
collection.Add(f);
}
if (searchSubdirectories) {
string[] dir = Directory.GetDirectories(directory);
foreach (string d in dir) {
if (ignoreHidden && (File.GetAttributes(d) & FileAttributes.Hidden) == FileAttributes.Hidden) {
continue;
}
SearchDirectory(d, filemask, collection, searchSubdirectories, ignoreHidden);
}
}
}
}
}

381
src/Tools/StringResourceTool/MainForm.cs

@ -0,0 +1,381 @@ @@ -0,0 +1,381 @@
/*
* Created by SharpDevelop.
* User: Daniel Grunwald
* Date: 08.10.2005
* Time: 19:47
*/
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Drawing;
using System.Resources;
using System.Text;
using System.Text.RegularExpressions;
using System.Windows.Forms;
namespace StringResourceTool
{
public class MainForm : System.Windows.Forms.Form
{
public MainForm()
{
//
// The InitializeComponent() call is required for Windows Forms designer support.
//
InitializeComponent();
try {
using (StreamReader r = new StreamReader("password.txt")) {
userNameTextBox.Text = r.ReadLine();
passwordTextBox.Text = r.ReadLine();
}
savePasswordCheckBox.Checked = true;
} catch {}
}
[STAThread]
public static void Main(string[] args)
{
Application.EnableVisualStyles();
Application.Run(new MainForm());
}
#region Windows Forms Designer generated code
/// <summary>
/// This method is required for Windows Forms designer support.
/// Do not change the method contents inside the source code editor. The Forms designer might
/// not be able to load this method if it was changed manually.
/// </summary>
private void InitializeComponent()
{
//
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(621, 399);
groupBox1 = new System.Windows.Forms.GroupBox();
//
// groupBox1
//
deleteStringsButton = new System.Windows.Forms.Button();
//
// deleteStringsButton
//
deleteStringsButton.Enabled = false;
deleteStringsButton.Location = new System.Drawing.Point(411, 20);
deleteStringsButton.Name = "deleteStringsButton";
deleteStringsButton.Size = new System.Drawing.Size(144, 23);
deleteStringsButton.TabIndex = 7;
deleteStringsButton.Text = "Delete resource strings";
deleteStringsButton.Click += new System.EventHandler(this.DeleteStringsButtonClick);
button4 = new System.Windows.Forms.Button();
//
// button4
//
button4.Enabled = false;
button4.Location = new System.Drawing.Point(292, 20);
button4.Name = "button4";
button4.Size = new System.Drawing.Size(113, 23);
button4.TabIndex = 6;
button4.Text = "Download database";
button4.Click += new System.EventHandler(this.Button4Click);
savePasswordCheckBox = new System.Windows.Forms.CheckBox();
//
// savePasswordCheckBox
//
savePasswordCheckBox.Location = new System.Drawing.Point(182, 44);
savePasswordCheckBox.Name = "savePasswordCheckBox";
savePasswordCheckBox.Size = new System.Drawing.Size(104, 24);
savePasswordCheckBox.TabIndex = 5;
savePasswordCheckBox.Text = "Save password";
button3 = new System.Windows.Forms.Button();
//
// button3
//
button3.Location = new System.Drawing.Point(182, 20);
button3.Name = "button3";
button3.Size = new System.Drawing.Size(75, 23);
button3.TabIndex = 4;
button3.Text = "Login";
button3.Click += new System.EventHandler(this.Button3Click);
passwordTextBox = new System.Windows.Forms.TextBox();
//
// passwordTextBox
//
passwordTextBox.Location = new System.Drawing.Point(76, 42);
passwordTextBox.Name = "passwordTextBox";
passwordTextBox.PasswordChar = '●';
passwordTextBox.Size = new System.Drawing.Size(100, 21);
passwordTextBox.TabIndex = 3;
passwordTextBox.UseSystemPasswordChar = true;
userNameTextBox = new System.Windows.Forms.TextBox();
//
// userNameTextBox
//
userNameTextBox.Location = new System.Drawing.Point(76, 19);
userNameTextBox.Name = "userNameTextBox";
userNameTextBox.Size = new System.Drawing.Size(100, 21);
userNameTextBox.TabIndex = 1;
label2 = new System.Windows.Forms.Label();
//
// label2
//
label2.Location = new System.Drawing.Point(6, 40);
label2.Name = "label2";
label2.Size = new System.Drawing.Size(64, 23);
label2.TabIndex = 2;
label2.Text = "Password:";
label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
label1 = new System.Windows.Forms.Label();
//
// label1
//
label1.Location = new System.Drawing.Point(6, 17);
label1.Name = "label1";
label1.Size = new System.Drawing.Size(64, 23);
label1.TabIndex = 0;
label1.Text = "Username:";
label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
groupBox1.Controls.Add(deleteStringsButton);
groupBox1.Controls.Add(button4);
groupBox1.Controls.Add(savePasswordCheckBox);
groupBox1.Controls.Add(button3);
groupBox1.Controls.Add(passwordTextBox);
groupBox1.Controls.Add(userNameTextBox);
groupBox1.Controls.Add(label2);
groupBox1.Controls.Add(label1);
groupBox1.Location = new System.Drawing.Point(12, 12);
groupBox1.Name = "groupBox1";
groupBox1.Size = new System.Drawing.Size(597, 74);
groupBox1.TabIndex = 0;
groupBox1.TabStop = false;
groupBox1.Text = "Translation server";
groupBox1.SuspendLayout();
groupBox1.ResumeLayout(false);
groupBox1.PerformLayout();
button2 = new System.Windows.Forms.Button();
//
// button2
//
button2.Location = new System.Drawing.Point(142, 92);
button2.Name = "button2";
button2.Size = new System.Drawing.Size(124, 23);
button2.TabIndex = 2;
button2.Text = "Find missing strings";
button2.Click += new System.EventHandler(this.Button2Click);
button1 = new System.Windows.Forms.Button();
//
// button1
//
button1.Location = new System.Drawing.Point(12, 91);
button1.Name = "button1";
button1.Size = new System.Drawing.Size(124, 23);
button1.TabIndex = 1;
button1.Text = "Find unused strings";
button1.Click += new System.EventHandler(this.Button1Click);
outputTextBox = new System.Windows.Forms.TextBox();
//
// outputTextBox
//
outputTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
outputTextBox.Location = new System.Drawing.Point(12, 120);
outputTextBox.Multiline = true;
outputTextBox.Name = "outputTextBox";
outputTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Both;
outputTextBox.Size = new System.Drawing.Size(597, 267);
outputTextBox.TabIndex = 3;
this.Controls.Add(groupBox1);
this.Controls.Add(button2);
this.Controls.Add(button1);
this.Controls.Add(outputTextBox);
this.Name = "MainForm";
this.Text = "StringResourceTool";
this.SuspendLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
private System.Windows.Forms.Button deleteStringsButton;
private System.Windows.Forms.Button button4;
private System.Windows.Forms.CheckBox savePasswordCheckBox;
private System.Windows.Forms.Button button3;
private System.Windows.Forms.TextBox passwordTextBox;
private System.Windows.Forms.TextBox userNameTextBox;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.TextBox outputTextBox;
#endregion
void Button1Click(object sender, EventArgs e)
{
button1.Enabled = false;
Display(FindMissing(FindResourceStrings(), FindUsedStrings()));
button1.Enabled = true;
}
void Button2Click(object sender, EventArgs e)
{
button2.Enabled = false;
Display(FindMissing(FindUsedStrings(), FindResourceStrings()));
button2.Enabled = true;
}
void Display(List<string> list)
{
StringBuilder b = new StringBuilder();
foreach (string entry in list) {
b.AppendLine(entry);
}
outputTextBox.Text = b.ToString();
}
/// <summary>Gets entries in t1 that are missing from t2.</summary>
List<string> FindMissing(Hashtable t1, Hashtable t2)
{
List<string> result = new List<string>();
foreach (DictionaryEntry e in t1) {
if (!t2.ContainsKey(e.Key)) {
result.Add(e.Key.ToString());
}
}
result.Sort();
return result;
}
readonly static Regex pattern = new Regex(@"\$\{res:([^\}]*)\}");
readonly static Regex resourceService = new Regex(@"ResourceService.GetString\(\""([^\""]*)\""\)");
Hashtable FindUsedStrings()
{
Hashtable t = new Hashtable();
FindUsedStrings(t, @"..\..\..\..\..");
return t;
}
void FindUsedStrings(Hashtable t, string path)
{
foreach (string subPath in Directory.GetDirectories(path)) {
if (subPath.EndsWith(".svn")) {
continue;
}
FindUsedStrings(t, subPath);
}
foreach (string fileName in Directory.GetFiles(path, "*.*")) {
switch (Path.GetExtension(fileName).ToLowerInvariant()) {
case ".cs":
FindUsedStrings(fileName, t, true);
break;
case ".resx":
case ".resources":
case ".dll":
case ".exe":
case ".pdb":
break;
default:
FindUsedStrings(fileName, t, false);
break;
}
}
}
void FindUsedStrings(string fileName, Hashtable t, bool resourceServicePattern)
{
StreamReader sr = File.OpenText(fileName);
string content = sr.ReadToEnd();
sr.Close();
foreach (Match m in pattern.Matches(content)) {
t[m.Groups[1].Captures[0].Value] = null;
}
if (resourceServicePattern) {
foreach (Match m in resourceService.Matches(content)) {
t[m.Groups[1].Captures[0].Value] = null;
}
}
}
const string srcDir = @"..\..\..\..\";
const string dataBaseDir = srcDir + @"..\..\SharpDevelopResources\LanguageResources\";
Hashtable FindResourceStrings()
{
ResourceSet rs = new ResourceSet(srcDir + @"Main\StartUp\Project\Resources\StringResources.resources");
Hashtable t = new Hashtable();
foreach (DictionaryEntry e in rs) {
t.Add(e.Key, null);
}
return t;
}
TranslationServer server;
void Button3Click(object sender, EventArgs e)
{
server = new TranslationServer(outputTextBox);
if (savePasswordCheckBox.Checked) {
using (StreamWriter w = new StreamWriter("password.txt")) {
w.WriteLine(userNameTextBox.Text);
w.WriteLine(passwordTextBox.Text);
}
} else {
File.Delete("password.txt");
}
if (server.Login(userNameTextBox.Text, passwordTextBox.Text)) {
button4.Enabled = true;
deleteStringsButton.Enabled = true;
}
}
void Button4Click(object sender, EventArgs e)
{
EventHandler onDownloadFinished = delegate {
outputTextBox.Text += "\nBuilding resource files...";
RunBatch(dataBaseDir, "build.bat", delegate {
BeginInvoke(new MethodInvoker(delegate {
outputTextBox.Text += "\r\nBuilding SharpDevelop...";
}));
RunBatch(srcDir, "debugbuild.bat", null);
});
};
server.DownloadDatabase(dataBaseDir + "LocalizeDb.mdb", onDownloadFinished);
}
void RunBatch(string dir, string batchFile, MethodInvoker exitCallback)
{
BeginInvoke(new MethodInvoker(delegate {
outputTextBox.Text += "\r\nRun " + dir + batchFile + "...";
}));
ProcessStartInfo psi = new ProcessStartInfo("cmd", "/c " + batchFile);
psi.WorkingDirectory = dir;
Process p = Process.Start(psi);
if (exitCallback != null) {
p.EnableRaisingEvents = true;
p.Exited += delegate {
p.Dispose();
exitCallback();
};
}
}
void DeleteStringsButtonClick(object sender, EventArgs e)
{
List<string> list = new List<string>();
string preview = "";
foreach (string line in outputTextBox.Lines) {
if (line.Length > 0) {
list.Add(line);
if (preview.Length == 0) {
preview = line;
} else if (preview.Length < 100) {
preview += ", " + line;
}
}
}
if (MessageBox.Show("Do you really want to delete the " + list.Count + " resource strings (" + preview + ")"
, "Delete resources", MessageBoxButtons.YesNo) == DialogResult.Yes) {
server.DeleteResourceStrings(list.ToArray());
}
}
}
}

38
src/Tools/StringResourceTool/StringResourceTool.csproj

@ -0,0 +1,38 @@ @@ -0,0 +1,38 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<RootNamespace>StringResourceTool</RootNamespace>
<AssemblyName>StringResourceTool</AssemblyName>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{197537EA-78F4-4434-904C-C81B19459FE7}</ProjectGuid>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<OutputPath>bin\Debug\</OutputPath>
<Optimize>False</Optimize>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugSymbols>True</DebugSymbols>
<DebugType>Full</DebugType>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<OutputPath>bin\Release\</OutputPath>
<Optimize>True</Optimize>
<DefineConstants>TRACE</DefineConstants>
<DebugSymbols>False</DebugSymbols>
<DebugType>None</DebugType>
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="MainForm.cs" />
<Compile Include="TranslationServer.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
</Project>

6
src/Tools/StringResourceTool/StringResourceTool.sln

@ -0,0 +1,6 @@ @@ -0,0 +1,6 @@
Microsoft Visual Studio Solution File, Format Version 9.00
# SharpDevelop 2.0.0.550
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StringResourceTool", "StringResourceTool.csproj", "{197537EA-78F4-4434-904C-C81B19459FE7}"
EndProject
Global
EndGlobal

123
src/Tools/StringResourceTool/TranslationServer.cs

@ -0,0 +1,123 @@ @@ -0,0 +1,123 @@
/*
* Created by SharpDevelop.
* User: Daniel Grunwald
* Date: 08.10.2005
* Time: 20:24
*/
using System;
using System.IO;
using System.Net;
using System.Windows.Forms;
namespace StringResourceTool
{
public class TranslationServer
{
TextBox output;
string baseURL = "http://developer.sharpdevelop.net/corsavy/translation/";
public TranslationServer(TextBox output)
{
this.output = output;
}
CookieContainer cookieContainer = new CookieContainer();
public bool Login(string user, string pwd)
{
output.Text = "Contacting server...";
Application.DoEvents();
System.Threading.Thread.Sleep(50);
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(baseURL + "logon.asp");
request.ContentType = "application/x-www-form-urlencoded";
string postString = "uname=" + user + "&upwd=" + pwd;
request.ContentLength = postString.Length;
request.CookieContainer = cookieContainer;
request.Method = "POST";
request.AllowAutoRedirect = false;
Stream s = request.GetRequestStream();
using (StreamWriter w = new StreamWriter(s)) {
w.Write(postString);
}
s.Close();
string result;
using (StreamReader r = new StreamReader(request.GetResponse().GetResponseStream())) {
result = r.ReadToEnd();
}
if (result.Contains("You couldn't be logged on")) {
output.Text += "\r\nInvalid username/password.";
return false;
}
output.Text += "\r\nLogin successful.";
return true;
}
public void DownloadDatabase(string targetFile, EventHandler successCallback)
{
WebClient wc = new WebClient();
wc.Headers.Set("Cookie", cookieContainer.GetCookieHeader(new Uri(baseURL)));
wc.DownloadProgressChanged += delegate(object sender, DownloadProgressChangedEventArgs e) {
output.BeginInvoke(new MethodInvoker(delegate {
output.Text = "Download: " + e.ProgressPercentage + "%";
}));
};
wc.DownloadDataCompleted += delegate(object sender, DownloadDataCompletedEventArgs e) {
output.BeginInvoke(new MethodInvoker(delegate {
if (e.Error != null)
output.Text = e.Error.ToString();
else
output.Text = "Download complete.";
}));
if (e.Error == null) {
using (FileStream fs = new FileStream(targetFile, FileMode.Create, FileAccess.Write)) {
fs.Write(e.Result, 0, e.Result.Length);
}
successCallback(this, EventArgs.Empty);
}
wc.Dispose();
};
wc.DownloadDataAsync(new Uri(baseURL + "CompactNdownload.asp"));
}
public void DeleteResourceStrings(string[] idx)
{
const int threadCount = 3; // 3 parallel calls
output.Text = "Deleting...";
int index = 0;
int finishCount = 0;
EventHandler callback = null;
callback = delegate {
lock (idx) {
if (index < idx.Length) {
DeleteResourceString(idx[index++], callback);
} else {
finishCount += 1;
if (finishCount == threadCount) {
output.BeginInvoke(new MethodInvoker(delegate {
output.Text += "\r\nFinished.";
output.Text += "\r\nYou have to re-download the database to see the changes.";
}));
}
}
}
};
for (int i = 0; i < threadCount; i++) {
callback(null, null);
}
}
public void DeleteResourceString(string idx, EventHandler callback)
{
WebClient wc = new WebClient();
wc.Headers.Set("Cookie", cookieContainer.GetCookieHeader(new Uri(baseURL)));
wc.Headers.Set("Content-Type", "application/x-www-form-urlencoded");
wc.UploadStringCompleted += delegate {
output.BeginInvoke(new MethodInvoker(delegate {
output.Text += "\r\nDeleted " + idx;
}));
wc.Dispose();
if (callback != null)
callback(this, EventArgs.Empty);
};
wc.UploadStringAsync(new Uri(baseURL + "owners_delete.asp"),
"Idx=" + Uri.EscapeDataString(idx) + "&ReallyDelete=on");
}
}
}
Loading…
Cancel
Save