Skip to content

Commit 271f1b3

Browse files
committed
add more language warnings for ambiguous/multiple OCR reads.
1 parent 4addb9f commit 271f1b3

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

SerialPrograms/Source/PokemonSV/Inference/ItemPrinter/PokemonSV_ItemPrinterMaterialDetector.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ std::string ItemPrinterMaterialDetector::detect_material_name(
223223
if (results.size() > 1){
224224
OperationFailedException::fire(
225225
ErrorReport::SEND_ERROR_REPORT,
226-
"ItemPrinterMaterialDetector::detect_material_name(): Unable to read selected item. Ambiguous or multiple results.",
226+
"ItemPrinterMaterialDetector::detect_material_name(): Unable to read selected item. Ambiguous or multiple results.\n" + language_warning(m_language),
227227
stream
228228
);
229229
}

SerialPrograms/Source/PokemonSV/Inference/PokemonSV_BlueberryQuestDetector.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ std::string BlueberryQuestDetector::detect_quest(const ImageViewRGB32& screen) c
7777
if (results.size() > 1){
7878
throw_and_log<OperationFailedException>(
7979
m_logger, ErrorReport::SEND_ERROR_REPORT,
80-
"BlueberryQuestDetector::detect_quest(): Unable to read selected item. Ambiguous or multiple results."
80+
"BlueberryQuestDetector::detect_quest(): Unable to read selected item. Ambiguous or multiple results.\n" + language_warning(m_language)
8181
);
8282
}
8383

SerialPrograms/Source/PokemonSV/Inference/PokemonSV_PokemonMovesReader.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ std::string PokemonMovesReader::read_move(Logger& logger, const ImageViewRGB32&
7676
if (results.size() > 1){
7777
throw_and_log<OperationFailedException>(
7878
logger, ErrorReport::SEND_ERROR_REPORT,
79-
"MenuOption::read_option(): Unable to read item. Ambiguous or multiple results."
79+
"MenuOption::read_option(): Unable to read item. Ambiguous or multiple results.\n" + language_warning(m_language)
8080
);
8181
}
8282

SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_MenuOption.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ std::string MenuOption::read_option(const ImageViewRGB32& cropped) const{
138138
if (results.size() > 1){
139139
OperationFailedException::fire(
140140
ErrorReport::SEND_ERROR_REPORT,
141-
"MenuOption::read_option(): Unable to read item. Ambiguous or multiple results.",
141+
"MenuOption::read_option(): Unable to read item. Ambiguous or multiple results.\n" + language_warning(m_language),
142142
m_stream
143143
);
144144
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ PageIngredients IngredientSession::read_screen(std::shared_ptr<const ImageRGB32>
130130
OperationFailedException::fire(
131131
ErrorReport::SEND_ERROR_REPORT,
132132
"IngredientSession::read_current_page(): Unable to read selected item. Ambiguous result: "
133-
+ set_to_str(ocr_result) + ", " + set_to_str(sprite_result),
133+
+ set_to_str(ocr_result) + ", " + set_to_str(sprite_result) + "\n" + language_warning(m_language),
134134
m_stream,
135135
screen
136136
);

0 commit comments

Comments
 (0)