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

Info on localization development features #210

Merged
merged 4 commits into from
Aug 11, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
dist
*.syso

frontend/.env.local
budak7273 marked this conversation as resolved.
Show resolved Hide resolved

.DS_Store

# Created by https://www.toptal.com/developers/gitignore/api/goland+all,go,visualstudiocode
Expand Down
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ The command line output will also include a localhost URL you can visit in your

Make sure you don't already have a copy of the application running or the command will silently fail.

You may need to run `pnpm graphql-codegen` in the `frontend` directory to update the code generated from the SMR API,
mircearoata marked this conversation as resolved.
Show resolved Hide resolved
or run `pnpm translations` to update the translation data.

### Building

```bash
Expand All @@ -81,3 +84,17 @@ Then, to run it, use:
```bash
golangci-lint run --fix
```

### Localization

If you'd like to help translate and localize SMM to different languages, join our [discord server](https://discord.ficsit.app/).

SMM handles localization through the Tolgee vite integration.
budak7273 marked this conversation as resolved.
Show resolved Hide resolved
This allows for [in-context translation](https://tolgee.io/js-sdk/) - simply alt-click on a translatable element to open the Tolgee interface.

In order to edit translations in-context, you will need to provide a tolgee API key with edit permissions.
You can create an API key for yourself [here](https://translate.ficsit.app/projects/4/integrate) once you're added to the project.
To supply this API key at development time, create or edit `/frontend/.env.local` and supply the key in a similar format as `.env`.

The in-context translation screenshot feature requires installing the _Tolgee Tools_ browser extension.
After running `wails dev`, open `http://localhost:34115/` in your browser of choice to access the application.
5 changes: 4 additions & 1 deletion cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,17 @@
"Konami",
"Maximised",
"Minimised",
"mircearoata",
"Nyan",
"smmanager",
"smmprofile",
"SMUI",
"Tolgee",
"Unexpand",
"Unignore",
"urql",
"wailsjs"
"wailsjs",
"wailsjsdir"
],
// flagWords - list of words to be always considered incorrect
// This is useful for offensive words and common spelling errors.
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/lib/components/left-bar/LeftBar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
<div class="flex flex-col flex-auto h-full w-full space-y-4 h-md:space-y-8 overflow-y-auto">
<div class="flex flex-col gap-2">
<span class="pl-4 sticky top-0 z-[1] bg-surface-50-900-token">
<T defaultValue="Game version" keyName="left-bar.game-version"/>
<T defaultValue="Select Game Installation" keyName="left-bar.game-version"/>
</span>
<Select
name="installsCombobox"
Expand Down