[PR #800] [MERGED] fix: remove invalid escape sequences in i18n placeholders #772

Closed
opened 2026-02-26 21:32:53 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/dreamhunter2333/cloudflare_temp_email/pull/800
Author: @dreamhunter2333
Created: 12/30/2025
Status: Merged
Merged: 12/30/2025
Merged by: @dreamhunter2333

Base: mainHead: feature/email


📝 Commits (1)

  • d9ceab4 fix: remove invalid escape sequences in i18n placeholders

📊 Changes

1 file changed (+2 additions, -2 deletions)

View changed files

📝 frontend/src/views/admin/AccountSettings.vue (+2 -2)

📄 Description

User description

Summary

  • Fix vue-i18n SyntaxError caused by invalid escape sequences in i18n placeholder strings
  • Remove backslashes from source_patterns_placeholder in both English and Chinese translations

Problem

When opening the email forwarding configuration dialog and clicking "Add" button, a SyntaxError: 10 was thrown by vue-i18n's message compiler. This error indicates an invalid escape sequence in the i18n message string.

The problematic strings were:

source_patterns_placeholder: 'e.g. @gmail\\.com$'  // English
source_patterns_placeholder: '例如: @gmail\\.com$'  // Chinese

vue-i18n's message compiler tried to parse \\. as an escape sequence, but it's not a valid vue-i18n escape sequence, causing the syntax error.

Solution

Simplified the placeholder text by removing the backslashes and regex special characters:

source_patterns_placeholder: 'e.g. gmail.com'  // English
source_patterns_placeholder: '例如: gmail.com'  // Chinese

This also includes the previous fix for emailForwardingList initialization.

Test Plan

  • Build frontend successfully
  • Open account settings page without errors
  • Open email forwarding configuration dialog without errors
  • Click "Add" button without SyntaxError
  • Verify forwarding rules can be added and saved

🤖 Generated with Claude Code


PR Type

Bug fix


Description

  • Fixed invalid escape sequences in i18n placeholders.

  • Updated English and Chinese placeholder strings for clarity.

  • Resolved vue-i18n SyntaxError caused by invalid sequences.

  • Simplified placeholder text to avoid regex issues.


Changes walkthrough 📝

Relevant files
Bug fix
AccountSettings.vue
Fixed invalid escape sequences in i18n placeholders           

frontend/src/views/admin/AccountSettings.vue

  • Removed backslashes from source_patterns_placeholder strings.
  • Updated English placeholder to 'e.g. gmail.com'.
  • Updated Chinese placeholder to '例如: gmail.com'.
  • Simplified placeholder text to avoid regex parsing errors.
  • +2/-2     

    Need help?
  • Type /help how to ... in the comments thread for any questions about PR-Agent usage.
  • Check out the documentation for more information.

  • 🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

    ## 📋 Pull Request Information **Original PR:** https://github.com/dreamhunter2333/cloudflare_temp_email/pull/800 **Author:** [@dreamhunter2333](https://github.com/dreamhunter2333) **Created:** 12/30/2025 **Status:** ✅ Merged **Merged:** 12/30/2025 **Merged by:** [@dreamhunter2333](https://github.com/dreamhunter2333) **Base:** `main` ← **Head:** `feature/email` --- ### 📝 Commits (1) - [`d9ceab4`](https://github.com/dreamhunter2333/cloudflare_temp_email/commit/d9ceab4f482380bc9549ae0b9115243388869587) fix: remove invalid escape sequences in i18n placeholders ### 📊 Changes **1 file changed** (+2 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `frontend/src/views/admin/AccountSettings.vue` (+2 -2) </details> ### 📄 Description ### **User description** ## Summary - Fix vue-i18n SyntaxError caused by invalid escape sequences in i18n placeholder strings - Remove backslashes from `source_patterns_placeholder` in both English and Chinese translations ## Problem When opening the email forwarding configuration dialog and clicking "Add" button, a `SyntaxError: 10` was thrown by vue-i18n's message compiler. This error indicates an invalid escape sequence in the i18n message string. The problematic strings were: ```javascript source_patterns_placeholder: 'e.g. @gmail\\.com$' // English source_patterns_placeholder: '例如: @gmail\\.com$' // Chinese ``` vue-i18n's message compiler tried to parse `\\.` as an escape sequence, but it's not a valid vue-i18n escape sequence, causing the syntax error. ## Solution Simplified the placeholder text by removing the backslashes and regex special characters: ```javascript source_patterns_placeholder: 'e.g. gmail.com' // English source_patterns_placeholder: '例如: gmail.com' // Chinese ``` This also includes the previous fix for `emailForwardingList` initialization. ## Test Plan - [x] Build frontend successfully - [x] Open account settings page without errors - [x] Open email forwarding configuration dialog without errors - [x] Click "Add" button without SyntaxError - [x] Verify forwarding rules can be added and saved 🤖 Generated with [Claude Code](https://claude.ai/code) ___ ### **PR Type** Bug fix ___ ### **Description** - Fixed invalid escape sequences in i18n placeholders. - Updated English and Chinese placeholder strings for clarity. - Resolved vue-i18n SyntaxError caused by invalid sequences. - Simplified placeholder text to avoid regex issues. ___ ### **Changes walkthrough** 📝 <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Bug fix</strong></td><td><table> <tr> <td> <details> <summary><strong>AccountSettings.vue</strong><dd><code>Fixed invalid escape sequences in i18n placeholders</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> frontend/src/views/admin/AccountSettings.vue <li>Removed backslashes from <code>source_patterns_placeholder</code> strings.<br> <li> Updated English placeholder to 'e.g. gmail.com'.<br> <li> Updated Chinese placeholder to '例如: gmail.com'.<br> <li> Simplified placeholder text to avoid regex parsing errors. </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/800/files#diff-d5db89bc5b7ac5d009a78d299aa22f0f0414bbbb5006e88b30f35af8510b6b33">+2/-2</a>&nbsp; &nbsp; &nbsp; </td> </tr> </table></td></tr></tr></tbody></table> ___ > <details> <summary> Need help?</summary><li>Type <code>/help how to ...</code> in the comments thread for any questions about PR-Agent usage.</li><li>Check out the <a href="https://qodo-merge-docs.qodo.ai/usage-guide/">documentation</a> for more information.</li></details> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
    kerem 2026-02-26 21:32:53 +03:00
    Sign in to join this conversation.
    No milestone
    No project
    No assignees
    1 participant
    Notifications
    Due date
    The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

    No due date set.

    Dependencies

    No dependencies set.

    Reference
    starred/cloudflare_temp_email#772
    No description provided.