diff --git a/languages/en.json b/languages/en.json index 3016a0c..255110d 100644 --- a/languages/en.json +++ b/languages/en.json @@ -27,5 +27,68 @@ "oronder.No-Level": "Actor has no Level.", "oronder.No-Race": "Actor has no Race.", "oronder.No-Background": "Actor has no Background.", - "oronder.No-Class": "Actor has no Class." + "oronder.No-Class": "Actor has no Class.", + "oronder.Its-Your-Turn": "It's your turn", + "oronder.Initiative": "Initiative", + "oronder.Round": "Round", + "oronder.Current-Round": "Current Round", + "oronder.Unharmed": "Unharmed", + "oronder.Healthy": "Healthy", + "oronder.Injured": "Injured", + "oronder.Bloodied": "Bloodied", + "oronder.Severe": "Severe", + "oronder.Critical": "Critical", + "oronder.Dead": "Dead", + "oronder.Publish-Combat-Tracker-To-Discord": "Publish Combat Tracker to Discord", + "oronder.Actor-Not-Found": "Actor Not Found", + "oronder.Item-Not-Found": "Item Not Found", + "oronder.LibWrapper-Error": "Oronder requires the 'libWrapper' module. Please install and activate it.", + "oronder.Connection-Failed": "Oronder connection failed", + "oronder.Failed-To-Update-Actor": "Failed to update XP. No Actor with ID", + "oronder.Found": "Found!", + "oronder.No-Actors-To-Reward-Xp-To": "No actors to reward xp to", + "oronder.No-Session-Found": "No Session Found", + "oronder.XP-Reward-Predates-Session-Start": "XP reward predates session start", + "oronder.Discord-Popup-Blocked": "Could not launch Discord Authentication window! Check your browser's popup settings.", + "oronder.GM-XP": "GM XP", + "oronder.GM-XP-Label": "How much experience a GM may reward one of their PCs for running a session.", + "oronder.Starting-Level": "Starting Level", + "oronder.Starting-Level-Label": "Starting level for new PCs. Override by assigning a PC to a Campaign.", + "oronder.Timezone": "Timezone", + "oronder.Timezone-Label": "Default timezone for scheduling and roll calls.", + "oronder.GM-Role": "GM Role", + "oronder.GM-Role-Label": "Discord Role for GMs.", + "oronder.Discord-Status": "Discord Status", + "oronder.Channels": "Channels", + "oronder.Session-Channel": "Session Channel", + "oronder.Session-Channel-Label": "Channel Sessions will be posted to. If a Forum Channel is selected, Oronder will create a new thread for each session.", + "oronder.Downtime-Channel": "Downtime Channel", + "oronder.Downtime-Channel-Label": "Channel where /downtime... rolls should take place.", + "oronder.Downtime-GM-Channel": "Downtime GM Channel", + "oronder.Downtime-GM-Channel-Label": "Optional Channel where downtime activities may be claimed by a GM.", + "oronder.DISABLED": "DISABLED", + "oronder.Voice-Channel": "Voice Channel", + "oronder.Voice-Channel-Label": "Voice Channel where Oronder will create session events.", + "oronder.Scheduling-Channel": "Scheduling Channel", + "oronder.Scheduling-Channel-Label": "Channel where Oronder will advertise new Sessions.", + "oronder.Rollcall": "Rollcall", + "oronder.Rollcall-Label": "If enabled, Oronder will prompt members for their weekly availability.", + "oronder.Role": "Role", + "oronder.Rollcall-Role-Label": "Role Oronder will @ mention when posting roll call.", + "oronder.Channel": "Channel", + "oronder.Rollcall-Channel-Label": "Channel where roll call messages will be posted to.", + "oronder.Day": "Day", + "oronder.Rollcall-Day-Label": "Day of the week when roll call messages will be posted.", + "oronder.Time": "Time", + "oronder.Rollcall-Time-Label": "Time of day when roll call messages will be posted.", + "oronder.Advanced-Options": "Advanced Options", + "oronder.Advanced-Options-Label": "Display Advanced and Experimental Options.", + "oronder.Publish-Discord-Rolls-To-Foundry": "(Under Development) Publish Discord Rolls to Foundry", + "oronder.Publish-Discord-Rolls-To-Foundry-Label": "Oronder will post rolls from Discord to Foundry if a GM is logged into Foundry.", + "oronder.Combat-Tracking-Enable": "Publish Combat Tracker to Discord", + "oronder.Combat-Tracking-Enable-Label": "Oronder will post changes in the combat tracker to the Combat Channel configured below.", + "oronder.Combat-Channel": "Combat Channel", + "oronder.Combat-Channel-Label": "Channel where Combat Tracking Messages will be posted.", + "oronder.Combat-Health-Estimate": "Combat Health Estimate", + "oronder.Combat-Health-Estimate-Label": "Select whose health will be described(i.e. Healthy) rather than shown (HP 8/9)." } \ No newline at end of file diff --git a/src/combat.mjs b/src/combat.mjs index d50af9f..2280c52 100644 --- a/src/combat.mjs +++ b/src/combat.mjs @@ -75,9 +75,9 @@ function parse_turn(combat, updateData) { let output = '' if (discordId.length) - output += `It's your turn <@${discordId[0]}>\n` + output += `${game.i18n.localize("oronder.Its-Your-Turn")} <@${discordId[0]}>\n` output += '```md\n' - output += `# Initiative ${actor.initiative} Round ${c.round}\n` + output += `# ${game.i18n.localize("oronder.Initiative")} ${actor.initiative} ${game.i18n.localize("oronder.Round")} ${c.round}\n` if (turn.defeated) { output += `${actor.name} \n` @@ -109,7 +109,7 @@ function parse_combat_round(combat) { const healthSetting = game.settings.get(MODULE_ID, COMBAT_HEALTH_ESTIMATE) let output = "```md\n" - output += `Current Round: ${combat.round}\n` + output += `${game.i18n.localize("oronder.Current-Round")}: ${combat.round}\n` output += "==================\n" // Parse each combatant @@ -147,19 +147,19 @@ function get_health(hp, combatHealthSetting, actorType) { const pct = Math.round(hp.effectiveMax ? (hp.value / hp.effectiveMax) * 100 : 0, 0, 100); switch (true) { case pct > 99: - return "Unharmed"; + return game.i18n.localize("oronder.Unharmed"); case pct > 75: - return "Healthy"; + return game.i18n.localize("oronder.Healthy"); case pct > 50: - return "Injured"; + return game.i18n.localize("oronder.Injured"); case pct > 25: - return "Bloodied"; + return game.i18n.localize("oronder.Bloodied"); case pct > 10: - return "Severe"; + return game.i18n.localize("oronder.Severe"); case pct > 0: - return "Critical"; + return game.i18n.localize("oronder.Critical"); default: - return "Dead"; + return game.i18n.localize("oronder.Dead"); } } @@ -188,7 +188,7 @@ export function register_combat_settings_toggle() { $('
', {class: "form-group"}) .append( $("