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>
<data name="Dialog.Options.IDEOptions.TextEditor.Behaviour.ConvertTabsToSpacesCheckBox" xml:space="preserve"> <data name="Dialog.Options.IDEOptions.TextEditor.Behaviour.ConvertTabsToSpacesCheckBox" xml:space="preserve">
<value>&amp;Zet tabs om in spaties</value> <value>&amp;Zet tabs om in spaties</value>
</data> </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"> <data name="Dialog.Options.IDEOptions.TextEditor.Behaviour.CurlyBracketCheckBox" xml:space="preserve">
<value>A&amp;utomatisch haakjes invoegen</value> <value>A&amp;utomatisch haakjes invoegen</value>
</data> </data>
@ -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"> <data name="Dialog.Options.IDEOptions.TextEditor.Behaviour.TemplateInsertCheckBox" xml:space="preserve">
<value>&amp;Automatisch sjabloon invoegen</value> <value>&amp;Automatisch sjabloon invoegen</value>
</data> </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"> <data name="Dialog.Options.IDEOptions.TextEditor.CodeCompletion.PanelName" xml:space="preserve">
<value>Code Completeren</value> <value>Code Completeren</value>
</data> </data>

25
data/resources/StringResources.resx

@ -760,6 +760,31 @@ You have to save those files before running the operation.</value>
<data name="AddIns.Subversion.UpdateToRevision" xml:space="preserve"> <data name="AddIns.Subversion.UpdateToRevision" xml:space="preserve">
<value>Update to revision</value> <value>Update to revision</value>
</data> </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"> <data name="AddIns.XamlBinding.Menu.EditGridColumnsAndRows" xml:space="preserve">
<value>Edit grid columns and rows</value> <value>Edit grid columns and rows</value>
</data> </data>

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

@ -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"> <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> <StackPanel>
<TextBlock TextWrapping="Wrap"> <TextBlock
We need your help! To improve SharpDevelop in the future, we would like to know which features are used most.<LineBreak /> TextWrapping="Wrap"
SharpDevelop can collect this information and upload it automatically. Text="{core:Localize AddIns.UsageDataCollector.Introduction}"/>
</TextBlock> <RadioButton
<RadioButton Name="acceptRadio">I would like to participate - collect and upload usage data</RadioButton> Name="acceptRadio"
<RadioButton Name="declineRadio">I do not want to participate</RadioButton> Content="{core:Localize AddIns.UsageDataCollector.AcceptRadioButton}"/>
<Button Name="showCollectedDataButton" Click="ShowCollectedDataButton_Click" Margin="4" HorizontalAlignment="Left"> <RadioButton
Show collected data Name="declineRadio"
</Button> 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"> <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> </TextBlock>
</StackPanel> </StackPanel>
</gui:OptionPanel> </gui:OptionPanel>

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

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

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

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

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

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

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

@ -80,10 +80,13 @@ namespace StringResourceToolAddIn
// ensure caret is at start of selection / deselect text // ensure caret is at start of selection / deselect text
textEditor.Select(textEditor.SelectionStart, 0); textEditor.Select(textEditor.SelectionStart, 0);
// replace the selected text with the new text: // 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 // Replace() takes the arguments: start offset to replace, length of the text to remove, new text
textEditor.Document.Replace(textEditor.Caret.Offset, textEditor.Document.Replace(textEditor.Caret.Offset, oldText.Length, newText);
oldText.Length,
"$" + "{res:" + resourceName + "}");
} }
} }
} }

Loading…
Cancel
Save