Skip to content

Commit

Permalink
Interpolate remaining i18n Vue strings (#1154)
Browse files Browse the repository at this point in the history
Use the tct method to combine interpolation and gettext for overlooked strings in Vue files.
  • Loading branch information
tienne-B authored and philipbelesky committed Jul 29, 2019
1 parent 10dc7b9 commit bb28342
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions tabbycat/checkins/templates/VenuesStatusMixin.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@ export default {
})
if (entity.categories.length > 0 && entity.identifier !== null) {
const substitutions = [entity.name, categories.join(', '), entity.identifier[0]]
return this.gettext('%s (%s) with identifier of %s', substitutions)
return this.tct('%s (%s) with identifier of %s', substitutions)
}
if (entity.categories.length === 0 && entity.identifier !== null) {
const substitutions = [entity.name, entity.identifier[0]]
return this.gettext('%s (no category) with identifier of %s', substitutions)
return this.tct('%s (no category) with identifier of %s', substitutions)
}
if (entity.categories.length > 0) {
const substitutions = [entity.name, categories.join(', ')]
return this.gettext('%s (%s) with no assigned identifier', substitutions)
return this.tct('%s (%s) with no assigned identifier', substitutions)
}
if (entity.categories.length === 0) {
return this.gettext('%s (no category) with no assigned identifier', [entity.name])
return this.tct('%s (no category) with no assigned identifier', [entity.name])
}
return entity.name
},
Expand Down Expand Up @@ -69,7 +69,7 @@ export default {
})
},
venuesByPriority: function () {
return _.groupBy(this.entitiesSortedByName, v => this.gettext('Priority %1', v.priority))
return _.groupBy(this.entitiesSortedByName, v => this.tct('Priority %1', [v.priority]))
},
},
}
Expand Down
2 changes: 1 addition & 1 deletion tabbycat/printing/templates/PrintableDebateInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ export default {
adjs.push(adjInfo)
})
const otherAdjsList = adjs.join(this.gettext('; '))
return this.gettext('Adjudicating with ' + otherAdjsList + '.')
return this.tct('Adjudicating with %s.', [otherAdjsList])
},
motionsAccountingForBlanks: function () {
if (this.roundInfo.motions.length > 0) {
Expand Down

0 comments on commit bb28342

Please sign in to comment.