Просмотр исходного кода

Merge branch '1646_i18n_spaces'

* 1646_i18n_spaces:
  "Chown command" dialog: applied WGroupbox widget to draw frames.
  "Chmod command" dialog: applied WGroupbox widget to draw frames.
  Ticket #1646: removed leading and trailing spaces in i18n resources.
Andrew Borodin 14 лет назад
Родитель
Сommit
7d0a74a1a5

+ 4 - 4
lib/search/lib.c

@@ -39,10 +39,10 @@
 
 /*** global variables ****************************************************************************/
 
-const char * STR_E_NOTFOUND = N_(" Search string not found ");
-const char * STR_E_UNKNOWN_TYPE = N_(" Not implemented yet ");
-const char * STR_E_RPL_NOT_EQ_TO_FOUND = N_(" Num of replace tokens not equal to num of found tokens ");
-const char * STR_E_RPL_INVALID_TOKEN = N_(" Invalid token number %d ");
+const char * STR_E_NOTFOUND = N_("Search string not found");
+const char * STR_E_UNKNOWN_TYPE = N_("Not implemented yet");
+const char * STR_E_RPL_NOT_EQ_TO_FOUND = N_("Num of replace tokens not equal to num of found tokens");
+const char * STR_E_RPL_INVALID_TOKEN = N_("Invalid token number %d");
 
 /*** file scope macro definitions ****************************************************************/
 

+ 2 - 2
lib/search/regex.c

@@ -265,7 +265,7 @@ mc_search__regex_found_cond_one (mc_search_t * lc_mc_search, mc_search_regex_t *
         {
             lc_mc_search->error = MC_SEARCH_E_REGEX;
             lc_mc_search->error_str =
-                str_conv_gerror_message (error, _(" Regular expression error "));
+                str_conv_gerror_message (error, _("Regular expression error"));
             g_error_free (error);
             return COND__FOUND_ERROR;
         }
@@ -545,7 +545,7 @@ mc_search__cond_struct_new_init_regex (const char *charset, mc_search_t * lc_mc_
     if (error != NULL)
     {
         lc_mc_search->error = MC_SEARCH_E_REGEX_COMPILE;
-        lc_mc_search->error_str = str_conv_gerror_message (error, _(" Regular expression error "));
+        lc_mc_search->error_str = str_conv_gerror_message (error, _("Regular expression error"));
         g_error_free (error);
         return;
     }

+ 4 - 4
lib/utilunix.c

@@ -388,12 +388,12 @@ open_error_pipe (void)
 {
     if (pipe (error_pipe) < 0)
     {
-        message (D_NORMAL, _("Warning"), _(" Pipe failed "));
+        message (D_NORMAL, _("Warning"), _("Pipe failed"));
     }
     old_error = dup (2);
     if (old_error < 0 || close (2) || dup (error_pipe[1]) != 2)
     {
-        message (D_NORMAL, _("Warning"), _(" Dup failed "));
+        message (D_NORMAL, _("Warning"), _("Dup failed"));
 
         close (error_pipe[0]);
         error_pipe[0] = -1;
@@ -448,7 +448,7 @@ close_error_pipe (int error, const char *text)
     {
         if (dup2 (old_error, 2) == -1)
         {
-            message (error, MSG_ERROR, "%s", _("Error dup'ing old error pipe"));
+            message (error, MSG_ERROR, _("Error dup'ing old error pipe"));
             return 1;
         }
         close (old_error);
@@ -472,7 +472,7 @@ close_error_pipe (int error, const char *text)
     else
     {
         /* Show given text and possible message from pipe */
-        message (error, title, " %s \n %s ", text, msg);
+        message (error, title, "%s\n%s", text, msg);
     }
     return 1;
 }

+ 2 - 2
lib/vfs/mc-vfs/direntry.c

@@ -457,11 +457,11 @@ vfs_s_free_super (struct vfs_class *me, struct vfs_s_super *super)
 #if 0
     /* FIXME: We currently leak small ammount of memory, sometimes. Fix it if you can. */
     if (super->ino_usage)
-        message (D_ERROR, " Direntry warning ",
+        message (D_ERROR, "Direntry warning",
                  "Super ino_usage is %d, memory leak", super->ino_usage);
 
     if (super->want_stale)
-        message (D_ERROR, " Direntry warning ", "Super has want_stale set");
+        message (D_ERROR, "Direntry warning", "%s", "Super has want_stale set");
 #endif
 
     if (super->prevp)

+ 2 - 1
lib/vfs/mc-vfs/fish.c

@@ -304,13 +304,14 @@ fish_open_archive_int (struct vfs_class *me, struct vfs_s_super *super)
             if (!SUP.password)
             {
                 char *p, *op;
-                p = g_strconcat (_(" fish: Password required for "), SUP.user, " ", (char *) NULL);
+                p = g_strdup_printf (_("fish: Password is required for %s"), SUP.user);
                 op = vfs_get_password (p);
                 g_free (p);
                 if (op == NULL)
                     ERRNOR (EPERM, -1);
                 SUP.password = op;
             }
+
             print_vfs_message (_("fish: Sending password..."));
 
             {

+ 2 - 2
lib/vfs/mc-vfs/ftpfs.c

@@ -507,7 +507,7 @@ ftpfs_login_server (struct vfs_class *me, struct vfs_s_super *super, const char
     {                           /* ask user */
         char *p;
 
-        p = g_strconcat (_(" FTP: Password required for "), SUP.user, " ", (char *) NULL);
+        p = g_strdup_printf (_("FTP: Password required for %s"), SUP.user);
         op = vfs_get_password (p);
         g_free (p);
         if (op == NULL)
@@ -2104,7 +2104,7 @@ ftpfs_netrc_bad_mode (const char *netrcname)
         if (be_angry)
         {
             message (D_ERROR, MSG_ERROR,
-                     _("~/.netrc file has incorrect mode.\n" "Remove password or correct mode."));
+                     _("~/.netrc file has incorrect mode\nRemove password or correct mode"));
             be_angry = 0;
         }
         return 1;

+ 11 - 11
lib/vfs/mc-vfs/mcfs.c

@@ -137,8 +137,8 @@ mcfs_login_server (int my_socket, char *user, int port,
 	return 0;
 
     if (result != MC_VERSION_OK) {
-	message (D_ERROR, _(" MCFS "),
-		    _(" The server does not support this version "));
+	message (D_ERROR, _("MCFS"),
+		    _("The server does not support this version"));
 	close (my_socket);
 	return 0;
     }
@@ -155,9 +155,9 @@ mcfs_login_server (int my_socket, char *user, int port,
 	    int v;
 	    v = query_dialog (_("Warning"),
 			      _
-			      (" The remote server is not running on a system port \n"
-			       " you need a password to log in, but the information may \n"
-			       " not be safe on the remote side.  Continue? \n"),
+			      ("The remote server is not running on a system port\n"
+			       "you need a password to log in, but the information may\n"
+			       "not be safe on the remote side.  Continue?\n"),
 			      D_ERROR, 2, _("&Yes"), _("&No"));
 
 	    if (v == 1) {
@@ -168,7 +168,7 @@ mcfs_login_server (int my_socket, char *user, int port,
 	if (netrcpass != NULL)
 	    pass = g_strdup (netrcpass);
 	else
-	    pass = vfs_get_password (_(" MCFS Password required "));
+	    pass = vfs_get_password (_("MCFS Password required"));
 	if (!pass) {
 	    rpc_send (my_socket, RPC_INT, MC_QUIT, RPC_END);
 	    close (my_socket);
@@ -182,7 +182,7 @@ mcfs_login_server (int my_socket, char *user, int port,
 	    return 0;
 
 	if (result != MC_LOGINOK) {
-	    message (D_ERROR, _(" MCFS "), _(" Invalid password "));
+	    message (D_ERROR, _("MCFS"), _("Invalid password"));
 	    rpc_send (my_socket, RPC_INT, MC_QUIT, RPC_END);
 	    close (my_socket);
 	    return 0;
@@ -245,7 +245,7 @@ mcfs_create_tcp_link (const char *host, int *port, int *version, const char *cal
     } else {
 	hp = gethostbyname (host);
 	if (hp == NULL) {
-	    message (D_ERROR, caller, _(" Cannot locate hostname: %s "),
+	    message (D_ERROR, caller, _("Cannot locate hostname: %s"),
 			host);
 	    return 0;
 	}
@@ -264,13 +264,13 @@ mcfs_create_tcp_link (const char *host, int *port, int *version, const char *cal
     server_address.sin_port = htons (*port);
     my_socket = socket (AF_INET, SOCK_STREAM, 0);
     if (my_socket < 0) {
-	message (D_ERROR, caller, _(" Cannot create socket: %s "),
+	message (D_ERROR, caller, _("Cannot create socket: %s"),
 		    unix_error_string (errno));
 	return 0;
     }
     if (connect (my_socket, (struct sockaddr *) &server_address,
 		 sizeof (server_address)) < 0) {
-	message (D_ERROR, caller, _(" Cannot connect to server: %s "),
+	message (D_ERROR, caller, _("Cannot connect to server: %s"),
 		    unix_error_string (errno));
 	close (my_socket);
 	return 0;
@@ -340,7 +340,7 @@ mcfs_open_link (char *host, char *user, int *port, char *netrcpass)
 		return &mcfs_connections[i];
 	}
     if (mcfs_open_connections == MCFS_MAX_CONNECTIONS) {
-	message (D_ERROR, MSG_ERROR, _(" Too many open connections "));
+	message (D_ERROR, MSG_ERROR, _("Too many open connections"));
 	return 0;
     }
     sock = mcfs_open_tcp_link (host, user, port, netrcpass, &version);

+ 8 - 8
lib/vfs/mc-vfs/smbfs.c

@@ -619,7 +619,7 @@ smbfs_reconnect(smbfs_connection *conn, int *retries)
 
    	if (!(conn->cli = smbfs_do_connect(host, conn->service))) {
 		message (D_ERROR, MSG_ERROR,
-			_(" reconnect to %s failed\n "), conn->host);
+			_("reconnect to %s failed"), conn->host);
 		g_free(host);
 		return False;
 	}
@@ -1176,7 +1176,7 @@ smbfs_open_link (char *host, char *path, const char *user, int *port,
 
 	if (my_errno != EPERM)
 	    return 0;
-	message (D_ERROR, MSG_ERROR, _(" Authentication failed "));
+	message (D_ERROR, MSG_ERROR, _("Authentication failed"));
 
 	/* authentication failed, try again */
 	smbfs_auth_remove (bucket->host, bucket->service);
@@ -1699,7 +1699,7 @@ smbfs_mkdir (struct vfs_class * me, const char *path, mode_t mode)
 
     if (!cli_mkdir (sc->cli, cpath)) {
 	my_errno = cli_error (sc->cli, NULL, &err, NULL);
-	message (D_ERROR, MSG_ERROR, _(" Error %s creating directory %s "),
+	message (D_ERROR, MSG_ERROR, _("Error %s creating directory %s"),
 		    cli_errstr (sc->cli), CNV_LANG (cpath));
 	g_free (cpath);
 	return -1;
@@ -1725,7 +1725,7 @@ smbfs_rmdir (struct vfs_class *me, const char *path)
 
 	if (!cli_rmdir(sc->cli, cpath)) {
 		my_errno = cli_error(sc->cli, NULL, &err, NULL);
-		message (D_ERROR, MSG_ERROR, _(" Error %s removing directory %s "), 
+		message (D_ERROR, MSG_ERROR, _("Error %s removing directory %s"),
 			cli_errstr(sc->cli), CNV_LANG(cpath));
 		g_free (cpath);
 		return -1;
@@ -1827,7 +1827,7 @@ smbfs_open_readwrite (smbfs_handle *remote_handle, char *rname, int flags, int m
 		  flags : O_RDONLY, DENY_NONE);
 #endif
     if (remote_handle->fnum == -1) {
-	message (D_ERROR, MSG_ERROR, _(" %s opening remote file %s "),
+	message (D_ERROR, MSG_ERROR, _("%s opening remote file %s"),
 		    cli_errstr (remote_handle->cli), CNV_LANG (rname));
 	DEBUG (1, ("smbfs_open(rname:%s) error:%s\n",
 		   rname, cli_errstr (remote_handle->cli)));
@@ -1843,7 +1843,7 @@ smbfs_open_readwrite (smbfs_handle *remote_handle, char *rname, int flags, int m
 			NULL)
 	&& !cli_getattrE (remote_handle->cli, remote_handle->fnum,
 			  &remote_handle->attr, &size, NULL, NULL, NULL)) {
-	message (D_ERROR, MSG_ERROR, " getattrib: %s ",
+	message (D_ERROR, MSG_ERROR, "getattrib: %s",
 		    cli_errstr (remote_handle->cli));
 	DEBUG (1,
 	       ("smbfs_open(rname:%s) getattrib:%s\n", rname,
@@ -1906,7 +1906,7 @@ smbfs_unlink (struct vfs_class *me, const char *path)
     remote_file = free_after(smbfs_convert_path (remote_file, FALSE), remote_file);
 
     if (!cli_unlink(sc->cli, remote_file)) {
-	message (D_ERROR, MSG_ERROR, _(" %s removing remote file %s "), 
+	message (D_ERROR, MSG_ERROR, _("%s removing remote file %s"),
 			cli_errstr(sc->cli), CNV_LANG(remote_file));
 	g_free (remote_file);
 	return -1;
@@ -1941,7 +1941,7 @@ smbfs_rename (struct vfs_class *me, const char *a, const char *b)
     g_free (rb);
 
     if (!retval) {
-	message (D_ERROR, MSG_ERROR, _(" %s renaming files\n"), 
+	message (D_ERROR, MSG_ERROR, _("%s renaming files\n"),
 			cli_errstr(sc->cli));
 	return -1;
     }   

+ 1 - 1
lib/vfs/mc-vfs/tar.c

@@ -697,7 +697,7 @@ tar_open_archive (struct vfs_class *me, struct vfs_s_super *archive,
 	    case STATUS_EOFMARK:
 		message (D_ERROR, MSG_ERROR,
 			 _
-			 ("Hmm,...\n%s\ndoesn't look like a tar archive."),
+			 ("%s\ndoesn't look like a tar archive."),
 			 name);
 		/* FALL THRU */
 

+ 17 - 17
lib/vfs/mc-vfs/undelfs.c

@@ -90,7 +90,7 @@ static struct lsdel_struct lsd;
 static struct deleted_info *delarray;
 static int num_delarray, max_delarray;
 static char *block_buf;
-static const char *undelfserr = N_(" undelfs: error ");
+static const char *undelfserr = N_("undelfs: error");
 static int readdir_ptr;
 static int undelfs_usage;
 static struct vfs_class vfs_undelfs_ops;
@@ -197,25 +197,25 @@ undelfs_loaddel (void)
     delarray = g_try_malloc (sizeof (struct deleted_info) * max_delarray);
     if (!delarray)
     {
-        message (D_ERROR, undelfserr, _(" not enough memory "));
+        message (D_ERROR, undelfserr, _("not enough memory"));
         return 0;
     }
     block_buf = g_try_malloc (fs->blocksize * 3);
     if (!block_buf)
     {
-        message (D_ERROR, undelfserr, _(" while allocating block buffer "));
+        message (D_ERROR, undelfserr, _("while allocating block buffer"));
         goto free_delarray;
     }
     retval = ext2fs_open_inode_scan (fs, 0, &scan);
     if (retval != 0)
     {
-        message (D_ERROR, undelfserr, _(" open_inode_scan: %d "), retval);
+        message (D_ERROR, undelfserr, _("open_inode_scan: %d"), retval);
         goto free_block_buf;
     }
     retval = ext2fs_get_next_inode (scan, &ino, &inode);
     if (retval != 0)
     {
-        message (D_ERROR, undelfserr, _(" while starting inode scan %d "), retval);
+        message (D_ERROR, undelfserr, _("while starting inode scan %d"), retval);
         goto error_out;
     }
     count = 0;
@@ -237,7 +237,7 @@ undelfs_loaddel (void)
         retval = ext2fs_block_iterate (fs, ino, 0, block_buf, undelfs_lsdel_proc, &lsd);
         if (retval)
         {
-            message (D_ERROR, undelfserr, _(" while calling ext2_block_iterate %d "), retval);
+            message (D_ERROR, undelfserr, _("while calling ext2_block_iterate %d"), retval);
             goto next;
         }
         if (lsd.free_blocks && !lsd.bad_blocks)
@@ -249,7 +249,7 @@ undelfs_loaddel (void)
                                                                    (max_delarray + 50));
                 if (!delarray_new)
                 {
-                    message (D_ERROR, undelfserr, _(" no more memory while reallocating array "));
+                    message (D_ERROR, undelfserr, _("no more memory while reallocating array"));
                     goto error_out;
                 }
                 delarray = delarray_new;
@@ -271,7 +271,7 @@ undelfs_loaddel (void)
         retval = ext2fs_get_next_inode (scan, &ino, &inode);
         if (retval)
         {
-            message (D_ERROR, undelfserr, _(" while doing inode scan %d "), retval);
+            message (D_ERROR, undelfserr, _("while doing inode scan %d"), retval);
             goto error_out;
         }
     }
@@ -305,7 +305,7 @@ com_err (const char *whoami, long err_code, const char *fmt, ...)
     str = g_strdup_vprintf (fmt, ap);
     va_end (ap);
 
-    message (D_ERROR, _(" Ext2lib error "), " %s (%s: %ld) ", str, whoami, err_code);
+    message (D_ERROR, _("Ext2lib error"), "%s (%s: %ld)", str, whoami, err_code);
     g_free (str);
 }
 
@@ -336,19 +336,19 @@ undelfs_opendir (struct vfs_class *me, const char *dirname)
 
     if (ext2fs_open (ext2_fname, 0, 0, 0, unix_io_manager, &fs))
     {
-        message (D_ERROR, undelfserr, _(" Cannot open file %s "), ext2_fname);
+        message (D_ERROR, undelfserr, _("Cannot open file %s"), ext2_fname);
         return 0;
     }
     print_vfs_message (_("undelfs: reading inode bitmap..."));
     if (ext2fs_read_inode_bitmap (fs))
     {
-        message (D_ERROR, undelfserr, _(" Cannot load inode bitmap from: \n %s \n"), ext2_fname);
+        message (D_ERROR, undelfserr, _("Cannot load inode bitmap from:\n%s"), ext2_fname);
         goto quit_opendir;
     }
     print_vfs_message (_("undelfs: reading block bitmap..."));
     if (ext2fs_read_block_bitmap (fs))
     {
-        message (D_ERROR, undelfserr, _(" Cannot load block bitmap from: \n %s \n"), ext2_fname);
+        message (D_ERROR, undelfserr, _("Cannot load block bitmap from:\n%s"), ext2_fname);
         goto quit_opendir;
     }
     /* Now load the deleted information */
@@ -372,7 +372,7 @@ undelfs_readdir (void *vfs_info)
 
     if (vfs_info != fs)
     {
-        message (D_ERROR, undelfserr, _(" vfs_info is not fs! "));
+        message (D_ERROR, undelfserr, _("vfs_info is not fs!"));
         return NULL;
     }
     if (readdir_ptr == num_delarray)
@@ -431,7 +431,7 @@ undelfs_open (struct vfs_class *me, const char *fname, int flags, int mode)
 
     if (!ext2_fname || strcmp (ext2_fname, file))
     {
-        message (D_ERROR, undelfserr, _(" You have to chdir to extract files first "));
+        message (D_ERROR, undelfserr, _("You have to chdir to extract files first"));
         g_free (file);
         g_free (f);
         return 0;
@@ -571,7 +571,7 @@ undelfs_read (void *vfs_info, char *buffer, int count)
     retval = ext2fs_block_iterate (fs, p->inode, 0, NULL, undelfs_dump_read, p);
     if (retval)
     {
-        message (D_ERROR, undelfserr, _(" while iterating over blocks "));
+        message (D_ERROR, undelfserr, _("while iterating over blocks"));
         return -1;
     }
     if (p->error_code && !p->finished)
@@ -636,7 +636,7 @@ undelfs_lstat (struct vfs_class *me, const char *path, struct stat *buf)
 
     if (!ext2_fname || strcmp (ext2_fname, file))
     {
-        message (D_ERROR, undelfserr, _(" You have to chdir to extract files first "));
+        message (D_ERROR, undelfserr, _("You have to chdir to extract files first"));
         g_free (file);
         g_free (f);
         return 0;
@@ -678,7 +678,7 @@ undelfs_chdir (struct vfs_class *me, const char *path)
     fd = open (file, O_RDONLY);
     if (fd == -1)
     {
-        message (D_ERROR, undelfserr, _(" Cannot open file %s "), file);
+        message (D_ERROR, undelfserr, _("Cannot open file \"%s\""), file);
         g_free (f);
         g_free (file);
         return -1;

Некоторые файлы не были показаны из-за большого количества измененных файлов