25aedce786
Add French translation and localize hardcoded strings :
Changes
1. Translation Files
Created
src/i18n/fr.json
: Contains all French translations for the extension.
Updated
src/i18n/en.json
: Added new keys for terms that were previously hardcoded (e.g., "Force", "Volonté", "Météo", "Locked", "Unlocked").
2. UI Updates
settings.html
: Added "Français" to the language selection dropdown.
3. Code Refactoring
src/systems/rendering/thoughts.js
: Replaced hardcoded strings ("Add Character", "Locked", "Click to edit") with i18n calls.
src/systems/rendering/userStats.js
: Replaced hardcoded tooltips and titles with i18n calls.
src/systems/rendering/infoBox.js
: Localized weather, location, and date widget texts.
src/systems/ui/trackerEditor.js
: Updated the "Reset to Defaults" logic to use localized names for stats (e.g., "Santé", "Force") based on the active language.
64 lines
3.6 KiB
HTML
64 lines
3.6 KiB
HTML
<div>
|
|
<div class="inline-drawer">
|
|
<div class="inline-drawer-toggle inline-drawer-header">
|
|
<b><i class="fa-solid fa-dice-d20"></i> RPG Companion</b>
|
|
<div class="inline-drawer-icon fa-solid fa-circle-chevron-down down"></div>
|
|
</div>
|
|
<div class="inline-drawer-content">
|
|
<label class="checkbox_label" for="rpg-extension-enabled">
|
|
<input type="checkbox" id="rpg-extension-enabled" />
|
|
<span data-i18n-key="settings.extensionEnabled">Enable RPG Companion</span>
|
|
</label>
|
|
|
|
<div class="form-group" style="margin-top: 10px;">
|
|
<label for="rpg-companion-language-select" data-i18n-key="settings.language.label">Language</label>
|
|
<select id="rpg-companion-language-select" class="text_pole">
|
|
<option value="en" data-i18n-key="settings.language.option.en">English</option>
|
|
<option value="zh-tw" data-i18n-key="settings.language.option.zh-tw">繁體中文</option>
|
|
<option value="ru" data-i18n-key="settings.language.option.ru">Русский</option>
|
|
<option value="fr" data-i18n-key="settings.language.option.fr">Français</option>
|
|
</select>
|
|
</div>
|
|
|
|
<small class="notes" data-i18n-key="settings.note">Toggle to enable/disable the RPG Companion extension.
|
|
Configure additional settings within the panel itself.</small>
|
|
|
|
<div style="margin-top: 10px; display: flex; gap: 10px;">
|
|
<a href="https://discord.com/invite/KdAkTg94ME" target="_blank" class="menu_button"
|
|
style="flex: 1; text-align: center; text-decoration: none;">
|
|
<i class="fa-brands fa-discord"></i> Discord
|
|
</a>
|
|
<a href="https://ko-fi.com/marinara_spaghetti" target="_blank" class="menu_button"
|
|
style="flex: 1; text-align: center; text-decoration: none;">
|
|
<i class="fa-solid fa-heart"></i> Support
|
|
</a>
|
|
</div>
|
|
|
|
<div style="margin-top: 15px; text-align: center; opacity: 0.7; font-size: 0.8em; line-height: 1.5;">
|
|
<div style="margin-bottom: 5px;">
|
|
<i class="fa-solid fa-microchip"></i> <strong
|
|
data-i18n="settings.recommendedModels.title">Recommended Models:</strong>
|
|
</div>
|
|
<div style="opacity: 0.8; font-size: 0.9em;" data-i18n="settings.recommendedModels.description">
|
|
For the extension to work properly, <strong>it is not recommended to use any models below 20B,
|
|
especially if they're old.</strong> It works best with the SOTA models such as Deepseek, Claude,
|
|
GPT, or Gemini.
|
|
</div>
|
|
</div>
|
|
|
|
<div style="margin-top: 15px; text-align: center; opacity: 0.7; font-size: 0.8em; line-height: 1.5;">
|
|
<div style="margin-bottom: 5px;">
|
|
<i class="fa-solid fa-users"></i> <strong>Contributors:</strong>
|
|
</div>
|
|
<div style="opacity: 0.8; font-size: 0.9em;">
|
|
SpicyMarinara, Paperboygold, Munimunigamer, Subarashimo, Lilminzyu, Claude, IDeathByte,
|
|
Chungchandev, Joenunezb, Amauragis, Tomt610, and Jakstein.
|
|
</div>
|
|
</div>
|
|
|
|
<div style="margin-top: 10px; text-align: center; opacity: 0.6; font-size: 0.85em;">
|
|
v3.7.2
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div> |