feat:add passcode.zh-CN.yaml for support chinese #1219
Merged
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.
Description
This pull request introduces a new file named
passcode.zh-CN.yaml
to facilitate support for the Chinese language. This addition aims to enhance the usability and accessibility of our service for Chinese-speaking users.Implementation
In implementing this feature, I have created a new YAML file containing Chinese translations. This file will be integrated into our existing multilingual support framework. No major code refactoring was involved, primarily adding new localization resources. I would like the reviewers to pay special attention to the accuracy and format of the translations within the file.
Tests
To verify these changes, access the
http://host:port/passcode/login/initialize
endpoint and includeAccept-Language=zh-CN
in the request header to simulate a Chinese language environment request. Subsequently, inspect the emails in the test mail server to ensure they are correctly translated into Chinese. This test aims to confirm that Chinese-speaking users receive emails that are appropriately localized and accurately translated.Note: If using mailslurper to test Chinese, the email content will appear as the following garbled text, which is due to mailslurper's issue with parsing UTF-8. The display is normal in email services like Gmail.
Todos
Currently, this change covers only a portion of the basic text translations into Chinese. Additional translations may be required in the future to expand and refine the existing translations.
Additional Context
This change is geared towards enhancing the service's usability and accessibility among our growing Chinese user base. Localization efforts like this become increasingly vital as the Chinese-speaking audience expands.