Skip to content

Commit

Permalink
translations #96
Browse files Browse the repository at this point in the history
  • Loading branch information
djobbo committed Jan 17, 2024
1 parent 4418a06 commit 053c3cc
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 17 deletions.
15 changes: 4 additions & 11 deletions app/i18n/TransRSC.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
"use client"

import React from "react"

import { TransNoContext, type TransProps } from "@lingui/react/server"
import { getI18n } from "./i18n"
import { Trans as BaseTrans, type TransProps } from "@lingui/react"

export const Trans = (props: TransProps) => {
const i18n = getI18n()

if (!i18n) {
throw new Error(
"Lingui for RSC is not initialized. Use `setI18n()` first in root of your RSC tree.",
)
}

return <TransNoContext {...props} lingui={{ i18n }} />
return <BaseTrans {...props} />
}
25 changes: 23 additions & 2 deletions app/i18n/locales/en.po
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ msgstr "2v2"
msgid "2v2 Rankings"
msgstr "2v2 Rankings"

#: app/[locale]/(rankings)/error.tsx:19
#: app/[locale]/error.tsx:19
msgid "An unknown error occured :("
msgstr "An unknown error occured :("

#: app/[locale]/_layout/SideNav.tsx:158
msgid "Clans"
msgstr "Clans"
Expand All @@ -41,10 +46,26 @@ msgstr "Discord Server"
msgid "Donate"
msgstr "Donate"

#: app/[locale]/(stats)/error.tsx:21
#: app/[locale]/(stats)/error.tsx:19
msgid "Failed to fetch stats"
msgstr "Failed to fetch stats"

#: app/[locale]/(rankings)/clans/[[...clansRankingsOptions]]/error.tsx:19
msgid "Failed to load the clan rankings :("
msgstr "Failed to load the clan rankings :("

#: app/[locale]/(rankings)/power-rankings/[[...rankingsOptions]]/error.tsx:19
msgid "Failed to load the power rankings :("
msgstr "Failed to load the power rankings :("

#: app/[locale]/(rankings)/ranked/queue/error.tsx:19
msgid "Failed to load the ranked queue :("
msgstr "Failed to load the ranked queue :("

#: app/[locale]/(rankings)/ranked/[[...rankingsOptions]]/error.tsx:19
msgid "Failed to load the rankings :("
msgstr "Failed to load the rankings :("

#: app/[locale]/_layout/SideNav.tsx:180
msgid "Favorites"
msgstr "Favorites"
Expand Down Expand Up @@ -114,7 +135,7 @@ msgstr "Sign in"
msgid "Stay ahead of the competition"
msgstr "Stay ahead of the competition"

#: app/[locale]/_layout/ErrorDisplay.tsx:21
#: app/[locale]/_layout/ErrorDisplay.tsx:29
msgid "Try Again"
msgstr "Try Again"

Expand Down
25 changes: 23 additions & 2 deletions app/i18n/locales/fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ msgstr "2v2"
msgid "2v2 Rankings"
msgstr "Classement 2v2"

#: app/[locale]/(rankings)/error.tsx:19
#: app/[locale]/error.tsx:19
msgid "An unknown error occured :("
msgstr "Une erreur inconnue est survenue :("

#: app/[locale]/_layout/SideNav.tsx:158
msgid "Clans"
msgstr "Clans"
Expand All @@ -41,10 +46,26 @@ msgstr "Serveur Discord"
msgid "Donate"
msgstr "Faire un don"

#: app/[locale]/(stats)/error.tsx:21
#: app/[locale]/(stats)/error.tsx:19
msgid "Failed to fetch stats"
msgstr "Impossible de récupérer les statistiques"

#: app/[locale]/(rankings)/clans/[[...clansRankingsOptions]]/error.tsx:19
msgid "Failed to load the clan rankings :("
msgstr "Impossible de charger le classement des clans :("

#: app/[locale]/(rankings)/power-rankings/[[...rankingsOptions]]/error.tsx:19
msgid "Failed to load the power rankings :("
msgstr "Impossible de charger le classement compétitif :("

#: app/[locale]/(rankings)/ranked/queue/error.tsx:19
msgid "Failed to load the ranked queue :("
msgstr "Impossible de charger la file d'attente compétitive :("

#: app/[locale]/(rankings)/ranked/[[...rankingsOptions]]/error.tsx:19
msgid "Failed to load the rankings :("
msgstr "Impossible de charger le classement :("

#: app/[locale]/_layout/SideNav.tsx:180
msgid "Favorites"
msgstr "Mes favoris"
Expand Down Expand Up @@ -114,7 +135,7 @@ msgstr "Se connecter"
msgid "Stay ahead of the competition"
msgstr "Devance la concurrence"

#: app/[locale]/_layout/ErrorDisplay.tsx:21
#: app/[locale]/_layout/ErrorDisplay.tsx:29
msgid "Try Again"
msgstr "Réessayer"

Expand Down
25 changes: 23 additions & 2 deletions app/i18n/locales/pseudo-LOCALE.po
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ msgstr ""
msgid "2v2 Rankings"
msgstr ""

#: app/[locale]/(rankings)/error.tsx:19
#: app/[locale]/error.tsx:19
msgid "An unknown error occured :("
msgstr ""

#: app/[locale]/_layout/SideNav.tsx:158
msgid "Clans"
msgstr ""
Expand All @@ -41,10 +46,26 @@ msgstr ""
msgid "Donate"
msgstr ""

#: app/[locale]/(stats)/error.tsx:21
#: app/[locale]/(stats)/error.tsx:19
msgid "Failed to fetch stats"
msgstr ""

#: app/[locale]/(rankings)/clans/[[...clansRankingsOptions]]/error.tsx:19
msgid "Failed to load the clan rankings :("
msgstr ""

#: app/[locale]/(rankings)/power-rankings/[[...rankingsOptions]]/error.tsx:19
msgid "Failed to load the power rankings :("
msgstr ""

#: app/[locale]/(rankings)/ranked/queue/error.tsx:19
msgid "Failed to load the ranked queue :("
msgstr ""

#: app/[locale]/(rankings)/ranked/[[...rankingsOptions]]/error.tsx:19
msgid "Failed to load the rankings :("
msgstr ""

#: app/[locale]/_layout/SideNav.tsx:180
msgid "Favorites"
msgstr ""
Expand Down Expand Up @@ -114,7 +135,7 @@ msgstr ""
msgid "Stay ahead of the competition"
msgstr ""

#: app/[locale]/_layout/ErrorDisplay.tsx:21
#: app/[locale]/_layout/ErrorDisplay.tsx:29
msgid "Try Again"
msgstr ""

Expand Down

0 comments on commit 053c3cc

Please sign in to comment.