From e2f35a1a06ba40dbdff25c8d2b93d8f39f67c087 Mon Sep 17 00:00:00 2001 From: Wilhelm Schuermann Date: Tue, 24 Feb 2015 21:09:48 +0100 Subject: [PATCH 1/7] Hooks - onAdd, onExit, onLaunch and onModify hooks now output feedback messages as footnotes when hooks exit with status 0, as per hooks documentation. --- ChangeLog | 1 + src/Hooks.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9893ec545..ddb9c00c9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -11,6 +11,7 @@ - Implemented the context feature. - Closed dangling pipes in execute (), resolving problems when a hook script forks (thanks to Jens Erat). +- Re-enabled hook script feedback when exiting with 0 exit status. ------ current release --------------------------- diff --git a/src/Hooks.cpp b/src/Hooks.cpp index 342b5f3b1..f1f99d1c8 100644 --- a/src/Hooks.cpp +++ b/src/Hooks.cpp @@ -141,7 +141,7 @@ void Hooks::onLaunch () { std::vector ::iterator message; for (message = outputFeedback.begin (); message != outputFeedback.end (); ++message) - context.debug (*message); + context.footnote (*message); } else { @@ -208,7 +208,7 @@ void Hooks::onExit () { std::vector ::iterator message; for (message = outputFeedback.begin (); message != outputFeedback.end (); ++message) - context.debug (*message); + context.footnote (*message); } else { @@ -274,7 +274,7 @@ void Hooks::onAdd (Task& task) std::vector ::iterator message; for (message = outputFeedback.begin (); message != outputFeedback.end (); ++message) - context.debug (*message); + context.footnote (*message); } else { @@ -345,7 +345,7 @@ void Hooks::onModify (const Task& before, Task& after) std::vector ::iterator message; for (message = outputFeedback.begin (); message != outputFeedback.end (); ++message) - context.debug (*message); + context.footnote (*message); } else { From 1a0f47939488f3acc2e4d235aa86b6483cd06bbe Mon Sep 17 00:00:00 2001 From: Tomas Babej Date: Tue, 24 Feb 2015 07:30:44 +0100 Subject: [PATCH 2/7] CmdContext: Add helpful hint to output when setting context --- doc/man/task.1.in | 4 ++-- src/CLI.cpp | 2 +- src/l10n/deu-DEU.h | 2 +- src/l10n/eng-USA.h | 2 +- src/l10n/epo-RUS.h | 2 +- src/l10n/esp-ESP.h | 2 +- src/l10n/fra-FRA.h | 2 +- src/l10n/ita-ITA.h | 2 +- src/l10n/pol-POL.h | 2 +- src/l10n/por-PRT.h | 2 +- test/context.t | 10 +++++----- 11 files changed, 16 insertions(+), 16 deletions(-) diff --git a/doc/man/task.1.in b/doc/man/task.1.in index 65352f5d4..1ee3748c7 100644 --- a/doc/man/task.1.in +++ b/doc/man/task.1.in @@ -1017,12 +1017,12 @@ result affected by the current active context. 2 1d Home Clean the dishes 1.14 $ task context home - Context 'home' applied. + Context 'home' set. Use 'task context none' to remove. $ task list ID Age Project Description Urg 2 1d Home Clean the dishes 1.14 - Context 'home' applied. + Context 'home' set. Use 'task context none' to remove. As seen in the example above, context is applied by specifying its name to the "context" command. To change the currently applied context, just pass the diff --git a/src/CLI.cpp b/src/CLI.cpp index e059ea3a2..3b1bc1c43 100644 --- a/src/CLI.cpp +++ b/src/CLI.cpp @@ -414,7 +414,7 @@ void CLI::addContextFilter () { addRawFilter("( " + contextFilter + " )"); if (context.verbose ("context")) - context.footnote (format("Context '{1}' applied.", contextName)); + context.footnote (format("Context '{1}' set. Use 'task context none' to remove.", contextName)); } } diff --git a/src/l10n/deu-DEU.h b/src/l10n/deu-DEU.h index 20d76442b..8c22842a5 100644 --- a/src/l10n/deu-DEU.h +++ b/src/l10n/deu-DEU.h @@ -570,7 +570,7 @@ #define STRING_CMD_CONTEXT_DEL_USAG "Context name needs to be specified." #define STRING_CMD_CONTEXT_LIST_EMPT "No contexts defined." #define STRING_CMD_CONTEXT_SET_NFOU "Context '{1}' not found." -#define STRING_CMD_CONTEXT_SET_SUCC "Context '{1}' applied." +#define STRING_CMD_CONTEXT_SET_SUCC "Context '{1}' set. Use 'task context none' to remove." #define STRING_CMD_CONTEXT_SET_FAIL "Context '{1}' not applied." #define STRING_CMD_CONTEXT_SHOW_EMPT "No context is currently applied." #define STRING_CMD_CONTEXT_SHOW "Context '{1}' with filter '{2}' is currently applied." diff --git a/src/l10n/eng-USA.h b/src/l10n/eng-USA.h index cc7838142..5050bdf5f 100644 --- a/src/l10n/eng-USA.h +++ b/src/l10n/eng-USA.h @@ -570,7 +570,7 @@ #define STRING_CMD_CONTEXT_DEL_USAG "Context name needs to be specified." #define STRING_CMD_CONTEXT_LIST_EMPT "No contexts defined." #define STRING_CMD_CONTEXT_SET_NFOU "Context '{1}' not found." -#define STRING_CMD_CONTEXT_SET_SUCC "Context '{1}' applied." +#define STRING_CMD_CONTEXT_SET_SUCC "Context '{1}' set. Use 'task context none' to remove." #define STRING_CMD_CONTEXT_SET_FAIL "Context '{1}' not applied." #define STRING_CMD_CONTEXT_SHOW_EMPT "No context is currently applied." #define STRING_CMD_CONTEXT_SHOW "Context '{1}' with filter '{2}' is currently applied." diff --git a/src/l10n/epo-RUS.h b/src/l10n/epo-RUS.h index cef22854d..ed299fcd4 100644 --- a/src/l10n/epo-RUS.h +++ b/src/l10n/epo-RUS.h @@ -570,7 +570,7 @@ #define STRING_CMD_CONTEXT_DEL_USAG "Context name needs to be specified." #define STRING_CMD_CONTEXT_LIST_EMPT "No contexts defined." #define STRING_CMD_CONTEXT_SET_NFOU "Context '{1}' not found." -#define STRING_CMD_CONTEXT_SET_SUCC "Context '{1}' applied." +#define STRING_CMD_CONTEXT_SET_SUCC "Context '{1}' set. Use 'task context none' to remove." #define STRING_CMD_CONTEXT_SET_FAIL "Context '{1}' not applied." #define STRING_CMD_CONTEXT_SHOW_EMPT "No context is currently applied." #define STRING_CMD_CONTEXT_SHOW "Context '{1}' with filter '{2}' is currently applied." diff --git a/src/l10n/esp-ESP.h b/src/l10n/esp-ESP.h index 6eb6e64e3..f1964b0b6 100644 --- a/src/l10n/esp-ESP.h +++ b/src/l10n/esp-ESP.h @@ -579,7 +579,7 @@ #define STRING_CMD_CONTEXT_DEL_USAG "Context name needs to be specified." #define STRING_CMD_CONTEXT_LIST_EMPT "No contexts defined." #define STRING_CMD_CONTEXT_SET_NFOU "Context '{1}' not found." -#define STRING_CMD_CONTEXT_SET_SUCC "Context '{1}' applied." +#define STRING_CMD_CONTEXT_SET_SUCC "Context '{1}' set. Use 'task context none' to remove." #define STRING_CMD_CONTEXT_SET_FAIL "Context '{1}' not applied." #define STRING_CMD_CONTEXT_SHOW_EMPT "No context is currently applied." #define STRING_CMD_CONTEXT_SHOW "Context '{1}' with filter '{2}' is currently applied." diff --git a/src/l10n/fra-FRA.h b/src/l10n/fra-FRA.h index cdc7bbcb9..b997ec4dc 100644 --- a/src/l10n/fra-FRA.h +++ b/src/l10n/fra-FRA.h @@ -570,7 +570,7 @@ #define STRING_CMD_CONTEXT_DEL_USAG "Context name needs to be specified." #define STRING_CMD_CONTEXT_LIST_EMPT "No contexts defined." #define STRING_CMD_CONTEXT_SET_NFOU "Context '{1}' not found." -#define STRING_CMD_CONTEXT_SET_SUCC "Context '{1}' applied." +#define STRING_CMD_CONTEXT_SET_SUCC "Context '{1}' set. Use 'task context none' to remove." #define STRING_CMD_CONTEXT_SET_FAIL "Context '{1}' not applied." #define STRING_CMD_CONTEXT_SHOW_EMPT "No context is currently applied." #define STRING_CMD_CONTEXT_SHOW "Context '{1}' with filter '{2}' is currently applied." diff --git a/src/l10n/ita-ITA.h b/src/l10n/ita-ITA.h index b3ec61fb1..ef4b36cdb 100644 --- a/src/l10n/ita-ITA.h +++ b/src/l10n/ita-ITA.h @@ -569,7 +569,7 @@ #define STRING_CMD_CONTEXT_DEL_USAG "Context name needs to be specified." #define STRING_CMD_CONTEXT_LIST_EMPT "No contexts defined." #define STRING_CMD_CONTEXT_SET_NFOU "Context '{1}' not found." -#define STRING_CMD_CONTEXT_SET_SUCC "Context '{1}' applied." +#define STRING_CMD_CONTEXT_SET_SUCC "Context '{1}' set. Use 'task context none' to remove." #define STRING_CMD_CONTEXT_SET_FAIL "Context '{1}' not applied." #define STRING_CMD_CONTEXT_SHOW_EMPT "No context is currently applied." #define STRING_CMD_CONTEXT_SHOW "Context '{1}' with filter '{2}' is currently applied." diff --git a/src/l10n/pol-POL.h b/src/l10n/pol-POL.h index c296c2700..7d95eeecb 100644 --- a/src/l10n/pol-POL.h +++ b/src/l10n/pol-POL.h @@ -570,7 +570,7 @@ #define STRING_CMD_CONTEXT_DEL_USAG "Context name needs to be specified." #define STRING_CMD_CONTEXT_LIST_EMPT "No contexts defined." #define STRING_CMD_CONTEXT_SET_NFOU "Context '{1}' not found." -#define STRING_CMD_CONTEXT_SET_SUCC "Context '{1}' applied." +#define STRING_CMD_CONTEXT_SET_SUCC "Context '{1}' set. Use 'task context none' to remove." #define STRING_CMD_CONTEXT_SET_FAIL "Context '{1}' not applied." #define STRING_CMD_CONTEXT_SHOW_EMPT "No context is currently applied." #define STRING_CMD_CONTEXT_SHOW "Context '{1}' with filter '{2}' is currently applied." diff --git a/src/l10n/por-PRT.h b/src/l10n/por-PRT.h index 1587291ae..f446a4cea 100644 --- a/src/l10n/por-PRT.h +++ b/src/l10n/por-PRT.h @@ -570,7 +570,7 @@ #define STRING_CMD_CONTEXT_DEL_USAG "Context name needs to be specified." #define STRING_CMD_CONTEXT_LIST_EMPT "No contexts defined." #define STRING_CMD_CONTEXT_SET_NFOU "Context '{1}' not found." -#define STRING_CMD_CONTEXT_SET_SUCC "Context '{1}' applied." +#define STRING_CMD_CONTEXT_SET_SUCC "Context '{1}' set. Use 'task context none' to remove." #define STRING_CMD_CONTEXT_SET_FAIL "Context '{1}' not applied." #define STRING_CMD_CONTEXT_SHOW_EMPT "No context is currently applied." #define STRING_CMD_CONTEXT_SHOW "Context '{1}' with filter '{2}' is currently applied." diff --git a/test/context.t b/test/context.t index a185c77bc..5558da479 100755 --- a/test/context.t +++ b/test/context.t @@ -182,7 +182,7 @@ class ContextManagementTest(TestCase): self.t(('context', 'define', 'home', '+home'))[1] output = self.t(('context', 'home'))[1] - self.assertIn("Context 'home' applied.", output) + self.assertIn("Context 'home' set.", output) self.assertIn("context=home\n", self.t.taskrc_content) def test_context_resetting(self): @@ -195,7 +195,7 @@ class ContextManagementTest(TestCase): self.t(('context', 'home'))[1] output = self.t(('context', 'home'))[1] - self.assertIn("Context 'home' applied.", output) + self.assertIn("Context 'home' set.", output) contains_home = lambda line: line == "context=home\n" self.assertEqual(len(filter(contains_home, self.t.taskrc_content)), 1) @@ -213,20 +213,20 @@ class ContextManagementTest(TestCase): # Switch to home context output = self.t(('context', 'home'))[1] - self.assertIn("Context 'home' applied.", output) + self.assertIn("Context 'home' set.", output) self.assertEqual(len(filter(contains_home, self.t.taskrc_content)), 1) # Switch to work context output = self.t(('context', 'work'))[1] - self.assertIn("Context 'work' applied.", output) + self.assertIn("Context 'work' set.", output) self.assertNotIn("context=home\n", self.t.taskrc_content) self.assertEqual(len(filter(contains_work, self.t.taskrc_content)), 1) # Switch back to home context output = self.t(('context', 'home'))[1] - self.assertIn("Context 'home' applied.", output) + self.assertIn("Context 'home' set.", output) self.assertNotIn("context=work\n", self.t.taskrc_content) self.assertEqual(len(filter(contains_home, self.t.taskrc_content)), 1) From 9748fa2ab1068486810b7a0fe59d88b3d2e717da Mon Sep 17 00:00:00 2001 From: Tomas Babej Date: Tue, 24 Feb 2015 07:30:56 +0100 Subject: [PATCH 3/7] tests: Fix asserted strings in context tests --- test/context.t | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/context.t b/test/context.t index 5558da479..b040ea83f 100755 --- a/test/context.t +++ b/test/context.t @@ -105,7 +105,7 @@ class ContextManagementTest(TestCase): output = self.t(('context', 'delete', 'work'))[1] # Assert correct output - self.assertIn("Context 'work' undefined.", output) + self.assertIn("Context 'work' deleted.", output) # Assert that taskrc does not countain context work definition self.assertFalse(any('context.work=' in line for line in self.t.taskrc_content)) @@ -118,7 +118,7 @@ class ContextManagementTest(TestCase): output = self.t.runError(('context', 'delete', 'work'))[1] # Assert correct output - self.assertIn("Context 'work' was not undefined.", output) + self.assertIn("Context 'work' not deleted.", output) # Assert that taskrc does not countain context work definition self.assertFalse(any('context.work=' in line for line in self.t.taskrc_content)) @@ -133,7 +133,7 @@ class ContextManagementTest(TestCase): output = self.t(('context', 'delete', 'work'))[1] # Assert correct output - self.assertIn("Context 'work' undefined.", output) + self.assertIn("Context 'work' deleted.", output) # Assert that taskrc does not countain context work definition self.assertFalse(any('context.work=' in line for line in self.t.taskrc_content)) From bf5f246168ebe30179e5ab34b3f9479b877a5053 Mon Sep 17 00:00:00 2001 From: Tomas Babej Date: Tue, 24 Feb 2015 07:31:00 +0100 Subject: [PATCH 4/7] man: Fix copy-paste error in task.1 --- doc/man/task.1.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/man/task.1.in b/doc/man/task.1.in index 1ee3748c7..887dd7e16 100644 --- a/doc/man/task.1.in +++ b/doc/man/task.1.in @@ -433,7 +433,7 @@ Outputs a list of available contexts along with their definitions. Unsets the currently active context, if any was set. .TP -.B task context none +.B task context show Shows the currently active context, along with its definition. .TP From 0868ba757c25afe1e723ce36186feaddc4482f3e Mon Sep 17 00:00:00 2001 From: Tomas Babej Date: Tue, 24 Feb 2015 07:31:03 +0100 Subject: [PATCH 5/7] CmdConfig: Do not leave empty line upon variable removal --- src/commands/CmdConfig.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/commands/CmdConfig.cpp b/src/commands/CmdConfig.cpp index 52e883d45..8f7fcf802 100644 --- a/src/commands/CmdConfig.cpp +++ b/src/commands/CmdConfig.cpp @@ -107,8 +107,10 @@ int CmdConfig::unsetConfigVariable (std::string name, bool confirmation /* = fal bool change = false; std::vector ::iterator line; - for (line = contents.begin (); line != contents.end (); ++line) + for (line = contents.begin (); line != contents.end (); ) { + bool lineDeleted = false; + // If there is a comment on the line, it must follow the pattern. std::string::size_type comment = line->find ("#"); std::string::size_type pos = line->find (name + "="); @@ -123,10 +125,15 @@ int CmdConfig::unsetConfigVariable (std::string name, bool confirmation /* = fal if (!confirmation || confirm (format (STRING_CMD_CONFIG_CONFIRM3, name))) { - *line = ""; + // vector::erase method returns a valid iterator to the next object + line = contents.erase (line); + lineDeleted = true; change = true; } } + + if (! lineDeleted) + line++; } if (change) From e19c99ce1e07b2005f2593138725fc08fca92704 Mon Sep 17 00:00:00 2001 From: Tomas Babej Date: Tue, 24 Feb 2015 07:31:09 +0100 Subject: [PATCH 6/7] CmdContext: Fix incorrect exception handling --- src/commands/CmdContext.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/commands/CmdContext.cpp b/src/commands/CmdContext.cpp index 659f667a0..d65837036 100644 --- a/src/commands/CmdContext.cpp +++ b/src/commands/CmdContext.cpp @@ -148,7 +148,10 @@ int CmdContext::defineContext (std::vector & words, std::stringstre } } else - throw STRING_CMD_CONTEXT_DEF_USAG; + { + out << STRING_CMD_CONTEXT_DEF_USAG << "\n"; + rc = 1; + } return rc; } @@ -188,7 +191,10 @@ int CmdContext::deleteContext (std::vector & words, std::stringstre out << format (STRING_CMD_CONTEXT_DEL_FAIL, words[1]) << "\n"; } else - throw STRING_CMD_CONTEXT_DEL_USAG; + { + out << STRING_CMD_CONTEXT_DEL_USAG << "\n"; + rc = 1; + } return rc; } From 85d0e1789a0f67e1745acb49eb1124815e1740a3 Mon Sep 17 00:00:00 2001 From: Tomas Babej Date: Tue, 24 Feb 2015 19:56:23 +0100 Subject: [PATCH 7/7] CmdContext: Validate context's filter upon definition --- src/commands/CmdContext.cpp | 26 ++++++++++++++++++++++++-- src/l10n/deu-DEU.h | 3 +++ src/l10n/eng-USA.h | 3 +++ src/l10n/epo-RUS.h | 3 +++ src/l10n/esp-ESP.h | 3 +++ src/l10n/fra-FRA.h | 2 ++ src/l10n/ita-ITA.h | 3 +++ src/l10n/pol-POL.h | 3 +++ src/l10n/por-PRT.h | 3 +++ 9 files changed, 47 insertions(+), 2 deletions(-) diff --git a/src/commands/CmdContext.cpp b/src/commands/CmdContext.cpp index d65837036..e689daeb5 100644 --- a/src/commands/CmdContext.cpp +++ b/src/commands/CmdContext.cpp @@ -26,9 +26,11 @@ #include #include +#include #include #include #include +#include #include #include #include @@ -128,15 +130,35 @@ std::vector CmdContext::getContexts () int CmdContext::defineContext (std::vector & words, std::stringstream& out) { int rc = 0; + bool confirmation = context.config.getBoolean ("confirmation"); if (words.size () > 2) { std::string name = "context." + words[1]; std::string value = joinWords (words, 2); - // TODO: Check if the value is a proper filter + + // Check if the value is a proper filter by filtering current pending.data + Filter filter; + std::vector filtered; + const std::vector & pending = context.tdb2.pending.get_tasks (); + + try + { + context.cli.addRawFilter ("( " + value + " )"); + filter.subset (pending, filtered); + } + catch (std::string exception) + { + throw format (STRING_CMD_CONTEXT_DEF_ABRT2, exception); + } + + // Make user explicitly confirm filters that are matching no pending tasks + if (filtered.size () == 0) + if (confirmation && + ! confirm (format (STRING_CMD_CONTEXT_DEF_CONF, value))) + throw std::string (STRING_CMD_CONTEXT_DEF_ABRT); // Set context definition config variable - bool confirmation = context.config.getBoolean ("confirmation"); bool success = CmdConfig::setConfigVariable (name, value, confirmation); if (success) diff --git a/src/l10n/deu-DEU.h b/src/l10n/deu-DEU.h index 8c22842a5..a374165d1 100644 --- a/src/l10n/deu-DEU.h +++ b/src/l10n/deu-DEU.h @@ -565,6 +565,9 @@ #define STRING_CMD_CONTEXT_DEF_SUCC "Context '{1}' defined." #define STRING_CMD_CONTEXT_DEF_FAIL "Context '{1}' not defined." #define STRING_CMD_CONTEXT_DEF_USAG "Both context name and its definition must be provided." +#define STRING_CMD_CONTEXT_DEF_ABRT "Context definiton aborted." +#define STRING_CMD_CONTEXT_DEF_ABRT2 "Filter validation failed: {1}" +#define STRING_CMD_CONTEXT_DEF_CONF "The filter '{1}' matches 0 pending tasks. Do you wish to continue?" #define STRING_CMD_CONTEXT_DEL_SUCC "Context '{1}' deleted." #define STRING_CMD_CONTEXT_DEL_FAIL "Context '{1}' not deleted." #define STRING_CMD_CONTEXT_DEL_USAG "Context name needs to be specified." diff --git a/src/l10n/eng-USA.h b/src/l10n/eng-USA.h index 5050bdf5f..112db87ae 100644 --- a/src/l10n/eng-USA.h +++ b/src/l10n/eng-USA.h @@ -565,6 +565,9 @@ #define STRING_CMD_CONTEXT_DEF_SUCC "Context '{1}' defined." #define STRING_CMD_CONTEXT_DEF_FAIL "Context '{1}' not defined." #define STRING_CMD_CONTEXT_DEF_USAG "Both context name and its definition must be provided." +#define STRING_CMD_CONTEXT_DEF_ABRT "Context definiton aborted." +#define STRING_CMD_CONTEXT_DEF_ABRT2 "Filter validation failed: {1}" +#define STRING_CMD_CONTEXT_DEF_CONF "The filter '{1}' matches 0 pending tasks. Do you wish to continue?" #define STRING_CMD_CONTEXT_DEL_SUCC "Context '{1}' deleted." #define STRING_CMD_CONTEXT_DEL_FAIL "Context '{1}' not deleted." #define STRING_CMD_CONTEXT_DEL_USAG "Context name needs to be specified." diff --git a/src/l10n/epo-RUS.h b/src/l10n/epo-RUS.h index ed299fcd4..057946ca3 100644 --- a/src/l10n/epo-RUS.h +++ b/src/l10n/epo-RUS.h @@ -565,6 +565,9 @@ #define STRING_CMD_CONTEXT_DEF_SUCC "Context '{1}' defined." #define STRING_CMD_CONTEXT_DEF_FAIL "Context '{1}' not defined." #define STRING_CMD_CONTEXT_DEF_USAG "Both context name and its definition must be provided." +#define STRING_CMD_CONTEXT_DEF_ABRT "Context definiton aborted." +#define STRING_CMD_CONTEXT_DEF_ABRT2 "Filter validation failed: {1}" +#define STRING_CMD_CONTEXT_DEF_CONF "The filter '{1}' matches 0 pending tasks. Do you wish to continue?" #define STRING_CMD_CONTEXT_DEL_SUCC "Context '{1}' deleted." #define STRING_CMD_CONTEXT_DEL_FAIL "Context '{1}' not deleted." #define STRING_CMD_CONTEXT_DEL_USAG "Context name needs to be specified." diff --git a/src/l10n/esp-ESP.h b/src/l10n/esp-ESP.h index f1964b0b6..d99053429 100644 --- a/src/l10n/esp-ESP.h +++ b/src/l10n/esp-ESP.h @@ -574,6 +574,9 @@ #define STRING_CMD_CONTEXT_DEF_SUCC "Context '{1}' defined." #define STRING_CMD_CONTEXT_DEF_FAIL "Context '{1}' not defined." #define STRING_CMD_CONTEXT_DEF_USAG "Both context name and its definition must be provided." +#define STRING_CMD_CONTEXT_DEF_ABRT "Context definiton aborted." +#define STRING_CMD_CONTEXT_DEF_ABRT2 "Filter validation failed: {1}" +#define STRING_CMD_CONTEXT_DEF_CONF "The filter '{1}' matches 0 pending tasks. Do you wish to continue?" #define STRING_CMD_CONTEXT_DEL_SUCC "Context '{1}' deleted." #define STRING_CMD_CONTEXT_DEL_FAIL "Context '{1}' not deleted." #define STRING_CMD_CONTEXT_DEL_USAG "Context name needs to be specified." diff --git a/src/l10n/fra-FRA.h b/src/l10n/fra-FRA.h index b997ec4dc..11d3b2cb6 100644 --- a/src/l10n/fra-FRA.h +++ b/src/l10n/fra-FRA.h @@ -565,6 +565,8 @@ #define STRING_CMD_CONTEXT_DEF_SUCC "Context '{1}' defined." #define STRING_CMD_CONTEXT_DEF_FAIL "Context '{1}' not defined." #define STRING_CMD_CONTEXT_DEF_USAG "Both context name and its definition must be provided." +#define STRING_CMD_CONTEXT_DEF_ABRT "Context definiton aborted." +#define STRING_CMD_CONTEXT_DEF_CONF "The filter '{1}' matches 0 pending tasks. Do you wish to continue?" #define STRING_CMD_CONTEXT_DEL_SUCC "Context '{1}' deleted." #define STRING_CMD_CONTEXT_DEL_FAIL "Context '{1}' not deleted." #define STRING_CMD_CONTEXT_DEL_USAG "Context name needs to be specified." diff --git a/src/l10n/ita-ITA.h b/src/l10n/ita-ITA.h index ef4b36cdb..5e5255572 100644 --- a/src/l10n/ita-ITA.h +++ b/src/l10n/ita-ITA.h @@ -564,6 +564,9 @@ #define STRING_CMD_CONTEXT_DEF_SUCC "Context '{1}' defined." #define STRING_CMD_CONTEXT_DEF_FAIL "Context '{1}' not defined." #define STRING_CMD_CONTEXT_DEF_USAG "Both context name and its definition must be provided." +#define STRING_CMD_CONTEXT_DEF_ABRT "Context definiton aborted." +#define STRING_CMD_CONTEXT_DEF_ABRT2 "Filter validation failed: {1}" +#define STRING_CMD_CONTEXT_DEF_CONF "The filter '{1}' matches 0 pending tasks. Do you wish to continue?" #define STRING_CMD_CONTEXT_DEL_SUCC "Context '{1}' deleted." #define STRING_CMD_CONTEXT_DEL_FAIL "Context '{1}' not deleted." #define STRING_CMD_CONTEXT_DEL_USAG "Context name needs to be specified." diff --git a/src/l10n/pol-POL.h b/src/l10n/pol-POL.h index 7d95eeecb..f3e2a0fcd 100644 --- a/src/l10n/pol-POL.h +++ b/src/l10n/pol-POL.h @@ -565,6 +565,9 @@ #define STRING_CMD_CONTEXT_DEF_SUCC "Context '{1}' defined." #define STRING_CMD_CONTEXT_DEF_FAIL "Context '{1}' not defined." #define STRING_CMD_CONTEXT_DEF_USAG "Both context name and its definition must be provided." +#define STRING_CMD_CONTEXT_DEF_ABRT "Context definiton aborted." +#define STRING_CMD_CONTEXT_DEF_ABRT2 "Filter validation failed: {1}" +#define STRING_CMD_CONTEXT_DEF_CONF "The filter '{1}' matches 0 pending tasks. Do you wish to continue?" #define STRING_CMD_CONTEXT_DEL_SUCC "Context '{1}' deleted." #define STRING_CMD_CONTEXT_DEL_FAIL "Context '{1}' not deleted." #define STRING_CMD_CONTEXT_DEL_USAG "Context name needs to be specified." diff --git a/src/l10n/por-PRT.h b/src/l10n/por-PRT.h index f446a4cea..97d9de571 100644 --- a/src/l10n/por-PRT.h +++ b/src/l10n/por-PRT.h @@ -565,6 +565,9 @@ #define STRING_CMD_CONTEXT_DEF_SUCC "Context '{1}' defined." #define STRING_CMD_CONTEXT_DEF_FAIL "Context '{1}' not defined." #define STRING_CMD_CONTEXT_DEF_USAG "Both context name and its definition must be provided." +#define STRING_CMD_CONTEXT_DEF_ABRT "Context definiton aborted." +#define STRING_CMD_CONTEXT_DEF_ABRT2 "Filter validation failed: {1}" +#define STRING_CMD_CONTEXT_DEF_CONF "The filter '{1}' matches 0 pending tasks. Do you wish to continue?" #define STRING_CMD_CONTEXT_DEL_SUCC "Context '{1}' deleted." #define STRING_CMD_CONTEXT_DEL_FAIL "Context '{1}' not deleted." #define STRING_CMD_CONTEXT_DEL_USAG "Context name needs to be specified."