Skip to content

Commit

Permalink
Version française
Browse files Browse the repository at this point in the history
Version française
  • Loading branch information
xnooztvFR committed Aug 22, 2022
1 parent 7a3101f commit 1a6a119
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 37 deletions.
22 changes: 11 additions & 11 deletions src/app/components/AuthSetup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ export default function AuthSetup(props) {
}, [props.user]);

function handleSetupAuthResponse({error}) {
if (error == "Error 2") return setAuthSetupError("Please add a phone number to this account.");
if (error == "Error 29") return setAuthSetupError("There is an authenticator already set up on this account. Please remove it first.");
if (error == "Error 2") return setAuthSetupError("Veuillez ajouter un numéro de téléphone à ce compte.");
if (error == "Error 29") return setAuthSetupError("Un authentificateur est déjà configuré sur ce compte. Veuillez d'abord le supprimer.");
if (error == null) return setReceivedSMS(true);
return setAuthSetupError("New error never seen before - reload the application and try again. If this error persists, please make an issue on the GitHub!");
return setAuthSetupError("Nouvelle erreur jamais vue auparavant - rechargez l'application et réessayez. Si cette erreur persiste, merci de créer un problème sur le GitHub!");
}


Expand All @@ -57,23 +57,23 @@ export default function AuthSetup(props) {
return (
<div className="m-2 flex flex-wrap">
<div className="mx-4 font-bold text-2xl w-full text-white">
Authenticator
Authentificateur
</div>

{/* SMS authentication flow whilst a user isn't using Vapor as their authenticator */}
{!props.user.usingVapor && <div>
<div className="m-4 mt-2 p-4 rounded bg-white shadow w-full">
{!receivedSMS && <button className="font-bold" onClick={async () => {
handleSetupAuthResponse(await setupDesktopAuth());
}}>Setup Authenticator</button>}
}}>Configurer l'authentificateur</button>}

<div className="text-red-400 text-sm">
{authSetupError}
</div>


{receivedSMS && <div>
<div>SMS from Steam sent! <br/> Please enter the code you receive to complete the setup.</div>
<div>SMS de Steam envoyé! <br/> Veuillez entrer le code que vous avez reçu pour terminer la configuration.</div>
<br />
<input name="" placeholder="SMS" className="rounded border p-1 m-1" onChange={(e) => setSMSCode(e.target.value)}/>
<button className="p-1 m-1 bg-black text-white rounded" onClick={async () => {
Expand All @@ -84,7 +84,7 @@ export default function AuthSetup(props) {
setReceivedSMS(false);
props.updateUser();
}
}}>Finish Setup</button>
}}>Terminer la configuration</button>
</div>}
</div>
<div className="m-4 mt-2 p-4 rounded bg-white shadow w-full">
Expand All @@ -95,7 +95,7 @@ export default function AuthSetup(props) {
await importMaFile()
);
if (s == null) props.updateUser();
}}>Import .maFile</button>
}}>Importer un fichier .maFile</button>
<div className="text-red-400 text-sm">
{importAuthError}
</div>
Expand All @@ -105,18 +105,18 @@ export default function AuthSetup(props) {
{/* This user is using Vapor! */}
{props.user.usingVapor && <div className="m-4 mt-2 p-4 rounded bg-white shadow w-full">
<div className="justify-center text-center w-full">
<span className="text-gray-400">Your Steam Guard code is</span>
<span className="text-gray-400">Votre code Steam Guard est</span>
<br />
<span className="font-bold text-2xl">{authCode}</span>
</div>
<div className="justify-center text-center w-full">
{30 - seconds}s left
{30 - seconds}s restantes
</div>
</div>}
{props.user.usingVapor && <div className="m-4 p-2 rounded bg-red-600 shadow text-white block text-sm" onClick={async () => {
const response = await revokeDesktopAuth();
((response.error == null) ? props.updateUser() : "");
}}>Revoke Steam Authenticator
}}>Révoquer l'authentificateur Steam
</div>}
</div>)
}
4 changes: 2 additions & 2 deletions src/app/components/Confirmations.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ export default function Confirmations(props) {
function renderConfirmations() {
if (!props.user.usingVapor)
return (<div className="m-4 mt-2 p-4 rounded bg-yellow-300 shadow flex w-full justify-center font-bold">
You're not using Vapor as your authenticator - can't get your confirmations
Vous n'utilisez pas Vapor comme authentificateur - vous ne pouvez pas obtenir vos confirmations d'échanges
</div>);
if (confirmations.length == 0)
return (<div className="m-4 mt-2 p-4 rounded bg-white shadow flex w-full justify-center">
No confirmations found
Aucune confirmation d'échange trouvée
</div>)

return confirmations.map((conf) => {
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default function Home(props) {
});
}}>
<FontAwesomeIcon icon={faGamepad} transform={{ rotate: 42 }} size="10x" className="absolute bottom-0 right-0 opacity-20" />
{playingGames ? "Stop Idling" : "Play All Games"}
{playingGames ? "Stop Idling" : "Jouez à tous les jeux"}
</div>
</div>)
}
4 changes: 2 additions & 2 deletions src/app/screens/AccountScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default function AccountScreen(props) {
props.setSwitchingAccounts(false);
}}>
<div className="bg-black text-white text-sm text-center opacity-0 absolute h-6 -top-6 flex justify-center content-center w-24 rounded-t group-hover:opacity-100">
Add Account
Ajouter un compte
</div>
<div className="float-left h-24 w-24 rounded bg-black bg-opacity-10 justify-center content-center flex">
<FontAwesomeIcon icon={faPlus} className="m-auto h-16 w-16" color="white" opacity="20%" />
Expand All @@ -53,7 +53,7 @@ export default function AccountScreen(props) {
{switchingUser && <div className="absolute w-full h-full bg-black bg-opacity-20 z-20"></div>}
<div style={{backgroundColor: "#0e0d1c"}} className="p-20 justify-center items-start h-screen w-screen">

<div id="ScreenTitle" className="text-4xl font-bold text-white my-3">Which account<br/> will you choose today?</div>
<div id="ScreenTitle" className="text-4xl font-bold text-white my-3">Quel compte<br/> choisiras-tu aujourd'hui?</div>
<br />
<div id="ScreenContents" className="overflow-y-auto h-full py-10">
{renderAccounts()}
Expand Down
8 changes: 4 additions & 4 deletions src/app/screens/BaseScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,19 @@ export default function BaseScreen(props) {
</Link>
<br />
<div className="text-sm w-full cursor-pointer" onClick={() => window["electron"].window.loadURL(`https://steamcommunity.com/profiles/${props.user.steamid}`)}>
<div className="font-bold text-gray-400 text-md p-2 pl-4 hover:text-white">Profile</div>
<div className="font-bold text-gray-400 text-md p-2 pl-4 hover:text-white">Profil</div>
</div>
<br />
<div className="text-sm w-full cursor-pointer" onClick={() => window["electron"].currentUser.openSteam(`/chat/`)}>
<div className="font-bold text-gray-400 text-md p-2 pl-4 hover:text-white">Chat</div>
</div>
<br />
<div className="text-sm w-full cursor-pointer" onClick={() => window["electron"].currentUser.openSteam(`/profiles/${props.user.steamid}/tradeoffers/`)}>
<div className="font-bold text-gray-400 text-md p-2 pl-4 hover:text-white">Trades</div>
<div className="font-bold text-gray-400 text-md p-2 pl-4 hover:text-white">Offres d'échanges</div>
</div>
<br />
<div className="text-sm w-full cursor-pointer" onClick={() => window["electron"].currentUser.openSteam(`/profiles/${props.user.steamid}/inventory/`)}>
<div className="font-bold text-gray-400 text-md p-2 pl-4 hover:text-white">Inventory</div>
<div className="font-bold text-gray-400 text-md p-2 pl-4 hover:text-white">Inventaire</div>
</div>
<br />
<Link className="text-sm w-full cursor-pointer" to="/confirmations">
Expand All @@ -68,7 +68,7 @@ export default function BaseScreen(props) {
await props.updateUser();
props.setSwitchingAccounts(true);
}}>
<div className="font-bold text-gray-400 text-md p-2 pl-4 hover:text-white">Switch Accounts</div>
<div className="font-bold text-gray-400 text-md p-2 pl-4 hover:text-white">Changer de compte</div>
</div>
<br />
</div>
Expand Down
18 changes: 9 additions & 9 deletions src/app/screens/LoginScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ export default function LoginScreen(props) {
<div className="text-3xl font-semibold ml-3 text-white">Vapor</div>
</div>

<span className="text-xs mt-6 text-gray-100">Desktop Authenticator for Steam</span>
<span className="text-xs mt-6 text-gray-100">Authentificateur de bureau pour Steam</span>

{/* Login form */}
<div className="w-full content-center justify-center flex flex-wrap mt-10">
<input id="accountName" name="username" placeholder="Username" className="rounded border p-1 mx-1" onChange={(e) => setAccountName(e.target.value)}/>
<input id="password" type="password" name="password" placeholder="Password" className="rounded border p-1 mx-1" onChange={(e) => setPassword(e.target.value)}/>
<input id="accountName" name="username" placeholder="Nom d'utilisateur" className="rounded border p-1 mx-1" onChange={(e) => setAccountName(e.target.value)}/>
<input id="password" type="password" name="password" placeholder="Mot de passe" className="rounded border p-1 mx-1" onChange={(e) => setPassword(e.target.value)}/>

{/* Submit details */}
{<button className="bg-black text-white rounded px-3 text-sm inline" onClick={async () => {
Expand Down Expand Up @@ -68,32 +68,32 @@ export default function LoginScreen(props) {

switch(error) {
case SteamLoginErrors.MissingDetails:
return (<div className="text-xs text-red-600">Missing your username or password <FontAwesomeIcon icon={faSadCry} className="opacity-40 align-middle" size="2x" /></div>)
return (<div className="text-xs text-red-600">Il n'y a aucun nom d'utilisateur ou mot de passe <FontAwesomeIcon icon={faSadCry} className="opacity-40 align-middle" size="2x" /></div>)
case SteamLoginErrors.IncorrectDetails:
return (<div className="text-sm text-red-600">Your username or password is incorrect. Please try again.</div>);
return (<div className="text-sm text-red-600">Votre nom d'utilisateur ou votre mot de passe est incorrect. Veuillez réessayer.</div>);
case SteamLoginErrors.SteamGuardMobile:
return (<div>
<input name="steamguardmobile" placeholder="Mobile Auth Code" className="rounded border p-1 mx-1" onChange={(e) => setAuthMethod({
<input name="steamguardmobile" placeholder="Code d'authentification mobile" className="rounded border p-1 mx-1" onChange={(e) => setAuthMethod({
method: "twoFactorCode",
value: e.target.value
})}/>
</div>)
case SteamLoginErrors.SteamGuard:
return (<div>
<input name="steamguard" placeholder="Email Auth Code" className="rounded border p-1 mx-1" onChange={(e) => setAuthMethod({
<input name="steamguard" placeholder="Code d'authentification email" className="rounded border p-1 mx-1" onChange={(e) => setAuthMethod({
method: "authCode",
value: e.target.value
})} />
</div>)
case SteamLoginErrors.Captcha:
return (<div>
<div className="">Please fill in this captcha</div>
<div className="">Merci de remplir ce captcha</div>
<img src={captchaurl} />
<input name="captcha" placeholder="Captcha" className="rounded border p-1 mx-1" onChange={(e) => setCaptcha(e.target.value)}/>
</div>)
default:
return (<div className="text-sm text-red-300">
You have been timed out temporarily. Please try again later.
Vous avez été interrompu temporairement. Veuillez réessayer plus tard.
</div>)
}
}
Expand Down
8 changes: 4 additions & 4 deletions src/lib/steam/authenticate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,9 @@ export async function importTwoFactor(prom: Promise<Electron.OpenDialogReturnVal
);
const account = getMainAccount();
if (!(data.shared_secret && data.revocation_code && data.identity_secret && typeof data.Session == "object"))
return "Invalid maFile";
return "maFile invalide";
if (data.Session.SteamID !== account.steamid) {
return "This maFile belongs to another account";
return "Ce maFile appartient à un autre compte";
}
editStore(_store => {
const account = getMainAccount();
Expand All @@ -176,9 +176,9 @@ export async function importTwoFactor(prom: Promise<Electron.OpenDialogReturnVal
} catch (err) {
switch (err.name) {
case "SyntaxError":
return "Invalid maFile";
return "maFile invalide";
default:
return "Something went wrong: " + err.toString();
return "Quelque chose s'est mal passé: " + err.toString();
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/lib/steam/trade-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export function getActiveIncomingOffers(): Promise<any[]> {
export function acceptOffer(offerid: string): Promise<string> {
return new Promise((resolve, reject) => {
getTradeOfferManager().then((manager) => {
if (manager == null) return reject("No offers for this user under this offerid");
if (manager == null) return reject("Aucune offre pour cet utilisateur sous cet ID d'offre");
manager.getOffer(offerid, (err, offer) => {
if (err) return reject(err);
offer.accept(false, (err, status) => {
Expand All @@ -65,7 +65,7 @@ export function acceptOffer(offerid: string): Promise<string> {
export function declineOffer(offerid: string): Promise<void> {
return new Promise((resolve, reject) => {
getTradeOfferManager().then((manager) => {
if (manager == null) return reject("No offers for this user under this offerid");
if (manager == null) return reject("Aucune offre pour cet utilisateur sous cet ID d'offre");

manager.getOffer(offerid, (err, offer) => {
if (err) return reject(err);
Expand Down
2 changes: 1 addition & 1 deletion src/lib/steam/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export interface SteamLoginDetails {

export enum SteamLoginErrors {
MissingDetails = "MissingDetails",
IncorrectDetails = "Error: Uncaught Error: The account name or password that you have entered is incorrect.",
IncorrectDetails = "Erreur: Erreur non interceptée: Le nom de compte ou le mot de passe que vous avez entré est incorrect.",
SteamGuard = "SteamGuard",
SteamGuardMobile = "SteamGuardMobile",
Captcha = "CAPTCHA",
Expand Down
2 changes: 1 addition & 1 deletion src/lib/steam/user-instance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export async function playGames(appids: any[]): Promise<void> {
user.setPersona(SteamUser.EPersonaState.Online);

// Play either the games we've been told to play or play everything we have access to
user.gamesPlayed(appids != null ? appids : ["🎮 Idling with Vapor", ...user.getOwnedApps()]);
user.gamesPlayed(appids != null ? appids : ["🎮 Inactif avec Vapor", ...user.getOwnedApps()]);
return resolve();
});
});
Expand Down

0 comments on commit 1a6a119

Please sign in to comment.