|
1 | 1 | use byteorder::{BigEndian, ByteOrder, LittleEndian, NativeEndian, WriteBytesExt}; |
2 | 2 | use clap::Parser; |
3 | 3 | use gettextrs::{bind_textdomain_codeset, gettext, setlocale, textdomain, LocaleCategory}; |
4 | | -use plib::PROJECT_NAME; |
| 4 | +use plib::io::input_stream; |
5 | 5 | use std::{ |
6 | 6 | cell::RefCell, |
7 | 7 | collections::BTreeMap, |
@@ -295,7 +295,7 @@ impl MessageCatalog { |
295 | 295 | input_path: &PathBuf, |
296 | 296 | catfile_catalog: Option<MessageCatalog>, |
297 | 297 | ) -> Result<Self, Box<dyn std::error::Error>> { |
298 | | - let mut file = plib::io::input_stream(input_path, true)?; |
| 298 | + let mut file = input_stream(input_path, true)?; |
299 | 299 |
|
300 | 300 | let mut input = String::new(); |
301 | 301 | file.read_to_string(&mut input)?; |
@@ -774,11 +774,11 @@ impl MessageCatalog { |
774 | 774 | } |
775 | 775 |
|
776 | 776 | fn main() -> Result<(), Box<dyn std::error::Error>> { |
777 | | - let args = Args::parse(); |
778 | | - |
779 | 777 | setlocale(LocaleCategory::LcAll, ""); |
780 | | - textdomain(PROJECT_NAME)?; |
781 | | - bind_textdomain_codeset(PROJECT_NAME, "UTF-8")?; |
| 778 | + textdomain(env!("PROJECT_NAME"))?; |
| 779 | + bind_textdomain_codeset(env!("PROJECT_NAME"), "UTF-8")?; |
| 780 | + |
| 781 | + let args = Args::parse(); |
782 | 782 |
|
783 | 783 | let mut exit_code = 0; |
784 | 784 |
|
|
0 commit comments