diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..6473726 --- /dev/null +++ b/Makefile @@ -0,0 +1,26 @@ +OBJECTS = *.php includes/*.php themes/*/*.php dummy/*.php +LANGUAGES = de +TARGETFILES = $(foreach lang,$(LANGUAGES),locale/$(lang)/LC_MESSAGES/sjqg.mo) +POFILES = + +all: $(TARGETFILES) $(POFILES) + +%.mo: %.po + msgfmt $< -o $@ + +%.po: locale/sjqg.pot + if [ ! -d `dirname "$@"` ]; then mkdir -p `dirname "$@"`; fi + if [ -f $@ ]; then \ + msgmerge -U $@ $<; \ + else \ + cp $< $@; \ + fi + +locale/sjqg.pot: $(OBJECTS) + xgettext -d sjqg -o sjqg.pot -p locale \ + --from-code=UTF8 --sort-output \ + --copyright-holder='Jan Dittberner ' \ + --package-name='SJQG' --package-version='0.3' \ + --language=PHP $(OBJECTS) + +.SECONDARY: diff --git a/includes/galleryfunctions.php b/includes/galleryfunctions.php index 1b98bcd..bd439a6 100644 --- a/includes/galleryfunctions.php +++ b/includes/galleryfunctions.php @@ -40,7 +40,7 @@ $basedir = realpath(implode(DIRECTORY_SEPARATOR, array(dirname(__file__), '..')) $inifile = implode(DIRECTORY_SEPARATOR, array($basedir, 'gallery.ini')); if (!file_exists($inifile)) { - die("required $inifile not found."); + die(sprintf(_("required %s not found."), $inifile)); } $configuration = parse_ini_file($inifile); if (array_key_exists('logfile', $configuration)) { @@ -273,7 +273,7 @@ function getScaledImage($galleryname, $basename, $maxdim, $scaletype) { default: header('Content-Type: text/plain'); debug_print_backtrace(); - die('Unknown scaletype'); + die(_('Unknown scale type')); } if ($scaleheight) { @@ -287,7 +287,8 @@ function getScaledImage($galleryname, $basename, $maxdim, $scaletype) { // versuchen das Thumbnail-Verzeichnis anzulegen $mkdir = @mkdir($scaleddirpath, 0755); if (!$mkdir) { - trigger_error("could not create directory $scaleddirpath.\n", + trigger_error(sprintf(_("could not create directory %s.\n"), + $scaleddirpath), E_USER_WARNING); return $galleryname . '/' . $basename; } diff --git a/locale/de/LC_MESSAGES/sjqg.mo b/locale/de/LC_MESSAGES/sjqg.mo new file mode 100644 index 0000000..623a2f7 Binary files /dev/null and b/locale/de/LC_MESSAGES/sjqg.mo differ diff --git a/locale/de/LC_MESSAGES/sjqg.po b/locale/de/LC_MESSAGES/sjqg.po new file mode 100644 index 0000000..89e8ad4 --- /dev/null +++ b/locale/de/LC_MESSAGES/sjqg.po @@ -0,0 +1,30 @@ +# German translation for SJQG +# Copyright (C) 2009 Jan Dittberner +# This file is distributed under the same license as the +# scrollingJqueryGallery package. +# Jan Dittberner , 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: SJQG 0.3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-07-31 23:11+0200\n" +"PO-Revision-Date: 2009-07-31 23:11+0200\n" +"Last-Translator: Jan Dittberner \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: includes/galleryfunctions.php:276 +msgid "Unknown scale type" +msgstr "Unbekannter Skalierungstyp" + +#: includes/galleryfunctions.php:290 +#, php-format +msgid "could not create directory %s.\n" +msgstr "Konnte Verzeichnis %s nicht anlegen.\n" + +#: includes/galleryfunctions.php:43 +#, php-format +msgid "required %s not found." +msgstr "benötigte %s nicht gefunden." diff --git a/locale/sjqg.pot b/locale/sjqg.pot new file mode 100644 index 0000000..e436c9d --- /dev/null +++ b/locale/sjqg.pot @@ -0,0 +1,31 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Jan Dittberner +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: SJQG 0.3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-07-31 23:11+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: includes/galleryfunctions.php:276 +msgid "Unknown scale type" +msgstr "" + +#: includes/galleryfunctions.php:290 +#, php-format +msgid "could not create directory %s.\n" +msgstr "" + +#: includes/galleryfunctions.php:43 +#, php-format +msgid "required %s not found." +msgstr ""