Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ if (!$SkipBuild) {
}

# make sure dependencies are built first so clippy runs correctly
$windows_projects = @("pal", "registry", "reboot_pending", "wmi-adapter", "configurations/windows", 'extensions/appx')
$windows_projects = @("pal", "registry_lib", "registry", "reboot_pending", "wmi-adapter", "configurations/windows", 'extensions/appx')
$macOS_projects = @("resources/brew")
$linux_projects = @("resources/apt")

Expand Down
34 changes: 34 additions & 0 deletions registry/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions registry/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ strip = "symbols" # See split-debuginfo - allows us to drop the size b
clap = { version = "4.5", features = ["derive"] }
crossterm = "0.29"
registry = "1.3"
registry_lib = { path = "../registry_lib" }
rust-i18n = { version = "3.1" }
schemars = "0.9"
serde = "1.0"
Expand Down
18 changes: 0 additions & 18 deletions registry/locales/en-us.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,26 +27,8 @@ findArgsKeysOnlyHelp = "Only find keys."
findArgsValuesOnlyHelp = "Only find values."
schemaAbout = "Retrieve JSON schema."

[config]
# No localizable strings

[error]
invalidHive = "Invalid hive"
json = "JSON"
registry = "Registry"
registryKey = "Registry key"
registryKeyNotFound = "Registry key not found"
registryValue = "Registry value"
utf16Conversion = "UTF-16 conversion failed due to interior NULL values for"
unsupportedValueDataType = "Unsupported registry value data type"

[main]
tracingInitError = "Unable to set global default tracing subscriber. Tracing is disabled."
debugAttach = "attach debugger to pid %{pid} and press any key to continue"
debugEventReadError = "Error: Failed to read event: %{err}"
debugEventUnexpectedError = "Unexpected event: %{e}"

[registry_helper]
whatIfCreateKey = "Key '%{subkey}' not found, would create it"
removeErrorKeyNotExist = "Key already does not exist"
removeDeletingSubKey = "Deleting subkey '%{name}' using %{parent}"
13 changes: 4 additions & 9 deletions registry/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,18 @@ use crossterm::event;
#[cfg(debug_assertions)]
use std::env;

// Init translations
use rust_i18n::t;
rust_i18n::i18n!("locales", fallback = "en-us");

use args::Arguments;
use clap::Parser;
use registry_helper::RegistryHelper;
use registry_lib::{config::Registry, RegistryHelper};
use rust_i18n::t;
use schemars::schema_for;
use std::process::exit;
use tracing::{debug, error};
use tracing_subscriber::{filter::LevelFilter, prelude::__tracing_subscriber_SubscriberExt, EnvFilter, Layer};
use crate::config::Registry;

mod args;
pub mod config;
mod error;
mod registry_helper;

rust_i18n::i18n!("locales", fallback = "en-us");

const EXIT_SUCCESS: i32 = 0;
const EXIT_INVALID_INPUT: i32 = 2;
Expand Down
Loading
Loading