X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/add238fe9fb3d3626e8acd323bd32f91edb2797e..refs/pull/5681/head:/resources/js/services/translations.ts diff --git a/resources/js/services/translations.ts b/resources/js/services/translations.ts index 821c34f18..f548a51d1 100644 --- a/resources/js/services/translations.ts +++ b/resources/js/services/translations.ts @@ -10,7 +10,7 @@ export class Translator { * to use. Similar format at Laravel's 'trans_choice' helper. */ choice(translation: string, count: number, replacements: Record = {}): string { - replacements = Object.assign({}, replacements, {count: String(count)}); + replacements = Object.assign({}, {count: String(count)}, replacements); const splitText = translation.split('|'); const exactCountRegex = /^{([0-9]+)}/; const rangeRegex = /^\[([0-9]+),([0-9*]+)]/;