- Localized some more.
This commit is contained in:
Paul Beckingham 2011-06-16 00:42:03 -04:00
parent f971fcd110
commit c7bfba103e
3 changed files with 17 additions and 5 deletions

View file

@ -25,12 +25,15 @@
// //
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
#define L10N // Localization complete.
#include <iostream> #include <iostream>
#include <sstream> #include <sstream>
#include <stdlib.h> #include <stdlib.h>
#include <util.h> #include <util.h>
#include <Nibbler.h> #include <Nibbler.h>
#include <Context.h> #include <Context.h>
#include <text.h>
#include <i18n.h> #include <i18n.h>
#include <Record.h> #include <Record.h>
@ -94,7 +97,7 @@ void Record::parse (const std::string& input)
n.depleted ()) n.depleted ())
{ {
if (line.length () == 0) if (line.length () == 0)
throw std::string ("Empty record in input."); throw std::string (STRING_RECORD_EMPTY);
Nibbler nl (line); Nibbler nl (line);
Att a; Att a;
@ -108,10 +111,10 @@ void Record::parse (const std::string& input)
std::string remainder; std::string remainder;
nl.getUntilEOS (remainder); nl.getUntilEOS (remainder);
if (remainder.length ()) if (remainder.length ())
throw std::string ("Unrecognized characters at end of line."); throw std::string (STRING_RECORD_JUNK_AT_EOL);
} }
else else
throw std::string ("Record not recognized as format 4."); throw std::string (STRING_RECORD_NOT_FF4);
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////

View file

@ -124,10 +124,19 @@
// File // File
#define STRING_FILE_PERMS "Task does not have the correct permissions for '{1}'." #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 // Lua
#define STRING_LUA_BAD_HOOK_DEF "Malformed hook definition '{1}'." #define STRING_LUA_BAD_HOOK_DEF "Malformed hook definition '{1}'."
#define STRING_LUA_BAD_EVENT "Unrecognized hook event '{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 // 'show' command
#define STRING_CMD_SHOW "Shows the entire task configuration variables or the ones containing substring." #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." #define STRING_CMD_SHOW_ARGS "You can only specify 'all' or a search string."

View file

@ -61,7 +61,7 @@ int Context::getWidth ()
terminal_height = buff[0]; terminal_height = buff[0];
terminal_width = buff[1]; 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_height = buff[0];
terminal_width = buff[1]; terminal_width = buff[1];
debug (format ("Context::getHeight: determined height of {1} characters", terminal_height)); debug (format (STRING_INTERACTIVE_HEIGHT, terminal_height));
} }
} }