From 18acf7955128843b29e1ca50a90b0dc5ea739aa6 Mon Sep 17 00:00:00 2001 From: Katayama Hirofumi MZ Date: Thu, 11 Jul 2024 09:12:12 +0900 Subject: [PATCH] [CMD] Prepare for localization by using resource strings (#7125) Promote localization of cmd.exe. JIRA issue: CORE-19680 Add some resource strings. Use them instead of raw strings. --- base/shell/cmd/assoc.c | 3 +-- base/shell/cmd/call.c | 6 ++---- base/shell/cmd/ctty.c | 3 +-- base/shell/cmd/lang/cs-CZ.rc | 7 +++++++ base/shell/cmd/lang/de-DE.rc | 7 +++++++ base/shell/cmd/lang/el-GR.rc | 7 +++++++ base/shell/cmd/lang/en-US.rc | 7 +++++++ base/shell/cmd/lang/es-ES.rc | 7 +++++++ base/shell/cmd/lang/fr-FR.rc | 7 +++++++ base/shell/cmd/lang/hu-HU.rc | 7 +++++++ base/shell/cmd/lang/id-ID.rc | 7 +++++++ base/shell/cmd/lang/it-IT.rc | 7 +++++++ base/shell/cmd/lang/ja-JP.rc | 7 +++++++ base/shell/cmd/lang/no-NO.rc | 7 +++++++ base/shell/cmd/lang/pl-PL.rc | 7 +++++++ base/shell/cmd/lang/pt-BR.rc | 7 +++++++ base/shell/cmd/lang/pt-PT.rc | 7 +++++++ base/shell/cmd/lang/ro-RO.rc | 7 +++++++ base/shell/cmd/lang/ru-RU.rc | 7 +++++++ base/shell/cmd/lang/sk-SK.rc | 7 +++++++ base/shell/cmd/lang/sq-AL.rc | 7 +++++++ base/shell/cmd/lang/sv-SE.rc | 7 +++++++ base/shell/cmd/lang/tr-TR.rc | 7 +++++++ base/shell/cmd/lang/uk-UA.rc | 7 +++++++ base/shell/cmd/lang/zh-CN.rc | 7 +++++++ base/shell/cmd/lang/zh-TW.rc | 7 +++++++ base/shell/cmd/resource.h | 7 +++++++ base/shell/cmd/set.c | 12 ++++-------- 28 files changed, 176 insertions(+), 16 deletions(-) diff --git a/base/shell/cmd/assoc.c b/base/shell/cmd/assoc.c index 6441d3d369e..bc07181910d 100644 --- a/base/shell/cmd/assoc.c +++ b/base/shell/cmd/assoc.c @@ -279,8 +279,7 @@ INT CommandAssoc(LPTSTR param) { if (retval != ERROR_FILE_NOT_FOUND) { - // FIXME: Localize - ConErrPrintf(_T("Error occurred while processing: %s.\n"), param); + ConErrResPrintf(STRING_ERROR_WHILE_PROCESSING, param); } // retval = 1; /* Fixup the error value */ } diff --git a/base/shell/cmd/call.c b/base/shell/cmd/call.c index c9b11937492..c3f6c6ec608 100644 --- a/base/shell/cmd/call.c +++ b/base/shell/cmd/call.c @@ -171,8 +171,7 @@ INT cmd_call(LPTSTR param) if (!Cmd || (Cmd->Type == C_FOR) || (Cmd->Type == C_IF) || ((Cmd->Type != C_COMMAND) && (Cmd->Type != C_REM))) { - // FIXME: Localize - ConErrPrintf(_T("%s was unexpected.\n"), first); + ConErrResPrintf(STRING_ERROR_UNEXPECTED, first); #ifdef MSCMD_CALL_QUIRKS if (first != param) @@ -198,8 +197,7 @@ INT cmd_call(LPTSTR param) /* A batch context must be present */ if (!bc) { - // FIXME: Localize - ConErrPuts(_T("Invalid attempt to call batch label outside of batch script.\n")); + ConErrResPuts(STRING_ERROR_CALL_BAD_LABEL); FreeCommand(Cmd); return (nErrorLevel = 1); } diff --git a/base/shell/cmd/ctty.c b/base/shell/cmd/ctty.c index d282900cfc2..cfe9e4129d8 100644 --- a/base/shell/cmd/ctty.c +++ b/base/shell/cmd/ctty.c @@ -285,8 +285,7 @@ RetryOpenConsole: } else { - // FIXME: Localize! - ConOutPrintf(L"Invalid device '%s'\n", param); + ConOutResPrintf(STRING_ERROR_INVALID_DEVICE, param); return 1; } diff --git a/base/shell/cmd/lang/cs-CZ.rc b/base/shell/cmd/lang/cs-CZ.rc index c9f7bd2994c..13c907865c1 100644 --- a/base/shell/cmd/lang/cs-CZ.rc +++ b/base/shell/cmd/lang/cs-CZ.rc @@ -496,6 +496,13 @@ title new title\n" STRING_ERROR_CANNOTPIPE "Chyba! Nelze vytvořit rouru! Nelze vytvořit dočasný soubor!\n" STRING_ERROR_D_PAUSEMSG "Pokračujte stisknutím libovolné klávesy . . . " STRING_ERROR_DRIVER_NOT_READY "Jednotka není připravena" + STRING_ERROR_INVALID_NUMBER1 "Invalid number. Numeric constants are either decimal (42), hexadecimal (0x2A), or octal (052).\n" + STRING_ERROR_INVALID_NUMBER2 "Invalid number. Numbers are limited to 32-bits of precision.\n" + STRING_ERROR_DIVISION_BY_ZERO "Division by zero error.\n" + STRING_ERROR_INVALID_DEVICE L"Invalid device '%s'\n" + STRING_ERROR_CALL_BAD_LABEL "Invalid attempt to call batch label outside of batch script.\n" + STRING_ERROR_UNEXPECTED "%s was unexpected.\n" + STRING_ERROR_WHILE_PROCESSING "Error occurred while processing: %s.\n" STRING_SET_ENV_ERROR "Environment variable '%s' is not defined\n" STRING_CMD_INFOLINE " ReactOS Příkazový řádek Napsání HELP = Nápověda " STRING_CMD_COPYRIGHT "(C) Copyright 1996-%s ReactOS Team.\n" diff --git a/base/shell/cmd/lang/de-DE.rc b/base/shell/cmd/lang/de-DE.rc index 333a11a9681..91f05c57c5c 100644 --- a/base/shell/cmd/lang/de-DE.rc +++ b/base/shell/cmd/lang/de-DE.rc @@ -491,6 +491,13 @@ Titel neuer Titel" STRING_ERROR_CANNOTPIPE "Fehler: Pipen nicht möglich! Temporäre Datei kann nicht geöffnet werden!\n" STRING_ERROR_D_PAUSEMSG "Drücken Sie eine beliebige Taste . . . " STRING_ERROR_DRIVER_NOT_READY "Laufwerk ist nicht bereit" + STRING_ERROR_INVALID_NUMBER1 "Invalid number. Numeric constants are either decimal (42), hexadecimal (0x2A), or octal (052).\n" + STRING_ERROR_INVALID_NUMBER2 "Invalid number. Numbers are limited to 32-bits of precision.\n" + STRING_ERROR_DIVISION_BY_ZERO "Division by zero error.\n" + STRING_ERROR_INVALID_DEVICE L"Invalid device '%s'\n" + STRING_ERROR_CALL_BAD_LABEL "Invalid attempt to call batch label outside of batch script.\n" + STRING_ERROR_UNEXPECTED "%s was unexpected.\n" + STRING_ERROR_WHILE_PROCESSING "Error occurred while processing: %s.\n" STRING_SET_ENV_ERROR "Environment variable '%s' is not defined\n" STRING_CMD_INFOLINE " ReactOS Eingabeaufforderung HELP eingeben = Hilfe " STRING_CMD_COPYRIGHT "(C) Copyright 1996-%s ReactOS Team.\n" diff --git a/base/shell/cmd/lang/el-GR.rc b/base/shell/cmd/lang/el-GR.rc index 52837f1fb7c..b9c01c700fd 100644 --- a/base/shell/cmd/lang/el-GR.rc +++ b/base/shell/cmd/lang/el-GR.rc @@ -495,6 +495,13 @@ title new title\n" STRING_ERROR_CANNOTPIPE "Σφάλμα! Cannot pipe! Cannot open temporary file!\n" STRING_ERROR_D_PAUSEMSG "Πατήστε οποιοδήποτε πλήκτρο για συνέχεια . . . " STRING_ERROR_DRIVER_NOT_READY "Ο δίσκος δεν είναι έτοιμος" + STRING_ERROR_INVALID_NUMBER1 "Invalid number. Numeric constants are either decimal (42), hexadecimal (0x2A), or octal (052).\n" + STRING_ERROR_INVALID_NUMBER2 "Invalid number. Numbers are limited to 32-bits of precision.\n" + STRING_ERROR_DIVISION_BY_ZERO "Division by zero error.\n" + STRING_ERROR_INVALID_DEVICE L"Invalid device '%s'\n" + STRING_ERROR_CALL_BAD_LABEL "Invalid attempt to call batch label outside of batch script.\n" + STRING_ERROR_UNEXPECTED "%s was unexpected.\n" + STRING_ERROR_WHILE_PROCESSING "Error occurred while processing: %s.\n" STRING_SET_ENV_ERROR "Environment variable '%s' is not defined\n" STRING_CMD_INFOLINE " ReactOS Command Prompt Type HELP = Help " STRING_CMD_COPYRIGHT "(C) Copyright 1996-%s ReactOS Team.\n" diff --git a/base/shell/cmd/lang/en-US.rc b/base/shell/cmd/lang/en-US.rc index dee65da16f2..fdd3202a769 100644 --- a/base/shell/cmd/lang/en-US.rc +++ b/base/shell/cmd/lang/en-US.rc @@ -491,6 +491,13 @@ title new title\n" STRING_ERROR_CANNOTPIPE "Error! Cannot pipe! Cannot open temporary file!\n" STRING_ERROR_D_PAUSEMSG "Press any key to continue . . . " STRING_ERROR_DRIVER_NOT_READY "Drive not ready" + STRING_ERROR_INVALID_NUMBER1 "Invalid number. Numeric constants are either decimal (42), hexadecimal (0x2A), or octal (052).\n" + STRING_ERROR_INVALID_NUMBER2 "Invalid number. Numbers are limited to 32-bits of precision.\n" + STRING_ERROR_DIVISION_BY_ZERO "Division by zero error.\n" + STRING_ERROR_INVALID_DEVICE L"Invalid device '%s'\n" + STRING_ERROR_CALL_BAD_LABEL "Invalid attempt to call batch label outside of batch script.\n" + STRING_ERROR_UNEXPECTED "%s was unexpected.\n" + STRING_ERROR_WHILE_PROCESSING "Error occurred while processing: %s.\n" STRING_SET_ENV_ERROR "Environment variable '%s' is not defined\n" STRING_CMD_INFOLINE " ReactOS Command Prompt Type HELP = Help " STRING_CMD_COPYRIGHT "(C) Copyright 1996-%s ReactOS Team.\n" diff --git a/base/shell/cmd/lang/es-ES.rc b/base/shell/cmd/lang/es-ES.rc index 95546b78c6e..baecfd6ac1d 100644 --- a/base/shell/cmd/lang/es-ES.rc +++ b/base/shell/cmd/lang/es-ES.rc @@ -498,6 +498,13 @@ title Nuevo título\n" STRING_ERROR_CANNOTPIPE "¡Error! ¡No se puede apilar! ¡No se puede abrir el archivo temporal!\n" STRING_ERROR_D_PAUSEMSG "Pulse una tecla para continuar ... " STRING_ERROR_DRIVER_NOT_READY "La unidad no está lista" + STRING_ERROR_INVALID_NUMBER1 "Invalid number. Numeric constants are either decimal (42), hexadecimal (0x2A), or octal (052).\n" + STRING_ERROR_INVALID_NUMBER2 "Invalid number. Numbers are limited to 32-bits of precision.\n" + STRING_ERROR_DIVISION_BY_ZERO "Division by zero error.\n" + STRING_ERROR_INVALID_DEVICE L"Invalid device '%s'\n" + STRING_ERROR_CALL_BAD_LABEL "Invalid attempt to call batch label outside of batch script.\n" + STRING_ERROR_UNEXPECTED "%s was unexpected.\n" + STRING_ERROR_WHILE_PROCESSING "Error occurred while processing: %s.\n" STRING_SET_ENV_ERROR "Environment variable '%s' is not defined\n" STRING_CMD_INFOLINE " Consola de comandos de ReactOS Escribe HELP para ver la ayuda " STRING_CMD_COPYRIGHT "(C) Copyright 1996-%s ReactOS Team.\n" diff --git a/base/shell/cmd/lang/fr-FR.rc b/base/shell/cmd/lang/fr-FR.rc index bca7a0889be..304a5a9f4c6 100644 --- a/base/shell/cmd/lang/fr-FR.rc +++ b/base/shell/cmd/lang/fr-FR.rc @@ -508,6 +508,13 @@ titre titre de la fenêtre" STRING_ERROR_CANNOTPIPE "Erreur ! Impossible de chaîner ! Échec à l'ouverture du fichier temporaire!\n" STRING_ERROR_D_PAUSEMSG "Appuyez sur une touche pour continuer . . . " STRING_ERROR_DRIVER_NOT_READY "Lecteur non prêt" + STRING_ERROR_INVALID_NUMBER1 "Invalid number. Numeric constants are either decimal (42), hexadecimal (0x2A), or octal (052).\n" + STRING_ERROR_INVALID_NUMBER2 "Invalid number. Numbers are limited to 32-bits of precision.\n" + STRING_ERROR_DIVISION_BY_ZERO "Division by zero error.\n" + STRING_ERROR_INVALID_DEVICE L"Invalid device '%s'\n" + STRING_ERROR_CALL_BAD_LABEL "Invalid attempt to call batch label outside of batch script.\n" + STRING_ERROR_UNEXPECTED "%s was unexpected.\n" + STRING_ERROR_WHILE_PROCESSING "Error occurred while processing: %s.\n" STRING_SET_ENV_ERROR "Variable d'environnement '%s' non définie\n" STRING_CMD_INFOLINE " ReactOS Command Prompt Type HELP = Help " STRING_CMD_COPYRIGHT "(C) Copyright 1996-%s ReactOS Team.\n" diff --git a/base/shell/cmd/lang/hu-HU.rc b/base/shell/cmd/lang/hu-HU.rc index c8190db99e8..3a06930fc89 100644 --- a/base/shell/cmd/lang/hu-HU.rc +++ b/base/shell/cmd/lang/hu-HU.rc @@ -485,6 +485,13 @@ title új cím\n" STRING_ERROR_CANNOTPIPE "Hiba! Nem sikerült csővezetéket létrehozni! Nem lehet megnyitni az átmeneti fájlt!\n" STRING_ERROR_D_PAUSEMSG "A folytatáshoz nyomjon meg egy billentyűt . . . " STRING_ERROR_DRIVER_NOT_READY "A meghajtó nem áll készen" + STRING_ERROR_INVALID_NUMBER1 "Invalid number. Numeric constants are either decimal (42), hexadecimal (0x2A), or octal (052).\n" + STRING_ERROR_INVALID_NUMBER2 "Invalid number. Numbers are limited to 32-bits of precision.\n" + STRING_ERROR_DIVISION_BY_ZERO "Division by zero error.\n" + STRING_ERROR_INVALID_DEVICE L"Invalid device '%s'\n" + STRING_ERROR_CALL_BAD_LABEL "Invalid attempt to call batch label outside of batch script.\n" + STRING_ERROR_UNEXPECTED "%s was unexpected.\n" + STRING_ERROR_WHILE_PROCESSING "Error occurred while processing: %s.\n" STRING_SET_ENV_ERROR "A(z) '%s' környezeti változó nincs definiálva\n" STRING_CMD_INFOLINE " ReactOS Parancssor HELP parancs = Súgó " STRING_CMD_COPYRIGHT "(C) Copyright 1996-%s ReactOS Team.\n" diff --git a/base/shell/cmd/lang/id-ID.rc b/base/shell/cmd/lang/id-ID.rc index 5a40d420875..f3b9de3e040 100644 --- a/base/shell/cmd/lang/id-ID.rc +++ b/base/shell/cmd/lang/id-ID.rc @@ -490,6 +490,13 @@ title judul baru\n" STRING_ERROR_CANNOTPIPE "Salah! Tidak bisa melakukan pipe! Tidak bisa membuka file temporal!\n" STRING_ERROR_D_PAUSEMSG "Tekan tombol untuk melanjutkan . . . " STRING_ERROR_DRIVER_NOT_READY "Drive tidak siap" + STRING_ERROR_INVALID_NUMBER1 "Invalid number. Numeric constants are either decimal (42), hexadecimal (0x2A), or octal (052).\n" + STRING_ERROR_INVALID_NUMBER2 "Invalid number. Numbers are limited to 32-bits of precision.\n" + STRING_ERROR_DIVISION_BY_ZERO "Division by zero error.\n" + STRING_ERROR_INVALID_DEVICE L"Invalid device '%s'\n" + STRING_ERROR_CALL_BAD_LABEL "Invalid attempt to call batch label outside of batch script.\n" + STRING_ERROR_UNEXPECTED "%s was unexpected.\n" + STRING_ERROR_WHILE_PROCESSING "Error occurred while processing: %s.\n" STRING_SET_ENV_ERROR "Variabel lingkungan '%s' tidak terdefinisi\n" STRING_CMD_INFOLINE " ReactOS Command Prompt Type HELP = Help " STRING_CMD_COPYRIGHT "(C) Copyright 1996-%s ReactOS Team.\n" diff --git a/base/shell/cmd/lang/it-IT.rc b/base/shell/cmd/lang/it-IT.rc index b77f99cedcc..83bf625fa35 100644 --- a/base/shell/cmd/lang/it-IT.rc +++ b/base/shell/cmd/lang/it-IT.rc @@ -500,6 +500,13 @@ titolo il nuovo titolo\n" STRING_ERROR_CANNOTPIPE "Errore! Impossibile ridirigere! Impossibile aprire un file temporaneo!\n" STRING_ERROR_D_PAUSEMSG "Premi un tasto per continuare . . . " STRING_ERROR_DRIVER_NOT_READY "Disco non pronto" + STRING_ERROR_INVALID_NUMBER1 "Invalid number. Numeric constants are either decimal (42), hexadecimal (0x2A), or octal (052).\n" + STRING_ERROR_INVALID_NUMBER2 "Invalid number. Numbers are limited to 32-bits of precision.\n" + STRING_ERROR_DIVISION_BY_ZERO "Division by zero error.\n" + STRING_ERROR_INVALID_DEVICE L"Invalid device '%s'\n" + STRING_ERROR_CALL_BAD_LABEL "Invalid attempt to call batch label outside of batch script.\n" + STRING_ERROR_UNEXPECTED "%s was unexpected.\n" + STRING_ERROR_WHILE_PROCESSING "Error occurred while processing: %s.\n" STRING_SET_ENV_ERROR "Environment variable '%s' is not defined\n" STRING_CMD_INFOLINE " ReactOS Command Prompt Type HELP = Help " STRING_CMD_COPYRIGHT "(C) Copyright 1996-%s ReactOS Team.\n" diff --git a/base/shell/cmd/lang/ja-JP.rc b/base/shell/cmd/lang/ja-JP.rc index 5f49fca4930..2ed82d7a939 100644 --- a/base/shell/cmd/lang/ja-JP.rc +++ b/base/shell/cmd/lang/ja-JP.rc @@ -498,6 +498,13 @@ RESTORE ウィンドウを元のサイズに戻します。\n\ STRING_ERROR_CANNOTPIPE "エラー! パイプできません! 一時ファイルを開けません!\n" STRING_ERROR_D_PAUSEMSG "続行するには何かキーを押してください . . . " STRING_ERROR_DRIVER_NOT_READY "ドライブの準備ができていません。" + STRING_ERROR_INVALID_NUMBER1 "Invalid number. Numeric constants are either decimal (42), hexadecimal (0x2A), or octal (052).\n" + STRING_ERROR_INVALID_NUMBER2 "Invalid number. Numbers are limited to 32-bits of precision.\n" + STRING_ERROR_DIVISION_BY_ZERO "Division by zero error.\n" + STRING_ERROR_INVALID_DEVICE L"Invalid device '%s'\n" + STRING_ERROR_CALL_BAD_LABEL "Invalid attempt to call batch label outside of batch script.\n" + STRING_ERROR_UNEXPECTED "%s was unexpected.\n" + STRING_ERROR_WHILE_PROCESSING "Error occurred while processing: %s.\n" STRING_SET_ENV_ERROR "Environment variable '%s' is not defined\n" STRING_CMD_INFOLINE " ReactOS Command Prompt Type HELP = Help " STRING_CMD_COPYRIGHT "(C) Copyright 1996-%s ReactOS Team.\n" diff --git a/base/shell/cmd/lang/no-NO.rc b/base/shell/cmd/lang/no-NO.rc index 902fee5a81e..8e7d7eddbc1 100644 --- a/base/shell/cmd/lang/no-NO.rc +++ b/base/shell/cmd/lang/no-NO.rc @@ -489,6 +489,13 @@ tittel ny tittel\n" STRING_ERROR_CANNOTPIPE "Feil! Kan ikke bruke datakanal! Kan ikke åpne midlertidig fil!\n" STRING_ERROR_D_PAUSEMSG "Trykk en tast for å fortsette . . . " STRING_ERROR_DRIVER_NOT_READY "Stasjonen er ikke klar" + STRING_ERROR_INVALID_NUMBER1 "Invalid number. Numeric constants are either decimal (42), hexadecimal (0x2A), or octal (052).\n" + STRING_ERROR_INVALID_NUMBER2 "Invalid number. Numbers are limited to 32-bits of precision.\n" + STRING_ERROR_DIVISION_BY_ZERO "Division by zero error.\n" + STRING_ERROR_INVALID_DEVICE L"Invalid device '%s'\n" + STRING_ERROR_CALL_BAD_LABEL "Invalid attempt to call batch label outside of batch script.\n" + STRING_ERROR_UNEXPECTED "%s was unexpected.\n" + STRING_ERROR_WHILE_PROCESSING "Error occurred while processing: %s.\n" STRING_SET_ENV_ERROR "Environment variable '%s' is not defined\n" STRING_CMD_INFOLINE " ReactOS Command Prompt Type HELP = Help " STRING_CMD_COPYRIGHT "(C) Copyright 1996-%s ReactOS Team.\n" diff --git a/base/shell/cmd/lang/pl-PL.rc b/base/shell/cmd/lang/pl-PL.rc index a3d79d450d0..d9ac06797d1 100644 --- a/base/shell/cmd/lang/pl-PL.rc +++ b/base/shell/cmd/lang/pl-PL.rc @@ -497,6 +497,13 @@ title nowy tytuł okna\n" STRING_ERROR_CANNOTPIPE "Błąd potoków! Nie można otworzyć pliku tymczasowego.\n" STRING_ERROR_D_PAUSEMSG "Naciśnij dowolny klawisz, aby kontynuować . . . " STRING_ERROR_DRIVER_NOT_READY "Napęd nie jest gotowy" + STRING_ERROR_INVALID_NUMBER1 "Invalid number. Numeric constants are either decimal (42), hexadecimal (0x2A), or octal (052).\n" + STRING_ERROR_INVALID_NUMBER2 "Invalid number. Numbers are limited to 32-bits of precision.\n" + STRING_ERROR_DIVISION_BY_ZERO "Division by zero error.\n" + STRING_ERROR_INVALID_DEVICE L"Invalid device '%s'\n" + STRING_ERROR_CALL_BAD_LABEL "Invalid attempt to call batch label outside of batch script.\n" + STRING_ERROR_UNEXPECTED "%s was unexpected.\n" + STRING_ERROR_WHILE_PROCESSING "Error occurred while processing: %s.\n" STRING_SET_ENV_ERROR "Zmienna środowiskowa '%s' nie jest zdefiniowana\n" STRING_CMD_INFOLINE " Wiersz polecenia ReactOS Type HELP = Help " STRING_CMD_COPYRIGHT "(C) Copyright 1996-%s ReactOS Team.\n" diff --git a/base/shell/cmd/lang/pt-BR.rc b/base/shell/cmd/lang/pt-BR.rc index 4b26977b826..0f3cc301754 100644 --- a/base/shell/cmd/lang/pt-BR.rc +++ b/base/shell/cmd/lang/pt-BR.rc @@ -519,6 +519,13 @@ título Novo título\n" STRING_ERROR_CANNOTPIPE "Erro! Não é possível enviar! Não é possível abrir o arquivo temporário!\n" STRING_ERROR_D_PAUSEMSG "Pressione qualquer tecla para continuar..." STRING_ERROR_DRIVER_NOT_READY "A unidade não está pronta" + STRING_ERROR_INVALID_NUMBER1 "Invalid number. Numeric constants are either decimal (42), hexadecimal (0x2A), or octal (052).\n" + STRING_ERROR_INVALID_NUMBER2 "Invalid number. Numbers are limited to 32-bits of precision.\n" + STRING_ERROR_DIVISION_BY_ZERO "Division by zero error.\n" + STRING_ERROR_INVALID_DEVICE L"Invalid device '%s'\n" + STRING_ERROR_CALL_BAD_LABEL "Invalid attempt to call batch label outside of batch script.\n" + STRING_ERROR_UNEXPECTED "%s was unexpected.\n" + STRING_ERROR_WHILE_PROCESSING "Error occurred while processing: %s.\n" STRING_SET_ENV_ERROR "Variável de ambiente '%s' não está definida\n" STRING_CMD_INFOLINE "Prompt de comandos do ReactOS \tHELP = Ajuda" STRING_CMD_COPYRIGHT "(C) Copyright 1996-%s ReactOS Team.\n" diff --git a/base/shell/cmd/lang/pt-PT.rc b/base/shell/cmd/lang/pt-PT.rc index 9540563f8fb..c5a1f6da080 100644 --- a/base/shell/cmd/lang/pt-PT.rc +++ b/base/shell/cmd/lang/pt-PT.rc @@ -512,6 +512,13 @@ título Novo título\n" STRING_ERROR_CANNOTPIPE "Erro! Não é possível enviar! Não é possível abrir o ficheiro temporário!\n" STRING_ERROR_D_PAUSEMSG "Pressione qualquer tecla para continuar..." STRING_ERROR_DRIVER_NOT_READY "A unidade não está pronta" + STRING_ERROR_INVALID_NUMBER1 "Invalid number. Numeric constants are either decimal (42), hexadecimal (0x2A), or octal (052).\n" + STRING_ERROR_INVALID_NUMBER2 "Invalid number. Numbers are limited to 32-bits of precision.\n" + STRING_ERROR_DIVISION_BY_ZERO "Division by zero error.\n" + STRING_ERROR_INVALID_DEVICE L"Invalid device '%s'\n" + STRING_ERROR_CALL_BAD_LABEL "Invalid attempt to call batch label outside of batch script.\n" + STRING_ERROR_UNEXPECTED "%s was unexpected.\n" + STRING_ERROR_WHILE_PROCESSING "Error occurred while processing: %s.\n" STRING_SET_ENV_ERROR "Variável de ambiente '%s' não está definida\n" STRING_CMD_INFOLINE "Tipo de prompt de comando do ReactOS HELP = Ajuda" STRING_CMD_COPYRIGHT "(C) Copyright 1996-%s ReactOS Team.\n" diff --git a/base/shell/cmd/lang/ro-RO.rc b/base/shell/cmd/lang/ro-RO.rc index 1ae279476a6..e1084a0ee6e 100644 --- a/base/shell/cmd/lang/ro-RO.rc +++ b/base/shell/cmd/lang/ro-RO.rc @@ -531,6 +531,13 @@ titlu Noul titlu.\n" STRING_ERROR_CANNOTPIPE "Eroare! Nu se poate înlănțui! Nu se poate deschide fișierul temporar!\n" STRING_ERROR_D_PAUSEMSG "Tastați pentru a continua... " STRING_ERROR_DRIVER_NOT_READY "Discul de stocare nu e utilizabil" + STRING_ERROR_INVALID_NUMBER1 "Invalid number. Numeric constants are either decimal (42), hexadecimal (0x2A), or octal (052).\n" + STRING_ERROR_INVALID_NUMBER2 "Invalid number. Numbers are limited to 32-bits of precision.\n" + STRING_ERROR_DIVISION_BY_ZERO "Division by zero error.\n" + STRING_ERROR_INVALID_DEVICE L"Invalid device '%s'\n" + STRING_ERROR_CALL_BAD_LABEL "Invalid attempt to call batch label outside of batch script.\n" + STRING_ERROR_UNEXPECTED "%s was unexpected.\n" + STRING_ERROR_WHILE_PROCESSING "Error occurred while processing: %s.\n" STRING_SET_ENV_ERROR "Variabila de mediu '%s' nu este definită\n" STRING_CMD_INFOLINE " Interpretorul de comenzi ReactOS Tastați HELP = Ajutor " STRING_CMD_COPYRIGHT "(C) Copyright 1996-%s ReactOS Team.\n" diff --git a/base/shell/cmd/lang/ru-RU.rc b/base/shell/cmd/lang/ru-RU.rc index 363a472eadc..1d6f79d2ec5 100644 --- a/base/shell/cmd/lang/ru-RU.rc +++ b/base/shell/cmd/lang/ru-RU.rc @@ -508,6 +508,13 @@ RESTORE восстанавливает окно\n\ STRING_ERROR_CANNOTPIPE "Ошибка! Невозможно использовать pipe! Невозможно создать временный файл!\n" STRING_ERROR_D_PAUSEMSG "Для продолжения нажмите любую клавишу . . . " STRING_ERROR_DRIVER_NOT_READY "Устройство не готово" + STRING_ERROR_INVALID_NUMBER1 "Invalid number. Numeric constants are either decimal (42), hexadecimal (0x2A), or octal (052).\n" + STRING_ERROR_INVALID_NUMBER2 "Invalid number. Numbers are limited to 32-bits of precision.\n" + STRING_ERROR_DIVISION_BY_ZERO "Division by zero error.\n" + STRING_ERROR_INVALID_DEVICE L"Invalid device '%s'\n" + STRING_ERROR_CALL_BAD_LABEL "Invalid attempt to call batch label outside of batch script.\n" + STRING_ERROR_UNEXPECTED "%s was unexpected.\n" + STRING_ERROR_WHILE_PROCESSING "Error occurred while processing: %s.\n" STRING_SET_ENV_ERROR "Переменная окружения '%s' не определена\n" STRING_CMD_INFOLINE " ReactOS Командная строка Введите HELP для Справки " STRING_CMD_COPYRIGHT "(C) Copyright 1996-%s ReactOS Team.\n" diff --git a/base/shell/cmd/lang/sk-SK.rc b/base/shell/cmd/lang/sk-SK.rc index 05dfe693e76..61d748f797f 100644 --- a/base/shell/cmd/lang/sk-SK.rc +++ b/base/shell/cmd/lang/sk-SK.rc @@ -497,6 +497,13 @@ title new title\n" STRING_ERROR_CANNOTPIPE "Chyba! Cannot pipe! Cannot open temporary file!\n" STRING_ERROR_D_PAUSEMSG "Pokračujte stlačením ľubovoľného klávesu ... " STRING_ERROR_DRIVER_NOT_READY "Jednotka nie je pripravená" + STRING_ERROR_INVALID_NUMBER1 "Invalid number. Numeric constants are either decimal (42), hexadecimal (0x2A), or octal (052).\n" + STRING_ERROR_INVALID_NUMBER2 "Invalid number. Numbers are limited to 32-bits of precision.\n" + STRING_ERROR_DIVISION_BY_ZERO "Division by zero error.\n" + STRING_ERROR_INVALID_DEVICE L"Invalid device '%s'\n" + STRING_ERROR_CALL_BAD_LABEL "Invalid attempt to call batch label outside of batch script.\n" + STRING_ERROR_UNEXPECTED "%s was unexpected.\n" + STRING_ERROR_WHILE_PROCESSING "Error occurred while processing: %s.\n" STRING_SET_ENV_ERROR "Environment variable '%s' is not defined\n" STRING_CMD_INFOLINE " ReactOS Command Prompt Type HELP = Help " STRING_CMD_COPYRIGHT "(C) Copyright 1996-%s ReactOS Team.\n" diff --git a/base/shell/cmd/lang/sq-AL.rc b/base/shell/cmd/lang/sq-AL.rc index 01c7c37c8c9..acdee2d0805 100644 --- a/base/shell/cmd/lang/sq-AL.rc +++ b/base/shell/cmd/lang/sq-AL.rc @@ -495,6 +495,13 @@ title titull i ri\n" STRING_ERROR_CANNOTPIPE "Error! Nuk mund të pipoj! Nuk mund të hape dokumentet e perkohshem!\n" STRING_ERROR_D_PAUSEMSG "Shtypni një buton për të vazhduar . . . " STRING_ERROR_DRIVER_NOT_READY "Drive nuk është gati" + STRING_ERROR_INVALID_NUMBER1 "Invalid number. Numeric constants are either decimal (42), hexadecimal (0x2A), or octal (052).\n" + STRING_ERROR_INVALID_NUMBER2 "Invalid number. Numbers are limited to 32-bits of precision.\n" + STRING_ERROR_DIVISION_BY_ZERO "Division by zero error.\n" + STRING_ERROR_INVALID_DEVICE L"Invalid device '%s'\n" + STRING_ERROR_CALL_BAD_LABEL "Invalid attempt to call batch label outside of batch script.\n" + STRING_ERROR_UNEXPECTED "%s was unexpected.\n" + STRING_ERROR_WHILE_PROCESSING "Error occurred while processing: %s.\n" STRING_SET_ENV_ERROR "Environment variable '%s' is not defined\n" STRING_CMD_INFOLINE " ReactOS Command Prompt Type HELP = Help " STRING_CMD_COPYRIGHT "(C) Copyright 1996-%s ReactOS Team.\n" diff --git a/base/shell/cmd/lang/sv-SE.rc b/base/shell/cmd/lang/sv-SE.rc index 92c4a6d2d0c..700e1b22953 100644 --- a/base/shell/cmd/lang/sv-SE.rc +++ b/base/shell/cmd/lang/sv-SE.rc @@ -489,6 +489,13 @@ tittel ny tittel\n" STRING_ERROR_CANNOTPIPE "Fel! Kan inte bruke datakanal! Kan inte åpne midlertidig fil!\n" STRING_ERROR_D_PAUSEMSG "Tryck på valfri tangent för att fortsätta . . . " STRING_ERROR_DRIVER_NOT_READY "enheten är inte klar" + STRING_ERROR_INVALID_NUMBER1 "Invalid number. Numeric constants are either decimal (42), hexadecimal (0x2A), or octal (052).\n" + STRING_ERROR_INVALID_NUMBER2 "Invalid number. Numbers are limited to 32-bits of precision.\n" + STRING_ERROR_DIVISION_BY_ZERO "Division by zero error.\n" + STRING_ERROR_INVALID_DEVICE L"Invalid device '%s'\n" + STRING_ERROR_CALL_BAD_LABEL "Invalid attempt to call batch label outside of batch script.\n" + STRING_ERROR_UNEXPECTED "%s was unexpected.\n" + STRING_ERROR_WHILE_PROCESSING "Error occurred while processing: %s.\n" STRING_SET_ENV_ERROR "Environment variable '%s' is not defined\n" STRING_CMD_INFOLINE " ReactOS Command Prompt Type HELP = Help " STRING_CMD_COPYRIGHT "(C) Copyright 1996-%s ReactOS Team.\n" diff --git a/base/shell/cmd/lang/tr-TR.rc b/base/shell/cmd/lang/tr-TR.rc index 106e8ee13b0..404f47d9a77 100644 --- a/base/shell/cmd/lang/tr-TR.rc +++ b/base/shell/cmd/lang/tr-TR.rc @@ -487,6 +487,13 @@ başlık pencere için yeni başlık\n" STRING_ERROR_CANNOTPIPE "Hata! Borulanamadı! Geçici dosya açılamıyor!\n" STRING_ERROR_D_PAUSEMSG "Devam etmek için herhangi bir tuşa basın . . . " STRING_ERROR_DRIVER_NOT_READY "Sürücü hazır değil" + STRING_ERROR_INVALID_NUMBER1 "Invalid number. Numeric constants are either decimal (42), hexadecimal (0x2A), or octal (052).\n" + STRING_ERROR_INVALID_NUMBER2 "Invalid number. Numbers are limited to 32-bits of precision.\n" + STRING_ERROR_DIVISION_BY_ZERO "Division by zero error.\n" + STRING_ERROR_INVALID_DEVICE L"Invalid device '%s'\n" + STRING_ERROR_CALL_BAD_LABEL "Invalid attempt to call batch label outside of batch script.\n" + STRING_ERROR_UNEXPECTED "%s was unexpected.\n" + STRING_ERROR_WHILE_PROCESSING "Error occurred while processing: %s.\n" STRING_SET_ENV_ERROR "'%s' çevresel değişkeni tanımlanmadı.\n" STRING_CMD_INFOLINE " ReactOS Komut Satırı Yardım için, HELP yazın" STRING_CMD_COPYRIGHT "(C) Copyright 1996-%s ReactOS Team.\n" diff --git a/base/shell/cmd/lang/uk-UA.rc b/base/shell/cmd/lang/uk-UA.rc index deb3304bd1d..4307bc29a1d 100644 --- a/base/shell/cmd/lang/uk-UA.rc +++ b/base/shell/cmd/lang/uk-UA.rc @@ -502,6 +502,13 @@ title новий заголовок\n" STRING_ERROR_CANNOTPIPE "Помилка! Неможливо використати pipe! Неможливо вiдкрити тимчасовий файл!\n" STRING_ERROR_D_PAUSEMSG "Натиснiть будь-яку клавiшу для продовження . . . " STRING_ERROR_DRIVER_NOT_READY "Пристрій не готовий" + STRING_ERROR_INVALID_NUMBER1 "Invalid number. Numeric constants are either decimal (42), hexadecimal (0x2A), or octal (052).\n" + STRING_ERROR_INVALID_NUMBER2 "Invalid number. Numbers are limited to 32-bits of precision.\n" + STRING_ERROR_DIVISION_BY_ZERO "Division by zero error.\n" + STRING_ERROR_INVALID_DEVICE L"Invalid device '%s'\n" + STRING_ERROR_CALL_BAD_LABEL "Invalid attempt to call batch label outside of batch script.\n" + STRING_ERROR_UNEXPECTED "%s was unexpected.\n" + STRING_ERROR_WHILE_PROCESSING "Error occurred while processing: %s.\n" STRING_SET_ENV_ERROR "Environment variable '%s' is not defined\n" STRING_CMD_INFOLINE " Командний рядок ReactOS Введіть HELP = Допомога " STRING_CMD_COPYRIGHT "(C) Copyright 1996-%s ReactOS Team.\n" diff --git a/base/shell/cmd/lang/zh-CN.rc b/base/shell/cmd/lang/zh-CN.rc index 5cf10e5fe99..cea368ab681 100644 --- a/base/shell/cmd/lang/zh-CN.rc +++ b/base/shell/cmd/lang/zh-CN.rc @@ -471,6 +471,13 @@ RESTORE 恢复窗口\n\ STRING_ERROR_CANNOTPIPE "错误!无法创建管道!不能打开临时文件!\n" STRING_ERROR_D_PAUSEMSG "按任意键继续... " STRING_ERROR_DRIVER_NOT_READY "驱动器未就绪" + STRING_ERROR_INVALID_NUMBER1 "Invalid number. Numeric constants are either decimal (42), hexadecimal (0x2A), or octal (052).\n" + STRING_ERROR_INVALID_NUMBER2 "Invalid number. Numbers are limited to 32-bits of precision.\n" + STRING_ERROR_DIVISION_BY_ZERO "Division by zero error.\n" + STRING_ERROR_INVALID_DEVICE L"Invalid device '%s'\n" + STRING_ERROR_CALL_BAD_LABEL "Invalid attempt to call batch label outside of batch script.\n" + STRING_ERROR_UNEXPECTED "%s was unexpected.\n" + STRING_ERROR_WHILE_PROCESSING "Error occurred while processing: %s.\n" STRING_SET_ENV_ERROR "环境变量“%s”未定义\n" STRING_CMD_INFOLINE " ReactOS 命令行解释器 输入 HELP = 帮助 " STRING_CMD_COPYRIGHT "(C) Copyright 1996-%s ReactOS Team.\n" diff --git a/base/shell/cmd/lang/zh-TW.rc b/base/shell/cmd/lang/zh-TW.rc index 23b2f62c87c..3a28cf73fdd 100644 --- a/base/shell/cmd/lang/zh-TW.rc +++ b/base/shell/cmd/lang/zh-TW.rc @@ -475,6 +475,13 @@ RESTORE 恢復視窗\n\ STRING_ERROR_CANNOTPIPE "錯誤!無法建立管道!不能開啟臨時檔案!\n" STRING_ERROR_D_PAUSEMSG "按任意鍵繼續... " STRING_ERROR_DRIVER_NOT_READY "磁碟機未就緒" + STRING_ERROR_INVALID_NUMBER1 "Invalid number. Numeric constants are either decimal (42), hexadecimal (0x2A), or octal (052).\n" + STRING_ERROR_INVALID_NUMBER2 "Invalid number. Numbers are limited to 32-bits of precision.\n" + STRING_ERROR_DIVISION_BY_ZERO "Division by zero error.\n" + STRING_ERROR_INVALID_DEVICE L"Invalid device '%s'\n" + STRING_ERROR_CALL_BAD_LABEL "Invalid attempt to call batch label outside of batch script.\n" + STRING_ERROR_UNEXPECTED "%s was unexpected.\n" + STRING_ERROR_WHILE_PROCESSING "Error occurred while processing: %s.\n" STRING_SET_ENV_ERROR "環境變數 '%s' 尚未定義\n" STRING_CMD_INFOLINE " ReactOS 命令列直譯器 輸入 HELP = 說明 " STRING_CMD_COPYRIGHT "(C) Copyright 1996-%s ReactOS Team.\n" diff --git a/base/shell/cmd/resource.h b/base/shell/cmd/resource.h index 21330391a7c..cfadbafa4ed 100644 --- a/base/shell/cmd/resource.h +++ b/base/shell/cmd/resource.h @@ -15,6 +15,13 @@ #define STRING_ERROR_CANNOTPIPE 110 #define STRING_ERROR_D_PAUSEMSG 111 #define STRING_ERROR_DRIVER_NOT_READY 112 +#define STRING_ERROR_INVALID_NUMBER1 113 +#define STRING_ERROR_INVALID_NUMBER2 114 +#define STRING_ERROR_DIVISION_BY_ZERO 115 +#define STRING_ERROR_INVALID_DEVICE 116 +#define STRING_ERROR_CALL_BAD_LABEL 117 +#define STRING_ERROR_UNEXPECTED 118 +#define STRING_ERROR_WHILE_PROCESSING 119 #define STRING_CHOICE_OPTION 200 #define STRING_COPY_OPTION 201 diff --git a/base/shell/cmd/set.c b/base/shell/cmd/set.c index 9028a181a96..32ac0a8ed0c 100644 --- a/base/shell/cmd/set.c +++ b/base/shell/cmd/set.c @@ -307,8 +307,7 @@ calc(INT* lval, TCHAR op, INT rval) { if (rval == 0) { - // FIXME: Localize - ConErrPuts(_T("Division by zero error.\n")); + ConErrResPuts(STRING_ERROR_DIVISION_BY_ZERO); nErrorLevel = 0x400023D1; // 1073750993; return FALSE; } @@ -320,8 +319,7 @@ calc(INT* lval, TCHAR op, INT rval) { if (rval == 0) { - // FIXME: Localize - ConErrPuts(_T("Division by zero error.\n")); + ConErrResPuts(STRING_ERROR_DIVISION_BY_ZERO); nErrorLevel = 0x400023D1; // 1073750993; return FALSE; } @@ -383,8 +381,7 @@ seta_unaryTerm(LPCTSTR* p_, INT* result) /* Check for overflow / underflow */ if (errno == ERANGE) { - // FIXME: Localize - ConErrPuts(_T("Invalid number. Numbers are limited to 32-bits of precision.\n")); + ConErrResPuts(STRING_ERROR_INVALID_NUMBER2); nErrorLevel = 0x400023D0; // 1073750992; return FALSE; } @@ -395,8 +392,7 @@ seta_unaryTerm(LPCTSTR* p_, INT* result) */ else if (*p && !_istspace(*p) && __iscsymf(*p)) { - // FIXME: Localize - ConErrPuts(_T("Invalid number. Numeric constants are either decimal (42), hexadecimal (0x2A), or octal (052).\n")); + ConErrResPuts(STRING_ERROR_INVALID_NUMBER1); nErrorLevel = 0x400023CF; // 1073750991; return FALSE; }