Repository navigation
Conversation
| msgid "No matches for wildcard '%ls'." | ||
| msgstr "No matches for wildcard “%ls”." | ||
| msgid "No matches for wildcard pattern '%ls'.\n" | ||
| "(Tip: To avoid wildcarding, quote it. To allow no matches, expand it to a variable.)" |
There was a problem hiding this comment.
"expand it to a variable" may not be clear enough. Something like "assign the glob to a variable" may be better.
There was a problem hiding this comment.
What's the concern?
Replacing "expand" with "assign" may be more beginner friendly, but at the cost of preciseness: It might also be understood as quoting the glob when assigning the variable, hoping the glob will instead be interpreted when the variable is expanded (which we thankfully don't support, unlike bash).
I've opted to call it "wildcard pattern" instead of "glob". Isn't that what we call it in the more user-facing documentation?
There was a problem hiding this comment.
It's because "expand it to a variable" is grammatically awkward and therefore likely to confuse some users. I can't find a single instance of "wildcard pattern" in the docs or source. There are 36 lines in doc_src containing "wildcard" and 40 containing "glob". So if you want to say "No matches for wildcard '%ls'.\n" that's fine by me. I'd also replace "wildcarding" with "wildcard expansion".
|
This LGTM other than the wording of one message that may be unclear. |
| #define WILDCARD_ERR_MSG \ | ||
| _(L"No matches for wildcard '%ls'. (Tip: empty matches are allowed in 'set', 'count', " \ | ||
| L"'for'.)") | ||
| _(L"No matches for wildcard pattern '%ls'.\n" \ |
There was a problem hiding this comment.
Frankly the existing Tip drives me nuts. A tip seems appropriate if it either only shows a few times, or if it always indicates a user error. But failed wildcard expansions are something users (or at least I) encounter often, so I don't think any tip is appropriate here.
I would like to drop the Tip and simply say "No matches for wildcard pattern '%ls'.
|
Like @ridiculousfish I'm not happy with the "tip" portion of the message. Especially since the issue this PR is meant to address requires quoting the string containing the wildcard characters, not using the string in the context of a |
|
Suggestions:
From a translator's viewpoint, 1 is straightforward, while both sentences in 2 are difficult: In Norwegian, you have to say either wildcard character or wildcard pattern (less ambiguity = less guesswork for the translator), there is no verb for putting things in quotes, and there is no unifying word specifically for ASCII single or double quote (without implying other citation signs like «»), which makes the translation much longer than the original. The other reason I prefer to say "wildcard pattern" is that that's what the caret is pointing at (not the wildcard character(s)). Maybe wording accuracy can make up for the accuracy of the caret. |
|
Soo... there's four things we might want to mention here:
It seems @ridiculousfish prefers only mentioning the first - if so, I'd like to at least include a link to the appropriate documentation. That would be (and then maybe polish the docs a bit, and possibly offer a man-page version of that) For a more maximalist wording, how about ? |
|
FWIW, I prefer @faho's minimalist error message. I don't think the "tip" in the maximalist error message is an adequate replacement to simply pointing the user to the even more verbose documentation on the subject. |
|
But is "wildcard pattern" better, or is it just me? Two minimalist options (with "wildcard pattern"): I find the "No matches" one easier to translate. |
4cefc1a to
10f7bff
Compare
|
The phrase "wildcard pattern" is somewhat redundant in the context of a UNIX shell. And as far as I can tell appears nowhere else in our core source, functions, or documentation. Having said that I like the "No matches..." message and in that specific context the use of "wildcard pattern" is justifiable. Another option is something like Obviously at this point we're getting dangerously close to bikeshedding. So I'm happy to approve your "No matches for..." variant if no one else has an opinion on the matter. |
|
This is one of those error messages that will get tripped a lot. It's all about communicating what happened and enabling the user to move on ASAP. I agree "wildcard pattern" is redundant, but I'm satisfied with: Sidebar: tcsh is a fun data point for brevity: k. |
|
Thanks, @krader1961. The non-english translations are okay (because unlike English, they cannot be shortened without meaning something else), but there was a leftover "p" in the |
|
For reference, the empty matches are allowed in 'set', 'count', 'for' text (which got replaced here) was added in #3101. |
Description
The first commit moves the prefix part of all error messages. This is to resolve doubt about where the first part of the message comes from; the second part is the context, so that says itself.
The second commit changes the wildcard error message. Apologies for breaking all the translations, I have contributed the ones I can.
Fixes issue #3649
TODOs: