diff --git a/.gitignore b/.gitignore index ea8c4bf..4683d71 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,15 @@ -/target +.vscode/ +# Generated by Cargo +# will have compiled files and executables +debug/ +target/ + +# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries +# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html +Cargo.lock + +# These are backup files generated by rustfmt +**/*.rs.bk + +# MSVC Windows builds of rustc generate these, which store debugging information +*.pdb diff --git a/src/cli.yml b/src/cli.yml index 8f2fbfe..51218b1 100644 --- a/src/cli.yml +++ b/src/cli.yml @@ -7,14 +7,14 @@ args: short: s long: source value_name: source_lang - help: The language you want to translate. Default is EN_US + help: The language you want to translate. Default is DE takes_value: true required: false - target: short: t long: target value_name: target_lang - help: The language your text should be tranlated to. Default is DE + help: The language your text should be tranlated to. Default is EN-US takes_value: true required: false - file: diff --git a/src/lib.rs b/src/lib.rs index c1cf156..81443f1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -26,17 +26,17 @@ pub mod deepl_helper { let my_path = base_dir.config_dir().join("deepl/.env"); match dotenv::from_path(my_path.as_path()) { Ok(env) => env, - Err(_) => panic!("could not load .env file {:?}", my_path.as_path()), + Err(_) => panic!("Could not load .env file {:?}", my_path.as_path()), }; let yaml = load_yaml!("cli.yml"); let matches = App::from_yaml(yaml).get_matches(); Self { - source_lang: matches.value_of("source").unwrap_or("EN").to_string(), + source_lang: matches.value_of("source").unwrap_or("DE").to_string(), target_lang: matches .value_of("target") - .unwrap_or("DE") + .unwrap_or("EN-US") .to_string(), file: matches.value_of("file").unwrap_or_default().to_string(), key: env::var("key").unwrap(),