public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
* [PATCH cygport] Use correct wording if only one package is announced
@ 2024-02-21 14:25 Christian Franke
  2024-02-21 21:36 ` Brian Inglis
  0 siblings, 1 reply; 4+ messages in thread
From: Christian Franke @ 2024-02-21 14:25 UTC (permalink / raw)
  To: cygwin-apps

[-- Attachment #1: Type: text/plain, Size: 43 bytes --]

Only cosmetic ...

-- 
Regards,
Christian


[-- Attachment #2: 0001-Use-correct-wording-if-only-one-package-is-announced.patch --]
[-- Type: text/plain, Size: 1114 bytes --]

From f1381ebc872f3b099c257677e2b8d5bf2451bb23 Mon Sep 17 00:00:00 2001
From: Christian Franke <christian.franke@t-online.de>
Date: Wed, 21 Feb 2024 13:35:14 +0100
Subject: [PATCH] Use correct wording if only one package is announced

---
 lib/pkg_upload.cygpart | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/pkg_upload.cygpart b/lib/pkg_upload.cygpart
index dcae8e2c..8039ec5c 100644
--- a/lib/pkg_upload.cygpart
+++ b/lib/pkg_upload.cygpart
@@ -172,6 +172,9 @@ __pkg_announce() {
 	local msg=$(mktemp -t cygwin-announce-${PF}.XXXXXX)
 	local msgat=$(date +@%s)
 	local -i n=0
+	local s="s have"
+
+	[ $pkg_count != 1 ] || s=" has"
 
 	cat > ${msg} <<_EOF
 From cygwin-announce-${PF} $(date '+%a %b %d %H:%M:%S %Y' --date=${msgat})
@@ -181,7 +184,7 @@ Date: $(date -R --date=${msgat})
 Message-Id: <$(date "+%Y%m%d%H%M%S.$$" --date=${msgat})-1-$(echo ${SMTP_SENDER} | sed 's|.*<\(.*\)>.*|\1|')>
 Subject: ${NAME} ${PVR}
 
-The following packages have been uploaded to the Cygwin distribution:
+The following package${s} been uploaded to the Cygwin distribution:
 
 _EOF
 
-- 
2.43.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH cygport] Use correct wording if only one package is announced
  2024-02-21 14:25 [PATCH cygport] Use correct wording if only one package is announced Christian Franke
@ 2024-02-21 21:36 ` Brian Inglis
  2024-02-23 11:16   ` Christian Franke
  0 siblings, 1 reply; 4+ messages in thread
From: Brian Inglis @ 2024-02-21 21:36 UTC (permalink / raw)
  To: cygwin-apps

On 2024-02-21 07:25, Christian Franke via Cygwin-apps wrote:

Change variable name from $s to $has or $s_have as variable $s usually implies 
only the plural letter s or nothing; e.g.
...
+	local has="s have"
+
+	[ $pkg_count != 1 ] || has=" has"
...
+The following package${has} been uploaded to the Cygwin distribution:
...
-- 
Take care. Thanks, Brian Inglis              Calgary, Alberta, Canada

La perfection est atteinte                   Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter  not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer     but when there is no more to cut
                                 -- Antoine de Saint-Exupéry

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH cygport] Use correct wording if only one package is announced
  2024-02-21 21:36 ` Brian Inglis
@ 2024-02-23 11:16   ` Christian Franke
  2024-03-10 17:20     ` Jon Turney
  0 siblings, 1 reply; 4+ messages in thread
From: Christian Franke @ 2024-02-23 11:16 UTC (permalink / raw)
  To: cygwin-apps

[-- Attachment #1: Type: text/plain, Size: 425 bytes --]

Brian Inglis via Cygwin-apps wrote:
> On 2024-02-21 07:25, Christian Franke via Cygwin-apps wrote:
>
> Change variable name from $s to $has or $s_have as variable $s usually 
> implies only the plural letter s or nothing; e.g.
> ...
> +    local has="s have"
> +
> +    [ $pkg_count != 1 ] || has=" has"
> ...
> +The following package${has} been uploaded to the Cygwin distribution:
> ...

Agree - new patch attached.


[-- Attachment #2: 0001-Use-correct-wording-if-only-one-package-is-announced.patch --]
[-- Type: text/plain, Size: 1129 bytes --]

From 6da0f806a94621d0ecfcca3c63e5c46e8ab3cd32 Mon Sep 17 00:00:00 2001
From: Christian Franke <christian.franke@t-online.de>
Date: Fri, 23 Feb 2024 11:35:01 +0100
Subject: [PATCH] Use correct wording if only one package is announced

---
 lib/pkg_upload.cygpart | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/pkg_upload.cygpart b/lib/pkg_upload.cygpart
index dcae8e2c..37bc2d63 100644
--- a/lib/pkg_upload.cygpart
+++ b/lib/pkg_upload.cygpart
@@ -172,6 +172,9 @@ __pkg_announce() {
 	local msg=$(mktemp -t cygwin-announce-${PF}.XXXXXX)
 	local msgat=$(date +@%s)
 	local -i n=0
+	local s_have="s have"
+
+	[ $pkg_count != 1 ] || s_have=" has"
 
 	cat > ${msg} <<_EOF
 From cygwin-announce-${PF} $(date '+%a %b %d %H:%M:%S %Y' --date=${msgat})
@@ -181,7 +184,7 @@ Date: $(date -R --date=${msgat})
 Message-Id: <$(date "+%Y%m%d%H%M%S.$$" --date=${msgat})-1-$(echo ${SMTP_SENDER} | sed 's|.*<\(.*\)>.*|\1|')>
 Subject: ${NAME} ${PVR}
 
-The following packages have been uploaded to the Cygwin distribution:
+The following package${s_have} been uploaded to the Cygwin distribution:
 
 _EOF
 
-- 
2.43.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH cygport] Use correct wording if only one package is announced
  2024-02-23 11:16   ` Christian Franke
@ 2024-03-10 17:20     ` Jon Turney
  0 siblings, 0 replies; 4+ messages in thread
From: Jon Turney @ 2024-03-10 17:20 UTC (permalink / raw)
  To: Christian Franke; +Cc: cygwin-apps

On 23/02/2024 11:16, Christian Franke via Cygwin-apps wrote:
> Brian Inglis via Cygwin-apps wrote:
>> On 2024-02-21 07:25, Christian Franke via Cygwin-apps wrote:
>>
>> Change variable name from $s to $has or $s_have as variable $s usually 
>> implies only the plural letter s or nothing; e.g.
>> ...
>> +    local has="s have"
>> +
>> +    [ $pkg_count != 1 ] || has=" has"
>> ...
>> +The following package${has} been uploaded to the Cygwin distribution:
>> ...
> 
> Agree - new patch attached.

Applied. Thanks!


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-03-10 17:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-21 14:25 [PATCH cygport] Use correct wording if only one package is announced Christian Franke
2024-02-21 21:36 ` Brian Inglis
2024-02-23 11:16   ` Christian Franke
2024-03-10 17:20     ` Jon Turney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).