Conversation
|
I wrote a little snippet to translate the problems and solutions using the Google Translate API. The plan is to use those as a base and do little changes to them and push. Here's the snippet. const fs = require('fs');
const apiKey = 's3cr3tk3y';
const googleTranslate = require('google-translate')(apiKey);
fs.readdir('./problems', (err, files) => {
if (err) throw err;
const problems = files.reduce((sum, file) => {
sum[file] = fs.readFileSync(`problems/${file}/problem.md`);
return sum;
}, {});
const solutions = files.reduce((sum, file) => {
sum[file] = fs.readFileSync(`problems/${file}/solution.md`);
return sum;
}, {});
Object.keys(problems).forEach((problem) => {
const problemText = problems[problem].toString('utf8');
googleTranslate.translate(problemText, 'is', (err, translation) => {
fs.writeFileSync(`problems/${problem}/problem_is.md`, translation.translatedText);
});
});
Object.keys(solutions).forEach((solution) => {
const solutionText = solutions[solution].toString('utf8');
googleTranslate.translate(solutionText, 'is', (err, translation) => {
fs.writeFileSync(`problems/${solution}/solution_is.md`, translation.translatedText);
});
});
}); |
|
Ok I pushed all the machine translated files so the above TODO list will serve as a list of stuff that we need to go over and make fixes to the translations. |
| @@ -0,0 +1 @@ | |||
| --- # Síað! Gott starf sía þessi fylking. Í næstu áskorun við munum vinna á dæmi um aðgang array gildi. Hlaupa `javascripting` í vélinni til að velja næsta áskorun. --- No newline at end of file | |||
|
Ok, guess I'll start at the bottom then... |
|
I can't push changes because I don't have the right access and I can't really PR a PR... What to do? |
|
@gudmundurmar I've sent you an invite to become a collaborator on this fork! |
|
Accepted and pushed. EDIT: |
I think you can actually. I do it all the time 😁 |
Technically you can, a PR is between branches (in this case Not to worry though, you're a contributor now so 😁 |
|
Working on |
|
It looks like the words surrounded by Do you guys mind if I alter the names of the commits using rebase? You just have to use |
|
I don't really mind but maybe we should save that till last in order to minimize the risk of rebasing something out of the history? |
|
Good point @koddsson. Will do that last then :) |
|
Working on |
|
Working on |
|
Working on |
3f9fd17 to
39c6e3f
Compare

Putting this here as a work in progress to have a better overview of translation progress.
Things that need translating:
Translations that need to be verified: