customize/timezone.ml: Add gettext f_ call around an error message
Problem has existed since before we moved the code to the current location in 2014 (in commit f1f5208bd5 "customize: Move virt-customize-related code to a separate directory"). Signed-off-by: Wei Jiangang <wei_jiangang@hoperun.com> (cherry picked from commit 0f4eb408c126d85709286547965fe1052a78f8f2)
This commit is contained in:
parent
67dbd6f405
commit
d1a29fbe29
@ -0,0 +1,38 @@
|
|||||||
|
From 5e5baad0f29b1aff5e99664a19ca9270da9c2af3 Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||||
|
Date: Mon, 6 Feb 2023 15:04:03 +0000
|
||||||
|
Subject: [PATCH] customize/timezone.ml: Add gettext f_ call around an error
|
||||||
|
message
|
||||||
|
|
||||||
|
Problem has existed since before we moved the code to the current
|
||||||
|
location in 2014 (in commit f1f5208bd5 "customize: Move
|
||||||
|
virt-customize-related code to a separate directory").
|
||||||
|
---
|
||||||
|
customize/timezone.ml | 4 +++-
|
||||||
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/customize/timezone.ml b/customize/timezone.ml
|
||||||
|
index 2ac7a105..1de566e1 100644
|
||||||
|
--- a/customize/timezone.ml
|
||||||
|
+++ b/customize/timezone.ml
|
||||||
|
@@ -17,6 +17,7 @@
|
||||||
|
*)
|
||||||
|
|
||||||
|
open Tools_utils
|
||||||
|
+open Common_gettext.Gettext
|
||||||
|
|
||||||
|
open Printf
|
||||||
|
|
||||||
|
@@ -31,7 +32,8 @@ let set_timezone (g : Guestfs.guestfs) root timezone =
|
||||||
|
| "linux" ->
|
||||||
|
let target = sprintf "/usr/share/zoneinfo/%s" timezone in
|
||||||
|
if not (g#exists target) then
|
||||||
|
- error "timezone '%s' does not exist, use a location like 'Europe/London'" timezone;
|
||||||
|
+ error (f_"timezone '%s' does not exist, use a location like \
|
||||||
|
+ 'Europe/London'") timezone;
|
||||||
|
g#ln_sf target "/etc/localtime";
|
||||||
|
true
|
||||||
|
|
||||||
|
--
|
||||||
|
2.39.1
|
||||||
|
|
||||||
@ -25,6 +25,8 @@ Source0: http://download.libguestfs.org/guestfs-tools/%{source_directory}/
|
|||||||
Source1: http://download.libguestfs.org/guestfs-tools/%{source_directory}/%{name}-%{version}.tar.gz.sig
|
Source1: http://download.libguestfs.org/guestfs-tools/%{source_directory}/%{name}-%{version}.tar.gz.sig
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
Patch1: 0001-customize-timezone.ml-Add-gettext-f_-call-around-an-.patch
|
||||||
|
|
||||||
%if 0%{patches_touch_autotools}
|
%if 0%{patches_touch_autotools}
|
||||||
BuildRequires: autoconf, automake, libtool, gettext-devel
|
BuildRequires: autoconf, automake, libtool, gettext-devel
|
||||||
%endif
|
%endif
|
||||||
@ -375,5 +377,7 @@ end
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Apr 24 2024 Wei Jiangang <wei_jiangang@hoperun.com> - 1.49.5-2
|
||||||
|
- Fix error message by adding gettext f_ call around it.
|
||||||
* Tue Mar 23 2021 Wei Jiangang <wei_jiangang@hoperun.com> - 1.49.5-1
|
* Tue Mar 23 2021 Wei Jiangang <wei_jiangang@hoperun.com> - 1.49.5-1
|
||||||
- New guestfs-tools package, split off from libguestfs.
|
- New guestfs-tools package, split off from libguestfs.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user