From 01388b0ea33e583358562d864cd0e481b2465308 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 25 Nov 2008 21:03:28 +0100 Subject: [PATCH] po: improved translatable strings for easier translation Remove exclamation marks and other markup from the strings. --- src/colors.c | 4 ++-- src/command.c | 4 ++-- src/main.c | 7 ++++--- src/screen.c | 12 ++++++------ src/screen_artist.c | 1 - src/screen_file.c | 12 +++++------- src/screen_keydef.c | 8 ++++---- src/screen_lyrics.c | 2 +- src/screen_play.c | 2 +- 9 files changed, 25 insertions(+), 27 deletions(-) diff --git a/src/colors.c b/src/colors.c index 0bcf278..cc3ec50 100644 --- a/src/colors.c +++ b/src/colors.c @@ -235,7 +235,7 @@ colors_start(void) list = list->next; } } else if (color_definition_list && !can_change_color()) - fprintf(stderr, _("Terminal lacks support for changing colors!\n")); + fprintf(stderr, _("Terminal lacks support for changing colors\n")); if (options.enable_colors) { enum color i; @@ -245,7 +245,7 @@ colors_start(void) colors_update_pair(i); } } else if (options.enable_colors) { - fprintf(stderr, _("Terminal lacks color capabilities!\n")); + fprintf(stderr, _("Terminal lacks color capabilities\n")); options.enable_colors = 0; } diff --git a/src/command.c b/src/command.c index 1071673..e04817f 100644 --- a/src/command.c +++ b/src/command.c @@ -468,14 +468,14 @@ check_key_bindings(command_definition_t *cp, char *buf, size_t bufsize) get_key_names(CMD_SCREEN_KEYDEF,0)); #else g_snprintf(buf, bufsize, - _("Error: Key %s assigned to %s and %s !!!\n"), + _("Error: Key %s assigned to %s and %s\n"), key2str(cp[i].keys[j]), get_key_command_name(cp[i].command), get_key_command_name(cmd)); #endif } else fprintf(stderr, - _("Error: Key %s assigned to %s and %s !!!\n"), + _("Error: Key %s assigned to %s and %s\n"), key2str(cp[i].keys[j]), get_key_command_name(cp[i].command), get_key_command_name(cmd)); diff --git a/src/main.c b/src/main.c index ed76181..11f16ac 100644 --- a/src/main.c +++ b/src/main.c @@ -225,10 +225,11 @@ timer_reconnect(G_GNUC_UNUSED gpointer data) #ifndef NCMPC_MINI /* quit if mpd is pre 0.11.0 - song id not supported by mpd */ if (MPD_VERSION_LT(mpd, 0, 11, 0)) { - screen_status_printf(_("Error: MPD version %d.%d.%d is to old (0.11.0 needed).\n"), + screen_status_printf(_("Error: MPD version %d.%d.%d is to old (%s needed)"), mpd->connection->version[0], mpd->connection->version[1], - mpd->connection->version[2]); + mpd->connection->version[2], + "0.11.0"); mpdclient_disconnect(mpd); doupdate(); @@ -238,7 +239,7 @@ timer_reconnect(G_GNUC_UNUSED gpointer data) } #endif - screen_status_printf(_("Connected to %s!"), options.host); + screen_status_printf(_("Connected to %s"), options.host); doupdate(); connected = TRUE; diff --git a/src/screen.c b/src/screen.c index 25c05c6..569df7a 100644 --- a/src/screen.c +++ b/src/screen.c @@ -393,7 +393,7 @@ screen_resize(struct mpdclient *c) { if (COLSstatus->crossfade); if (dbupdate && dbupdate != c->status->updatingDb) { - screen_status_printf(_("Database updated!")); + screen_status_printf(_("Database updated")); mpdclient_browse_callback(c, BROWSE_DB_UPDATED, NULL); } @@ -734,11 +734,11 @@ screen_client_cmd(mpdclient_t *c, command_t cmd) break; case CMD_SHUFFLE: if (mpdclient_cmd_shuffle(c) == 0) - screen_status_message(_("Shuffled playlist!")); + screen_status_message(_("Shuffled playlist")); break; case CMD_CLEAR: if (mpdclient_cmd_clear(c) == 0) - screen_status_message(_("Cleared playlist!")); + screen_status_message(_("Cleared playlist")); break; case CMD_REPEAT: mpdclient_cmd_repeat(c, !c->status->repeat); @@ -755,7 +755,7 @@ screen_client_cmd(mpdclient_t *c, command_t cmd) case CMD_DB_UPDATE: if (!c->status->updatingDb) { if( mpdclient_cmd_db_update(c,NULL)==0 ) - screen_status_printf(_("Database update started!")); + screen_status_printf(_("Database update started")); } else screen_status_printf(_("Database update running...")); break; diff --git a/src/screen_artist.c b/src/screen_artist.c index b3429fc..2c22883 100644 --- a/src/screen_artist.c +++ b/src/screen_artist.c @@ -631,7 +631,6 @@ artist_cmd(mpdclient_t *c, command_t cmd) /* continue and update... */ case CMD_SCREEN_UPDATE: reload_lists(c); - screen_status_printf(_("Screen updated!")); return false; case CMD_LIST_FIND: diff --git a/src/screen_file.c b/src/screen_file.c index b073b87..1f39395 100644 --- a/src/screen_file.c +++ b/src/screen_file.c @@ -121,7 +121,7 @@ handle_delete(mpdclient_t *c) entity = entry->entity; if( entity->type!=MPD_INFO_ENTITY_TYPE_PLAYLISTFILE ) { - screen_status_printf(_("You can only delete playlists!")); + screen_status_printf(_("You can only delete playlists")); screen_bell(); return -1; } @@ -133,14 +133,14 @@ handle_delete(mpdclient_t *c) key = tolower(screen_getch(screen.status_window.w, buf)); g_free(buf); if( key != YES[0] ) { - screen_status_printf(_("Aborted!")); + screen_status_printf(_("Aborted")); return 0; } if( mpdclient_cmd_delete_playlist(c, plf->path) ) return -1; - screen_status_printf(_("Playlist deleted!")); + screen_status_printf(_("Playlist deleted")); return 0; } @@ -239,8 +239,6 @@ browse_cmd(mpdclient_t *c, command_t cmd) list_window_check_selected(browser.lw, filelist_length(browser.filelist)); file_repaint(); - - screen_status_printf(_("Screen updated!")); return false; case CMD_DB_UPDATE: @@ -252,11 +250,11 @@ browse_cmd(mpdclient_t *c, command_t cmd) if (strcmp(browser.filelist->path, "")) { char *path_locale = utf8_to_locale(browser.filelist->path); - screen_status_printf(_("Database update of %s started!"), + screen_status_printf(_("Database update of %s started"), path_locale); g_free(path_locale); } else - screen_status_printf(_("Database update started!")); + screen_status_printf(_("Database update started")); /* set updatingDb to make shure the browse callback gets called * even if the updated has finished before status is updated */ diff --git a/src/screen_keydef.c b/src/screen_keydef.c index d55d4c0..02ef177 100644 --- a/src/screen_keydef.c +++ b/src/screen_keydef.c @@ -66,7 +66,7 @@ apply_keys(void) size_t size = command_list_length * sizeof(command_definition_t); memcpy(orginal_cmds, cmds, size); - screen_status_printf(_("You have new key bindings!")); + screen_status_printf(_("You have new key bindings")); } else screen_status_printf(_("Keybindings unchanged.")); } @@ -159,7 +159,7 @@ assign_new_key(WINDOW *w, int cmd_index, int key_index) g_free(buf); if (key==ERR) { - screen_status_printf(_("Aborted!")); + screen_status_printf(_("Aborted")); return; } @@ -212,7 +212,8 @@ list_callback(unsigned idx, int *highlight, G_GNUC_UNUSED void *data) cmds[subcmd].keys[idx]); return buf; } else if (idx == subcmd_addpos) { - g_snprintf(buf, BUFSIZE, _("%d. Add new key "), idx + 1); + g_snprintf(buf, BUFSIZE, "%d. %s", + idx + 1, _("Add new key")); return buf; } } @@ -258,7 +259,6 @@ keydef_open(G_GNUC_UNUSED mpdclient_t *c) cmds = g_malloc0(cmds_size); memcpy(cmds, current_cmds, cmds_size); command_list_length += STATIC_ITEMS; - screen_status_printf(_("Welcome to the key editor!")); } subcmd = -1; diff --git a/src/screen_lyrics.c b/src/screen_lyrics.c index 2d61bc0..93a47cc 100644 --- a/src/screen_lyrics.c +++ b/src/screen_lyrics.c @@ -323,7 +323,7 @@ lyrics_cmd(mpdclient_t *c, command_t cmd) case CMD_ADD: if (current.loader == NULL && current.artist != NULL && current.title != NULL && store_lyr_hd() == 0) - screen_status_message (_("Lyrics saved!")); + screen_status_message (_("Lyrics saved")); return true; case CMD_LYRICS_UPDATE: if (c->song != NULL) { diff --git a/src/screen_play.c b/src/screen_play.c index 6fd586a..b4fb15f 100644 --- a/src/screen_play.c +++ b/src/screen_play.c @@ -258,7 +258,7 @@ playlist_save(mpdclient_t *c, char *name, char *defaultname) return error; } - screen_status_printf(_("Aborted!")); + screen_status_printf(_("Aborted")); } g_free(filename); -- 2.30.2