Open kborowinski opened 2 months ago
@cdhunt Thoughts?
@kborowinski Thanks for the PR. I'd prefer smaller PRs, easier to test :)
@dfinke I can close that PR and prepare bunch of smaller ones, if you like.
Thanks, let's hold off till @cdhunt can respond. He was planning a bunch of things.
I'm pretty swamped this week, but I kicked off the tests and it did hit one failure for the 5.1 run.
https://github.com/dfinke/PowerShellHumanizer/actions/runs/9827401928/job/27170421774#step:4:67
The test fails because on PS 5.1 range operator does not support characters :
BeforeAll {
$listAlphaLower = 'a'..'z'
$listAlphaUpper = 'A'..'Z'
I'll fix tests to work on PS 5.1
@dfinke @cdhunt:
FYI, the latest Humanizer
pre-releases v3.0.0-beta.13 and v3.0.0-beta.54 do not work on PowerShell 7.5.0-preview.3
and PowerShell daily builds.
I had to revert to v2.14.1
stable on my private fork of PowerShellHumanizer
to get it to work on PS 5.1, 7.4.3 and 7.5.0
@cdhunt @dfinke This PR amends
update2024
branch with the following:Updates
Humanizer
package to latest beta.Adds support for
PowerShell 5.1
by adding specific versions ofSystem.Buffer
andSystem.Runtime.CompilerServices.Unsafe
assemblies (other option would be to register them in GAC manually)Tries to locateHummanizer.resources.dll
by two letter ISO language name, as last resort, when folder specified in$PSCulture
does not exist. For example, Polish culture can be reported either aspl-PL
orpl
, and resource file for Polish culture is stored inpl
folder. This fails to load on Windows 11 where Polish culture is reported aspl-PL
. I'm usingCurrentUICulture
rather thanCurrentCulture
to be in line with current GUI language and not locale.Extends
TimeSpan.types
so user can specify maximumTimeUnit
,CultureInfo
, separator and numeric to word conversion. This is handy, when one want's to use different culuture that current:Fixes
ConvertTo-Quantity
so this example fromTryPowerShellHumanizer.ps1
works as expected:EDIT:
I don't know if that changed in latest beta but
Humanizer.dll
automatically loads proper resource file. You can test is by commenting out this block of code inPowerShellHumanizer.psm1
: