-
-
Notifications
You must be signed in to change notification settings - Fork 72
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
Only download cache for system languages and English #420
Conversation
…kup | Changed the package for Unzipping
Can we add some tests please? |
@agnivade Sure I'll add the tests All passed again. 🤔 |
Btw, @vivekjoshi556 Workflow requiring approval before running is enabled for first time contributors so that maintainers can review the code before running the action. (This is to minimize multiple failed runs). After this PR is merged, in future the workflow will run by default for you (without requiring approval).
The reason for it to pass was that I approved your action run an hour ago when you made the comment. |
I understand they require approval. I was talking about the last time the jobs ran for my changes. |
Oh, it is possible that the action run was cancelled as it reached 6 hours limit (default for action runs in GitHub's runners). |
@MasterOdin I am done with the mentioned changes. Please review the PR. |
// If the lang is english then keep the url simple, otherwise add language. | ||
const suffix = (lang === 'en' ? '' : '.' + lang); | ||
const url = config.get().repositoryBase + suffix + '.zip'; | ||
const folderName = path.join(loc, 'pages' + suffix); | ||
const REQUEST_TIMEOUT = 10000; |
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.
Regarding this, we recently added support for the English archive in the same format tldr-pages-en.zip
(after a request from tealdeer's maintainer). Can it be implemented here instead? (This will officially land in the upcoming client spec 2.1)
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 should be easy.
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.
It should be noted that only the archive name should be generalized here, while still leaving in place that the english archive is extracted to the pages
directory. Changing that behavior is a much larger one, which should be done in a separate PR that's focused purely on that, as will also have to take into account backwards compatibility.
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.
So, won't it be better to handle this entirely in the same (other) PR?
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'd say so, but not sure how much @kbdharun wants to see the archive name changed here. The old zip will continue to work anyway for the time being that it's not exactly urgent to make that change either.
I guess this PR can be merged first, then I will rebase mine with this. |
Description
Fixes #419
The task at hand was to update the client so that it would only download the zip files for languages that were supported by the user system. In any case, files in english should be downloaded to act as backup.
Explanation of Solution
Checklist
Please review this checklist before submitting a pull request.
npm run test:all
)