[MPlayer-dev-eng] liabf/af.c translatables to help_mp

Reynaldo H. Verdejo Pinochet reynaldo at opendot.cl
Wed Mar 15 21:44:24 CET 2006


..

Ok to commit?

  Reynaldo
-------------- next part --------------
Index: libaf/af.c
===================================================================
RCS file: /cvsroot/mplayer/main/libaf/af.c,v
retrieving revision 1.52
diff -a -u -r1.52 af.c
--- libaf/af.c	8 Mar 2006 15:39:53 -0000	1.52
+++ libaf/af.c	15 Mar 2006 20:41:48 -0000
@@ -7,6 +7,7 @@
 #endif
 
 #include "af.h"
+#include "help_mp.h"
 
 // Static list of filters
 extern af_info_t af_info_dummy;
@@ -76,7 +77,7 @@
       return filter_list[i];
     i++;
   }
-  af_msg(AF_MSG_ERROR,"Couldn't find audio filter '%s'\n",name);
+  af_msg(AF_MSG_ERROR,MSGTR_AF_CantFindAF,name);
   return NULL;
 } 
 
@@ -103,7 +104,7 @@
   // Allocate space for the new filter and reset all pointers
   af_instance_t* new=malloc(sizeof(af_instance_t));
   if(!new){
-    af_msg(AF_MSG_ERROR,"[libaf] Could not allocate memory\n");
+    af_msg(AF_MSG_FATAL,MSGTR_AF_MemAllocFailed);
     goto err_out;
   }  
   memset(new,0,sizeof(af_instance_t));
@@ -119,8 +120,7 @@
      non-reentrant */
   if(new->info->flags & AF_FLAGS_NOT_REENTRANT){
     if(af_get(s,name)){
-      af_msg(AF_MSG_ERROR,"[libaf] There can only be one instance of" 
-	     " the filter '%s' in each stream\n",name);  
+      af_msg(AF_MSG_ERROR,MSGTR_AF_OneAndOnly,name);  
       goto err_out;
     }
   }
@@ -140,8 +140,7 @@
   
 err_out:
   free(new);
-  af_msg(AF_MSG_ERROR,"[libaf] Couldn't create or open audio filter '%s'\n",
-	 name);  
+  af_msg(AF_MSG_ERROR,MSGTR_AF_CouldntOpenAF);  
   return NULL;
 }
 
@@ -288,15 +287,13 @@
 	    return rv;
 	}
 	if(!new){ // Should _never_ happen
-	  af_msg(AF_MSG_ERROR,"[libaf] Unable to correct audio format. " 
-		 "This error should never uccur, please send bugreport.\n");
+	  af_msg(AF_MSG_ERROR,MSGTR_AF_CantCorrectfAFMT);
 	  return AF_ERROR;
 	}
 	af=new->next;
       }
       else {
-        af_msg(AF_MSG_ERROR, "[libaf] Automatic filter insertion disabled "
-               "but formats do not match. Giving up.\n");
+        af_msg(AF_MSG_ERROR,NoAutomaticInsertion_NotMatchingFMTs);
         return AF_ERROR;
       }
       break;
@@ -314,8 +311,7 @@
       break;
     }
     default:
-      af_msg(AF_MSG_ERROR,"[libaf] Reinitialization did not work, audio" 
-	     " filter '%s' returned error code %i\n",af->info->name,rv);
+      af_msg(AF_MSG_ERROR,MSGTR_AF_CantReinit,af->info->name,rv);
       return AF_ERROR;
     }
   }while(af);
@@ -463,8 +459,7 @@
        (s->last->data->nch    != s->output.nch)    || 
        (s->last->data->rate   != s->output.rate))  {
       // Something is stuffed audio out will not work 
-      af_msg(AF_MSG_ERROR,"[libaf] Unable to setup filter system can not" 
-	     " meet sound-card demands, please send bugreport. \n");
+      af_msg(AF_MSG_ERROR,MSGTR_AF_CanNotMeetSndCardDemands);
       af_uninit(s);
       return -1;
     }
@@ -622,7 +617,7 @@
   // Create new buffer and check that it is OK
   af->data->audio = malloc(len);
   if(!af->data->audio){
-    af_msg(AF_MSG_FATAL,"[libaf] Could not allocate memory \n");
+    af_msg(AF_MSG_FATAL,MSGTR_AF_MemAllocFailed);
     return AF_ERROR;
   }
   af->data->len=len;
@@ -695,7 +690,7 @@
 
 void af_help (void) {
   int i = 0;
-  af_msg(AF_MSG_INFO, "Available audio filters:\n");
+  af_msg(AF_MSG_INFO, MSGTR_AF_AvailableAudioFilters);
   if (identify)
     af_msg(AF_MSG_INFO, "ID_AUDIO_FILTERS\n");
   while (filter_list[i]) {
Index: help/help_mp-en.h
===================================================================
RCS file: /cvsroot/mplayer/main/help/help_mp-en.h,v
retrieving revision 1.224
diff -a -u -r1.224 help_mp-en.h
--- help/help_mp-en.h	14 Mar 2006 16:57:15 -0000	1.224
+++ help/help_mp-en.h	15 Mar 2006 20:41:49 -0000
@@ -1141,6 +1141,18 @@
 
 // libaf 
 
+// af.c
+
+#define MSGTR_AF_CantFindAF "[libaf] Couldn't find audio filter '%s'.\n"
+#define MSGTR_AF_MemAllocFailed "[libaf] Could not allocate memory.\n" 
+#define MSGTR_AF_OneAndOnly "[libaf] There can only be one instance of the filter '%s' in each stream.\n"
+#define MSGTR_AF_CouldntOpenAF "[libaf] Couldn't create or open audio filter '%s'.\n"
+#define MSGTR_AF_CantCorrectfAFMT "[libaf] Unable to correct audio format.\nThis error should never uccur, please send bugreport.\n"
+#define MSGTR_AF_NoAutomaticInsertion_NotMatchingFMTs "[libaf] Automatic filter insertion disabled but formats do not match. Giving up.\n"
+#define MSGTR_AF_CantReinit "[libaf] Reinitialization did not work, audio filter '%s' returned error code %i\n"
+#define MSGTR_AF_CanNotMeetSndCardDemands "[libaf] Unable to setup filter system can not meet sound-card demands, please send bugreport. \n"
+#define MSGTR_AF_AvailableAudioFilters "[libaf] Available audio filters:\n" 
+
 // af_ladspa.c
 
 #define MSGTR_AF_LADSPA_AvailableLabels "available labels in"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20060315/fab5aaff/attachment.pgp>


More information about the MPlayer-dev-eng mailing list