-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
[NEW FEATURE] Add script to support auto translate some fixed content #22834
Comments
any link or detailed code to the script you created? but indeed, translating the title could be the easiest things over the whole file, so...This could be useful, but the efforts to maintain such a script may not be worthy enough. |
Thanks for your attention. yes, I will submit the code later, so that we can understand it better. Precisely because this is the simplest content, I chose to start from here, first solve the basic problems, and ensure that the translation process is always correct. And the content is the most important part, the quality of machine-translated content is quite good, but most of it still has a lot of room for improvement, the calibration process is also a time-consuming thing. Here I am very grateful and admire the persons who often code review. their workload is very large. As of now, I have used this tool to complete 15 commits, and the experience is very smooth, worth a try. |
A draft version of the code. If your files path is
|
I don't have a clear opinion on introducing this script. But as @PassionPenguin said, translating headings is the simplest task. We may not need to introduce special tools for this. There are many maintainers of I believe people has their own habits of contributing to translated-content. Specific tools may not help most people. |
As everyone knows, the translation work of the MDN open source community is done by volunteers, a very time-consuming work. In order to improve the translation efficiency, we can use some tools to assist the translation work.
Practice sharing
At the beginning of the translation process, I can only complete the translation of a single file at one time. As I become familiar with the process, I can batch process some files, but I find it a painful thing.
When operating a single file, first process the header content, then the body title, and finally the body content.
When operating multiple files, I need to open multiple files, then process them one by one. Later, I thought of using the folder search and replace function by
vscode
, update and replace the keywords.When the next batch translation, I need to search and replace in batch through
shift + command + f
, case by case processing, unfortunately, there will still be omissions.I don't want to spend time doing these repetitive things anymore, I want a better way.
Any better way?
Perhaps scripts can be used to solve this problem.
This script will not solve all the problems, it currently has the ability to cover:
title
with translation.slug
andtitle
, createl10n
content template.How to use the script
The principle is very simple, it scan the directory content, match through regular expressions, and replace the fixed content.
The advantages of the script
Finally, what do you think?
The text was updated successfully, but these errors were encountered: