diff mbox

[pacman-dev] scripts: deduplicate localized copyright messages

Message ID 20180509041214.20052-1-eschwartz@archlinux.org
State Superseded, archived
Headers show

Commit Message

Eli Schwartz May 9, 2018, 4:12 a.m. UTC
Fixes FS#58452
Also consistently add a blank line after the copyright and before the
license terms.

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
---

Do the email address lines need to be translated? Anyway, currently
updating the pacman copyright year dirties the translations. It could be
interpolated but then the copyright year updating code needs to be as
well.

 scripts/makepkg.sh.in           | 5 +++--
 scripts/pacman-db-upgrade.sh.in | 3 ++-
 scripts/pacman-key.sh.in        | 3 ++-
 scripts/pkgdelta.sh.in          | 3 ++-
 scripts/repo-add.sh.in          | 3 ++-
 5 files changed, 11 insertions(+), 6 deletions(-)

--
2.17.0

Comments

Eli Schwartz May 9, 2018, 5:13 a.m. UTC | #1
On 05/09/2018 12:12 AM, Eli Schwartz wrote:
> Fixes FS#58452
> Also consistently add a blank line after the copyright and before the
> license terms.
> 
> Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>

Deferred until after 5.1 is released
Allan McRae Sept. 18, 2018, 11:51 a.m. UTC | #2
On 9/5/18 2:12 pm, Eli Schwartz wrote:
> Fixes FS#58452
> Also consistently add a blank line after the copyright and before the
> license terms.
> 
> Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
> ---
> 
> Do the email address lines need to be translated? Anyway, currently
> updating the pacman copyright year dirties the translations. It could be
> interpolated but then the copyright year updating code needs to be as
> well.

Probably not...   How about changing this:

printf -- "$(gettext "Copyright (c) 2006-2018 Pacman Development Team
<pacman-dev@archlinux.org>.\n")"

to:

printf -- "$(gettext "Copyright (c)") 2006-2018 Pacman Development Team
<pacman-dev@archlinux.org>.\n"

so just the "Copyright (c)" is translated?

A
Eli Schwartz Sept. 18, 2018, 1:10 p.m. UTC | #3
On 9/18/18 7:51 AM, Allan McRae wrote:
> On 9/5/18 2:12 pm, Eli Schwartz wrote:
>> Fixes FS#58452
>> Also consistently add a blank line after the copyright and before the
>> license terms.
>>
>> Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
>> ---
>>
>> Do the email address lines need to be translated? Anyway, currently
>> updating the pacman copyright year dirties the translations. It could be
>> interpolated but then the copyright year updating code needs to be as
>> well.
> 
> Probably not...   How about changing this:
> 
> printf -- "$(gettext "Copyright (c) 2006-2018 Pacman Development Team
> <pacman-dev@archlinux.org>.\n")"
> 
> to:
> 
> printf -- "$(gettext "Copyright (c)") 2006-2018 Pacman Development Team
> <pacman-dev@archlinux.org>.\n"
> 
> so just the "Copyright (c)" is translated?

From a quick grep, I'm seeing people translate the "Pacman Development
Team" part and not the "Copyright".

If we're going to translate just part of a copyright line, then (going
by what our translators currently do) we should probably just explicitly
translate "Pacman Development Team"...
Allan McRae Sept. 18, 2018, 1:19 p.m. UTC | #4
On 18/9/18 11:10 pm, Eli Schwartz wrote:
> On 9/18/18 7:51 AM, Allan McRae wrote:
>> On 9/5/18 2:12 pm, Eli Schwartz wrote:
>>> Fixes FS#58452
>>> Also consistently add a blank line after the copyright and before the
>>> license terms.
>>>
>>> Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
>>> ---
>>>
>>> Do the email address lines need to be translated? Anyway, currently
>>> updating the pacman copyright year dirties the translations. It could be
>>> interpolated but then the copyright year updating code needs to be as
>>> well.
>>
>> Probably not...   How about changing this:
>>
>> printf -- "$(gettext "Copyright (c) 2006-2018 Pacman Development Team
>> <pacman-dev@archlinux.org>.\n")"
>>
>> to:
>>
>> printf -- "$(gettext "Copyright (c)") 2006-2018 Pacman Development Team
>> <pacman-dev@archlinux.org>.\n"
>>
>> so just the "Copyright (c)" is translated?
> 
> From a quick grep, I'm seeing people translate the "Pacman Development
> Team" part and not the "Copyright".
> 
> If we're going to translate just part of a copyright line, then (going
> by what our translators currently do) we should probably just explicitly
> translate "Pacman Development Team"...
> 

Hrm - I don't think that should be translated...   Lets just not
translate those lines.

A
diff mbox

Patch

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 299f9f7f..b4d8fed4 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1192,9 +1192,10 @@  usage() {

 version() {
 	printf "makepkg (pacman) %s\n" "$makepkg_version"
+	printf -- "$(gettext "Copyright (c) 2006-2018 Pacman Development Team <pacman-dev@archlinux.org>.\n")"
+	printf -- "$(gettext "Copyright (C) 2002-2006 Judd Vinet <jvinet@zeroflux.org>.\n")"
+	printf '\n'
 	printf -- "$(gettext "\
-Copyright (c) 2006-2018 Pacman Development Team <pacman-dev@archlinux.org>.\n\
-Copyright (C) 2002-2006 Judd Vinet <jvinet@zeroflux.org>.\n\n\
 This is free software; see the source for copying conditions.\n\
 There is NO WARRANTY, to the extent permitted by law.\n")"
 }
diff --git a/scripts/pacman-db-upgrade.sh.in b/scripts/pacman-db-upgrade.sh.in
index 9f27a2a2..55a3e8f7 100644
--- a/scripts/pacman-db-upgrade.sh.in
+++ b/scripts/pacman-db-upgrade.sh.in
@@ -54,8 +54,9 @@  usage() {

 version() {
 	printf "pacman-db-upgrade (pacman) %s\n" "$myver"
+	printf -- "$(gettext "Copyright (c) 2010-2018 Pacman Development Team <pacman-dev@archlinux.org>.\n")"
+	printf '\n'
 	printf -- "$(gettext "\
-Copyright (c) 2010-2018 Pacman Development Team <pacman-dev@archlinux.org>.\n\
 This is free software; see the source for copying conditions.\n\
 There is NO WARRANTY, to the extent permitted by law.\n")"
 }
diff --git a/scripts/pacman-key.sh.in b/scripts/pacman-key.sh.in
index ff460363..dd837c3f 100644
--- a/scripts/pacman-key.sh.in
+++ b/scripts/pacman-key.sh.in
@@ -92,8 +92,9 @@  usage() {

 version() {
 	printf "pacman-key (pacman) %s\n" "${myver}"
+	printf -- "$(gettext "Copyright (c) 2010-2018 Pacman Development Team <pacman-dev@archlinux.org>.\n")"
+	printf '\n'
 	printf -- "$(gettext "\
-Copyright (c) 2010-2018 Pacman Development Team <pacman-dev@archlinux.org>.\n\
 This is free software; see the source for copying conditions.\n\
 There is NO WARRANTY, to the extent permitted by law.\n")"
 }
diff --git a/scripts/pkgdelta.sh.in b/scripts/pkgdelta.sh.in
index 2dc12c28..72e063b0 100644
--- a/scripts/pkgdelta.sh.in
+++ b/scripts/pkgdelta.sh.in
@@ -70,8 +70,9 @@  This delta file can then be added to a database using repo-add.\n")"

 version() {
 	printf "pkgdelta (pacman) %s\n" "$myver"
+	printf -- "$(gettext "Copyright (c) 2009 Xavier Chantry <shiningxc@gmail.com>.\n")"
+	printf '\n'
 	printf -- "$(gettext "\
-Copyright (c) 2009 Xavier Chantry <shiningxc@gmail.com>.\n\n\
 This is free software; see the source for copying conditions.\n\
 There is NO WARRANTY, to the extent permitted by law.\n")"
 }
diff --git a/scripts/repo-add.sh.in b/scripts/repo-add.sh.in
index 3f181404..86bf9a88 100644
--- a/scripts/repo-add.sh.in
+++ b/scripts/repo-add.sh.in
@@ -93,8 +93,9 @@  See %s(8) for more details and descriptions of the available options.\n")" $cmd
 version() {
 	cmd=${0##*/}
 	printf "%s (pacman) %s\n\n" "$cmd" "$myver"
+	printf -- "$(gettext "Copyright (c) 2006-2018 Pacman Development Team <pacman-dev@archlinux.org>.\n")"
+	printf '\n'
 	printf -- "$(gettext "\
-Copyright (c) 2006-2018 Pacman Development Team <pacman-dev@archlinux.org>\n\n\
 This is free software; see the source for copying conditions.\n\
 There is NO WARRANTY, to the extent permitted by law.\n")"
 }