mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-27 11:07:44 +00:00
base*: create a common locale directory with symlinks
This commit is contained in:
parent
e00167bd6b
commit
f12111b7a2
7 changed files with 100 additions and 78 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
# This file contains base32, base64 and basenc strings
|
||||||
|
# This is because we have some common strings for all these tools
|
||||||
|
# and it is easier to have a single file than one file for program
|
||||||
|
# and loading several bundles at the same time.
|
||||||
|
|
||||||
base32-about = encode/decode data and print to standard output
|
base32-about = encode/decode data and print to standard output
|
||||||
With no FILE, or when FILE is -, read standard input.
|
With no FILE, or when FILE is -, read standard input.
|
||||||
|
|
||||||
|
@ -8,13 +13,46 @@ base32-about = encode/decode data and print to standard output
|
||||||
encoded stream.
|
encoded stream.
|
||||||
base32-usage = base32 [OPTION]... [FILE]
|
base32-usage = base32 [OPTION]... [FILE]
|
||||||
|
|
||||||
# Error messages
|
base64-about = encode/decode data and print to standard output
|
||||||
base32-extra-operand = extra operand {$operand}
|
With no FILE, or when FILE is -, read standard input.
|
||||||
base32-no-such-file = {$file}: No such file or directory
|
|
||||||
base32-invalid-wrap-size = invalid wrap size: {$size}
|
|
||||||
base32-read-error = read error: {$error}
|
|
||||||
|
|
||||||
# Help messages
|
The data are encoded as described for the base64 alphabet in RFC 3548.
|
||||||
base32-help-decode = decode data
|
When decoding, the input may contain newlines in addition
|
||||||
base32-help-ignore-garbage = when decoding, ignore non-alphabetic characters
|
to the bytes of the formal base64 alphabet. Use --ignore-garbage
|
||||||
base32-help-wrap = wrap encoded lines after COLS character (default {$default}, 0 to disable wrapping)
|
to attempt to recover from any other non-alphabet bytes in the
|
||||||
|
encoded stream.
|
||||||
|
base64-usage = base64 [OPTION]... [FILE]
|
||||||
|
|
||||||
|
basenc-about = Encode/decode data and print to standard output
|
||||||
|
With no FILE, or when FILE is -, read standard input.
|
||||||
|
|
||||||
|
When decoding, the input may contain newlines in addition to the bytes of
|
||||||
|
the formal alphabet. Use --ignore-garbage to attempt to recover
|
||||||
|
from any other non-alphabet bytes in the encoded stream.
|
||||||
|
basenc-usage = basenc [OPTION]... [FILE]
|
||||||
|
|
||||||
|
# Help messages for encoding formats
|
||||||
|
basenc-help-base64 = same as 'base64' program
|
||||||
|
basenc-help-base64url = file- and url-safe base64
|
||||||
|
basenc-help-base32 = same as 'base32' program
|
||||||
|
basenc-help-base32hex = extended hex alphabet base32
|
||||||
|
basenc-help-base16 = hex encoding
|
||||||
|
basenc-help-base2lsbf = bit string with least significant bit (lsb) first
|
||||||
|
basenc-help-base2msbf = bit string with most significant bit (msb) first
|
||||||
|
basenc-help-z85 = ascii85-like encoding;
|
||||||
|
when encoding, input length must be a multiple of 4;
|
||||||
|
when decoding, input length must be a multiple of 5
|
||||||
|
|
||||||
|
# Error messages
|
||||||
|
basenc-error-missing-encoding-type = missing encoding type
|
||||||
|
|
||||||
|
# Shared base_common error messages (used by base32, base64, basenc)
|
||||||
|
base-common-extra-operand = extra operand {$operand}
|
||||||
|
base-common-no-such-file = {$file}: No such file or directory
|
||||||
|
base-common-invalid-wrap-size = invalid wrap size: {$size}
|
||||||
|
base-common-read-error = read error: {$error}
|
||||||
|
|
||||||
|
# Shared base_common help messages
|
||||||
|
base-common-help-decode = decode data
|
||||||
|
base-common-help-ignore-garbage = when decoding, ignore non-alphabetic characters
|
||||||
|
base-common-help-wrap = wrap encoded lines after COLS character (default {$default}, 0 to disable wrapping)
|
||||||
|
|
|
@ -8,13 +8,46 @@ base32-about = encoder/décoder les données et les imprimer sur la sortie stand
|
||||||
le flux encodé.
|
le flux encodé.
|
||||||
base32-usage = base32 [OPTION]... [FICHIER]
|
base32-usage = base32 [OPTION]... [FICHIER]
|
||||||
|
|
||||||
# Messages d'erreur
|
base64-about = encoder/décoder les données et les imprimer sur la sortie standard
|
||||||
base32-extra-operand = opérande supplémentaire {$operand}
|
Sans FICHIER, ou quand FICHIER est -, lire l'entrée standard.
|
||||||
base32-no-such-file = {$file} : Aucun fichier ou répertoire de ce type
|
|
||||||
base32-invalid-wrap-size = taille de retour à la ligne invalide : {$size}
|
|
||||||
base32-read-error = erreur de lecture : {$error}
|
|
||||||
|
|
||||||
# Messages d'aide
|
Les données sont encodées comme décrit pour l'alphabet base64 dans RFC 3548.
|
||||||
base32-help-decode = décoder les données
|
Lors du décodage, l'entrée peut contenir des retours à la ligne en plus
|
||||||
base32-help-ignore-garbage = lors du décodage, ignorer les caractères non-alphabétiques
|
des octets de l'alphabet base64 formel. Utilisez --ignore-garbage
|
||||||
base32-help-wrap = retour à la ligne des lignes encodées après COLS caractères (par défaut {$default}, 0 pour désactiver le retour à la ligne)
|
pour tenter de récupérer des autres octets non-alphabétiques dans
|
||||||
|
le flux encodé.
|
||||||
|
base64-usage = base64 [OPTION]... [FICHIER]
|
||||||
|
|
||||||
|
basenc-about = Encoder/décoder des données et afficher vers la sortie standard
|
||||||
|
Sans FICHIER, ou lorsque FICHIER est -, lire l'entrée standard.
|
||||||
|
|
||||||
|
Lors du décodage, l'entrée peut contenir des nouvelles lignes en plus des octets de
|
||||||
|
l'alphabet formel. Utilisez --ignore-garbage pour tenter de récupérer
|
||||||
|
depuis tout autre octet non-alphabétique dans le flux encodé.
|
||||||
|
basenc-usage = basenc [OPTION]... [FICHIER]
|
||||||
|
|
||||||
|
# Messages d'aide pour les formats d'encodage
|
||||||
|
basenc-help-base64 = identique au programme 'base64'
|
||||||
|
basenc-help-base64url = base64 sécurisé pour fichiers et URLs
|
||||||
|
basenc-help-base32 = identique au programme 'base32'
|
||||||
|
basenc-help-base32hex = base32 avec alphabet hexadécimal étendu
|
||||||
|
basenc-help-base16 = encodage hexadécimal
|
||||||
|
basenc-help-base2lsbf = chaîne de bits avec le bit de poids faible (lsb) en premier
|
||||||
|
basenc-help-base2msbf = chaîne de bits avec le bit de poids fort (msb) en premier
|
||||||
|
basenc-help-z85 = encodage de type ascii85 ;
|
||||||
|
lors de l'encodage, la longueur d'entrée doit être un multiple de 4 ;
|
||||||
|
lors du décodage, la longueur d'entrée doit être un multiple de 5
|
||||||
|
|
||||||
|
# Messages d'erreur
|
||||||
|
basenc-error-missing-encoding-type = type d'encodage manquant
|
||||||
|
|
||||||
|
# Messages d'erreur partagés de base_common (utilisés par base32, base64, basenc)
|
||||||
|
base-common-extra-operand = opérande supplémentaire {$operand}
|
||||||
|
base-common-no-such-file = {$file} : Aucun fichier ou répertoire de ce type
|
||||||
|
base-common-invalid-wrap-size = taille de retour à la ligne invalide : {$size}
|
||||||
|
base-common-read-error = erreur de lecture : {$error}
|
||||||
|
|
||||||
|
# Messages d'aide partagés de base_common
|
||||||
|
base-common-help-decode = décoder les données
|
||||||
|
base-common-help-ignore-garbage = lors du décodage, ignorer les caractères non-alphabétiques
|
||||||
|
base-common-help-wrap = retour à la ligne des lignes encodées après COLS caractères (par défaut {$default}, 0 pour désactiver le retour à la ligne)
|
||||||
|
|
|
@ -53,7 +53,7 @@ impl Config {
|
||||||
return Err(UUsageError::new(
|
return Err(UUsageError::new(
|
||||||
BASE_CMD_PARSE_ERROR,
|
BASE_CMD_PARSE_ERROR,
|
||||||
get_message_with_args(
|
get_message_with_args(
|
||||||
"base32-extra-operand",
|
"base-common-extra-operand",
|
||||||
HashMap::from([("operand".to_string(), extra_op.quote().to_string())]),
|
HashMap::from([("operand".to_string(), extra_op.quote().to_string())]),
|
||||||
),
|
),
|
||||||
));
|
));
|
||||||
|
@ -68,7 +68,7 @@ impl Config {
|
||||||
return Err(USimpleError::new(
|
return Err(USimpleError::new(
|
||||||
BASE_CMD_PARSE_ERROR,
|
BASE_CMD_PARSE_ERROR,
|
||||||
get_message_with_args(
|
get_message_with_args(
|
||||||
"base32-no-such-file",
|
"base-common-no-such-file",
|
||||||
HashMap::from([(
|
HashMap::from([(
|
||||||
"file".to_string(),
|
"file".to_string(),
|
||||||
path.maybe_quote().to_string(),
|
path.maybe_quote().to_string(),
|
||||||
|
@ -90,7 +90,7 @@ impl Config {
|
||||||
USimpleError::new(
|
USimpleError::new(
|
||||||
BASE_CMD_PARSE_ERROR,
|
BASE_CMD_PARSE_ERROR,
|
||||||
get_message_with_args(
|
get_message_with_args(
|
||||||
"base32-invalid-wrap-size",
|
"base-common-invalid-wrap-size",
|
||||||
HashMap::from([("size".to_string(), num.quote().to_string())]),
|
HashMap::from([("size".to_string(), num.quote().to_string())]),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
@ -128,7 +128,7 @@ pub fn base_app(about: &'static str, usage: &str) -> Command {
|
||||||
.short('d')
|
.short('d')
|
||||||
.visible_short_alias('D')
|
.visible_short_alias('D')
|
||||||
.long(options::DECODE)
|
.long(options::DECODE)
|
||||||
.help(get_message("base32-help-decode"))
|
.help(get_message("base-common-help-decode"))
|
||||||
.action(ArgAction::SetTrue)
|
.action(ArgAction::SetTrue)
|
||||||
.overrides_with(options::DECODE),
|
.overrides_with(options::DECODE),
|
||||||
)
|
)
|
||||||
|
@ -136,7 +136,7 @@ pub fn base_app(about: &'static str, usage: &str) -> Command {
|
||||||
Arg::new(options::IGNORE_GARBAGE)
|
Arg::new(options::IGNORE_GARBAGE)
|
||||||
.short('i')
|
.short('i')
|
||||||
.long(options::IGNORE_GARBAGE)
|
.long(options::IGNORE_GARBAGE)
|
||||||
.help(get_message("base32-help-ignore-garbage"))
|
.help(get_message("base-common-help-ignore-garbage"))
|
||||||
.action(ArgAction::SetTrue)
|
.action(ArgAction::SetTrue)
|
||||||
.overrides_with(options::IGNORE_GARBAGE),
|
.overrides_with(options::IGNORE_GARBAGE),
|
||||||
)
|
)
|
||||||
|
@ -146,7 +146,7 @@ pub fn base_app(about: &'static str, usage: &str) -> Command {
|
||||||
.long(options::WRAP)
|
.long(options::WRAP)
|
||||||
.value_name("COLS")
|
.value_name("COLS")
|
||||||
.help(get_message_with_args(
|
.help(get_message_with_args(
|
||||||
"base32-help-wrap",
|
"base-common-help-wrap",
|
||||||
HashMap::from([("default".to_string(), WRAP_DEFAULT.to_string())]),
|
HashMap::from([("default".to_string(), WRAP_DEFAULT.to_string())]),
|
||||||
))
|
))
|
||||||
.overrides_with(options::WRAP),
|
.overrides_with(options::WRAP),
|
||||||
|
@ -831,7 +831,7 @@ fn format_read_error(kind: ErrorKind) -> String {
|
||||||
}
|
}
|
||||||
|
|
||||||
get_message_with_args(
|
get_message_with_args(
|
||||||
"base32-read-error",
|
"base-common-read-error",
|
||||||
HashMap::from([("error".to_string(), kind_string_capitalized)]),
|
HashMap::from([("error".to_string(), kind_string_capitalized)]),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
base64-about = encode/decode data and print to standard output
|
|
||||||
With no FILE, or when FILE is -, read standard input.
|
|
||||||
|
|
||||||
The data are encoded as described for the base64 alphabet in RFC 3548.
|
|
||||||
When decoding, the input may contain newlines in addition
|
|
||||||
to the bytes of the formal base64 alphabet. Use --ignore-garbage
|
|
||||||
to attempt to recover from any other non-alphabet bytes in the
|
|
||||||
encoded stream.
|
|
||||||
base64-usage = base64 [OPTION]... [FILE]
|
|
|
@ -1,22 +0,0 @@
|
||||||
basenc-about = Encode/decode data and print to standard output
|
|
||||||
With no FILE, or when FILE is -, read standard input.
|
|
||||||
|
|
||||||
When decoding, the input may contain newlines in addition to the bytes of
|
|
||||||
the formal alphabet. Use --ignore-garbage to attempt to recover
|
|
||||||
from any other non-alphabet bytes in the encoded stream.
|
|
||||||
basenc-usage = basenc [OPTION]... [FILE]
|
|
||||||
|
|
||||||
# Help messages for encoding formats
|
|
||||||
basenc-help-base64 = same as 'base64' program
|
|
||||||
basenc-help-base64url = file- and url-safe base64
|
|
||||||
basenc-help-base32 = same as 'base32' program
|
|
||||||
basenc-help-base32hex = extended hex alphabet base32
|
|
||||||
basenc-help-base16 = hex encoding
|
|
||||||
basenc-help-base2lsbf = bit string with least significant bit (lsb) first
|
|
||||||
basenc-help-base2msbf = bit string with most significant bit (msb) first
|
|
||||||
basenc-help-z85 = ascii85-like encoding;
|
|
||||||
when encoding, input length must be a multiple of 4;
|
|
||||||
when decoding, input length must be a multiple of 5
|
|
||||||
|
|
||||||
# Error messages
|
|
||||||
basenc-error-missing-encoding-type = missing encoding type
|
|
|
@ -1,22 +0,0 @@
|
||||||
basenc-about = Encoder/décoder des données et afficher vers la sortie standard
|
|
||||||
Sans FICHIER, ou lorsque FICHIER est -, lire l'entrée standard.
|
|
||||||
|
|
||||||
Lors du décodage, l'entrée peut contenir des nouvelles lignes en plus des octets de
|
|
||||||
l'alphabet formel. Utilisez --ignore-garbage pour tenter de récupérer
|
|
||||||
depuis tout autre octet non-alphabétique dans le flux encodé.
|
|
||||||
basenc-usage = basenc [OPTION]... [FICHIER]
|
|
||||||
|
|
||||||
# Messages d'aide pour les formats d'encodage
|
|
||||||
basenc-help-base64 = identique au programme 'base64'
|
|
||||||
basenc-help-base64url = base64 sécurisé pour fichiers et URLs
|
|
||||||
basenc-help-base32 = identique au programme 'base32'
|
|
||||||
basenc-help-base32hex = base32 avec alphabet hexadécimal étendu
|
|
||||||
basenc-help-base16 = encodage hexadécimal
|
|
||||||
basenc-help-base2lsbf = chaîne de bits avec le bit de poids faible (lsb) en premier
|
|
||||||
basenc-help-base2msbf = chaîne de bits avec le bit de poids fort (msb) en premier
|
|
||||||
basenc-help-z85 = encodage de type ascii85 ;
|
|
||||||
lors de l'encodage, la longueur d'entrée doit être un multiple de 4 ;
|
|
||||||
lors du décodage, la longueur d'entrée doit être un multiple de 5
|
|
||||||
|
|
||||||
# Messages d'erreur
|
|
||||||
basenc-error-missing-encoding-type = type d'encodage manquant
|
|
|
@ -231,6 +231,10 @@ cyBvdmVyIHRoZSBsYXp5IGRvZy4=
|
||||||
#[test]
|
#[test]
|
||||||
fn test_manpage() {
|
fn test_manpage() {
|
||||||
use std::process::{Command, Stdio};
|
use std::process::{Command, Stdio};
|
||||||
|
unsafe {
|
||||||
|
// force locale to english to avoid issues with manpage output
|
||||||
|
std::env::set_var("LANG", "C");
|
||||||
|
}
|
||||||
|
|
||||||
let test_scenario = TestScenario::new("");
|
let test_scenario = TestScenario::new("");
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue