diff --git a/Src/Utilities/pcpatrflex/ExtractAnaFilesFromTexts/ExtractAnaFilesFromTexts.Strings.Designer.cs b/Src/Utilities/pcpatrflex/ExtractAnaFilesFromTexts/ExtractAnaFilesFromTexts.Strings.Designer.cs new file mode 100644 index 0000000000..64f4e45a5c --- /dev/null +++ b/Src/Utilities/pcpatrflex/ExtractAnaFilesFromTexts/ExtractAnaFilesFromTexts.Strings.Designer.cs @@ -0,0 +1,108 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace ExtractAnaFilesFromTexts { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class ExtractAnaFilesFromTexts_Strings { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal ExtractAnaFilesFromTexts_Strings() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ExtractAnaFilesFromTexts.ExtractAnaFilesFromTexts.Strings", typeof(ExtractAnaFilesFromTexts_Strings).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to Warning! No ANA value was found for segment='{0}'. Will skip it.. + /// + internal static string ksNoANAValue { + get { + return ResourceManager.GetString("ksNoANAValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 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).. + /// + internal static string ksRedoDescription { + get { + return ResourceManager.GetString("ksRedoDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Xtract Texts as ANA for regression testing of PC-PATR with FLEx. + /// + internal static string ksTitle { + get { + return ResourceManager.GetString("ksTitle", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Run this when you are using PCPatrFLEx and want to create a set of regression input files.. + /// + internal static string ksWhatDescription { + get { + return ResourceManager.GetString("ksWhatDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Run this when you are using PCPatrFLEx and want to create a set of regression input files.. + /// + internal static string ksWhenDescription { + get { + return ResourceManager.GetString("ksWhenDescription", resourceCulture); + } + } + } +} diff --git a/Src/Utilities/pcpatrflex/ExtractAnaFilesFromTexts/ExtractAnaFilesFromTexts.Strings.resx b/Src/Utilities/pcpatrflex/ExtractAnaFilesFromTexts/ExtractAnaFilesFromTexts.Strings.resx new file mode 100644 index 0000000000..ffc0bcebc6 --- /dev/null +++ b/Src/Utilities/pcpatrflex/ExtractAnaFilesFromTexts/ExtractAnaFilesFromTexts.Strings.resx @@ -0,0 +1,136 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Warning! No ANA value was found for segment='{0}'. Will skip it. + {0} is the segment content + + + 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). + + + Xtract Texts as ANA for regression testing of PC-PATR with FLEx + + + Run this when you are using PCPatrFLEx and want to create a set of regression input files. + + + Run this when you are using PCPatrFLEx and want to create a set of regression input files. + + \ No newline at end of file diff --git a/Src/Utilities/pcpatrflex/ExtractAnaFilesFromTexts/ExtractAnaFilesFromTexts.csproj b/Src/Utilities/pcpatrflex/ExtractAnaFilesFromTexts/ExtractAnaFilesFromTexts.csproj index f15e690c0a..70fe84f22f 100644 --- a/Src/Utilities/pcpatrflex/ExtractAnaFilesFromTexts/ExtractAnaFilesFromTexts.csproj +++ b/Src/Utilities/pcpatrflex/ExtractAnaFilesFromTexts/ExtractAnaFilesFromTexts.csproj @@ -46,4 +46,17 @@ Properties\CommonAssemblyInfo.cs + + + True + True + ExtractAnaFilesFromTexts.Strings.resx + + + + + ResXFileCodeGenerator + ExtractAnaFilesFromTexts.Strings.Designer.cs + + \ No newline at end of file diff --git a/Src/Utilities/pcpatrflex/ExtractAnaFilesFromTexts/ExtractAnaFilesFromTextsForm.cs b/Src/Utilities/pcpatrflex/ExtractAnaFilesFromTexts/ExtractAnaFilesFromTextsForm.cs index 00b4080daa..4269c342b7 100644 --- a/Src/Utilities/pcpatrflex/ExtractAnaFilesFromTexts/ExtractAnaFilesFromTextsForm.cs +++ b/Src/Utilities/pcpatrflex/ExtractAnaFilesFromTexts/ExtractAnaFilesFromTextsForm.cs @@ -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; @@ -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 diff --git a/Src/Utilities/pcpatrflex/ExtractAnaFilesFromTexts/FLExUtilityExtract.cs b/Src/Utilities/pcpatrflex/ExtractAnaFilesFromTexts/FLExUtilityExtract.cs index bb0ed9cd27..653ec067d9 100644 --- a/Src/Utilities/pcpatrflex/ExtractAnaFilesFromTexts/FLExUtilityExtract.cs +++ b/Src/Utilities/pcpatrflex/ExtractAnaFilesFromTexts/FLExUtilityExtract.cs @@ -10,6 +10,7 @@ using SIL.FieldWorks.FwCoreDlgs; using SIL.LCModel; using System.Windows.Forms; +using ExtractAnaFilesFromTexts; namespace SIL.PcPatrFLEx { @@ -31,7 +32,7 @@ public override string ToString() /// /// Get the main label describing the utility. /// - public string Label => "Xtract Texts as ANA for regression testing of PC-PATR with FLEx"; + public string Label => ExtractAnaFilesFromTexts_Strings.ksTitle; UtilityDlg IUtility.Dialog { @@ -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() diff --git a/Src/Utilities/pcpatrflex/PcPatrBrowserDll/PcPatrBrowser.cs b/Src/Utilities/pcpatrflex/PcPatrBrowserDll/PcPatrBrowser.cs index 054b96c3d7..dedf319fa4 100644 --- a/Src/Utilities/pcpatrflex/PcPatrBrowserDll/PcPatrBrowser.cs +++ b/Src/Utilities/pcpatrflex/PcPatrBrowserDll/PcPatrBrowser.cs @@ -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"); diff --git a/Src/Utilities/pcpatrflex/PcPatrBrowserDll/PcPatrBrowserDll.csproj b/Src/Utilities/pcpatrflex/PcPatrBrowserDll/PcPatrBrowserDll.csproj index b68e3375bc..d8ac5af887 100644 --- a/Src/Utilities/pcpatrflex/PcPatrBrowserDll/PcPatrBrowserDll.csproj +++ b/Src/Utilities/pcpatrflex/PcPatrBrowserDll/PcPatrBrowserDll.csproj @@ -53,4 +53,17 @@ Properties\CommonAssemblyInfo.cs + + + True + True + PcPatrBrowserDll_Strings.resx + + + + + ResXFileCodeGenerator + PcPatrBrowserDll_Strings.Designer.cs + + \ No newline at end of file diff --git a/Src/Utilities/pcpatrflex/PcPatrBrowserDll/PcPatrBrowserDll_Strings.Designer.cs b/Src/Utilities/pcpatrflex/PcPatrBrowserDll/PcPatrBrowserDll_Strings.Designer.cs new file mode 100644 index 0000000000..37cc0dec08 --- /dev/null +++ b/Src/Utilities/pcpatrflex/PcPatrBrowserDll/PcPatrBrowserDll_Strings.Designer.cs @@ -0,0 +1,72 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace SIL.PcPatrBrowser { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class PcPatrBrowserDll_Strings { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal PcPatrBrowserDll_Strings() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SIL.PcPatrBrowser.PcPatrBrowserDll_Strings", typeof(PcPatrBrowserDll_Strings).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to PC-PATR Browser Language Info (*.{0})|*.{0}|" + "All Files (*.*)|*.*. + /// + internal static string ksFileFilterPrompt { + get { + return ResourceManager.GetString("ksFileFilterPrompt", resourceCulture); + } + } + } +} diff --git a/Src/Utilities/pcpatrflex/PcPatrBrowserDll/PcPatrBrowserDll_Strings.resx b/Src/Utilities/pcpatrflex/PcPatrBrowserDll/PcPatrBrowserDll_Strings.resx new file mode 100644 index 0000000000..f65894508c --- /dev/null +++ b/Src/Utilities/pcpatrflex/PcPatrBrowserDll/PcPatrBrowserDll_Strings.resx @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + PC-PATR Browser Language Info (*.{0})|*.{0}|" + "All Files (*.*)|*.* + {0} is always pbl which we hard-code + + \ No newline at end of file diff --git a/Src/Utilities/pcpatrflex/PcPatrFLExDll/AdvancedForm.Designer.cs b/Src/Utilities/pcpatrflex/PcPatrFLExDll/AdvancedForm.Designer.cs index b32b0b8238..c0687be805 100644 --- a/Src/Utilities/pcpatrflex/PcPatrFLExDll/AdvancedForm.Designer.cs +++ b/Src/Utilities/pcpatrflex/PcPatrFLExDll/AdvancedForm.Designer.cs @@ -28,107 +28,75 @@ protected override void Dispose(bool disposing) /// private void InitializeComponent() { - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AdvancedForm)); - this.btnCancel = new System.Windows.Forms.Button(); - this.btnOK = new System.Windows.Forms.Button(); - this.lblMaxAmbiguities = new System.Windows.Forms.Label(); - this.lblTimeLimit = new System.Windows.Forms.Label(); - this.cbRunIndividually = new System.Windows.Forms.CheckBox(); - this.tbMaxAmbiguities = new System.Windows.Forms.TextBox(); - this.tbTimeLimit = new System.Windows.Forms.TextBox(); - this.SuspendLayout(); - // - // btnCancel - // - this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.btnCancel.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnCancel.Location = new System.Drawing.Point(672, 392); - this.btnCancel.Name = "btnCancel"; - this.btnCancel.Size = new System.Drawing.Size(112, 46); - this.btnCancel.TabIndex = 7; - this.btnCancel.Text = "Cancel"; - this.btnCancel.UseVisualStyleBackColor = true; - this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); - // - // btnOK - // - this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK; - this.btnOK.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnOK.Location = new System.Drawing.Point(524, 392); - this.btnOK.Name = "btnOK"; - this.btnOK.Size = new System.Drawing.Size(112, 46); - this.btnOK.TabIndex = 6; - this.btnOK.Text = "OK"; - this.btnOK.UseVisualStyleBackColor = true; - this.btnOK.Click += new System.EventHandler(this.btnOK_Click); - // - // lblMaxAmbiguities - // - this.lblMaxAmbiguities.AutoSize = true; - this.lblMaxAmbiguities.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblMaxAmbiguities.Location = new System.Drawing.Point(40, 78); - this.lblMaxAmbiguities.Name = "lblMaxAmbiguities"; - this.lblMaxAmbiguities.Size = new System.Drawing.Size(378, 25); - this.lblMaxAmbiguities.TabIndex = 1; - this.lblMaxAmbiguities.Text = "Maximum number of ambiguities to output:"; - // - // lblTimeLimit - // - this.lblTimeLimit.AutoSize = true; - this.lblTimeLimit.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblTimeLimit.Location = new System.Drawing.Point(40, 139); - this.lblTimeLimit.Name = "lblTimeLimit"; - this.lblTimeLimit.Size = new System.Drawing.Size(332, 25); - this.lblTimeLimit.TabIndex = 3; - this.lblTimeLimit.Text = "Parsing time limit (in whole seconds):"; - // - // cbRunIndividually - // - this.cbRunIndividually.AutoSize = true; - this.cbRunIndividually.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.cbRunIndividually.Location = new System.Drawing.Point(43, 222); - this.cbRunIndividually.Name = "cbRunIndividually"; - this.cbRunIndividually.Size = new System.Drawing.Size(426, 29); - this.cbRunIndividually.TabIndex = 5; - this.cbRunIndividually.Text = "Run PC-PATR on each sentence individually"; - this.cbRunIndividually.UseVisualStyleBackColor = true; - this.cbRunIndividually.CheckedChanged += new System.EventHandler(this.cbRunIndividually_CheckedChanged); - // - // tbMaxAmbiguities - // - this.tbMaxAmbiguities.Location = new System.Drawing.Point(434, 79); - this.tbMaxAmbiguities.Name = "tbMaxAmbiguities"; - this.tbMaxAmbiguities.Size = new System.Drawing.Size(100, 26); - this.tbMaxAmbiguities.TabIndex = 2; - this.tbMaxAmbiguities.WordWrap = false; - this.tbMaxAmbiguities.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.tbMaxAmbiguities_KeyPress); - // - // tbTimeLimit - // - this.tbTimeLimit.Location = new System.Drawing.Point(434, 141); - this.tbTimeLimit.Name = "tbTimeLimit"; - this.tbTimeLimit.Size = new System.Drawing.Size(100, 26); - this.tbTimeLimit.TabIndex = 4; - this.tbTimeLimit.WordWrap = false; - this.tbTimeLimit.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.tbTimeLimit_KeyPress); - // - // AdvancedForm - // - this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(800, 450); - this.Controls.Add(this.tbTimeLimit); - this.Controls.Add(this.tbMaxAmbiguities); - this.Controls.Add(this.cbRunIndividually); - this.Controls.Add(this.lblTimeLimit); - this.Controls.Add(this.lblMaxAmbiguities); - this.Controls.Add(this.btnOK); - this.Controls.Add(this.btnCancel); - this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); - this.Name = "AdvancedForm"; - this.Text = "Advanced"; - this.ResumeLayout(false); - this.PerformLayout(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AdvancedForm)); + this.btnCancel = new System.Windows.Forms.Button(); + this.btnOK = new System.Windows.Forms.Button(); + this.lblMaxAmbiguities = new System.Windows.Forms.Label(); + this.lblTimeLimit = new System.Windows.Forms.Label(); + this.cbRunIndividually = new System.Windows.Forms.CheckBox(); + this.tbMaxAmbiguities = new System.Windows.Forms.TextBox(); + this.tbTimeLimit = new System.Windows.Forms.TextBox(); + this.SuspendLayout(); + // + // btnCancel + // + this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; + resources.ApplyResources(this.btnCancel, "btnCancel"); + this.btnCancel.Name = "btnCancel"; + this.btnCancel.UseVisualStyleBackColor = true; + this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); + // + // btnOK + // + this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK; + resources.ApplyResources(this.btnOK, "btnOK"); + this.btnOK.Name = "btnOK"; + this.btnOK.UseVisualStyleBackColor = true; + this.btnOK.Click += new System.EventHandler(this.btnOK_Click); + // + // lblMaxAmbiguities + // + resources.ApplyResources(this.lblMaxAmbiguities, "lblMaxAmbiguities"); + this.lblMaxAmbiguities.Name = "lblMaxAmbiguities"; + // + // lblTimeLimit + // + resources.ApplyResources(this.lblTimeLimit, "lblTimeLimit"); + this.lblTimeLimit.Name = "lblTimeLimit"; + // + // cbRunIndividually + // + resources.ApplyResources(this.cbRunIndividually, "cbRunIndividually"); + this.cbRunIndividually.Name = "cbRunIndividually"; + this.cbRunIndividually.UseVisualStyleBackColor = true; + this.cbRunIndividually.CheckedChanged += new System.EventHandler(this.cbRunIndividually_CheckedChanged); + // + // tbMaxAmbiguities + // + resources.ApplyResources(this.tbMaxAmbiguities, "tbMaxAmbiguities"); + this.tbMaxAmbiguities.Name = "tbMaxAmbiguities"; + this.tbMaxAmbiguities.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.tbMaxAmbiguities_KeyPress); + // + // tbTimeLimit + // + resources.ApplyResources(this.tbTimeLimit, "tbTimeLimit"); + this.tbTimeLimit.Name = "tbTimeLimit"; + this.tbTimeLimit.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.tbTimeLimit_KeyPress); + // + // AdvancedForm + // + resources.ApplyResources(this, "$this"); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.tbTimeLimit); + this.Controls.Add(this.tbMaxAmbiguities); + this.Controls.Add(this.cbRunIndividually); + this.Controls.Add(this.lblTimeLimit); + this.Controls.Add(this.lblMaxAmbiguities); + this.Controls.Add(this.btnOK); + this.Controls.Add(this.btnCancel); + this.Name = "AdvancedForm"; + this.ResumeLayout(false); + this.PerformLayout(); } diff --git a/Src/Utilities/pcpatrflex/PcPatrFLExDll/AdvancedForm.resx b/Src/Utilities/pcpatrflex/PcPatrFLExDll/AdvancedForm.resx index f5af972470..f2c71d8361 100644 --- a/Src/Utilities/pcpatrflex/PcPatrFLExDll/AdvancedForm.resx +++ b/Src/Utilities/pcpatrflex/PcPatrFLExDll/AdvancedForm.resx @@ -118,6 +118,208 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Microsoft Sans Serif, 10pt + + + 672, 392 + + + 112, 46 + + + + 7 + + + Cancel + + + btnCancel + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 6 + + + Microsoft Sans Serif, 10pt + + + 524, 392 + + + 112, 46 + + + 6 + + + OK + + + btnOK + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 5 + + + True + + + Microsoft Sans Serif, 10pt + + + 40, 78 + + + 378, 25 + + + 1 + + + Maximum number of ambiguities to output: + + + lblMaxAmbiguities + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 4 + + + True + + + Microsoft Sans Serif, 10pt + + + 40, 139 + + + 332, 25 + + + 3 + + + Parsing time limit (in whole seconds): + + + lblTimeLimit + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 3 + + + True + + + Microsoft Sans Serif, 10pt + + + 43, 222 + + + 426, 29 + + + 5 + + + Run PC-PATR on each sentence individually + + + cbRunIndividually + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 2 + + + 434, 79 + + + 100, 26 + + + 2 + + + False + + + tbMaxAmbiguities + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 1 + + + 434, 141 + + + 100, 26 + + + 4 + + + False + + + tbTimeLimit + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 0 + + + True + + + 9, 20 + + + 800, 450 + AAABAAUAEBAAAAEAIABoBAAAVgAAABgYAAABACAAiAkAAL4EAAAgIAAAAQAgAKgQAABGDgAAMDAAAAEA @@ -451,4 +653,13 @@ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA== + + Advanced + + + AdvancedForm + + + System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + \ No newline at end of file diff --git a/Src/Utilities/pcpatrflex/PcPatrFLExDll/FLExUtility.cs b/Src/Utilities/pcpatrflex/PcPatrFLExDll/FLExUtility.cs index 4cc601620c..37630de107 100644 --- a/Src/Utilities/pcpatrflex/PcPatrFLExDll/FLExUtility.cs +++ b/Src/Utilities/pcpatrflex/PcPatrFLExDll/FLExUtility.cs @@ -31,7 +31,7 @@ public override string ToString() /// /// Get the main label describing the utility. /// - public string Label => "Use PC-PATR with FLEx"; + public string Label => PcPatrFLExDll_Strings.ksTitle; UtilityDlg IUtility.Dialog { set => m_dlg = value; } @@ -42,9 +42,9 @@ void IUtility.LoadUtilities() void IUtility.OnSelection() { - m_dlg.WhenDescription = "Run this when you have a PC-PATR grammar and have a reasonable amount of morphological ambiguity in interlinear texts."; - m_dlg.WhatDescription = "Run this to use a PC-PATR grammar to try and disambiguate interlinear texts."; - 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 = PcPatrFLExDll_Strings.ksWhenDescription; + m_dlg.WhatDescription = PcPatrFLExDll_Strings.ksWhatDescription; + m_dlg.RedoDescription = PcPatrFLExDll_Strings.ksRedoDescription; } void IUtility.Process() diff --git a/Src/Utilities/pcpatrflex/PcPatrFLExDll/PcPatrFLExDll.Strings.Designer.cs b/Src/Utilities/pcpatrflex/PcPatrFLExDll/PcPatrFLExDll.Strings.Designer.cs new file mode 100644 index 0000000000..8b0f4feb76 --- /dev/null +++ b/Src/Utilities/pcpatrflex/PcPatrFLExDll/PcPatrFLExDll.Strings.Designer.cs @@ -0,0 +1,226 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace SIL.PcPatrFLEx { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class PcPatrFLExDll_Strings { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal PcPatrFLExDll_Strings() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SIL.PcPatrFLEx.PcPatrFLExDll.Strings", typeof(PcPatrFLExDll_Strings).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to {0} does not have any words in it. + ///Please remove it or add words and try again. + ///. + /// + internal static string ksEmptySegment { + get { + return ResourceManager.GetString("ksEmptySegment", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to PC-PATR Grammar File (*.{0})|*.{0}|All Files (*.*)|*.*. + /// + internal static string ksFileFilterPrompt { + get { + return ResourceManager.GetString("ksFileFilterPrompt", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The following glosses contain a space. + ///Please fix them and try again. + ///. + /// + internal static string ksGlossesWithSpace { + get { + return ResourceManager.GetString("ksGlossesWithSpace", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Grammar Error!. + /// + internal static string ksGrammarError { + get { + return ResourceManager.GetString("ksGrammarError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Sorry, but at least the word '{0}' has an analysis with an invalid parse. Please make sure every word has valid parses and try again.. + /// + internal static string ksInvalidParse { + get { + return ResourceManager.GetString("ksInvalidParse", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The PC-PATR grammar file had an error in it and failed to load. + ///We will show the error log after you click on OK. + ///Please fix all errors in the grammar file and then try again.. + /// + internal static string ksPcPatrGrammarError { + get { + return ResourceManager.GetString("ksPcPatrGrammarError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The PC-PATR processing failed! + ///Perhaps there are incompatible feature values in one of the forms. + ///We will show the error log after you click on OK. + ///You may also want to try and run the PcPatrFLEx.bat file in the %TEMP% directory. + ///This may or may not show which features are incompatible or some other PC-PATR error or warning message.. + /// + internal static string ksPcPatrProcessingFailed { + get { + return ResourceManager.GetString("ksPcPatrProcessingFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to PC-PATR Reference Manual. + /// + internal static string ksPcPatrReference { + get { + return ResourceManager.GetString("ksPcPatrReference", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Processing segment {0}/{1}. + /// + internal static string ksProcessingSegment { + get { + return ResourceManager.GetString("ksProcessingSegment", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The read failed for segment number {0}; {1}. + /// + internal static string ksReadFailed { + get { + return ResourceManager.GetString("ksReadFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 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).. + /// + internal static string ksRedoDescription { + get { + return ResourceManager.GetString("ksRedoDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Segment number . + /// + internal static string ksSegmentNumber { + get { + return ResourceManager.GetString("ksSegmentNumber", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Sorry, but not every sentence has every word parsed. At least the word '{0}' did not parse. Please make sure every word is parsed and try again.. + /// + internal static string ksSomeWordsNotParsed { + get { + return ResourceManager.GetString("ksSomeWordsNotParsed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Use PC-PATR with FLEx. + /// + internal static string ksTitle { + get { + return ResourceManager.GetString("ksTitle", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to User Documentation. + /// + internal static string ksUserDocumentation { + get { + return ResourceManager.GetString("ksUserDocumentation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Run this to use a PC-PATR grammar to try and disambiguate interlinear texts.. + /// + internal static string ksWhatDescription { + get { + return ResourceManager.GetString("ksWhatDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Run this when you have a PC-PATR grammar and have a reasonable amount of morphological ambiguity in interlinear texts.. + /// + internal static string ksWhenDescription { + get { + return ResourceManager.GetString("ksWhenDescription", resourceCulture); + } + } + } +} diff --git a/Src/Utilities/pcpatrflex/PcPatrFLExDll/PcPatrFLExDll.Strings.resx b/Src/Utilities/pcpatrflex/PcPatrFLExDll/PcPatrFLExDll.Strings.resx new file mode 100644 index 0000000000..4e8b7f6fa3 --- /dev/null +++ b/Src/Utilities/pcpatrflex/PcPatrFLExDll/PcPatrFLExDll.Strings.resx @@ -0,0 +1,189 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + {0} does not have any words in it. +Please remove it or add words and try again. + + {0} is the segment number + + + PC-PATR Grammar File (*.{0})|*.{0}|All Files (*.*)|*.* + {0} is hard coded to be "grm" + + + The following glosses contain a space. +Please fix them and try again. + + + + Grammar Error! + + + Sorry, but at least the word '{0}' has an analysis with an invalid parse. Please make sure every word has valid parses and try again. + {0} is the word with an invalid parse + + + The PC-PATR grammar file had an error in it and failed to load. +We will show the error log after you click on OK. +Please fix all errors in the grammar file and then try again. + + + The PC-PATR processing failed! +Perhaps there are incompatible feature values in one of the forms. +We will show the error log after you click on OK. +You may also want to try and run the PcPatrFLEx.bat file in the %TEMP% directory. +This may or may not show which features are incompatible or some other PC-PATR error or warning message. + + + PC-PATR Reference Manual + Is only in English + + + Processing segment {0}/{1} + {0} is the current segment number; {1} is the total number of segments + + + The read failed for segment number {0}; {1} + {0} is the segment number; {1} is the error message + + + 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). + + + Segment number + + + Sorry, but not every sentence has every word parsed. At least the word '{0}' did not parse. Please make sure every word is parsed and try again. + {0} is the word that did not parse + + + Use PC-PATR with FLEx + + + User Documentation + Is only in English + + + Run this to use a PC-PATR grammar to try and disambiguate interlinear texts. + + + Run this when you have a PC-PATR grammar and have a reasonable amount of morphological ambiguity in interlinear texts. + + \ No newline at end of file diff --git a/Src/Utilities/pcpatrflex/PcPatrFLExDll/PcPatrFLExDll.csproj b/Src/Utilities/pcpatrflex/PcPatrFLExDll/PcPatrFLExDll.csproj index 84d34124e8..ebdecd4317 100644 --- a/Src/Utilities/pcpatrflex/PcPatrFLExDll/PcPatrFLExDll.csproj +++ b/Src/Utilities/pcpatrflex/PcPatrFLExDll/PcPatrFLExDll.csproj @@ -49,4 +49,17 @@ Properties\CommonAssemblyInfo.cs + + + True + True + PcPatrFLExDll.Strings.resx + + + + + ResXFileCodeGenerator + PcPatrFLExDll.Strings.Designer.cs + + \ No newline at end of file diff --git a/Src/Utilities/pcpatrflex/PcPatrFLExDll/PcPatrFLExForm.Designer.cs b/Src/Utilities/pcpatrflex/PcPatrFLExDll/PcPatrFLExForm.Designer.cs index 3513a41596..62fe569b0d 100644 --- a/Src/Utilities/pcpatrflex/PcPatrFLExDll/PcPatrFLExForm.Designer.cs +++ b/Src/Utilities/pcpatrflex/PcPatrFLExDll/PcPatrFLExForm.Designer.cs @@ -28,306 +28,222 @@ protected override void Dispose(bool disposing) /// private void InitializeComponent() { - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PcPatrFLExForm)); - this.btnParse = new System.Windows.Forms.Button(); - this.splitContainer1 = new System.Windows.Forms.SplitContainer(); - this.lbTexts = new System.Windows.Forms.ListBox(); - this.ssSegments = new System.Windows.Forms.StatusStrip(); - this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel(); - this.lbStatusSegments = new System.Windows.Forms.ToolStripStatusLabel(); - this.lbSegments = new System.Windows.Forms.ListBox(); - this.lblTexts = new System.Windows.Forms.Label(); - this.lblSegments = new System.Windows.Forms.Label(); - this.label1 = new System.Windows.Forms.Label(); - this.tbGrammarFile = new System.Windows.Forms.TextBox(); - this.btnBrowse = new System.Windows.Forms.Button(); - this.btnDisambiguate = new System.Windows.Forms.Button(); - this.gbRootGloss = new System.Windows.Forms.GroupBox(); - this.rbAll = new System.Windows.Forms.RadioButton(); - this.rbRightmost = new System.Windows.Forms.RadioButton(); - this.rbLeftmost = new System.Windows.Forms.RadioButton(); - this.rbOff = new System.Windows.Forms.RadioButton(); - this.btnRefresh = new System.Windows.Forms.Button(); - this.btnAdvanced = new System.Windows.Forms.Button(); - this.btnHelp = new System.Windows.Forms.Button(); - ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); - this.splitContainer1.Panel1.SuspendLayout(); - this.splitContainer1.Panel2.SuspendLayout(); - this.splitContainer1.SuspendLayout(); - this.ssSegments.SuspendLayout(); - this.gbRootGloss.SuspendLayout(); - this.SuspendLayout(); - // - // btnParse - // - this.btnParse.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.btnParse.Location = new System.Drawing.Point(519, 151); - this.btnParse.Name = "btnParse"; - this.btnParse.Size = new System.Drawing.Size(267, 38); - this.btnParse.TabIndex = 10; - this.btnParse.Text = "&Parse && show this segment"; - this.btnParse.UseVisualStyleBackColor = true; - this.btnParse.Click += new System.EventHandler(this.Parse_Click); - // - // splitContainer1 - // - this.splitContainer1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.splitContainer1.Location = new System.Drawing.Point(3, 208); - this.splitContainer1.Name = "splitContainer1"; - // - // splitContainer1.Panel1 - // - this.splitContainer1.Panel1.Controls.Add(this.lbTexts); - // - // splitContainer1.Panel2 - // - this.splitContainer1.Panel2.Controls.Add(this.ssSegments); - this.splitContainer1.Panel2.Controls.Add(this.lbSegments); - this.splitContainer1.Size = new System.Drawing.Size(796, 789); - this.splitContainer1.SplitterDistance = 355; - this.splitContainer1.TabIndex = 4; - this.splitContainer1.SplitterMoved += new System.Windows.Forms.SplitterEventHandler(this.splitContainer1_SplitterMoved); - // - // lbTexts - // - this.lbTexts.Dock = System.Windows.Forms.DockStyle.Fill; - this.lbTexts.FormattingEnabled = true; - this.lbTexts.ItemHeight = 20; - this.lbTexts.Location = new System.Drawing.Point(0, 0); - this.lbTexts.Name = "lbTexts"; - this.lbTexts.Size = new System.Drawing.Size(355, 789); - this.lbTexts.TabIndex = 0; - this.lbTexts.SelectedIndexChanged += new System.EventHandler(this.Texts_SelectedIndexChanged); - // - // ssSegments - // - this.ssSegments.BackColor = System.Drawing.SystemColors.Control; - this.ssSegments.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; - this.ssSegments.ImageScalingSize = new System.Drawing.Size(24, 24); - this.ssSegments.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PcPatrFLExForm)); + this.btnParse = new System.Windows.Forms.Button(); + this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + this.lbTexts = new System.Windows.Forms.ListBox(); + this.ssSegments = new System.Windows.Forms.StatusStrip(); + this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel(); + this.lbStatusSegments = new System.Windows.Forms.ToolStripStatusLabel(); + this.lbSegments = new System.Windows.Forms.ListBox(); + this.lblTexts = new System.Windows.Forms.Label(); + this.lblSegments = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); + this.tbGrammarFile = new System.Windows.Forms.TextBox(); + this.btnBrowse = new System.Windows.Forms.Button(); + this.btnDisambiguate = new System.Windows.Forms.Button(); + this.gbRootGloss = new System.Windows.Forms.GroupBox(); + this.rbAll = new System.Windows.Forms.RadioButton(); + this.rbRightmost = new System.Windows.Forms.RadioButton(); + this.rbLeftmost = new System.Windows.Forms.RadioButton(); + this.rbOff = new System.Windows.Forms.RadioButton(); + this.btnRefresh = new System.Windows.Forms.Button(); + this.btnAdvanced = new System.Windows.Forms.Button(); + this.btnHelp = new System.Windows.Forms.Button(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); + this.splitContainer1.Panel1.SuspendLayout(); + this.splitContainer1.Panel2.SuspendLayout(); + this.splitContainer1.SuspendLayout(); + this.ssSegments.SuspendLayout(); + this.gbRootGloss.SuspendLayout(); + this.SuspendLayout(); + // + // btnParse + // + resources.ApplyResources(this.btnParse, "btnParse"); + this.btnParse.Name = "btnParse"; + this.btnParse.UseVisualStyleBackColor = true; + this.btnParse.Click += new System.EventHandler(this.Parse_Click); + // + // splitContainer1 + // + resources.ApplyResources(this.splitContainer1, "splitContainer1"); + this.splitContainer1.Name = "splitContainer1"; + // + // splitContainer1.Panel1 + // + this.splitContainer1.Panel1.Controls.Add(this.lbTexts); + // + // splitContainer1.Panel2 + // + this.splitContainer1.Panel2.Controls.Add(this.ssSegments); + this.splitContainer1.Panel2.Controls.Add(this.lbSegments); + this.splitContainer1.SplitterMoved += new System.Windows.Forms.SplitterEventHandler(this.splitContainer1_SplitterMoved); + // + // lbTexts + // + resources.ApplyResources(this.lbTexts, "lbTexts"); + this.lbTexts.FormattingEnabled = true; + this.lbTexts.Name = "lbTexts"; + this.lbTexts.SelectedIndexChanged += new System.EventHandler(this.Texts_SelectedIndexChanged); + // + // ssSegments + // + this.ssSegments.BackColor = System.Drawing.SystemColors.Control; + resources.ApplyResources(this.ssSegments, "ssSegments"); + this.ssSegments.ImageScalingSize = new System.Drawing.Size(24, 24); + this.ssSegments.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.toolStripStatusLabel1, this.lbStatusSegments}); - this.ssSegments.Location = new System.Drawing.Point(0, 759); - this.ssSegments.Name = "ssSegments"; - this.ssSegments.Padding = new System.Windows.Forms.Padding(2, 0, 21, 0); - this.ssSegments.Size = new System.Drawing.Size(437, 30); - this.ssSegments.TabIndex = 1; - this.ssSegments.Text = "SegmentsStatusBar"; - // - // toolStripStatusLabel1 - // - this.toolStripStatusLabel1.Name = "toolStripStatusLabel1"; - this.toolStripStatusLabel1.Size = new System.Drawing.Size(235, 25); - this.toolStripStatusLabel1.Spring = true; - // - // lbStatusSegments - // - this.lbStatusSegments.BackColor = System.Drawing.SystemColors.Control; - this.lbStatusSegments.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; - this.lbStatusSegments.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; - this.lbStatusSegments.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; - this.lbStatusSegments.Name = "lbStatusSegments"; - this.lbStatusSegments.RightToLeft = System.Windows.Forms.RightToLeft.No; - this.lbStatusSegments.Size = new System.Drawing.Size(179, 25); - this.lbStatusSegments.Text = "toolStripStatusLabel1"; - this.lbStatusSegments.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // lbSegments - // - this.lbSegments.Dock = System.Windows.Forms.DockStyle.Fill; - this.lbSegments.FormattingEnabled = true; - this.lbSegments.ItemHeight = 20; - this.lbSegments.Location = new System.Drawing.Point(0, 0); - this.lbSegments.Name = "lbSegments"; - this.lbSegments.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended; - this.lbSegments.Size = new System.Drawing.Size(437, 789); - this.lbSegments.TabIndex = 0; - this.lbSegments.SelectedIndexChanged += new System.EventHandler(this.Segments_SelectedIndexChanged); - this.lbSegments.DoubleClick += new System.EventHandler(this.lbSegments_DoubleClick); - // - // lblTexts - // - this.lblTexts.AutoSize = true; - this.lblTexts.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblTexts.Location = new System.Drawing.Point(9, 162); - this.lblTexts.Name = "lblTexts"; - this.lblTexts.Size = new System.Drawing.Size(61, 25); - this.lblTexts.TabIndex = 7; - this.lblTexts.Text = "Texts"; - this.lblTexts.Click += new System.EventHandler(this.lblTexts_Click); - // - // lblSegments - // - this.lblSegments.AutoSize = true; - this.lblSegments.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblSegments.Location = new System.Drawing.Point(368, 162); - this.lblSegments.Name = "lblSegments"; - this.lblSegments.Size = new System.Drawing.Size(101, 25); - this.lblSegments.TabIndex = 9; - this.lblSegments.Text = "Segments"; - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(14, 32); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(180, 20); - this.label1.TabIndex = 0; - this.label1.Text = "PC-PATR Grammar file: "; - // - // tbGrammarFile - // - this.tbGrammarFile.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.tbGrammarFile.Location = new System.Drawing.Point(216, 28); - this.tbGrammarFile.Name = "tbGrammarFile"; - this.tbGrammarFile.Size = new System.Drawing.Size(884, 26); - this.tbGrammarFile.TabIndex = 1; - // - // btnBrowse - // - this.btnBrowse.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.btnBrowse.Location = new System.Drawing.Point(1128, 17); - this.btnBrowse.Name = "btnBrowse"; - this.btnBrowse.Size = new System.Drawing.Size(94, 38); - this.btnBrowse.TabIndex = 2; - this.btnBrowse.Text = "&Browse"; - this.btnBrowse.UseVisualStyleBackColor = true; - this.btnBrowse.Click += new System.EventHandler(this.Browse_Click); - // - // btnDisambiguate - // - this.btnDisambiguate.Location = new System.Drawing.Point(76, 151); - this.btnDisambiguate.Name = "btnDisambiguate"; - this.btnDisambiguate.Size = new System.Drawing.Size(282, 38); - this.btnDisambiguate.TabIndex = 8; - this.btnDisambiguate.Text = "&Disambiguate && show this text"; - this.btnDisambiguate.UseVisualStyleBackColor = true; - this.btnDisambiguate.Click += new System.EventHandler(this.Disambiguate_Click); - // - // gbRootGloss - // - this.gbRootGloss.Controls.Add(this.rbAll); - this.gbRootGloss.Controls.Add(this.rbRightmost); - this.gbRootGloss.Controls.Add(this.rbLeftmost); - this.gbRootGloss.Controls.Add(this.rbOff); - this.gbRootGloss.Location = new System.Drawing.Point(218, 77); - this.gbRootGloss.Name = "gbRootGloss"; - this.gbRootGloss.Size = new System.Drawing.Size(574, 42); - this.gbRootGloss.TabIndex = 11; - this.gbRootGloss.TabStop = false; - this.gbRootGloss.Text = "rootgloss:"; - // - // rbAll - // - this.rbAll.AutoSize = true; - this.rbAll.Location = new System.Drawing.Point(453, 11); - this.rbAll.Name = "rbAll"; - this.rbAll.Size = new System.Drawing.Size(89, 24); - this.rbAll.TabIndex = 3; - this.rbAll.Text = "all roots"; - this.rbAll.UseVisualStyleBackColor = true; - this.rbAll.CheckedChanged += new System.EventHandler(this.rbAll_CheckedChanged); - // - // rbRightmost - // - this.rbRightmost.AutoSize = true; - this.rbRightmost.Location = new System.Drawing.Point(310, 12); - this.rbRightmost.Name = "rbRightmost"; - this.rbRightmost.Size = new System.Drawing.Size(132, 24); - this.rbRightmost.TabIndex = 2; - this.rbRightmost.Text = "rightmost root"; - this.rbRightmost.UseVisualStyleBackColor = true; - this.rbRightmost.CheckedChanged += new System.EventHandler(this.rbRightmost_CheckedChanged); - // - // rbLeftmost - // - this.rbLeftmost.AutoSize = true; - this.rbLeftmost.Location = new System.Drawing.Point(172, 12); - this.rbLeftmost.Name = "rbLeftmost"; - this.rbLeftmost.Size = new System.Drawing.Size(123, 24); - this.rbLeftmost.TabIndex = 1; - this.rbLeftmost.Text = "leftmost root"; - this.rbLeftmost.UseVisualStyleBackColor = true; - this.rbLeftmost.CheckedChanged += new System.EventHandler(this.rbLeftmost_CheckedChanged); - // - // rbOff - // - this.rbOff.AutoSize = true; - this.rbOff.Checked = true; - this.rbOff.Location = new System.Drawing.Point(98, 12); - this.rbOff.Name = "rbOff"; - this.rbOff.Size = new System.Drawing.Size(53, 24); - this.rbOff.TabIndex = 0; - this.rbOff.TabStop = true; - this.rbOff.Text = "off"; - this.rbOff.UseVisualStyleBackColor = true; - this.rbOff.CheckedChanged += new System.EventHandler(this.rbOff_CheckedChanged); - // - // btnRefresh - // - this.btnRefresh.Location = new System.Drawing.Point(18, 77); - this.btnRefresh.Name = "btnRefresh"; - this.btnRefresh.Size = new System.Drawing.Size(137, 42); - this.btnRefresh.TabIndex = 12; - this.btnRefresh.Text = "&Refresh texts"; - this.btnRefresh.UseVisualStyleBackColor = true; - this.btnRefresh.Click += new System.EventHandler(this.btnRefresh_Click); - // - // btnAdvanced - // - this.btnAdvanced.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.btnAdvanced.Location = new System.Drawing.Point(1112, 60); - this.btnAdvanced.Name = "btnAdvanced"; - this.btnAdvanced.Size = new System.Drawing.Size(110, 40); - this.btnAdvanced.TabIndex = 13; - this.btnAdvanced.Text = "Advanced"; - this.btnAdvanced.UseVisualStyleBackColor = true; - this.btnAdvanced.Click += new System.EventHandler(this.btnAdvanced_Click); - // - // btnHelp - // - this.btnHelp.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.btnHelp.Location = new System.Drawing.Point(1146, 106); - this.btnHelp.Name = "btnHelp"; - this.btnHelp.Size = new System.Drawing.Size(76, 40); - this.btnHelp.TabIndex = 14; - this.btnHelp.Text = "Help..."; - this.btnHelp.UseVisualStyleBackColor = true; - this.btnHelp.Click += new System.EventHandler(this.btnHelp_Click); - // - // PcPatrFLExForm - // - this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(1228, 995); - this.Controls.Add(this.btnHelp); - this.Controls.Add(this.btnAdvanced); - this.Controls.Add(this.btnRefresh); - this.Controls.Add(this.gbRootGloss); - this.Controls.Add(this.btnDisambiguate); - this.Controls.Add(this.btnBrowse); - this.Controls.Add(this.tbGrammarFile); - this.Controls.Add(this.label1); - this.Controls.Add(this.lblSegments); - this.Controls.Add(this.lblTexts); - this.Controls.Add(this.splitContainer1); - this.Controls.Add(this.btnParse); - this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); - this.Name = "PcPatrFLExForm"; - this.Text = "Use PC-PATR with FLEx"; - this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.OnFormClosing); - this.splitContainer1.Panel1.ResumeLayout(false); - this.splitContainer1.Panel2.ResumeLayout(false); - this.splitContainer1.Panel2.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); - this.splitContainer1.ResumeLayout(false); - this.ssSegments.ResumeLayout(false); - this.ssSegments.PerformLayout(); - this.gbRootGloss.ResumeLayout(false); - this.gbRootGloss.PerformLayout(); - this.ResumeLayout(false); - this.PerformLayout(); + this.ssSegments.Name = "ssSegments"; + // + // toolStripStatusLabel1 + // + this.toolStripStatusLabel1.Name = "toolStripStatusLabel1"; + resources.ApplyResources(this.toolStripStatusLabel1, "toolStripStatusLabel1"); + this.toolStripStatusLabel1.Spring = true; + // + // lbStatusSegments + // + this.lbStatusSegments.BackColor = System.Drawing.SystemColors.Control; + resources.ApplyResources(this.lbStatusSegments, "lbStatusSegments"); + this.lbStatusSegments.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.lbStatusSegments.Name = "lbStatusSegments"; + // + // lbSegments + // + resources.ApplyResources(this.lbSegments, "lbSegments"); + this.lbSegments.FormattingEnabled = true; + this.lbSegments.Name = "lbSegments"; + this.lbSegments.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended; + this.lbSegments.SelectedIndexChanged += new System.EventHandler(this.Segments_SelectedIndexChanged); + this.lbSegments.DoubleClick += new System.EventHandler(this.lbSegments_DoubleClick); + // + // lblTexts + // + resources.ApplyResources(this.lblTexts, "lblTexts"); + this.lblTexts.Name = "lblTexts"; + this.lblTexts.Click += new System.EventHandler(this.lblTexts_Click); + // + // lblSegments + // + resources.ApplyResources(this.lblSegments, "lblSegments"); + this.lblSegments.Name = "lblSegments"; + // + // label1 + // + resources.ApplyResources(this.label1, "label1"); + this.label1.Name = "label1"; + // + // tbGrammarFile + // + resources.ApplyResources(this.tbGrammarFile, "tbGrammarFile"); + this.tbGrammarFile.Name = "tbGrammarFile"; + // + // btnBrowse + // + resources.ApplyResources(this.btnBrowse, "btnBrowse"); + this.btnBrowse.Name = "btnBrowse"; + this.btnBrowse.UseVisualStyleBackColor = true; + this.btnBrowse.Click += new System.EventHandler(this.Browse_Click); + // + // btnDisambiguate + // + resources.ApplyResources(this.btnDisambiguate, "btnDisambiguate"); + this.btnDisambiguate.Name = "btnDisambiguate"; + this.btnDisambiguate.UseVisualStyleBackColor = true; + this.btnDisambiguate.Click += new System.EventHandler(this.Disambiguate_Click); + // + // gbRootGloss + // + this.gbRootGloss.Controls.Add(this.rbAll); + this.gbRootGloss.Controls.Add(this.rbRightmost); + this.gbRootGloss.Controls.Add(this.rbLeftmost); + this.gbRootGloss.Controls.Add(this.rbOff); + resources.ApplyResources(this.gbRootGloss, "gbRootGloss"); + this.gbRootGloss.Name = "gbRootGloss"; + this.gbRootGloss.TabStop = false; + // + // rbAll + // + resources.ApplyResources(this.rbAll, "rbAll"); + this.rbAll.Name = "rbAll"; + this.rbAll.UseVisualStyleBackColor = true; + this.rbAll.CheckedChanged += new System.EventHandler(this.rbAll_CheckedChanged); + // + // rbRightmost + // + resources.ApplyResources(this.rbRightmost, "rbRightmost"); + this.rbRightmost.Name = "rbRightmost"; + this.rbRightmost.UseVisualStyleBackColor = true; + this.rbRightmost.CheckedChanged += new System.EventHandler(this.rbRightmost_CheckedChanged); + // + // rbLeftmost + // + resources.ApplyResources(this.rbLeftmost, "rbLeftmost"); + this.rbLeftmost.Name = "rbLeftmost"; + this.rbLeftmost.UseVisualStyleBackColor = true; + this.rbLeftmost.CheckedChanged += new System.EventHandler(this.rbLeftmost_CheckedChanged); + // + // rbOff + // + resources.ApplyResources(this.rbOff, "rbOff"); + this.rbOff.Checked = true; + this.rbOff.Name = "rbOff"; + this.rbOff.TabStop = true; + this.rbOff.UseVisualStyleBackColor = true; + this.rbOff.CheckedChanged += new System.EventHandler(this.rbOff_CheckedChanged); + // + // btnRefresh + // + resources.ApplyResources(this.btnRefresh, "btnRefresh"); + this.btnRefresh.Name = "btnRefresh"; + this.btnRefresh.UseVisualStyleBackColor = true; + this.btnRefresh.Click += new System.EventHandler(this.btnRefresh_Click); + // + // btnAdvanced + // + resources.ApplyResources(this.btnAdvanced, "btnAdvanced"); + this.btnAdvanced.Name = "btnAdvanced"; + this.btnAdvanced.UseVisualStyleBackColor = true; + this.btnAdvanced.Click += new System.EventHandler(this.btnAdvanced_Click); + // + // btnHelp + // + resources.ApplyResources(this.btnHelp, "btnHelp"); + this.btnHelp.Name = "btnHelp"; + this.btnHelp.UseVisualStyleBackColor = true; + this.btnHelp.Click += new System.EventHandler(this.btnHelp_Click); + // + // PcPatrFLExForm + // + resources.ApplyResources(this, "$this"); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.btnHelp); + this.Controls.Add(this.btnAdvanced); + this.Controls.Add(this.btnRefresh); + this.Controls.Add(this.gbRootGloss); + this.Controls.Add(this.btnDisambiguate); + this.Controls.Add(this.btnBrowse); + this.Controls.Add(this.tbGrammarFile); + this.Controls.Add(this.label1); + this.Controls.Add(this.lblSegments); + this.Controls.Add(this.lblTexts); + this.Controls.Add(this.splitContainer1); + this.Controls.Add(this.btnParse); + this.Name = "PcPatrFLExForm"; + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.OnFormClosing); + this.splitContainer1.Panel1.ResumeLayout(false); + this.splitContainer1.Panel2.ResumeLayout(false); + this.splitContainer1.Panel2.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); + this.splitContainer1.ResumeLayout(false); + this.ssSegments.ResumeLayout(false); + this.ssSegments.PerformLayout(); + this.gbRootGloss.ResumeLayout(false); + this.gbRootGloss.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); } diff --git a/Src/Utilities/pcpatrflex/PcPatrFLExDll/PcPatrFLExForm.cs b/Src/Utilities/pcpatrflex/PcPatrFLExDll/PcPatrFLExForm.cs index 3f2b08fc64..14d73d28ec 100644 --- a/Src/Utilities/pcpatrflex/PcPatrFLExDll/PcPatrFLExForm.cs +++ b/Src/Utilities/pcpatrflex/PcPatrFLExDll/PcPatrFLExForm.cs @@ -73,8 +73,8 @@ public partial class PcPatrFLExForm : Form private RegistryKey regkey; private ContextMenuStrip helpContextMenu; - const string UserDocumentation = "User Documentation"; - const string PCPATRReferenceManual = "PC-PATR Reference Manual"; + string UserDocumentation = PcPatrFLExDll_Strings.ksUserDocumentation; + string PCPATRReferenceManual = PcPatrFLExDll_Strings.ksPcPatrReference; string helpsPath = ""; public PcPatrFLExForm() @@ -421,7 +421,7 @@ private void ReportAnyBadGlossesFound() if (Extractor.BadGlosses.Count > 0) { StringBuilder sb = new StringBuilder(); - sb.Append("The following glosses contain a space.\nPlease fix them and try again.\n"); + sb.Append(PcPatrFLExDll_Strings.ksGlossesWithSpace); foreach (var gloss in Extractor.BadGlosses) { sb.Append("\t"); @@ -438,7 +438,7 @@ private void ReportAnyEmptySegments(string ana, ISegment segment) if (!ana.Contains("\\a")) { StringBuilder sb = new StringBuilder(); - sb.Append("Segment number "); + sb.Append(PcPatrFLExDll_Strings.ksSegmentNumber); int segmentNumber = 0; foreach (var seg in lbSegments.Items) { @@ -449,8 +449,7 @@ private void ReportAnyEmptySegments(string ana, ISegment segment) break; } } - sb.Append(segmentNumber); - sb.Append(" does not have any words in it.\nPlease remove it or add words and try again.\n"); + sb.Append(string.Format(PcPatrFLExDll_Strings.ksEmptySegment, segmentNumber)); MessageBox.Show(sb.ToString()); BadGlossesFound = true; } @@ -507,8 +506,7 @@ private void Browse_Click(object sender, EventArgs e) { using (OpenFileDialog dlg = new OpenFileDialog()) { - dlg.Filter = "PC-PATR Grammar File (*.grm)|*.grm|" + - "All Files (*.*)|*.*"; + dlg.Filter = string.Format(PcPatrFLExDll_Strings.ksFileFilterPrompt, "grm"); if (dlg.ShowDialog() == DialogResult.OK) { GrammarFile = dlg.FileName; @@ -577,7 +575,7 @@ private Boolean AllWordsAreParsed(string ana) string sW = sA.Substring(iW); int iWEnd = sW.IndexOf("\n"); string word = sW.Substring(3, iWEnd - 3); - MessageBox.Show("Sorry, but not every sentence has every word parsed. At least the word '" + word + "' did not parse. Please make sure every word is parsed and try again."); + MessageBox.Show(string.Format(PcPatrFLExDll_Strings.ksSomeWordsNotParsed, word)); return false; } if (ana.Contains(Extractor.MissingItemMessage)) @@ -588,7 +586,7 @@ private Boolean AllWordsAreParsed(string ana) string sW = sA.Substring(iW); int iWEnd = sW.IndexOf("\n"); string word = sW.Substring(3, iWEnd - 3); - MessageBox.Show("Sorry, but at least the word '" + word + "' has an analysis with an invalid parse. Please make sure every word has valid parses and try again."); + MessageBox.Show(string.Format(PcPatrFLExDll_Strings.ksInvalidParse, word)); return false; } return true; @@ -621,14 +619,14 @@ private static void ReportFailure(string andResult) string message; if (File.Exists(andResult)) { - message = "The PC-PATR processing failed!\nPerhaps there are incompatible feature values in one of the forms.\nWe will show the error log after you click on OK.\nYou may also want to try and run the PcPatrFLEx.bat file in the %TEMP% directory.\nThis may or may not show which features are incompatible or some other PC-PATR error or warning message."; + message = PcPatrFLExDll_Strings.ksPcPatrProcessingFailed; } else { - message = "The PC-PATR grammar file had an error in it and failed to load.\nWe will show the error log after you click on OK.\nPlease fix all errors in the grammar file and then try again."; + message = PcPatrFLExDll_Strings.ksPcPatrGrammarError; } MessageBox.Show(message + "", - "Grammar Error!", MessageBoxButtons.OK, MessageBoxIcon.Error); + PcPatrFLExDll_Strings.ksGrammarError, MessageBoxButtons.OK, MessageBoxIcon.Error); Process.Start(andResult.Replace(".and", ".log")); return; } @@ -650,7 +648,7 @@ private bool ProcessIndividuallyAndShowResults(IText selectedTextToShow, out str foreach (var segment in paraUse.SegmentsOS) { // update status bar - lbStatusSegments.Text = "Processing segment " + i++ + "/" + lbSegments.Items.Count; + lbStatusSegments.Text = string.Format(PcPatrFLExDll_Strings.ksProcessingSegment, i++, lbSegments.Items.Count); sb.Clear(); ProcessSegmentToAnaForm(sb, segment); if (BadGlossesFound) @@ -681,7 +679,7 @@ private bool ProcessIndividuallyAndShowResults(IText selectedTextToShow, out str } catch (IOException e) { - MessageBox.Show("The read failed for segment number " + (i - 1) + "; " + e.Message); + MessageBox.Show(string.Format(PcPatrFLExDll_Strings.ksReadFailed, (i - 1), e.Message)); } } else diff --git a/Src/Utilities/pcpatrflex/PcPatrFLExDll/PcPatrFLExForm.resx b/Src/Utilities/pcpatrflex/PcPatrFLExDll/PcPatrFLExForm.resx index dcc0e4bad5..82eb00f35f 100644 --- a/Src/Utilities/pcpatrflex/PcPatrFLExDll/PcPatrFLExForm.resx +++ b/Src/Utilities/pcpatrflex/PcPatrFLExDll/PcPatrFLExForm.resx @@ -117,10 +117,576 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Top, Right + + + + 519, 151 + + + 267, 38 + + + + 10 + + + &Parse && show this segment + + + btnParse + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 11 + + + Bottom, Left + + + 3, 208 + + + Fill + + + 20 + + + 0, 0 + + + 355, 789 + + + 0 + + + lbTexts + + + System.Windows.Forms.ListBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + splitContainer1.Panel1 + + + 0 + + + splitContainer1.Panel1 + + + System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + splitContainer1 + + + 0 + 17, 17 - + + None + + + 235, 25 + + + None + + + MiddleRight + + + No + + + 179, 25 + + + toolStripStatusLabel1 + + + MiddleRight + + + 0, 757 + + + 2, 0, 21, 0 + + + 437, 32 + + + 1 + + + SegmentsStatusBar + + + ssSegments + + + System.Windows.Forms.StatusStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + splitContainer1.Panel2 + + + 0 + + + Fill + + + 20 + + + 0, 0 + + + 437, 789 + + + 0 + + + lbSegments + + + System.Windows.Forms.ListBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + splitContainer1.Panel2 + + + 1 + + + splitContainer1.Panel2 + + + System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + splitContainer1 + + + 1 + + + 796, 789 + + + 355 + + + 4 + + + splitContainer1 + + + System.Windows.Forms.SplitContainer, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 10 + + + True + + + Microsoft Sans Serif, 10pt + + + 9, 162 + + + 61, 25 + + + 7 + + + Texts + + + lblTexts + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 9 + + + True + + + Microsoft Sans Serif, 10pt + + + 368, 162 + + + 101, 25 + + + 9 + + + Segments + + + lblSegments + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 8 + + + True + + + 14, 32 + + + 180, 20 + + + 0 + + + PC-PATR Grammar file: + + + label1 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 7 + + + Top, Left, Right + + + 216, 28 + + + 884, 26 + + + 1 + + + tbGrammarFile + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 6 + + + Top, Right + + + 1128, 17 + + + 94, 38 + + + 2 + + + &Browse + + + btnBrowse + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 5 + + + 76, 151 + + + 282, 38 + + + 8 + + + &Disambiguate && show this text + + + btnDisambiguate + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 4 + + + True + + + 453, 11 + + + 89, 24 + + + 3 + + + all roots + + + rbAll + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gbRootGloss + + + 0 + + + True + + + 310, 12 + + + 132, 24 + + + 2 + + + rightmost root + + + rbRightmost + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gbRootGloss + + + 1 + + + True + + + 172, 12 + + + 123, 24 + + + 1 + + + leftmost root + + + rbLeftmost + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gbRootGloss + + + 2 + + + True + + + 98, 12 + + + 53, 24 + + + 0 + + + off + + + rbOff + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gbRootGloss + + + 3 + + + 218, 77 + + + 574, 42 + + + 11 + + + rootgloss: + + + gbRootGloss + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 3 + + + 18, 77 + + + 137, 42 + + + 12 + + + &Refresh texts + + + btnRefresh + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 2 + + + Top, Right + + + 1112, 60 + + + 110, 40 + + + 13 + + + Advanced + + + btnAdvanced + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 1 + + + Top, Right + + + 1146, 106 + + + 76, 40 + + + 14 + + + Help... + + + btnHelp + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 0 + + + True + + + 9, 20 + + + 1228, 995 + AAABAAUAEBAAAAEAIABoBAAAVgAAABgYAAABACAAiAkAAL4EAAAgIAAAAQAgAKgQAABGDgAAMDAAAAEA @@ -454,4 +1020,25 @@ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA== + + Use PC-PATR with FLEx + + + toolStripStatusLabel1 + + + System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + lbStatusSegments + + + System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + PcPatrFLExForm + + + System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + \ No newline at end of file diff --git a/Src/Utilities/pcpatrflex/PrepFLExDBDll/PrepFLExDBDll.Strings.Designer.cs b/Src/Utilities/pcpatrflex/PrepFLExDBDll/PrepFLExDBDll.Strings.Designer.cs new file mode 100644 index 0000000000..e6f442abc7 --- /dev/null +++ b/Src/Utilities/pcpatrflex/PrepFLExDBDll/PrepFLExDBDll.Strings.Designer.cs @@ -0,0 +1,81 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace SIL.PrepFLExDB { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class PrepFLExDBDll_Strings { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal PrepFLExDBDll_Strings() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SIL.PrepFLExDB.PrepFLExDBDll.Strings", typeof(PrepFLExDBDll_Strings).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to Need to create the master list of possibilities first.. + /// + internal static string ksCreateMasterListFirst { + get { + return ResourceManager.GetString("ksCreateMasterListFirst", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Wrong Order. + /// + internal static string ksWrongOrder { + get { + return ResourceManager.GetString("ksWrongOrder", resourceCulture); + } + } + } +} diff --git a/Src/Utilities/pcpatrflex/PrepFLExDBDll/PrepFLExDBDll.Strings.resx b/Src/Utilities/pcpatrflex/PrepFLExDBDll/PrepFLExDBDll.Strings.resx new file mode 100644 index 0000000000..b16f3415c9 --- /dev/null +++ b/Src/Utilities/pcpatrflex/PrepFLExDBDll/PrepFLExDBDll.Strings.resx @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Need to create the master list of possibilities first. + + + Wrong Order + + \ No newline at end of file diff --git a/Src/Utilities/pcpatrflex/PrepFLExDBDll/PrepFLExDBDll.csproj b/Src/Utilities/pcpatrflex/PrepFLExDBDll/PrepFLExDBDll.csproj index fe8be93f76..1e7ec85cf7 100644 --- a/Src/Utilities/pcpatrflex/PrepFLExDBDll/PrepFLExDBDll.csproj +++ b/Src/Utilities/pcpatrflex/PrepFLExDBDll/PrepFLExDBDll.csproj @@ -45,4 +45,17 @@ Properties\CommonAssemblyInfo.cs + + + True + True + PrepFLExDBDll.Strings.resx + + + + + ResXFileCodeGenerator + PrepFLExDBDll.Strings.Designer.cs + + \ No newline at end of file diff --git a/Src/Utilities/pcpatrflex/PrepFLExDBDll/Preparer.cs b/Src/Utilities/pcpatrflex/PrepFLExDBDll/Preparer.cs index 9fc1ff58c6..72251b654c 100644 --- a/Src/Utilities/pcpatrflex/PrepFLExDBDll/Preparer.cs +++ b/Src/Utilities/pcpatrflex/PrepFLExDBDll/Preparer.cs @@ -79,11 +79,7 @@ public void AddPCPATRSenseCustomField() var pcpatrList = possListRepository.AllInstances().FirstOrDefault(list => list.Name.BestAnalysisAlternative.Text == PcPatrConstants.PcPatrFeatureDescriptorList); if (pcpatrList == null) { - // need the master possibility list and it does not exist - if (ShowMessages) - { - MessageBox.Show("Need to create the master list of possibilities first.", "Wrong Order", MessageBoxButtons.OK, MessageBoxIcon.Warning); - } + ShowWarningMessage(); return; } NonUndoableUnitOfWorkHelper.Do(Cache.ActionHandlerAccessor, () => @@ -107,6 +103,17 @@ public void AddPCPATRSenseCustomField() }); } + private void ShowWarningMessage() + { + // need the master possibility list and it does not exist + if (ShowMessages) + { + MessageBox.Show(PrepFLExDBDll_Strings.ksCreateMasterListFirst, + PrepFLExDBDll_Strings.ksWrongOrder, + MessageBoxButtons.OK, MessageBoxIcon.Warning); + } + } + public List GetListOfCustomFields() { return (from fd in FieldDescription.FieldDescriptors(Cache) @@ -161,11 +168,7 @@ public void AddToneParsSenseCustomField() var toneParsList = possListRepository.AllInstances().FirstOrDefault(list => list.Name.BestAnalysisAlternative.Text == ToneParsConstants.ToneParsPropertiesList); if (toneParsList == null) { - // need the master possibility list and it does not exist - if (ShowMessages) - { - MessageBox.Show("Need to create the master list of possibilities first.", "Wrong Order", MessageBoxButtons.OK, MessageBoxIcon.Warning); - } + ShowWarningMessage(); return; } NonUndoableUnitOfWorkHelper.Do(Cache.ActionHandlerAccessor, () => @@ -204,11 +207,7 @@ public void AddToneParsFormCustomField() var toneParsList = possListRepository.AllInstances().FirstOrDefault(list => list.Name.BestAnalysisAlternative.Text == ToneParsConstants.ToneParsPropertiesList); if (toneParsList == null) { - // need the master possibility list and it does not exist - if (ShowMessages) - { - MessageBox.Show("Need to create the master list of possibilities first.", "Wrong Order", MessageBoxButtons.OK, MessageBoxIcon.Warning); - } + ShowWarningMessage(); return; } NonUndoableUnitOfWorkHelper.Do(Cache.ActionHandlerAccessor, () => diff --git a/Src/Utilities/pcpatrflex/ToneParsFLExDll/FLExUtility.cs b/Src/Utilities/pcpatrflex/ToneParsFLExDll/FLExUtility.cs index e34998f467..95e2b51122 100644 --- a/Src/Utilities/pcpatrflex/ToneParsFLExDll/FLExUtility.cs +++ b/Src/Utilities/pcpatrflex/ToneParsFLExDll/FLExUtility.cs @@ -30,7 +30,7 @@ public override string ToString() /// /// Get the main label describing the utility. /// - public string Label => "Use TonePars with FLEx"; + public string Label => ToneParsFLExDll_Strings.ksTitle; UtilityDlg IUtility.Dialog { @@ -44,11 +44,9 @@ void IUtility.LoadUtilities() void IUtility.OnSelection() { - m_dlg.WhenDescription = "Run this when you have a TonePars implementation."; - m_dlg.WhatDescription = - "Run this to use a TonePars rule file to try and use autosegmental tone to disambiguate interlinear texts."; - 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 = ToneParsFLExDll_Strings.ksWhenDescription; + m_dlg.WhatDescription = ToneParsFLExDll_Strings.ksWhatDescription; + m_dlg.RedoDescription = ToneParsFLExDll_Strings.ksRedoDescription; } void IUtility.Process() diff --git a/Src/Utilities/pcpatrflex/ToneParsFLExDll/ToneParsFLExDll.Strings.Designer.cs b/Src/Utilities/pcpatrflex/ToneParsFLExDll/ToneParsFLExDll.Strings.Designer.cs new file mode 100644 index 0000000000..26d1f37f54 --- /dev/null +++ b/Src/Utilities/pcpatrflex/ToneParsFLExDll/ToneParsFLExDll.Strings.Designer.cs @@ -0,0 +1,190 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace SIL.ToneParsFLEx { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class ToneParsFLExDll_Strings { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal ToneParsFLExDll_Strings() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SIL.ToneParsFLEx.ToneParsFLExDll.Strings", typeof(ToneParsFLExDll_Strings).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to Parsing failed to produce a file ({0}).. + /// + internal static string ksParsingFailedToProduceFile { + get { + return ResourceManager.GetString("ksParsingFailedToProduceFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Parsing failed to finish writing to a file ({0}).. + /// + internal static string ksParsingFailedWritingToFile { + get { + return ResourceManager.GetString("ksParsingFailedWritingToFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Parsing via TonePars. + /// + internal static string ksParsingViaTonePars { + get { + return ResourceManager.GetString("ksParsingViaTonePars", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Parsing via XAmple. + /// + internal static string ksParsingViaXAmple { + get { + return ResourceManager.GetString("ksParsingViaXAmple", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Preparing for parsing. + /// + internal static string ksPreparingForParsing { + get { + return ResourceManager.GetString("ksPreparingForParsing", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Preparing results. + /// + internal static string ksPreparingResults { + get { + return ResourceManager.GetString("ksPreparingResults", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 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).. + /// + internal static string ksRedoDescription { + get { + return ResourceManager.GetString("ksRedoDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Somehow the result file was empty. Please try again.. + /// + internal static string ksResultEmpty { + get { + return ResourceManager.GetString("ksResultEmpty", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There was a timing problem. + ///Check if the \segments path to xxxTP.seg in xxxTP.ctl is correct. See the Log file.. + /// + internal static string ksTimingProblem { + get { + return ResourceManager.GetString("ksTimingProblem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Use TonePars with FLEx. + /// + internal static string ksTitle { + get { + return ResourceManager.GetString("ksTitle", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to TonePars result file had a problem.. + /// + internal static string ksToneParsProblem { + get { + return ResourceManager.GetString("ksToneParsProblem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Run this to use a TonePars rule file to try and use autosegmental tone to disambiguate interlinear texts.. + /// + internal static string ksWhatDescription { + get { + return ResourceManager.GetString("ksWhatDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Run this when you have a TonePars implementation.. + /// + internal static string ksWhenDescription { + get { + return ResourceManager.GetString("ksWhenDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to XAmple result file had a problem.. + /// + internal static string ksXAmpleProblem { + get { + return ResourceManager.GetString("ksXAmpleProblem", resourceCulture); + } + } + } +} diff --git a/Src/Utilities/pcpatrflex/ToneParsFLExDll/ToneParsFLExDll.Strings.resx b/Src/Utilities/pcpatrflex/ToneParsFLExDll/ToneParsFLExDll.Strings.resx new file mode 100644 index 0000000000..80f9bac86b --- /dev/null +++ b/Src/Utilities/pcpatrflex/ToneParsFLExDll/ToneParsFLExDll.Strings.resx @@ -0,0 +1,165 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Parsing failed to produce a file ({0}). + {0} is the program name + + + Parsing failed to finish writing to a file ({0}). + {0} is the program name + + + Parsing via TonePars + + + Parsing via XAmple + + + Preparing for parsing + + + Preparing results + + + 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). + + + Somehow the result file was empty. Please try again. + + + There was a timing problem. +Check if the \segments path to xxxTP.seg in xxxTP.ctl is correct. See the Log file. + + + Use TonePars with FLEx + + + TonePars result file had a problem. + + + Run this to use a TonePars rule file to try and use autosegmental tone to disambiguate interlinear texts. + + + Run this when you have a TonePars implementation. + + + XAmple result file had a problem. + + \ No newline at end of file diff --git a/Src/Utilities/pcpatrflex/ToneParsFLExDll/ToneParsFLExDll.csproj b/Src/Utilities/pcpatrflex/ToneParsFLExDll/ToneParsFLExDll.csproj index 646e929374..b4dc284633 100644 --- a/Src/Utilities/pcpatrflex/ToneParsFLExDll/ToneParsFLExDll.csproj +++ b/Src/Utilities/pcpatrflex/ToneParsFLExDll/ToneParsFLExDll.csproj @@ -51,4 +51,17 @@ Properties\CommonAssemblyInfo.cs + + + True + True + ToneParsFLExDll.Strings.resx + + + + + ResXFileCodeGenerator + ToneParsFLExDll.Strings.Designer.cs + + \ No newline at end of file diff --git a/Src/Utilities/pcpatrflex/ToneParsFLExDll/ToneParsFLExForm.designer.cs b/Src/Utilities/pcpatrflex/ToneParsFLExDll/ToneParsFLExForm.designer.cs index 766a0a7f96..055de3d127 100644 --- a/Src/Utilities/pcpatrflex/ToneParsFLExDll/ToneParsFLExForm.designer.cs +++ b/Src/Utilities/pcpatrflex/ToneParsFLExDll/ToneParsFLExForm.designer.cs @@ -59,256 +59,157 @@ private void InitializeComponent() // // btnParseSegment // - this.btnParseSegment.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.btnParseSegment.Location = new System.Drawing.Point(519, 336); + resources.ApplyResources(this.btnParseSegment, "btnParseSegment"); this.btnParseSegment.Name = "btnParseSegment"; - this.btnParseSegment.Size = new System.Drawing.Size(267, 38); - this.btnParseSegment.TabIndex = 10; - this.btnParseSegment.Text = "&Parse this segment"; this.btnParseSegment.UseVisualStyleBackColor = true; this.btnParseSegment.Click += new System.EventHandler(this.ParseSegment_Click); // // splitContainer1 // - this.splitContainer1.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))); - this.splitContainer1.Location = new System.Drawing.Point(3, 396); + resources.ApplyResources(this.splitContainer1, "splitContainer1"); this.splitContainer1.Name = "splitContainer1"; // // splitContainer1.Panel1 // - this.splitContainer1.Panel1.AutoScroll = true; + resources.ApplyResources(this.splitContainer1.Panel1, "splitContainer1.Panel1"); this.splitContainer1.Panel1.Controls.Add(this.lbTexts); // // splitContainer1.Panel2 // this.splitContainer1.Panel2.Controls.Add(this.lbSegments); - this.splitContainer1.Size = new System.Drawing.Size(1194, 541); - this.splitContainer1.SplitterDistance = 534; - this.splitContainer1.TabIndex = 4; this.splitContainer1.SplitterMoved += new System.Windows.Forms.SplitterEventHandler(this.splitContainer1_SplitterMoved); // // lbTexts // - this.lbTexts.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))); + resources.ApplyResources(this.lbTexts, "lbTexts"); this.lbTexts.FormattingEnabled = true; - this.lbTexts.ItemHeight = 20; - this.lbTexts.Location = new System.Drawing.Point(2, 0); this.lbTexts.Name = "lbTexts"; - this.lbTexts.Size = new System.Drawing.Size(529, 504); - this.lbTexts.TabIndex = 0; this.lbTexts.SelectedIndexChanged += new System.EventHandler(this.Texts_SelectedIndexChanged); // // lbSegments // - this.lbSegments.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))); + resources.ApplyResources(this.lbSegments, "lbSegments"); this.lbSegments.FormattingEnabled = true; - this.lbSegments.ItemHeight = 20; - this.lbSegments.Location = new System.Drawing.Point(0, 0); this.lbSegments.Name = "lbSegments"; - this.lbSegments.Size = new System.Drawing.Size(656, 504); - this.lbSegments.TabIndex = 0; this.lbSegments.SelectedIndexChanged += new System.EventHandler(this.Segments_SelectedIndexChanged); // // lblParsingStatus // - this.lblParsingStatus.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.lblParsingStatus.AutoSize = true; - this.lblParsingStatus.Location = new System.Drawing.Point(-1, 953); + resources.ApplyResources(this.lblParsingStatus, "lblParsingStatus"); this.lblParsingStatus.Name = "lblParsingStatus"; - this.lblParsingStatus.Size = new System.Drawing.Size(110, 20); - this.lblParsingStatus.TabIndex = 1; - this.lblParsingStatus.Text = "Parsing status"; // // lblStatus // - this.lblStatus.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.lblStatus.AutoSize = true; - this.lblStatus.Location = new System.Drawing.Point(1095, 953); + resources.ApplyResources(this.lblStatus, "lblStatus"); this.lblStatus.Name = "lblStatus"; - this.lblStatus.Size = new System.Drawing.Size(102, 20); - this.lblStatus.TabIndex = 19; - this.lblStatus.Text = "Status thingy"; // // lblTexts // - this.lblTexts.AutoSize = true; - this.lblTexts.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblTexts.Location = new System.Drawing.Point(9, 345); + resources.ApplyResources(this.lblTexts, "lblTexts"); this.lblTexts.Name = "lblTexts"; - this.lblTexts.Size = new System.Drawing.Size(61, 25); - this.lblTexts.TabIndex = 7; - this.lblTexts.Text = "Texts"; // // lblSegments // - this.lblSegments.AutoSize = true; - this.lblSegments.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblSegments.Location = new System.Drawing.Point(368, 345); + resources.ApplyResources(this.lblSegments, "lblSegments"); this.lblSegments.Name = "lblSegments"; - this.lblSegments.Size = new System.Drawing.Size(101, 25); - this.lblSegments.TabIndex = 9; - this.lblSegments.Text = "Segments"; // // lblToneRuleFile // - this.lblToneRuleFile.AutoSize = true; - this.lblToneRuleFile.Location = new System.Drawing.Point(14, 32); + resources.ApplyResources(this.lblToneRuleFile, "lblToneRuleFile"); this.lblToneRuleFile.Name = "lblToneRuleFile"; - this.lblToneRuleFile.Size = new System.Drawing.Size(139, 20); - this.lblToneRuleFile.TabIndex = 0; - this.lblToneRuleFile.Text = "TonePars rule file: "; // // tbToneRuleFile // - this.tbToneRuleFile.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.tbToneRuleFile.Location = new System.Drawing.Point(216, 28); + resources.ApplyResources(this.tbToneRuleFile, "tbToneRuleFile"); this.tbToneRuleFile.Name = "tbToneRuleFile"; - this.tbToneRuleFile.Size = new System.Drawing.Size(884, 26); - this.tbToneRuleFile.TabIndex = 1; this.tbToneRuleFile.TextChanged += new System.EventHandler(this.tbToneRuleFile_TextChanged); // // btnBrowseToneRule // - this.btnBrowseToneRule.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.btnBrowseToneRule.Location = new System.Drawing.Point(1128, 28); + resources.ApplyResources(this.btnBrowseToneRule, "btnBrowseToneRule"); this.btnBrowseToneRule.Name = "btnBrowseToneRule"; - this.btnBrowseToneRule.Size = new System.Drawing.Size(94, 38); - this.btnBrowseToneRule.TabIndex = 2; - this.btnBrowseToneRule.Text = "&Browse"; this.btnBrowseToneRule.UseVisualStyleBackColor = true; this.btnBrowseToneRule.Click += new System.EventHandler(this.Browse_Click); // // btnParseText // - this.btnParseText.Location = new System.Drawing.Point(76, 336); + resources.ApplyResources(this.btnParseText, "btnParseText"); this.btnParseText.Name = "btnParseText"; - this.btnParseText.Size = new System.Drawing.Size(282, 38); - this.btnParseText.TabIndex = 8; - this.btnParseText.Text = "Parse this &text"; this.btnParseText.UseVisualStyleBackColor = true; this.btnParseText.Click += new System.EventHandler(this.ParseText_Click); // // btnHelp // - this.btnHelp.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.btnHelp.Location = new System.Drawing.Point(1146, 134); + resources.ApplyResources(this.btnHelp, "btnHelp"); this.btnHelp.Name = "btnHelp"; - this.btnHelp.Size = new System.Drawing.Size(76, 40); - this.btnHelp.TabIndex = 6; - this.btnHelp.Text = "Help..."; this.btnHelp.UseVisualStyleBackColor = true; this.btnHelp.Click += new System.EventHandler(this.btnHelp_Click); // // btnBrowseIntxCtl // - this.btnBrowseIntxCtl.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.btnBrowseIntxCtl.Location = new System.Drawing.Point(1128, 78); + resources.ApplyResources(this.btnBrowseIntxCtl, "btnBrowseIntxCtl"); this.btnBrowseIntxCtl.Name = "btnBrowseIntxCtl"; - this.btnBrowseIntxCtl.Size = new System.Drawing.Size(94, 38); - this.btnBrowseIntxCtl.TabIndex = 14; - this.btnBrowseIntxCtl.Text = "Br&owse"; this.btnBrowseIntxCtl.UseVisualStyleBackColor = true; this.btnBrowseIntxCtl.Click += new System.EventHandler(this.btnBrowseIntxCtl_Click); // // tbIntxCtlFile // - this.tbIntxCtlFile.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.tbIntxCtlFile.Location = new System.Drawing.Point(216, 78); + resources.ApplyResources(this.tbIntxCtlFile, "tbIntxCtlFile"); this.tbIntxCtlFile.Name = "tbIntxCtlFile"; - this.tbIntxCtlFile.Size = new System.Drawing.Size(884, 26); - this.tbIntxCtlFile.TabIndex = 13; this.tbIntxCtlFile.TextChanged += new System.EventHandler(this.tbIntxCtlFile_TextChanged); // // lblAmpleIntxCtl // - this.lblAmpleIntxCtl.AutoSize = true; - this.lblAmpleIntxCtl.Location = new System.Drawing.Point(10, 83); + resources.ApplyResources(this.lblAmpleIntxCtl, "lblAmpleIntxCtl"); this.lblAmpleIntxCtl.Name = "lblAmpleIntxCtl"; - this.lblAmpleIntxCtl.Size = new System.Drawing.Size(143, 20); - this.lblAmpleIntxCtl.TabIndex = 12; - this.lblAmpleIntxCtl.Text = "AMPLE intx.ctl file: "; // // cbTraceToneProcessing // - this.cbTraceToneProcessing.AutoSize = true; - this.cbTraceToneProcessing.Location = new System.Drawing.Point(20, 134); - this.cbTraceToneProcessing.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + resources.ApplyResources(this.cbTraceToneProcessing, "cbTraceToneProcessing"); this.cbTraceToneProcessing.Name = "cbTraceToneProcessing"; - this.cbTraceToneProcessing.Size = new System.Drawing.Size(197, 24); - this.cbTraceToneProcessing.TabIndex = 15; - this.cbTraceToneProcessing.Text = "T&race Tone Processing"; this.cbTraceToneProcessing.UseVisualStyleBackColor = true; this.cbTraceToneProcessing.CheckedChanged += new System.EventHandler(this.cbTraceToneProcessing_CheckedChanged); // // btnTracingOptions // - this.btnTracingOptions.Location = new System.Drawing.Point(262, 134); - this.btnTracingOptions.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + resources.ApplyResources(this.btnTracingOptions, "btnTracingOptions"); this.btnTracingOptions.Name = "btnTracingOptions"; - this.btnTracingOptions.Size = new System.Drawing.Size(178, 35); - this.btnTracingOptions.TabIndex = 16; - this.btnTracingOptions.Text = "Tracing &Options"; this.btnTracingOptions.UseVisualStyleBackColor = true; this.btnTracingOptions.Click += new System.EventHandler(this.btnTracingOptions_Click); // // cbVerify // - this.cbVerify.AutoSize = true; - this.cbVerify.Location = new System.Drawing.Point(20, 195); - this.cbVerify.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + resources.ApplyResources(this.cbVerify, "cbVerify"); this.cbVerify.Name = "cbVerify"; - this.cbVerify.Size = new System.Drawing.Size(244, 24); - this.cbVerify.TabIndex = 17; - this.cbVerify.Text = "&Verify Control File Information"; this.cbVerify.UseVisualStyleBackColor = true; this.cbVerify.CheckedChanged += new System.EventHandler(this.cbVerify_CheckedChanged); // // btnShowLog // - this.btnShowLog.Location = new System.Drawing.Point(499, 134); - this.btnShowLog.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + resources.ApplyResources(this.btnShowLog, "btnShowLog"); this.btnShowLog.Name = "btnShowLog"; - this.btnShowLog.Size = new System.Drawing.Size(138, 35); - this.btnShowLog.TabIndex = 18; - this.btnShowLog.Text = "Show &Log"; this.btnShowLog.UseVisualStyleBackColor = true; this.btnShowLog.Click += new System.EventHandler(this.ShowLog_Click); // // cbIgnoreContext // - this.cbIgnoreContext.AutoSize = true; + resources.ApplyResources(this.cbIgnoreContext, "cbIgnoreContext"); this.cbIgnoreContext.Checked = true; this.cbIgnoreContext.CheckState = System.Windows.Forms.CheckState.Checked; - this.cbIgnoreContext.Location = new System.Drawing.Point(18, 239); this.cbIgnoreContext.Name = "cbIgnoreContext"; - this.cbIgnoreContext.Size = new System.Drawing.Size(360, 24); - this.cbIgnoreContext.TabIndex = 20; - this.cbIgnoreContext.Text = "Ignore Context (only parse unique word forms)"; this.cbIgnoreContext.UseVisualStyleBackColor = true; // // btnRefresh // - this.btnRefresh.Location = new System.Drawing.Point(22, 284); + resources.ApplyResources(this.btnRefresh, "btnRefresh"); this.btnRefresh.Name = "btnRefresh"; - this.btnRefresh.Size = new System.Drawing.Size(178, 35); - this.btnRefresh.TabIndex = 21; - this.btnRefresh.Text = "Refresh Texts"; this.btnRefresh.UseVisualStyleBackColor = true; this.btnRefresh.Click += new System.EventHandler(this.btnRefresh_Click); // // ToneParsFLExForm // - this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F); + resources.ApplyResources(this, "$this"); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(1228, 977); this.Controls.Add(this.btnRefresh); this.Controls.Add(this.cbIgnoreContext); this.Controls.Add(this.lblStatus); @@ -329,9 +230,7 @@ private void InitializeComponent() this.Controls.Add(this.lblTexts); this.Controls.Add(this.splitContainer1); this.Controls.Add(this.btnParseSegment); - this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Name = "ToneParsFLExForm"; - this.Text = "Use TonePars with FLEx"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.OnFormClosing); this.splitContainer1.Panel1.ResumeLayout(false); this.splitContainer1.Panel2.ResumeLayout(false); diff --git a/Src/Utilities/pcpatrflex/ToneParsFLExDll/ToneParsFLExForm.resx b/Src/Utilities/pcpatrflex/ToneParsFLExDll/ToneParsFLExForm.resx index f091ade035..e35de2006e 100644 --- a/Src/Utilities/pcpatrflex/ToneParsFLExDll/ToneParsFLExForm.resx +++ b/Src/Utilities/pcpatrflex/ToneParsFLExDll/ToneParsFLExForm.resx @@ -117,7 +117,645 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Top, Right + + + 519, 336 + + + 267, 38 + + + + 10 + + + &Parse this segment + + + btnParseSegment + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 19 + + + Top, Bottom, Left, Right + + + 3, 396 + + + True + + + Top, Bottom, Left, Right + + + 20 + + + 2, 0 + + + 529, 504 + + + 0 + + + lbTexts + + + System.Windows.Forms.ListBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + splitContainer1.Panel1 + + + 0 + + + splitContainer1.Panel1 + + + System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + splitContainer1 + + + 0 + + + Top, Bottom, Left, Right + + + 20 + + + 0, 0 + + + 656, 504 + + + 0 + + + lbSegments + + + System.Windows.Forms.ListBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + splitContainer1.Panel2 + + + 0 + + + splitContainer1.Panel2 + + + System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + splitContainer1 + + + 1 + + + 1194, 541 + + + 534 + + + 4 + + + splitContainer1 + + + System.Windows.Forms.SplitContainer, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 18 + + + Bottom, Left + + + True + + + -1, 953 + + + 110, 20 + + + 1 + + + Parsing status + + + lblParsingStatus + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 3 + + + Bottom, Right + + + True + + + 1095, 953 + + + 102, 20 + + + 19 + + + Status thingy + + + lblStatus + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 2 + + + True + + + Microsoft Sans Serif, 10pt + + + 9, 345 + + + 61, 25 + + + 7 + + + Texts + + + lblTexts + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 17 + + + True + + + Microsoft Sans Serif, 10pt + + + 368, 345 + + + 101, 25 + + + 9 + + + Segments + + + lblSegments + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 16 + + + True + + + 14, 32 + + + 139, 20 + + + 0 + + + TonePars rule file: + + + lblToneRuleFile + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 15 + + + Top, Left, Right + + + 216, 28 + + + 884, 26 + + + 1 + + + tbToneRuleFile + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 14 + + + Top, Right + + + 1128, 28 + + + 94, 38 + + + 2 + + + &Browse + + + btnBrowseToneRule + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 13 + + + 76, 336 + + + 282, 38 + + + 8 + + + Parse this &text + + + btnParseText + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 12 + + + Top, Right + + + 1146, 134 + + + 76, 40 + + + 6 + + + Help... + + + btnHelp + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 11 + + + Top, Right + + + 1128, 78 + + + 94, 38 + + + 14 + + + Br&owse + + + btnBrowseIntxCtl + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 8 + + + Top, Left, Right + + + 216, 78 + + + 884, 26 + + + 13 + + + tbIntxCtlFile + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 9 + + + True + + + 10, 83 + + + 143, 20 + + + 12 + + + AMPLE intx.ctl file: + + + lblAmpleIntxCtl + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 10 + + + True + + + 20, 134 + + + 4, 5, 4, 5 + + + 197, 24 + + + 15 + + + T&race Tone Processing + + + cbTraceToneProcessing + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 7 + + + 262, 134 + + + 4, 5, 4, 5 + + + 178, 35 + + + 16 + + + Tracing &Options + + + btnTracingOptions + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 6 + + + True + + + 20, 195 + + + 4, 5, 4, 5 + + + 244, 24 + + + 17 + + + &Verify Control File Information + + + cbVerify + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 5 + + + 499, 134 + + + 4, 5, 4, 5 + + + 138, 35 + + + 18 + + + Show &Log + + + btnShowLog + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 4 + + + True + + + 18, 239 + + + 360, 24 + + + 20 + + + Ignore Context (only parse unique word forms) + + + cbIgnoreContext + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 1 + + + 22, 284 + + + 178, 35 + + + 21 + + + Refresh Texts + + + btnRefresh + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 0 + + + True + + + 9, 20 + + + 1228, 977 + AAABAAUAEBAAAAEAIABoBAAAVgAAABgYAAABACAAiAkAAL4EAAAgIAAAAQAgAKgQAABGDgAAMDAAAAEA @@ -478,4 +1116,13 @@ AAAAAAAAAAAAAAAAAAAAAAAA + + Use TonePars with FLEx + + + ToneParsFLExForm + + + System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + \ No newline at end of file diff --git a/Src/Utilities/pcpatrflex/ToneParsFLExDll/ToneParsInvoker.cs b/Src/Utilities/pcpatrflex/ToneParsFLExDll/ToneParsInvoker.cs index 3c8d648764..824d75fb02 100644 --- a/Src/Utilities/pcpatrflex/ToneParsFLExDll/ToneParsInvoker.cs +++ b/Src/Utilities/pcpatrflex/ToneParsFLExDll/ToneParsInvoker.cs @@ -178,7 +178,7 @@ public void Invoke() { try { - UpdateParsingStatus("Preparing for parsing"); + UpdateParsingStatus(ToneParsFLExDll_Strings.ksPreparingForParsing); AppendToneParsPropertiesToAdCtlFile(); AddToneParsPropertiesToLexiconFile(); ConvertMorphnameIsToUseHvosInToneRuleFile(); @@ -194,18 +194,16 @@ public void Invoke() "cmd.exe", "/c\"" + ToneParsBatchFile + "\"" ); - UpdateParsingStatus("Parsing via TonePars"); + UpdateParsingStatus(ToneParsFLExDll_Strings.ksParsingViaTonePars); InvokeBatchFile(processInfo); WaitForFileCompletion(AntFile); if (!File.Exists(AntFile)) { - MessageBox.Show( - "There was a timing problem.\nCheck if the \\segments path to xxxTP.seg in xxxTP.ctl is correct. See the Log file." - ); + MessageBox.Show(ToneParsFLExDll_Strings.ksTimingProblem); InvocationSucceeded = false; return; } - UpdateParsingStatus("Preparing results"); + UpdateParsingStatus(ToneParsFLExDll_Strings.ksPreparingResults); CreateAntRecords(); } catch (IOException e) @@ -217,11 +215,11 @@ public void Invoke() { if (e.Message.Contains("ToneParsInvoker.ana'")) { - UpdateParsingStatus("XAmple result file had a problem."); + UpdateParsingStatus(ToneParsFLExDll_Strings.ksXAmpleProblem); } else { - UpdateParsingStatus("TonePars result file had a problem."); + UpdateParsingStatus(ToneParsFLExDll_Strings.ksToneParsProblem); } InvocationSucceeded = false; } @@ -236,7 +234,7 @@ private void XAmpleParseFile() "Configuration", "Grammar" ); - UpdateParsingStatus("Parsing via XAmple"); + UpdateParsingStatus(ToneParsFLExDll_Strings.ksParsingViaXAmple); XAmpleWrapperForTonePars m_xampleTP = new XAmpleWrapperForTonePars(); m_xampleTP.InitForTonePars(); int maxToReturn = GetMaxAnalysesToReturn(); @@ -297,7 +295,7 @@ private void WaitForFileCompletion(string filePath) } if (!File.Exists(filePath)) { - UpdateParsingStatus("Parsing failed to produce a file (" + programName + ")."); + UpdateParsingStatus(string.Format(ToneParsFLExDll_Strings.ksParsingFailedToProduceFile, programName)); InvocationSucceeded = false; return; } @@ -319,9 +317,7 @@ private void WaitForFileCompletion(string filePath) fileSize = new System.IO.FileInfo(filePath).Length; if (fileSize == 0) { - UpdateParsingStatus( - "Parsing failed to finish writing to a file (" + programName + ")." - ); + UpdateParsingStatus(string.Format(ToneParsFLExDll_Strings.ksParsingFailedWritingToFile, programName)); InvocationSucceeded = false; } } @@ -352,7 +348,7 @@ private void CreateAntRecords() if (String.IsNullOrEmpty(antFileContents)) { Console.Beep(); - MessageBox.Show("Somehow the result file was empty. Please try again."); + MessageBox.Show(ToneParsFLExDll_Strings.ksResultEmpty); InvocationSucceeded = false; return; } diff --git a/Src/Utilities/pcpatrflex/ToneParsFLExDll/TracingOptionsDialog.Designer.cs b/Src/Utilities/pcpatrflex/ToneParsFLExDll/TracingOptionsDialog.Designer.cs index 91eb8935cb..9b8af463b0 100644 --- a/Src/Utilities/pcpatrflex/ToneParsFLExDll/TracingOptionsDialog.Designer.cs +++ b/Src/Utilities/pcpatrflex/ToneParsFLExDll/TracingOptionsDialog.Designer.cs @@ -44,122 +44,77 @@ private void InitializeComponent() // // cbRuleTrace // - this.cbRuleTrace.AutoSize = true; - this.cbRuleTrace.Location = new System.Drawing.Point(34, 451); + resources.ApplyResources(this.cbRuleTrace, "cbRuleTrace"); this.cbRuleTrace.Name = "cbRuleTrace"; - this.cbRuleTrace.Size = new System.Drawing.Size(250, 24); - this.cbRuleTrace.TabIndex = 8; - this.cbRuleTrace.Text = "Rule application (normal trace)"; this.cbRuleTrace.UseVisualStyleBackColor = true; // // cbTierAssignmentTrace // - this.cbTierAssignmentTrace.AutoSize = true; - this.cbTierAssignmentTrace.Location = new System.Drawing.Point(34, 397); + resources.ApplyResources(this.cbTierAssignmentTrace, "cbTierAssignmentTrace"); this.cbTierAssignmentTrace.Name = "cbTierAssignmentTrace"; - this.cbTierAssignmentTrace.Size = new System.Drawing.Size(298, 24); - this.cbTierAssignmentTrace.TabIndex = 7; - this.cbTierAssignmentTrace.Text = "Primary and Register Tier assignment"; this.cbTierAssignmentTrace.UseVisualStyleBackColor = true; // // cbDomainAssignmentTrace // - this.cbDomainAssignmentTrace.AutoSize = true; - this.cbDomainAssignmentTrace.Location = new System.Drawing.Point(34, 343); + resources.ApplyResources(this.cbDomainAssignmentTrace, "cbDomainAssignmentTrace"); this.cbDomainAssignmentTrace.Name = "cbDomainAssignmentTrace"; - this.cbDomainAssignmentTrace.Size = new System.Drawing.Size(176, 24); - this.cbDomainAssignmentTrace.TabIndex = 6; - this.cbDomainAssignmentTrace.Text = "Domain assignment"; this.cbDomainAssignmentTrace.UseVisualStyleBackColor = true; // // cbMorphemeToneAssignmentTrace // - this.cbMorphemeToneAssignmentTrace.AutoSize = true; - this.cbMorphemeToneAssignmentTrace.Location = new System.Drawing.Point(34, 289); + resources.ApplyResources(this.cbMorphemeToneAssignmentTrace, "cbMorphemeToneAssignmentTrace"); this.cbMorphemeToneAssignmentTrace.Name = "cbMorphemeToneAssignmentTrace"; - this.cbMorphemeToneAssignmentTrace.Size = new System.Drawing.Size(233, 24); - this.cbMorphemeToneAssignmentTrace.TabIndex = 5; - this.cbMorphemeToneAssignmentTrace.Text = "Morpheme tone assignment"; this.cbMorphemeToneAssignmentTrace.UseVisualStyleBackColor = true; // // cbTBUAssignmentTrace // - this.cbTBUAssignmentTrace.AutoSize = true; - this.cbTBUAssignmentTrace.Location = new System.Drawing.Point(34, 235); + resources.ApplyResources(this.cbTBUAssignmentTrace, "cbTBUAssignmentTrace"); this.cbTBUAssignmentTrace.Name = "cbTBUAssignmentTrace"; - this.cbTBUAssignmentTrace.Size = new System.Drawing.Size(153, 24); - this.cbTBUAssignmentTrace.TabIndex = 4; - this.cbTBUAssignmentTrace.Text = "TBU assignment"; this.cbTBUAssignmentTrace.UseVisualStyleBackColor = true; // // cbSyllableParsingTrace // - this.cbSyllableParsingTrace.AutoSize = true; - this.cbSyllableParsingTrace.Location = new System.Drawing.Point(34, 182); + resources.ApplyResources(this.cbSyllableParsingTrace, "cbSyllableParsingTrace"); this.cbSyllableParsingTrace.Name = "cbSyllableParsingTrace"; - this.cbSyllableParsingTrace.Size = new System.Drawing.Size(145, 24); - this.cbSyllableParsingTrace.TabIndex = 3; - this.cbSyllableParsingTrace.Text = "Syllable parsing"; this.cbSyllableParsingTrace.UseVisualStyleBackColor = true; // // cbMoraParsingTrace // - this.cbMoraParsingTrace.AutoSize = true; - this.cbMoraParsingTrace.Location = new System.Drawing.Point(34, 128); + resources.ApplyResources(this.cbMoraParsingTrace, "cbMoraParsingTrace"); this.cbMoraParsingTrace.Name = "cbMoraParsingTrace"; - this.cbMoraParsingTrace.Size = new System.Drawing.Size(127, 24); - this.cbMoraParsingTrace.TabIndex = 2; - this.cbMoraParsingTrace.Text = "Mora parsing"; this.cbMoraParsingTrace.UseVisualStyleBackColor = true; // // cbMorphemeLinkingTrace // - this.cbMorphemeLinkingTrace.AutoSize = true; - this.cbMorphemeLinkingTrace.Location = new System.Drawing.Point(34, 74); + resources.ApplyResources(this.cbMorphemeLinkingTrace, "cbMorphemeLinkingTrace"); this.cbMorphemeLinkingTrace.Name = "cbMorphemeLinkingTrace"; - this.cbMorphemeLinkingTrace.Size = new System.Drawing.Size(289, 24); - this.cbMorphemeLinkingTrace.TabIndex = 1; - this.cbMorphemeLinkingTrace.Text = "Linking of morphemes to root nodes"; this.cbMorphemeLinkingTrace.UseVisualStyleBackColor = true; // // cbSegmentParsingTrace // - this.cbSegmentParsingTrace.AutoSize = true; - this.cbSegmentParsingTrace.Location = new System.Drawing.Point(34, 20); + resources.ApplyResources(this.cbSegmentParsingTrace, "cbSegmentParsingTrace"); this.cbSegmentParsingTrace.Name = "cbSegmentParsingTrace"; - this.cbSegmentParsingTrace.Size = new System.Drawing.Size(266, 24); - this.cbSegmentParsingTrace.TabIndex = 0; - this.cbSegmentParsingTrace.Text = "Segment parsing into root nodes"; this.cbSegmentParsingTrace.UseVisualStyleBackColor = true; // // btnOK // this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK; - this.btnOK.Location = new System.Drawing.Point(226, 500); - this.btnOK.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + resources.ApplyResources(this.btnOK, "btnOK"); this.btnOK.Name = "btnOK"; - this.btnOK.Size = new System.Drawing.Size(112, 35); - this.btnOK.TabIndex = 9; - this.btnOK.Text = "OK"; this.btnOK.UseVisualStyleBackColor = true; this.btnOK.Click += new System.EventHandler(this.btnOK_Click); // // btnCancel // this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.btnCancel.Location = new System.Drawing.Point(356, 500); - this.btnCancel.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + resources.ApplyResources(this.btnCancel, "btnCancel"); this.btnCancel.Name = "btnCancel"; - this.btnCancel.Size = new System.Drawing.Size(112, 35); - this.btnCancel.TabIndex = 10; - this.btnCancel.Text = "Cancel"; this.btnCancel.UseVisualStyleBackColor = true; // // TracingOptionsDialog // - this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F); + resources.ApplyResources(this, "$this"); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(486, 557); this.Controls.Add(this.btnCancel); this.Controls.Add(this.btnOK); this.Controls.Add(this.cbRuleTrace); @@ -171,10 +126,7 @@ private void InitializeComponent() this.Controls.Add(this.cbMoraParsingTrace); this.Controls.Add(this.cbTBUAssignmentTrace); this.Controls.Add(this.cbSyllableParsingTrace); - this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); - this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.Name = "TracingOptionsDialog"; - this.Text = "Tracing Options Dialog"; this.ResumeLayout(false); this.PerformLayout(); diff --git a/Src/Utilities/pcpatrflex/ToneParsFLExDll/TracingOptionsDialog.resx b/Src/Utilities/pcpatrflex/ToneParsFLExDll/TracingOptionsDialog.resx index f091ade035..4d17e8d048 100644 --- a/Src/Utilities/pcpatrflex/ToneParsFLExDll/TracingOptionsDialog.resx +++ b/Src/Utilities/pcpatrflex/ToneParsFLExDll/TracingOptionsDialog.resx @@ -117,7 +117,315 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + True + + + 34, 451 + + + 250, 24 + + + 8 + + + Rule application (normal trace) + + + cbRuleTrace + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 2 + + + True + + + 34, 397 + + + 298, 24 + + + 7 + + + Primary and Register Tier assignment + + + cbTierAssignmentTrace + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 3 + + + True + + + 34, 343 + + + 176, 24 + + + 6 + + + Domain assignment + + + cbDomainAssignmentTrace + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 5 + + + True + + + 34, 289 + + + 233, 24 + + + 5 + + + Morpheme tone assignment + + + cbMorphemeToneAssignmentTrace + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 7 + + + True + + + 34, 235 + + + 153, 24 + + + 4 + + + TBU assignment + + + cbTBUAssignmentTrace + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 9 + + + True + + + 34, 182 + + + 145, 24 + + + 3 + + + Syllable parsing + + + cbSyllableParsingTrace + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 10 + + + True + + + 34, 128 + + + 127, 24 + + + 2 + + + Mora parsing + + + cbMoraParsingTrace + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 8 + + + True + + + 34, 74 + + + 289, 24 + + + 1 + + + Linking of morphemes to root nodes + + + cbMorphemeLinkingTrace + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 6 + + + True + + + 34, 20 + + + 266, 24 + + + 0 + + + Segment parsing into root nodes + + + cbSegmentParsingTrace + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 4 + + + 226, 500 + + + + 4, 5, 4, 5 + + + 112, 35 + + + 9 + + + OK + + + btnOK + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 1 + + + 356, 500 + + + 4, 5, 4, 5 + + + 112, 35 + + + 10 + + + Cancel + + + btnCancel + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 0 + + + True + + + 9, 20 + + + 486, 557 + AAABAAUAEBAAAAEAIABoBAAAVgAAABgYAAABACAAiAkAAL4EAAAgIAAAAQAgAKgQAABGDgAAMDAAAAEA @@ -478,4 +786,16 @@ AAAAAAAAAAAAAAAAAAAAAAAA + + 4, 5, 4, 5 + + + Tracing Options Dialog + + + TracingOptionsDialog + + + System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + \ No newline at end of file