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

Add localization #131

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

Add localization #131

wants to merge 24 commits into from

Conversation

brklyn8900
Copy link
Contributor

@brklyn8900 brklyn8900 commented Nov 25, 2024

Resolves #129

Brief description

Add localization utilizing next-intl.

Checklist

  • I have built this pull request locally
  • I have ran the unit tests locally
  • I have manually tested this pull request
  • I have reviewed my pull request
  • I have added any relevant tests

Demonstration

Copy link

netlify bot commented Nov 25, 2024

Deploy Preview for koinos-io ready!

Name Link
🔨 Latest commit 67b2c59
🔍 Latest deploy log https://app.netlify.com/sites/koinos-io/deploys/67ab6c5177c7920008e3bea2
😎 Deploy Preview https://deploy-preview-131--koinos-io.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@sgerbino
Copy link
Member

The drop down code should be the same code used elsewhere to prevent issues like the ones shown.

image
image

<Link
href={router.asPath}
locale="it"
className={`d-block px-3 py-1 text-decoration-none text-left ${router.locale === 'es' ? 'active' : ''}`}
Copy link
Member

Choose a reason for hiding this comment

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

Copy paste error? locale == 'es' seems wrong.

<Link
href={router.asPath}
locale="fa"
className={`d-block px-3 py-1 text-decoration-none text-left ${router.locale === 'es' ? 'active' : ''}`}
Copy link
Member

Choose a reason for hiding this comment

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

Copy paste error? locale == 'es' seems wrong.

Copy link
Member

@sgerbino sgerbino left a comment

Choose a reason for hiding this comment

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

I noticed a regression when using the /api/programs endpoint.

PR:

{
  "programs": [
    {
      "key": "earnOnKoinos",
      "id": "earnOnKoinos",
      "url": "https://deploy-preview-131--koinos-io.netlify.app/programs/earn-on-koinos",
      "website": "http://dapp.chainge.finance/earn?chain=KOIN",
      "images": {
        "banner": "https://deploy-preview-131--koinos-io.netlify.app/images/programs/earn-on-koinos.png"
      },
      "featured": true,
      "active": true
    },
    {
      "key": "lordsForsakenQuest",
      "id": "lordsForsakenQuest",
      "url": "https://deploy-preview-131--koinos-io.netlify.app/programs/lords-forsaken-quest",
      "website": "https://taskon.xyz/quest/6984752",
      "images": {
        "banner": "https://deploy-preview-131--koinos-io.netlify.app/images/programs/lords-forsaken-quest.png"
      },
      "featured": false,
      "active": true
    }
  ]
}

Live site:

{
  "programs": [
    {
      "key": "earnOnKoinos",
      "url": "https://koinos.io/programs/earn-on-koinos",
      "title": "Earn on Koinos",
      "subtitle": "Earn up to 16% APY on Koinos!",
      "shortDescription": "Chainge Finance and Koinos Group have partnered to offer up to 16.24% yield for simply bridging and holding BTC, ETH, or USDT on Koinos through the Chainge app.",
      "description": "Chainge makes Koinos interoperable with over 20 blockchains and their novel DEX aggregation technology delivers some of the lowest cost swaps in all of crypto. High yields and low fees are a powerful flywheel and the Earn on Koinos program kicks it into high gear!",
      "keyPoints": [
        "Earn up to 16% on bridged assets",
        "Earn APY on USDT, ETH, and BTC",
        "Earn KOIN with your USDT, ETH, and BTC"
      ],
      "website": "http://dapp.chainge.finance/earn?chain=KOIN",
      "images": {
        "banner": "https://koinos.io/images/programs/earn-on-koinos.png"
      },
      "featured": true,
      "active": true
    }
  ]
}

During the merge, we left Lord's Forsaken Quest active when it shouldn't be.
But a larger issue is that we are breaking backwards compatibility with our Telegram bot by not providing any text describing programs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE]: Localization
2 participants