-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
sort: Introduce locale-aware month sorting #8421
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
base: main
Are you sure you want to change the base?
Conversation
GNU testsuite comparison:
|
GNU testsuite comparison:
|
|
||
match response.payload.get() { | ||
MonthNames::Linear(months) => Some(months.iter().map(ToString::to_string).collect()), | ||
_ => todo!("unsupported"), |
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.
please add a comment detailing what should happen here
} | ||
|
||
pub fn locale_abbr_month_names() -> Option<&'static [String]> { | ||
static DECIMAL_SEP: OnceLock<Option<Vec<String>>> = OnceLock::new(); |
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.
sorry but what means DECIMAL_SEP in this context?
# to the abbreviated month of april in the French locale: | ||
# GNU is 'avril' | ||
# ICU is 'avr.' | ||
# sed -i -e 's|\(LC_ALL=$LOC locale abmon 2>/dev/null\)|\1 \| sed s/avril/avr./|' tests/sort/sort-month.sh |
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.
why commented ?
This PR adds support for locale-aware month-sorting.