Browse Source

Move portable library strings to translation database.

pull/24/merge
Daniel Grunwald 13 years ago
parent
commit
0e2a410acb
  1. 38
      data/resources/StringResources.resx
  2. 4
      data/templates/project/CSharp/PortableLibrary.xpt
  3. 4
      src/AddIns/Debugger/Debugger.AddIn/Options/DebuggingSymbolsPanel.resx
  4. 5
      src/Main/Base/Project/Src/Project/PortableLibrary/CheckPortableLibraryInstalled.cs
  5. 3
      src/Main/Base/Project/Src/Project/PortableLibrary/PickPortableTargetFramework.cs
  6. 2
      src/Main/Base/Project/Src/Project/PortableLibrary/PortableTargetFramework.cs
  7. 12
      src/Main/Base/Project/Src/Project/PortableLibrary/Profile.cs
  8. 7
      src/Main/Base/Project/Src/Project/PortableLibrary/SelectProfileDialog.xaml

38
data/resources/StringResources.resx

@ -1550,6 +1550,12 @@ Examples: "120", "MainClass", "Main.cs, 120".</value> @@ -1550,6 +1550,12 @@ Examples: "120", "MainClass", "Main.cs, 120".</value>
<data name="Dialog.HighlightingEditor.ColorDlg.Italic" xml:space="preserve">
<value>Italic</value>
</data>
<data name="Dialog.HighlightingEditor.Export" xml:space="preserve">
<value>Export highlighting colors</value>
</data>
<data name="Dialog.HighlightingEditor.Import" xml:space="preserve">
<value>Import highlighting colors</value>
</data>
<data name="Dialog.HighlightingEditor.Properties.Value" xml:space="preserve">
<value>Value</value>
</data>
@ -5698,6 +5704,32 @@ Removed the end part of the original message ", reason '${Message}'" since this @@ -5698,6 +5704,32 @@ Removed the end part of the original message ", reason '${Message}'" since this
<data name="OpenFileTabEventHandler.OpenCommandPromptHere" xml:space="preserve">
<value>Open command prompt here</value>
</data>
<data name="PortableLibrary.ChooseTargetFrameworks" xml:space="preserve">
<value>choose target frameworks</value>
<comment>Option in the "target framework" combobox in the "project upgrade" view that causes the "select portable profile" dialog to appear</comment>
</data>
<data name="PortableLibrary.CouldNotFindTools" xml:space="preserve">
<value>Could not find Portable Class Library Tools.</value>
</data>
<data name="PortableLibrary.PortableSubset" xml:space="preserve">
<value>.NET Portable Subset</value>
<comment>Name for the portable target framework, shown in Project Upgrade view</comment>
</data>
<data name="PortableLibrary.SelectAtLeastTwoFrameworks" xml:space="preserve">
<value>Two or more frameworks must be selected.</value>
<comment>Label shown when only 0 or 1 frameworks are selected</comment>
</data>
<data name="PortableLibrary.SelectedProfile" xml:space="preserve">
<value>Selected profile:</value>
<comment>Label that shows the selected portable library profile</comment>
</data>
<data name="PortableLibrary.SelectProfileDialog.Title" xml:space="preserve">
<value>Select Portable Library Profile</value>
<comment>Title of the dialog used to pick the target frameworks for a portable library project</comment>
</data>
<data name="PortableLibrary.ToolsInstallationHelp" xml:space="preserve">
<value>To install the Portable Class Library Tools without installing Visual Studio, save the download file (PortableLibraryTools.exe) on your computer, and run the installation program from a Command Prompt window. Include the /buildmachine switch on the command line.</value>
</data>
<data name="ProjectBrowser.Toolbar.CollapseAll" xml:space="preserve">
<value>Collapse all nodes</value>
</data>
@ -7012,6 +7044,12 @@ The resources files have been renamed/moved accordingly.</value> @@ -7012,6 +7044,12 @@ The resources files have been renamed/moved accordingly.</value>
<value>Gtk# Application</value>
<comment>Name of Gtk# project template.</comment>
</data>
<data name="Templates.Project.PortableLibrary.Description" xml:space="preserve">
<value>Library that can be used on Windows, Silverlight, Windows Phone, and Xbox.</value>
</data>
<data name="Templates.Project.PortableLibrary.Name" xml:space="preserve">
<value>Portable Class Library</value>
</data>
<data name="Templates.Project.SetupProject.Description" xml:space="preserve">
<value>A windows installer project for creating a MSI installer.</value>
</data>

4
data/templates/project/CSharp/PortableLibrary.xpt

@ -3,10 +3,10 @@ @@ -3,10 +3,10 @@
<!-- Template Header -->
<TemplateConfiguration>
<Name>Portable Library</Name>
<Name>${res:Templates.Project.PortableLibrary.Name}</Name>
<Category>C#</Category>
<Icon>C#.Project.Library</Icon>
<Description>Library that can be used on Windows, Silverlight, Windows Phone, and Xbox.</Description>
<Description>${res:Templates.Project.PortableLibrary.Description}</Description>
</TemplateConfiguration>
<!-- Actions -->

4
src/AddIns/Debugger/Debugger.AddIn/Options/DebuggingSymbolsPanel.resx

@ -112,9 +112,9 @@ @@ -112,9 +112,9 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

5
src/Main/Base/Project/Src/Project/PortableLibrary/CheckPortableLibraryInstalled.cs

@ -19,8 +19,9 @@ namespace ICSharpCode.SharpDevelop.Project.PortableLibrary @@ -19,8 +19,9 @@ namespace ICSharpCode.SharpDevelop.Project.PortableLibrary
{
if (!ProfileList.IsPortableLibraryInstalled()) {
using (ToolNotFoundDialog dlg = new ToolNotFoundDialog(
"Could not find Portable Class Library Tools." + Environment.NewLine + Environment.NewLine +
"To install the Portable Class Library Tools without installing Visual Studio, save the download file (PortableLibraryTools.exe) on your computer, and run the installation program from a Command Prompt window. Include the /buildmachine switch on the command line.",
StringParser.Parse(
"${res:PortableLibrary.CouldNotFindTools}" + Environment.NewLine + Environment.NewLine +
"${res:PortableLibrary.ToolsInstallationHelp}"),
"http://go.microsoft.com/fwlink/?LinkId=210823"
)) {
// our message is long, so make the window bigger than usual

3
src/Main/Base/Project/Src/Project/PortableLibrary/PickPortableTargetFramework.cs

@ -6,6 +6,7 @@ using System.Collections; @@ -6,6 +6,7 @@ using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop.Gui;
using ICSharpCode.SharpDevelop.Project.Converter;
@ -17,7 +18,7 @@ namespace ICSharpCode.SharpDevelop.Project.PortableLibrary @@ -17,7 +18,7 @@ namespace ICSharpCode.SharpDevelop.Project.PortableLibrary
sealed class PickPortableTargetFramework : TargetFramework
{
public PickPortableTargetFramework()
: base("PickPortableTargetFramework", ".NET Portable Subset (choose target frameworks)")
: base("PickPortableTargetFramework", Profile.PortableSubsetDisplayName + StringParser.Parse(" (${res:PortableLibrary.ChooseTargetFrameworks})"))
{
this.MinimumMSBuildVersion = new Version(4, 0);
}

2
src/Main/Base/Project/Src/Project/PortableLibrary/PortableTargetFramework.cs

@ -17,7 +17,7 @@ namespace ICSharpCode.SharpDevelop.Project.PortableLibrary @@ -17,7 +17,7 @@ namespace ICSharpCode.SharpDevelop.Project.PortableLibrary
public readonly string TargetFrameworkProfile;
public PortableTargetFramework(string targetFrameworkVersion, string targetFrameworkProfile)
: base(targetFrameworkVersion + "-" + targetFrameworkProfile, ".NET Portable Subset (" + targetFrameworkVersion + "-" + targetFrameworkProfile + ")")
: base(targetFrameworkVersion + "-" + targetFrameworkProfile, Profile.PortableSubsetDisplayName + " (" + targetFrameworkVersion + "-" + targetFrameworkProfile + ")")
{
this.TargetFrameworkVersion = targetFrameworkVersion;
this.TargetFrameworkProfile = targetFrameworkProfile;

12
src/Main/Base/Project/Src/Project/PortableLibrary/Profile.cs

@ -9,6 +9,7 @@ using System.Linq; @@ -9,6 +9,7 @@ using System.Linq;
using System.Text;
using System.Xml;
using System.Xml.Linq;
using ICSharpCode.Core;
namespace ICSharpCode.SharpDevelop.Project.PortableLibrary
{
@ -50,13 +51,22 @@ namespace ICSharpCode.SharpDevelop.Project.PortableLibrary @@ -50,13 +51,22 @@ namespace ICSharpCode.SharpDevelop.Project.PortableLibrary
public string DisplayName { get; private set; }
public IList<SupportedFramework> SupportedFrameworks { get; private set; }
/// <summary>
/// Returns ".NET Portable Subset" localized
/// </summary>
public static string PortableSubsetDisplayName {
get {
return StringParser.Parse("${res:PortableLibrary.PortableSubset}");
}
}
public Profile(string targetFrameworkVersion, string targetFrameworkProfile, IList<SupportedFramework> supportedFrameworks)
{
this.TargetFrameworkVersion = targetFrameworkVersion;
this.TargetFrameworkProfile = targetFrameworkProfile;
this.SupportedFrameworks = supportedFrameworks;
this.DisplayName = ".NET Portable Subset (" + string.Join(", ", supportedFrameworks) + ")";
this.DisplayName = PortableSubsetDisplayName + " (" + string.Join(", ", supportedFrameworks) + ")";
}
public bool Supports(IList<SupportedFramework> frameworks)

7
src/Main/Base/Project/Src/Project/PortableLibrary/SelectProfileDialog.xaml

@ -3,7 +3,8 @@ @@ -3,7 +3,8 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:ICSharpCode.SharpDevelop.Project.PortableLibrary"
xmlns:core="http://icsharpcode.net/sharpdevelop/core" xmlns:widgets="http://icsharpcode.net/sharpdevelop/widgets"
Title="Select Portable Library Profile" MinWidth="300" MinHeight="200" Height="350" Width="400" WindowStartupLocation="CenterOwner"
Title="{core:Localize PortableLibrary.SelectProfileDialog.Title}"
MinWidth="300" MinHeight="200" Height="350" Width="400" WindowStartupLocation="CenterOwner"
Style="{x:Static core:GlobalStyles.DialogWindowStyle}">
<Grid>
<Grid.Resources>
@ -44,10 +45,10 @@ @@ -44,10 +45,10 @@
</ItemsControl>
</ScrollViewer>
<TextBlock Grid.Row="1" TextWrapping="WrapWithOverflow" Visibility="{Binding HasTwoOrMoreFrameworksSelected, Converter={StaticResource showWhenTrue}}">
<Bold>Selected profile:</Bold> <Run Text="{Binding SelectedProfile.DisplayName, Mode=OneWay}"/>
<Bold><Run Text="{core:Localize PortableLibrary.SelectedProfile}"/></Bold> <Run Text="{Binding SelectedProfile.DisplayName, Mode=OneWay}"/>
</TextBlock>
<TextBlock Grid.Row="1" TextWrapping="WrapWithOverflow" Visibility="{Binding HasTwoOrMoreFrameworksSelected, Converter={StaticResource showWhenFalse}}">
<Bold>Two or more frameworks must be selected.</Bold>
<Bold><Run Text="{core:Localize PortableLibrary.SelectAtLeastTwoFrameworks}"/></Bold>
</TextBlock>
<widgets:UniformGridWithSpacing Columns="2" Grid.Column="0" Grid.Row="2" HorizontalAlignment="Right" Margin="0,4,12,12">
<Button

Loading…
Cancel
Save