Skip to content

Commit

Permalink
In substitution templates, support case modifier sequences:
Browse files Browse the repository at this point in the history
    \L - Substitute in lowercase until \E.
    \l - Substitute next char in lowercase.
    \U - Substitute in uppercase until \E.
    \u - Substitute next char in uppercase.

As currently implemented, these only work for 8-bit locales.
The sequences \L and \U can be nested.  For instance, given input:
`abcde', the command:

    s/\(.\)\(.\)/\U\L\1\E \2/g

produces: `a Bc De', i.e., \L overrides \U until \E, then \U becomes
active again until the end of the current substitution.

In substitution templates, a back-reference that does not match any
subexpressions is now replaced with the empty string instead of the
offending digit, as per The Open Group's 2018 publication (cf.
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/ed.html).
  • Loading branch information
slewsys committed Feb 8, 2024
1 parent 55bbfd8 commit 08e9c7b
Show file tree
Hide file tree
Showing 46 changed files with 4,922 additions and 3,459 deletions.
202 changes: 127 additions & 75 deletions po/af.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: coreutils 5.2.1\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2023-09-08 04:02-0400\n"
"POT-Creation-Date: 2024-02-08 13:57-0500\n"
"PO-Revision-Date: 2004-03-17 11:58+0200\n"
"Last-Translator: Petri Jooste <[email protected]>\n"
"Language-Team: Afrikaans <[email protected]>\n"
Expand Down Expand Up @@ -59,49 +59,133 @@ msgstr "%s: ongeldige opsie -- %c\n"
msgid "%s: option requires an argument -- '%c'\n"
msgstr "%s: opsie benodig 'n parameter -- %c\n"

#: lib/regcomp.c:122
msgid "Success"
msgstr ""

#: lib/regcomp.c:125 src/re.c:273 src/sub.c:439
msgid "No match"
msgstr ""

#: lib/regcomp.c:128
#, fuzzy
msgid "Invalid regular expression"
msgstr "%s: ongeldige reëlmatige uitdrukking: %s"

#: lib/regcomp.c:131
#, fuzzy
msgid "Invalid collation character"
msgstr "ongeldige karakterklas `%s'"

#: lib/regcomp.c:134
#, fuzzy
msgid "Invalid character class name"
msgstr "ongeldige karakterklas `%s'"

#: lib/regcomp.c:137
msgid "Trailing backslash"
msgstr ""

#: lib/regcomp.c:140
#, fuzzy
#| msgid "invalid user"
msgid "Invalid back reference"
msgstr "ongeldige gebruiker"

#: lib/regcomp.c:143
msgid "Unmatched [, [^, [:, [., or [="
msgstr ""

#: lib/regcomp.c:146
msgid "Unmatched ( or \\("
msgstr ""

#: lib/regcomp.c:149
msgid "Unmatched \\{"
msgstr ""

#: lib/regcomp.c:152
msgid "Invalid content of \\{\\}"
msgstr ""

#: lib/regcomp.c:155
#, fuzzy
msgid "Invalid range end"
msgstr "%s: ongeldige reëlmatige uitdrukking: %s"

#: lib/regcomp.c:158 src/aux.c:231 src/aux.c:444 src/buf.c:267 src/buf.c:436
#: src/buf.c:534 src/buf.c:544 src/buf.c:583 src/buf.c:613 src/glbl.c:171
#: src/io.c:317 src/main.c:763 src/page.c:858 src/parse.c:273 src/parse.c:518
#: src/re.c:157 src/sub.c:480 src/sub.c:615 src/undo.c:26
#, fuzzy
msgid "Memory exhausted"
msgstr "geheue uitgeput"

#: lib/regcomp.c:161
#, fuzzy
msgid "Invalid preceding regular expression"
msgstr "%s: ongeldige reëlmatige uitdrukking: %s"

#: lib/regcomp.c:164
#, fuzzy
msgid "Premature end of regular expression"
msgstr "fout in soektog met reëlmatige uitdrukking"

#: lib/regcomp.c:167
#, fuzzy
msgid "Regular expression too big"
msgstr "%s: ongeldige reëlmatige uitdrukking: %s"

#: lib/regcomp.c:170
msgid "Unmatched ) or \\)"
msgstr ""

#: lib/regcomp.c:650
#, fuzzy
msgid "No previous regular expression"
msgstr "fout in soektog met reëlmatige uitdrukking"

#: src/aux.c:35
msgid "Child process error"
msgstr ""

#: src/aux.c:67 src/aux.c:156
#: src/aux.c:60
#, fuzzy
#| msgid "write error"
msgid "Flush error"
msgstr "skryffout"

#: src/aux.c:71 src/aux.c:160
#, fuzzy
#| msgid "write error"
msgid "Pipe open error"
msgstr "skryffout"

#: src/aux.c:76 src/aux.c:128
#: src/aux.c:80 src/aux.c:132
#, fuzzy
msgid "Fork error"
msgstr "leesfout"

#: src/aux.c:170
#: src/aux.c:174
msgid "Pipe close error"
msgstr ""

#: src/aux.c:227 src/aux.c:440 src/buf.c:267 src/buf.c:436 src/buf.c:534
#: src/buf.c:544 src/buf.c:583 src/buf.c:613 src/glbl.c:171 src/io.c:317
#: src/main.c:753 src/page.c:858 src/parse.c:273 src/parse.c:518 src/re.c:157
#: src/undo.c:26
#, fuzzy
msgid "Memory exhausted"
msgstr "geheue uitgeput"

#: src/aux.c:296 src/aux.c:338
#: src/aux.c:300 src/aux.c:342
msgid "Cannot append register to itself."
msgstr ""

#: src/aux.c:402
#: src/aux.c:406
msgid "Exceeded maximum stack frame depth"
msgstr ""

#: src/aux.c:418 src/aux.c:469 src/aux.c:509 src/aux.c:548 src/io.c:58
#: src/io.c:600 src/main.c:224 src/main.c:715 src/main.c:775
#: src/aux.c:422 src/aux.c:473 src/aux.c:513 src/aux.c:552 src/io.c:58
#: src/io.c:600 src/main.c:230 src/main.c:725 src/main.c:785
#, fuzzy
#| msgid "write error"
msgid "File seek error"
msgstr "skryffout"

#: src/aux.c:451 src/aux.c:494 src/aux.c:533 src/buf.c:116
#: src/aux.c:455 src/aux.c:498 src/aux.c:537 src/buf.c:116
#, fuzzy
msgid "dup2 error"
msgstr "leesfout"
Expand All @@ -114,7 +198,7 @@ msgstr ""
msgid "Buffer seek error"
msgstr ""

#: src/buf.c:260 src/main.c:544 src/main.c:616
#: src/buf.c:260 src/main.c:552 src/main.c:624
msgid "File name too long"
msgstr ""

Expand Down Expand Up @@ -154,27 +238,27 @@ msgstr "karakter is buite die grense"
msgid "Memory request too big"
msgstr ""

#: src/cbc.c:134 src/cbc.c:232 src/cbc.c:237 src/cbc.c:258 src/cbc.c:263
#: src/cbc.c:131 src/cbc.c:229 src/cbc.c:234 src/cbc.c:255 src/cbc.c:260
#, fuzzy
#| msgid "invalid user"
msgid "Invalid key"
msgstr "ongeldige gebruiker"

#: src/cbc.c:376
#: src/cbc.c:373
msgid "Decryption failed (block corrupted)."
msgstr ""

#: src/cbc.c:385
#: src/cbc.c:382
msgid "Decryption failed (incomplete block)."
msgstr ""

#: src/cbc.c:387 src/io.c:551 src/main.c:790
#: src/cbc.c:384 src/io.c:551 src/main.c:800
#, fuzzy
#| msgid "write error"
msgid "File read error"
msgstr "skryffout"

#: src/cmds.c:39 src/exec.c:609 src/io.c:479 src/main.c:360
#: src/cmds.c:39 src/exec.c:609 src/io.c:479 src/main.c:366
msgid "End-of-file unexpected"
msgstr ""

Expand All @@ -188,7 +272,7 @@ msgstr "ongeldige karakterklas `%s'"
msgid "Unknown error"
msgstr "Onbekende stelselfout"

#: src/ed.h:749 src/ed.h:784 src/ed.h:819
#: src/ed.h:747 src/ed.h:782 src/ed.h:817
#, fuzzy
#| msgid "character out of range"
msgid "Numerical result out of range"
Expand Down Expand Up @@ -217,7 +301,7 @@ msgstr ""
msgid "Invalid redirection"
msgstr "%s: ongeldige reëlmatige uitdrukking: %s"

#: src/exec.c:711 src/main.c:611
#: src/exec.c:711 src/main.c:619
msgid "File name not set"
msgstr ""

Expand Down Expand Up @@ -269,7 +353,7 @@ msgstr ""
msgid "File does not exist"
msgstr ""

#: src/io.c:97 src/io.c:166 src/io.c:630 src/io.c:679 src/main.c:763
#: src/io.c:97 src/io.c:166 src/io.c:630 src/io.c:679 src/main.c:773
#, fuzzy
#| msgid "write error"
msgid "File open error"
Expand Down Expand Up @@ -304,7 +388,7 @@ msgstr "skryffout"
msgid "File too big"
msgstr ""

#: src/io.c:767 src/main.c:725 src/main.c:799
#: src/io.c:767 src/main.c:735 src/main.c:809
#, fuzzy
#| msgid "write error"
msgid "File write error"
Expand All @@ -324,50 +408,50 @@ msgstr ""
msgid "File stat error"
msgstr "skryffout"

#: src/main.c:233
#: src/main.c:239
msgid "Option '-i' requires '-e' or '-f'"
msgstr ""

#: src/main.c:298
#: src/main.c:304
msgid "Interrupted"
msgstr ""

#: src/main.c:409
#: src/main.c:415
msgid "WARNING: Buffer modified since last write"
msgstr ""

#: src/main.c:665
#: src/main.c:673
msgid "Argument list full"
msgstr ""

#: src/main.c:818
#: src/main.c:828
#, c-format
msgid ""
"Usage: %s [-] [-EGhirsVvwx] [-e COMMAND] [-f SCRIPT] [-p PROMPT] [FILE...]\n"
msgstr ""

#: src/main.c:821
#: src/main.c:831
#, c-format
msgid ""
"Usage: %s [-] [-EGhirsVvwx] [-e COMMAND] [-f SCRIPT] [-p PROMPT] [FILE]\n"
msgstr ""

#: src/main.c:825
#: src/main.c:835
#, c-format
msgid "Usage: %s [-] [-EGhrsVvwx] [-p PROMPT] [FILE]\n"
msgstr ""

#: src/main.c:833
#: src/main.c:843
#, c-format
msgid "Usage: %s [OPTION...] [FILE...]\n"
msgstr ""

#: src/main.c:836
#: src/main.c:846
#, c-format
msgid "Usage: %s [OPTION...] [FILE]\n"
msgstr ""

#: src/main.c:842
#: src/main.c:852
#, c-format
msgid ""
"Options:\n"
Expand Down Expand Up @@ -395,7 +479,7 @@ msgid ""
"Please submit issues or pull requests to: <https://github.com/slewsys/ed>\n"
msgstr ""

#: src/main.c:864
#: src/main.c:874
#, c-format
msgid ""
"Options:\n"
Expand All @@ -419,7 +503,7 @@ msgid ""
"Please submit issues or pull requests to: <https://github.com/slewsys/ed>\n"
msgstr ""

#: src/main.c:895
#: src/main.c:905
msgid "script, line %"
msgstr ""

Expand Down Expand Up @@ -484,10 +568,6 @@ msgstr "ongeldige karakterklas `%s'"
msgid "No previous pattern"
msgstr "fout in soektog met reëlmatige uitdrukking"

#: src/re.c:273 src/sub.c:439
msgid "No match"
msgstr ""

#: src/signal.c:136
#, fuzzy
msgid "Signal error"
Expand All @@ -502,42 +582,14 @@ msgstr ""
msgid "No previous substitution"
msgstr "fout in soektog met reëlmatige uitdrukking"

#: src/sub.c:474 src/sub.c:609
msgid "Too many regex subexpressions"
msgstr ""

#: src/undo.c:51
msgid "Nothing to undo"
msgstr ""

#, fuzzy
#~ msgid "Invalid regular expression"
#~ msgstr "%s: ongeldige reëlmatige uitdrukking: %s"

#, fuzzy
#~ msgid "Invalid collation character"
#~ msgstr "ongeldige karakterklas `%s'"

#, fuzzy
#~ msgid "Invalid character class name"
#~ msgstr "ongeldige karakterklas `%s'"

#, fuzzy
#~ msgid "Invalid range end"
#~ msgstr "%s: ongeldige reëlmatige uitdrukking: %s"

#, fuzzy
#~ msgid "Invalid preceding regular expression"
#~ msgstr "%s: ongeldige reëlmatige uitdrukking: %s"

#, fuzzy
#~ msgid "Premature end of regular expression"
#~ msgstr "fout in soektog met reëlmatige uitdrukking"

#, fuzzy
#~ msgid "Regular expression too big"
#~ msgstr "%s: ongeldige reëlmatige uitdrukking: %s"

#, fuzzy
#~ msgid "No previous regular expression"
#~ msgstr "fout in soektog met reëlmatige uitdrukking"

#, c-format
#~ msgid "invalid argument %s for %s"
#~ msgstr "ongeldige parameter %s vir %s"
Expand Down
Loading

0 comments on commit 08e9c7b

Please sign in to comment.