aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-12-25 23:41:09 +0100
committerMax Kellermann <max@duempel.org>2008-12-25 23:41:09 +0100
commit5a7177e0337b40804f4aaf59630ef7df36b4b998 (patch)
tree1b45a1a6f232041c0a9e019a3116e238d1b419dd
parentb8997d1dd6f5bde7f0ef7f55328f2f41b7af6c5a (diff)
downloadmpd-5a7177e0337b40804f4aaf59630ef7df36b4b998.tar.gz
mpd-5a7177e0337b40804f4aaf59630ef7df36b4b998.tar.xz
mpd-5a7177e0337b40804f4aaf59630ef7df36b4b998.zip
added comments for translators
Give translators hints about the meaning of some difficult messages.
-rw-r--r--src/command.c10
-rw-r--r--src/conf.c11
-rw-r--r--src/screen_browser.c1
-rw-r--r--src/screen_file.c6
-rw-r--r--src/screen_lyrics.c7
5 files changed, 32 insertions, 3 deletions
diff --git a/src/command.c b/src/command.c
index 09d021c55..c73f26fea 100644
--- a/src/command.c
+++ b/src/command.c
@@ -76,9 +76,9 @@ static command_definition_t cmds[] = {
{ { DWN, 'j', 0 }, 0, CMD_LIST_NEXT, "down",
N_("Move cursor down") },
{ { HOME, 0x01, 0 }, 0, CMD_LIST_FIRST, "home",
- N_("Home ") },
+ N_("Home") },
{ { END, 0x05, 0 }, 0, CMD_LIST_LAST, "end",
- N_("End ") },
+ N_("End") },
{ { PGUP, 0, 0 }, 0, CMD_LIST_PREVIOUS_PAGE, "pgup",
N_("Page up") },
{ { PGDN, 0, 0 }, 0, CMD_LIST_NEXT_PAGE, "pgdn",
@@ -162,8 +162,12 @@ static command_definition_t cmds[] = {
/* ncmpc options */
{ { 'w', 0, 0 }, 0, CMD_TOGGLE_FIND_WRAP, "wrap-mode",
+ /* translators: toggle between wrapping and non-wrapping
+ search */
N_("Toggle find mode") },
{ { 'U', 0, 0 }, 0, CMD_TOGGLE_AUTOCENTER, "autocenter-mode",
+ /* translators: the auto center mode always centers the song
+ currently being played */
N_("Toggle auto center mode") },
@@ -201,6 +205,8 @@ static command_definition_t cmds[] = {
{ {'7', F7, 0 }, 0, CMD_SCREEN_LYRICS, "screen-lyrics",
N_("Lyrics screen") },
{ {ESC, 0, 0 }, 0, CMD_INTERRUPT, "lyrics-interrupt",
+ /* translators: interrupt the current background action,
+ e.g. stop loading lyrics from the internet */
N_("Interrupt action") },
{ {'u', 0, 0 }, 0, CMD_LYRICS_UPDATE, "lyrics-update",
N_("Update Lyrics") },
diff --git a/src/conf.c b/src/conf.c
index 6d4bf8876..2b63b9b36 100644
--- a/src/conf.c
+++ b/src/conf.c
@@ -126,6 +126,8 @@ parse_key_definition(char *str)
while (i < len && str[i] != '=' && !g_ascii_isspace(str[i]))
buf[j++] = str[i++];
if( (cmd=get_key_command_from_name(buf)) == CMD_NONE ) {
+ /* the hotkey configuration contains an unknown
+ command */
print_error(_("Unknown command"), buf);
return -1;
}
@@ -138,6 +140,7 @@ parse_key_definition(char *str)
memset(buf, 0, MAX_LINE_LENGTH);
g_strlcpy(buf, str+i, MAX_LINE_LENGTH);
if (*buf == 0) {
+ /* the hotkey configuration line is incomplete */
print_error(_("Incomplete hotkey configuration"), str);
return -1;
}
@@ -166,6 +169,10 @@ parse_timedisplay_type(const char *str)
if (!strcmp(str,"elapsed") || !strcmp(str,"remaining"))
return str;
else {
+ /* translators: ncmpc supports displaying the
+ "elapsed" or "remaining" time of a song being
+ played; in this case, the configuration file
+ contained an invalid setting */
print_error(_("Bad time display type"), str);
return DEFAULT_TIMEDISPLAY_TYPE;
}
@@ -179,6 +186,8 @@ separate_value(char *p)
value = strchr(p, '=');
if (value == NULL) {
+ /* an equals sign '=' was expected while parsing a
+ configuration file line */
fprintf(stderr, "%s\n", _("Missing '='"));
return NULL;
}
@@ -291,6 +300,8 @@ check_screen_list(char *value)
while( tmp && tmp[i] ) {
char *name = g_ascii_strdown(tmp[i], -1);
if (screen_lookup_name(name) == NULL) {
+ /* an unknown screen name was specified in the
+ configuration file */
print_error(_("Unknown screen name"), name);
free(name);
} else {
diff --git a/src/screen_browser.c b/src/screen_browser.c
index 4d911e0d7..6e1637db4 100644
--- a/src/screen_browser.c
+++ b/src/screen_browser.c
@@ -312,6 +312,7 @@ add_directory(mpdclient_t *c, char *dir)
char *dirname;
dirname = utf8_to_locale(dir);
+ /* translators: a directory is being added the to playlist */
screen_status_printf(_("Adding directory %s...\n"), dirname);
doupdate();
g_free(dirname);
diff --git a/src/screen_file.c b/src/screen_file.c
index d10434167..827f16b05 100644
--- a/src/screen_file.c
+++ b/src/screen_file.c
@@ -121,6 +121,9 @@ handle_delete(mpdclient_t *c)
entity = entry->entity;
if( entity->type!=MPD_INFO_ENTITY_TYPE_PLAYLISTFILE ) {
+ /* translators: the "delete" command is only possible
+ for playlists; the user attempted to delete a song
+ or a directory or something else */
screen_status_printf(_("Deleting this item is not possible"));
screen_bell();
return -1;
@@ -133,6 +136,7 @@ handle_delete(mpdclient_t *c)
key = tolower(screen_getch(screen.status_window.w, buf));
g_free(buf);
if( key != YES[0] ) {
+ /* translators: a dialog was aborted by the user */
screen_status_printf(_("Aborted"));
return 0;
}
@@ -140,6 +144,8 @@ handle_delete(mpdclient_t *c)
if( mpdclient_cmd_delete_playlist(c, plf->path) )
return -1;
+ /* translators: MPD deleted the playlist, as requested by the
+ user */
screen_status_printf(_("Playlist deleted"));
return 0;
}
diff --git a/src/screen_lyrics.c b/src/screen_lyrics.c
index dd0553cb5..ce11b4473 100644
--- a/src/screen_lyrics.c
+++ b/src/screen_lyrics.c
@@ -100,6 +100,7 @@ screen_lyrics_callback(const GString *result, G_GNUC_UNUSED void *data)
if (result != NULL)
screen_lyrics_set(result);
else
+ /* translators: no lyrics were found for the song */
screen_status_message (_("No lyrics"));
plugin_stop(current.loader);
@@ -199,7 +200,10 @@ lyrics_title(char *str, size_t size)
{
if (current.loader != NULL) {
snprintf(str, size, "%s (%s)",
- _("Lyrics"), _("loading..."));
+ _("Lyrics"),
+ /* translators: this message is displayed
+ while data is retrieved */
+ _("loading..."));
return str;
} else if (current.artist != NULL && current.title != NULL &&
!screen_text_is_empty(&text)) {
@@ -233,6 +237,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)
+ /* lyrics for the song were saved on hard disk */
screen_status_message (_("Lyrics saved"));
return true;
case CMD_LYRICS_UPDATE: