From 65dca85d0acc1ae69518e85b52a2877e38dc8c6d Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 2 Apr 2015 15:06:55 +0200 Subject: Implement translation of meta/operations to natural language --- build/operation.cxx | 38 ++++++++++++++++++++++++++++++-------- 1 file changed, 30 insertions(+), 8 deletions(-) (limited to 'build/operation.cxx') diff --git a/build/operation.cxx b/build/operation.cxx index 7fab63e..0d6bfcd 100644 --- a/build/operation.cxx +++ b/build/operation.cxx @@ -98,19 +98,19 @@ namespace build { target& t (*static_cast (v)); - level4 ([&]{trace << "executing target " << t;}); + level4 ([&]{trace << diag_doing (a, t);}); switch (execute (a, t)) { case target_state::postponed: { - info << "target " << t << " is postponed"; + info << diag_doing (a, t) << " is postponed"; psp.push_back (t); break; } case target_state::unchanged: { - info << "target " << t << " is unchanged"; + info << diag_already_done (a, t); break; } case target_state::changed: @@ -130,12 +130,12 @@ namespace build { case target_state::postponed: { - info << "unable to execute target " << t << " at this time"; + info << "unable to " << diag_do (a, t) << " at this time"; break; } case target_state::unchanged: { - info << "target " << t << " is unchanged"; + info << diag_already_done (a, t); break; } case target_state::unknown: // Assume something was done to it. @@ -151,6 +151,9 @@ namespace build meta_operation_info perform { "perform", + "", + "", + "", nullptr, // meta-operation pre nullptr, // operation pre &load, @@ -162,7 +165,26 @@ namespace build // operations // - operation_info default_ {"", execution_mode::first}; - operation_info update {"update", execution_mode::first}; - operation_info clean {"clean", execution_mode::last}; + operation_info default_ { + "", + "", + "", + "", + execution_mode::first + }; + + operation_info update { + "update", + "update", + "updating", + "up to date", + execution_mode::first + }; + + operation_info clean { + "clean", + "clean", + "cleaning", + "clean", + execution_mode::last}; } -- cgit v1.1