Skip to content

Commit b44617e

Browse files
committed
Operator to translate string templates.
1 parent 2408f13 commit b44617e

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed

kernel/src_info/gps-intl.adb

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
------------------------------------------------------------------------------
22
-- GNAT Studio --
33
-- --
4-
-- Copyright (C) 2001-2024, AdaCore --
4+
-- Copyright (C) 2001-2025, AdaCore --
55
-- --
66
-- This is free software; you can redistribute it and/or modify it under --
77
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -18,6 +18,8 @@
1818
-- ??? Should use a callback to avoid direct dependency on GtkAda.Intl
1919
-- with Gtkada.Intl; use Gtkada.Intl;
2020

21+
with VSS.Strings.Conversions;
22+
2123
package body GPS.Intl is
2224

2325
---------
@@ -42,4 +44,17 @@ package body GPS.Intl is
4244
return Msg;
4345
end "-";
4446

47+
---------
48+
-- "-" --
49+
---------
50+
51+
function "-"
52+
(Msg : VSS.Strings.Virtual_String)
53+
return VSS.Strings.Templates.Virtual_String_Template is
54+
begin
55+
return
56+
VSS.Strings.Templates.To_Virtual_String_Template
57+
(VSS.Strings.Conversions.To_Wide_Wide_String (Msg));
58+
end "-";
59+
4560
end GPS.Intl;

kernel/src_info/gps-intl.ads

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
------------------------------------------------------------------------------
22
-- GNAT Studio --
33
-- --
4-
-- Copyright (C) 2001-2024, AdaCore --
4+
-- Copyright (C) 2001-2025, AdaCore --
55
-- --
66
-- This is free software; you can redistribute it and/or modify it under --
77
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -15,7 +15,7 @@
1515
-- of the license. --
1616
------------------------------------------------------------------------------
1717

18-
with VSS.Strings;
18+
with VSS.Strings.Templates;
1919

2020
package GPS.Intl is
2121

@@ -24,6 +24,9 @@ package GPS.Intl is
2424

2525
function "-"
2626
(Msg : VSS.Strings.Virtual_String) return VSS.Strings.Virtual_String;
27+
function "-"
28+
(Msg : VSS.Strings.Virtual_String)
29+
return VSS.Strings.Templates.Virtual_String_Template;
2730
-- Convenient shortcut to the Gettext function.
2831

2932
end GPS.Intl;

0 commit comments

Comments
 (0)