-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Keeping same source in all translation #42
Comments
Nice idea to find a way to keep them sync automatically. @item4 Your JS way are not easy enough, but still a good start, we should investigate on this further. |
We can check diff by travis-ci. First, grep source code part and get count of each source part. If they have some difference, it was broken. How about this? |
How about keep code source in js files and using some directives to insert them? For example: In markdown: #### code example: ```javascript {{include 'src/a.js'}} ``` In build tools: source.replace(/\{{2}include (['"])([^\1]+)\1\}{2}/g, (match, quote, src) => fs.readFileSync(src).toString()); In my view this will also be helpful for further testing :) |
Some source code have comments that need to be translated. If you want to include them, it will not be possible to get internationalized comments (well... in reality, source code is a lot of time in English). |
Some PR update only some lang translation.
I think all source source code must be same.
How do you think about building readme with some script and seperated translation files?
For example..
and
The text was updated successfully, but these errors were encountered: