commit 09b1ef56e102f5c89203ee28c590e8961f7b49b0 Author: Daniele Forsi <dani...@forsi.it> Date: Mon Jul 25 22:54:23 2011 +0200
More strings need translation libgtkpod/misc_track.c | 9 +++++---- plugins/cover_display/fetchcover.c | 18 +++++++++--------- plugins/exporter/file_export.c | 2 +- plugins/filetype_mp4/mp4file.c | 8 ++++---- plugins/filetype_ogg/oggfile.c | 2 +- plugins/filetype_video/videofile.c | 2 +- plugins/filetype_wav/wavfile.c | 2 +- plugins/repository_editor/repository_init.c | 6 +++--- 8 files changed, 25 insertions(+), 24 deletions(-) --- diff --git a/libgtkpod/misc_track.c b/libgtkpod/misc_track.c index d0dac50..c5615fb 100644 --- a/libgtkpod/misc_track.c +++ b/libgtkpod/misc_track.c @@ -1102,7 +1102,8 @@ time_t track_get_timestamp(Track *track, T_item t_item) { /* unified format for TRACKLEN, STARTTIME, STOPTIME */ static gchar *track_get_length_string(gint32 length) { - return g_strdup_printf("%d:%06.3f", length / 60000, ((float) (length % 60000)) / 1000); + /* Translators: this is minutes:seconds.thousandths */ + return g_strdup_printf(_("%d:%06.3f"), length / 60000, ((float) (length % 60000)) / 1000); } /* Return text for display. g_free() after use. */ @@ -1192,19 +1193,19 @@ gchar *track_get_text(Track *track, T_item item) { if (track->tracks == 0) text = g_strdup_printf("%d", track->track_nr); else - text = g_strdup_printf("%d/%d", track->track_nr, track->tracks); + text = g_strdup_printf(_("%d/%d"), track->track_nr, track->tracks); break; case T_CD_NR: if (track->cds == 0) text = g_strdup_printf("%d", track->cd_nr); else - text = g_strdup_printf("%d/%d", track->cd_nr, track->cds); + text = g_strdup_printf(_("%d/%d"), track->cd_nr, track->cds); break; case T_IPOD_ID: if (track->id != -1) text = g_strdup_printf("%d", track->id); else - text = g_strdup("--"); + text = g_strdup(_("n/a")); break; case T_PC_PATH: text = g_strdup(etr->pc_path_utf8); diff --git a/plugins/cover_display/fetchcover.c b/plugins/cover_display/fetchcover.c index c25ead2..2c74af0 100644 --- a/plugins/cover_display/fetchcover.c +++ b/plugins/cover_display/fetchcover.c @@ -146,7 +146,7 @@ static gchar *fetchcover_check_file_exists (Fetch_Cover *fetch_cover); if (! g_str_has_suffix(fetch_cover->url->str, ".jpg") && ! g_str_has_suffix(fetch_cover->url->str, ".JPG")) { - fetch_cover->err_msg = g_strdup("Only jpg images are currently supported at this time\n"); + fetch_cover->err_msg = g_strdup(_("Only jpg images are currently supported at this time\n")); return FALSE; } @@ -169,14 +169,14 @@ static gchar *fetchcover_check_file_exists (Fetch_Cover *fetch_cover); if (fetchcover_curl_data.memory == NULL) { - fetch_cover->err_msg = g_strdup("fetchcover curl data memory is null so failed to download anything!\n"); + fetch_cover->err_msg = g_strdup(_("fetchcover curl data memory is NULL so failed to download anything!\n")); return FALSE; } /* Check that the page returned is a valid web page */ if (strstr(fetchcover_curl_data.memory, "<html>") != NULL) { - fetch_cover->err_msg = g_strdup("fetchcover memory contains <html> tag so not a valid jpg image\n"); + fetch_cover->err_msg = g_strdup(_("fetchcover memory contains <html> tag so not a valid jpg image\n")); return FALSE; } @@ -196,7 +196,7 @@ static gchar *fetchcover_check_file_exists (Fetch_Cover *fetch_cover); fetchcover_curl_data.size = 0; } g_free (path); - fetch_cover->err_msg = g_strdup ("Failed to create a file with the filename\n"); + fetch_cover->err_msg = g_strdup(_("Failed to create a file with the filename\n")); return FALSE; } @@ -210,7 +210,7 @@ static gchar *fetchcover_check_file_exists (Fetch_Cover *fetch_cover); } fclose(tmpf); g_free (path); - fetch_cover->err_msg = g_strdup("fetchcover failed to write the data to the new file\n"); + fetch_cover->err_msg = g_strdup(_("fetchcover failed to write the data to the new file\n")); return FALSE; } @@ -221,7 +221,7 @@ static gchar *fetchcover_check_file_exists (Fetch_Cover *fetch_cover); fileformat = gdk_pixbuf_get_file_info (path, NULL, NULL); if (fileformat == NULL) { - fetch_cover->err_msg = g_strdup("fetchcover downloaded file is not a valid image file\n"); + fetch_cover->err_msg = g_strdup(_("fetchcover downloaded file is not a valid image file\n")); return FALSE; } @@ -237,7 +237,7 @@ static gchar *fetchcover_check_file_exists (Fetch_Cover *fetch_cover); fetchcover_curl_data.size = 0; } g_free(path); - fetch_cover->err_msg = g_strconcat ("fetchcover error occurred while creating a pixbuf from the file\n", error->message, NULL); + fetch_cover->err_msg = g_strconcat(_("fetchcover error occurred while creating a pixbuf from the file\n", error->message, NULL)); return FALSE; } @@ -257,7 +257,7 @@ static gchar *fetchcover_check_file_exists (Fetch_Cover *fetch_cover); if (tracks == NULL || g_list_length (tracks) <= 0) { - fetch_cover->err_msg = g_strdup("fetchcover object's tracks list either NULL or no tracks were selected\n"); + fetch_cover->err_msg = g_strdup(_("fetchcover object's tracks list either NULL or no tracks were selected\n")); return FALSE; } @@ -298,7 +298,7 @@ static gchar *fetchcover_check_file_exists (Fetch_Cover *fetch_cover); if (fetchcover_check_file_exists (fetch_cover) == NULL) { - fetch_cover->err_msg = g_strdup("operation cancelled\n"); + fetch_cover->err_msg = g_strdup(_("operation cancelled\n")); return FALSE; } diff --git a/plugins/exporter/file_export.c b/plugins/exporter/file_export.c index 037350e..e6ff780 100644 --- a/plugins/exporter/file_export.c +++ b/plugins/exporter/file_export.c @@ -317,7 +317,7 @@ static gboolean write_track(struct fcd *fcd) { if (error) { /* File may have been skipped so need to log message */ - fcd->errors = g_string_append(fcd->errors, g_strdup_printf(("'%s'\n"), error->message)); + fcd->errors = g_string_append(fcd->errors, g_strdup_printf(_("'%s'\n"), error->message)); g_error_free(error); } } diff --git a/plugins/filetype_mp4/mp4file.c b/plugins/filetype_mp4/mp4file.c index 11582e6..731007d 100644 --- a/plugins/filetype_mp4/mp4file.c +++ b/plugins/filetype_mp4/mp4file.c @@ -702,13 +702,13 @@ Track *mp4_get_file_info(const gchar *mp4FileName, GError **error) { value = strrchr(mp4FileName, '.'); if (value) { if (g_ascii_strcasecmp(value, ".m4a") == 0) - track->filetype = g_strdup("AAC audio file"); + track->filetype = g_strdup(_("AAC audio file")); if (g_ascii_strcasecmp(value, ".m4p") == 0) - track->filetype = g_strdup("Protected AAC audio file"); + track->filetype = g_strdup(_("Protected AAC audio file")); if (g_ascii_strcasecmp(value, ".m4b") == 0) - track->filetype = g_strdup("AAC audio book file"); + track->filetype = g_strdup(_("AAC audio book file")); if (g_ascii_strcasecmp(value, ".mp4") == 0) - track->filetype = g_strdup("MP4 video file"); + track->filetype = g_strdup(_("MP4 video file")); } if (prefs_get_int("readtags")) { if (MP4GetMetadataName(mp4File, &value) && value != NULL) { diff --git a/plugins/filetype_ogg/oggfile.c b/plugins/filetype_ogg/oggfile.c index 6f5a07b..4432e17 100644 --- a/plugins/filetype_ogg/oggfile.c +++ b/plugins/filetype_ogg/oggfile.c @@ -78,7 +78,7 @@ Track *ogg_get_file_info(const gchar *oggFileName, GError **error) { } else { track = gp_track_new(); - track->description = g_strdup("Ogg audio file"); + track->description = g_strdup_(("Ogg audio file")); //FIXME // Question whether ogg video files should be handled separately? track->mediatype = ITDB_MEDIATYPE_AUDIO; diff --git a/plugins/filetype_video/videofile.c b/plugins/filetype_video/videofile.c index b973a17..77f9195 100644 --- a/plugins/filetype_video/videofile.c +++ b/plugins/filetype_video/videofile.c @@ -44,7 +44,7 @@ Track *video_get_file_info(const gchar *filename, GError **error) { track = gp_track_new(); track->mediatype = ITDB_MEDIATYPE_MOVIE; track->movie_flag = 0x01; - track->filetype = g_strdup("Generic video file"); + track->filetype = g_strdup(_("Generic video file")); return track; } diff --git a/plugins/filetype_wav/wavfile.c b/plugins/filetype_wav/wavfile.c index 376133f..815312b 100644 --- a/plugins/filetype_wav/wavfile.c +++ b/plugins/filetype_wav/wavfile.c @@ -162,7 +162,7 @@ Track *wav_get_file_info(const gchar *filename, GError **error) { track->samplerate = wav_file->samples_per_sec; track->tracklen = 1000 * ((double) 8 * len / track->bitrate); track->bitrate /= 1000; /* change to kbps */ - track->filetype = g_strdup("WAV audio file"); + track->filetype = g_strdup(_("WAV audio file")); fclose(wav_file->file); g_free(wav_file); diff --git a/plugins/repository_editor/repository_init.c b/plugins/repository_editor/repository_init.c index 2c639ab..aba10f4 100644 --- a/plugins/repository_editor/repository_init.c +++ b/plugins/repository_editor/repository_init.c @@ -68,15 +68,15 @@ void set_cell(GtkCellLayout *cell_layout, GtkCellRenderer *cell, GtkTreeModel *t else { if (info->capacity >= 1) { /* size in GB */ text - = g_strdup_printf("%2.0f GB %s (x%s)", info->capacity, itdb_info_get_ipod_model_name_string(info->ipod_model), info->model_number); + = g_strdup_printf(_("%2.0f GB %s (x%s)"), info->capacity, itdb_info_get_ipod_model_name_string(info->ipod_model), info->model_number); } else if (info->capacity > 0) { /* size in MB */ text - = g_strdup_printf("%3.0f MB %s (x%s)", info->capacity * 1024, itdb_info_get_ipod_model_name_string(info->ipod_model), info->model_number); + = g_strdup_printf(_("%3.0f MB %s (x%s)"), info->capacity * 1024, itdb_info_get_ipod_model_name_string(info->ipod_model), info->model_number); } else { /* no capacity information available */ text - = g_strdup_printf("%s (x%s)", itdb_info_get_ipod_model_name_string(info->ipod_model), info->model_number); + = g_strdup_printf(_("%s (x%s)"), itdb_info_get_ipod_model_name_string(info->ipod_model), info->model_number); } } ------------------------------------------------------------------------------ Storage Efficiency Calculator This modeling tool is based on patent-pending intellectual property that has been used successfully in hundreds of IBM storage optimization engage- ments, worldwide. Store less, Store more with what you own, Move data to the right place. Try It Now! http://www.accelacomm.com/jaw/sfnl/114/51427378/ _______________________________________________ gtkpod-cvs2 mailing list gtkpod-cvs2@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2