[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[tyndur-devel] [PATCH] Uebersetzung fuer ftp



+ Uebersetzung fuer ftp
! Boeser Typo

Signed-off-by: David Kolossa <dickhuuhn@xxxxxxxxxxxxxx>
---
 src/modules/c/ftp/Makefile.all   |    2 +-
 src/modules/c/ftp/command.c      |   63 +++++++++++++-----------
 src/modules/c/ftp/ftp.c          |   23 ++++++---
 src/modules/c/ftp/help.c         |   54 --------------------
 src/modules/c/ftp/lang/lang_en.c |  100 ++++++++++++++++++++++++++++++++++++++
 src/modules/c/ftp/lang/resstr.h  |   44 +++++++++++++++++
 src/modules/c/ftp/main.c         |   40 ++++++++++++---
 7 files changed, 226 insertions(+), 100 deletions(-)
 delete mode 100644 src/modules/c/ftp/help.c
 create mode 100644 src/modules/c/ftp/lang/lang_en.c
 create mode 100644 src/modules/c/ftp/lang/resstr.h

diff --git a/src/modules/c/ftp/Makefile.all b/src/modules/c/ftp/Makefile.all
index 54bf0d0..8f2b1fa 100644
--- a/src/modules/c/ftp/Makefile.all
+++ b/src/modules/c/ftp/Makefile.all
@@ -2,6 +2,6 @@ shopt -s extglob
 source $LOST_BUILDMK_ROOT/config.sh
 
 echo "LD   $1/apps/ftp"
-$LOST_TOOLS_LD -oftp $LDSCRIPT *.o --start-group $2 --end-group
+$LOST_TOOLS_LD -z muldefs -oftp $LDSCRIPT *.o lang/*.o --start-group $2 --end-group
 
 mv ftp $1/apps/
diff --git a/src/modules/c/ftp/command.c b/src/modules/c/ftp/command.c
index 56fdde1..e275c74 100644
--- a/src/modules/c/ftp/command.c
+++ b/src/modules/c/ftp/command.c
@@ -1,5 +1,5 @@
 /**
- * Copyright (c) 2009 The tyndur Project. All rights reserved.
+ * Copyright (c) 2009, 2011 The tyndur Project. All rights reserved.
  *
  * This code is derived from software contributed to the tyndur Project
  * by Paul Lange.
@@ -43,6 +43,9 @@
 #include <sys/stat.h>
 #include <readline/readline.h>
 
+#define TMS_MODULE ftp
+#include <tms.h>
+
 #include "ftp.h"
 
 #define BLOCK_128K 131072
@@ -59,12 +62,13 @@ void ftp_user(void)
 
     // falls keine Verbindung besteht, abbrechen
     if (handle == NULL) {
-        puts("\033[1;37mFehler: keine Serververbindung vorhanden..."
-             "\033[0m");
+        puts(TMS(no_connection, "\033[1;37mFehler: keine Serververbindung "
+            "vorhanden...\033[0m"));
         return;
     }
 
-    asprintf(&prompt, "\033[1;37mBenutzer (%s): \033[0m", host);
+    asprintf(&prompt, TMS(prompt_user, "\033[1;37mBenutzer (%s): \033[0m"),
+        host);
     input = readline(prompt);
     free(prompt);
 
@@ -78,7 +82,7 @@ void ftp_user(void)
     response();
 
     free(input);
-    input = readline("\033[1;37mPasswort: \033[0m");
+    input = readline(TMS(prompt_password, "\033[1;37mPasswort: \033[0m"));
 
     for (; isspace(*input); input++);
     for (c = input; !isspace(*c) && *c; c++);
@@ -100,8 +104,8 @@ void ftp_ls(void)
     char buffer[BLOCK_128K];
 
     if (handle == NULL) {
-        puts("\033[1;37mFehler: keine Serververbindung vorhanden..."
-             "\033[0m");
+        puts(TMS(no_connection, "\033[1;37mFehler: keine Serververbindung "
+            "vorhanden...\033[0m"));
         return;
     }
 
@@ -115,7 +119,7 @@ void ftp_ls(void)
     // das verbraucht noch viel Zeit, da tyndur lange braucht für das fclose()
     fclose(data_handle);
     response();
-    puts("\033[1;37mDatenverbindung beendet\033[0m");
+    puts(TMS(data_disconnect, "\033[1;37mDatenverbindung beendet\033[0m"));
 }
 
 
@@ -135,8 +139,8 @@ void ftp_get(char* pathname)
     size_t count;
 
     if (handle == NULL) {
-        puts("\033[1;37mFehler: keine Serververbindung vorhanden..."
-             "\033[0m");
+        puts(TMS(no_connection, "\033[1;37mFehler: keine Serververbindung "
+            "vorhanden...\033[0m"));
         return;
     }
 
@@ -160,7 +164,8 @@ void ftp_get(char* pathname)
         if (strncmp("550", string, 3) == 0) {
             fclose(file_handle);
             fclose(data_handle);
-            puts("\033[1;37mDatenverbindung beendet\033[0m");
+            puts(TMS(data_disconnect, "\033[1;37mDatenverbindung beendet"
+                "\033[0m"));
             return;
         }
         line_end = false;
@@ -179,7 +184,7 @@ void ftp_get(char* pathname)
     fclose(file_handle);
     fclose(data_handle);
     response();
-    puts("\033[1;37mDatenverbindung beendet\033[0m");
+    puts(TMS(data_disconnect, "\033[1;37mDatenverbindung beendet\033[0m"));
 }
 
 
@@ -197,8 +202,8 @@ void ftp_put(char* pathname)
     size_t count;
 
     if (handle == NULL) {
-        puts("\033[1;37mFehler: keine Serververbindung vorhanden..."
-             "\033[0m");
+        puts(TMS(no_connection, "\033[1;37mFehler: keine Serververbindung "
+            "vorhanden...\033[0m"));
         return;
     }
 
@@ -219,7 +224,7 @@ void ftp_put(char* pathname)
     fclose(file_handle);
     fclose(data_handle);
     response();
-    puts("\033[1;37mDatenverbindung beendet\033[0m");
+    puts(TMS(data_disconnect, "\033[1;37mDatenverbindung beendet\033[0m"));
 }
 
 
@@ -231,8 +236,8 @@ void ftp_put(char* pathname)
 void ftp_mkdir(const char* pathname)
 {
     if (handle == NULL) {
-        puts("\033[1;37mFehler: keine Serververbindung vorhanden..."
-             "\033[0m");
+        puts(TMS(no_connection, "\033[1;37mFehler: keine Serververbindung "
+            "vorhanden...\033[0m"));
         return;
     }
 
@@ -250,8 +255,8 @@ void ftp_mkdir(const char* pathname)
 void ftp_rm(const char* pathname)
 {
     if (handle == NULL) {
-        puts("\033[1;37mFehler: keine Serververbindung vorhanden..."
-             "\033[0m");
+        puts(TMS(no_connection, "\033[1;37mFehler: keine Serververbindung "
+            "vorhanden...\033[0m"));
         return;
     }
 
@@ -269,8 +274,8 @@ void ftp_rm(const char* pathname)
 void ftp_rmdir(const char* pathname)
 {
     if (handle == NULL) {
-        puts("\033[1;37mFehler: keine Serververbindung vorhanden..."
-             "\033[0m");
+        puts(TMS(no_connection, "\033[1;37mFehler: keine Serververbindung "
+            "vorhanden...\033[0m"));
         return;
     }
 
@@ -288,8 +293,8 @@ void ftp_rmdir(const char* pathname)
 void ftp_cd(const char* pathname)
 {
     if (handle == NULL) {
-        puts("\033[1;37mFehler: keine Serververbindung vorhanden..."
-             "\033[0m");
+        puts(TMS(no_connection, "\033[1;37mFehler: keine Serververbindung "
+            "vorhanden...\033[0m"));
         return;
     }
 
@@ -305,8 +310,8 @@ void ftp_cd(const char* pathname)
 void ftp_cdup(void)
 {
     if (handle == NULL) {
-        puts("\033[1;37mFehler: keine Serververbindung vorhanden..."
-             "\033[0m");
+        puts(TMS(no_connection, "\033[1;37mFehler: keine Serververbindung "
+            "vorhanden...\033[0m"));
         return;
     }
 
@@ -322,8 +327,8 @@ void ftp_cdup(void)
 void ftp_pwd(void)
 {
     if (handle == NULL) {
-        puts("\033[1;37mFehler: keine Serververbindung vorhanden..."
-             "\033[0m");
+        puts(TMS(no_connection, "\033[1;37mFehler: keine Serververbindung "
+            "vorhanden...\033[0m"));
         return;
     }
 
@@ -339,8 +344,8 @@ void ftp_pwd(void)
 void ftp_sys(void)
 {
     if (handle == NULL) {
-        puts("\033[1;37mFehler: keine Serververbindung vorhanden..."
-             "\033[0m");
+        puts(TMS(no_connection, "\033[1;37mFehler: keine Serververbindung "
+            "vorhanden...\033[0m"));
         return;
     }
 
diff --git a/src/modules/c/ftp/ftp.c b/src/modules/c/ftp/ftp.c
index 3346e56..8988806 100644
--- a/src/modules/c/ftp/ftp.c
+++ b/src/modules/c/ftp/ftp.c
@@ -1,5 +1,5 @@
 /**
- * Copyright (c) 2009 The tyndur Project. All rights reserved.
+ * Copyright (c) 2009, 2011 The tyndur Project. All rights reserved.
  *
  * This code is derived from software contributed to the tyndur Project
  * by Paul Lange.
@@ -41,6 +41,9 @@
 #include <string.h>
 #include <readline/readline.h>
 
+#define TMS_MODULE ftp
+#include <tms.h>
+
 #include "ftp.h"
 
 #define COMMAND_PORT 21
@@ -142,7 +145,7 @@ void ftp_connect(char* hostname)
     char* c;
 
     if (handle != NULL) return;
-    puts("\033[1;37mVerbinde...\033[0m");
+    puts(TMS(connecting, "\033[1;37mVerbinde...\033[0m"));
 
     // tcpip-Pfad erzeugen
     asprintf(&host_path, "tcpip:/%s:%d", hostname, COMMAND_PORT);
@@ -150,14 +153,17 @@ void ftp_connect(char* hostname)
     free(host_path);
 
     if (!handle) {
-        puts("\033[1;37mFehler: Host nicht erreichbar!\033[0m");
+        puts(TMS(host_not_reachable, "\033[1;37mFehler: Host nicht "
+            "erreichbar!\033[0m"));
         handle = NULL;
         return;
     }
-    printf("\033[1;37mVerbunden mit %s, warte auf Antwort...\033[0m\n", host);
+    printf(TMS(connected, "\033[1;37mVerbunden mit %s, warte auf "
+        "Antwort...\033[0m\n"), host);
     response();
 
-    asprintf(&prompt, "\033[1;37mBenutzer (%s): \033[0m", host);
+    asprintf(&prompt, TMS(prompt_user, "\033[1;37mBenutzer (%s): \033[0m"),
+        host);
     input = readline(prompt);
     free(prompt);
 
@@ -170,7 +176,7 @@ void ftp_connect(char* hostname)
     fflush(handle);
     response();
 
-    input = readline("\033[1;37mPasswort: \033[0m");
+    input = readline(TMS(prompt_password, "\033[1;37mPasswort: \033[0m"));
 
     for (; isspace(*input); input++);
     for (c = input; !isspace(*c) && *c; c++);
@@ -194,7 +200,7 @@ void ftp_disconnect(void)
     request("QUIT");
     fclose(handle);
     handle = NULL;
-    puts("\033[1;37mVerbindung getrennt...\033[0m");
+    puts(TMS(disconnected, "\033[1;37mVerbindung getrennt...\033[0m"));
 }
 
 
@@ -213,7 +219,8 @@ FILE* ftp_data_connect(void)
     int i = 0;
     FILE* data_handle = NULL;
 
-    puts("\033[1;37mDatenverbindung wird geöffnet...\033[0m");
+    puts(TMS(data_connect, "\033[1;37mDatenverbindung wird geöffnet..."
+        "\033[0m"));
     fprintf(handle, "%s\r\n", "PASV");
     fflush(handle);
 
diff --git a/src/modules/c/ftp/help.c b/src/modules/c/ftp/help.c
deleted file mode 100644
index b7dbf59..0000000
--- a/src/modules/c/ftp/help.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- * Copyright (c) 2009 The tyndur Project. All rights reserved.
- *
- * This code is derived from software contributed to the tyndur Project
- * by Paul Lange.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *     This product includes software developed by the tyndur Project
- *     and its contributors.
- * 4. Neither the name of the tyndur Project nor the names of its
- *    contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-const char* help =
-    "FTP-Client Befehlsliste:\n\n"
-    "ascii   - ascii Mode einschalten\n"
-    "binary  - binary Mode einschalten\n"
-    "bye     - schließt die Verbindung zum Server und beendet den FTP-Client\n"
-    "cd      - [Pfad] wechseln des Verzeichnisses auf dem Server\n"
-    "cdup    - wechselt zum Stammverzeichniss auf dem Server\n"
-    "clear   - löscht den Inhalt des Terminals\n"
-    "close   - schließt die Verbindung zum Server\n"
-    "get     - [Pfad+Dateiname] holt eine Datei vom Server\n"
-    "help    - zeigt diese Hilfe an\n"
-    "mkdir   - [Pfad+Ordnername] erstellt einen Ordner auf dem Server\n"
-    "open    - [ftp.name.net] öffnet eine Verbindung zu einem Server\n"
-    "put     - [Pfad+Dateiname] speichert eine Datei auf dem Server\n"
-    "pwd     - zeigt das akutell geoeffnete Verzeichniss auf dem Server an\n"
-    "rm      - [Pfad+Dateiname] löscht die Datei auf dem Server\n"
-    "rmdir   - [Pfad+Verzeichnisname] löscht ein Verzeichnis auf dem Server\n"
-    "system  - zeigt den Namen des Betriebssystems vom Server an\n"
-    "user    - einloggen mit Benutzername und Passwort\n";
diff --git a/src/modules/c/ftp/lang/lang_en.c b/src/modules/c/ftp/lang/lang_en.c
new file mode 100644
index 0000000..87845f3
--- /dev/null
+++ b/src/modules/c/ftp/lang/lang_en.c
@@ -0,0 +1,100 @@
+/*
+ * Copyright (c) 2011 The tyndur Project. All rights reserved.
+ *
+ * This code is derived from software contributed to the tyndur Project
+ * by Kevin Wolf.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <tms.h>
+#include "resstr.h"
+
+static int get_number(int n)
+{
+    return (n == 1 ? 0 : 1);
+}
+
+static const struct tms_strings dict[] = {
+    {&__tms_ftp_host_not_reachable,
+    "\033[1;37mError: Host not reachable\033[0m"},
+
+    {&__tms_ftp_connecting,
+    "\033[1;37mConnecting...\033[0m"},
+
+    {&__tms_ftp_connected,
+    "\033[1;37mConnected with %s, waiting for reply...\033[0m\n"},
+
+    {&__tms_ftp_prompt_user,
+    "\033[1;37mUser (%s): \033[0m"},
+
+    {&__tms_ftp_prompt_password,
+    "\033[1;37mPassword: \033[0m"},
+
+    {&__tms_ftp_disconnected,
+    "\033[1;37mDisconnected...\033[0m"},
+
+    {&__tms_ftp_data_connect,
+    "\033[1;37mOpening data connection...\033[0m"},
+
+    {&__tms_ftp_data_disconnect,
+    "\033[1;37mData connection terminated\033[0m"},
+
+    {&__tms_ftp_no_connection,
+    "\033[1;37mError: Not connected...\033[0m"},
+
+    {&__tms_ftp_usage,
+    "FTP-Client command list:\n\n"
+    "ascii   - switch to ascii mode\n"
+    "binary  - switch to binary mode\n"
+    "bye     - close any open server connection and quit\n"
+    "cd      - change active remote directory\n"
+    "cdup    - change to remote root directory\n"
+    "clear   - clear the terminal\n"
+    "close   - close server connection\n"
+    "get     - [path+file name] get a file from the server\n"
+    "help    - show this help text\n"
+    "mkdir   - [path+dir name] create a directory on the server\n"
+    "open    - [ftp.name.net] open a connection to a server\n"
+    "put     - [path+file name] save a file on the server\n"
+    "pwd     - show current working directory\n"
+    "rm      - [path+file name] delete a file on the server\n"
+    "rmdir   - [path+dir name] delete a directory on the server\n"
+    "system  - show the name of the remote operating system\n"
+    "user    - log in with user and password\n"},
+
+    {&__tms_ftp_type_help,
+    "\033[1;37mType `help` to get a list of available commands!\033[0m"},
+
+    {0,
+    0},
+};
+
+static const struct tms_lang lang = {
+    .lang = "en",
+    .numbers = 2,
+    .get_number = get_number,
+    .strings = dict,
+};
+
+LANGUAGE(&lang)
+
diff --git a/src/modules/c/ftp/lang/resstr.h b/src/modules/c/ftp/lang/resstr.h
new file mode 100644
index 0000000..e245427
--- /dev/null
+++ b/src/modules/c/ftp/lang/resstr.h
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2010 The tyndur Project. All rights reserved.
+ *
+ * This code is derived from software contributed to the tyndur Project
+ * by Kevin Wolf.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL;
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO;
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY;
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef RESSTR_H
+#define RESSTR_H
+
+extern void* __tms_ftp_host_not_reachable;
+extern void* __tms_ftp_connecting;
+extern void* __tms_ftp_connected;
+extern void* __tms_ftp_prompt_user;
+extern void* __tms_ftp_prompt_password;
+extern void* __tms_ftp_disconnected;
+extern void* __tms_ftp_data_connect;
+extern void* __tms_ftp_data_disconnect;
+extern void* __tms_ftp_no_connection;
+extern void* __tms_ftp_usage;
+extern void* __tms_ftp_type_help;
+
+#endif
diff --git a/src/modules/c/ftp/main.c b/src/modules/c/ftp/main.c
index cd71d92..98f06bc 100644
--- a/src/modules/c/ftp/main.c
+++ b/src/modules/c/ftp/main.c
@@ -1,5 +1,5 @@
 /**
- * Copyright (c) 2009 The tyndur Project. All rights reserved.
+ * Copyright (c) 2009, 2011 The tyndur Project. All rights reserved.
  *
  * This code is derived from software contributed to the tyndur Project
  * by Paul Lange.
@@ -41,6 +41,9 @@
 #include <readline/readline.h>
 #include <types.h>
 
+#define TMS_MODULE ftp
+#include <tms.h>
+
 #include "command.h"
 #include "ftp.h"
 
@@ -49,6 +52,8 @@ FILE* handle;
 
 int main(int argc, char* argv[])
 {
+    tms_init();
+
     bool prgm_end = false;
     char* input;
 
@@ -100,7 +105,26 @@ int main(int argc, char* argv[])
                 ftp_disconnect();
                 prgm_end = true;
             } else if (!strncmp(input, "help", 4)) {
-                printf(help);
+                printf(TMS(usage,
+                  "FTP-Client Befehlsliste:\n\n"
+                  "ascii   - ascii Mode einschalten\n"
+                  "binary  - binary Mode einschalten\n"
+                  "bye     - schließt die Verbindung zum Server und beendet den FTP-Client\n"
+                  "cd      - [Pfad] wechseln des Verzeichnisses auf dem Server\n"
+                  "cdup    - wechselt zum Stammverzeichniss auf dem Server\n"
+                  "clear   - löscht den Inhalt des Terminals\n"
+                  "close   - schließt die Verbindung zum Server\n"
+                  "get     - [Pfad+Dateiname] holt eine Datei vom Server\n"
+    	          "help    - zeigt diese Hilfe an\n"
+                  "mkdir   - [Pfad+Ordnername] erstellt einen Ordner auf dem Server\n"
+    	          "open    - [ftp.name.net] öffnet eine Verbindung zu einem Server\n"
+                  "put     - [Pfad+Dateiname] speichert eine Datei auf dem Server\n"
+                  "pwd     - zeigt das akutell geoeffnete Verzeichniss auf dem Server an\n"
+                  "rm      - [Pfad+Dateiname] löscht die Datei auf dem Server\n"
+                  "rmdir   - [Pfad+Verzeichnisname] löscht ein Verzeichnis auf dem Server\n"
+                  "system  - zeigt den Namen des Betriebssystems vom Server an\n"
+                  "user    - einloggen mit Benutzername und Passwort\n")
+                );
             } else if (!strncmp(input, "close", 5)) {
                 ftp_disconnect();
             } else if (!strncmp(input, "user", 4)) {
@@ -118,21 +142,21 @@ int main(int argc, char* argv[])
             } else if (!strncmp(input, "ascii", 5)) {
                 // falls keine Verbindung besteht, abbrechen
                 if (handle == NULL) {
-                    puts("\033[1;37mFehler: keine Serververbindung vorhanden..."
-                        "\033[0m");
+                    puts(TMS(no_connection, "\033[1;37mFehler: keine "
+                        "Serververbindung vorhanden...\033[0m"));
                     continue;
                 }
                 request("TYPE A");
             } else if (!strncmp(input, "binary", 6)) {
                 if (handle == NULL) {
-                    puts("\033[1;37mFehler: keine Serververbindung vorhanden..."
-                        "\033[0m");
+                    puts(TMS(no_connection, "\033[1;37mFehler: keine "
+                        "Serververbindung vorhanden...\033[0m"));
                     continue;
                 }
                 request("TYPE I");
             } else {
-                puts("\033[1;37mGeben sie help ein um eine Liste aller Befehle "
-                        "zu erhalten!\033[0m");
+                puts(TMS(type_help, "\033[1;37mGeben Sie help ein um eine "
+                    "Liste aller Befehle zu erhalten!\033[0m"));
             }
 
             free(input);
-- 
1.7.0.4

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil