Browse Source

Move strings from UsageDataCollector into translation database.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5428 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
pull/1/head
Daniel Grunwald 16 years ago
parent
commit
935f3a005b
  1. 6
      data/resources/StringResources.nl.resx
  2. 25
      data/resources/StringResources.resx
  3. 24
      src/AddIns/Misc/UsageDataCollector/UsageDataCollector.AddIn/OptionPage.xaml
  4. 27
      src/AddIns/Misc/UsageDataCollector/UsageDataCollector.AddIn/StartPageMessage.xaml
  5. 3
      src/AddIns/Misc/UsageDataCollector/UsageDataCollector.AddIn/StartPageMessage.xaml.cs
  6. 3
      src/AddIns/Misc/UsageDataCollector/UsageDataCollector.AddIn/UsageDataCollector.addin
  7. 9
      src/Tools/StringResourceToolAddIn/Src/Command.cs

6
data/resources/StringResources.nl.resx

@ -2478,6 +2478,9 @@ Wilt u het nieuwe bestand toevoegen aan project ${CurrentProjectName}?</value> @@ -2478,6 +2478,9 @@ Wilt u het nieuwe bestand toevoegen aan project ${CurrentProjectName}?</value>
<data name="Dialog.Options.IDEOptions.TextEditor.Behaviour.ConvertTabsToSpacesCheckBox" xml:space="preserve">
<value>&amp;Zet tabs om in spaties</value>
</data>
<data name="Dialog.Options.IDEOptions.TextEditor.Behaviour.CtrlClickGotoDefinition" xml:space="preserve">
<value>Met Ctrl+Klik naar de definitie springen</value>
</data>
<data name="Dialog.Options.IDEOptions.TextEditor.Behaviour.CurlyBracketCheckBox" xml:space="preserve">
<value>A&amp;utomatisch haakjes invoegen</value>
</data>
@ -2523,6 +2526,9 @@ Wilt u het nieuwe bestand toevoegen aan project ${CurrentProjectName}?</value> @@ -2523,6 +2526,9 @@ Wilt u het nieuwe bestand toevoegen aan project ${CurrentProjectName}?</value>
<data name="Dialog.Options.IDEOptions.TextEditor.Behaviour.TemplateInsertCheckBox" xml:space="preserve">
<value>&amp;Automatisch sjabloon invoegen</value>
</data>
<data name="Dialog.Options.IDEOptions.TextEditor.Behaviour.UseSmartIndent" xml:space="preserve">
<value>Slim inspringen gebruiken</value>
</data>
<data name="Dialog.Options.IDEOptions.TextEditor.CodeCompletion.PanelName" xml:space="preserve">
<value>Code Completeren</value>
</data>

25
data/resources/StringResources.resx

@ -760,6 +760,31 @@ You have to save those files before running the operation.</value> @@ -760,6 +760,31 @@ You have to save those files before running the operation.</value>
<data name="AddIns.Subversion.UpdateToRevision" xml:space="preserve">
<value>Update to revision</value>
</data>
<data name="AddIns.UsageDataCollector.AcceptConfirmation" xml:space="preserve">
<value>Thank you for participating! You can still opt-out later using the SharpDevelop options.</value>
</data>
<data name="AddIns.UsageDataCollector.AcceptRadioButton" xml:space="preserve">
<value>I would like to participate - collect and upload usage data</value>
</data>
<data name="AddIns.UsageDataCollector.DeclineConfirmation" xml:space="preserve">
<value>You can still opt-in later using the SharpDevelop options.</value>
</data>
<data name="AddIns.UsageDataCollector.DeclineRadioButton" xml:space="preserve">
<value>I do not want to participate</value>
</data>
<data name="AddIns.UsageDataCollector.Introduction" xml:space="preserve">
<value>We need your help! To improve SharpDevelop in the future, we would like to know which features are used most.
SharpDevelop can collect this information and upload it automatically.</value>
</data>
<data name="AddIns.UsageDataCollector.PrivacyStatement" xml:space="preserve">
<value>Privacy Statement</value>
</data>
<data name="AddIns.UsageDataCollector.ShowCollectedData" xml:space="preserve">
<value>Show collected data</value>
</data>
<data name="AddIns.UsageDataCollector.Title" xml:space="preserve">
<value>Usage Data Collection</value>
</data>
<data name="AddIns.XamlBinding.Menu.EditGridColumnsAndRows" xml:space="preserve">
<value>Edit grid columns and rows</value>
</data>

24
src/AddIns/Misc/UsageDataCollector/UsageDataCollector.AddIn/OptionPage.xaml

@ -1,16 +1,20 @@ @@ -1,16 +1,20 @@
<gui:OptionPanel x:Class="ICSharpCode.UsageDataCollector.OptionPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:gui="clr-namespace:ICSharpCode.SharpDevelop.Gui;assembly=ICSharpCode.SharpDevelop" xmlns:core="http://icsharpcode.net/sharpdevelop/core" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:ICSharpCode.UsageDataCollector">
<StackPanel>
<TextBlock TextWrapping="Wrap">
We need your help! To improve SharpDevelop in the future, we would like to know which features are used most.<LineBreak />
SharpDevelop can collect this information and upload it automatically.
</TextBlock>
<RadioButton Name="acceptRadio">I would like to participate - collect and upload usage data</RadioButton>
<RadioButton Name="declineRadio">I do not want to participate</RadioButton>
<Button Name="showCollectedDataButton" Click="ShowCollectedDataButton_Click" Margin="4" HorizontalAlignment="Left">
Show collected data
</Button>
<TextBlock
TextWrapping="Wrap"
Text="{core:Localize AddIns.UsageDataCollector.Introduction}"/>
<RadioButton
Name="acceptRadio"
Content="{core:Localize AddIns.UsageDataCollector.AcceptRadioButton}"/>
<RadioButton
Name="declineRadio"
Content="{core:Localize AddIns.UsageDataCollector.DeclineRadioButton}"/>
<Button Name="showCollectedDataButton" Click="ShowCollectedDataButton_Click" Margin="4" HorizontalAlignment="Left" Content="{core:Localize AddIns.UsageDataCollector.ShowCollectedData}"/>
<TextBlock HorizontalAlignment="Left">
<Hyperlink NavigateUri="{x:Static local:AnalyticsMonitor.PrivacyStatementUrl}">Privacy Statement</Hyperlink>
<Hyperlink
NavigateUri="{x:Static local:AnalyticsMonitor.PrivacyStatementUrl}">
<Run Text="{core:Localize AddIns.UsageDataCollector.PrivacyStatement}"/>
</Hyperlink>
</TextBlock>
</StackPanel>
</gui:OptionPanel>

27
src/AddIns/Misc/UsageDataCollector/UsageDataCollector.AddIn/StartPageMessage.xaml

@ -6,16 +6,16 @@ @@ -6,16 +6,16 @@
Name="mainPanel">
<StackPanel>
<TextBlock
TextWrapping="Wrap">
We need your help! To improve SharpDevelop in the future, we would like to know which features are used most.<LineBreak />
SharpDevelop can collect this information and upload it automatically.
</TextBlock>
TextWrapping="Wrap"
Text="{core:Localize AddIns.UsageDataCollector.Introduction}"/>
<RadioButton
Name="acceptRadio"
Checked="Radio_Checked">I would like to participate - collect and upload usage data</RadioButton>
Checked="Radio_Checked"
Content="{core:Localize AddIns.UsageDataCollector.AcceptRadioButton}"/>
<RadioButton
Name="declineRadio"
Checked="Radio_Checked">I do not want to participate</RadioButton>
Checked="Radio_Checked"
Content="{core:Localize AddIns.UsageDataCollector.DeclineRadioButton}"/>
<Button
Name="saveButton"
IsEnabled="False"
@ -23,27 +23,26 @@ @@ -23,27 +23,26 @@
Margin="16 4"
Width="75"
Height="23"
Click="SaveButton_Click">Save</Button>
Click="SaveButton_Click"
Content="{core:Localize Dialog.Options.IDEOptions.LoadSaveOptions.SaveLabel}"/>
</StackPanel>
</core:CollapsiblePanel>
<core:CollapsiblePanel
Name="acceptedMessage"
IsCollapsed="True">
<TextBlock>
Thank you for participating! You can still opt-out later using the SharpDevelop options.
</TextBlock>
<TextBlock TextWrapping="Wrap" Text="{core:Localize AddIns.UsageDataCollector.AcceptConfirmation}"/>
</core:CollapsiblePanel>
<core:CollapsiblePanel
Name="declinedMessage"
IsCollapsed="True">
<TextBlock>
You can still opt-in later using the SharpDevelop options.
</TextBlock>
<TextBlock TextWrapping="Wrap" Text="{core:Localize AddIns.UsageDataCollector.DeclineConfirmation}"/>
</core:CollapsiblePanel>
<TextBlock
HorizontalAlignment="Left">
<Hyperlink
NavigateUri="{x:Static local:AnalyticsMonitor.PrivacyStatementUrl}">Privacy Statement</Hyperlink>
NavigateUri="{x:Static local:AnalyticsMonitor.PrivacyStatementUrl}">
<Run Text="{core:Localize AddIns.UsageDataCollector.PrivacyStatement}"/>
</Hyperlink>
</TextBlock>
</StackPanel>
</UserControl>

3
src/AddIns/Misc/UsageDataCollector/UsageDataCollector.AddIn/StartPageMessage.xaml.cs

@ -14,6 +14,7 @@ using System.Windows.Data; @@ -14,6 +14,7 @@ using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using ICSharpCode.Core.Presentation;
namespace ICSharpCode.UsageDataCollector
{
@ -26,7 +27,7 @@ namespace ICSharpCode.UsageDataCollector @@ -26,7 +27,7 @@ namespace ICSharpCode.UsageDataCollector
{
InitializeComponent();
this.Header = "Usage Data Collection";
this.SetValueToExtension(HeaderProperty, new LocalizeExtension("AddIns.UsageDataCollector.Title"));
}
void Radio_Checked(object sender, RoutedEventArgs e)

3
src/AddIns/Misc/UsageDataCollector/UsageDataCollector.AddIn/UsageDataCollector.addin

@ -1,6 +1,5 @@ @@ -1,6 +1,5 @@
<AddIn name = "Usage Data Collector"
author = "Daniel Grunwald"
url = ""
description = "Collects usage data and sends it to the SharpDevelop team"
addInManagerHidden = "preinstalled">
@ -29,7 +28,7 @@ @@ -29,7 +28,7 @@
<Path name="/SharpDevelop/Dialogs/OptionsDialog/UIOptions">
<OptionPanel id = "UsageDataCollector"
label = "Usage Data Collector"
label = "${res:AddIns.UsageDataCollector.Title}"
class = "ICSharpCode.UsageDataCollector.OptionPage" />
</Path>
</AddIn>

9
src/Tools/StringResourceToolAddIn/Src/Command.cs

@ -80,10 +80,13 @@ namespace StringResourceToolAddIn @@ -80,10 +80,13 @@ namespace StringResourceToolAddIn
// ensure caret is at start of selection / deselect text
textEditor.Select(textEditor.SelectionStart, 0);
// replace the selected text with the new text:
string newText;
if (Path.GetExtension(textEditor.FileName) == ".xaml")
newText = "{core:Localize " + resourceName + "}";
else
newText = "$" + "{res:" + resourceName + "}";
// Replace() takes the arguments: start offset to replace, length of the text to remove, new text
textEditor.Document.Replace(textEditor.Caret.Offset,
oldText.Length,
"$" + "{res:" + resourceName + "}");
textEditor.Document.Replace(textEditor.Caret.Offset, oldText.Length, newText);
}
}
}

Loading…
Cancel
Save