aboutsummaryrefslogtreecommitdiff
path: root/build/operation.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-04-02 15:06:55 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-04-02 15:06:55 +0200
commit65dca85d0acc1ae69518e85b52a2877e38dc8c6d (patch)
tree7e2f1c227d5114d30b8c84e2d9f6af826a36066a /build/operation.cxx
parent48f8883de7b8fa348423b3baf262de08c98eba18 (diff)
Implement translation of meta/operations to natural language
Diffstat (limited to 'build/operation.cxx')
-rw-r--r--build/operation.cxx38
1 files changed, 30 insertions, 8 deletions
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<target*> (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_ {"<default>", execution_mode::first};
- operation_info update {"update", execution_mode::first};
- operation_info clean {"clean", execution_mode::last};
+ operation_info default_ {
+ "<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};
}