summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 156229d)
raw | patch | inline | side by side (parent: 156229d)
author | Kalle Wallin <kaw@linux.se> | |
Sun, 6 Jun 2004 11:02:26 +0000 (11:02 +0000) | ||
committer | Kalle Wallin <kaw@linux.se> | |
Sun, 6 Jun 2004 11:02:26 +0000 (11:02 +0000) |
ChangeLog | patch | blob | history | |
po/ncmpc.pot | patch | blob | history | |
po/sv.po | patch | blob | history | |
src/screen.c | patch | blob | history | |
src/screen.h | patch | blob | history | |
src/screen_file.c | patch | blob | history | |
src/screen_help.c | patch | blob | history | |
src/screen_keydef.c | patch | blob | history | |
src/screen_play.c | patch | blob | history |
diff --git a/ChangeLog b/ChangeLog
index 65701a93dfe50e43955ff5506db6026340e01112..e37371848dd63d147c8afc3f457f3b4d75b09b19 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
+2004-06-06 Kalle Wallin <kaw@linux.se>
+ * i18n: ncmpc is now bilingual (sv)
+
2004-06-05 Kalle Wallin <kaw@linux.se>
* Added initial i18n support
* Changed directory layout to suit future use of gettext
diff --git a/po/ncmpc.pot b/po/ncmpc.pot
index 42c1106071dd7e144d36bf343b26520c1ba71540..88a9dda57f16656ba89db1e66dba2527633fd7e3 100644 (file)
--- a/po/ncmpc.pot
+++ b/po/ncmpc.pot
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 <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
msgstr ""
#: src/screen_play.c:154
-msgid "Playlist"
+msgid "Music Player Client - Playlist"
msgstr ""
#. print a status message
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 ""
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 c6fefcf843b463ba2034241214e4b404d9bd5630..cbe5d830b2f78b1e0e9016359b5924f990544181 100644 (file)
--- a/po/sv.po
+++ b/po/sv.po
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 <kaw@linux.se>\n"
"Language-Team: sv <sv@li.org>\n"
#: 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 "
#: src/screen.c:266
msgid "Stopped! "
-msgstr "Stopped!"
+msgstr "Stoppad"
#: src/screen.c:269
msgid "Playing:"
#: 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
#: 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: "
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
#: 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
#: src/screen_file.c:187 src/screen_keydef.c:158
msgid "Aborted!"
-msgstr ""
+msgstr "Avbröt!"
#: src/screen_file.c:201
msgid "Playlist deleted!"
#: 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!"
#: 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
#: 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?"
#: 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"
#: 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"
#: 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"
#: 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"
#: 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"
#: src/command.c:152
msgid "Key configuration screen"
-msgstr "Tangentbindningar"
+msgstr "Tangentdefinitioner"
#: src/command.c:156
msgid "Quit"
#: 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"
#: 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 94b3dc860cdaaa90e589d43e1191e37b79eb55b4..4eac178b7965592667c632c76d6321b18f1ebcb2 100644 (file)
--- a/src/screen.c
+++ b/src/screen.c
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 00cd35530ab0b656bf722761d1378c0af661b817..75852d36e738da2994e571002ccce437599b1afa 100644 (file)
--- a/src/screen.h
+++ b/src/screen.h
#include <ncurses.h>
#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 be5e1eb9e122d99421b476cdf750ae93543aa575..f86e8df95d16f2ee6c20663b4673d3b6668e2c77 100644 (file)
--- a/src/screen_file.c
+++ b/src/screen_file.c
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 960638d650a3f41396628f76abb86c0cb593f2ca..ced66064a7f42fafec73cb6d0ac81aaedef301f4 100644 (file)
--- a/src/screen_help.c
+++ b/src/screen_help.c
#include <ncurses.h>
#include "config.h"
+#include "ncmpc.h"
#include "libmpdclient.h"
#include "mpc.h"
#include "command.h"
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 },
{ 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 },
{ 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 },
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<COLS-3 && i<256; i++)
+ buf[i]='-';
+ buf[i] = '\0';
+ }
+ else
+ strcpy(buf, " ");
+ return buf;
}
if( help_text[index].text )
snprintf(buf, 256,
"%20s : %s ",
get_key_names(help_text[index].command, TRUE),
- help_text[index].text);
+ _(help_text[index].text));
else
snprintf(buf, 256,
"%20s : %s ",
static char *
help_title(void)
{
- return (TOP_HEADER_PREFIX "Help");
+ return _("Music Player Client - Help");
}
static void
diff --git a/src/screen_keydef.c b/src/screen_keydef.c
index 3e2c921bcdd94944a76c3b2910f9babd8e5c28da..16311af56b73c6aa75c25e1dc4c2f13e8b8d0140 100644 (file)
--- a/src/screen_keydef.c
+++ b/src/screen_keydef.c
static char buf[BUFSIZE];
if( subcmd<0 )
- return _(TOP_HEADER_PREFIX "Edit key bindings");
+ return _("Edit key bindings");
snprintf(buf, BUFSIZE,
- _(TOP_HEADER_PREFIX "Edit keys for %s"),
+ _("Edit keys for %s"),
cmds[subcmd].name);
return buf;
}
diff --git a/src/screen_play.c b/src/screen_play.c
index b4ff58cbe15c55ca4cd6df8d85af625139c12d24..8ee1c4902d4f257d200c7680e40601e5ebb39e7b 100644 (file)
--- a/src/screen_play.c
+++ b/src/screen_play.c
static char *
play_title(void)
{
- return _(TOP_HEADER_PREFIX "Playlist");
+ return _("Music Player Client - Playlist");
}
static void