You are working on the hyperswitch repository (Rust payment processing system).…
- User
You are working on the hyperswitch repository (Rust payment processing system).
REPOSITORY SETUP:
- Repository: juspay/hyperswitch
- Working directory: ./repos/hyperswitch_pool_7 (already cloned)
- Base commit: a0c2a6bc823fdeac193875a04ea04e7d9a81cbc2
- Task ID: juspay__hyperswitch-8934
- Version: v1.116.0
TASK DESCRIPTION: Bug: Update traditional chinese locale for payent link expired
Update traditional chinese locale for payent link expired
DETAILED CONTEXT & HINTS:
Type of Change
- Bugfix
- New feature
- Enhancement
- Refactoring
- Dependency updates
- Documentation
- CI/CD
Description
We need to update traditional chinese locale for payment link expired.
Additional Changes
- This PR modifies the API contract
- This PR modifies the database schema
- This PR modifies application configuration/environment variables
Motivation and Context
Raised by the merchant to update the locale to the correct one as shared by them.
How did you test it?
use below curl for payment link create and wait for 60 secs for payment link to get expired:
curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: ***' \ --header 'Accept-Language: zh-Hant' \ --data '{ "amount": 10, "setup_future_usage": "off_session", "currency": "EUR", "payment_link": true, "session_expiry": 60, "return_url": "https://google.com", "payment_link_config": { "theme": "#14356f", "logo": "https://logo.com/wp-content/uploads/2020/08/zurich.svg", "seller_name": "Zurich Inc." } }'Checklist
- I formatted the code
Assistant
I need to address a bug related to updating the Traditional Chinese locale for payment link expired messages. Let me start by understanding the codebase structure and locating the relevant files.
First, I'll explore the repository structure to understand where locale files might be located:
Assistant
I see there's a
zh.ymlfile which likely corresponds to Chinese locales. Let me also search for payment link related code and "expired" messages to understand the context better.Assistant
Let me search more broadly for "expired" or "payment link" related terms:
Assistant
Let me search for payment link related terms in Rust files:
Assistant
Let me check for "link_expired" specifically in the codebase:
Assistant
Let me search for "expired" in the Rust files to find where this message might be defined:
Assistant
Let me look for payment link related code specifically in the locales directory and also check if there are any files that might contain the translation key for payment link expired:
Assistant
Now let me also check if there's a "zh-hant.yml" or similar file for Traditional Chinese:
Assistant
Let me also look at the English locale file to understand the structure better:
Assistant
Now let me search more specifically for payment link related keys that might contain expired message:
Assistant
(no content)
Assistant
Now I need to understand what specific message is displayed when a payment link expires. Let me search for payment link status handling or similar:
Assistant
Let me look at the payment_link.rs file that was identified to understand how the status is handled:
Assistant
Now I need to look for how the localization is handled in the frontend templates or where the actual "expired" message might be displayed. Let me check the API models to understand the structure better:
Assistant
Let me search more specifically for PaymentLinkStatus definition:
Assistant
(no content)
Assistant
(no content)
Assistant
(no content)
Assistant
(no content)
Assistant
Let me look for the actual localization keys that might be used for displaying payment link expired messages. I need to check how translations work in the system. Let me also look for any localization or translation related code:
Assistant
Looking at the task description again, I understand that we need to update the Traditional Chinese locale for payment link expired message. From what I've found in the codebase, the
PaymentLinkStatus::Expiredenum is used but there's no specific localized message for this in the locale files.Based on the issue description and the user's curl example showing
Accept-Language: zh-Hant, I need to check what the actual message that should be shown when a payment link is expired should be in Traditional Chinese. Since I don't see an explicit "expired" message in the locale files yet, I'll create a task list and then make the appropriate change.Let me create a proper plan to make the fix:
Assistant
Let me first look for any existing tests or examples that might show what the expected Traditional Chinese message should be:
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.