|
2 | 2 | Here, you have all languages files of **[Kobralost's addons](https://www.gmodstore.com/users/kobralost/addons)**. |
3 | 3 |
|
4 | 4 | ## Collaboration |
5 | | -If you see a **mistake** or want to **add a new language** to an addon, you must **create a [Pull Request](https://github.com/KB-GModStore/gmodstore-languages/pulls)** with the changes. |
6 | | -If it is accepted, they will be automatically synchronized in the next update. |
| 5 | +If you spot a **mistake** or want to **add a new language** to an addon, you can contribute directly from GitHub's web interface! Follow this complete step-by-step tutorial: |
| 6 | + |
| 7 | +## � Complete Step-by-Step Tutorial |
| 8 | + |
| 9 | +### Step 1: Create a Fork 🍴 |
| 10 | + |
| 11 | +1. **Visit the main repository**: Go to [KB-GModStore/gmodstore-languages](https://github.com/KB-GModStore/gmodstore-languages) |
| 12 | +2. **Click the "Fork" button** in the top-right corner of the page |
| 13 | +3. **Select your account** as the destination for the fork |
| 14 | +4. **Wait for the fork creation** - GitHub will create your personal copy |
| 15 | +5. **You're now on your fork!** The URL should be `https://github.com/YOUR_USERNAME/gmodstore-languages` |
| 16 | + |
| 17 | +### Step 2: Navigate to the Language Files 📁 |
| 18 | + |
| 19 | +1. **Browse the addon folders** - each addon has its own directory |
| 20 | +2. **Find your target addon** (e.g., `realistic_cardealer/`, `zeros_bloodlab/`) |
| 21 | +3. **Enter the language subfolder**: |
| 22 | + - Usually `languages/` or `[addon_name]_languages/` |
| 23 | + - Example: `realistic_cardealer/realistic_cardealer/languages/` |
| 24 | + |
| 25 | +**Repository structure examples**: |
| 26 | +``` |
| 27 | +realistic_cardealer/ |
| 28 | +└── realistic_cardealer/ |
| 29 | + └── languages/ |
| 30 | + ├── sh_language_en.lua ← English (reference) |
| 31 | + ├── sh_language_fr.lua ← French |
| 32 | + ├── sh_language_de.lua ← German |
| 33 | + └── ... |
| 34 | +
|
| 35 | +zeros_bloodlab/ |
| 36 | +└── zbl_languages/ |
| 37 | + ├── sh_zbl_language_en.lua ← English (reference) |
| 38 | + ├── sh_zbl_language_fr.lua ← French |
| 39 | + └── ... |
| 40 | +``` |
| 41 | + |
| 42 | +### Step 3: Choose Your Action 🎯 |
| 43 | + |
| 44 | +#### Option A: Fix an Existing Language |
| 45 | + |
| 46 | +1. **Click on the language file** you want to fix (e.g., `sh_language_fr.lua`) |
| 47 | +2. **Click the ✏️ (pencil) icon** to edit the file |
| 48 | +3. **Make your corrections** directly in the web editor |
| 49 | +4. **Example correction**: |
| 50 | + ```lua |
| 51 | + // Before (typo) |
| 52 | + ["enterDealerName"] = "Entrer le nom du concessionaire", |
| 53 | + |
| 54 | + // After (fixed) |
| 55 | + ["enterDealerName"] = "Entrer le nom du concessionnaire", |
| 56 | + ``` |
| 57 | + |
| 58 | +#### Option B: Add a New Language |
| 59 | + |
| 60 | +1. **First, open the English reference file** (usually `sh_language_en.lua`) |
| 61 | +2. **Copy all the content** (Ctrl+A, then Ctrl+C) |
| 62 | +3. **Go back to the languages folder** |
| 63 | +4. **Click "Add file" → "Create new file"** |
| 64 | +5. **Name your file**: Use the pattern `sh_language_XX.lua` (replace XX with your language code) |
| 65 | + - Examples: `sh_language_de.lua`, `sh_zbl_language_es.lua` |
| 66 | +6. **Paste the English content** (Ctrl+V) |
| 67 | +7. **Translate each line** to your language |
| 68 | + |
| 69 | +**Translation example**: |
| 70 | +```lua |
| 71 | +// English reference |
| 72 | +RCD.Language["en"] = { |
| 73 | + ["undefined"] = "undefined", |
| 74 | + ["groups"] = "GROUPS", |
| 75 | + ["vehicles"] = "VEHICLES", |
| 76 | +} |
| 77 | + |
| 78 | +// German translation |
| 79 | +RCD.Language["de"] = { |
| 80 | + ["undefined"] = "undefiniert", |
| 81 | + ["groups"] = "GRUPPEN", |
| 82 | + ["vehicles"] = "FAHRZEUGE", |
| 83 | +} |
| 84 | +``` |
| 85 | + |
| 86 | +### Step 4: Commit Your Changes 💾 |
| 87 | + |
| 88 | +1. **Scroll down to the "Commit changes" section** |
| 89 | +2. **Write a clear commit message**: |
| 90 | + - For fixes: `Fix: Correct French spelling in realistic_cardealer` |
| 91 | + - For new languages: `Add: German translation for zeros_bloodlab` |
| 92 | + - For updates: `Update: Improve Spanish translations in realistic_properties` |
| 93 | +3. **Add a description** (optional but helpful): |
| 94 | + ``` |
| 95 | + - Fixed 3 spelling errors in French translations |
| 96 | + - Corrected dealer/concessionnaire terminology |
| 97 | + - Verified all strings display correctly |
| 98 | + ``` |
| 99 | +4. **Select "Commit directly to the main branch"** |
| 100 | +5. **Click "Commit changes"** |
| 101 | + |
| 102 | +### Step 5: Create a Pull Request 📋 |
| 103 | + |
| 104 | +1. **GitHub will show a banner** saying "This branch is X commits ahead of KB-GModStore:main" |
| 105 | +2. **Click "Contribute" → "Open pull request"** |
| 106 | +3. **Review the changes** GitHub shows you |
| 107 | +4. **Write a descriptive title**: |
| 108 | + - `Add complete German translation for Realistic Car Dealer` |
| 109 | + - `Fix French spelling errors in Zeros Blood Lab` |
| 110 | + - `Update and improve Spanish translations` |
| 111 | +5. **Add a detailed description**: |
| 112 | + ```markdown |
| 113 | + ## Changes Made |
| 114 | + - Added complete German translation (325 strings) |
| 115 | + - All translations tested in-game |
| 116 | + - Used consistent terminology throughout |
| 117 | + |
| 118 | + ## Testing |
| 119 | + - ✅ All text displays correctly |
| 120 | + - ✅ No text overflow issues |
| 121 | + - ✅ Proper encoding for special characters |
| 122 | + ``` |
| 123 | +6. **Click "Create pull request"** |
| 124 | + |
| 125 | +### Step 6: Follow Up 👀 |
| 126 | + |
| 127 | +1. **Your PR appears** in the [original repository's pull requests](https://github.com/KB-GModStore/gmodstore-languages/pulls) |
| 128 | +2. **Maintainers will review** your contribution |
| 129 | +3. **You might receive feedback** - be ready to make adjustments |
| 130 | +4. **Once approved**, your changes will be merged and automatically synchronized! |
| 131 | + |
| 132 | +### 🗣️ Language Codes Reference |
| 133 | + |
| 134 | +| Code | Language | Example File | |
| 135 | +| ------ | ------------------- | ---------------------- | |
| 136 | +| `en` | English | `sh_language_en.lua` | |
| 137 | +| `fr` | French | `sh_language_fr.lua` | |
| 138 | +| `de` | German | `sh_language_de.lua` | |
| 139 | +| `es` | Spanish | `sh_language_es.lua` | |
| 140 | +| `it` | Italian | `sh_language_it.lua` | |
| 141 | +| `pt` | Portuguese | `sh_language_pt.lua` | |
| 142 | +| `ptbr` | Portuguese (Brazil) | `sh_language_ptbr.lua` | |
| 143 | +| `ru` | Russian | `sh_language_ru.lua` | |
| 144 | +| `pl` | Polish | `sh_language_pl.lua` | |
| 145 | +| `cn` | Chinese | `sh_language_cn.lua` | |
| 146 | +| `tr` | Turkish | `sh_language_tr.lua` | |
| 147 | + |
| 148 | +### 💡 Pro Tips |
| 149 | + |
| 150 | +- **Always use the English file as reference** - it's the most complete |
| 151 | +- **Test your translations in-game** if possible |
| 152 | +- **Keep the Lua syntax intact** - don't modify brackets, quotes, or commas |
| 153 | +- **Stay consistent** with terminology throughout the file |
| 154 | +- **Use proper encoding** for special characters (é, ñ, ü, etc.) |
| 155 | +- **Don't hesitate to contribute** - even small fixes are valuable! |
| 156 | + |
| 157 | +### 📋 Real Examples |
| 158 | + |
| 159 | +**Realistic Car Dealer structure**: |
| 160 | +```lua |
| 161 | +RCD.Language["fr"] = { |
| 162 | + ["undefined"] = "indéfini", |
| 163 | + ["adminMenuConfig"] = "ADMIN MENU - CONFIGURATION", |
| 164 | + ["groups"] = "GROUPES", |
| 165 | + ["vehicles"] = "VEHICULES", |
| 166 | +} |
| 167 | +``` |
| 168 | + |
| 169 | +**Zeros Blood Lab structure**: |
| 170 | +```lua |
| 171 | +if (zbl.config.SelectedLanguage == "fr") then |
| 172 | + zbl.language.General["LabTitle"] = "$PlayerName - Laboratoire Génétique" |
| 173 | + zbl.language.General["analyzing"] = "analyse en cours" |
| 174 | + zbl.language.General["Analyze"] = "Analyser" |
| 175 | +end |
| 176 | +``` |
| 177 | + |
| 178 | +--- |
| 179 | + |
| 180 | +*Thank you for contributing to the Kobralost community! 🎉* |
0 commit comments