Re: [Freeciv-Dev] (PR#39725) Various typos in client, remove log translation

2007-09-29 Thread William Allen Simpson

URL: http://bugs.freeciv.org/Ticket/Display.html?id=39725 

Pepeto _ wrote:
 There shouldn't have any rule about freelog() level translation. It must
 just be adapted to the every case. It always was like this, I don't
 think there is any reason to change it.
 
Pepeto, you are wrong.  They have *always* been untranslated, as Per wrote.
There is no change.  (At PR#39389, he was instructing me as to the
existing documented rule.)  I'll remind you that there some anonymous
poster was advocating that none (not even LOG_NORMAL) be translated.

There *was* some trash in the files -- items that were marked for
translation that should not have been, others that weren't that should
have been -- and I've been working for months to improve consistency.

It must not be adapted to the every case.  That way lies madness.



___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] (PR#39725) Various typos in client, remove log translation

2007-09-27 Thread William Allen Simpson

URL: http://bugs.freeciv.org/Ticket/Display.html?id=39725 

Upon inspection, more errors found.  Only LOG_NORMAL should be translated.

Committed trunk revision 13665.
Committed S2_2 revision 13666.

Index: client/gui-sdl/gui_string.c
===
--- client/gui-sdl/gui_string.c (revision 13664)
+++ client/gui-sdl/gui_string.c (working copy)
@@ -170,7 +170,7 @@
   }
   
   if ((str-font = load_font(str-ptsize)) == NULL) {
-freelog(LOG_ERROR, _(Error in create_string16: Aborting ...));
+freelog(LOG_ERROR, create_string16: load_font failed);
 FC_FREE(str);
 return str;
   }
@@ -222,7 +222,7 @@
   SDL_Surface *pText = create_text_surf_from_str16(pString);
 
   if (alphablit(pText, NULL, pDest, dst_rect)  0) {
-freelog(LOG_ERROR, _(Couldn't blit text to display: %s),
+freelog(LOG_ERROR, write_text16: couldn't blit text to display: %s,
SDL_GetError());
 FREESURFACE(pText);
 return -1;
@@ -260,8 +260,8 @@
 
 if ((pText = SDL_DisplayFormat(pTmp)) == NULL) {
   freelog(LOG_ERROR,
- _(Error in SDL_create_str16_surf: Couldn't convert text 
-   to display format: %s), SDL_GetError());
+ SDL_create_str16_surf: couldn't convert text 
+ to display format: %s, SDL_GetError());
   pText = pTmp;
 } else {
   FREESURFACE( pTmp );
@@ -277,9 +277,9 @@
 
   if (pText != NULL) {
 freelog(LOG_DEBUG,
-_(SDL_create_str16_surf: Font is generally %d big, and 
-  string is %hd big), TTF_FontHeight(pString-font), pText-h);
-freelog(LOG_DEBUG, _(SDL_create_str16_surf: String is %d lenght),
+SDL_create_str16_surf: Font is generally %d big, and 
+  string is %hd big, TTF_FontHeight(pString-font), pText-h);
+freelog(LOG_DEBUG, SDL_create_str16_surf: String is %d length,
 pText-w);
   } else {
 freelog(LOG_DEBUG, SDL_create_str16_surf: pText NULL);
@@ -569,7 +569,7 @@
   }
   
   if ((pBuf = load_font(new_ptsize)) == NULL) {
-freelog(LOG_ERROR, _(Error in change_ptsize: Change ptsize failed));
+freelog(LOG_ERROR, change_ptsize: load_font failed);
 return;
   }
 
@@ -617,7 +617,7 @@
   /* Load Font */
   if ((font_tmp = TTF_OpenFont(pFont_with_FullPath, ptsize)) == NULL) {
 freelog(LOG_ERROR,
-   _(Error in load_font: Couldn't load %d pt font from %s: %s),
+   load_font: Couldn't load %d pt font from %s: %s,
ptsize, pFont_with_FullPath, SDL_GetError());
 return font_tmp;
   }
@@ -658,7 +658,7 @@
 
   if (Sizeof_Font_TAB == 0) {
 freelog(LOG_ERROR,
-_(Error in unload_font: Trying unload from empty Font ARRAY));
+   unload_font: Trying unload from empty Font ARRAY);
 return;
   }
 
@@ -672,8 +672,8 @@
 
   if (index == Sizeof_Font_TAB) {
 freelog(LOG_ERROR,
-   _(Error in unload_font: Trying unload Font which is 
- not included in Font ARRAY));
+   unload_font: Trying unload Font which is 
+   not included in Font ARRAY);
 return;
   }
 
Index: client/audio.c
===
--- client/audio.c  (revision 13664)
+++ client/audio.c  (working copy)
@@ -122,12 +122,12 @@
   }
 
   if (!plugins[i].init()) {
-freelog(LOG_ERROR, _(Plugin %s found but can't be initialized.), name);
+freelog(LOG_ERROR, Plugin %s found, but can't be initialized., name);
 return FALSE;
   }
 
   selected_plugin = i;
-  freelog(LOG_VERBOSE, _(Plugin '%s' is now selected),
+  freelog(LOG_VERBOSE, Plugin '%s' is now selected,
  plugins[selected_plugin].name);
   return TRUE;
 }
@@ -171,7 +171,7 @@
 return NULL;
   }
 
-  freelog(LOG_ERROR, _(Couldn't find soundset \%s\ trying \%s\.),
+  freelog(LOG_ERROR, Couldn't find soundset \%s\, trying \%s\.,
  soundset_name, soundset_default);
   return soundspec_fullname(soundset_default);
 }
@@ -188,33 +188,31 @@
 
   if (strcmp(prefered_plugin_name, none) == 0) {
 /* We explicitly choose none plugin, silently skip the code below */
-freelog(LOG_VERBOSE, _(Proceeding with sound support disabled));
+freelog(LOG_VERBOSE, Proceeding with sound support disabled.);
 tagfile = NULL;
 return;
   }
   if (num_plugins_used == 1) {
 /* We only have the dummy plugin, skip the code but issue an advertise */
-freelog(LOG_NORMAL, _(No real audio plugin present, 
-  proceeding with sound support disabled));
-freelog(LOG_NORMAL,
-  _(For sound support, install SDL_mixer));
-freelog(LOG_NORMAL, _(http://www.libsdl.org/;
-  projects/SDL_mixer/index.html));
+freelog(LOG_NORMAL, _(No real audio plugin present.));
+freelog(LOG_NORMAL, _(Proceeding with sound support disabled.));
+freelog(LOG_NORMAL, _(For sound support, install SDL_mixer));
+freelog(LOG_NORMAL, http://www.libsdl.org/projects/SDL_mixer/index.html;);
 tagfile = NULL;
 

Re: [Freeciv-Dev] (PR#39725) Various typos in client, remove log translation

2007-09-27 Thread Marko Lindqvist

URL: http://bugs.freeciv.org/Ticket/Display.html?id=39725 

On 27/09/2007, William Allen Simpson wrote:

 Upon inspection, more errors found.  Only LOG_NORMAL should be translated.

 Messages meant for end-user should be translated.


 If user tries to load unavailable soundset, error message should be translated

-  freelog(LOG_ERROR, _(Couldn't find soundset \%s\ trying \%s\.),
+  freelog(LOG_ERROR, Couldn't find soundset \%s\, trying \%s\.,
 soundset_name, soundset_default);

 ...

+freelog(LOG_ERROR, Cannot find sound spec-file \%s\., spec_name);



 Not sure if this also is response to user action (plugin selection):

-freelog(LOG_ERROR, _(Plugin %s found but can't be initialized.), name);
+freelog(LOG_ERROR, Plugin %s found, but can't be initialized., name);



 - ML



___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] (PR#39725) Various typos in client, remove log translation

2007-09-27 Thread William Allen Simpson

URL: http://bugs.freeciv.org/Ticket/Display.html?id=39725 

Marko Lindqvist wrote:
  Messages meant for end-user should be translated.
 
Error messages meant for users are sent as message packets.

LOG_ERROR is *never* meant for users, it is for developers.

See HACKING:

Messages and text in general which are shown in the GUI should be
translated by using the _() macro. In addition freelog(LOG_NORMAL,
...) messages should be translated. The other loglevels (LOG_FATAL,
LOG_ERROR, LOG_VERBOSE, LOG_DEBUG) should NOT be translated.

See also
   http://freeciv.wikia.com/wiki/Internationalization


  If user tries to load unavailable soundset, error message should be 
 translated
 
 -  freelog(LOG_ERROR, _(Couldn't find soundset \%s\ trying \%s\.),
 +  freelog(LOG_ERROR, Couldn't find soundset \%s\, trying \%s\.,
  soundset_name, soundset_default);
 
If a user tries to load an unavailable soundset, it is a bug in the
selections dialog, and a developer problem!


  Not sure if this also is response to user action (plugin selection):
 
 -freelog(LOG_ERROR, _(Plugin %s found but can't be initialized.), name);
 +freelog(LOG_ERROR, Plugin %s found, but can't be initialized., name);
 
Again, a developer problem.  No user remediation is possible.



___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev