Add French translate
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.
This commit is contained in:
+40
-6
@@ -182,10 +182,10 @@
|
||||
"global.listView": "List view",
|
||||
"global.gridView": "Grid view",
|
||||
"global.save": "Save",
|
||||
"global.status":"Status",
|
||||
"global.inventory":"Inventory",
|
||||
"global.quests":"Quests",
|
||||
"global.info":"Info",
|
||||
"global.status": "Status",
|
||||
"global.inventory": "Inventory",
|
||||
"global.quests": "Quests",
|
||||
"global.info": "Info",
|
||||
"infobox.noData.title": "No data yet",
|
||||
"infobox.noData.instruction": "Generate a new response in the roleplay or switch to \"Separate Generation\" in Settings to access and click the \"Refresh RPG Info\" button",
|
||||
"infobox.recentEvents.title": "Recent Events",
|
||||
@@ -238,5 +238,39 @@
|
||||
"musicPlayer.noMusic": "AI will suggest music when appropriate for the scene",
|
||||
"errors.parsingError": "RPG Companion Trackers' parsing error! The model returned an incorrect format. If the issue persists, consider changing the model for generations.",
|
||||
"settings.recommendedModels.title": "Recommended Models",
|
||||
"settings.recommendedModels.description": "For the extension to work properly, **it is not recommended to use any models below 20B, especially if they're old.** It works best with the SOTA models such as Deepseek, Claude, GPT, or Gemini."
|
||||
}
|
||||
"settings.recommendedModels.description": "For the extension to work properly, **it is not recommended to use any models below 20B, especially if they're old.** It works best with the SOTA models such as Deepseek, Claude, GPT, or Gemini.",
|
||||
"thoughts.addCharacter": "Add Character",
|
||||
"thoughts.locked": "Locked",
|
||||
"thoughts.unlocked": "Unlocked",
|
||||
"thoughts.clickToEdit": "Click to edit",
|
||||
"thoughts.clickToUpload": "Click to upload avatar",
|
||||
"thoughts.removeCharacter": "Remove character",
|
||||
"userStats.level": "LVL",
|
||||
"userStats.clickToEditLevel": "Click to edit level",
|
||||
"userStats.statsLocked": "Locked - AI cannot change stats",
|
||||
"userStats.statsUnlocked": "Unlocked - AI can change stats",
|
||||
"userStats.clickToEditStatName": "Click to edit stat name",
|
||||
"userStats.clickToEditStatValue": "Click to edit",
|
||||
"userStats.moodLocked": "Locked - AI cannot change mood",
|
||||
"userStats.moodUnlocked": "Unlocked - AI can change mood",
|
||||
"userStats.clickToEditEmoji": "Click to edit emoji",
|
||||
"userStats.skillsLocked": "Locked - AI cannot change skills",
|
||||
"userStats.skillsUnlocked": "Unlocked - AI can change skills",
|
||||
"userStats.clickToEditSkills": "Click to edit skills",
|
||||
"infoBox.clickToEdit": "Click to edit",
|
||||
"infoBox.locked": "Locked - AI cannot change this",
|
||||
"infoBox.unlocked": "Unlocked - AI can change this",
|
||||
"infoBox.weatherFallback": "Weather",
|
||||
"infoBox.locationFallback": "Location",
|
||||
"stats.health": "Health",
|
||||
"stats.satiety": "Satiety",
|
||||
"stats.energy": "Energy",
|
||||
"stats.hygiene": "Hygiene",
|
||||
"stats.arousal": "Arousal",
|
||||
"stats.str": "STR",
|
||||
"stats.dex": "DEX",
|
||||
"stats.con": "CON",
|
||||
"stats.int": "INT",
|
||||
"stats.wis": "WIS",
|
||||
"stats.cha": "CHA"
|
||||
}
|
||||
Reference in New Issue
Block a user