Skip to content

Update translation#23

Open
TanNhatCMS wants to merge 19 commits intomasterfrom
update-translation
Open

Update translation#23
TanNhatCMS wants to merge 19 commits intomasterfrom
update-translation

Conversation

@TanNhatCMS
Copy link
Owner

@TanNhatCMS TanNhatCMS commented Mar 1, 2026

Summary by CodeRabbit

  • Localization

    • Enhanced Vietnamese language support with updated translations across the application, including improved UI labels for image compression tools, host management, and license states.
    • Added new Vietnamese translation entries for network tunnel and online domain features.
  • Chores

    • Optimized internationalization configuration.
    • Updated build artifact ignore entries.

Remove the legacy: true option from the createI18n configuration in src/lang/index.ts. This switches i18n initialization away from the legacy API and relies on the default (composition) behavior, simplifying the i18n setup and avoiding legacy API usage.
This commit adds new Vietnamese translations for Cloudflare Tunnel
related strings to the host.json file.
This commit adds Vietnamese translations for various image manipulation tools
and their configurations.
This commit updates Vietnamese translations for various strings,
improving the localization of the application.
This commit updates Vietnamese translations for various strings,
improving the localization of the application.
@coderabbitai
Copy link

coderabbitai bot commented Mar 1, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch update-translation

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.

@gemini-code-assist
Copy link

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request primarily focuses on enhancing the user experience for Vietnamese speakers by providing more accurate and comprehensive translations throughout the application. It also includes a minor technical refinement to the internationalization library configuration and updates to the ignored files list.

Highlights

  • Vietnamese Translation Updates: Numerous Vietnamese translation strings have been updated and new ones added across aside.json, base.json, host.json, licenses.json, and tools.json for improved clarity and consistency.
  • i18n Configuration Adjustment: The legacy: true option was removed from the createI18n configuration in src/lang/index.ts, streamlining the internationalization setup.
  • .gitignore Updates: New entries were added to .gitignore to exclude Go helper resource files (rsrc_windows_amd64.syso, rsrc_windows_386.syso, go.sum) and an outdated language index file (src/main/lang/index.ts) was removed.
Changelog
  • .gitignore
    • Added src/helper-go/rsrc_windows_amd64.syso, src/helper-go/rsrc_windows_386.syso, and src/helper-go/go.sum to the ignore list.
    • Removed src/main/lang/index.ts from the ignore list.
  • src/lang/index.ts
    • Removed the legacy: true option from the createI18n configuration.
  • src/lang/vi/aside.json
    • Updated the translation for 'ai' from 'AI' to 'Máy chủ AI'.
    • Added a new translation for 'networkTunnel' as 'Xuyên mạng nội bộ'.
  • src/lang/vi/base.json
    • Updated translations for various common terms such as 'enable', 'log', 'commonTemplates', 'changeLang', 'prompt', and 'confirm'.
    • Refined translations for technical tips and alerts, including 'nginxRewriteTips', 'httpServerTips', 'fileInfoTips', 'passwordError', 'linkCopySuccess', 'hostsSaveFailed', 'hostsReadFailed', 'sslMakeAlert', and 'versionErrorTips'.
    • Adjusted translations for UI elements and settings like 'cleanSelect', 'useProxy', 'proxySetting', 'quickSetup', 'customVersionDir', 'leftHosts', 'theme', and related theme options.
    • Improved clarity for process and file management messages, such as 'killProcessConfirm', 'processNotFound', 'fileBigErr', 'hostParseErr', 'ftpDirNotExists', 'staticDelAlert', 'DataDirPermissionTips', and 'needInstallHelperTips'.
  • src/lang/vi/host.json
    • Added new translations for 'OnlineDomain' and 'LocalDoman'.
    • Introduced new translation keys and messages for 'CloudflareTunnel', including 'OnlineDomainExistsTips' and 'CloudflaredNoFoundTips'.
  • src/lang/vi/licenses.json
    • Updated the translation for 'licenseActivated' from 'License activated' to 'Giấy phép được kích hoạt'.
    • Updated the translation for 'licenseNoActivated' from 'License not activated' to 'Giấy phép chưa được kích hoạt'.
  • src/lang/vi/tools.json
    • Updated translations for screenshot functionality, including 'CapturerDo', 'CapturerHideWindowDo', and 'CapturerPointPosition'.
    • Provided comprehensive Vietnamese translations for the 'ImageCompress' section, covering preview, basic configuration, batch processing, compression configuration, image effects, texture configuration, and watermark configuration.
    • Specifically updated tooltips for 'lanczos2' and 'lanczos3' kernel algorithms with more detailed explanations.
    • Translated color space terms 'lab' and 'bw' to 'Phòng thí nghiệm' and 'Đen & trắng' respectively.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request primarily updates and expands Vietnamese translations across multiple application files. Key changes include adding new translation keys for a 'network tunnel' feature and Cloudflare Tunnel integration, refining existing UI texts for improved clarity and accuracy, and providing comprehensive translations for an image compression tool's various settings (preview, basic configuration, batch processing, compression, effects, texture, and watermark). Additionally, the .gitignore file was updated to include Go helper files for Windows, and the legacy: true option was removed from the i18n configuration in src/lang/index.ts. Review comments highlight a typo in the LocalDoman key within src/lang/vi/host.json and an inaccurate translation of 'Lab' (referring to the CIELAB color space) in src/lang/vi/tools.json, suggesting corrections for technical accuracy.



"OnlineDomain": "Tên miền trực tuyến",
"LocalDoman": "Tên miền cục bộ",

Choose a reason for hiding this comment

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

high

There appears to be a typo in the JSON key LocalDoman. It should likely be LocalDomain. Since this key is used in the application code, correcting it here and in any code that references it is important to prevent issues with translations and maintain code correctness.

Suggested change
"LocalDoman": "Tên miền cục bộ",
"LocalDomain": "Tên miền cục bộ",

"cmyk": "CMYK",
"lab": "Lab",
"bw": "Black & White"
"lab": "Phòng thí nghiệm",

Choose a reason for hiding this comment

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

medium

The translation for lab seems incorrect in the context of color spaces. "Lab" refers to the CIELAB color space, and translating it to "Phòng thí nghiệm" (Laboratory) is misleading. It would be better to keep it as "Lab" or use a more descriptive term like "Không gian màu Lab" to maintain technical accuracy.

Suggested change
"lab": "Phòng thí nghiệm",
"lab": "Lab",

Comment on lines 171 to 174
i18n = createI18n({
legacy: true,
locale: l || 'en',
fallbackLocale: 'en',
messages: lang as any
Copy link

Choose a reason for hiding this comment

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

Bug: After removing legacy: true from vue-i18n, the locale assignment i18n.global.locale = l is incorrect. It should be i18n.global.locale.value = l for Composition API mode.
Severity: CRITICAL

Suggested Fix

In src/lang/index.ts, update the locale assignment to use the .value property, which is required for ref objects in Vue's Composition API. Change i18n.global.locale = l to i18n.global.locale.value = l.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: src/lang/index.ts#L171-L174

Potential issue: The pull request migrates `vue-i18n` to Composition API mode by
removing `legacy: true`. However, the code for changing the application's language in
the `AppI18n` function still uses the legacy assignment `i18n.global.locale = l`. In
Composition API mode, `i18n.global.locale` is a `ref` object, and its value must be set
via the `.value` property. Because of this incorrect assignment, any attempt by the user
to switch languages will fail silently, breaking the language selection functionality.

Did we get this right? 👍 / 👎 to inform future reviews.

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: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.gitignore:
- Line 35: Remove the ignore entry for src/helper-go/go.sum from .gitignore and
ensure the module's go.sum is tracked and committed: delete the line containing
src/helper-go/go.sum in the .gitignore, add the helper-go module's go.sum to
version control (git add) and commit it so the checksum file is present for
reproducible builds and module integrity checks.

In `@src/lang/vi/tools.json`:
- Line 252: Replace the incorrect Vietnamese translation for the "lab" key in
src/lang/vi/tools.json: the value "Phòng thí nghiệm" (which means laboratory)
should be changed to the technical color-space notation (e.g., "LAB" or
"L*a*b*") to match other color-space entries like "sRGB" and "CMYK" and
correctly represent the CIELAB color model.

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ae59c7b and 6f501b3.

📒 Files selected for processing (7)
  • .gitignore
  • src/lang/index.ts
  • src/lang/vi/aside.json
  • src/lang/vi/base.json
  • src/lang/vi/host.json
  • src/lang/vi/licenses.json
  • src/lang/vi/tools.json
💤 Files with no reviewable changes (1)
  • src/lang/index.ts

package-lock.json
src/helper-go/rsrc_windows_amd64.syso
src/helper-go/rsrc_windows_386.syso
src/helper-go/go.sum
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# Check .gitignore at line 35 and surrounding context
head -n 40 .gitignore | tail -n 10

Repository: TanNhatCMS/FlyEnv

Length of output: 244


🏁 Script executed:

# Look for go.sum and go.mod files in src/helper-go/
fd -t f '^go\.(sum|mod)$' src/helper-go/

Repository: TanNhatCMS/FlyEnv

Length of output: 81


🏁 Script executed:

# Check if there are any other go.sum files in the repository
fd -t f '^go\.sum$'

Repository: TanNhatCMS/FlyEnv

Length of output: 43


Remove src/helper-go/go.sum from .gitignore

In Go projects, go.sum contains cryptographic checksums of module versions and must be committed to version control to ensure reproducible builds and verify module integrity. The current .gitignore entry ignores it, which violates Go best practices and creates security and reproducibility risks.

Proposed fix
 src/helper-go/rsrc_windows_amd64.syso
 src/helper-go/rsrc_windows_386.syso
-src/helper-go/go.sum
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
src/helper-go/go.sum
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.gitignore at line 35, Remove the ignore entry for src/helper-go/go.sum from
.gitignore and ensure the module's go.sum is tracked and committed: delete the
line containing src/helper-go/go.sum in the .gitignore, add the helper-go
module's go.sum to version control (git add) and commit it so the checksum file
is present for reproducible builds and module integrity checks.

"cmyk": "CMYK",
"lab": "Lab",
"bw": "Black & White"
"lab": "Phòng thí nghiệm",
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Incorrect translation: "lab" refers to LAB color space, not "laboratory".

In the context of color spaces, "lab" refers to the CIELAB color model (Lab*), a device-independent color space. "Phòng thí nghiệm" means "laboratory" in Vietnamese, which is a mistranslation here.

The value should remain as "LAB" or "Lab*" since it's a technical abbreviation, similar to how "sRGB", "RGB", and "CMYK" are kept unchanged in the same section.

Proposed fix
-      "lab": "Phòng thí nghiệm",
+      "lab": "LAB",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"lab": "Phòng thí nghiệm",
"lab": "LAB",
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/lang/vi/tools.json` at line 252, Replace the incorrect Vietnamese
translation for the "lab" key in src/lang/vi/tools.json: the value "Phòng thí
nghiệm" (which means laboratory) should be changed to the technical color-space
notation (e.g., "LAB" or "L*a*b*") to match other color-space entries like
"sRGB" and "CMYK" and correctly represent the CIELAB color model.

xpf0000 and others added 10 commits March 1, 2026 21:38
This commit updates Vietnamese translations for various strings across multiple files, improving the localization of the application.
Add Vietnamese translations for Cloudflare Tunnel in src/lang/vi/host.json: TunnelInitFailTips (includes {error}) and TunnelRule. Also adjust CloudflaredNoFoundTips punctuation and remove extra blank lines for cleanup.
…ity (xpf0000#563)

* ✨ feat(git-cheatsheet): Add multi-language Git cheatsheet with code copy functionality

* ✨ feat(git-cheatsheet): Add cleanup for window copy function
   and expose copy function to window.

* ✨ feat(git-cheatsheet): Update git stash command and improve copy button accessibility

* ✨ feat(git-cheatsheet): Improve credential helper documentation and copy behavior

This commit refactors the git cheatsheet component to:
- Update credential helper documentation in both English and Vietnamese.
- Enhance the code copy functionality by:
    - Storing copy timeouts to prevent overlapping reset animations.
    - Disabling HTML parsing in markdown-it for security.
    - Filtering out comment lines from code snippets before copying.
    - Using a reactive approach for language memo selection.

* ✨ feat(git-cheatsheet): Refactor code block rendering and add copy button functionality

* ✨ feat(git-cheatsheet): Prevent overlapping copy animations and enhance security
2. Add Cloudflared Module
3. Python And Go add new project creation features.
2. Add Cloudflared Module
3. Python And Go add new project creation features.
2. Add Cloudflared Module
3. Python And Go add new project creation features.
(key: string, res: any) => {
IPC.off(key)
if (res?.data?.tunnelId && res?.data?.tunnelToken) {
this.tunnelId = res?.data?.tunnelToken
Copy link

Choose a reason for hiding this comment

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

Bug: In fetchTunnel, this.tunnelId is incorrectly assigned the value of res?.data?.tunnelToken instead of res?.data?.tunnelId, breaking subsequent API calls.
Severity: CRITICAL

Suggested Fix

In the fetchTunnel method, change the assignment for this.tunnelId from res?.data?.tunnelToken to res?.data?.tunnelId to ensure the correct ID is stored.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: src/render/core/CloudflareTunnel/CloudflareTunnel.ts#L38

Potential issue: In the `fetchTunnel` method, the response from an IPC call contains
`tunnelId` and `tunnelToken`. The code incorrectly assigns the value of
`res?.data?.tunnelToken` to `this.tunnelId`. This causes subsequent API calls that rely
on a correct `tunnelId`, such as `initDNSRecords()` and `initTunnelConfig()`, to fail
because they are passed a token instead of an ID. This will prevent the Cloudflare
Tunnel feature from initializing and starting correctly.

Comment on lines +204 to 207
cp.on('error', (err) => {
console.error('Cloudflared 无法启动:', err)
reject(new Error(`无法执行二进制文件: ${err.message}`))
})

This comment was marked as outdated.

xpf0000 and others added 3 commits March 2, 2026 17:52
2. Add Cloudflared Module
3. Python And Go add new project creation features.
# Conflicts:
#	src/lang/vi/aside.json
#	src/lang/vi/host.json
Comment on lines +67 to +69
const openOutUrl = (item: CloudflareTunnelDnsRecord) => {
const url = `http://${item.subdomain}.${item.zoneName}`
shell.openExternal(url).catch()
Copy link

Choose a reason for hiding this comment

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

Bug: The openOutUrl function incorrectly hardcodes http:// for external Cloudflare Tunnel URLs, which are always served over https://.
Severity: MEDIUM

Suggested Fix

In the openOutUrl function, change the hardcoded http:// protocol to https:// when constructing the URL. The line const url = \http://${item.subdomain}.${item.zoneName}`should be updated toconst url = `https://${item.subdomain}.${item.zoneName}``.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: src/render/components/CloudflareTunnel/setup.ts#L67-L69

Potential issue: The `openOutUrl` function hardcodes the `http://` protocol when
constructing the external URL for a Cloudflare Tunnel. According to Cloudflare's
architecture, external tunnel traffic is always served over `https://` with automatic
SSL/TLS termination. This mismatch will cause browsers to attempt to open an insecure
URL, leading to either an automatic redirect to HTTPS, which is a poor user experience,
or potential security warnings. The code correctly handles protocol selection for local
service URLs but fails to apply the correct protocol for external URLs.

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