Jon Boone pushed to branch resolve-mr-for-issue-154-piglatin-translation-doesnt-work-anymore at cmucl / cmucl
Commits: 961adce2 by Jon Boone at 2023-06-05T15:00:50-04:00 add en_US.UTF-8@piglatin as locale-alias
- - - - - be648edc by Jon Boone at 2023-06-05T15:00:51-04:00 adding test for issue 154 fix
- - - - - 8f48ebc1 by Jon Boone at 2023-06-05T15:00:52-04:00 corrects test definition to restore locale afterward
- - - - - d6801a41 by Jon Boone at 2023-06-05T15:00:53-04:00 modified issue.154 test to have lispier symbols
- - - - -
3 changed files:
- src/code/intl.lisp - src/i18n/locale/cmucl.pot - tests/issues.lisp
Changes:
===================================== 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,16 @@ (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")) + (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...