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

[WIP] Icelandic translations. #1

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open

Conversation

koddsson
Copy link

@koddsson koddsson commented May 29, 2016

Putting this here as a work in progress to have a better overview of translation progress.

Things that need translating:

  • i18n/
    • is.json
    • troubleshooting_is.md

Translations that need to be verified:

  • problems/:
    • accessing-array-values/
    • array-filtering/
    • arrays/
    • for-loop/
    • function-arguments/
    • function-return-values/
    • functions/
    • if-statement/
    • introduction/
    • looping-through-arrays/
    • number-to-string/
    • numbers/
    • object-keys/
    • object-properties/
    • objects/
    • revising-strings/
    • rounding-numbers/
    • scope/
    • string-length/
    • strings/
    • this/
    • variables/

@koddsson
Copy link
Author

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);
    });
  });
});

@koddsson
Copy link
Author

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. ---
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😂

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Síað!

😆

@gudmundurmar
Copy link
Collaborator

gudmundurmar commented May 29, 2016

Ok, guess I'll start at the bottom then...
Taking variables/

@gudmundurmar
Copy link
Collaborator

I can't push changes because I don't have the right access and I can't really PR a PR... What to do?

@benediktvaldez
Copy link
Member

@gudmundurmar I've sent you an invite to become a collaborator on this fork!

@gudmundurmar
Copy link
Collaborator

gudmundurmar commented May 30, 2016

Accepted and pushed. variables/
Next up this/

EDIT: this/ is empty... So I guess I'll take strings/ instead

@koddsson
Copy link
Author

koddsson commented May 30, 2016

and I can't really PR a PR

I think you can actually. I do it all the time 😁

@benediktvaldez
Copy link
Member

and I can't really PR a PR

I think you can actually. I do it all the time 😁

Technically you can, a PR is between branches (in this case translation-icelandic to master), so in theory you could fork this fork (yo dawg) and make a PR to the translation-icelandic branch which would then appear in this PR.

Not to worry though, you're a contributor now so 😁

@koddsson
Copy link
Author

Working on array-filtering.

@gudmundurmar
Copy link
Collaborator

gudmundurmar commented May 31, 2016

It looks like the words surrounded by didn't come through in my commits for some reason...

Do you guys mind if I alter the names of the commits using rebase?

You just have to use git pull --rebase next time you pull instead of a regular pull (if you aren't doing that already).

@koddsson
Copy link
Author

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?

@gudmundurmar
Copy link
Collaborator

gudmundurmar commented May 31, 2016

Good point @koddsson. Will do that last then :)
Btw are you escaping ` in the terminal or using the github client for your commits?

@koddsson
Copy link
Author

Working on array

@koddsson
Copy link
Author

koddsson commented May 31, 2016

Working on for-loop

@gudmundurmar
Copy link
Collaborator

Working on scope

@gudmundurmar gudmundurmar force-pushed the translation-icelandic branch from 3f9fd17 to 39c6e3f Compare June 1, 2016 23:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants