Feature #571 - Special tag feedback

- The verbosity token 'special' now controls whether the feedback is provided
  when special tags are added to a task.
- Added new 'special' verbosity token documentation to man page.
- Added missing 'next' special tag to man page.
- Added new localized strings for describing special tags.
This commit is contained in:
Paul Beckingham
2012-01-29 18:28:07 -05:00
parent bf9e14f581
commit 5609711d47
9 changed files with 39 additions and 1 deletions

View File

@@ -340,4 +340,29 @@ void feedback_affected (const std::string& effect, const Task& task)
}
////////////////////////////////////////////////////////////////////////////////
// Implements feedback when adding special tags to a task.
void feedback_special_tags (const Task& task, const std::string& tag)
{
if (context.verbose ("special"))
{
std::string msg;
std::string explanation;
if (tag == "nocolor") msg = STRING_FEEDBACK_TAG_NOCOLOR;
else if (tag == "nonag") msg = STRING_FEEDBACK_TAG_NONAG;
else if (tag == "nocal") msg = STRING_FEEDBACK_TAG_NOCAL;
else if (tag == "next") msg = STRING_FEEDBACK_TAG_NEXT;
if (msg.length ())
{
if (task.id)
std::cout << format (msg, task.id)
<< "\n";
else
std::cout << format (msg, task.get ("uuid"))
<< "\n";
}
}
}
////////////////////////////////////////////////////////////////////////////////