forked from slothsoft/stardew-informant
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[slothsoft#59] make locked bundle display configurable
- Loading branch information
Showing
13 changed files
with
156 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using System.Linq; | ||
using NUnit.Framework; | ||
|
||
namespace StardewTests.Harness.Test; | ||
|
||
public static class I18NTestUtil { | ||
|
||
public static void Assert18NCorrect(string modFolder, LocalizedContentManager.LanguageCode locale) { | ||
var translationHelper = new TestTranslationHelper(modFolder); | ||
var allDefaultTranslations = translationHelper.GetTranslations().ToArray(); | ||
|
||
// now set to tested locale and assert | ||
translationHelper.LocaleEnum = locale; | ||
foreach (var defaultTranslation in allDefaultTranslations) { | ||
// this throws an exception if the key does not exist at all | ||
var translation = translationHelper.Get(defaultTranslation.Key).ToString(); | ||
// warn if the key exists, but is English (since I can't translate those keys myself) | ||
Warn.If(translation.Equals(defaultTranslation.ToString()), () => $"{defaultTranslation.Key} was not translated in locale {locale}"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.