-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
*: fix typos in command names #11730
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Hello! I've noticed something unusual when checking this PR:
Is this intended? If so, just ignore this comment. Otherwise, please double-check the commits. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The overall changes and script addition LGTM, thanks for your contribution. I have a few minor suggestions.
Co-authored-by: K.B.Dharun Krishna <[email protected]>
This comment was marked as outdated.
This comment was marked as outdated.
Thanks for you feedback! Could one of the reviewers be so kind as to address the issue of the pages I'm not sure about? (See OP) |
It seems kind of similar to the discussion at #8786 (I will probably add an entry to the tracker issue to document how to deal with name collisions.) Addressing your initial queries:
|
Hello! I've noticed something unusual when checking this PR:
Is this intended? If so, just ignore this comment. Otherwise, please double-check the commits. |
Looking at the last run of the tldr-maintenance, I found out that https://github.com/tldr-pages/tldr/blob/main/pages/linux/qm-importdisk.md?plain=1 had to be renamed to qm-import-disk OR the Dutch page didn’t need a rename of file/command. Now they don’t match with each other. |
This is intentional as suggested in the above discussion where we separated it into two alias pages (to follow the standard alias page template), feel free to update the Dutch translation. |
I am talking about the import disk command. All I can see is a discussion about move disk. |
Sorry, I confused a bit. Yeah, we can rename this to match with the translations. |
# SPDX-License-Identifier: MIT | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could use a description of what the script does here :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I am working on the remaining entries of the tracker issue now, will do this along with adding documentation for the scripts
directory.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could use a description of what the script does here :-)
And maybe be improved.. right now it doesn't work on MacOS (head: illegal byte count -- -4
) and it reports false positives, mainly for pages with --
(acme.sh-dns.md: # acme.sh --dns
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I am reworking it to something like this (will check your suggestion too):
#!/bin/sh
# SPDX-License-Identifier: MIT
#
# This script checks consistency between the filenames and the page
# title.
#
# Usage: ./scripts/wrong-filename.sh
# Output file for recording inconsistencies
OUTPUT_FILE="filename-consistency-check-output.txt"
# Remove existing output file (if any)
rm -f "$OUTPUT_FILE"
set -e
# Iterate through all Markdown files in the 'pages' directories
for path in $(find pages* -name '*.md' -type f); do
# Extract the expected command name from the filename
COMMAND_NAME_FILE=$(basename "$path" | head -c-4 | tr '-' ' ' | tr '[:upper:]' '[:lower:]')
# Extract the command name from the first line of the Markdown file
COMMAND_NAME_PAGE=$(head -n1 "$path" | tail -c+3 | tr '-' ' ' | tr '[:upper:]' '[:lower:]')
# Check if there is a mismatch between filename and content command names
if [ "$COMMAND_NAME_FILE" != "$COMMAND_NAME_PAGE" ]; then
echo "Inconsistency found in file: $path" >> "$OUTPUT_FILE"
echo "Expected: $COMMAND_NAME_FILE" >> "$OUTPUT_FILE"
echo "Actual : $COMMAND_NAME_PAGE" >> "$OUTPUT_FILE"
echo "" >> "$OUTPUT_FILE"
fi
done
echo "Filename consistency check completed. Output written to: $OUTPUT_FILE"
I had a second thought so instead of documenting the scripts in separate files I am adding them to the existing files header.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like head -c
doesn't seem to be supported on Mac, will try out something different instead (will DM you the script to test).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done #11810. Feel free to suggest any changes.
Hey, thanks for the script @gutjuri! Looks useful <3 |
Adresses #5071
This PR includes a script that detects pages in which the filename doesn't match the page title. I've run this script and detected several typos, which are fixed by this PR.
There are cases in which a filename-title mismatch is desired, which is why we cannot put this script into the CI.
I am unsure about the titles of the following pages: