From 781d907b078ae3006828b09cb11e8a1c31dc3783 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Thu, 5 Sep 2024 11:26:32 +0200 Subject: [PATCH 01/12] tasks --- readme.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/readme.md b/readme.md index f84fb31..c028469 100644 --- a/readme.md +++ b/readme.md @@ -236,7 +236,10 @@ Handle project workflows in a unified way: * opensuse * opensuse * disable & enable https -* persist locales +* locales + * persist + * restrict LC_* variables set for alpine + * test LC_* variables * test #### Shell → Python From a57ac1defe7d1fe4b37cc7777d58bdf251d86aea Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 6 Sep 2024 17:14:45 +0200 Subject: [PATCH 02/12] test/time,messages --- spcd/bootstrap.sh | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index c7dd25d..2cc8a09 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -1232,7 +1232,23 @@ spcd_step__packages_install_locales() { spcd_step "Set" spcd_txt_locale "set" "${SPCD_TXT_LOCALE}" spcd_step "Test" - date + # CTYPE + # NUMERIC + # TIME + spcd_split + locale --keyword-name LC_TIME | grep "^\(day\|mon\)" + # COLLATE + # MONETARY + # MESSAGES + spcd_split + locale --keyword-name LC_MESSAGES | grep "^\(yes\|no\)" + # + # PAPER + # NAME + # ADDRESS + # TELEPHONE + # MEASUREMENT + # IDENTIFICATION spcd_step_out } From 8eb88e4a886557d6f0c7f9453ff05b531ffffbeb Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 6 Sep 2024 17:20:33 +0200 Subject: [PATCH 03/12] test/id --- spcd/bootstrap.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index 2cc8a09..79ce4a6 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -1249,6 +1249,9 @@ spcd_step__packages_install_locales() { # TELEPHONE # MEASUREMENT # IDENTIFICATION + spcd_split + locale --keyword-name LC_IDENTIFICATION | + grep "^\(language\|territory\|title\)" spcd_step_out } From f83166cbfd53a1a6591d96c4dab0ff759dffb6de Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 6 Sep 2024 17:24:39 +0200 Subject: [PATCH 04/12] test/phone --- spcd/bootstrap.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index 79ce4a6..6062688 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -1247,6 +1247,8 @@ spcd_step__packages_install_locales() { # NAME # ADDRESS # TELEPHONE + spcd_split + locale --keyword-name LC_TELEPHONE | grep "^int_" # MEASUREMENT # IDENTIFICATION spcd_split From 0e4073755b111477d21b46d795f617a3477d6db6 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 6 Sep 2024 17:29:15 +0200 Subject: [PATCH 05/12] test/addr --- spcd/bootstrap.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index 6062688..b510766 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -1246,6 +1246,8 @@ spcd_step__packages_install_locales() { # PAPER # NAME # ADDRESS + spcd_split + locale --keyword-name LC_ADDRESS | grep "^\(country\|lang\)_name" # TELEPHONE spcd_split locale --keyword-name LC_TELEPHONE | grep "^int_" From c23ef10014ee67afe13dc60357dc64b0dbaf4cf9 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 6 Sep 2024 17:40:50 +0200 Subject: [PATCH 06/12] test/paper --- spcd/bootstrap.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index b510766..f2d50cf 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -1244,6 +1244,8 @@ spcd_step__packages_install_locales() { locale --keyword-name LC_MESSAGES | grep "^\(yes\|no\)" # # PAPER + spcd_split + locale --keyword-name LC_PAPER | grep "^\(height\|width\)" # NAME # ADDRESS spcd_split From fc79e9d394d727d3a865e17686afae81d690de31 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 6 Sep 2024 18:02:17 +0200 Subject: [PATCH 07/12] test/measure --- spcd/bootstrap.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index f2d50cf..676815f 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -1254,6 +1254,8 @@ spcd_step__packages_install_locales() { spcd_split locale --keyword-name LC_TELEPHONE | grep "^int_" # MEASUREMENT + spcd_split + locale --keyword-name LC_MEASUREMENT | grep "^measurement=" # IDENTIFICATION spcd_split locale --keyword-name LC_IDENTIFICATION | From f315142e24e821f2191a37e4974146b4cb437e31 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 6 Sep 2024 18:16:18 +0200 Subject: [PATCH 08/12] test/name --- spcd/bootstrap.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index 676815f..9a9d146 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -1247,6 +1247,8 @@ spcd_step__packages_install_locales() { spcd_split locale --keyword-name LC_PAPER | grep "^\(height\|width\)" # NAME + spcd_split + locale --keyword-name LC_NAME | grep "^name_m" # ADDRESS spcd_split locale --keyword-name LC_ADDRESS | grep "^\(country\|lang\)_name" From 0108214a37b5682cc83e40787102459c44d40edf Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 6 Sep 2024 18:23:07 +0200 Subject: [PATCH 09/12] test/monetary --- spcd/bootstrap.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index 9a9d146..9ee7879 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -1239,6 +1239,8 @@ spcd_step__packages_install_locales() { locale --keyword-name LC_TIME | grep "^\(day\|mon\)" # COLLATE # MONETARY + spcd_split + locale --keyword-name LC_MONETARY | grep "^\(int_curr\|currency\|mon_\)" # MESSAGES spcd_split locale --keyword-name LC_MESSAGES | grep "^\(yes\|no\)" From 4e645dfc0cc3817636c38d169d050f34dacd4a25 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 6 Sep 2024 18:30:10 +0200 Subject: [PATCH 10/12] test/numeric --- spcd/bootstrap.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index 9ee7879..616a705 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -1234,6 +1234,8 @@ spcd_step__packages_install_locales() { spcd_step "Test" # CTYPE # NUMERIC + spcd_split + locale --keyword-name LC_NUMERIC | grep "^\(decimal\|thousands\|grouping\)" # TIME spcd_split locale --keyword-name LC_TIME | grep "^\(day\|mon\)" From 11c144c7c33d36a6e23100c1714060823ec6d2db Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 6 Sep 2024 21:20:13 +0200 Subject: [PATCH 11/12] locale/show --- readme.md | 1 - spcd/bootstrap.sh | 62 +++++++++++++++++++++-------------------------- 2 files changed, 27 insertions(+), 36 deletions(-) diff --git a/readme.md b/readme.md index c028469..42e91ea 100644 --- a/readme.md +++ b/readme.md @@ -239,7 +239,6 @@ Handle project workflows in a unified way: * locales * persist * restrict LC_* variables set for alpine - * test LC_* variables * test #### Shell → Python diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index 616a705..4155628 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -915,6 +915,31 @@ spcd_txt_locale() { spcd_split spcd_txt_locale "list" ;; + "show") + local regex + for name in "${@}"; do + case "${name}" in + # LC_CTYPE + "LC_NUMERIC") regex="^\(decimal\|thousands\|grouping\)" ;; + "LC_TIME") regex="^\(day\|mon\)" ;; + # LC_COLLATE + "LC_MONETARY") regex="^\(int_curr\|currency\|mon_\)" ;; + "LC_MESSAGES") regex="^\(yes\|no\)" ;; + "LC_PAPER") regex="^\(height\|width\)" ;; + "LC_NAME") regex="^name_m" ;; + "LC_ADDRESS") regex="^\(country\|lang\)_name" ;; + "LC_TELEPHONE") regex="^int_" ;; + "LC_MEASUREMENT") regex="^measurement=" ;; + "LC_IDENTIFICATION") regex="^\(language\|territory\|title\)" ;; + *) ;; + esac + spcd_split + echo "${name}" + if [ -n "${regex}" ]; then + locale --keyword-name "${name}" | grep "${regex}" + fi + done + ;; *) ;; esac } @@ -1231,41 +1256,8 @@ spcd_step__packages_install_locales() { spcd_txt_locales "install" spcd_step "Set" spcd_txt_locale "set" "${SPCD_TXT_LOCALE}" - spcd_step "Test" - # CTYPE - # NUMERIC - spcd_split - locale --keyword-name LC_NUMERIC | grep "^\(decimal\|thousands\|grouping\)" - # TIME - spcd_split - locale --keyword-name LC_TIME | grep "^\(day\|mon\)" - # COLLATE - # MONETARY - spcd_split - locale --keyword-name LC_MONETARY | grep "^\(int_curr\|currency\|mon_\)" - # MESSAGES - spcd_split - locale --keyword-name LC_MESSAGES | grep "^\(yes\|no\)" - # - # PAPER - spcd_split - locale --keyword-name LC_PAPER | grep "^\(height\|width\)" - # NAME - spcd_split - locale --keyword-name LC_NAME | grep "^name_m" - # ADDRESS - spcd_split - locale --keyword-name LC_ADDRESS | grep "^\(country\|lang\)_name" - # TELEPHONE - spcd_split - locale --keyword-name LC_TELEPHONE | grep "^int_" - # MEASUREMENT - spcd_split - locale --keyword-name LC_MEASUREMENT | grep "^measurement=" - # IDENTIFICATION - spcd_split - locale --keyword-name LC_IDENTIFICATION | - grep "^\(language\|territory\|title\)" + spcd_step "Show" + spcd_txt_locale "show" spcd_step_out } From 389f8cc7374eeff1be2a76ee73f117199ee94fdf Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 6 Sep 2024 21:22:46 +0200 Subject: [PATCH 12/12] locale/debug --- spcd/bootstrap.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index 4155628..ce0d154 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -887,6 +887,9 @@ spcd_txt_locale() { ;; esac local name + for name in "${@}"; do + echo "${name}" + done case "${action}" in "list") if ! locale; then