Skip to content

Commit 3a65dee

Browse files
committed
warn user to ensure correct language is set when OCR fails to read sandwich ingredient plate
1 parent 9f09490 commit 3a65dee

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

SerialPrograms/Source/CommonFramework/Language.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,5 +84,11 @@ Language language_code_to_enum(const std::string& language){
8484
return iter->second;
8585
}
8686

87+
std::string language_warning(Language language){
88+
return "Please ensure that you have set the correct Game Language in the program settings.\n"
89+
"Current language set: " + language_data(language).name;
90+
91+
}
92+
8793

8894
}

SerialPrograms/Source/CommonFramework/Language.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ class LanguageSet{
6060

6161
const LanguageData& language_data(Language language);
6262
Language language_code_to_enum(const std::string& language);
63+
std::string language_warning(Language language);
6364

6465

6566

SerialPrograms/Source/PokemonSV/Programs/Sandwiches/PokemonSV_SandwichRoutines.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1105,8 +1105,7 @@ void run_sandwich_maker(
11051105
stream.log("Read nothing on center plate label.");
11061106
OperationFailedException::fire(
11071107
ErrorReport::SEND_ERROR_REPORT,
1108-
"run_sandwich_maker: No ingredient found on center plate label.\n"
1109-
"Please make sure that you have set the correct Game Language in the program settings.",
1108+
"run_sandwich_maker: No ingredient found on center plate label.\n" + language_warning(language),
11101109
stream,
11111110
std::move(screen)
11121111
);

0 commit comments

Comments
 (0)