Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema

Version 2.0

The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.

Example:

... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>

There are any number of "resheader" rows that contain simple
name/value pairs.

Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.

The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:

Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.

mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.

mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.

mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="ksNoANAValue" xml:space="preserve">
<value>Warning! No ANA value was found for segment='{0}'. Will skip it.</value>
<comment>{0} is the segment content</comment>
</data>
<data name="ksRedoDescription" xml:space="preserve">
<value>You cannot use 'Undo' to cancel the effect of this utility. You would need to go back to a previously saved version of the database(i.e., make a backup of your database before running this utility so you can restore to it if the results are not what you want).</value>
</data>
<data name="ksTitle" xml:space="preserve">
<value>Xtract Texts as ANA for regression testing of PC-PATR with FLEx</value>
</data>
<data name="ksWhatDescription" xml:space="preserve">
<value>Run this when you are using PCPatrFLEx and want to create a set of regression input files.</value>
</data>
<data name="ksWhenDescription" xml:space="preserve">
<value>Run this when you are using PCPatrFLEx and want to create a set of regression input files.</value>
</data>
</root>
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,17 @@
<Link>Properties\CommonAssemblyInfo.cs</Link>
</Compile>
</ItemGroup>
<ItemGroup>
<Compile Update="ExtractAnaFilesFromTexts.Strings.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>ExtractAnaFilesFromTexts.Strings.resx</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Update="ExtractAnaFilesFromTexts.Strings.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>ExtractAnaFilesFromTexts.Strings.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// This software is licensed under the LGPL, version 2.1 or later
// (http://www.gnu.org/licenses/lgpl-2.1.html)

using ExtractAnaFilesFromTexts;
using Microsoft.Win32;
using SIL.DisambiguateInFLExDB;
using SIL.LCModel;
Expand Down Expand Up @@ -209,11 +210,8 @@ private string GetAnaForm(IText selectedTextToShow)
var ana = Extractor.ExtractTextSegmentAsANA(segment);
if (ana.Length == 0)
{
MessageBox.Show(
"Warning! No ANA value was found for segment='"
+ segment.GetBaselineText(0).Text
+ "'. Will skip it."
);
MessageBox.Show(string.Format(ExtractAnaFilesFromTexts_Strings.ksNoANAValue,
segment.GetBaselineText(0).Text));
continue;
}
sb.Append(ana.Substring(0, ana.Length - 1)); // skip final extra nl
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using SIL.FieldWorks.FwCoreDlgs;
using SIL.LCModel;
using System.Windows.Forms;
using ExtractAnaFilesFromTexts;

namespace SIL.PcPatrFLEx
{
Expand All @@ -31,7 +32,7 @@ public override string ToString()
/// <summary>
/// Get the main label describing the utility.
/// </summary>
public string Label => "Xtract Texts as ANA for regression testing of PC-PATR with FLEx";
public string Label => ExtractAnaFilesFromTexts_Strings.ksTitle;

UtilityDlg IUtility.Dialog
{
Expand All @@ -45,12 +46,9 @@ void IUtility.LoadUtilities()

void IUtility.OnSelection()
{
m_dlg.WhenDescription =
"Run this when you are using PCPatrFLEx and want to create a set of regression input files.";
m_dlg.WhatDescription =
"Run this when you are using PCPatrFLEx and want to create a set of regression input files.";
m_dlg.RedoDescription =
"You cannot use 'Undo' to cancel the effect of this utility. You would need to go back to a previously saved version of the database(i.e., make a backup of your database before running this utility so you can restore to it if the results are not what you want).";
m_dlg.WhenDescription = ExtractAnaFilesFromTexts_Strings.ksWhenDescription;
m_dlg.WhatDescription = ExtractAnaFilesFromTexts_Strings.ksWhatDescription;
m_dlg.RedoDescription = ExtractAnaFilesFromTexts_Strings.ksRedoDescription;
}

void IUtility.Process()
Expand Down
3 changes: 1 addition & 2 deletions Src/Utilities/pcpatrflex/PcPatrBrowserDll/PcPatrBrowser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@ public class PcPatrBrowserApp : System.Windows.Forms.Form
private string m_sLogOrAnaFileName;
private string m_sGrammarFileName;
private string m_sLanguageFileName;
private const string m_strLanguageFileFilter =
"PC-PATR Browser Language Info (*.pbl)|*.pbl|" + "All Files (*.*)|*.*";
private string m_strLanguageFileFilter = string.Format(PcPatrBrowserDll_Strings.ksFileFilterPrompt, "pbl");
string m_sFSFile;
string m_sInterFile;
string m_sTransformsDir = Path.Combine(FwDirectoryFinder.CodeDirectory, "Language Explorer", "Transforms", "PcPatrBrowser");
Expand Down
13 changes: 13 additions & 0 deletions Src/Utilities/pcpatrflex/PcPatrBrowserDll/PcPatrBrowserDll.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,17 @@
<Link>Properties\CommonAssemblyInfo.cs</Link>
</Compile>
</ItemGroup>
<ItemGroup>
<Compile Update="PcPatrBrowserDll_Strings.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>PcPatrBrowserDll_Strings.resx</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Update="PcPatrBrowserDll_Strings.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>PcPatrBrowserDll_Strings.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
</Project>
Loading
Loading