-
Notifications
You must be signed in to change notification settings - Fork 214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use locale pragma instead of POSIX::setlocale() #808
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
theory
changed the title
Use locale pragma instead of POSIX::set_locale()
Use locale pragma instead of POSIX::setlocale()
Jan 6, 2024
Pull Request Test Coverage Report for Build 7642397296
💛 - Coveralls |
theory
force-pushed
the
perl-locale
branch
4 times, most recently
from
January 8, 2024 00:25
52d9d8d
to
501759c
Compare
theory
force-pushed
the
perl-locale
branch
2 times, most recently
from
January 24, 2024 03:07
5f93725
to
633860b
Compare
autarch
previously approved these changes
Jan 24, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM % one typo I found.
xt/locale/test-cli.t
Outdated
use File::Spec; | ||
use Capture::Tiny qw(:all); | ||
|
||
# Requires xt/locale/LocaleData; see xt/lcoale/README.md for details. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
# Requires xt/locale/LocaleData; see xt/lcoale/README.md for details. | |
# Requires xt/locale/LocaleData; see xt/locale/README.md for details. |
The Pragma is more likely to do the right thing, as confirmed by new tests, which fail when using `setlocale` and now succeed with `use locale`. The tests, in `xt/locale`, include compiled locale dictionaries (`*.mo` files) with a single message for the tested languages. This is in contrast to the released locale dictionaries, which are generated at release time but not stored in the repository. Update the `Language-Team` header in the project localization packages in `po` directory to `Sqitch Hackers <[email protected]>`. Update the `os.yml` and `perl.yml` workflows, which run all tests including the new locale tests, to install the required locales on Linux and to set the full `runs-on:` image name in the matrix (in response to shogo82148/actions-setup-perl#1699). Also remove the installation of an older version of Locale::TextDomain from those workflows, since gflohr/libintl-perl#7 has been fixed and released. While at it, upgrade to `actions/checkout@v4` in all workflows and use `runner.os` instead of `matrix.os` in conditionals.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The Pragma is more likely to do the right thing, as confirmed by new tests, which fail when using
setlocale
and now succeed withuse locale
. The tests, inxt/locale
, include compiled locale dictionaries (*.mo
files) with a single message for the tested languages. This is in contrast to the released locale dictionaries, which are generated at release time but not stored in the repository.Update the
Language-Team
header in the project localization packages inpo
directory toSqitch Hackers <[email protected]>
.Update the
os.yml
andperl.yml
workflows, which run all tests including the new locale tests, to install the required locales on Linux and to set the fullruns-on:
image name in the matrix (in response to shogo82148/actions-setup-perl#1699).Also remove the installation of an older version of Locale::TextDomain from those workflows, since gflohr/libintl-perl#7 has been fixed and released.
While at it, upgrade to
actions/checkout@v4
in all workflows and userunner.os
instead ofmatrix.os
in conditionals.Fixes #806.