Skip to content

Conversation

@SorYoshino
Copy link
Contributor

@SorYoshino SorYoshino commented Oct 21, 2025

Summary

Updates tern-subtitle-file-translator to version 5.3.7, improves metadata clarity, and enhances autoupdate reliability.

Changes

  • Updated to version 5.3.7
  • Rewrote notes section for clearer explanation of free usage vs. paid translation services
  • Switched to 64-bit GitHub release asset Windows-win32-x64-5.3.7.zip
  • Updated hash to match the new release
  • Renamed shortcut executable to 字幕机翻.exe
  • Updated autoupdate URL to match new release naming format

Note

Since the upstream $.tag_name and $.assets.name have changed before, to avoid unnecessary maintenance in the future, this PR uses a regex to capture them.

Testing

┏[ D:\Software\Scoop\Local\apps\scoop\current\bin][ master ≡]
└─> .\checkver.ps1 -App tern-subtitle-file-translator -Dir "D:\Temporary\Software\Microsoft\Windows Sandbox\Repositories\Scoop\Buckets\Extras\bucket" -f
tern-subtitle-file-translator: 5.3.7 (scoop version is 5.3.7)
Forcing autoupdate!
Autoupdating tern-subtitle-file-translator
DEBUG[1761059659] [$updatedProperties] = [url hash] -> D:\Software\Scoop\Local\apps\scoop\current\lib\autoupdate.ps1:491:5
DEBUG[1761059659] $substitutions (hashtable) -> D:\Software\Scoop\Local\apps\scoop\current\lib\autoupdate.ps1:221:5
DEBUG[1761059659] $substitutions.$version                       5.3.7
DEBUG[1761059659] $substitutions.$matchHead                     5.3.7
DEBUG[1761059659] $substitutions.$urlNoExt                      https://github.com/1c7/Translate-Subtitle-File/releases/download/v5.3.7/Windows-win32-x64-5.3.7
DEBUG[1761059659] $substitutions.$basename                      Windows-win32-x64-5.3.7.zip
DEBUG[1761059659] $substitutions.$dotVersion                    5.3.7
DEBUG[1761059659] $substitutions.$basenameNoExt                 Windows-win32-x64-5.3.7
DEBUG[1761059659] $substitutions.$matchTag                      v5.3.7
DEBUG[1761059659] $substitutions.$matchTail
DEBUG[1761059659] $substitutions.$match1                        5.3.7
DEBUG[1761059659] $substitutions.$preReleaseVersion             5.3.7
DEBUG[1761059659] $substitutions.$url                           https://github.com/1c7/Translate-Subtitle-File/releases/download/v5.3.7/Windows-win32-x64-5.3.7.zip
DEBUG[1761059659] $substitutions.$patchVersion                  7
DEBUG[1761059659] $substitutions.$buildVersion
DEBUG[1761059659] $substitutions.$minorVersion                  3
DEBUG[1761059659] $substitutions.$underscoreVersion             5_3_7
DEBUG[1761059659] $substitutions.$majorVersion                  5
DEBUG[1761059659] $substitutions.$cleanVersion                  537
DEBUG[1761059659] $substitutions.$baseurl                       https://github.com/1c7/Translate-Subtitle-File/releases/download/v5.3.7
DEBUG[1761059659] $substitutions.$matchName                     Windows-win32-x64-5.3.7.zip
DEBUG[1761059659] $substitutions.$dashVersion                   5-3-7
DEBUG[1761059659] $hashfile_url = $null -> D:\Software\Scoop\Local\apps\scoop\current\lib\autoupdate.ps1:224:5
DEBUG[1761059660] $jsonpath = $..assets[?(@.browser_download_url == 'https://github.com/1c7/Translate-Subtitle-File/releases/download/v5.3.7/Windows-win32-x64-5.3.7.zip')].digest -> D:\Software\Scoop\Local\apps\scoop\current\lib\autoupdate.ps1:132:5
Found: 78ae47eaa1669579613def311f74600d66bac8835b2103570f545ccbbc5daf1b using Github Mode
Writing updated tern-subtitle-file-translator manifest

┏[ D:\Temporary\Software\Microsoft\Windows Sandbox\Repositories\Scoop\Buckets\Extras\bucket][ tern-subtitle-file-translator ≢  ~1]
└─> scoop install .\tern-subtitle-file-translator.json
Installing 'tern-subtitle-file-translator' (5.3.7) [64bit] from 'D:\Temporary\Software\Microsoft\Windows Sandbox\Repositories\Scoop\Buckets\Extras\bucket\tern-subtitle-file-translator.json'
Starting download with aria2 ...
Download: Download Results:
Download: gid   |stat|avg speed  |  %|path/URI
Download: ======+====+===========+===+===================================================
Download: 421eb8|OK  |   4.2MiB/s|100|D:/Software/Scoop/Local/cache/tern-subtitle-file-translator#5.3.7#22267b6.zip
Download: Status Legend:
Download: (OK):download completed.
Checking hash of Windows-win32-x64-5.3.7.zip ... ok.
Extracting Windows-win32-x64-5.3.7.zip ... done.                                                                        
Linking D:\Software\Scoop\Local\apps\tern-subtitle-file-translator\current => D:\Software\Scoop\Local\apps\tern-subtitle-file-translator\5.3.7
Creating shortcut for Tern-Subtitle File Translator (字幕机翻.exe)
'tern-subtitle-file-translator' (5.3.7) was installed successfully!
Notes
-----
The application itself is free to use forever.
However, translation services are billed separately and charged based on actual usage.
For more details on translator service pricing and available plans, please refer to https://doc.tern.1c7.me/folder/pricing.

  • Use conventional PR title: <manifest-name[@version]|chore>: <general summary of the pull request>
  • I have read the Contributing Guide

Summary by CodeRabbit

  • Updates
    • Application version bumped to 5.3.7.
    • Windows 64‑bit download and checksum updated.
    • Improved update detection and auto-update using dynamic release metadata.
    • Release notes expanded to include pricing, usage and licensing details.
    • Installer now renames the executable to "Tern-Subtitle File Translator.exe" during setup.

@coderabbitai
Copy link

coderabbitai bot commented Oct 21, 2025

Walkthrough

Manifest updated: version 4.1.0 → 5.3.7; top-level url/hash/extract_dir moved into architecture.64bit; notes converted to an array; checkver switched to url/jsonpath/regex; autoupdate uses $match placeholders; added pre_install to rename the executable.

Changes

Cohort / File(s) Summary
Scoop manifest
bucket/tern-subtitle-file-translator.json
Version bumped to 5.3.7; removed top-level url/hash/extract_dir and added architecture.64bit with url/hash; converted notes string → notes array; replaced GitHub-style checkver with {url,jsonpath,regex}; updated autoupdate to use $matchTag/$matchName; added pre_install script to rename executable.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐰
A hop of bytes, a manifest bright,
New notes in rows, the exe set right,
Versions leap and links align,
I nibble changes, small and fine,
Happy hops — the build takes flight ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The PR title "tern-subtitle-file-translator: Update to version 5.3.7, fix checkver & autoupdate, improve notes" follows the conventional format and clearly summarizes the main changes in the pull request. It accurately reflects the three key aspects of the changeset: the version bump to 5.3.7, the fixes to the checkver and autoupdate mechanisms, and the improved notes section. The title is concise, specific, and directly related to the manifest changes shown in the raw summary, making it easy for teammates to understand the primary purpose when scanning commit history.
Description Check ✅ Passed The PR description is comprehensive and well-structured, addressing all key requirements from the template. It includes a clear summary section explaining the update, a detailed changes section listing all modifications, a note section justifying the regex approach for maintainability, and an extensive testing section with debug output demonstrating that checkver, autoupdate, and installation work correctly. The description also includes the required elements: a reference to a related issue ("Relates to #16379"), confirmation of using the conventional PR title format, and confirmation of reading the Contributing Guide, with both checkboxes marked as completed.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 09d734b and 1a34141.

📒 Files selected for processing (1)
  • bucket/tern-subtitle-file-translator.json (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: WindowsPowerShell
🔇 Additional comments (6)
bucket/tern-subtitle-file-translator.json (6)

2-2: Version bump is straightforward and correct.

Version updated from 4.1.0 to 5.3.7 aligns with the release tag and PR objectives.


9-13: Notes improvement clarifies pricing and usage model clearly.

The migration from a string to an array format is well‑structured and provides essential user context: that the application is free but translation services are billed separately, with a direct link to pricing documentation. This is a helpful UX improvement.


27-31: checkver refactor improves maintainability through regex extraction.

The migration from GitHub release API structure to URL/jsonpath/regex pattern is an improvement:

  • jsonpath ($.assets[?(@.name =~ /Windows.+/i)].browser_download_url) correctly filters for Windows assets using case-insensitive matching.
  • regex ((?i)download/(?<tag>v?([\\d.-]+))/(?<name>[^\"]+)) extracts the version tag and asset basename with named capture groups.

This approach reduces coupling to GitHub's exact URL structure and will be more resilient to future upstream changes, as noted in the PR objectives.


32-34: autoupdate configuration correctly uses regex capture groups.

The autoupdate URL properly references the $matchTag and $matchName placeholders captured by the checkver regex. This pattern is consistent with Scoop's autoupdate framework and maintains good separation: version discovery (checkver) is independent of version patching (autoupdate).


20-20: Verification confirms the review comment is accurate and well-reasoned.

The archive analysis shows that Windows-win32-x64-5.3.7.zip contains exactly one top-level .exe file (with a Unicode-encoded name), confirming the pre_install script's assumption is valid for this release. The Select-Object -First 1 logic will correctly target and rename this single executable. The review comment appropriately acknowledges both the mitigation (targeting top-level files only) and the reasonable caveat (potential issues if upstream changes the archive structure in the future).


14-19: Confirm the hash matches the downloaded file locally.

The URL successfully resolves and serves the expected Windows-win32-x64-5.3.7.zip asset (~156 MB). The hash has valid SHA256 format. However, the hash value cannot be cryptographically verified without downloading and computing it against the file. Verify on your end that the SHA256 of the downloaded asset matches 78ae47eaa1669579613def311f74600d66bac8835b2103570f545ccbbc5daf1b.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Contributor

All changes look good.

Wait for review from human collaborators.

tern-subtitle-file-translator

  • Lint
  • Description
  • License
  • Hashes
  • Checkver
  • Autoupdate

Check the full log for details.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5f608c4 and 09d734b.

📒 Files selected for processing (1)
  • bucket/tern-subtitle-file-translator.json (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: WindowsPowerShell
🔇 Additional comments (3)
bucket/tern-subtitle-file-translator.json (3)

9-13: Excellent fix for previous shortcut creation error.

The ASCII-only filename "Tern-Subtitle File Translator.exe" (replacing the problematic Chinese characters) correctly addresses the prior Windows shortcut creation failure ("Value does not fall within the expected range"). This resolves the issue reported in the previous review.

Also applies to: 20-20, 23-23


14-19: Version and architecture structure looks correct.

The shift to an architecture.64bit object and updated URL/hash are well-formed. The hash format is valid (64 hex characters for SHA256) and matches the tested asset.


27-34: Capture group names are correctly mapped per Scoop's naming convention.

The regex defines named groups (?<tag>...) and (?<name>...), which map to $matchTag and $matchName in autoupdate. This follows Scoop's documented convention where named capture groups have their first letter uppercased in the autoupdate placeholder.

Copy link
Member

@z-Fng z-Fng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@SorYoshino
Copy link
Contributor Author

This still doesn’t solve the problem of having multiple .exe files.

Perhaps we should temporarily put this PR on hold and merge it only after the issue is resolved in Scoop Core?

@z-Fng
Copy link
Member

z-Fng commented Oct 22, 2025

Similar issues can arise if the executable file name changes. We'll just have to wait for users to report issues.

@z-Fng z-Fng merged commit 61211e8 into ScoopInstaller:master Oct 22, 2025
3 checks passed
@SorYoshino
Copy link
Contributor Author

Alright, thanks for your reply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants