Skip to content
Snippets Groups Projects
Commit 7fae77f3 authored by svornost's avatar svornost
Browse files

Make message_endWeek_Slaves responsible for ending punctuation, and put the...

Make message_endWeek_Slaves responsible for ending punctuation, and put the punctuation in the right place (i.e. inside the span if appropriate).
parent 6809dc12
Branches
Tags
1 merge request!7577Fix corp report punctuation problem
......@@ -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) {
......
......@@ -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;
}
......
......@@ -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;
}
......
......@@ -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>>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment