From a89ba904c84bca75c3271a45a9fba5b1b336c1d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A2u=20Cao?= Date: Tue, 21 Apr 2026 09:38:25 +0400 Subject: [PATCH] Pluralize button text based on number of files --- app/components/place-photo-upload.gjs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/components/place-photo-upload.gjs b/app/components/place-photo-upload.gjs index 46f2e80..9b2801f 100644 --- a/app/components/place-photo-upload.gjs +++ b/app/components/place-photo-upload.gjs @@ -37,6 +37,10 @@ export default class PlacePhotoUpload extends Component { ); } + get photoWord() { + return this.files.length === 1 ? 'Photo' : 'Photos'; + } + @action handleFileSelect(event) { this.addFiles(event.target.files); @@ -251,7 +255,7 @@ export default class PlacePhotoUpload extends Component { {{else}} Publish {{this.files.length}} - Photo(s) + {{this.photoWord}} {{/if}} {{/if}}