diff options
author | methodus <methodus@web.de> | 2012-11-01 17:05:33 +0100 |
---|---|---|
committer | methodus <methodus@web.de> | 2012-11-01 17:05:33 +0100 |
commit | 9d9684f5bcfaabd05f4d41b0c7d2a35d7b1a489c (patch) | |
tree | 5f7d21d1d7113b0ff3da6a8397670113ae061204 | |
parent | 36698ebe1b5dfa6f95041b168c9218d66ee0eb03 (diff) | |
download | vdr-plugin-upnp-9d9684f5bcfaabd05f4d41b0c7d2a35d7b1a489c.tar.gz vdr-plugin-upnp-9d9684f5bcfaabd05f4d41b0c7d2a35d7b1a489c.tar.bz2 |
Added german and finnish translation and some fixes. Thanks to Rolf Ahrenberg
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | HISTORY | 9 | ||||
-rw-r--r-- | Makefile | 13 | ||||
-rw-r--r-- | po/de.po | 230 | ||||
-rw-r--r-- | po/fi_FI.po | 212 | ||||
-rw-r--r-- | server/server.cpp | 12 | ||||
-rw-r--r-- | upnp.cpp | 12 | ||||
-rw-r--r-- | upnp.h | 4 |
8 files changed, 478 insertions, 16 deletions
@@ -18,6 +18,8 @@ libvdr-upnp.so* *.exe *.o *.so +po/*.pot +po/*.mo # Packages # ############ @@ -1,6 +1,15 @@ VDR Plugin 'upnp' Revision History ---------------------------------- + - New: Initial support for audio recordings, i.e. recordings from radio + stations. Live radio stations will follow very soon. + - Fix: SortCriteria should work now. + - New: Added some makefile tweaks. + Thanks to Rolf Ahrenberg + - New: Added Finnish translation. + Thanks to Rolf Ahrenberg + - New: Added hostname to friendlyName of the server. + Thanks to Rolf Ahrenberg - New: Makefiles reviewed and almost completely rewritten to avoid redundancies. Thanks to Lucian Muresan @@ -50,8 +50,7 @@ OBJS = $(PLUGIN).o \ common/ixml.o \ media/profile.o \ media/mediaManager.o \ - media/pluginManager.o \ - $(TNTOBJ) + media/pluginManager.o LIBS += -lupnp -lcxxtools -ltntnet -ltntdb -ldl @@ -73,7 +72,7 @@ all: libvdr-$(PLUGIN).so i18n MAKEDEP = $(CXX) -MM -MG DEPFILE = .dependencies $(DEPFILE): Makefile - @$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.cpp) > $@ + @$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.cpp) $(TNTOBJ:%.o=%.cpp) > $@ -include $(DEPFILE) @@ -88,7 +87,7 @@ I18Npot = $(PODIR)/$(PLUGIN).pot %.mo: %.po msgfmt -c -o $@ $< -$(I18Npot): $(wildcard *.cpp) +$(I18Npot): $(PLUGIN).h $(OBJS:%.o=%.cpp) $(TNTOBJ:%.o=%.cpp) xgettext -C -cTRANSLATORS --no-wrap --no-location -k -ktr -ktrNOOP --package-name=vdr-$(PLUGIN) --package-version=$(VERSION) --msgid-bugs-address='<see README>' -o $@ $^ %.po: $(I18Npot) @@ -104,8 +103,8 @@ i18n: $(I18Nmsgs) $(I18Npot) ### Targets: -libvdr-$(PLUGIN).so: $(OBJS) - $(CXX) $(CXXFLAGS) $(LDFLAGS) -rdynamic -shared $(OBJS) $(LIBS) -o $@ +libvdr-$(PLUGIN).so: $(OBJS) $(TNTOBJ) + $(CXX) $(CXXFLAGS) $(LDFLAGS) -rdynamic -shared $(OBJS) $(TNTOBJ) $(LIBS) -o $@ @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION) install: all @@ -128,7 +127,7 @@ dist: $(I18Npo) clean @echo Distribution package created as $(PACKAGE).tgz clean: - @-rm -f $(OBJS) $(DEPFILE) *.so *.so.$(APIVERSION) *.tgz core* *~ $(PODIR)/*.mo $(PODIR)/*.pot + @-rm -f $(OBJS) $(TNTOBJ) $(DEPFILE) *.so *.so.$(APIVERSION) *.tgz core* *~ $(PODIR)/*.mo $(PODIR)/*.pot clean-subplugins: @for i in `ls -A -I ".*" $(SUBPLUGDIR)`; do for j in `ls -A -I ".*" $(SUBPLUGDIR)/$$i`; do $(MAKE) -f ../../../Makefile.plugins -C "$(SUBPLUGDIR)/$$i/$$j" clean; done; done diff --git a/po/de.po b/po/de.po new file mode 100644 index 0000000..c840cac --- /dev/null +++ b/po/de.po @@ -0,0 +1,230 @@ +# German translations for vdr-upnp package. +# Copyright (C) 2012 THE vdr-upnp'S COPYRIGHT HOLDER +# This file is distributed under the same license as the vdr-upnp package. +# Denis Loh <denis.loh@web.de>, 2012. +# +msgid "" +msgstr "" +"Project-Id-Version: vdr-upnp 1.0.0\n" +"Report-Msgid-Bugs-To: <see README>\n" +"POT-Creation-Date: 2012-11-01 16:37+0100\n" +"PO-Revision-Date: 2012-11-01 16:04+0100\n" +"Last-Translator: Denis Loh <denis.loh@web.de>\n" +"Language-Team: German\n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "UPnP/DLNA compliant Media Server functionality for VDR" +msgstr "" + +msgid "" +" The UPnP/DLNA server is designed to detect everything automatically.\n" +" Therefore the user is not required to change most of the settings.\n" +" \n" +" -d <DB directory> --db-dir=<DB directory> Specifies the directory\n" +" where the the database\n" +" file shall be located.\n" +msgstr "" +" Der UPnP/DLNA-Server ist so ausgelegt, dass alle Einstellungen\n" +" automatisch erkannt werden. Es ist daher nicht notwendig, dass\n" +" Einstellungen durch den Nutzer vorgenommen werden müssen\n" +" \n" +" -d <DB Verzeichnis> --db-dir=<DB Verzeichnis> Legt das Verzeichnis\n" +" fest, wo die Datenbank-\n" +" datei gespeichert werden\n" +" soll.\n" + +msgid "Invalid action" +msgstr "" + +msgid "Invalid args" +msgstr "" + +msgid "Invalid var" +msgstr "" + +msgid "Action failed" +msgstr "" + +msgid "Argument value invalid" +msgstr "" + +msgid "Argument value out of range" +msgstr "" + +msgid "Optional action not implemented" +msgstr "" + +msgid "Out of memory" +msgstr "" + +msgid "Human intervention required" +msgstr "" + +msgid "String argument to long" +msgstr "" + +msgid "Action not authorized" +msgstr "" + +msgid "Signature failure" +msgstr "" + +msgid "Signature missing" +msgstr "" + +msgid "Not encrypted" +msgstr "" + +msgid "Invalid sequence" +msgstr "" + +msgid "Invalid control URL" +msgstr "" + +msgid "No such session" +msgstr "" + +msgid "Unknown error code. Contact the device manufacturer" +msgstr "" + +msgid "Incompatible protocol info" +msgstr "" + +msgid "Incompatible directions" +msgstr "" + +msgid "Insufficient network resources" +msgstr "" + +msgid "Local restrictions" +msgstr "" + +msgid "Access denied" +msgstr "" + +msgid "Invalid connection reference" +msgstr "" + +msgid "Not in network" +msgstr "" + +msgid "Bad metadata" +msgstr "" + +msgid "Cannot process the request" +msgstr "" + +msgid "Destination resource access denied" +msgstr "" + +msgid "Invalid current tag" +msgstr "" + +msgid "Invalid new tag" +msgstr "" + +msgid "Invalid or unsupported search criteria" +msgstr "" + +msgid "Invalid or unsupported sort criteria" +msgstr "" + +msgid "No such container" +msgstr "" + +msgid "No such destination resource" +msgstr "" + +msgid "No such file transfer" +msgstr "" + +msgid "No such objectID" +msgstr "" + +msgid "No such source resource" +msgstr "" + +msgid "Parameter mismatch" +msgstr "" + +msgid "Read only tag" +msgstr "" + +msgid "Required tag" +msgstr "" + +msgid "Resource access denied" +msgstr "" + +msgid "Restricted object" +msgstr "" + +msgid "Restricted parent" +msgstr "" + +msgid "Transfer busy" +msgstr "" + +msgid "Enable UPnP server" +msgstr "UPnP-Server einschalten" + +msgid "disabled" +msgstr "inaktiv" + +msgid "enabled" +msgstr "aktiv" + +msgid "Use expert settings" +msgstr "Experteneinstellungen" + +msgid "Webserver root directory" +msgstr "Webserverwurzelverzeichnis" + +msgid "Webserver port (0=auto)" +msgstr "Webserverport (0=auto)" + +msgid "Presentation URL" +msgstr "Präsentationswebseite" + +msgid "Use \"live\" plugin for presentation" +msgstr "\"Live\"-Plugin als Webseite verwenden" + +msgid "Live webserver port (0=auto)" +msgstr "Webserver port des Live-Plugins (0=auto)" + +msgid "Generate new device UUID" +msgstr "Neue Geräte-UUID generieren" + +msgid "Current device UUID" +msgstr "Aktuelle Geräte-UUID" + +msgid "Max. content length of SOAP Messages" +msgstr "Max. SOAP-Messagegröße" + +msgid "Max. age of UPnP announcements" +msgstr "Max. Alter der UPnP-Mitteilungen" + +msgid "Bind UPnP server to " +msgstr "UPnP-Server lauscht auf " + +msgid "interface" +msgstr "Netzwerkkarte" + +msgid "address" +msgstr "IP-Adresse" + +msgid "Set IP address" +msgstr "Ip-Adresse einstellen" + +msgid "Set network interface" +msgstr "Netzwerkkarte einstellen" + +msgid "UPnP server port (0=auto)" +msgstr "UPnP Serverport (0=auto)" + +msgid "Path to database file" +msgstr "Pfad zur Datenbankdatei" diff --git a/po/fi_FI.po b/po/fi_FI.po new file mode 100644 index 0000000..03ee81b --- /dev/null +++ b/po/fi_FI.po @@ -0,0 +1,212 @@ +# VDR plugin language source file. +# Copyright (C) 2012 +# This file is distributed under the same license as the upnp package. +# Rolf Ahrenberg, 2012 +# +msgid "" +msgstr "" +"Project-Id-Version: vdr-upnp 1.0.0\n" +"Report-Msgid-Bugs-To: <see README>\n" +"POT-Creation-Date: 2012-10-31 10:31+0200\n" +"PO-Revision-Date: 2012-10-31 10:31+0200\n" +"Last-Translator: Rolf Ahrenberg\n" +"Language-Team: Finnish <vdr@linuxtv.org>\n" +"Language: fi\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +msgid "UPnP/DLNA compliant Media Server functionality for VDR" +msgstr "UPnP/DLNA-mediapalvelin VDR:lle" + +msgid "Invalid action" +msgstr "" + +msgid "Invalid args" +msgstr "" + +msgid "Invalid var" +msgstr "" + +msgid "Action failed" +msgstr "" + +msgid "Argument value invalid" +msgstr "" + +msgid "Argument value out of range" +msgstr "" + +msgid "Optional action not implemented" +msgstr "" + +msgid "Out of memory" +msgstr "" + +msgid "Human intervention required" +msgstr "" + +msgid "String argument to long" +msgstr "" + +msgid "Action not authorized" +msgstr "" + +msgid "Signature failure" +msgstr "" + +msgid "Signature missing" +msgstr "" + +msgid "Not encrypted" +msgstr "" + +msgid "Invalid sequence" +msgstr "" + +msgid "Invalid control URL" +msgstr "" + +msgid "No such session" +msgstr "" + +msgid "Unknown error code. Contact the device manufacturer" +msgstr "" + +msgid "Incompatible protocol info" +msgstr "" + +msgid "Incompatible directions" +msgstr "" + +msgid "Insufficient network resources" +msgstr "" + +msgid "Local restrictions" +msgstr "" + +msgid "Access denied" +msgstr "" + +msgid "Invalid connection reference" +msgstr "" + +msgid "Not in network" +msgstr "" + +msgid "Bad metadata" +msgstr "" + +msgid "Cannot process the request" +msgstr "" + +msgid "Destination resource access denied" +msgstr "" + +msgid "Invalid current tag" +msgstr "" + +msgid "Invalid new tag" +msgstr "" + +msgid "Invalid or unsupported search criteria" +msgstr "" + +msgid "Invalid or unsupported sort criteria" +msgstr "" + +msgid "No such container" +msgstr "" + +msgid "No such destination resource" +msgstr "" + +msgid "No such file transfer" +msgstr "" + +msgid "No such objectID" +msgstr "" + +msgid "No such source resource" +msgstr "" + +msgid "Parameter mismatch" +msgstr "" + +msgid "Read only tag" +msgstr "" + +msgid "Required tag" +msgstr "" + +msgid "Resource access denied" +msgstr "" + +msgid "Restricted object" +msgstr "" + +msgid "Restricted parent" +msgstr "" + +msgid "Transfer busy" +msgstr "" + +msgid "Enable UPnP server" +msgstr "UPnP-palvelin" + +msgid "disabled" +msgstr "ei käytössä" + +msgid "enabled" +msgstr "käytössä" + +msgid "Use expert settings" +msgstr "Näytä lisäasetukset" + +msgid "Webserver root directory" +msgstr "Web-palvelimen juurihakemisto" + +msgid "Webserver port (0=auto)" +msgstr "Web-palvelimen portti (0=auto)" + +msgid "Presentation URL" +msgstr "Esitys-URL" + +msgid "Use \"live\" plugin for presentation" +msgstr "Käytä \"live\"-laajennosta esityksiin" + +msgid "Live webserver port (0=auto)" +msgstr "Live-laajennoksen portti (0=auto)" + +msgid "Generate new device UUID" +msgstr "Luo uusi UUID laitteelle" + +msgid "Current device UUID" +msgstr "Nykyinen laitteen UUID" + +msgid "Max. content length of SOAP Messages" +msgstr "SOAP-viestien suurin pituus" + +msgid "Max. age of UPnP announcements" +msgstr "UPnP-ilmoitusten suurin kestoaika" + +msgid "Bind UPnP server to " +msgstr "Sido UPnP-palvelin" + +msgid "interface" +msgstr "sovittimeen" + +msgid "address" +msgstr "osoitteeseen" + +msgid "Set IP address" +msgstr "Aseta IP-osoite" + +msgid "Set network interface" +msgstr "Aseta verkkosovitin" + +msgid "UPnP server port (0=auto)" +msgstr "UPnP-palvelimen portti (0=auto)" + +msgid "Path to database file" +msgstr "Tiedostopolku tietokannalle" diff --git a/server/server.cpp b/server/server.cpp index b6e3076..616d55b 100644 --- a/server/server.cpp +++ b/server/server.cpp @@ -8,6 +8,8 @@ #include <vdr/tools.h> #include <string> #include <sstream> +#include <boost/algorithm/string.hpp> +#include <unistd.h> #include "../include/server.h" #include "../include/service.h" #include "../include/webserver.h" @@ -25,7 +27,7 @@ cMediaServer* cMediaServer::GetInstance(){ cMediaServer::cMediaServer() : mServerDescription("VDR UPnP/DLNA MS", "Denis Loh", "http://upnp.vdr-developer.org", - DESCRIPTION, "VDR UPnP-DLNA MS", VERSION, + tr(DESCRIPTION), "VDR UPnP-DLNA MS", VERSION, "http://projects.vdr-developer.org/projects/plg-upnp/files", VERSION, "deviceDescription.xml") , mDeviceHandle(0) @@ -34,6 +36,14 @@ cMediaServer::cMediaServer() , mWebserver(NULL) , mMediaManager(NULL) { + char tmp[255]; + + if (gethostname(tmp, sizeof(tmp)) == 0) { + string name = tmp; + boost::to_upper(name); + mServerDescription.friendlyName = name + ": " + mServerDescription.friendlyName; + } + mServerIcons.push_back(ServerIcon(image::DLNA_ICON_PNG_SM_24A, "images/upnpIconSm.png")); mServerIcons.push_back(ServerIcon(image::DLNA_ICON_PNG_LRG_24A, "images/upnpIconLrg.png")); mServerIcons.push_back(ServerIcon(image::DLNA_ICON_JPEG_SM_24, "images/upnpIconSm.jpeg")); @@ -26,12 +26,12 @@ cPluginUpnp::~cPluginUpnp() const char *cPluginUpnp::CommandLineHelp(void) { - return " The UPnP/DLNA server is designed to detect everything automatically.\n" - " Therefore the user is not required to change most of the settings.\n" - " \n" - " -d <DB directory> --db-dir=<DB directory> Specifies the directory\n" - " where the the database\n" - " file shall be located.\n"; + return tr(" The UPnP/DLNA server is designed to detect everything automatically.\n" + " Therefore the user is not required to change most of the settings.\n" + " \n" + " -d <DB directory> --db-dir=<DB directory> Specifies the directory\n" + " where the the database\n" + " file shall be located.\n"); } bool cPluginUpnp::ProcessArgs(int argc, char *argv[]) @@ -14,7 +14,7 @@ using namespace upnp; static const char *VERSION = "1.0.0"; -static const char *DESCRIPTION = "UPnP/DLNA compliant Media Server functionality for VDR"; +static const char *DESCRIPTION = trNOOP("UPnP/DLNA compliant Media Server functionality for VDR"); class cPluginUpnp : public cPlugin { private: @@ -24,7 +24,7 @@ public: cPluginUpnp(void); virtual ~cPluginUpnp(); virtual const char *Version(void) { return VERSION; } - virtual const char *Description(void) { return DESCRIPTION; } + virtual const char *Description(void) { return tr(DESCRIPTION); } virtual const char *CommandLineHelp(void); virtual bool ProcessArgs(int argc, char *argv[]); virtual bool Initialize(void); |