L10N: Localized review

This commit is contained in:
Paul Beckingham 2015-05-25 12:48:19 -04:00
parent b794da1cc9
commit 1494300e42
2 changed files with 14 additions and 10 deletions

View file

@ -112,5 +112,13 @@
// FS // FS
#define STRING_FS_PERMS "Tasksh does not have the correct permissions for '{1}'." #define STRING_FS_PERMS "Tasksh does not have the correct permissions for '{1}'."
// Review
#define STRING_REVIEW_MODIFIED "Modified."
#define STRING_REVIEW_REVIEWED "Marked as reviewed."
#define STRING_REVIEW_COMPLETED "Completed."
#define STRING_REVIEW_DELETED "Deleted."
#define STRING_REVIEW_UNRECOGNIZED "Command '{1}' is not recognized."
#define STRING_REVIEW_END "End of review. {1} out of {2} tasks reviewed."
#endif #endif

View file

@ -79,7 +79,7 @@ static void editTask (const std::string& uuid)
command = "task rc.confirmation:no rc.verbose:nothing " + uuid + " modify reviewed:now"; command = "task rc.confirmation:no rc.verbose:nothing " + uuid + " modify reviewed:now";
system (command.c_str ()); system (command.c_str ());
std::cout << "Modified\n"; std::cout << STRING_REVIEW_MODIFIED << "\n";
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
@ -87,7 +87,7 @@ static void reviewTask (const std::string& uuid)
{ {
std::string command = "task rc.confirmation:no rc.verbose:nothing " + uuid + " modify reviewed:now"; std::string command = "task rc.confirmation:no rc.verbose:nothing " + uuid + " modify reviewed:now";
system (command.c_str ()); system (command.c_str ());
std::cout << "Marked as reviewed\n"; std::cout << STRING_REVIEW_REVIEWED << "\n";
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
@ -95,7 +95,7 @@ static void completeTask (const std::string& uuid)
{ {
std::string command = "task rc.confirmation:no rc.verbose:nothing " + uuid + " done"; std::string command = "task rc.confirmation:no rc.verbose:nothing " + uuid + " done";
system (command.c_str ()); system (command.c_str ());
std::cout << "Completed\n"; std::cout << STRING_REVIEW_COMPLETED << "\n";
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
@ -103,7 +103,7 @@ static void deleteTask (const std::string& uuid)
{ {
std::string command = "task rc.confirmation:no rc.verbose:nothing " + uuid + " delete"; std::string command = "task rc.confirmation:no rc.verbose:nothing " + uuid + " delete";
system (command.c_str ()); system (command.c_str ());
std::cout << "Deleted\n"; std::cout << STRING_REVIEW_DELETED << "\n";
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
@ -137,7 +137,7 @@ static void reviewLoop (const std::vector <std::string>& uuids)
else if (command == "") { std::cout << "Skipped\n"; ++current; } else if (command == "") { std::cout << "Skipped\n"; ++current; }
else else
{ {
std::cout << "Command '" << command << "' is not recognized.\n"; std::cout << format (STRING_REVIEW_UNRECOGNIZED, command) << "\n";
} }
// Note that just hitting <Enter> yields an empty command, which does // Note that just hitting <Enter> yields an empty command, which does
@ -146,11 +146,7 @@ static void reviewLoop (const std::vector <std::string>& uuids)
// TODO Remove prompt context. // TODO Remove prompt context.
} }
std::cout << "End of review. " std::cout << format (STRING_REVIEW_END, tasks, total) << "\n";
<< tasks
<< " out of "
<< total
<< " tasks reviewed.\n";
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////