Skip to content

Commit

Permalink
updated status_found_text_not_replaced Message; updated 'Add into Lis…
Browse files Browse the repository at this point in the history
…t' for empty Find string
  • Loading branch information
daddel80 committed Sep 6, 2024
1 parent 8d342ec commit 8cef508
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
9 changes: 8 additions & 1 deletion languages.ini
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ status_no_find_string="No 'Find' String entered. Please provide a value to add t
status_no_rows_selected_to_shift="No rows selected to shift."
status_add_values_or_uncheck="Add values into the list or uncheck 'Use in List'."
status_no_occurrence_found="No occurrence found."
status_found_text_not_replaced="Found text was not replaced."
status_replace_one_next_found="Replace: 1 occurrence replaced. Next found."
status_replace_one_none_left="Replace: 1 occurrence replaced. None left."
status_add_values_or_find_directly="Add values into the list. Or uncheck 'Use in List' to find directly."
Expand Down Expand Up @@ -168,6 +169,7 @@ ctxmenu_select_all="Select &All Ctrl+A"
ctxmenu_enable="E&nable Alt+A"
ctxmenu_disable="D&isable Alt+D"


[german]
; Panel labels (visible text on the control elements)
panel_find_what="Suche nach: "
Expand Down Expand Up @@ -261,6 +263,7 @@ status_no_find_string="Keinen Suchtext eingegeben. Bitte geben Sie eine Zeichenf
status_no_rows_selected_to_shift="Keine Zeilen zum Verschieben ausgewählt."
status_add_values_or_uncheck="Texte in die Liste einfügen oder 'Liste ein' abwählen."
status_no_occurrence_found="Kein Vorkommen gefunden."
status_found_text_not_replaced="Gefundener Text wurde nicht ersetzt."
status_replace_one_next_found="Ersetzen: 1 Vorkommen ersetzt. Nächstes gefunden."
status_replace_one_none_left="Ersetzen: 1 Vorkommen ersetzt. Keine weiteren übrig."
status_add_values_or_find_directly="Texte in die Liste einfügen oder 'Liste ein' abwählen, um direkt zu finden."
Expand Down Expand Up @@ -432,6 +435,7 @@ status_no_find_string="Nessuna 'Stringa di ricerca' inserita. Inserire a valore
status_no_rows_selected_to_shift="Nessuna riga selezionata da spostare."
status_add_values_or_uncheck="Aggiungi valori alla lista oppure deseleziona 'Usa nell'elenco''."
status_no_occurrence_found="Nessuna corrispondenza trovata."
status_found_text_not_replaced="Testo trovato non sostituito."
status_replace_one_next_found="Sostituisci: 1 corrispondenza sostituita. Successiva trovata."
status_replace_one_none_left="Sostituisci: 1 corrispondenza sostituita. Nessuna successiva."
status_add_values_or_find_directly="Aggiungi valori alla lista. Oppure deseleziona 'Usa nella lista' per cercare direttamente."
Expand Down Expand Up @@ -603,6 +607,7 @@ status_no_find_string="Nincs beírva 'Keresett Szöveg'. Kérem adjon meg egy é
status_no_rows_selected_to_shift="Nincsenek kiválasztott sorok a mozgatáshoz."
status_add_values_or_uncheck="Adjon értékeket a listához vagy pipálja ki a 'Listában használ' opciót."
status_no_occurrence_found="Nem található előfordulás."
status_found_text_not_replaced="A megtalált szöveg nem lett cserélve."
status_replace_one_next_found="Csere: 1 előfordulás cserélve. Következő megtalálva."
status_replace_one_none_left="Csere: 1 előfordulás cserélve. Egyik sem maradt."
status_add_values_or_find_directly="Adjon értékeket a listához. Vagy pipálja ki a 'Listában használ' opciót a közvetlen kereséshez."
Expand Down Expand Up @@ -679,6 +684,7 @@ ctxmenu_select_all="&Összes kiválasztása Ctrl+A"
ctxmenu_enable="&Engedélyez Alt+A"
ctxmenu_disable="&Letilt Alt+D"
[russian]
; Panel labels (visible text on the control elements)
panel_find_what="Найти:"
Expand Down Expand Up @@ -773,6 +779,7 @@ status_no_find_string="Поле 'Найти' пусто. Внесите знач
status_no_rows_selected_to_shift="Нет выделенных строк для перемещения строк."
status_add_values_or_uncheck="Добавьте значения в список или снимите флажок 'Список'."
status_no_occurrence_found="Не найдено."
status_found_text_not_replaced="Найденный текст не заменён."
status_replace_one_next_found="Заменено 1 раз. Найдено следующее."
status_replace_one_none_left="Заменено 1 раз. Больше не найдено."
status_add_values_or_find_directly="Добавьте значения в список или снимите флажок 'Список' для прямой замены."
Expand Down Expand Up @@ -944,7 +951,7 @@ status_add_values_instructions="Agregue valores a la lista. O desmarque 'Usar li
status_no_find_string="No se ingresó cadena de 'Buscar'. Proporcione un valor para agregar a la lista."
status_no_rows_selected_to_shift="No se seleccionaron filas para mover."
status_add_values_or_uncheck="Agregue valores a la lista o desmarque 'Usar lista'."
status_no_occurrence_found="No se encontró ninguna ocurrencia."
status_found_text_not_replaced="El texto encontrado no fue sustituido."
status_replace_one_next_found="Reemplazar: 1 ocurrencia reemplazada. Siguiente encontrado."
status_replace_one_none_left="Reemplazar: 1 ocurrencia reemplazada. No quedan más."
status_add_values_or_find_directly="Agregue valores a la lista. O desmarque 'Usar lista' para buscar directamente."
Expand Down
10 changes: 6 additions & 4 deletions src/MultiReplacePanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -607,8 +607,10 @@ void MultiReplace::createListViewColumns(HWND listView) {
}

void MultiReplace::insertReplaceListItem(const ReplaceItemData& itemData) {
// Return early if findText is empty
if (itemData.findText.empty()) {
int useVariables = IsDlgButtonChecked(_hSelf, IDC_USE_VARIABLES_CHECKBOX) == BST_CHECKED ? 1 : 0;

// Return early if findText is empty and "Use Variables" is not enabled
if (itemData.findText.empty() && useVariables == 0) {
showStatusMessage(getLangStr(L"status_no_find_string"), RGB(255, 0, 0));
return;
}
Expand Down Expand Up @@ -2626,7 +2628,7 @@ void MultiReplace::handleReplaceButton() {
showStatusMessage(getLangStr(L"status_no_occurrence_found"), RGB(255, 0, 0));
}
else {
showStatusMessage(L"Found text was not replaced", RGB(255, 0, 0));
showStatusMessage(getLangStr(L"status_found_text_not_replaced"), RGB(255, 0, 0));
}
}
}
Expand Down Expand Up @@ -2670,7 +2672,7 @@ void MultiReplace::handleReplaceButton() {
showStatusMessage(getLangStr(L"status_no_occurrence_found"), RGB(255, 0, 0));
}
else {
showStatusMessage(L"Found text was not replaced", RGB(255, 0, 0));
showStatusMessage(getLangStr(L"status_found_text_not_replaced"), RGB(255, 0, 0));
}
}
}
Expand Down
1 change: 1 addition & 0 deletions src/language_mapping.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ std::unordered_map<std::wstring, std::wstring> languageMap = {
{ L"status_no_rows_selected_to_shift", L"No rows selected to shift." },
{ L"status_add_values_or_uncheck", L"Add values into the list or uncheck 'Use in List'." },
{ L"status_no_occurrence_found", L"No occurrence found." },
{ L"status_found_text_not_replaced", L"Found text was not replaced." },
{ L"status_replace_one_next_found", L"Replace: 1 occurrence replaced. Next found." },
{ L"status_replace_one_none_left", L"Replace: 1 occurrence replaced. None left." },
{ L"status_add_values_or_find_directly", L"Add values into the list. Or uncheck 'Use in List' to find directly." },
Expand Down

0 comments on commit 8cef508

Please sign in to comment.