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
scripts/set-page-title.py: add script #12732
Conversation
36d3a18
to
f7d3c18
Compare
Very good find, but does this effect the finding of it? Some clients must be using file names as their command finder. |
My thought was that they would use the title. With tlrc I was able to find the pages with and without a dash in between (e.g. |
https://github.com/tldr-pages/tldr/blob/main/CLIENT-SPECIFICATION.md#page-names
|
But for consistency it seems better to me to keep the title of a translated page the same as the English one |
Very fun 'first in a few months' issue to dive into, thanks @sebastiaanspeck. If you can update the branch again, I'll have a look tonight / tomorrow. |
Done! Although there was no need to update the branch as there were no conflicts |
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 after this minor suggestion and also the previous suggestion about the get_tldr_root() are applied.
About the |
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 current tldr root checking based on the current path can raise an exception caused by the if condition.
Co-authored-by: Vítor Henrique <87824454+vitorhcl@users.noreply.github.com>
This comment was marked as resolved.
This comment was marked as resolved.
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.
I have a non-blocking suggestion that we can apply in another PR as it is a bit bigger. It is targeted to new contributors/mantainers.
We should probably do this after we create _common.py
.
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.
Details aside, this PR LGTM after we resolve the discussion about the persistence of the symlink problem.
Thank you for your contribution and for your patience!
As mentioned before, I do not have any experience/issues with the symlink problem. I rely on @kbdharun and @acuteenvy on this. |
Tested the script locally and the symlink issue isn't present on Windows, just a minor fix to the example in docs and this PR is GTG. |
Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
I found out, when running wrong-filename.sh, that there were translated pages that translated the title of the page. This makes the page unfindable when using a client.
Therefore I decided to create a Python-script, inspired on set-more-info-link, to sync the titles.
Right now there are 290 pages for which the title does not match the English title.
This includes two scenarios:
The first scenario definitely needs to be fixed, but for the second scenario we could argue if the English page is “incorrect”.
The dry-run output (unsorted)