gbranden pushed a commit to branch master
in repository groff.

commit c4fbf82467313376385f72be4c1b543778c8fcb4
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sun Nov 30 05:24:09 2025 -0600

    [troff]: Adjust scaling unit warning wording.
    
    * src/roff/troff/number.cpp (is_valid_term): Adjust wording of warnings
      in "syntax" category.
---
 ChangeLog                 | 5 +++++
 src/roff/troff/number.cpp | 8 ++++----
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 74bf72950..3106da858 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2025-11-30  G. Branden Robinson <[email protected]>
+
+       * src/roff/troff/number.cpp (is_valid_term): Adjust wording of
+       warnings in "syntax" category.
+
 2025-11-30  G. Branden Robinson <[email protected]>
 
        * src/roff/troff/input.cpp (warnscale_request): Fix code style
diff --git a/src/roff/troff/number.cpp b/src/roff/troff/number.cpp
index 4b45c0833..1a157ecbd 100644
--- a/src/roff/troff/number.cpp
+++ b/src/roff/troff/number.cpp
@@ -531,12 +531,12 @@ static bool is_valid_term(units *u, int scaling_unit,
     case 0:
       // We know it's a recognized scaling unit because it matched the
       // `strchr()` above, so we don't use `tok.description()`.
-      warning(WARN_SCALE, "scaling unit not valid in context"
+      warning(WARN_SCALE, "a scaling unit is not valid in this context"
              " (got '%1')", char(c));
       break;
     case 'f':
       if (c != 'f' && c != 'u') {
-       warning(WARN_SCALE, "'%1' scaling unit invalid in context;"
+       warning(WARN_SCALE, "'%1' scaling unit invalid in this context;"
                " use 'f' or 'u'", char(c));
        break;
       }
@@ -544,7 +544,7 @@ static bool is_valid_term(units *u, int scaling_unit,
       break;
     case 'z':
       if (c != 'u' && c != 'z' && c != 'p' && c != 's') {
-       warning(WARN_SCALE, "'%1' scaling unit invalid in context;"
+       warning(WARN_SCALE, "'%1' scaling unit invalid in this context;"
                " use 'z', 'p', 's', or 'u'", char(c));
        break;
       }
@@ -555,7 +555,7 @@ static bool is_valid_term(units *u, int scaling_unit,
       break;
     default:
       if (c == 'z') {
-       warning(WARN_SCALE, "'z' scaling unit invalid in context");
+       warning(WARN_SCALE, "'z' scaling unit invalid in this context");
        break;
       }
       si = c;

_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to