From 7fae77f3ec2c3df37e322dc2ed367556a5f33ab3 Mon Sep 17 00:00:00 2001 From: Svornost <11434-svornost@users.noreply.gitgud.io> Date: Fri, 28 Aug 2020 20:43:44 -0700 Subject: [PATCH] Make message_endWeek_Slaves responsible for ending punctuation, and put the punctuation in the right place (i.e. inside the span if appropriate). --- src/Corporation/corporate-divisionAcquiring.js | 6 +++--- src/Corporation/corporate-divisionProcessing.js | 4 ++-- src/Corporation/corporate-divisionWorking.js | 4 ++-- src/Corporation/corporationDevelopments.tw | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Corporation/corporate-divisionAcquiring.js b/src/Corporation/corporate-divisionAcquiring.js index 145c9a3bc16..867ae142ed4 100644 --- a/src/Corporation/corporate-divisionAcquiring.js +++ b/src/Corporation/corporate-divisionAcquiring.js @@ -34,11 +34,11 @@ App.Corporate.Init_DivisionAcquiring = function(shared) { message_endWeek_Slaves(divLedger) { let newSlaves = divLedger.slaves.value; if(newSlaves > 0) { - return `<span class="green">acquired ${numberWithPlural(newSlaves, "slave")}</span>` - + (this.hadMercenaryHelp ? " with the help of your mercenaries" : ""); + return `<span class="green">acquired ${numberWithPlural(newSlaves, "slave")}` + + (this.hadMercenaryHelp ? "</span> with the help of your mercenaries." : ".</span>"); } else { return `<span class="red">failed to acquire any slaves</span>` - + (this.hadMercenaryHelp ? " even with the help of your mercenaries" : ""); + + (this.hadMercenaryHelp ? "</span> even with the help of your mercenaries." : ".</span>"); } } endWeek_Slaves(divLedger) { diff --git a/src/Corporation/corporate-divisionProcessing.js b/src/Corporation/corporate-divisionProcessing.js index 719dac292fc..b66bdded613 100644 --- a/src/Corporation/corporate-divisionProcessing.js +++ b/src/Corporation/corporate-divisionProcessing.js @@ -43,9 +43,9 @@ App.Corporate.Init_DivisionProcessing = function(shared) { } retval += " The division "; if(this.activeSlaves) { - retval += `is still ${this._const.slaveProcessDescription.present} ${numberWithPlural(this.activeSlaves, "slave")}`; + retval += `is still ${this._const.slaveProcessDescription.present} ${numberWithPlural(this.activeSlaves, "slave")}.`; } else { - retval += `doesn't have any slaves to ${this._const.slaveProcessDescription.future}`; + retval += `doesn't have any slaves to ${this._const.slaveProcessDescription.future}.`; } return retval; } diff --git a/src/Corporation/corporate-divisionWorking.js b/src/Corporation/corporate-divisionWorking.js index 2cfbd382f0c..8f4a6dbf1b1 100644 --- a/src/Corporation/corporate-divisionWorking.js +++ b/src/Corporation/corporate-divisionWorking.js @@ -38,12 +38,12 @@ App.Corporate.Init_DivisionWorking = function(shared) { let lostSlaves = divLedger.slaves.value; let retval = '';// The division if(this.activeSlaves <= 0) { - retval += `has <span class="red">no slaves</span> to ${this._const.slaveWorkDescription.future}`; + retval += `has <span class="red">no slaves</span> to ${this._const.slaveWorkDescription.future}.`; } else { retval += `is ${this._const.slaveWorkDescription.present} <span class="green">${numberWithPlural(this.activeSlaves, 'slave')}.</span> `; } if(lostSlaves > 0) { - retval += `During operations <span class="red">${numberWithPlural(lostSlaves, 'slave')}</span> ${this._const.slaveWorkDescription.past}`; + retval += `During operations <span class="red">${numberWithPlural(lostSlaves, 'slave')}</span> ${this._const.slaveWorkDescription.past}.`; } return retval; } diff --git a/src/Corporation/corporationDevelopments.tw b/src/Corporation/corporationDevelopments.tw index 0403f009bc6..b6554c11444 100644 --- a/src/Corporation/corporationDevelopments.tw +++ b/src/Corporation/corporationDevelopments.tw @@ -14,7 +14,7 @@ <<for _d range _weekLedger.divisionLedgers>> <<set _div = _d.division>> /* Reporting on number of slaves being processed or completed processing */ - <br><<= _div.name>>: The division <<= _div.message_endWeek_Slaves(_d) >>. + <br><<= _div.name>>: The division <<= _div.message_endWeek_Slaves(_d) >> <<if _d.market.originalBuy != null>> <br> <<if _d.market.buy == 0>> -- GitLab