Skip to content

Commit 86ffd89

Browse files
Manually rebase
1 parent aece664 commit 86ffd89

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

text/grep.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@
88
//
99

1010
use clap::Parser;
11-
use gettextrs::{bind_textdomain_codeset, textdomain};
11+
use gettextrs::{bind_textdomain_codeset, setlocale, textdomain, LocaleCategory};
1212
use libc::{regcomp, regex_t, regexec, regfree, regmatch_t, REG_EXTENDED, REG_ICASE, REG_NOMATCH};
13-
use plib::PROJECT_NAME;
1413
use std::{
1514
ffi::CString,
1615
fs::File,
@@ -640,9 +639,10 @@ impl GrepModel {
640639
// 1 - No lines were selected.
641640
// >1 - An error occurred.
642641
fn main() -> Result<(), Box<dyn std::error::Error>> {
643-
textdomain(PROJECT_NAME)?;
644-
bind_textdomain_codeset(PROJECT_NAME, "UTF-8")?;
645-
// Parse command line arguments
642+
setlocale(LocaleCategory::LcAll, "");
643+
textdomain(env!("PROJECT_NAME"))?;
644+
bind_textdomain_codeset(env!("PROJECT_NAME"), "UTF-8")?;
645+
646646
let mut args = Args::parse();
647647

648648
let exit_code = args

0 commit comments

Comments
 (0)