`;
@@ -466,7 +467,7 @@ export function renderInfoBox() {
html += `
+
- Add event...
+ ${i18n.getTranslation('infobox.recentEvents.addEventPlaceholder')}
`;
}
diff --git a/src/systems/rendering/inventory.js b/src/systems/rendering/inventory.js
index 310261b..00b9e76 100644
--- a/src/systems/rendering/inventory.js
+++ b/src/systems/rendering/inventory.js
@@ -7,6 +7,7 @@ import { extensionSettings, $inventoryContainer } from '../../core/state.js';
import { getInventoryRenderOptions, restoreFormStates } from '../interaction/inventoryActions.js';
import { updateInventoryItem } from '../interaction/inventoryEdit.js';
import { parseItems } from '../../utils/itemParser.js';
+import { i18n } from '../../core/i18n.js';
// Type imports
/** @typedef {import('../../types/inventory.js').InventoryV2} InventoryV2 */
@@ -30,14 +31,14 @@ export function getLocationId(locationName) {
export function renderInventorySubTabs(activeTab = 'onPerson') {
return `
-
- On Person
+
+ ${i18n.getTranslation('inventory.section.onPerson')}
-
- Stored
+
+ ${i18n.getTranslation('inventory.section.stored')}
-
- Assets
+
+ ${i18n.getTranslation('inventory.section.assets')}
`;
@@ -54,7 +55,7 @@ export function renderOnPersonView(onPersonItems, viewMode = 'list') {
let itemsHtml = '';
if (items.length === 0) {
- itemsHtml = '
No items carried
';
+ itemsHtml = `
${i18n.getTranslation('inventory.onPerson.empty')}
`;
} else {
if (viewMode === 'grid') {
// Grid view: card-style items
@@ -84,30 +85,30 @@ export function renderOnPersonView(onPersonItems, viewMode = 'list') {
return `
@@ -132,30 +133,30 @@ export function renderStoredView(stored, collapsedLocations = [], viewMode = 'li
let html = `
@@ -163,8 +164,8 @@ export function renderStoredView(stored, collapsedLocations = [], viewMode = 'li
if (locations.length === 0) {
html += `
-
- No storage locations yet. Click "Add Location" to create one.
+
+ ${i18n.getTranslation('inventory.stored.empty')}
`;
} else {
@@ -176,7 +177,7 @@ export function renderStoredView(stored, collapsedLocations = [], viewMode = 'li
let itemsHtml = '';
if (items.length === 0) {
- itemsHtml = '
No items stored here
';
+ itemsHtml = `
${i18n.getTranslation('inventory.stored.noItems')}
`;
} else {
if (viewMode === 'grid') {
// Grid view: card-style items
@@ -218,13 +219,13 @@ export function renderStoredView(stored, collapsedLocations = [], viewMode = 'li
@@ -233,18 +234,18 @@ export function renderStoredView(stored, collapsedLocations = [], viewMode = 'li
- Add Item
+ ${i18n.getTranslation('inventory.stored.addItemButton')}
-
Remove "${escapeHtml(location)}"? This will delete all items stored there.
+
${i18n.getTranslation('inventory.stored.confirmRemoveLocationMessage', { location: escapeHtml(location) })}
- Cancel
+ ${i18n.getTranslation('global.cancel')}
- Confirm
+ ${i18n.getTranslation('inventory.stored.confirmRemoveLocationConfirmButton')}
@@ -272,7 +273,7 @@ export function renderAssetsView(assets, viewMode = 'list') {
let itemsHtml = '';
if (items.length === 0) {
- itemsHtml = '
No assets owned
';
+ itemsHtml = `
${i18n.getTranslation('inventory.assets.empty')}
`;
} else {
if (viewMode === 'grid') {
// Grid view: card-style items
@@ -289,7 +290,7 @@ export function renderAssetsView(assets, viewMode = 'list') {
itemsHtml = items.map((item, index) => `
${escapeHtml(item)}
-
+
@@ -302,30 +303,30 @@ export function renderAssetsView(assets, viewMode = 'list') {
return `
@@ -334,8 +335,7 @@ export function renderAssetsView(assets, viewMode = 'list') {
- Assets include vehicles (cars, motorcycles), property (homes, apartments),
- and major equipment (workshop tools, special items).
+ ${i18n.getTranslation('inventory.assets.description')}
diff --git a/src/systems/rendering/quests.js b/src/systems/rendering/quests.js
index efaa8da..d122835 100644
--- a/src/systems/rendering/quests.js
+++ b/src/systems/rendering/quests.js
@@ -5,6 +5,7 @@
import { extensionSettings, $questsContainer } from '../../core/state.js';
import { saveSettings } from '../../core/persistence.js';
+import { i18n } from '../../core/i18n.js';
/**
* HTML escape helper
@@ -25,11 +26,11 @@ function escapeHtml(text) {
export function renderQuestsSubTabs(activeTab = 'main') {
return `
-
- Main Quest
+
+ ${i18n.getTranslation('quests.section.main')}
-
- Optional Quests
+
+ ${i18n.getTranslation('quests.section.optional')}
`;
@@ -47,9 +48,9 @@ export function renderMainQuestView(mainQuest) {
return `
@@ -78,22 +79,22 @@ export function renderMainQuestView(mainQuest) {
` : `
-
No active main quests
+
${i18n.getTranslation('quests.main.empty')}
`}
- The main quests represent your primary objective in the story.
+ ${i18n.getTranslation('quests.main.hint')}
`;
@@ -109,7 +110,7 @@ export function renderOptionalQuestsView(optionalQuests) {
let questsHtml = '';
if (quests.length === 0) {
- questsHtml = '
No active optional quests
';
+ questsHtml = `
${i18n.getTranslation('quests.optional.empty')}
`;
} else {
questsHtml = quests.map((quest, index) => `
@@ -126,20 +127,20 @@ export function renderOptionalQuestsView(optionalQuests) {
return `
@@ -148,7 +149,7 @@ export function renderOptionalQuestsView(optionalQuests) {
- Optional quests are side objectives that complement your main story.
+ ${i18n.getTranslation('quests.optional.hint')}
diff --git a/src/systems/ui/desktop.js b/src/systems/ui/desktop.js
index b7e07e2..fa08743 100644
--- a/src/systems/ui/desktop.js
+++ b/src/systems/ui/desktop.js
@@ -3,6 +3,8 @@
* Handles desktop-specific UI functionality: tab navigation
*/
+import { i18n } from '../../core/i18n.js';
+
/**
* Sets up desktop tab navigation for organizing content.
* Only runs on desktop viewports (>1000px).
@@ -34,15 +36,15 @@ export function setupDesktopTabs() {
- Status
+ Status
- Inventory
+ Inventory
- Quests
+ Quests
`);
@@ -86,6 +88,7 @@ export function setupDesktopTabs() {
// Replace content box with tabs container
$contentBox.html('').append($tabsContainer);
+ i18n.applyTranslations($tabsContainer[0]);
// Handle tab switching
$tabNav.find('.rpg-tab-btn').on('click', function() {