diff --git a/src/SIL.Machine/Corpora/ParatextProjectTermsParserBase.cs b/src/SIL.Machine/Corpora/ParatextProjectTermsParserBase.cs index b58ce3c6..0ae235a2 100644 --- a/src/SIL.Machine/Corpora/ParatextProjectTermsParserBase.cs +++ b/src/SIL.Machine/Corpora/ParatextProjectTermsParserBase.cs @@ -168,7 +168,8 @@ protected ParatextProjectTermsParserBase(ParatextProjectSettingsParserBase setti { return termsRenderings .Concat(termsGlosses.Where(kvp => !termsRenderings.ContainsKey(kvp.Key))) - .Select(kvp => (kvp.Key, (IReadOnlyList)kvp.Value.ToList())); + .Select(kvp => (kvp.Key, (IReadOnlyList)kvp.Value.ToList())) + .OrderBy(glosses => glosses.Key); } return new List<(string, IReadOnlyList)>(); } diff --git a/tests/SIL.Machine.Tests/Corpora/ParatextProjectTermsParserTests.cs b/tests/SIL.Machine.Tests/Corpora/ParatextProjectTermsParserTests.cs index 54034b9e..41da90b1 100644 --- a/tests/SIL.Machine.Tests/Corpora/ParatextProjectTermsParserTests.cs +++ b/tests/SIL.Machine.Tests/Corpora/ParatextProjectTermsParserTests.cs @@ -55,7 +55,7 @@ public void TestGetKeyTermsFromTermsLocalizations_NoTermRenderings() ); IEnumerable<(string TermId, IReadOnlyList Glosses)> terms = env.GetGlosses(); Assert.That(terms.Count, Is.EqualTo(5726)); - Assert.That(string.Join(" ", terms.First().Glosses), Is.EqualTo("Abagtha")); + Assert.That(string.Join(" ", terms.First().Glosses), Is.EqualTo("Aaron")); } [Test] @@ -139,8 +139,7 @@ public void TestGetKeyTermsFromTermsLocalizations_TermRenderingsExists_PreferLoc ); IReadOnlyList<(string TermId, IReadOnlyList Glosses)> terms = env.GetGlosses().ToList(); Assert.That(terms.Count, Is.EqualTo(5726)); - Assert.That(string.Join(" ", terms[1].Glosses), Is.EqualTo("Abagtha")); - Assert.That(string.Join(" ", terms[2].Glosses), Is.EqualTo("Abi")); + Assert.That(string.Join(" ", terms[1].Glosses), Is.EqualTo("Aaron")); } [Test]