[PR #587] [MERGED] feat: |Worker| multi language add messages #644

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

📋 Pull Request Information

Original PR: https://github.com/dreamhunter2333/cloudflare_temp_email/pull/587
Author: @dreamhunter2333
Created: 2/19/2025
Status: Merged
Merged: 2/19/2025
Merged by: @dreamhunter2333

Base: mainHead: feature/dev


📝 Commits (1)

  • 9af4321 feat: |Worker| multi language add messages

📊 Changes

6 files changed (+95 additions, -29 deletions)

View changed files

📝 worker/src/i18n/en.ts (+18 -0)
📝 worker/src/i18n/type.ts (+18 -0)
📝 worker/src/i18n/zh.ts (+19 -1)
📝 worker/src/user_api/oauth2.ts (+14 -9)
📝 worker/src/user_api/settings.ts (+4 -1)
📝 worker/src/user_api/user.ts (+22 -18)

📄 Description

PR Type

enhancement, bug fix


Description

  • Added multi-language support for user-related messages.

  • Enhanced OAuth2 and user registration error handling.

  • Improved localization for English and Chinese languages.

  • Refactored user API to use localized messages.


Changes walkthrough 📝

Relevant files
Enhancement
en.ts
Add English user-related messages                                               

worker/src/i18n/en.ts

  • Added new user-related messages in English.
+18/-0   
type.ts
Update type definitions for new messages                                 

worker/src/i18n/type.ts

  • Updated type definitions to include new messages.
+18/-0   
zh.ts
Add Chinese user-related messages                                               

worker/src/i18n/zh.ts

  • Added new user-related messages in Chinese.
+19/-1   
oauth2.ts
Localize OAuth2 error messages                                                     

worker/src/user_api/oauth2.ts

  • Integrated localized messages for OAuth2 error handling.
+14/-9   
settings.ts
Localize user settings error messages                                       

worker/src/user_api/settings.ts

  • Integrated localized messages for user settings error handling.
+4/-1     
user.ts
Localize user registration and login messages                       

worker/src/user_api/user.ts

  • Integrated localized messages for user registration and login.
  • Improved error handling for user-related operations.
  • +22/-18 

    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/587 **Author:** [@dreamhunter2333](https://github.com/dreamhunter2333) **Created:** 2/19/2025 **Status:** ✅ Merged **Merged:** 2/19/2025 **Merged by:** [@dreamhunter2333](https://github.com/dreamhunter2333) **Base:** `main` ← **Head:** `feature/dev` --- ### 📝 Commits (1) - [`9af4321`](https://github.com/dreamhunter2333/cloudflare_temp_email/commit/9af4321c910f798564c439c574e76c98e835bf3b) feat: |Worker| multi language add messages ### 📊 Changes **6 files changed** (+95 additions, -29 deletions) <details> <summary>View changed files</summary> 📝 `worker/src/i18n/en.ts` (+18 -0) 📝 `worker/src/i18n/type.ts` (+18 -0) 📝 `worker/src/i18n/zh.ts` (+19 -1) 📝 `worker/src/user_api/oauth2.ts` (+14 -9) 📝 `worker/src/user_api/settings.ts` (+4 -1) 📝 `worker/src/user_api/user.ts` (+22 -18) </details> ### 📄 Description ### **PR Type** enhancement, bug fix ___ ### **Description** - Added multi-language support for user-related messages. - Enhanced OAuth2 and user registration error handling. - Improved localization for English and Chinese languages. - Refactored user API to use localized messages. ___ ### **Changes walkthrough** 📝 <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table> <tr> <td> <details> <summary><strong>en.ts</strong><dd><code>Add English user-related messages</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> worker/src/i18n/en.ts - Added new user-related messages in English. </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/587/files#diff-866bab2459173d441c05aaffe80d1c0d5aaef950056259c00364174c71a5b20c">+18/-0</a>&nbsp; &nbsp; </td> </tr> <tr> <td> <details> <summary><strong>type.ts</strong><dd><code>Update type definitions for new messages</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> worker/src/i18n/type.ts - Updated type definitions to include new messages. </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/587/files#diff-93a787364db63c92c7cff26f2a070af388094baa0b813de844843d5978808945">+18/-0</a>&nbsp; &nbsp; </td> </tr> <tr> <td> <details> <summary><strong>zh.ts</strong><dd><code>Add Chinese user-related messages</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> worker/src/i18n/zh.ts - Added new user-related messages in Chinese. </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/587/files#diff-afab3b78ff6b384c74a17417198e84933a9dfb3cd845fab91db1000084e192e1">+19/-1</a>&nbsp; &nbsp; </td> </tr> <tr> <td> <details> <summary><strong>oauth2.ts</strong><dd><code>Localize OAuth2 error messages</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> worker/src/user_api/oauth2.ts - Integrated localized messages for OAuth2 error handling. </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/587/files#diff-fede9bc68112c797eefa07c6e6cc20a6aa107addb3e5636757131589a435e13b">+14/-9</a>&nbsp; &nbsp; </td> </tr> <tr> <td> <details> <summary><strong>settings.ts</strong><dd><code>Localize user settings error messages</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> worker/src/user_api/settings.ts - Integrated localized messages for user settings error handling. </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/587/files#diff-0e41b1cd8b40c15de837bee6cf774f29499e490f0b565b0f5556b549f7344dd3">+4/-1</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td> <details> <summary><strong>user.ts</strong><dd><code>Localize user registration and login messages</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> worker/src/user_api/user.ts <li>Integrated localized messages for user registration and login.<br> <li> Improved error handling for user-related operations. </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/587/files#diff-aafbb1e6861a3f5ecb2bd9d51e2bf9f11f13aa96302eb755f91c233bae2a296e">+22/-18</a>&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:11 +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#644
    No description provided.