Conversation
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
Review effort: Lite
Findings: 2
Open (2)
What changed in this PR
Documents the syntax and behavior of tr SET operands in help output and adds coverage to ensure the generated help remains informative.
Changes:
- Adds comprehensive English and French documentation for escapes, ranges, repeats, equivalence classes, character classes, and translation behavior.
- Adds a localized help description for the
setsoperand. - Adds a regression test covering the documented SET syntax and operand description.
| File | Description |
|---|---|
tests/by-util/test_tr.rs |
Verifies that help output documents SET syntax and all supported character classes. |
src/uu/tr/src/tr.rs |
Associates the localized SET description with the positional operand. |
src/uu/tr/locales/fr-FR.ftl |
Adds the French SET syntax and behavior documentation. |
src/uu/tr/locales/en-US.ftl |
Adds the English SET syntax and behavior documentation. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
The [CHAR*REPEAT] entry had no subject for 'commence'. The space descriptions used feminine agreement, while the 106 French locale files of the repository consistently treat 'espace' as masculine. Reported by review on uutils#14792.
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
Review effort: Lite
Findings: 2
Merging this PR will degrade performance by 6.15%
Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting Comparing Footnotes
|
The help listed the options and stopped there, so neither it nor the man page generated from it said anything about the ranges, repeats, escapes, equivalence classes and character classes that a SET accepts, nor what the [sets] operand is. Describe them from what the sequence parser implements, give the sets operand a help string, and keep the French translation at parity. Fixes uutils#14688
The [CHAR*REPEAT] entry had no subject for 'commence'. The space descriptions used feminine agreement, while the 106 French locale files of the repository consistently treat 'espace' as masculine. Reported by review on uutils#14792.
58fab84 to
f060119
Compare
|
I work on it when I come back from school. |
|
clippy is sad on 5 jobs :) |

Fixes #14688
tr --help, and so the generated man page, listed the options and stoppedthere. The synopsis mentions
[sets]and nothing said what a SET may hold, sothere was no way to learn about ranges, repeats, escapes or character classes
from the page. It came to 18 lines against GNU's 54.
The reporter hit this after upgrading to Ubuntu 26.04, which ships uutils.
What is documented
The text is written from what
src/uu/tr/src/operation.rsactually parses,not translated from GNU's wording, since the licenses are not compatible.
Every claim was checked against the binary and against GNU 9.7:
\NNN(one to three octal digits),\\,\a,\b,\f,\n,\r,\t,\vCHAR1-CHAR2[CHAR*]and[CHAR*REPEAT], with REPEAT read as octal when it startswith
0[=CHAR=]byte set it expands to —
[:graph:]excludes the space and[:print:]includes it,
[:blank:]is tab and space while[:space:]adds thevertical whitespace
how
--truncate-set1shortens SET1 instead, that only[:lower:]and[:upper:]may appear in SET2, and that squeezing applies to the last SETafter any translation or deletion
The
setsoperand also gets a help string, so it no longer shows as a bare[sets]...with an empty description.French
fr-FR.ftlwas at full parity withen-US.ftlbefore this change, so it istranslated too rather than left to fall back to English.
Checks
moz-fluent-lint --config .github/fluent_linter_config.yml src/uu/tr/locales/reports no errors on both files.
uudoc manpage tr | groff -man -wwemits no warnings, and the escapes come out as
\NNN,\\,\aratherthan doubled. Entries were kept short enough not to wrap, matching how the
statafter-help block renders.classes, escapes, every one of the twelve class names, and the operand
description. Restoring the old one-line after-help makes it fail with
the help does not document CHAR1-CHAR2.trtests pass, 169 withfeat_diagnostics. clippy andcargo fmtclean.