Jon Boone pushed to branch master at cmucl / cmucl
Commits: b1592289 by Jon Boone at 2023-06-19T00:07:56+00:00 Fix #154 - add 'en_US.UTF-8@piglatin' as locale-alias for 'en@piglatin'
- - - - - 361c463b by Jon Boone at 2023-06-19T00:08:11+00:00 Merge branch 'issue-154-piglatin-translation-doesnt-work-anymore' into 'master'
Fix #154 - add 'en_US.UTF-8@piglatin' as locale-alias for 'en@piglatin'
Closes #154 and #216
See merge request cmucl/cmucl!151 - - - - -
5 changed files:
- .gitlab-ci.yml - bin/build.sh - src/code/intl.lisp - src/i18n/locale/cmucl.pot - tests/issues.lisp
Changes:
===================================== .gitlab-ci.yml ===================================== @@ -46,6 +46,7 @@ linux:build: #- bin/cross-build-world.sh -crl -B boot-2020-04-1 xtarget xcross src/tools/cross-scripts/cross-x86-x86.lisp snapshot/bin/lisp # Regular build using the cross-compiled result or snapshot - bin/build.sh $bootstrap -R -C "x86_linux_clang" -o snapshot/bin/lisp + # - bin/build.sh $bootstrap -R -C "x86_linux" -o snapshot/bin/lisp - bin/make-dist.sh -I dist linux-4
linux:test:
===================================== bin/build.sh ===================================== @@ -130,13 +130,11 @@ buildit () time $BUILDWORLD $TARGET $OLDLISP $BOOT || { echo "Failed: $BUILDWORLD"; exit 1; } if [ "$REBUILD_LISP" = "yes" ]; then $TOOLDIR/rebuild-lisp.sh $TARGET - else - # Set the LANG to C. For whatever reason, if I (rtoy) don't - # do this on my openSuSE system, any messages from gcc are - # basically garbled. This should be harmless on other - # systems. - LANG=C $MAKE -C $TARGET/lisp $MAKE_TARGET || { echo "Failed: $MAKE -C $TARGET/lisp"; exit 1; } - fi + fi + + # Set the LANG to C. For whatever reason, if I (rtoy) don't do this on my openSuSE system, + # any messages from gcc are basically garbled. This should be harmless on other systems. + LANG=C $MAKE -C $TARGET/lisp $MAKE_TARGET || { echo "Failed: $MAKE -C $TARGET/lisp"; exit 1; }
if [ "$BUILD_WORLD2" = "yes" ]; then
===================================== src/code/intl.lisp ===================================== @@ -51,6 +51,7 @@ Use (INTL:TEXTDOMAIN "whatever") in each source file to set this.") (defvar *loaded-domains* (make-hash-table :test 'equal)) (defvar *locale-aliases* (make-hash-table :test 'equal)) +(setf (gethash "en_US.UTF-8@piglatin" *locale-aliases*) "en@piglatin")
(defstruct domain-entry (domain "" :type simple-base-string)
===================================== src/i18n/locale/cmucl.pot ===================================== @@ -9083,7 +9083,8 @@ msgstr "" #: src/code/extfmts.lisp msgid "" "The default external format to use if no other external format is\n" -" specified" +" specified. This is unaffected by any locale settings or by\n" +" SET-SYSTEM-EXTERNAL-FORMAT." msgstr ""
#: src/code/extfmts.lisp
===================================== tests/issues.lisp ===================================== @@ -830,7 +830,18 @@ (assert-true (stream::find-external-format :euckr)) (assert-true (stream::find-external-format :cp949))))
- +(define-test issue.154 + (:tag :issues) + (let ((old-locale intl::*locale*) + (locale "en_US.UTF-8@piglatin") + (piglatin-text "Ethay izesay ofway away eamstray inway-ufferbay.")) + (unwind-protect + (progn + (assert-equal locale (intl:setlocale "en_US.UTF-8@piglatin")) + (print (intl::find-domain "cmucl" intl::*locale*)) + (assert-equal piglatin-text (intl:dgettext "cmucl" "The size of a stream in-buffer.")) + ) + (intl:setlocale old-locale))))
(define-test issue.158 (:tag :issues)
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/a2fa2dae5851e0687f525fe...