From: Kalle Wallin Date: Sun, 6 Jun 2004 11:02:26 +0000 (+0000) Subject: i18n - ncmpc is now bilingual (sv) X-Git-Tag: v0.12_alpha1~549 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=ddd95cfda00af6e9093b8958af5679cf9b9cc54f;p=ncmpc.git i18n - ncmpc is now bilingual (sv) git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1349 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- diff --git a/ChangeLog b/ChangeLog index 65701a9..e373718 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2004-06-06 Kalle Wallin + * i18n: ncmpc is now bilingual (sv) + 2004-06-05 Kalle Wallin * Added initial i18n support * Changed directory layout to suit future use of gettext diff --git a/po/ncmpc.pot b/po/ncmpc.pot index 42c1106..88a9dda 100644 --- a/po/ncmpc.pot +++ b/po/ncmpc.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2004-06-05 20:20+0200\n" +"POT-Creation-Date: 2004-06-06 00:24+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -165,7 +165,7 @@ msgid "Saved %s" msgstr "" #: src/screen_play.c:154 -msgid "Playlist" +msgid "Music Player Client - Playlist" msgstr "" #. print a status message @@ -206,7 +206,12 @@ msgstr "" msgid "Adding '%s' to playlist\n" msgstr "" -#: src/screen_file.c:423 +#: src/screen_file.c:369 +#, c-format +msgid "Browse: %s" +msgstr "" + +#: src/screen_file.c:419 msgid "Screen updated!" msgstr "" @@ -282,6 +287,46 @@ msgstr "" msgid "Edit keys for %s" msgstr "" +#: src/screen_help.c:43 +msgid "Keys - Movement" +msgstr "" + +#: src/screen_help.c:62 +msgid "Keys - Global" +msgstr "" + +#: src/screen_help.c:89 +msgid "Keys - Playlist screen" +msgstr "" + +#: src/screen_help.c:91 +msgid "Play" +msgstr "" + +#: src/screen_help.c:94 +msgid "Move song up" +msgstr "" + +#: src/screen_help.c:95 +msgid "Move song down" +msgstr "" + +#: src/screen_help.c:97 +msgid "Center" +msgstr "" + +#: src/screen_help.c:102 +msgid "Keys - Browse screen" +msgstr "" + +#: src/screen_help.c:104 +msgid "Enter directory" +msgstr "" + +#: src/screen_help.c:201 +msgid "Music Player Client - Help" +msgstr "" + #: src/command.c:65 msgid "Play/Enter directory" msgstr "" diff --git a/po/sv.po b/po/sv.po index c6fefcf..cbe5d83 100644 --- a/po/sv.po +++ b/po/sv.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: ncmpc 0.11.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2004-06-05 20:20+0200\n" +"POT-Creation-Date: 2004-06-06 00:24+0200\n" "PO-Revision-Date: 2004-06-05 18:16+0200\n" "Last-Translator: Kalle Wallin \n" "Language-Team: sv \n" @@ -45,15 +45,15 @@ msgstr "Ansluten till %s!" #: src/screen.c:131 msgid ":Help " -msgstr ":Hjälp " +msgstr ":Hjälp " #: src/screen.c:135 msgid ":Playlist " -msgstr ":Spellista " +msgstr ":Spellista " #: src/screen.c:139 msgid ":Browse" -msgstr ":Filer " +msgstr ":Filer " #: src/screen.c:143 msgid "Volume n/a " @@ -66,7 +66,7 @@ msgstr " Volym: %d%%" #: src/screen.c:266 msgid "Stopped! " -msgstr "Stopped!" +msgstr "Stoppad" #: src/screen.c:269 msgid "Playing:" @@ -107,11 +107,11 @@ msgstr "Databasen #: src/screen.c:767 msgid "Shuffled playlist!" -msgstr "Slumpat spellistan!" +msgstr "Slumpsorterat spellistan!" #: src/screen.c:773 msgid "Cleared playlist!" -msgstr "Rensat spellistan!" +msgstr "Rensar spellistan!" #: src/screen.c:800 #, c-format @@ -124,19 +124,19 @@ msgstr "Databasen uppdateras..." #: src/screen.c:824 msgid "Find mode: Wrapped" -msgstr "" +msgstr "Sök runt (börja om)" #: src/screen.c:825 msgid "Find mode: Normal" -msgstr "" +msgstr "Sök normalt (till slut/början)" #: src/screen.c:830 msgid "Auto center mode: On" -msgstr "Auto center mode: Off" +msgstr "Automatisk centrering är på" #: src/screen.c:831 msgid "Auto center mode: Off" -msgstr "Auto center mode: Av" +msgstr "Automatisk centrering är av" #: src/screen_utils.c:36 msgid "Find: " @@ -167,8 +167,8 @@ msgid "Saved %s" msgstr "Sparat %s" #: src/screen_play.c:154 -msgid "Playlist" -msgstr "Spellista" +msgid "Music Player Client - Playlist" +msgstr "[ncmpc] Spellista" #. print a status message #: src/screen_play.c:339 @@ -183,7 +183,7 @@ msgstr "Laddar %s..." #: src/screen_file.c:173 msgid "You can only delete playlists!" -msgstr "Du kan bara radera spellistor!" +msgstr "Du kan endast radera spellistor!" #: src/screen_file.c:180 #, c-format @@ -192,7 +192,7 @@ msgstr "Radera '%s' [y/n] ? " #: src/screen_file.c:187 src/screen_keydef.c:158 msgid "Aborted!" -msgstr "" +msgstr "Avbröt!" #: src/screen_file.c:201 msgid "Playlist deleted!" @@ -201,14 +201,19 @@ msgstr "Spellistan raderad!" #: src/screen_file.c:235 #, c-format msgid "Adding directory %s...\n" -msgstr "Lägger till %s...\n" +msgstr "Lägger till alla filer i %s...\n" #: src/screen_file.c:305 #, c-format msgid "Adding '%s' to playlist\n" msgstr "Lägger till '%s'...\n" -#: src/screen_file.c:423 +#: src/screen_file.c:369 +#, c-format +msgid "Browse: %s" +msgstr "[ncmpc] Filer: %s" + +#: src/screen_file.c:419 msgid "Screen updated!" msgstr "Uppdaterat!" @@ -222,11 +227,11 @@ msgstr "==> Verkst #: src/screen_keydef.c:75 msgid "You have new key bindings!" -msgstr "" +msgstr "Tangentdefinitioner uppdaterade!" #: src/screen_keydef.c:78 msgid "Keybindings unchanged." -msgstr "" +msgstr "Tangentdefinitioner oförändrade!" #: src/screen_keydef.c:89 #, c-format @@ -260,16 +265,16 @@ msgstr "Tangenten %s anv #: src/screen_keydef.c:171 #, c-format msgid "Assigned %s to %s" -msgstr "" +msgstr "%s = %s" #: src/screen_keydef.c:207 #, c-format msgid "%d. Add new key " -msgstr "%d. Lägg till" +msgstr "%d. Lägg till ny tangent" #: src/screen_keydef.c:254 msgid "Welcome to the key editor!" -msgstr "" +msgstr "Här kan du ändra tangentdefinitioner" #: src/screen_keydef.c:270 msgid "Note: Did you forget to 'Apply' your changes?" @@ -277,24 +282,64 @@ msgstr "OBS! Du gl #: src/screen_keydef.c:279 msgid "Edit key bindings" -msgstr "Ändra tangent bindingar" +msgstr "Ändra tangentdefinitioner" #: src/screen_keydef.c:282 #, c-format msgid "Edit keys for %s" -msgstr "Ändra tangenter för %s" +msgstr "Ändra tangenter för kommandot '%s'" + +#: src/screen_help.c:43 +msgid "Keys - Movement" +msgstr "Tangenter - Navigation" + +#: src/screen_help.c:62 +msgid "Keys - Global" +msgstr "Tangenter - Globala" + +#: src/screen_help.c:89 +msgid "Keys - Playlist screen" +msgstr "Tangenter - Spellista" + +#: src/screen_help.c:91 +msgid "Play" +msgstr "Starta/Spela markerad" + +#: src/screen_help.c:94 +msgid "Move song up" +msgstr "Flytta markerad uppåt i spellistan" + +#: src/screen_help.c:95 +msgid "Move song down" +msgstr "Flytta markerad nedåt i spellistan" + +#: src/screen_help.c:97 +msgid "Center" +msgstr "Centrera" + +#: src/screen_help.c:102 +msgid "Keys - Browse screen" +msgstr "Tangenter - Filer" + +#: src/screen_help.c:104 +msgid "Enter directory" +msgstr "Välj bibliotek" + +#: src/screen_help.c:201 +msgid "Music Player Client - Help" +msgstr "[ncmpc] Hjälp" #: src/command.c:65 msgid "Play/Enter directory" -msgstr "" +msgstr "Spela/Välj" #: src/command.c:67 msgid "Pause" -msgstr "" +msgstr "Paus" #: src/command.c:69 msgid "Stop" -msgstr "Stop" +msgstr "Stopp" #: src/command.c:71 msgid "Next track" @@ -306,11 +351,11 @@ msgstr "F #: src/command.c:75 msgid "Seek forward" -msgstr "Sök bakåt" +msgstr "Spola/Sök framåt" #: src/command.c:77 msgid "Seek backward" -msgstr "Sök (bakåt): " +msgstr "Spola/Sök tillbaka" #: src/command.c:80 msgid "Increase volume" @@ -322,11 +367,11 @@ msgstr "Minska volymen" #: src/command.c:85 msgid "Toggle find mode" -msgstr "" +msgstr "Ändra sök inställningar" #: src/command.c:87 msgid "Toggle auto center mode" -msgstr "Auto center mode Av/På" +msgstr "Automatisk centrering På/Av" #: src/command.c:90 msgid "Select/deselect song in playlist" @@ -334,11 +379,11 @@ msgstr "L #: src/command.c:92 msgid "Delete song from playlist" -msgstr "Ta bort ifrån spellistan" +msgstr "Ta bort/Radera" #: src/command.c:94 msgid "Shuffle playlist" -msgstr "Slumpa spellista" +msgstr "Slumpsportera spellista" #: src/command.c:96 msgid "Clear playlist" @@ -374,27 +419,27 @@ msgstr "Flytta ner" #: src/command.c:115 msgid "Move cursor up" -msgstr "Förflytta markören nedåt" +msgstr "Markör nedåt" #: src/command.c:117 msgid "Move cursor down" -msgstr "Förflytta markören uppåt" +msgstr "Markör uppåt" #: src/command.c:119 msgid "Home " -msgstr "" +msgstr "Markören till den första raden" #: src/command.c:121 msgid "End " -msgstr "" +msgstr "Markören till den sista raden" #: src/command.c:123 msgid "Page up" -msgstr "" +msgstr "Markören en skärm uppåt" #: src/command.c:125 msgid "Page down" -msgstr "" +msgstr "Markören en skärm nedåt" #: src/command.c:127 msgid "Forward find" @@ -438,7 +483,7 @@ msgstr "Updatera" #: src/command.c:152 msgid "Key configuration screen" -msgstr "Tangentbindningar" +msgstr "Tangentdefinitioner" #: src/command.c:156 msgid "Quit" @@ -462,23 +507,23 @@ msgstr "" #: src/command.c:185 msgid "Delete" -msgstr "" +msgstr "Del" #: src/command.c:187 msgid "Up" -msgstr "" +msgstr "Uppåtpil" #: src/command.c:189 msgid "Down" -msgstr "" +msgstr "Nedåtpil" #: src/command.c:191 msgid "Left" -msgstr "" +msgstr "Vänsterpil" #: src/command.c:193 msgid "Right" -msgstr "" +msgstr "Högerpil" #: src/command.c:195 msgid "Home" @@ -510,7 +555,7 @@ msgstr "" #: src/command.c:209 msgid "Insert" -msgstr "" +msgstr "Ins" #: src/command.c:395 #, c-format diff --git a/src/screen.c b/src/screen.c index 94b3dc8..4eac178 100644 --- a/src/screen.c +++ b/src/screen.c @@ -709,7 +709,11 @@ screen_cmd(mpd_client_t *c, command_t cmd) switch(cmd) { case CMD_PLAY: - mpd_sendPlayCommand(c->connection, play_get_selected()); + if( screen->mode == SCREEN_PLAY_WINDOW ) + n = play_get_selected(); + else + n = -1; + mpd_sendPlayCommand(c->connection, n); mpd_finishCommand(c->connection); break; case CMD_PAUSE: diff --git a/src/screen.h b/src/screen.h index 00cd355..75852d3 100644 --- a/src/screen.h +++ b/src/screen.h @@ -3,13 +3,6 @@ #include #include "list_window.h" -/* top window headers */ -#define TOP_HEADER_PREFIX "Music Player Client - " -#define TOP_HEADER_PLAY TOP_HEADER_PREFIX "Playlist" -#define TOP_HEADER_FILE TOP_HEADER_PREFIX "Browse" -#define TOP_HEADER_HELP TOP_HEADER_PREFIX "Help " -#define TOP_HEADER_SEARCH TOP_HEADER_PREFIX "Search " - /* minumum window size */ #define SCREEN_MIN_COLS 14 #define SCREEN_MIN_ROWS 5 diff --git a/src/screen_file.c b/src/screen_file.c index be5e1eb..f86e8df 100644 --- a/src/screen_file.c +++ b/src/screen_file.c @@ -366,11 +366,7 @@ file_title(void) char *tmp; tmp = utf8_to_locale(basename(mpc->cwd)); - snprintf(buf, TITLESIZE, - "%s : %s ", - _(TOP_HEADER_FILE) , - tmp - ); + snprintf(buf, TITLESIZE, _("Browse: %s"), tmp); g_free(tmp); return buf; diff --git a/src/screen_help.c b/src/screen_help.c index 960638d..ced6606 100644 --- a/src/screen_help.c +++ b/src/screen_help.c @@ -22,6 +22,7 @@ #include #include "config.h" +#include "ncmpc.h" #include "libmpdclient.h" #include "mpc.h" #include "command.h" @@ -39,8 +40,8 @@ typedef struct static help_text_row_t help_text[] = { - { 1, CMD_NONE, " Movement keys " }, - { 0, CMD_NONE, " -----------------" }, + { 1, CMD_NONE, N_("Keys - Movement") }, + { 2, CMD_NONE, NULL }, { 0, CMD_LIST_PREVIOUS, NULL }, { 0, CMD_LIST_NEXT, NULL }, { 0, CMD_LIST_PREVIOUS_PAGE, NULL }, @@ -58,8 +59,8 @@ static help_text_row_t help_text[] = { 0, CMD_NONE, NULL }, { 0, CMD_NONE, NULL }, - { 1, CMD_NONE, " General keys " }, - { 0, CMD_NONE, " ----------------" }, + { 1, CMD_NONE, N_("Keys - Global") }, + { 2, CMD_NONE, NULL }, { 0, CMD_STOP, NULL }, { 0, CMD_PAUSE, NULL }, { 0, CMD_TRACK_NEXT, NULL }, @@ -69,56 +70,57 @@ static help_text_row_t help_text[] = { 0, CMD_VOLUME_DOWN, NULL }, { 0, CMD_VOLUME_UP, NULL }, { 0, CMD_NONE, NULL }, - { 0, CMD_SHUFFLE, NULL }, { 0, CMD_REPEAT, NULL }, { 0, CMD_RANDOM, NULL }, { 0, CMD_CROSSFADE, NULL }, + { 0, CMD_SHUFFLE, NULL }, { 0, CMD_DB_UPDATE, NULL }, { 0, CMD_NONE, NULL }, + { 0, CMD_LIST_FIND, NULL }, + { 0, CMD_LIST_RFIND, NULL }, + { 0, CMD_LIST_FIND_NEXT, NULL }, + { 0, CMD_LIST_RFIND_NEXT, NULL }, + { 0, CMD_TOGGLE_FIND_WRAP, NULL }, + { 0, CMD_NONE, NULL }, { 0, CMD_QUIT, NULL }, { 0, CMD_NONE, NULL }, { 0, CMD_NONE, NULL }, - { 1, CMD_NONE, " Keys - Playlist screen " }, - { 0, CMD_NONE, " --------------------------" }, - { 0, CMD_PLAY, "Play" }, + { 1, CMD_NONE, N_("Keys - Playlist screen") }, + { 2, CMD_NONE, NULL }, + { 0, CMD_PLAY, N_("Play") }, { 0, CMD_DELETE, NULL }, { 0, CMD_CLEAR, NULL }, - { 0, CMD_LIST_MOVE_UP, "Move song up" }, - { 0, CMD_LIST_MOVE_DOWN, "Move song down" }, + { 0, CMD_LIST_MOVE_UP, N_("Move song up") }, + { 0, CMD_LIST_MOVE_DOWN, N_("Move song down") }, { 0, CMD_SAVE_PLAYLIST, NULL }, - { 0, CMD_SCREEN_UPDATE, "Center" }, + { 0, CMD_SCREEN_UPDATE, N_("Center") }, { 0, CMD_TOGGLE_AUTOCENTER, NULL }, { 0, CMD_NONE, NULL }, { 0, CMD_NONE, NULL }, - { 1, CMD_NONE, " Keys - Browse screen " }, - { 0, CMD_NONE, " ------------------------" }, - { 0, CMD_PLAY, "Enter directory" }, - { 0, CMD_SELECT, NULL }, - { 0, CMD_DELETE, NULL }, - { 0, CMD_SCREEN_UPDATE, NULL }, - - { 0, CMD_NONE, NULL }, - { 0, CMD_NONE, NULL }, - { 1, CMD_NONE, " Find keys " }, - { 0, CMD_NONE, " -------------" }, - { 0, CMD_LIST_FIND, NULL }, - { 0, CMD_LIST_RFIND, NULL }, - { 0, CMD_LIST_FIND_NEXT, NULL }, - { 0, CMD_LIST_RFIND_NEXT, NULL }, - { 0, CMD_TOGGLE_FIND_WRAP, NULL }, + { 1, CMD_NONE, N_("Keys - Browse screen") }, + { 2, CMD_NONE, NULL }, + { 0, CMD_PLAY, N_("Enter directory") }, + { 0, CMD_SELECT, NULL }, + { 0, CMD_DELETE, NULL }, + { 0, CMD_SCREEN_UPDATE, NULL }, { 0, CMD_NONE, NULL }, { 0, CMD_NONE, NULL }, - { 1, CMD_NONE, " ncmpc build information " }, - { 0, CMD_NONE, " ---------------------------" }, + { 1, CMD_NONE, "ncmpc build information" }, + { 2, CMD_NONE, NULL }, { 0, CMD_NONE, " Version : " VERSION }, { 0, CMD_NONE, " Configuration dirs : ~/.ncmpc, " SYSCONFDIR "/" PACKAGE }, +#ifdef ENABLE_NLS + { 0, CMD_NONE, "NLS support : yes" }, +#else + { 0, CMD_NONE, "NLS support : no" }, +#endif #ifdef ENABLE_KEYDEF_SCREEN - { 0, CMD_NONE, " Key Editor : yes" }, + { 0, CMD_NONE, "Key Editor : yes" }, #else - { 0, CMD_NONE, " Key Editor : no" }, + { 0, CMD_NONE, "Key Editor : no" }, #endif { 0, CMD_NONE, NULL }, @@ -148,15 +150,25 @@ list_callback(int index, int *highlight, void *data) if( help_text[index].command == CMD_NONE ) { if( help_text[index].text ) - return help_text[index].text; - else - return " "; + snprintf(buf, 256, "%28s", _(help_text[index].text)); + else + if( help_text[index].highlight == 2 ) + { + int i; + + for(i=3; i