diff --git a/src/Record.cpp b/src/Record.cpp index a31b59ecc..1120c7fd8 100644 --- a/src/Record.cpp +++ b/src/Record.cpp @@ -25,12 +25,15 @@ // //////////////////////////////////////////////////////////////////////////////// +#define L10N // Localization complete. + #include #include #include #include #include #include +#include #include #include @@ -94,7 +97,7 @@ void Record::parse (const std::string& input) n.depleted ()) { if (line.length () == 0) - throw std::string ("Empty record in input."); + throw std::string (STRING_RECORD_EMPTY); Nibbler nl (line); Att a; @@ -108,10 +111,10 @@ void Record::parse (const std::string& input) std::string remainder; nl.getUntilEOS (remainder); if (remainder.length ()) - throw std::string ("Unrecognized characters at end of line."); + throw std::string (STRING_RECORD_JUNK_AT_EOL); } else - throw std::string ("Record not recognized as format 4."); + throw std::string (STRING_RECORD_NOT_FF4); } //////////////////////////////////////////////////////////////////////////////// diff --git a/src/en-US.h b/src/en-US.h index b5394470f..f46641ade 100644 --- a/src/en-US.h +++ b/src/en-US.h @@ -124,10 +124,19 @@ // File #define STRING_FILE_PERMS "Task does not have the correct permissions for '{1}'." +// interactive +#define STRING_INTERACTIVE_WIDTH "Context::getWidth: determined width of {1} characters" +#define STRING_INTERACTIVE_HEIGHT "Context::getHeight: determined height of {1} characters" + // Lua #define STRING_LUA_BAD_HOOK_DEF "Malformed hook definition '{1}'." #define STRING_LUA_BAD_EVENT "Unrecognized hook event '{1}'." +// Record +#define STRING_RECORD_EMPTY "Empty record in input." +#define STRING_RECORD_JUNK_AT_EOL "Unrecognized characters at end of line." +#define STRING_RECORD_NOT_FF4 "Record not recognized as format 4." + // 'show' command #define STRING_CMD_SHOW "Shows the entire task configuration variables or the ones containing substring." #define STRING_CMD_SHOW_ARGS "You can only specify 'all' or a search string." diff --git a/src/interactive.cpp b/src/interactive.cpp index 6a6a01582..e6ce1ab00 100644 --- a/src/interactive.cpp +++ b/src/interactive.cpp @@ -61,7 +61,7 @@ int Context::getWidth () terminal_height = buff[0]; terminal_width = buff[1]; - debug (format ("Context::getWidth: determined width of {1} characters", terminal_width)); + debug (format (STRING_INTERACTIVE_WIDTH, terminal_width)); } } @@ -93,7 +93,7 @@ int Context::getHeight () terminal_height = buff[0]; terminal_width = buff[1]; - debug (format ("Context::getHeight: determined height of {1} characters", terminal_height)); + debug (format (STRING_INTERACTIVE_HEIGHT, terminal_height)); } }