# HG changeset patch # User Christophe Lincoln # Date 1487882885 -3600 # Node ID f758d6f609be02ffffa36162d518decee9908c09 # Parent f84b344d56ec4f2a7ba3047ebd9c8a2f2ccde985 Add po files and Makefile diff -r f84b344d56ec -r f758d6f609be Makefile --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Makefile Thu Feb 23 21:48:05 2017 +0100 @@ -0,0 +1,52 @@ +# Makefile for CGI/SHell Media Box +# + +PACKAGE="mediabox" +DESTDIR?= +PREFIX?=/usr +CGI_BIN?=/var/www/cgi-bin +LINGUAS?=fr + +all: msgfmt + +pot: + xgettext -o po/mediabox.pot -L Shell --package-name="MediaBox" \ + ./index.cgi ./mediabox + +msgmerge: + @for l in $(LINGUAS); do \ + echo -n "Updating $$l po file."; \ + msgmerge -U po/$$l.po po/$(PACKAGE).pot; \ + done; + +msgfmt: + @for l in $(LINGUAS); do \ + echo "Compiling $$l mo file..."; \ + mkdir -p po/mo/$$l/LC_MESSAGES; \ + msgfmt -o po/mo/$$l/LC_MESSAGES/$(PACKAGE).mo po/$$l.po; \ + done; + +install: + install -m 0755 -d $(DESTDIR)$(PREFIX)/bin + install -m 0755 -d $(DESTDIR)$(PREFIX)/share/applications + install -m 0755 mediabox $(DESTDIR)$(PREFIX)/bin + install -m 0644 data/mediabox.desktop $(DESTDIR)$(PREFIX)/share/applications + # Web interface + install -m 0755 -d $(DESTDIR)$(CGI_BIN)/mediabox + install -m 0777 -d $(DESTDIR)$(CGI_BIN)/mediabox/cache + install -m 0755 index.cgi $(DESTDIR)$(CGI_BIN)/mediabox + cp -r images/ $(DESTDIR)$(CGI_BIN)/mediabox + cp -r lib/ $(DESTDIR)$(CGI_BIN)/mediabox + cp README $(DESTDIR)$(CGI_BIN)/mediabox + # i18n + install -m 0777 -d $(DESTDIR)$(PREFIX)/share/locale + cp -a po/mo/* $(DESTDIR)$(PREFIX)/share/locale + +uninstall: + rm -f $(DESTDIR)$(PREFIX)/bin/mediabox + rm -rf $(DESTDIR)$(CGI_BIN)/mediabox + rm -f $(DESTDIR)$(PREFIX)/share/locale/*/mediabox.mo + +clean: + rm -rf po/*~ + rm -rf po/mo diff -r f84b344d56ec -r f758d6f609be po/fr.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/po/fr.po Thu Feb 23 21:48:05 2017 +0100 @@ -0,0 +1,85 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: MediaBox\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-02-23 21:26+0100\n" +"PO-Revision-Date: 2017-02-13 02:14+0100\n" +"Last-Translator: Christophe Lincoln \n" +"Language-Team: \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 1.8.6\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#: index.cgi:29 +msgid "Missing config file:" +msgstr "" + +#: index.cgi:64 +msgid "Home" +msgstr "Accueil" + +#: index.cgi:65 index.cgi:80 index.cgi:239 +msgid "Music" +msgstr "Musique" + +#: index.cgi:66 index.cgi:81 index.cgi:246 +msgid "Videos" +msgstr "Vidéos" + +#: index.cgi:67 index.cgi:82 index.cgi:253 +msgid "Playlists" +msgstr "Playlists" + +#: index.cgi:68 index.cgi:83 index.cgi:260 +msgid "Radio" +msgstr "" + +#: index.cgi:84 index.cgi:267 +msgid "Settings" +msgstr "Réglages" + +#: index.cgi:119 +#, fuzzy +msgid "Videos found" +msgstr "Vidéos" + +#: index.cgi:170 index.cgi:190 +msgid "No track playing" +msgstr "" + +#: index.cgi:216 +msgid "No video playing" +msgstr "" + +#: mediabox:19 +msgid "MediaBox cmdline tool" +msgstr "" + +#: mediabox:21 +msgid "Usage:" +msgstr "Utilisation:" + +#: mediabox:22 +msgid "Commands:" +msgstr "" + +#: mediabox:25 +msgid "Examples:" +msgstr "" + +#: mediabox:61 +msgid "Adding playlist:" +msgstr "" + +#: mediabox:62 +#, fuzzy +msgid "Playlist tracks:" +msgstr "Playlists" diff -r f84b344d56ec -r f758d6f609be po/mediabox.pot --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/po/mediabox.pot Thu Feb 23 21:48:05 2017 +0100 @@ -0,0 +1,82 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: MediaBox\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-02-23 21:26+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: index.cgi:29 +msgid "Missing config file:" +msgstr "" + +#: index.cgi:64 +msgid "Home" +msgstr "" + +#: index.cgi:65 index.cgi:80 index.cgi:239 +msgid "Music" +msgstr "" + +#: index.cgi:66 index.cgi:81 index.cgi:246 +msgid "Videos" +msgstr "" + +#: index.cgi:67 index.cgi:82 index.cgi:253 +msgid "Playlists" +msgstr "" + +#: index.cgi:68 index.cgi:83 index.cgi:260 +msgid "Radio" +msgstr "" + +#: index.cgi:84 index.cgi:267 +msgid "Settings" +msgstr "" + +#: index.cgi:119 +msgid "Videos found" +msgstr "" + +#: index.cgi:170 index.cgi:190 +msgid "No track playing" +msgstr "" + +#: index.cgi:216 +msgid "No video playing" +msgstr "" + +#: mediabox:19 +msgid "MediaBox cmdline tool" +msgstr "" + +#: mediabox:21 +msgid "Usage:" +msgstr "" + +#: mediabox:22 +msgid "Commands:" +msgstr "" + +#: mediabox:25 +msgid "Examples:" +msgstr "" + +#: mediabox:61 +msgid "Adding playlist:" +msgstr "" + +#: mediabox:62 +msgid "Playlist tracks:" +msgstr "" diff -r f84b344d56ec -r f758d6f609be server.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/server.sh Thu Feb 23 21:48:05 2017 +0100 @@ -0,0 +1,16 @@ +#!/bin/sh +# +# server.sh - Serve MediBox via Busybox HTTPd for development +# +. /lib/libtaz.sh + +if [ -d "cache" ]; then + port=8090 + echo "Starting server on port: $port" + echo "URL: $(boldify http://localhost:$port/)" + echo "Press CTRL+C to stop the server" + httpd -f -u www:www -p ${port} -c data/httpd.conf +else + echo "Missing cache dir: cache/" + echo "install -d -m 0777 cache" +fi && exit 0