From 2b3577e4c31897c0fe3384a33efc9b30e8b13d8e Mon Sep 17 00:00:00 2001 From: hazre <37149950+hazre@users.noreply.github.com> Date: Fri, 19 Sep 2025 02:24:03 +0200 Subject: [PATCH 1/4] docs: content changes part 2 --- .../docs/creating-a-mod/initial-setup.mdx | 2 +- .../packaging-and-publishing.mdx | 57 +++ .../docs/creating-a-mod/writing-code.mdx | 34 +- .../docs/getting-started/installation.mdx | 2 +- src/content/docs/guides/configuration.mdx | 2 +- src/content/docs/guides/localization.mdx | 345 ++++++++++++++++++ 6 files changed, 432 insertions(+), 10 deletions(-) create mode 100644 src/content/docs/guides/localization.mdx diff --git a/src/content/docs/creating-a-mod/initial-setup.mdx b/src/content/docs/creating-a-mod/initial-setup.mdx index feaa205..60a5838 100644 --- a/src/content/docs/creating-a-mod/initial-setup.mdx +++ b/src/content/docs/creating-a-mod/initial-setup.mdx @@ -36,7 +36,7 @@ You'll need BepInEx (via BepisLoader) installed to develop mods. Follow our [ins :::note[Console Window] If you've used BepInEx before, you may notice the console window doesn't appear — this is disabled by default in BepisLoader. -You can enable the console by opening `BepInEx/config/BepInEx.cfg` and in the `[Logging.Console]` section, setting `Enabled = true` +You can enable the console by opening `BepInEx/config/BepInEx.cfg` and in the `[Logging.Console]` section, setting `Enabled = true`, mod managers also let you easily access config options and edit them. ::: ## Installing a Decompiler diff --git a/src/content/docs/creating-a-mod/packaging-and-publishing.mdx b/src/content/docs/creating-a-mod/packaging-and-publishing.mdx index 938fc05..9afbd78 100644 --- a/src/content/docs/creating-a-mod/packaging-and-publishing.mdx +++ b/src/content/docs/creating-a-mod/packaging-and-publishing.mdx @@ -15,6 +15,63 @@ Before uploading your mod, you need to have built it into a `.dll`. The [Resonite BepInEx Template](https://github.com/ResoniteModding/BepInEx.Templates) comes with Thunderstore packaging built-in, using [TCLI](https://github.com/thunderstore-io/thunderstore-cli). +### Understanding thunderstore.toml + +TCLI uses a `thunderstore.toml` configuration file to define how your mod should be packaged. This file is created automatically when using the template and controls everything about your package. + +Here's what each section does: + +```toml title="thunderstore.toml" +[config] +schemaVersion = "0.0.1" + +[package] +namespace = "AuthorName" # Your Thunderstore team name +name = "ProjectName" # Your mod's name (no spaces/special chars) +versionNumber = "1.0.0" # Version from your .csproj file +description = "Example mod description" # Max 250 characters +websiteUrl = "https://github.com/ResoniteModding/ProjectName" # Your GitHub/website URL +containsNsfwContent = false + +# Dependencies your mod needs +[package.dependencies] +ResoniteModding-BepisLoader = "1.3.1" +ResoniteModding-BepisResoniteWrapper = "1.0.0" + +[build] +icon = "./icon.png" +readme = "./README.md" +outdir = "./build" + +# Copy compiled DLL to plugins folder +[[build.copy]] +source = "./ProjectName/bin/Release/ProjectName.dll" +target = "plugins/ProjectName/" + +# Include debug symbols (optional but recommended) +[[build.copy]] +source = "./ProjectName/bin/Release/ProjectName.pdb" +target = "plugins/ProjectName/" + +# Optional: Include CHANGELOG +# [[build.copy]] +# source = "./CHANGELOG.md" +# target = "/" + +[publish] +repository = "https://thunderstore.io" +communities = ["resonite"] + +[publish.categories] +resonite = ["mods"] # Categories for your mod +``` + +:::note[Categories] +You can always change your mod's categories later on Thunderstore's website after publishing. The categories in `thunderstore.toml` are just the initial settings. +::: + +### Building Packages + If you used the template, you have two options for building packages: ### Using TCLI directly diff --git a/src/content/docs/creating-a-mod/writing-code.mdx b/src/content/docs/creating-a-mod/writing-code.mdx index 16c1f83..3e11093 100644 --- a/src/content/docs/creating-a-mod/writing-code.mdx +++ b/src/content/docs/creating-a-mod/writing-code.mdx @@ -69,12 +69,36 @@ public class Plugin : BasePlugin ``` -This is a very basic BepInEx 6 plugin. +This is a very basic BepInEx 6 plugin that uses **BepisResoniteWrapper** - a library that provides commonly-used hooks and events for Resonite mods. -Work in progress documentation, more will be added. For now, for more info, see BepInEx's own documentation: +## BepisResoniteWrapper + +[BepisResoniteWrapper](https://github.com/ResoniteModding/BepisResoniteWrapper) is already included in the template as a dependency. This library simplifies mod development by providing ready-to-use events for common Resonite modding scenarios. In the example above, we're using the `OnEngineReady` event to safely access FrooxEngine functionality after the engine has fully initialized. + +### Available Events + +- **`ResoniteHooks.OnEngineReady`** - Fired when the Resonite engine has finished initializing + - Safe to access `Engine.Current` and all FrooxEngine classes + - This is where most of your mod's initialization should happen + +:::tip[Why use OnEngineReady?] +Many FrooxEngine classes and systems aren't available when your plugin first loads. Using `OnEngineReady` ensures everything is initialized before your mod tries to access it, preventing crashes and errors. +::: + +To use additional events or hooks, check the [BepisResoniteWrapper documentation](https://github.com/ResoniteModding/BepisResoniteWrapper) or explore other mods for examples. + +## Writing Your First Patch + +Work in progress documentation, more will be added. + +:::tip[Learning from Examples] +While these docs are being expanded, you can learn a lot by looking at the source code of existing mods on [Thunderstore](https://thunderstore.io/c/resonite/). Many mod developers share their code on GitHub, and you can find links to their repositories on their mod pages. +::: + +For now, for more info, see BepInEx's own documentation: @@ -109,10 +133,6 @@ For patching/hooking methods, you can use [MonoMod](https://github.com/MonoMod/M All of these libraries are compatible with each other as HarmonyX and MonoDetour simply use MonoMod.RuntimeDetour under the hood. -## Writing Your First Patch - -work in progress. -

Modern, lightweight mod manager with clean interface.

diff --git a/src/content/docs/guides/configuration.mdx b/src/content/docs/guides/configuration.mdx index a81d00d..2650010 100644 --- a/src/content/docs/guides/configuration.mdx +++ b/src/content/docs/guides/configuration.mdx @@ -1,5 +1,5 @@ --- -title: Custom Config +title: Configuration description: Create mod configurations for your mods sidebar: order: 2 diff --git a/src/content/docs/guides/localization.mdx b/src/content/docs/guides/localization.mdx new file mode 100644 index 0000000..00f2734 --- /dev/null +++ b/src/content/docs/guides/localization.mdx @@ -0,0 +1,345 @@ +--- +title: Localization +description: Add multilingual support to your Resonite mods using BepisLocaleLoader +sidebar: + order: 2 +--- + +import { Tabs, TabItem } from '@astrojs/starlight/components'; + +Learn how to add localization support to your Resonite mods using BepisLocaleLoader, enabling your mod to display text in multiple languages. + +## Prerequisites + +- [BepisLoader](/getting-started/installation) +- [BepisLocaleLoader](https://github.com/ResoniteModding/BepisLocaleLoader) + +## Basic Usage + +### Adding the Package Reference + +First, add the BepisLocaleLoader NuGet package to your project file (`.csproj`): + +```xml + + + + + + + + https://nuget-modding.resonite.net/v3/index.json; + + +``` + +### Adding the Dependency + +Then, add BepisLocaleLoader as a dependency in your plugin: + +```csharp +using BepisLocaleLoader; +using BepInEx; +using BepInEx.Configuration; +using BepInExResoniteShim; + +// PluginMetadata is automatically generated by ResonitePluginInfoProps +[ResonitePlugin(PluginMetadata.GUID, PluginMetadata.NAME, PluginMetadata.VERSION, PluginMetadata.AUTHORS, PluginMetadata.REPOSITORY_URL)] +[BepInDependency(BepInExResoniteShim.PluginMetadata.GUID, BepInDependency.DependencyFlags.HardDependency)] +[BepInDependency(BepisLocaleLoader.PluginMetadata.GUID, BepInDependency.DependencyFlags.HardDependency)] +public class MyPlugin : BasePlugin +{ + // Your plugin code +} +``` + +:::tip[PluginMetadata] +The `PluginMetadata` class is automatically generated by the `ResonitePluginInfoProps` NuGet package based on your [project properties](http://localhost:4321/creating-a-mod/creating-a-project/#build-configuration). You don't need to define it manually. +::: + +### Using Localized Config Descriptions + +When creating configuration entries, use `ConfigLocale` to provide localized descriptions: + +```csharp +public override void Load() +{ + var myConfig = Config.Bind( + "General", + "EnableFeature", + true, + new ConfigDescription( + "Enable this feature", + null, + new ConfigLocale( + "Settings.dev.author.myPlugin.config.Key", + "Settings.dev.author.myPlugin.config.Description" + ) + ) + ); +} +``` + +## Creating Locale Files + +### File Structure + +Create a `Locale` folder next to your plugin DLL with JSON files for each language: + +``` +MyPlugin/ +├── MyPlugin.dll +└── Locale/ + ├── en.json + ├── es.json + ├── fr.json + └── ja.json +``` + +### JSON Format + +Each locale file should follow this structure: + +```json +{ + "localeCode": "en-US", + "authors": ["YourName"], + "messages": { + "Settings.dev.author.myPlugin": "My Plugin", + "Settings.dev.author.myPlugin.Breadcrumb": "My Plugin Settings", + "Settings.dev.author.myPlugin.config.Key": "Enable Feature", + "Settings.dev.author.myPlugin.config.Description": "Enables the main feature of this plugin." + } +} +``` + +## String Formatting + +### Using the .T() Extension Method + +BepisLocaleLoader provides a convenient `.T()` extension method for string localization: + + + +```csharp +// Simple key lookup +var text = "Settings.MyPlugin.Welcome".T(); +``` + + + +```csharp +// Single argument +var greeting = "Settings.MyPlugin.Greeting".T( + "Hello {name}!", + "name", + userName +); + +// Multiple arguments +var stats = "Settings.MyPlugin.Stats".T( + ("kills", killCount), + ("deaths", deathCount) +); +``` + + + +```csharp +// For dynamic UI that updates continuously +var timer = "Settings.MyPlugin.Timer".T( + continuous: true, + arguments: new Dictionary + { + { "time", elapsedTime } + } +); +``` + + + +## Advanced Features + +### Adding Strings Programmatically + +You can register localized strings directly in code: + +```csharp +LocaleLoader.AddLocaleString( + "Settings.MyPlugin.NewFeature", + "New Feature Text", + force: true, // Overwrite if exists + authors: "YourName" +); +``` + +### Force Parameter Usage + +- `force: false` (default) - Safe for adding new keys without overwriting +- `force: true` - Use when you need to override existing translations + +## Complete Example + +Here's a complete example based on the Optizoom mod: + + + +```csharp +using BepInEx; +using BepInEx.Configuration; +using BepisLocaleLoader; +using BepInExResoniteShim; +using Elements.Core; + +// PluginMetadata is automatically generated by ResonitePluginInfoProps +[ResonitePlugin(PluginMetadata.GUID, PluginMetadata.NAME, PluginMetadata.VERSION, PluginMetadata.AUTHORS, PluginMetadata.REPOSITORY_URL)] +[BepInDependency(BepInExResoniteShim.PluginMetadata.GUID, BepInDependency.DependencyFlags.HardDependency)] +[BepInDependency(BepisLocaleLoader.PluginMetadata.GUID, BepInDependency.DependencyFlags.HardDependency)] +public class MyPlugin : BasePlugin +{ + private static ConfigEntry enabled; + private static ConfigEntry hotkey; + private static ConfigEntry intensity; + + public override void Load() + { + // Basic toggle + enabled = Config.Bind( + "General", + "Enabled", + true, + new ConfigDescription( + "Enable the plugin", + null, + new ConfigLocale( + "Settings.dev.author.myPlugin.enabled.Key", + "Settings.dev.author.myPlugin.enabled.Description" + ) + ) + ); + + // Key binding + hotkey = Config.Bind( + "General", + "Hotkey", + Key.Tab, + new ConfigDescription( + "Activation hotkey", + null, + new ConfigLocale( + "Settings.dev.author.myPlugin.hotkey.Key", + "Settings.dev.author.myPlugin.hotkey.Description" + ) + ) + ); + + // Slider with range + intensity = Config.Bind( + "General", + "Intensity", + 50f, + new ConfigDescription( + "Effect intensity", + new AcceptableValueRange(0f, 100f), + new ConfigLocale( + "Settings.dev.author.myPlugin.intensity.Key", + "Settings.dev.author.myPlugin.intensity.Description" + ) + ) + ); + } +} +``` + + + +```json +{ + "localeCode": "en-US", + "authors": ["YourName"], + "messages": { + "Settings.dev.author.myPlugin": "My Plugin", + "Settings.dev.author.myPlugin.Breadcrumb": "My Plugin Settings", + + "Settings.dev.author.myPlugin.enabled.Key": "Enable Plugin", + "Settings.dev.author.myPlugin.enabled.Description": "Enable or disable the plugin functionality.", + + "Settings.dev.author.myPlugin.hotkey.Key": "Activation Hotkey", + "Settings.dev.author.myPlugin.hotkey.Description": "The key to press to activate the plugin feature.", + + "Settings.dev.author.myPlugin.intensity.Key": "Effect Intensity", + "Settings.dev.author.myPlugin.intensity.Description": "Controls the strength of the effect (0-100)." + } +} +``` + + + +```json +{ + "localeCode": "es-ES", + "authors": ["YourName"], + "messages": { + "Settings.dev.author.myPlugin": "Mi Plugin", + "Settings.dev.author.myPlugin.Breadcrumb": "Configuración de Mi Plugin", + + "Settings.dev.author.myPlugin.enabled.Key": "Habilitar Plugin", + "Settings.dev.author.myPlugin.enabled.Description": "Habilita o deshabilita la funcionalidad del plugin.", + + "Settings.dev.author.myPlugin.hotkey.Key": "Tecla de Activación", + "Settings.dev.author.myPlugin.hotkey.Description": "La tecla para activar la función del plugin.", + + "Settings.dev.author.myPlugin.intensity.Key": "Intensidad del Efecto", + "Settings.dev.author.myPlugin.intensity.Description": "Controla la fuerza del efecto (0-100)." + } +} +``` + + + +## Best Practices + +### Naming Convention + +Follow a consistent naming pattern for your locale keys: +``` +Settings.dev.[author].[plugin].[category].[setting] +``` + +Example: +``` +Settings.dev.lecloutpanda.optizoom.zoomSpeed.Key +Settings.dev.lecloutpanda.optizoom.zoomSpeed.Description +``` + +### Organization Tips + +1. **Group related settings** - Use consistent prefixes for related configuration options +2. **Provide clear descriptions** - Help users understand what each setting does +3. **Include default languages** - At minimum, provide English (en.json) +4. **Test all languages** - Verify that text displays correctly in different languages + +## Debugging + +### Checking Loaded Locales + +You can verify which plugins have loaded locales: + +```csharp +foreach (var plugin in LocaleLoader.PluginsWithLocales) +{ + Log.LogInfo($"Plugin with locales: {plugin}"); +} +``` + +### Common Issues + +- **Locales not loading**: Ensure the `Locale` folder is next to your plugin DLL +- **JSON parsing errors**: Check logs for detailed error messages +- **Keys not found**: Verify the key names match exactly between code and JSON +- **Missing dependency**: Ensure BepisLocaleLoader is installed and loaded before your plugin + +## Resources + +- [BepisLocaleLoader Repository](https://github.com/ResoniteModding/BepisLocaleLoader) +- [Configuration Documentation](/guides/configuration) From 6c9d10fd758b76fd070e7f7da3e4f1f76fb5ea9d Mon Sep 17 00:00:00 2001 From: hazre <37149950+hazre@users.noreply.github.com> Date: Fri, 19 Sep 2025 02:39:19 +0200 Subject: [PATCH 2/4] docs: Update README --- README.md | 125 +++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 96 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index 6fe6875..16cb106 100644 --- a/README.md +++ b/README.md @@ -1,49 +1,116 @@ -# Starlight Starter Kit: Basics +# Resonite Modding Wiki [![Built with Starlight](https://astro.badg.es/v2/built-with-starlight/tiny.svg)](https://starlight.astro.build) +[![Resonite](https://img.shields.io/badge/Resonite-Modding-blue)](https://resonite.com) -``` -pnpm create astro@latest -- --template starlight -``` +The official documentation site for Resonite modding, providing comprehensive guides for creating mods using BepisLoader and the BepInEx framework. + +## 📚 Documentation Overview + +This wiki contains documentation for: + +- **Getting Started** - Installation guides for mod loaders and using existing mods +- **Creating Mods** - Step-by-step tutorials for developing your own Resonite mods +- **Guides** - Advanced topics including: + - Configuration management + - Localization with BepisLocaleLoader + - Debugging and troubleshooting +- **BepInEx API Reference** - Auto-generated documentation for BepInEx classes and methods + +## 🚀 Quick Start + +### For Users + +Visit the live documentation at [modding.resonite.net](https://modding.resonite.net/) to: + +- Learn how to install mod loaders +- Browse and install community mods +- Troubleshoot common issues + +### For Developers + +Get started creating Resonite mods: + +1. Follow the [Installation Guide](/getting-started/installation) to set up BepisLoader +2. Create your first project using the [BepInEx Template](https://github.com/ResoniteModding/BepInEx.Templates) +3. Learn from the [Writing Code](/creating-a-mod/writing-code) guide +4. Publish to [Thunderstore](https://thunderstore.io/c/resonite/) -> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun! +## 🛠️ Development -## 🚀 Project Structure +### Prerequisites -Inside of your Astro + Starlight project, you'll see the following folders and files: +- Node.js 18+ +- pnpm package manager + +### Local Development + +```bash +# Install dependencies +pnpm install + +# Start dev server at localhost:4321 +pnpm dev + +# Build for production +pnpm build + +# Preview production build +pnpm preview +``` + +## 📁 Project Structure ``` . -├── public/ +├── public/ # Static assets (favicons, etc.) ├── src/ -│ ├── assets/ +│ ├── assets/ # Images and other assets +│ ├── components/ # Custom Astro components │ ├── content/ -│ │ └── docs/ -│ └── content.config.ts -├── astro.config.mjs -├── package.json -└── tsconfig.json +│ │ ├── docs/ # Documentation content (MDX files) +│ │ └── config.ts # Content collection config +│ └── styles/ # Global styles +├── astro.config.mjs # Astro configuration +└── package.json # Project dependencies ``` -Starlight looks for `.md` or `.mdx` files in the `src/content/docs/` directory. Each file is exposed as a route based on its file name. +## 📝 Contributing + +We welcome contributions! Here's how you can help: + +### Adding/Updating Documentation + +1. Fork this repository +2. Create a new branch for your changes +3. Edit or add MDX files in `src/content/docs/` +4. Test your changes locally with `pnpm dev` +5. Submit a pull request + +### Documentation Guidelines + +- Use clear, concise language +- Include code examples where appropriate +- Test all code snippets +- Follow the existing file structure +- Add appropriate frontmatter metadata -Images can be added to `src/assets/` and embedded in Markdown with a relative link. +### Reporting Issues -Static assets, like favicons, can be placed in the `public/` directory. +Found an error or have a suggestion? Please [open an issue](https://github.com/your-repo/issues) with: -## 🧞 Commands +- Page URL or file path +- Description of the issue +- Suggested fix (if applicable) -All commands are run from the root of the project, from a terminal: +## 🔧 Technologies -| Command | Action | -| :--------------------- | :----------------------------------------------- | -| `pnpm install` | Installs dependencies | -| `pnpm dev` | Starts local dev server at `localhost:4321` | -| `pnpm build` | Build your production site to `./dist/` | -| `pnpm preview` | Preview your build locally, before deploying | -| `pnpm astro ...` | Run CLI commands like `astro add`, `astro check` | -| `pnpm astro -- --help` | Get help using the Astro CLI | +- [Astro](https://astro.build) - Static site generator +- [Starlight](https://starlight.astro.build) - Documentation theme +- [MDX](https://mdxjs.com) - Markdown with components +- [Svelte](https://svelte.dev) - Interactive components +- [TypeScript](https://www.typescriptlang.org) - Type safety -## 👀 Want to learn more? +## 📄 License -Check out [Starlight’s docs](https://starlight.astro.build/), read [the Astro documentation](https://docs.astro.build), or jump into the [Astro Discord server](https://astro.build/chat). +This documentation is licensed under [MIT License](LICENSE). From 3454db51fe55db9b405330f09a78b46cf8cafeec Mon Sep 17 00:00:00 2001 From: hazre <37149950+hazre@users.noreply.github.com> Date: Fri, 19 Sep 2025 02:39:32 +0200 Subject: [PATCH 3/4] docs: add translation page content --- src/content/docs/resources/translating.mdx | 215 ++++++++++++++++++++- 1 file changed, 213 insertions(+), 2 deletions(-) diff --git a/src/content/docs/resources/translating.mdx b/src/content/docs/resources/translating.mdx index 026e86d..e78c6f5 100644 --- a/src/content/docs/resources/translating.mdx +++ b/src/content/docs/resources/translating.mdx @@ -1,8 +1,219 @@ --- title: Contributing Translations -description: -- +description: Help translate the Resonite Modding Wiki into your language sidebar: order: 2 --- -work in progress. +import { FileTree, Steps } from '@astrojs/starlight/components'; + +Help make Resonite modding accessible to everyone by contributing translations to this documentation. This guide explains how to add translations for new languages or improve existing ones. + +## Current Languages + +The documentation currently supports: +- **English** (en) - Primary language +- Additional languages can be added through community contributions + +:::note[English File Location] +Currently, English documentation files are located in the root `src/content/docs/` folder rather than in an `en/` subfolder. This may change in the future to `src/content/docs/en/` for consistency with other languages. +::: + +## How Translations Work + +This documentation uses Starlight's built-in internationalization (i18n) system, which provides: +- Automatic language switching +- Fallback to English for untranslated pages +- Right-to-left (RTL) language support +- Localized UI elements + +## Contributing Translations + +### Getting Started + + + +1. **Fork the repository** on GitHub + +2. **Check existing translations** in `src/content/docs/` to see which languages are already supported + +3. **Choose what to translate**: + - Full documentation pages + - UI strings (buttons, navigation, etc.) + - Or both! + + + +### Translating Documentation Pages + +To translate documentation pages: + + + +1. **Create a language folder** in `src/content/docs/` if it doesn't exist: + + + - src/ + - content/ + - docs/ + - (English files currently in root) + - fr/ (French - example) + - es/ (Spanish - example) + - ja/ (Japanese - example) + + +2. **Copy the English file** you want to translate to your language folder, keeping the same file name: + + ``` + src/content/docs/getting-started/installation.mdx (current English location) + → src/content/docs/fr/getting-started/installation.mdx + ``` + +3. **Translate the content** while preserving: + - File structure and names + - Frontmatter fields (title, description) + - Code blocks (keep code in English) + - Component imports and usage + +4. **Test your translation** locally by running: + ```bash + pnpm dev + ``` + + + +### Translating UI Strings + +UI strings include navigation labels, buttons, and other interface elements. + + + +1. **Create a translation file** in `src/content/i18n/` for your language: + + + - src/ + - content/ + - i18n/ + - fr.json (French) + - es.json (Spanish) + - ja.json (Japanese) + + +2. **Add translations** for UI strings. This project has custom UI strings for the disclaimer and footer. Here's an example structure: + + ```json title="src/content/i18n/fr.json" + { + "disclaimer.title": "Bienvenue dans la documentation de modding Resonite!", + "disclaimer.independence.prefix": "Ceci est un", + "disclaimer.independence.type": "projet communautaire indépendant", + "disclaimer.independence.suffix": "pour la communauté de modding Resonite. Nous ne sommes pas affiliés avec", + "disclaimer.continue": "Continuer", + "disclaimer.visitOfficial": "Visiter le site officiel de Resonite", + "footer.independence": "Nous sommes un projet indépendant et ne sommes pas affiliés avec", + "footer.resonite": "Resonite", + "footer.or": "ou", + "footer.yellowdog": "Yellow Dog Man Studios S.r.o.", + + // DocSearch strings + "docsearch.searchBox.cancelButtonText": "Annuler", + "docsearch.footer.selectText": "pour sélectionner", + "docsearch.footer.navigateText": "pour naviguer", + "docsearch.footer.closeText": "pour fermer" + } + ``` + + Check the existing `src/content/i18n/en.json` file for the complete list of strings to translate. + +3. **Only translate the values**, not the keys: + - ✅ `"search.label": "Rechercher"` + - ❌ `"recherche.etiquette": "Rechercher"` + + + +## Translation Guidelines + +### Best Practices + +- **Maintain technical accuracy** - Don't translate technical terms that are commonly used in English (API, mod, plugin, etc.) +- **Keep code examples unchanged** - Code should remain in English +- **Preserve formatting** - Maintain markdown formatting, links, and structure +- **Use consistent terminology** - Create a glossary for your language to ensure consistency +- **Test your translations** - Build the site locally to ensure everything displays correctly + +### What NOT to Translate + +- File names and paths +- Code blocks and examples +- Configuration keys +- Package names (npm, BepInEx, etc.) +- URLs and links +- Technical identifiers (GUID, etc.) + +### Quality Standards + +Before submitting translations: + +1. **Proofread** for spelling and grammar +2. **Verify technical accuracy** +3. **Check formatting** is preserved +4. **Test locally** to ensure proper display +5. **Review consistency** across related pages + +## Submitting Your Translation + + + +1. **Commit your changes** with a clear message: + ``` + Add French translation for installation guide + ``` + +2. **Push to your fork** on GitHub + +3. **Create a Pull Request** with: + - Language and pages translated + - Any notes about terminology choices + - Screenshots if helpful + +4. **Wait for review** - Maintainers will review and provide feedback + + + +## Maintaining Translations + +### Keeping Translations Updated + +When the English documentation changes: + +1. **Watch for updates** to pages you've translated +2. **Update translations** to match new content +3. **Mark outdated content** if you can't update immediately + +### Translation Status + +You can check which pages need translation by: +- Looking for missing files in your language folder +- Checking for outdated translation notices on the site +- Reviewing recent commits to English pages + +## Getting Help + +### Translation Support + +- **Questions?** Open a discussion on GitHub +- **Need context?** Ask in pull request comments +- **Technical issues?** Create an issue on GitHub + +### Resources + +- [Starlight i18n Documentation](https://starlight.astro.build/guides/i18n/) +- [Markdown Guide](https://www.markdownguide.org/) +- [MDX Documentation](https://mdxjs.com/) + +## Recognition + +Contributors who provide significant translations will be: +- Listed in the project README +- Thanked in release notes + +Thank you for helping make Resonite modding documentation accessible to more people around the world! From 671a93be846db0c51895afb8f697034c1af6ea86 Mon Sep 17 00:00:00 2001 From: hazre <37149950+hazre@users.noreply.github.com> Date: Fri, 19 Sep 2025 02:43:41 +0200 Subject: [PATCH 4/4] docs: add placeholder docs --- src/content/docs/guides/patching.mdx | 9 +++++++++ src/content/docs/guides/prepatching.mdx | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/src/content/docs/guides/patching.mdx b/src/content/docs/guides/patching.mdx index c1e7693..0e7e8fb 100644 --- a/src/content/docs/guides/patching.mdx +++ b/src/content/docs/guides/patching.mdx @@ -5,4 +5,13 @@ sidebar: order: 3 --- +import { LinkCard } from '@astrojs/starlight/components'; + work in progress. + + diff --git a/src/content/docs/guides/prepatching.mdx b/src/content/docs/guides/prepatching.mdx index 2de7822..44f801b 100644 --- a/src/content/docs/guides/prepatching.mdx +++ b/src/content/docs/guides/prepatching.mdx @@ -5,4 +5,13 @@ sidebar: order: 4 --- +import { LinkCard } from '@astrojs/starlight/components'; + work in progress. + +