Skip to content

Commit ce21dff

Browse files
committed
Replace format! with translate! and test skip on Windows
1 parent 93dd508 commit ce21dff

File tree

4 files changed

+4
-1
lines changed

4 files changed

+4
-1
lines changed

src/uu/readlink/locales/en-US.ftl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ readlink-help-zero = separate output with NUL rather than newline
1414
# Error messages
1515
readlink-error-missing-operand = missing operand
1616
readlink-error-ignoring-no-newline = ignoring --no-newline with multiple arguments
17+
readlink-error-invalid-argument = {$path}: Invalid argument

src/uu/readlink/locales/fr-FR.ftl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ readlink-help-zero = séparer la sortie avec NUL plutôt qu'une nouvelle ligne
1414
# Messages d'erreur
1515
readlink-error-missing-operand = opérande manquant
1616
readlink-error-ignoring-no-newline = ignorer --no-newline avec plusieurs arguments
17+
readlink-error-invalid-argument = {$path} : argument non valide

src/uu/readlink/src/readlink.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
9595

9696
let path = p.to_string_lossy().into_owned();
9797
let message = if err.raw_os_error() == Some(EINVAL) {
98-
format!("{path}: Invalid argument")
98+
translate!("readlink-error-invalid-argument", "path" => path.clone())
9999
} else {
100100
err.map_err_context(|| path.clone()).to_string()
101101
};

tests/by-util/test_readlink.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ fn test_symlink_to_itself_verbose() {
103103
}
104104

105105
#[test]
106+
#[cfg(not(windows))]
106107
fn test_posixly_correct_regular_file() {
107108
let scene = TestScenario::new(util_name!());
108109
let at = &scene.fixtures;

0 commit comments

Comments
 (0)