feat(minecraft-version): Add English to extension #18374
+53
−16
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Example for the Proposed Route(s) / 路由地址示例
Note / 说明
Add English language parameter to Minecraft Version extension. Set
en
as default as it described in manifest.This pull request includes changes to add language support and improve internationalization for the Minecraft version route. The most important changes include adding a new language parameter, updating descriptions, and implementing internationalization for version types and titles.
Language support:
lib/routes/minecraft/version.ts
: Added a new optionallang
parameter to the route path and example to support language selection.lib/routes/minecraft/version.ts
: Updated theparameters
section to include the newlang
parameter with options for Chinese and English.Internationalization:
lib/routes/minecraft/version.ts
: Updated thedescription
section to include both English and Chinese translations for version types and link types.lib/routes/minecraft/version.ts
: Introduced ani18n
object to handle internationalized strings for version types, titles, and updates in both English and Chinese.lib/routes/minecraft/version.ts
: Modified thehandler
function to use thei18n
object for generating titles and descriptions based on the selected language.