File size: 3,183 Bytes
b4e647f
776840e
1fccca5
b4e647f
 
 
 
 
 
 
 
 
 
 
 
 
1fccca5
b4e647f
 
 
 
 
 
 
776840e
1fccca5
 
776840e
b4e647f
 
 
 
 
 
 
1fccca5
65202c2
 
1fccca5
 
5ae7646
 
776840e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1fccca5
b4e647f
 
 
1fccca5
f46c39f
65202c2
1fccca5
 
5ae7646
 
776840e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1fccca5
b4e647f
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
import { createI18nApi, declareComponentKeys } from "i18nifty";
import { Typography } from "@mui/material";
export {declareComponentKeys};

//List the languages you with to support
export const languages = ["en", "fr"] as const;

//If the user's browser language doesn't match any 
//of the languages above specify the language to fallback to:  
export const fallbackLanguage = "en";

export type Language = typeof languages[number];

export type LocalizedString = Parameters<typeof resolveLocalizedString>[0];

export const {
	useTranslation,
	resolveLocalizedString, 
	useLang, 
	$lang,
	useResolveLocalizedString,
	/** For use outside of React */
	getTranslation,
} = createI18nApi<
    | import ("pages/AddModelPage/AddModelPage").I18nimport ("components/Header/Header").I18n
    | import ("components/Navigation/Navigation").I18n
    | import ("components/shared/AuthContainer").I18n
>()(
    { 
      languages, 
      fallbackLanguage
    },
    {
        "en": {
            "header": {
                "tagline": "Benchmark for large language models in French",
                "service": "LLM leaderboard for the French language"
            },
            "Navigation": {
                "submit": "Submit",
                "about": "About"
            },
            "AddModelPage": {
                "title": "Submit a model for evaluation",
                "subtitle": "Add your model to the LLM leaderboard for the French language."
            },
            "AuthContainer": {
                "login": "Login to submit a model",
                "need": "You need to be logged in with your Hugging Face account to submit a model",
                "logout": "Logout",
                "button": "Sign in with Hugging Face",
                "loggedin": ({user}) => (
                    <Typography variant="body1">
                        Connected as <strong>{user}</strong>
                    </Typography>
                )
            }
        },
	/* spell-checker: disable */
	"fr": {
            "header": {
                "tagline": "Comparaison de modèles d'IA génératifs sur des jeux de données adaptés à la langue française",
                "service": "Leaderboard des modèles de langage pour le français"
            },
            "Navigation": {
                "submit": "Soumettre",
                "about": "A propos"
            },
            "AddModelPage": {
                "title": "Soumettre un modele a l'evaluation",
                "subtitle": "Ajoutez votre modele au leaderboard des modeles de langage pour le francais"
            },
            "AuthContainer": {
                "login": "Se connecter pour soumettre un modele",
                "need": "Il vous faut vous connecter avec votre compte Hugging Face pour soumettre un modele",
                "logout": "Se deconnecter",
                "button": "Se connecter avec Hugging Face",
                "loggedin": ({user}) => (
                    <Typography variant="body1">
                        Connecte en tant que <strong>{user}</strong>
                    </Typography>
                )
            }
        }
	/* spell-checker: enable */
    }
);