]> git.ipfire.org Git - thirdparty/sarg.git/blobdiff - usertab.c
Minor message content adjustments.
[thirdparty/sarg.git] / usertab.c
index 03934e3671bd1ee9e1b3d006de61586a89d65f41..ebcbb65360ff641619f8e651540d8385c5651490 100644 (file)
--- a/usertab.c
+++ b/usertab.c
@@ -85,7 +85,7 @@ static void init_file_usertab(const char *UserTabFile)
        }
        nreg = ftell(fp_usr);
        if (nreg<0) {
-               debuga(_("Cannot get the size of file %s\n"),UserTabFile);
+               debuga(_("Cannot get the size of file \"%s\"\n"),UserTabFile);
                exit(EXIT_FAILURE);
        }
        nreg += 100;
@@ -105,7 +105,7 @@ static void init_file_usertab(const char *UserTabFile)
                z1=0;
                while(buf[z1] && (unsigned char)buf[z1]>' ') {
                        if (z2+3>=nreg) { //need at least 3 additional bytes for the minimum string "\n\t\0"
-                               debuga(_("The list of the users is too long in your %s file.\n"),UserTabFile);
+                               debuga(_("The list of users is too long in file \"%s\"\n"),UserTabFile);
                                exit(EXIT_FAILURE);
                        }
                        userfile[z2++]=buf[z1++];
@@ -114,7 +114,7 @@ static void init_file_usertab(const char *UserTabFile)
                userfile[z2++]='\n';
                while(buf[z1] && (unsigned char)buf[z1]>=' ') {
                        if (z2+2>=nreg) { //need at least 2 additional bytes for "\t\0"
-                               debuga(_("The list of the users is too long in your %s file.\n"),UserTabFile);
+                               debuga(_("The list of users is too long in file \"%s\"\n"),UserTabFile);
                                exit(EXIT_FAILURE);
                        }
                        userfile[z2++]=buf[z1++];
@@ -236,7 +236,8 @@ const char * charset_convert( const char * str_in, const char * charset_to )
        str_in_orig = str_in;
        return_value = iconv(ldapiconv, (ICONV_CONST char **)&str_in, &str_in_len, &str_out, &str_out_len );
        if ( return_value == ( size_t ) -1 ) {
-               debuga(_("iconv failed in string \"%s\":\n"),str_in_orig);
+               /* TRANSLATORS: The message is followed by the reason for the failure. */
+               debuga(_("iconv failed on string \"%s\":\n"),str_in_orig);
                switch ( errno ) {
                        /* See "man 3 iconv" for an explanation. */
                        case EILSEQ:
@@ -312,8 +313,7 @@ static void get_ldap_name(const char *userlogin,char *mappedname,int namelen)
        attrs[1]=NULL;
        rc= ldap_search_ext_s(ldap_handle, LDAPBaseSearch, LDAP_SCOPE_SUBTREE, filtersearch, attrs, 0, NULL, NULL, NULL, -1, &result);
        if (rc != LDAP_SUCCESS) {
-               debuga(_("LDAP search failed: %s\n"), ldap_err2string(rc));
-               debuga(_("looking for \"%s\" at or below \"%s\"\n"),filtersearch,LDAPBaseSearch);
+               debuga(_("LDAP search failed: %s\nlooking for \"%s\" at or below \"%s\"\n"), ldap_err2string(rc),filtersearch,LDAPBaseSearch);
                safe_strcpy(mappedname,userlogin,namelen);
                return;
        }
@@ -344,8 +344,10 @@ static void get_ldap_name(const char *userlogin,char *mappedname,int namelen)
 void init_usertab(const char *UserTabFile)
 {
        if (strcmp(UserTabFile, "ldap") == 0) {
-               if(debug)
-                       debuga(_("Loading User table: %s\n"),UserTabFile);
+               if(debug) {
+                       /* TRANSLATORS: The %s may be the string "ldap" or a file name.*/
+                       debuga(_("Loading User table from \"%s\"\n"),UserTabFile);
+               }
 #ifdef HAVE_LDAP_H
                which_usertab=UTT_Ldap;
                init_ldap_usertab();
@@ -355,7 +357,7 @@ void init_usertab(const char *UserTabFile)
 #endif //HAVE_LDAP_H
        } else if (UserTabFile[0] != '\0') {
                if(debug)
-                       debuga(_("Loading User table: %s\n"),UserTabFile);
+                       debuga(_("Loading User table from \"%s\"\n"),UserTabFile);
                which_usertab=UTT_File;
                init_file_usertab(UserTabFile);
        } else {