Skip to content
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

Add restore command and keep translations when updating #9966

Merged
merged 3 commits into from
Apr 12, 2024

Conversation

riknoll
Copy link
Member

@riknoll riknoll commented Apr 11, 2024

When I was testing out my crowdin changes on pxt-ev3, I realized that I accidentally removed all pre-existing translations on the uploaded files when I pushed new versions (even though the new versions didn't actually change anything). The problem was that I didn't include the update mode parameter that we used to include in our API requests. This PR restores that parameter so that when we upload files pre-existing translations stick around but are marked as unapproved.

I also figured it was a good idea to restore the old versions of the pxt-ev3 files, so I added a new crowdin command for bulk restoring old file revisions:

# <date> is either milliseconds since the epoch or a date string
pxt crowdin restore <date> [force]

This command restores all files for the target to the most recent revision before the date that is passed in. You can run it with the --test flag to see exactly what it's going to do without reverting files.

Because this is a somewhat dangerous command, you also have to specify "force" at the end of the command string or it won't do anything. e.g. pxt crowdin restore 1712860596984 force

@riknoll riknoll requested a review from a team April 11, 2024 23:22
@riknoll riknoll merged commit ab7902d into master Apr 12, 2024
6 checks passed
@riknoll riknoll deleted the dev/riknoll/crowdin-unchanged branch April 12, 2024 00:27
riknoll added a commit that referenced this pull request Apr 12, 2024
* add restore command and keep translations when updating

* add --test flag

* add parameter to prevent accidental runs
riknoll added a commit that referenced this pull request Apr 12, 2024
* add restore command and keep translations when updating

* add --test flag

* add parameter to prevent accidental runs
riknoll added a commit that referenced this pull request Apr 30, 2024
* add restore command and keep translations when updating

* add --test flag

* add parameter to prevent accidental runs
riknoll added a commit that referenced this pull request Apr 30, 2024
…branch (#9991)

* [V9] Cherry picking crowdin work over to v9 branch (#9963)

* Upgrade to Crowdin V2 APIs (#9954)

* use crowdin v2 apis

* rename crowdin API

* add projectid setting

* fix test mode

* copy pxt-translations crowdin config

* re-enable crowdin stats (#9962)

* Add restore command and keep translations when updating (#9966) (#9968)

* add restore command and keep translations when updating

* add --test flag

* add parameter to prevent accidental runs
riknoll added a commit that referenced this pull request May 8, 2024
…branch (#9991)

* [V9] Cherry picking crowdin work over to v9 branch (#9963)

* Upgrade to Crowdin V2 APIs (#9954)

* use crowdin v2 apis

* rename crowdin API

* add projectid setting

* fix test mode

* copy pxt-translations crowdin config

* re-enable crowdin stats (#9962)

* Add restore command and keep translations when updating (#9966) (#9968)

* add restore command and keep translations when updating

* add --test flag

* add parameter to prevent accidental runs
riknoll added a commit that referenced this pull request May 17, 2024
…necraft stable (#10009)

* [stable9.0] Cherry picking crowdin changes over to Calliope's stable branch (#9991)

* [V9] Cherry picking crowdin work over to v9 branch (#9963)

* Upgrade to Crowdin V2 APIs (#9954)

* use crowdin v2 apis

* rename crowdin API

* add projectid setting

* fix test mode

* copy pxt-translations crowdin config

* re-enable crowdin stats (#9962)

* Add restore command and keep translations when updating (#9966) (#9968)

* add restore command and keep translations when updating

* add --test flag

* add parameter to prevent accidental runs

* hide asset name when assetEditor is false (#9878)

* Fixes for image editor in micro:bit (#9900)

* fix compile variants when palette is in dep

* add field editor param for the tagged template

* fix help link in monaco flyout (#10008)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants