]> BookStack Code Mirror - bookstack/blobdiff - resources/js/services/translations.ts
ZIP Imports: Added API examples, finished testing
[bookstack] / resources / js / services / translations.ts
index 821c34f18f753364264003d8ddcc0e26395884a5..f548a51d1d17d4094d6f2e51fb204989e4d5111d 100644 (file)
@@ -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, string> = {}): 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*]+)]/;