Skip to content

LT-22482: localize HCSynthByGloss#826

Open
AndyBlack wants to merge 1 commit intomainfrom
LT22482
Open

LT-22482: localize HCSynthByGloss#826
AndyBlack wants to merge 1 commit intomainfrom
LT22482

Conversation

@AndyBlack
Copy link
Copy Markdown
Collaborator

@AndyBlack AndyBlack commented Apr 9, 2026

This adds English (by default), French, German, and Spanish for the 13 strings used in the HcSynthByGloss tools.
The EXE puts the locale code as its first argument.
The DLL add a property to set the locale code.


This change is Reviewable

Change-Id: Ib775606f8bfd6beaf8e777044f988472511bf414
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 9, 2026

NUnit Tests

    1 files  ±0      1 suites  ±0   6m 8s ⏱️ -12s
4 103 tests ±0  4 032 ✅ ±0  71 💤 ±0  0 ❌ ±0 
4 112 runs  ±0  4 041 ✅ ±0  71 💤 ±0  0 ❌ ±0 

Results for commit e054754. ± Comparison against base commit eecd51f.

Copy link
Copy Markdown
Contributor

@papeh papeh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's great that you already have localizations for de, es, and fr. Rather than checking them into the repo, they should be uploaded to Crowdin. I've sent you an invitation.

Console.WriteLine(HCSynthByGlossStrings.ksUsage);
Console.WriteLine(HCSynthByGlossStrings.ksCommandLineUsage);
Console.WriteLine(HCSynthByGlossStrings.ksTurnOnTracing);
Console.WriteLine(HCSynthByGlossStrings.ksShowTracing);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If these are always used together, I think it would be best to combine them into a single string.

{
static void Main(string[] args)
{
const int iLocale = 0;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clever use of constants to make command line args meaningful!

<value>HCSynthByGloss locale -h HC.xml_file -g gloss_file -o output (-t (-s))</value>
</data>
<data name="ksCouldNotFind" xml:space="preserve">
<value>Could not find </value>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To support languages with different word order, you could use string.Format( with

<data name="ksCouldNotFind" xml:space="preserve">
    <value>Could not find {0} '{1}'.</value>
    <comment>{0} is 'HC XML file' or 'Gloss file'. {1} is the path to (name of?) the file.</comment>
</data>

}
if (duplicateFound)
{
sb.Append(" synthesis may not work.");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sentence could also be combined into a single string.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants