Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize translation prompts #126

Merged

Conversation

MilesHan
Copy link
Contributor

💻 变更类型 | Change Type

  • ✨ feat
  • 🐛 fix
  • ♻️ refactor
  • 💄 style
  • 🔨 chore
  • 📝 docs

🔀 变更说明 | Description of Change

  1. Optimize the JSON translation prompt to maintain the JSON format of the translation results
  2. Updated JSON example to add JSON array

📝 补充信息 | Additional Information

#100

I reproduced the issue above. For example, when I use the original prompt to translate the example en_US.json I gave, it will appear stably ... is not valid JSON
image

After add Do not include any additional text or explanations outside the JSON object.Start directly with a left brace and end with a right brace.,I tested several complex nested JSON files and all of them were translated stably.

@lobehubbot
Copy link
Member

👍 @MilesHan

Thank you for raising your pull request and contributing to our Community
Please make sure you have followed our contributing guidelines. We will review it as soon as possible.
If you encounter any problems, please feel free to connect with us.
非常感谢您提出拉取请求并为我们的社区做出贡献,请确保您已经遵循了我们的贡献指南,我们会尽快审查它。
如果您遇到任何问题,请随时与我们联系。

@kiwiflydream
Copy link

感谢,我把你的提示语放到 reference 后,就极少出现类似的错误了。

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Thanks, after I put your prompt in reference, similar errors rarely occur.

@canisminor1990 canisminor1990 merged commit 12520fe into lobehub:master Sep 13, 2024
2 checks passed
@lobehubbot
Copy link
Member

❤️ Great PR @MilesHan ❤️

The growth of project is inseparable from user feedback and contribution, thanks for your contribution!
项目的成长离不开用户反馈和贡献,感谢您的贡献!

@lobehubbot
Copy link
Member

🎉 This PR is included in version 1.20.0 🎉

The release is available on npm package (@latest dist-tag)

Your semantic-release bot 📦🚀

@lobehubbot
Copy link
Member

🎉 This PR is included in version 2.15.2 🎉

The release is available on npm package (@latest dist-tag)

Your semantic-release bot 📦🚀

@lobehubbot
Copy link
Member

🎉 This PR is included in version 1.10.1 🎉

The release is available on npm package (@latest dist-tag)

Your semantic-release bot 📦🚀

@lobehubbot
Copy link
Member

🎉 This PR is included in version 1.3.2 🎉

The release is available on npm package (@latest dist-tag)

Your semantic-release bot 📦🚀

@lobehubbot
Copy link
Member

🎉 This PR is included in version 1.4.3 🎉

The release is available on npm package (@latest dist-tag)

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants