sillsdev / l10nsharp

A .NET localization library for Windows Forms applications.
3 stars 10 forks source link

Removed support for TMX-based l10n files #101

Closed tombogle closed 2 years ago

tombogle commented 2 years ago

This change is Reviewable

lgtm-com[bot] commented 2 years ago

This pull request fixes 5 alerts when merging 29d92a24a5dd092c5840ef04276a95017efe03f7 into db83c622a929330ad9fb469850962dd080417f7f - view on LGTM.com

fixed alerts:

tombogle commented 2 years ago

src/SampleApp/Program.cs line 38 at r1 (raw file):

Previously, andrew-polk wrote…
What is the advantage of this over just removing the parameter? Maybe naïve, but I think I would want a compile-time error rather than a run-time one.

This is the sample app. A user (developer) could pass anything on the command line, but it seems reasonably likely that they might have their IDE set to pass -tmx. By throwing this nice exception, I'm hoping to make it clear what the problem is, rather than just ignoring the parameter (as we do with anything else that is unexpected) and making them try to figure out why they are possibly getting some unexpected behavior.

lgtm-com[bot] commented 2 years ago

This pull request fixes 5 alerts when merging 2144b46bf4b44355918af684fe66b6e1903f7cde into db83c622a929330ad9fb469850962dd080417f7f - view on LGTM.com

fixed alerts:

tombogle commented 2 years ago

src/L10NSharpTests/LocalizationManagerTestsBase.cs line 26 at r2 (raw file):

Previously, andrew-polk wrote…
Is `L10n` better than `Loc`?

I just looked to see what we (probably me) called it in the actual implementation of the method and used that. FWIW, there are dozens of variables and method names that use Loc and 0 that use L10n, so I don't know if that makes it "better", but at least it is consistent.