OpenZeppelin / ethernaut

Web3/Solidity based wargame
MIT License
1.98k stars 676 forks source link

Add support for other languages #93

Closed eternauta1337 closed 2 years ago

eternauta1337 commented 6 years ago

Ethernaut should be available in other languages like Spanish or Chinese so that non-english speaking members of the community can have access to the resource.

This issue specifically refers to functionality and NOT content, i.e. just the dapp's generic ability to localize content and not the content in other specific languages itself.

The feature should allow to localize level description markdown flles as well as website elements such as titles, buttons, etc.

Ideally, all non-markdown localizations should be contained on a single localization mapping file.

The UI should include a button that allows a user to change the active language, and it should automatically detect the user's language.

gitcoinbot commented 6 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


This issue now has a funding of 750.0 DAI (750.0 USD @ $1.0/DAI) attached to it.

gitcoinbot commented 6 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work has been started.

These users each claimed they can complete the work by 1 month, 3 weeks ago. Please review their action plans below:

1) jzarecta has applied to start work _(Funders only: approve worker | reject worker)_.

I am native spanish speaker has provided translation services for many projects including KDE, OpenOffice, and Apache software as well as on the crypto world to DASH, OpenLedger, Electrum wallet, and Edge Wallet.

Learn more on the Gitcoin Issue Details page.

2) hibeekaey has been approved to start work.

Use a localization plugin with a single localization mapping file

Learn more on the Gitcoin Issue Details page.

3) starsinmypockets has applied to start work _(Funders only: approve worker | reject worker)_.

I would like to have a go at this. I have worked with the localization scheme for the apostrophe cms (https://github.com/apostrophecms/apostrophe/blob/master/lib/modules/apostrophe-i18n/index.js) as well as with Drupal. My approach would be along these lines:

• create a utility function for use in templates to wrap strings • implement i18n using 3rd party library to access appropriate values for locale (for example i18n library via npm) • detect default language using third party library • store / lookup user-selected language via cookie • create UI element to allow users to switch preferred language • include tests of utility function, template behavior, and UI language switch

Learn more on the Gitcoin Issue Details page.

iamonuwa commented 6 years ago

@ajsantander how can I reach your team?

spm32 commented 6 years ago

Sorry @Jzarecta but @iamonuwa got to it first :) Looking forward to having you on some other bounties though!

iamonuwa commented 6 years ago

@gitcoinbot work in progress. Sending in PR soon

Jzarecta commented 6 years ago

I wonder if there is something I need to provide to get approved?

eternauta1337 commented 6 years ago

Thx @iamonuwa (and @Jzarecta nonetheless)! Looking forward to your work.

iamonuwa commented 6 years ago

@ajsantander am currently working on the logic. I have added react-intl which is what am using. Added the language to the window global instance to be served together with the other variables inside the window instance. I have a slight issue. On the loadGameData middleware, I see that its loading the game data. I was thinking of adding an additional directory say en for english, es for spanish. Then each of the newly created directory will have the descriptions folder as its content.

What do you think?

iamonuwa commented 6 years ago

@ajsantander are you there?

cupOJoseph commented 6 years ago

Overriding bounty to submitted.

iamonuwa commented 6 years ago

@ajsantander am currently working on the logic. I have added react-intl which is what am using. Added the language to the window global instance to be served together with the other variables inside the window instance. I have a slight issue. On the loadGameData middleware, I see that its loading the game data. I was thinking of adding an additional directory say en for english, es for spanish. Then each of the newly created directory will have the descriptions folder as its content.

What do you think?

@ajsantander are you there?

eternauta1337 commented 6 years ago

Yes! Sorry. These are busy days, you know, because devcon =/

I like the approach. Sounds good!

iamonuwa commented 5 years ago

Cool then. Will be submitting a PR to add that.

iamonuwa commented 5 years ago

@ajsantander please can you review? Added a new commit last night.

iamonuwa commented 5 years ago

@ajsantander are you there?

spm32 commented 5 years ago

Hey @iamonuwa I think @ajsantander will be able to review soon, devcon just wrapped up so assuming he's probably still getting back into the regular flow of things.

vs77bb commented 5 years ago

@iamonuwa @ajsantander Bumping this one... I'm still in a post-Devcon haze, I'm sure we'll get there sooner than later now 🙂

iamonuwa commented 5 years ago

Still waiting on the team to give feedback

iamonuwa commented 5 years ago

@ajsantander please review my latest PR

iamonuwa commented 5 years ago

@ajsantander are you there? Still waiting for your feedback

CPSTL commented 5 years ago

Hey @ajsantander ! Gitcoin Ambassador here to ask if @iamonuwa 's has received feedback on his latest PR?

rmshea commented 5 years ago

Hey @ajsantander, Ryan from Gitcoin here. Any word on this one? Feel free to reach out if you have any questions for me.

eternauta1337 commented 5 years ago

Hello! Yes, Sorry again for the delay. Reviewing the PR now...

owocki commented 5 years ago

hey @ajsantander from team gitcoin ! is there someone on your team who has the cycles to do some review? cc @iamonuwa

gitcoinbot commented 5 years ago

⚡️ A tip worth 750.00000 DAI (750.0 USD @ $1.0/DAI) has been granted to @iamonuwa for this issue from @ceresstation. ⚡️

Nice work @iamonuwa! Your tip has automatically been deposited in the ETH address we have on file.

gitcoinbot commented 5 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


This Bounty has been completed.

Additional Tips for this Bounty:


xaler5 commented 2 years ago

Multilanguage support is now in master branch