diff --git a/dDashboardServer/static/js/character-missions.js b/dDashboardServer/static/js/character-missions.js index d8ead6527..429058fbe 100644 --- a/dDashboardServer/static/js/character-missions.js +++ b/dDashboardServer/static/js/character-missions.js @@ -27,9 +27,9 @@ }).join(''); var r = m.rewards, rewards = []; if (r) { - if (r.coins) rewards.push(nf.format(r.coins) + ' coins'); - if (r.uscore) rewards.push(nf.format(r.uscore) + ' U-score'); - if (r.reputation) rewards.push(nf.format(r.reputation) + ' reputation'); + if (r.coins) rewards.push(nf.format(r.coins) + ' ' + GameText.term('coins')); + if (r.uscore) rewards.push(nf.format(r.uscore) + ' ' + GameText.term('uscore')); + if (r.reputation) rewards.push(nf.format(r.reputation) + ' ' + GameText.term('reputation')); r.items.forEach(function (i) { rewards.push(nf.format(i.count) + 'x ' + (i.name || 'LOT ' + i.lot)); }); } return (tasks ? '' : '') + diff --git a/dDashboardServer/static/js/character-tools.js b/dDashboardServer/static/js/character-tools.js index 8d7bf03a0..5a84c97e6 100644 --- a/dDashboardServer/static/js/character-tools.js +++ b/dDashboardServer/static/js/character-tools.js @@ -62,7 +62,7 @@ function describeChanges() { var body = buildEdit(), parts = []; - ['coins', 'uscore', 'level'].forEach(function (k) { if (body[k] !== undefined) parts.push(k === 'uscore' ? 'U-score' : k); }); + ['coins', 'uscore', 'level'].forEach(function (k) { if (body[k] !== undefined) parts.push(k === 'level' ? k : GameText.term(k)); }); if (body.counts) parts.push(Object.keys(body.counts).length + ' count(s)'); if (body.remove) parts.push(body.remove.length + ' removed'); if (body.add) parts.push(body.add.length + ' added'); @@ -148,8 +148,8 @@ function compare(before, after) { var rows = []; - [['coins', 'Coins'], ['uscore', 'U-score'], ['level', 'Level'], ['missions_done', 'Missions done']].forEach(function (f) { - if (before[f[0]] !== after[f[0]]) rows.push('' + f[1] + '' + nf.format(before[f[0]]) + '' + nf.format(after[f[0]]) + ''); + [['coins', GameText.term('coins')], ['uscore', GameText.term('uscore')], ['level', 'Level'], ['missions_done', 'Missions done']].forEach(function (f) { + if (before[f[0]] !== after[f[0]]) rows.push('' + esc(f[1]) + '' + nf.format(before[f[0]]) + '' + nf.format(after[f[0]]) + ''); }); var a = itemsById(before), b = itemsById(after); Object.keys(a).forEach(function (id) { diff --git a/dDashboardServer/static/js/events.js b/dDashboardServer/static/js/events.js index a6cb96591..448a4d9bf 100644 --- a/dDashboardServer/static/js/events.js +++ b/dDashboardServer/static/js/events.js @@ -495,14 +495,14 @@ switch (type) { case 'treasure_hunt': return '
' + - '
' + ['count|Treasures|1', 'coins|Coins per find|0', 'radius|Pickup distance|2'].map(function (x) { + '
' + ['count|Treasures|1', 'coins|' + esc(GameText.term('coins')) + ' per find|0', 'radius|Pickup distance|2'].map(function (x) { var bits = x.split('|'); return '
' + field(i, 'config.' + bits[0], bits[1], c[bits[0]], 'type="number" min="' + bits[2] + '" step="any"') + '
'; }).join('') + '
' + '
' + '
' + field(i, 'config.itemCount', 'Count', c.itemCount, 'type="number" min="1" max="999"') + '
'; case 'bonus': - return '
' + ['coins|Coins ×', 'uscore|U-score ×', 'lootChance|Loot chance ×'].map(function (x) { + return '
' + ['coins|' + esc(GameText.term('coins')) + ' ×', 'uscore|' + esc(GameText.term('uscore')) + ' ×', 'lootChance|Loot chance ×'].map(function (x) { var bits = x.split('|'); return '
' + field(i, 'config.' + bits[0], bits[1], c[bits[0]], 'type="number" min="1" step="0.1"') + '
'; }).join('') + '
'; diff --git a/dDashboardServer/static/js/property-rent.js b/dDashboardServer/static/js/property-rent.js index 97fed5ec7..e733d22fa 100644 --- a/dDashboardServer/static/js/property-rent.js +++ b/dDashboardServer/static/js/property-rent.js @@ -17,7 +17,7 @@ var set = o ? esc(o.price) + ' coins' + (o.periodDays ? ' / ' + esc(o.periodDays) + ' days' : '') + '
' + esc(o.updated_by) + ', ' + esc(fmt.unix(o.updated_at)) + '
' : 'Template'; var edit = canManage ? '
' + - '' + + '' + '' + '' + (o ? '' : '') + '
' : ''; diff --git a/dDashboardServer/static/js/reports.js b/dDashboardServer/static/js/reports.js index 30c922617..bb8db055f 100644 --- a/dDashboardServer/static/js/reports.js +++ b/dDashboardServer/static/js/reports.js @@ -246,8 +246,8 @@ sourceTable(document.getElementById(ids.sources), summary, labels); } - var COIN_LABELS = { title: 'Coins', up: 'Coins gained', down: 'Coins spent' }; - var USCORE_LABELS = { title: 'U-score', up: 'U-score gained', down: 'U-score lost' }; + var COIN_LABELS = { title: GameText.term('coins'), up: GameText.term('coins') + ' gained', down: GameText.term('coins') + ' spent' }; + var USCORE_LABELS = { title: GameText.term('uscore'), up: GameText.term('uscore') + ' gained', down: GameText.term('uscore') + ' lost' }; var ITEM_LABELS = { title: 'Items', up: 'Items created', down: 'Items destroyed' }; function loadCoins() { @@ -575,7 +575,7 @@ // ---- Saved views ---- var TAB_TARGETS = { coins: '#tabCoins', uscore: '#tabUScore', items: '#tabItems', activity: '#tabActivity', map: '#tabMap', transfers: '#tabTransfers', trace: '#tabTrace', dupes: '#tabDupes', flags: '#tabFlags' }; - var TAB_NAMES = { coins: 'Coins', uscore: 'U-Score', items: 'Items', activity: 'Activity', map: 'World Map', transfers: 'Trades & Mail', trace: 'Trace', dupes: 'Duplicates', flags: 'Flags' }; + var TAB_NAMES = { coins: GameText.term('coins'), uscore: GameText.term('uscore'), items: 'Items', activity: 'Activity', map: 'World Map', transfers: 'Trades & Mail', trace: 'Trace', dupes: 'Duplicates', flags: 'Flags' }; var views = [], emailReady = false; function currentTab() { @@ -699,7 +699,7 @@ transfersTable = serverTable('#transfersTable', '/api/reports/transfers', [ { data: 'time', orderable: false, render: function (d) { return esc(fmt.unix(d)); } }, { data: 'method', orderable: false, render: function (d) { return methodBadge(d); } }, - { data: 'lot', orderable: false, render: function (d, t, row) { return d ? itemLink(d, row.name) : 'Coins'; } }, + { data: 'lot', orderable: false, render: function (d, t, row) { return d ? itemLink(d, row.name) : '' + esc(GameText.term('coins')) + ''; } }, { data: 'count', orderable: false, className: 'text-end', render: function (d) { return d ? num(d) : ''; } }, { data: 'coins', orderable: false, className: 'text-end', render: function (d) { return d ? num(d) : ''; } }, { data: 'from_character', orderable: false, render: function (d, t, row) { return charLink(d, row.from_name); } }, @@ -852,7 +852,7 @@ el.innerHTML = '

Nothing recorded.

'; } else { el.innerHTML = '' + - '' + + '' + history.map(function (h) { var marks = []; if (h.role === 'BRANCH') marks.push('other part'); diff --git a/dDashboardServer/templates/challenges.jinja2 b/dDashboardServer/templates/challenges.jinja2 index c8f407852..743feb511 100644 --- a/dDashboardServer/templates/challenges.jinja2 +++ b/dDashboardServer/templates/challenges.jinja2 @@ -62,7 +62,7 @@
Rewards for everyone who helped
-
+
diff --git a/dDashboardServer/templates/character-view.jinja2 b/dDashboardServer/templates/character-view.jinja2 index d7879cbfd..3e8ae3461 100644 --- a/dDashboardServer/templates/character-view.jinja2 +++ b/dDashboardServer/templates/character-view.jinja2 @@ -152,19 +152,19 @@
-
Coins
+
{{ game.terms.coins }}
{{ character.stats.coins }}
-
U-Score
+
{{ game.terms.uscore }}
{{ character.stats.universe_score }}
-
Reputation
+
{{ game.terms.reputation }}
{{ character.stats.reputation }}
@@ -196,7 +196,7 @@
-
Health{{ character.stats.health }} / {{ character.stats.max_health }}
+
{{ game.terms.life }}{{ character.stats.health }} / {{ character.stats.max_health }}
{% if character.stats.max_health > 0 %}
{% endif %}
@@ -204,7 +204,7 @@
{% if character.stats.max_armor > 0 %}
{% endif %}
-
Imagination{{ character.stats.imagination }} / {{ character.stats.max_imagination }}
+
{{ game.terms.imagination }}{{ character.stats.imagination }} / {{ character.stats.max_imagination }}
{% if character.stats.max_imagination > 0 %}
{% endif %}
@@ -319,7 +319,7 @@
TimeHowFromToZoneCountCoinsOld ID → new ID
Count' + esc(GameText.term('coins')) + 'Old ID → new ID
- + {% for zs in character.stats.zone_stats %} @@ -381,8 +381,8 @@
ZoneAchievementsCoinsEnemies
ZoneAchievements{{ game.terms.coins }}Enemies
- +
IDNameOwnerModelsReputationZoneActions
IDNameOwnerModels{{ game.terms.reputation }}ZoneActions
diff --git a/dDashboardServer/templates/properties.jinja2 b/dDashboardServer/templates/properties.jinja2 index 32d3ede19..48a30c414 100644 --- a/dDashboardServer/templates/properties.jinja2 +++ b/dDashboardServer/templates/properties.jinja2 @@ -44,7 +44,7 @@ Name Owner Moderation - Reputation + {{ game.terms.reputation }} Performance cost Zone Actions diff --git a/dDashboardServer/templates/property-view.jinja2 b/dDashboardServer/templates/property-view.jinja2 index dddec8500..afc22504b 100644 --- a/dDashboardServer/templates/property-view.jinja2 +++ b/dDashboardServer/templates/property-view.jinja2 @@ -152,7 +152,7 @@ function renderDetails(p) { field('Privacy', esc(Labels.name('privacy', p.privacy_option) || p.privacy_option)), field('Moderation', p.mod_approved ? fmt.badge('Approved', 'success') : (p.rejection_reason ? fmt.badge('Rejected', 'danger') : fmt.badge('Unapproved', 'warning')) + (p.rejection_reason ? ' ' + esc(p.rejection_reason) + '' : '')), - field('Reputation', num(p.reputation)), + field(GameText.term('reputation'), num(p.reputation)), field('Performance cost', perf ? num(perf, 2) : muted('Not reported'), 'Load estimate of the placed models, reported by the owner\'s game client after building'), field('Claimed', esc(fmt.unix(p.claimed))), field('Last updated', esc(fmt.unix(p.last_updated))), @@ -184,7 +184,7 @@ function renderDetails(p) { field('Clone limit', num(t.cloneLimit)), field('Achievement required', t.achievementRequired ? esc(t.achievementRequired) : muted('None')), field('Max build height', num(t.maxBuildHeight, 1)), - field('Reputation per minute', num(t.reputationPerMinute)), + field(GameText.term('reputation') + ' per minute', num(t.reputationPerMinute)), field('Zone position', [t.zoneX, t.zoneY, t.zoneZ].every((v) => typeof v === 'number') ? esc([t.zoneX, t.zoneY, t.zoneZ].map((v) => v.toFixed(1)).join(', ')) : muted('-')), field('Build area outline', Array.isArray(t.path) ? esc(t.path.length + ' points') : muted('-')) ].concat(t.localized_description ? [ '
Template description
' + esc(t.localized_description) + '
' ] : []).join(''); diff --git a/dDashboardServer/templates/reports.jinja2 b/dDashboardServer/templates/reports.jinja2 index dee951742..3294a2c91 100644 --- a/dDashboardServer/templates/reports.jinja2 +++ b/dDashboardServer/templates/reports.jinja2 @@ -6,7 +6,7 @@

Economy

-

Where coins, U-score and items come from and go. World servers write totals every few seconds, and the page updates as they do.

+

Where {{ game.terms.coins }}, {{ game.terms.uscore }} and items come from and go. World servers write totals every few seconds, and the page updates as they do.

@@ -28,8 +28,8 @@