l10n: fix plurals (fix #255, fix #256)

fastpreview
Varun Patil 2022-11-25 06:55:46 -08:00
parent 46e0730257
commit b7e551ed81
2 changed files with 19 additions and 6 deletions

View File

@ -112,11 +112,17 @@ export default class FirstStart extends Mixins(GlobalMixin, UserConfig) {
} }
// Count total photos // Count total photos
const total = res.data.reduce((acc, day) => acc + day.count, 0); const n = res.data.reduce((acc, day) => acc + day.count, 0);
this.info = this.t("memories", "Found {total} photos in {path}", { this.info = this.n(
total, "memories",
path, "Found {n} item in {path}",
}); "Found {n} items in {path}",
n,
{
n,
path,
}
);
this.chosenPath = path; this.chosenPath = path;
} }

View File

@ -69,8 +69,15 @@ export default class AddToAlbumModal extends Mixins(GlobalMixin) {
this.added(this.photos.filter((p) => fids.includes(p.fileid))); this.added(this.photos.filter((p) => fids.includes(p.fileid)));
} }
const n = this.photosDone;
showInfo( showInfo(
this.t("memories", "{n} photos added to album", { n: this.photosDone }) this.n(
"memories",
"{n} item added to album",
"{n} items added to album",
n,
{ n }
)
); );
this.close(); this.close();
} }