From 4b550a7df1e5b66515a03d492c23e39b7b81a637 Mon Sep 17 00:00:00 2001 From: maron2000 <68574602+maron2000@users.noreply.github.com> Date: Sun, 2 Mar 2025 23:59:50 +0900 Subject: [PATCH] Add translations for MODE command --- contrib/translations/en/en_US.lng | 13 +++++++++++++ src/dos/dos_programs.cpp | 11 ++++++++--- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/contrib/translations/en/en_US.lng b/contrib/translations/en/en_US.lng index e450a8611..b55a4c4a6 100644 --- a/contrib/translations/en/en_US.lng +++ b/contrib/translations/en/en_US.lng @@ -4011,4 +4011,17 @@ Cannot mount floppy in hard drive position. . :PROGRAM_ELTORITO_ISOMOUNT El Torito bootable CD: -fs iso mounting not supported +. +:PROGRAM_MODE_STATUS +Status for device CON: +---------------------- +Columns=%d +Lines=%d +. +:PROGRAM_MODE_NOTSUPPORTED + +Code page operation not supported on this device +. +:PROGRAM_MODE_RATE_DELAY +Rate and delay must be specified together . \ No newline at end of file diff --git a/src/dos/dos_programs.cpp b/src/dos/dos_programs.cpp index 709dae474..eaa2fc1b9 100644 --- a/src/dos/dos_programs.cpp +++ b/src/dos/dos_programs.cpp @@ -7272,11 +7272,11 @@ public: void Run(void) override; private: void PrintStatus() { - WriteOut("Status for device CON:\n----------------------\nColumns=%d\nLines=%d\n", COLS, LINES); + WriteOut(MSG_Get("PROGRAM_MODE_STATUS"), COLS, LINES); #if defined(USE_TTF) if(!ttf.inUse) #endif - WriteOut("\nCode page operation not supported on this device\n"); + WriteOut(MSG_Get("PROGRAM_MODE_NOTSUPPORTED")); } int LINES = 25, COLS = 80; }; @@ -7306,7 +7306,7 @@ void MODE::Run(void) { if (cmd->FindStringBegin("lines=",temp_line,false)) lines=atoi(temp_line.c_str()); else lines=LINES; bool optr=cmd->FindStringBegin("rate=", temp_line,true), optd=cmd->FindStringBegin("delay=",temp_line,true), optc=cmd->FindStringBegin("cols=", temp_line,true), optl=cmd->FindStringBegin("lines=",temp_line,true); if ((optr&&!optd)||(optd&&!optr)) { - WriteOut("Rate and delay must be specified together\n"); + WriteOut(MSG_Get("PROGRAM_MODE_RATE_DELAY")); return; } if (cmd->GetCount()>1) goto modeparam; @@ -10160,6 +10160,11 @@ void DOS_SetupPrograms(void) { "\033[34;1mMODE CON COLS=\033[0mc \033[34;1mLINES=\033[0mn :columns and lines, c=80 or 132, n=25, 43, 50, or 60\n" "\033[34;1mMODE CON RATE=\033[0mr \033[34;1mDELAY=\033[0md :typematic rates, r=1-32 (32=fastest), d=1-4 (1=lowest)\n"); MSG_Add("PROGRAM_MODE_INVALID_PARAMETERS","Invalid parameter(s).\n"); + MSG_Add("PROGRAM_MODE_STATUS", + "Status for device CON:\n----------------------\nColumns=%d\nLines=%d\n"); + MSG_Add("PROGRAM_MODE_NOTSUPPORTED","\nCode page operation not supported on this device\n"); + MSG_Add("PROGRAM_MODE_RATE_DELAY","Rate and delay must be specified together\n"); + MSG_Add("PROGRAM_PORT_INVALID_NUMBER","Must specify a port number between 1 and 9.\n"); MSG_Add("PROGRAM_VHDMAKE_WRITERR", "Could not write to new VHD image \"%s\", aborting.\n"); MSG_Add("PROGRAM_VHDMAKE_REMOVEERR", "Could not erase file \"%s\"\n");