mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
l10n: remove help_about
This commit is contained in:
parent
c437ac830e
commit
c3f2247eca
8 changed files with 39 additions and 46 deletions
|
@ -1,2 +1,6 @@
|
|||
pinky-about = Displays brief user information on Unix-based systems
|
||||
pinky-usage = pinky [OPTION]... [USER]...
|
||||
pinky-about-musl-warning = Warning: When built with musl libc, the `pinky` utility may show incomplete
|
||||
or missing user information due to musl's stub implementation of `utmpx`
|
||||
functions. This limitation affects the ability to retrieve accurate details
|
||||
about logged-in users.
|
||||
|
|
|
@ -7,21 +7,10 @@
|
|||
|
||||
use clap::{Arg, ArgAction, Command};
|
||||
use uucore::format_usage;
|
||||
use uucore::locale::get_message;
|
||||
|
||||
mod platform;
|
||||
|
||||
#[cfg(target_env = "musl")]
|
||||
const ABOUT: &str = concat!(
|
||||
help_about!("pinky.md"),
|
||||
"\n\nWarning: When built with musl libc, the `pinky` utility may show incomplete \n",
|
||||
"or missing user information due to musl's stub implementation of `utmpx` \n",
|
||||
"functions. This limitation affects the ability to retrieve accurate details \n",
|
||||
"about logged-in users."
|
||||
);
|
||||
|
||||
#[cfg(not(target_env = "musl"))]
|
||||
use uucore::locale::get_message;
|
||||
|
||||
mod options {
|
||||
pub const LONG_FORMAT: &str = "long_format";
|
||||
pub const OMIT_HOME_DIR: &str = "omit_home_dir";
|
||||
|
@ -40,9 +29,14 @@ mod options {
|
|||
use platform::uumain;
|
||||
|
||||
pub fn uu_app() -> Command {
|
||||
#[cfg(not(target_env = "musl"))]
|
||||
let about = get_message("pinky-about");
|
||||
#[cfg(target_env = "musl")]
|
||||
let about = get_message("pinky-about") + &get_message("pinky-about-musl-warning");
|
||||
|
||||
Command::new(uucore::util_name())
|
||||
.version(uucore::crate_version!())
|
||||
.about(get_message("pinky-about"))
|
||||
.about(about)
|
||||
.override_usage(format_usage(&get_message("pinky-usage")))
|
||||
.infer_long_args(true)
|
||||
.disable_help_flag(true)
|
||||
|
|
|
@ -2,3 +2,6 @@ uptime-about = Display the current time, the length of time the system has been
|
|||
the number of users on the system, and the average number of jobs
|
||||
in the run queue over the last 1, 5 and 15 minutes.
|
||||
uptime-usage = uptime [OPTION]...
|
||||
uptime-about-musl-warning = Warning: When built with musl libc, the `uptime` utility may show '0 users'
|
||||
due to musl's stub implementation of utmpx functions. Boot time and load averages
|
||||
are still calculated using alternative mechanisms.
|
||||
|
|
|
@ -17,22 +17,12 @@ use uucore::uptime::*;
|
|||
use clap::{Arg, ArgAction, Command, ValueHint, builder::ValueParser};
|
||||
|
||||
use uucore::format_usage;
|
||||
use uucore::locale::get_message;
|
||||
|
||||
#[cfg(unix)]
|
||||
#[cfg(not(target_os = "openbsd"))]
|
||||
use uucore::utmpx::*;
|
||||
|
||||
#[cfg(target_env = "musl")]
|
||||
const ABOUT: &str = concat!(
|
||||
help_about!("uptime.md"),
|
||||
"\n\nWarning: When built with musl libc, the `uptime` utility may show '0 users' \n",
|
||||
"due to musl's stub implementation of utmpx functions. Boot time and load averages \n",
|
||||
"are still calculated using alternative mechanisms."
|
||||
);
|
||||
|
||||
#[cfg(not(target_env = "musl"))]
|
||||
use uucore::locale::get_message;
|
||||
|
||||
pub mod options {
|
||||
pub static SINCE: &str = "since";
|
||||
pub static PATH: &str = "path";
|
||||
|
@ -74,9 +64,14 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
|
|||
}
|
||||
|
||||
pub fn uu_app() -> Command {
|
||||
#[cfg(not(target_env = "musl"))]
|
||||
let about = get_message("uptime-about");
|
||||
#[cfg(target_env = "musl")]
|
||||
let about = get_message("uptime-about") + &get_message("uptime-about-musl-warning");
|
||||
|
||||
let cmd = Command::new(uucore::util_name())
|
||||
.version(uucore::crate_version!())
|
||||
.about(get_message("uptime-about"))
|
||||
.about(about)
|
||||
.override_usage(format_usage(&get_message("uptime-usage")))
|
||||
.infer_long_args(true)
|
||||
.arg(
|
||||
|
|
|
@ -1,2 +1,4 @@
|
|||
users-about = Print the user names of users currently logged in to the current host.
|
||||
users-usage = users [FILE]
|
||||
users-about-musl-warning = Warning: When built with musl libc, the `users` utility may show '0 users',
|
||||
due to musl's stub implementation of utmpx functions.
|
||||
|
|
|
@ -18,14 +18,6 @@ use utmp_classic::{UtmpEntry, parse_from_path};
|
|||
#[cfg(not(target_os = "openbsd"))]
|
||||
use uucore::utmpx::{self, Utmpx};
|
||||
|
||||
#[cfg(target_env = "musl")]
|
||||
const ABOUT: &str = concat!(
|
||||
help_about!("users.md"),
|
||||
"\n\nWarning: When built with musl libc, the `users` utility may show '0 users' \n",
|
||||
"due to musl's stub implementation of utmpx functions."
|
||||
);
|
||||
|
||||
#[cfg(not(target_env = "musl"))]
|
||||
use uucore::locale::get_message;
|
||||
|
||||
#[cfg(target_os = "openbsd")]
|
||||
|
@ -93,9 +85,14 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
|
|||
}
|
||||
|
||||
pub fn uu_app() -> Command {
|
||||
#[cfg(not(target_env = "musl"))]
|
||||
let about = get_message("users-about");
|
||||
#[cfg(target_env = "musl")]
|
||||
let about = get_message("users-about") + &get_message("users-about-musl-warning");
|
||||
|
||||
Command::new(uucore::util_name())
|
||||
.version(uucore::crate_version!())
|
||||
.about(get_message("users-about"))
|
||||
.about(about)
|
||||
.override_usage(format_usage(&get_message("users-usage")))
|
||||
.infer_long_args(true)
|
||||
.arg(
|
||||
|
|
|
@ -1,2 +1,5 @@
|
|||
who-about = Print information about users who are currently logged in.
|
||||
who-usage = who [OPTION]... [ FILE | ARG1 ARG2 ]
|
||||
who-about-musl-warning = Note: When built with musl libc, the `who` utility will not display any
|
||||
information about logged-in users. This is due to musl's stub implementation
|
||||
of `utmpx` functions, which prevents access to the necessary data.
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
use clap::{Arg, ArgAction, Command};
|
||||
use uucore::format_usage;
|
||||
use uucore::locale::get_message;
|
||||
|
||||
mod platform;
|
||||
|
||||
|
@ -28,17 +29,6 @@ mod options {
|
|||
pub const FILE: &str = "FILE"; // if length=1: FILE, if length=2: ARG1 ARG2
|
||||
}
|
||||
|
||||
#[cfg(target_env = "musl")]
|
||||
const ABOUT: &str = concat!(
|
||||
help_about!("who.md"),
|
||||
"\n\nNote: When built with musl libc, the `who` utility will not display any \n",
|
||||
"information about logged-in users. This is due to musl's stub implementation \n",
|
||||
"of `utmpx` functions, which prevents access to the necessary data."
|
||||
);
|
||||
|
||||
#[cfg(not(target_env = "musl"))]
|
||||
use uucore::locale::get_message;
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
static RUNLEVEL_HELP: &str = "print current runlevel";
|
||||
#[cfg(not(target_os = "linux"))]
|
||||
|
@ -48,9 +38,14 @@ static RUNLEVEL_HELP: &str = "print current runlevel (This is meaningless on non
|
|||
use platform::uumain;
|
||||
|
||||
pub fn uu_app() -> Command {
|
||||
#[cfg(not(target_env = "musl"))]
|
||||
let about = get_message("who-about");
|
||||
#[cfg(target_env = "musl")]
|
||||
let about = get_message("who-about") + &get_message("who-about-musl-warning");
|
||||
|
||||
Command::new(uucore::util_name())
|
||||
.version(uucore::crate_version!())
|
||||
.about(get_message("who-about"))
|
||||
.about(about)
|
||||
.override_usage(format_usage(&get_message("who-usage")))
|
||||
.infer_long_args(true)
|
||||
.arg(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue