-
Notifications
You must be signed in to change notification settings - Fork 185
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
System locale #5081
System locale #5081
Changes from 1 commit
1c7b634
f6b96a9
df361b8
a3d8154
bb95d79
ee23fd2
1b1b514
9b3d8e5
0adf4b9
fe54b79
d7ca69e
1c10d33
c243451
0aa332e
e96b2d3
f7212b5
aba5c24
72c0404
6dc1973
7cc7c65
4c594be
514f4a0
6fd9d43
3534091
62fe2c5
efd5263
f59808e
ad1a293
68c8775
e072f7f
1a786f9
d73f432
489c6e6
52a6bc9
87dcefc
00efc98
3f41cd9
6be1eae
de9e217
daa9ddb
f1c9367
c3f5da0
b5d5a38
8a4eea4
c31695f
66eacc6
60c4c58
a3d7393
d348fc4
3a07b75
8ace9df
8b71b4d
bc2987a
af6c742
ae87b00
835cf07
439de02
fdf3b45
c86f7b4
a1fe396
668245f
e0451f9
a40e2c5
549b9a5
b45216f
52a491a
6865a0b
fdbd74f
f51575c
5586b47
f4bd006
1e3a9fb
82aaf5a
5d4482b
feed347
edc9855
d9f65d7
de77db0
8f3a6c0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ pub mod apple_prefs { | |
}; | ||
use std::ffi::CStr; | ||
|
||
pub fn get_locales_mac() -> Vec<String> { | ||
pub fn get_locales() -> Vec<String> { | ||
let mut languages: Vec<String> = Vec::new(); | ||
|
||
unsafe { | ||
|
@@ -42,7 +42,7 @@ pub mod apple_prefs { | |
languages | ||
} | ||
|
||
pub fn get_system_calendars_macos() -> Vec<(String, String)> { | ||
pub fn get_system_calendars() -> Vec<(String, String)> { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. extract it as a named type. For example:
|
||
let mut calendars = Vec::new(); | ||
let mut calendar_locale_str = String::new(); | ||
let mut calendar_identifier_str = String::new(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. there's no value in defining those two strings here. Do it inside the then try to get it. Then check if you have |
||
|
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.
I would not do this in this low level function. In my mental model: