From 498805c235623adfd1a77c46369155287b4f37ef Mon Sep 17 00:00:00 2001 From: Mohamed Naufal A Date: Mon, 23 Aug 2021 19:50:28 +0400 Subject: [PATCH] fix(client): use en top contributor link for i18n (#43248) * Changes made as directed in the instructions * second revision * Third revision * Cypress Test updated * cypress test updation * directly linking to top-contributors news page Co-authored-by: Ilenia --- client/i18n/locales/chinese-traditional/links.json | 1 + client/i18n/locales/chinese/links.json | 2 ++ client/i18n/locales/english/links.json | 1 + client/i18n/locales/espanol/links.json | 1 + client/i18n/locales/italian/links.json | 1 + client/i18n/locales/portuguese/links.json | 1 + client/src/components/profile/components/Camper.tsx | 4 +++- cypress/integration/top-contributor.js | 2 +- 8 files changed, 11 insertions(+), 2 deletions(-) diff --git a/client/i18n/locales/chinese-traditional/links.json b/client/i18n/locales/chinese-traditional/links.json index c599f06382..37ec945b47 100644 --- a/client/i18n/locales/chinese-traditional/links.json +++ b/client/i18n/locales/chinese-traditional/links.json @@ -1,5 +1,6 @@ { "help-translate-url": "https://contribute.freecodecamp.org/#/i18n/chinese/how-to-translate-files", + "top-contributors": "https://www.freecodecamp.org/news/freecodecamp-top-contributors/", "footer": { "about-url": "https://chinese.freecodecamp.org/news/about/", "shop-url": "https://www.freecodecamp.org/shop/", diff --git a/client/i18n/locales/chinese/links.json b/client/i18n/locales/chinese/links.json index c599f06382..81cc9db4c7 100644 --- a/client/i18n/locales/chinese/links.json +++ b/client/i18n/locales/chinese/links.json @@ -1,5 +1,6 @@ { "help-translate-url": "https://contribute.freecodecamp.org/#/i18n/chinese/how-to-translate-files", + "top-contributors": "https://www.freecodecamp.org/news/freecodecamp-top-contributors/", "footer": { "about-url": "https://chinese.freecodecamp.org/news/about/", "shop-url": "https://www.freecodecamp.org/shop/", @@ -18,4 +19,5 @@ "forum": "https://chinese.freecodecamp.org/forum/", "news": "https://chinese.freecodecamp.org/news/" } + } diff --git a/client/i18n/locales/english/links.json b/client/i18n/locales/english/links.json index 0ad1754144..ad75cab0ec 100644 --- a/client/i18n/locales/english/links.json +++ b/client/i18n/locales/english/links.json @@ -1,5 +1,6 @@ { "help-translate-link-url": "https://contribute.freecodecamp.org/#/how-to-translate-files", + "top-contributors": "https://www.freecodecamp.org/news/freecodecamp-top-contributors/", "footer": { "about-url": "https://www.freecodecamp.org/news/about/", "shop-url": "https://www.freecodecamp.org/shop/", diff --git a/client/i18n/locales/espanol/links.json b/client/i18n/locales/espanol/links.json index 8243f73ab1..822c3f8ad5 100644 --- a/client/i18n/locales/espanol/links.json +++ b/client/i18n/locales/espanol/links.json @@ -1,5 +1,6 @@ { "help-translate-link-url": "https://contribute.freecodecamp.org/#/i18n/espanol/how-to-translate-files", + "top-contributors": "https://www.freecodecamp.org/news/freecodecamp-top-contributors/", "footer": { "about-url": "https://www.freecodecamp.org/espanol/news/acerca-de-freecodecamp-preguntas-frecuentes/", "shop-url": "https://www.freecodecamp.org/shop/", diff --git a/client/i18n/locales/italian/links.json b/client/i18n/locales/italian/links.json index 02a9264cb0..34aa16f424 100644 --- a/client/i18n/locales/italian/links.json +++ b/client/i18n/locales/italian/links.json @@ -1,5 +1,6 @@ { "help-translate-link-url": "https://contribute.freecodecamp.org/#/i18n/italian/how-to-translate-files", + "top-contributors": "https://www.freecodecamp.org/news/freecodecamp-top-contributors/", "footer": { "about-url": "https://www.freecodecamp.org/news/about/", "shop-url": "https://www.freecodecamp.org/shop/", diff --git a/client/i18n/locales/portuguese/links.json b/client/i18n/locales/portuguese/links.json index 1c00ea5d65..9c4e97eaf1 100644 --- a/client/i18n/locales/portuguese/links.json +++ b/client/i18n/locales/portuguese/links.json @@ -1,5 +1,6 @@ { "help-translate-link-url": "https://contribute.freecodecamp.org/#/i18n/portuguese/how-to-translate-files", + "top-contributors": "https://www.freecodecamp.org/news/freecodecamp-top-contributors/", "footer": { "about-url": "https://www.freecodecamp.org/news/about/", "shop-url": "https://www.freecodecamp.org/shop/", diff --git a/client/src/components/profile/components/Camper.tsx b/client/src/components/profile/components/Camper.tsx index ae6f4ae31f..543fd0a979 100644 --- a/client/src/components/profile/components/Camper.tsx +++ b/client/src/components/profile/components/Camper.tsx @@ -129,7 +129,9 @@ function Camper({

{' '} - {t('profile.contributor')} + + {t('profile.contributor')} +

{joinArray(yearsTopContributor, t)}

diff --git a/cypress/integration/top-contributor.js b/cypress/integration/top-contributor.js index 2b82144d32..f78fab75c9 100644 --- a/cypress/integration/top-contributor.js +++ b/cypress/integration/top-contributor.js @@ -32,7 +32,7 @@ describe('Top contributor in user profile', () => { cy.contains('Top Contributor').should( 'have.attr', 'href', - '/top-contributors' + 'https://www.freecodecamp.org/news/freecodecamp-top-contributors/' ); });