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

French Translation of all of the Vencord Installer. #59

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 95 additions & 0 deletions FR/README_FR.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# Vencord Installer

L'installateur Vencord vous permet d'installer [Vencord, le plus cute des clients moddés Discord ](https://github.com/Vendicated/Vencord)

![image](https://user-images.githubusercontent.com/45497981/226734476-5fb42420-844d-4e27-ae06-4799118e086e.png)

## Usage

### Windows

> **ATTENTION**
**NE PAS** Executer en temps qu'administrateur

Télécharger [VencordInstaller.exe](https://github.com/Vencord/Installer/releases/latest/download/VencordInstaller.exe) et l'executer.

Si l'installateur graphique ne s'ouvre pas, par exemple si vous utilisez Windows 7, 32bits, ou que votre Carte Graphique est ancienne, vous pouvez utiliser notre installateur en ligne de commande.
Pour se faire, ouvrez Powershell, executez la commande suivante, puis suivez les instructions.


```ps1
iwr "https://raw.githubusercontent.com/Vencord/Installer/main/install.ps1" -UseBasicParsing | iex
```

### Linux

Executez la commande suivante depuis votre terminal, puis suivez les instructions.


```sh
sh -c "$(curl -sS https://raw.githubusercontent.com/Vendicated/VencordInstaller/main/install.sh)"
```

### MacOs

Téléchargez la dernière version du [MacOs build](https://github.com/Vencord/Installer/releases/latest/download/VencordInstaller.MacOS.zip), dé-zippez le, puis executez `VencordInstaller.app`

Si vous obtenez l'erreur `VencordInstaller can't be opened`, faites un clic-droit sur `VencordInstaller.app` and cliquez sur ouvrir.

Cet avertissement s'affiche car l'application n'est pas signée, car je ne suis pas prêt à payer 100$ par an pour une licence de développeur Apple.

___

## Compilation depuis les sources

### Pre-requis

Vous devez installer le compilateur [du language de programmation Go](https://go.dev/doc/install) et GCC, le GNU Compiler COllection (MinGW sous Windows)

<details>
<summary>Sous linux, il faut aussi installer les dépendances suivantes</summary>

#### Dépendances de base
```sh
apt install -y pkg-config libsdl2-dev libglx-dev libgl1-mesa-dev
```

#### Dépendances X11
```sh
apt install -y xorg-dev
```

#### Dépendances Wayland
```sh
apt install -y libwayland-dev libxkbcommon-dev wayland-protocols extra-cmake-modules
```

</details>

### Compilation

#### Installation des dépendances

```sh
go mod tidy
```

#### Compilation du GUI

##### Windows / Mac / Linux X11
```sh
go build
```

##### Linux Wayland
```sh
go build --tags wayland
```

#### Compilation du CLI
```
go build --tags cli
```

Pour obtenir une meilleure compilation, vous pouvez utiliser des flags différents.
Référez vous au [Github du projet](https://github.com/Vendicated/VencordInstaller/blob/main/.github/workflows/release.yml) pour voir les flags utilisés pour les builds officiels.
110 changes: 110 additions & 0 deletions FR/cli_FR.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
//go:build cli
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Installer, a cross platform gui/cli app for installing Vencord
* Copyright (c) 2023 Vendicated and Vencord contributors
*/

package main

import (
"errors"
"flag"
"fmt"
)

var discords []any

func main() {
InitGithubDownloader()
discords = FindDiscords()

var installFlag = flag.Bool("install", false, "Installer Vencord pour une installation Discord")
var uninstallFlag = flag.Bool("uninstall", false, "Désinstaller Vencord pour une installation Discord")
var installOpenAsar = flag.Bool("install-openasar", false, "Installer OpenAsar pour une installation Discord")
var uninstallOpenAsar = flag.Bool("uninstall-openasar", false, "Désinstaller OpenAsar pour une installation Discord")
var updateFlag = flag.Bool("update", false, "Mettre à jour vos fichiers locaux Vencord")
flag.Parse()

if *installFlag || *updateFlag {
if !<-GithubDoneChan {
fmt.Println("Not", Ternary(*installFlag, "installing", "updating"), "as fetching release data failed")
return
}
}

fmt.Println("Vencord Installer cli", InstallerTag, "("+InstallerGitHash+")")

var err error
if *installFlag {
_ = PromptDiscord("patch").patch()
} else if *uninstallFlag {
_ = PromptDiscord("unpatch").unpatch()
} else if *updateFlag {
_ = installLatestBuilds()
} else if *installOpenAsar {
discord := PromptDiscord("patch")
if !discord.IsOpenAsar() {
err = discord.InstallOpenAsar()
} else {
err = errors.New("OpenAsar déjà installé")
}
} else if *uninstallOpenAsar {
discord := PromptDiscord("patch")
if discord.IsOpenAsar() {
err = discord.UninstallOpenAsar()
} else {
err = errors.New("OpenAsar n'est pas installé")
}
} else {
flag.Usage()
}

if err != nil {
fmt.Println(err)
}
}

func PromptDiscord(action string) *DiscordInstall {
fmt.Println("Merci de choisir l'installation Discord à patcher", action)
for i, discord := range discords {
install := discord.(*DiscordInstall)
fmt.Printf("[%d] %s%s (%s)\n", i+1, Ternary(install.isPatched, "(PATCHED) ", ""), install.path, install.branch)
}
fmt.Printf("[%d] Emplacement personnalisée\n", len(discords)+1)

var choice int
for {
fmt.Printf("> ")
if _, err := fmt.Scan(&choice); err != nil {
fmt.Println("Choix non valide")
continue
}

choice--
if choice >= 0 && choice < len(discords) {
return discords[choice].(*DiscordInstall)
}

if choice == len(discords) {
var custom string
fmt.Print("Installation personnalisée: ")
if _, err := fmt.Scan(&custom); err == nil {
if discord := ParseDiscord(custom, ""); discord != nil {
return discord
}
}
}

fmt.Println("Choix non valide")
}
}

func InstallLatestBuilds() error {
return installLatestBuilds()
}

func HandleScuffedInstall() {
fmt.Println("Attention!")
fmt.Println("Votre installation Discord est corrompue\nMerci de réinstaller Discord avant de re-essayer!\nSinon, Vencord ne fonctionnera pas correctement!")
}
100 changes: 100 additions & 0 deletions FR/find_discord_windows_FR.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Installer, a cross platform gui/cli app for installing Vencord
* Copyright (c) 2023 Vendicated and Vencord contributors
*/

package main

import (
"errors"
"fmt"
"os"
path "path/filepath"
"strings"
)

var windowsNames = map[string]string{
"stable": "Discord",
"ptb": "DiscordPTB",
"canary": "DiscordCanary",
"dev": "DiscordDevelopment",
}

func ParseDiscord(p, branch string) *DiscordInstall {
entries, err := os.ReadDir(p)
if err != nil {
if !errors.Is(err, os.ErrNotExist) {
fmt.Println("Erreur lors de la lecture du dossier "+p+":", err)
}
return nil
}

isPatched := false
var versions []string
for _, dir := range entries {
if dir.IsDir() && strings.HasPrefix(dir.Name(), "app-") {
resources := path.Join(p, dir.Name(), "resources")
if !ExistsFile(resources) {
continue
}
app := path.Join(resources, "app")
versions = append(versions, app)
isPatched = isPatched || ExistsFile(app) || IsDirectory(path.Join(resources, "app.asar"))
}
}

if len(versions) == 0 {
return nil
}

if branch == "" {
branch = GetBranch(p)
}

return &DiscordInstall{
path: p,
branch: branch,
versions: versions,
isPatched: isPatched,
isFlatpak: false,
isSystemElectron: false,
}
}

func FindDiscords() []any {
var discords []any

appData := os.Getenv("LOCALAPPDATA")
if appData == "" {
fmt.Println("%LOCALAPPDATA% is empty???????")
return discords
}

for branch, dirname := range windowsNames {
p := path.Join(appData, dirname)
if discord := ParseDiscord(p, branch); discord != nil {
fmt.Println("Installation trouvée ici ", p)
discords = append(discords, discord)
}
}
return discords
}

func FixOwnership(_ string) error {
return nil
}

// https://github.com/Vencord/Installer/issues/9

func CheckScuffedInstall() bool {
username := os.Getenv("USERNAME")
programData := os.Getenv("PROGRAMDATA")
for _, discordName := range windowsNames {
if ExistsFile(path.Join(programData, username, discordName)) || ExistsFile(path.Join(programData, username, discordName)) {
HandleScuffedInstall()
return true
}
}
return false
}
Loading