On Wed, 25 Jan 2012, Alexandre Julliard wrote:

> Francois Gouget <[email protected]> writes:
> 
> > You were right on both points:
> >  1) All these error messages have a trailing full stop in English, 
> >     French and Japanese.
> >  2) They also tend to be much more verbose than Wine's messages and 
> >     usually form a proper sentence.
> >
> > I'm not going to fix point 2.
> >
> > But I think point 1 can and should be fixed. The question is how to do 
> > it without spending a month in the process or fuzzying all the existing 
> > translations. It probably needs to be scripted somehow and then the 
> > patch for both winerror.mc and the po files submitted? (or just submit 
> > the patch for winerror.mc and the script?)
> 
> I'm not sure that doing 1 without 2 is all that useful. If they are
> supposed to be proper sentences and are not, they will look ugly with or
> without full stop.

I don't think the messages below are more ugly with a full stop or even 
ugly at all in the first place.

   Invalid address.

   Service not active.

   Media changed.

   Property set not found.

That's why I don't plan on doing 2: I consider the current messages to 
be terse but fine, and I'm not convinced waxing eloquent like Windows is 
any better.

(I'm attaching my hack for checking the Windows messages, forgot to do 
it before)

-- 
Francois Gouget <[email protected]>              http://fgouget.free.fr/
The nice thing about meditation is that it makes doing nothing quite respectable
                                  -- Paul Dean
commit f8395ea5b01270f22709f2fa77ca022f35902fb2
Author: Francois Gouget <[email protected]>
Date:   Wed Jan 25 20:06:07 2012 +0100

    FormatMessage()  for trailing full stops.

diff --git a/dlls/kernel32/tests/format_msg.c b/dlls/kernel32/tests/format_msg.c
index 1f56440..9cd96b8 100644
--- a/dlls/kernel32/tests/format_msg.c
+++ b/dlls/kernel32/tests/format_msg.c
@@ -18,6 +18,7 @@
  */
 
 #include <stdarg.h>
+#include <stdio.h>
 
 #include "wine/test.h"
 #include "windef.h"
@@ -1509,7 +1510,9 @@ static void test_message_invalid_flags_wide(void)
 
     DWORD ret;
     WCHAR out[5];
+    WCHAR msg[1024];
     WCHAR *ptr;
+    int i;
 
     SetLastError(0xdeadbeef);
     memcpy(out, init_buf, sizeof(init_buf));
@@ -1585,12 +1588,22 @@ static void test_message_invalid_flags_wide(void)
     ok(ret == 4, "Expected FormatMessageW to return 4, got %u\n", ret);
     ok(!lstrcmpW(test, out),
        "Expected the output buffer to be untouched\n");
+
+    for (i=0; i < 2000;i++)
+    {
+        SetLastError(0);
+        ret = FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM, NULL, i, 0, msg,
+                             sizeof(msg)/sizeof(WCHAR), NULL);
+        if (ret)
+            printf("%d ret=%d le=%d msg=[%s]\n", i, ret, GetLastError(), wine_dbgstr_w(msg));
+    }
 }
 
 START_TEST(format_msg)
 {
     DWORD ret;
 
+#if 0
     test_message_from_string();
     test_message_ignore_inserts();
     test_message_insufficient_buffer();
@@ -1598,6 +1611,7 @@ START_TEST(format_msg)
     test_message_allocate_buffer();
     test_message_from_hmodule();
     test_message_invalid_flags();
+#endif
 
     SetLastError(0xdeadbeef);
     ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING, NULL, 0, 0, NULL, 0, NULL);
@@ -1607,10 +1621,12 @@ START_TEST(format_msg)
         return;
     }
 
+#if 0
     test_message_from_string_wide();
     test_message_ignore_inserts_wide();
     test_message_insufficient_buffer_wide();
     test_message_null_buffer_wide();
     test_message_allocate_buffer_wide();
+#endif
     test_message_invalid_flags_wide();
 }


Reply via email to