From 63db083d9b76e2db4db274a2a99e28cdfc96ed2f Mon Sep 17 00:00:00 2001 From: mszulecki Date: Mon, 11 Jun 2007 18:18:54 +0000 Subject: Fix localedir if prefix not defined and mark more strings as translated. git-svn-id: http://svn.sukimashita.com/repos/dskel/trunk@23 4281df72-ff29-0410-8fee-2d9ac0c5f5a7 --- src/helloworld.d | 6 +++--- src/testlibrary.d | 4 +++- src/testshlibrary.d | 4 +++- 3 files changed, 9 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/helloworld.d b/src/helloworld.d index dcb4a37..fdf8063 100755 --- a/src/helloworld.d +++ b/src/helloworld.d @@ -13,7 +13,7 @@ void main(char[][] args) writefln(HelloWorldFactory.getName() ~ ", " ~ HelloWorldSharedObjectFactory.getVersion() ~ " " ~ config.VERSION); - writefln("Compiled using: " ~ config.GDC_VERSION); + writefln(Catalog.GetString("Compiled using: ") ~ config.GDC_VERSION); // auto type inference and built-in foreach foreach (argc, argv; args) @@ -21,7 +21,7 @@ void main(char[][] args) // Object Oriented Programming CmdLin cl = new CmdLin(argc, argv); // Improved typesafe printf - writefln(cl.argnum, cl.suffix, " arg: %s", cl.argv); + writefln(cl.argnum, cl.suffix, Catalog.GetString(" arg: %s"), cl.argv); // Automatic or explicit memory management delete cl; } @@ -47,7 +47,7 @@ void main(char[][] args) } // built-in string and common string operations - writefln("argc = %d, " ~ "allocated = %d", + writefln(Catalog.GetString("argc = %d, ") ~ Catalog.GetString("allocated = %d"), argspecs().count, argspecs().allocated); } diff --git a/src/testlibrary.d b/src/testlibrary.d index 744163b..5aea8dc 100644 --- a/src/testlibrary.d +++ b/src/testlibrary.d @@ -1,9 +1,11 @@ module testlibrary; +import catalog; + public static class HelloWorldFactory { public static char[] getName() { - return "Hello World"; + return Catalog.GetString("Hello World"); } } diff --git a/src/testshlibrary.d b/src/testshlibrary.d index 13cbea9..0bdfc97 100644 --- a/src/testshlibrary.d +++ b/src/testshlibrary.d @@ -1,9 +1,11 @@ module testshlibrary; +import catalog; + public static class HelloWorldSharedObjectFactory { public static char[] getVersion() { - return "Version:"; + return Catalog.GetString("Version:"); } } -- cgit v1.1-32-gdbae