aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--AUTHORS5
-rw-r--r--Makefile.am28
-rw-r--r--README2
-rwxr-xr-xbootstrap6
-rw-r--r--configure.ac4
-rw-r--r--po/LINGUAS2
-rw-r--r--po/Makevars41
-rw-r--r--po/POTFILES.in7
-rw-r--r--po/da.po6
-rw-r--r--po/gtk-redshift/da.po22
-rw-r--r--po/gtk-redshift/gtk-redshift.pot21
-rw-r--r--po/gtk-redshift/ru.po22
-rw-r--r--po/redshift.pot (renamed from po/redshift/redshift.pot)79
-rw-r--r--po/redshift/da.po211
-rw-r--r--po/ru.po (renamed from po/redshift/ru.po)87
-rw-r--r--src/gtk-redshift/defs.py.in21
-rwxr-xr-xsrc/gtk-redshift/gtk-redshift.py (renamed from src/gtk-redshift/gtk-redshift)6
-rw-r--r--src/redshift.c33
18 files changed, 215 insertions, 388 deletions
diff --git a/AUTHORS b/AUTHORS
index d85ca98..0559f96 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -3,3 +3,8 @@ Jon Lund Steffensen <jonlst@gmail.com>
Original gtk-redshift script contributed by Martin Koelewijn.
The redshift icon is based on artwork by the Tango Desktop Project.
+
+Translators
+--------------------
+Gregory Petrosyan (ru)
+Jon Lund Steffensen (da)
diff --git a/Makefile.am b/Makefile.am
index d961d05..f492abe 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,11 @@
+SUBDIRS = po
+ACLOCAL_AMFLAGS = -I m4
+
+# I18n
+localedir = $(datadir)/locale
+INCLUDES = -DLOCALEDIR=\"$(localedir)\"
+
# redshift Program
bin_PROGRAMS = redshift
@@ -12,7 +19,8 @@ EXTRA_redshift_SOURCES = \
src/vidmode.c src/vidmode.h
AM_CFLAGS =
-redshift_LDADD =
+redshift_LDADD = @LIBINTL@
+EXTRA_DIST =
if ENABLE_RANDR
redshift_SOURCES += src/randr.c src/randr.h
@@ -32,11 +40,25 @@ endif
# gtk-redshift Script
if ENABLE_GTK
-dist_bin_SCRIPTS = src/gtk-redshift/gtk-redshift
+dist_bin_SCRIPTS = src/gtk-redshift/gtk-redshift.py
+bin_SCRIPTS = src/gtk-redshift/defs.py
+EXTRA_DIST += src/gtk-redshift/defs.py.in
endif
# Icons
icondir = @datadir@/icons/hicolor/scalable/apps
icon_DATA = data/icons/hicolor/scalable/apps/redshift.svg
-EXTRA_DIST = $(icon_DATA)
+EXTRA_DIST += $(icon_DATA)
+
+
+CLEANFILES = src/gtk-redshift/defs.py
+
+# Local python definitions
+src/gtk-redshift/defs.py: src/gtk-redshift/defs.py.in
+ sed -e "s|\@localedir\@|$(localedir)|g" $< > $@
+
+# Update PO translations
+.PHONY: update-po
+update-po:
+ cd po && $(MAKE) POTFILES redshift.pot update-po
diff --git a/README b/README
index b73f5d9..8c819fa 100644
--- a/README
+++ b/README
@@ -6,7 +6,7 @@ Adjust color temperature of your screen according to your
surroundings. This may help your eyes hurt less if you are working in
front of the screen at night.
-The program uses an X server extension adjust the color
+The program uses an X server extension to adjust the color
temperature. This is done by setting appropriate gamma ramps. If you
have configured your own gamma ramps they will be overwritten but in
that case you probably care too much about color accuracy to use this
diff --git a/bootstrap b/bootstrap
index 0f61946..1e09715 100755
--- a/bootstrap
+++ b/bootstrap
@@ -3,8 +3,4 @@
# change to root directory
cd $(dirname "$0")
-# run auto.* tools
-aclocal --force && \
- autoheader --force && \
- automake --gnu --add-missing --force-missing --copy && \
- autoconf --force
+autoreconf --force --install
diff --git a/configure.ac b/configure.ac
index 25704bf..18e2855 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11,6 +11,9 @@ AM_INIT_AUTOMAKE([dist-bzip2])
AC_PROG_CC_C99
# Checks for libraries.
+AM_GNU_GETTEXT_VERSION([0.17])
+AM_GNU_GETTEXT([external])
+
PKG_CHECK_MODULES([X11], [x11], [have_x11=yes], [have_x11=no])
PKG_CHECK_MODULES([XF86VM], [xxf86vm], [have_xf86vm=yes], [have_xf86vm=no])
PKG_CHECK_MODULES([XCB], [xcb], [have_xcb=yes], [have_xcb=no])
@@ -98,6 +101,7 @@ AC_CHECK_FUNCS([setlocale strchr floor pow clock_gettime])
AC_CONFIG_FILES([
Makefile
+ po/Makefile.in
])
AC_OUTPUT
diff --git a/po/LINGUAS b/po/LINGUAS
new file mode 100644
index 0000000..63078cf
--- /dev/null
+++ b/po/LINGUAS
@@ -0,0 +1,2 @@
+# List of available languages
+da ru
diff --git a/po/Makevars b/po/Makevars
new file mode 100644
index 0000000..6fa2150
--- /dev/null
+++ b/po/Makevars
@@ -0,0 +1,41 @@
+# Makefile variables for PO directory in any package using GNU gettext.
+
+# Usually the message domain is the same as the package name.
+DOMAIN = $(PACKAGE)
+
+# These two variables depend on the location of this directory.
+subdir = po
+top_builddir = ..
+
+# These options get passed to xgettext.
+XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ --add-comments=TRANSLATORS
+
+# This is the copyright holder that gets inserted into the header of the
+# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
+# package. (Note that the msgstr strings, extracted from the package's
+# sources, belong to the copyright holder of the package.) Translators are
+# expected to transfer the copyright for their translations to this person
+# or entity, or to disclaim their copyright. The empty string stands for
+# the public domain; in this case the translators are expected to disclaim
+# their copyright.
+COPYRIGHT_HOLDER = Jon Lund Steffensen
+
+# This is the email address or URL to which the translators shall report
+# bugs in the untranslated strings:
+# - Strings which are not entire sentences, see the maintainer guidelines
+# in the GNU gettext documentation, section 'Preparing Strings'.
+# - Strings which use unclear terms or require additional context to be
+# understood.
+# - Strings which make invalid assumptions about notation of date, time or
+# money.
+# - Pluralisation problems.
+# - Incorrect English spelling.
+# - Incorrect formatting.
+# It can be your email address, or a mailing list address where translators
+# can write to without being subscribed, or the URL of a web page through
+# which the translators can contact you.
+MSGID_BUGS_ADDRESS = https://bugs.launchpad.net/redshift
+
+# This is the list of locale categories, beyond LC_MESSAGES, for which the
+# message catalogs shall be used. It is usually empty.
+EXTRA_LOCALE_CATEGORIES =
diff --git a/po/POTFILES.in b/po/POTFILES.in
new file mode 100644
index 0000000..ebb31b3
--- /dev/null
+++ b/po/POTFILES.in
@@ -0,0 +1,7 @@
+# List of source files containing translatable strings
+
+src/redshift.c
+src/randr.c
+src/vidmode.c
+
+src/gtk-redshift/gtk-redshift.py
diff --git a/po/da.po b/po/da.po
index f1302cb..fef3b3f 100644
--- a/po/da.po
+++ b/po/da.po
@@ -6,8 +6,8 @@
msgid ""
msgstr ""
"Project-Id-Version: redshift\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2010-02-10 22:50+0100\n"
+"Report-Msgid-Bugs-To: https://bugs.launchpad.net/redshift\n"
+"POT-Creation-Date: 2010-02-10 23:46+0100\n"
"PO-Revision-Date: 2010-02-10 21:21+0000\n"
"Last-Translator: Jon Lund Steffensen <Unknown>\n"
"Language-Team: Danish <da@li.org>\n"
@@ -205,6 +205,6 @@ msgstr "Kan ikke genskabe CRTC %i\n"
msgid "X request failed: %s\n"
msgstr "Fejl ved X forespørgsel: %s\n"
-#: src/gtk-redshift/gtk-redshift.py:59
+#: src/gtk-redshift/gtk-redshift.py:61
msgid "Toggle"
msgstr "Slå til/fra"
diff --git a/po/gtk-redshift/da.po b/po/gtk-redshift/da.po
deleted file mode 100644
index 42910b9..0000000
--- a/po/gtk-redshift/da.po
+++ /dev/null
@@ -1,22 +0,0 @@
-# Danish translation for redshift
-# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
-# This file is distributed under the same license as the redshift package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: redshift\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2010-02-01 22:16+0100\n"
-"PO-Revision-Date: 2010-02-02 11:34+0000\n"
-"Last-Translator: Jon Lund Steffensen <Unknown>\n"
-"Language-Team: Danish <da@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-02-03 04:51+0000\n"
-"X-Generator: Launchpad (build Unknown)\n"
-
-#: src/gtk-redshift/gtk-redshift:59
-msgid "Toggle"
-msgstr "Slå til/fra"
diff --git a/po/gtk-redshift/gtk-redshift.pot b/po/gtk-redshift/gtk-redshift.pot
deleted file mode 100644
index b90179f..0000000
--- a/po/gtk-redshift/gtk-redshift.pot
+++ /dev/null
@@ -1,21 +0,0 @@
-# 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 <EMAIL@ADDRESS>, YEAR.
-#
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-02-01 22:16+0100\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"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=CHARSET\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: src/gtk-redshift/gtk-redshift:59
-msgid "Toggle"
-msgstr ""
diff --git a/po/gtk-redshift/ru.po b/po/gtk-redshift/ru.po
deleted file mode 100644
index 9735404..0000000
--- a/po/gtk-redshift/ru.po
+++ /dev/null
@@ -1,22 +0,0 @@
-# Russian translation for redshift
-# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
-# This file is distributed under the same license as the redshift package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: redshift\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2010-02-01 22:16+0100\n"
-"PO-Revision-Date: 2010-02-02 09:20+0000\n"
-"Last-Translator: Gregory Petrosyan <gregory.petrosyan@gmail.com>\n"
-"Language-Team: Russian <ru@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-02-03 04:51+0000\n"
-"X-Generator: Launchpad (build Unknown)\n"
-
-#: src/gtk-redshift/gtk-redshift:59
-msgid "Toggle"
-msgstr "Включить / Выключить"
diff --git a/po/redshift/redshift.pot b/po/redshift.pot
index b3d8ac5..da21cd8 100644
--- a/po/redshift/redshift.pot
+++ b/po/redshift.pot
@@ -1,14 +1,14 @@
# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# Copyright (C) YEAR Jon Lund Steffensen
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-02-02 00:50+0100\n"
+"Project-Id-Version: redshift 1.1\n"
+"Report-Msgid-Bugs-To: https://bugs.launchpad.net/redshift\n"
+"POT-Creation-Date: 2010-02-10 23:46+0100\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"
@@ -31,7 +31,7 @@ msgstr ""
msgid "Period: Daytime\n"
msgstr ""
-#. TRANSLATORS: --help output 1
+#. TRANSLATORS: help output 1
#. LAT is latitude, LON is longitude,
#. DAY is temperature at daytime,
#. NIGHT is temperature at night
@@ -41,13 +41,13 @@ msgstr ""
msgid "Usage: %s -l LAT:LON -t DAY:NIGHT [OPTIONS...]\n"
msgstr ""
-#. TRANSLATORS: --help output 2
+#. TRANSLATORS: help output 2
#. no-wrap
#: src/redshift.c:204
msgid "Set color temperature of display according to time of day.\n"
msgstr ""
-#. TRANSLATORS: --help output 3
+#. TRANSLATORS: help output 3
#. no-wrap
#: src/redshift.c:210
msgid ""
@@ -55,7 +55,7 @@ msgid ""
" -v\t\tVerbose output\n"
msgstr ""
-#. TRANSLATORS: --help output 4
+#. TRANSLATORS: help output 4
#. no-wrap
#: src/redshift.c:216
msgid ""
@@ -72,9 +72,9 @@ msgstr ""
msgid "Malformed gamma argument.\n"
msgstr ""
-#: src/redshift.c:280 src/redshift.c:299 src/redshift.c:350 src/redshift.c:363
-#: src/redshift.c:373
-msgid "Try `--help' for more information.\n"
+#: src/redshift.c:280 src/redshift.c:299 src/redshift.c:350 src/redshift.c:362
+#: src/redshift.c:371
+msgid "Try `-h' for more information.\n"
msgstr ""
#: src/redshift.c:297
@@ -100,84 +100,68 @@ msgstr ""
msgid "Malformed temperature argument.\n"
msgstr ""
-#: src/redshift.c:362
-#, c-format
-msgid "Unknown parameter `%c'.\n"
-msgstr ""
-
-#: src/redshift.c:372
+#: src/redshift.c:370
msgid "Latitude and longitude must be set.\n"
msgstr ""
#. TRANSLATORS: Append degree symbols if possible.
-#: src/redshift.c:380
+#: src/redshift.c:377
#, c-format
msgid "Location: %f, %f\n"
msgstr ""
-#: src/redshift.c:387
+#: src/redshift.c:384
#, c-format
msgid "Latitude must be between %.1f and %.1f.\n"
msgstr ""
-#: src/redshift.c:396
+#: src/redshift.c:393
#, c-format
msgid "Longitude must be between %.1f and %.1f.\n"
msgstr ""
-#: src/redshift.c:404 src/redshift.c:412
+#: src/redshift.c:401 src/redshift.c:409
#, c-format
msgid "Temperature must be between %uK and %uK.\n"
msgstr ""
-#: src/redshift.c:422
+#: src/redshift.c:419
#, c-format
msgid "Gamma value must be between %.1f and %.1f.\n"
msgstr ""
-#: src/redshift.c:428
+#: src/redshift.c:425
#, c-format
msgid "Gamma: %.3f, %.3f, %.3f\n"
msgstr ""
-#: src/redshift.c:440
+#: src/redshift.c:437
msgid "Initialization of RANDR failed.\n"
msgstr ""
-#: src/redshift.c:442
+#: src/redshift.c:439
msgid "Trying other method...\n"
msgstr ""
-#: src/redshift.c:457
+#: src/redshift.c:454
msgid "Initialization of VidMode failed.\n"
msgstr ""
#. TRANSLATORS: Append degree symbol if possible.
-#: src/redshift.c:480
+#: src/redshift.c:477
#, c-format
msgid "Solar elevation: %f\n"
msgstr ""
-#: src/redshift.c:487 src/redshift.c:649
+#: src/redshift.c:484 src/redshift.c:646
#, c-format
msgid "Color temperature: %uK\n"
msgstr ""
-#: src/redshift.c:493 src/redshift.c:658
+#: src/redshift.c:490 src/redshift.c:655
msgid "Temperature adjustment failed.\n"
msgstr ""
-#: src/vidmode.c:42 src/vidmode.c:54 src/vidmode.c:64 src/vidmode.c:94
-#: src/vidmode.c:125 src/vidmode.c:154
-#, c-format
-msgid "X request failed: %s\n"
-msgstr ""
-
-#: src/vidmode.c:71 src/randr.c:157
-#, c-format
-msgid "Gamma ramp size too small: %i\n"
-msgstr ""
-
#: src/randr.c:57 src/randr.c:104 src/randr.c:144 src/randr.c:172
#: src/randr.c:231 src/randr.c:283
#, c-format
@@ -194,7 +178,22 @@ msgstr ""
msgid "Screen %i could not be found.\n"
msgstr ""
+#: src/randr.c:157 src/vidmode.c:71
+#, c-format
+msgid "Gamma ramp size too small: %i\n"
+msgstr ""
+
#: src/randr.c:233
#, c-format
msgid "Unable to restore CRTC %i\n"
msgstr ""
+
+#: src/vidmode.c:42 src/vidmode.c:54 src/vidmode.c:64 src/vidmode.c:94
+#: src/vidmode.c:125 src/vidmode.c:154
+#, c-format
+msgid "X request failed: %s\n"
+msgstr ""
+
+#: src/gtk-redshift/gtk-redshift.py:61
+msgid "Toggle"
+msgstr ""
diff --git a/po/redshift/da.po b/po/redshift/da.po
deleted file mode 100644
index c70d6d6..0000000
--- a/po/redshift/da.po
+++ /dev/null
@@ -1,211 +0,0 @@
-# Danish translation for redshift
-# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
-# This file is distributed under the same license as the redshift package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: redshift\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2010-02-02 00:50+0100\n"
-"PO-Revision-Date: 2010-02-09 20:35+0000\n"
-"Last-Translator: Jon Lund Steffensen <Unknown>\n"
-"Language-Team: Danish <da@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-02-10 04:50+0000\n"
-"X-Generator: Launchpad (build Unknown)\n"
-
-#: src/redshift.c:172
-#, c-format
-msgid "Period: Night\n"
-msgstr "Periode: Nat\n"
-
-#: src/redshift.c:179
-#, c-format
-msgid "Period: Transition (%.2f%% day)\n"
-msgstr "Periode: Overgang (%.2f%% dag)\n"
-
-#: src/redshift.c:183
-#, c-format
-msgid "Period: Daytime\n"
-msgstr "Periode: Dag\n"
-
-#. TRANSLATORS: --help output 1
-#. LAT is latitude, LON is longitude,
-#. DAY is temperature at daytime,
-#. NIGHT is temperature at night
-#. no-wrap
-#: src/redshift.c:198
-#, c-format
-msgid "Usage: %s -l LAT:LON -t DAY:NIGHT [OPTIONS...]\n"
-msgstr "Brug: %s -l BRED:LÆNG -t DAG:NAT [TILVALG...]\n"
-
-#. TRANSLATORS: --help output 2
-#. no-wrap
-#: src/redshift.c:204
-msgid "Set color temperature of display according to time of day.\n"
-msgstr "Indstil skærmens farvetemperatur ud fra klokkeslæt.\n"
-
-#. TRANSLATORS: --help output 3
-#. no-wrap
-#: src/redshift.c:210
-msgid ""
-" -h\t\tDisplay this help message\n"
-" -v\t\tVerbose output\n"
-msgstr ""
-" -h\t\tVis denne hjælpebesked\n"
-" -v\t\tUddybende udskrift\n"
-
-#. TRANSLATORS: --help output 4
-#. no-wrap
-#: src/redshift.c:216
-msgid ""
-" -g R:G:B\tAdditional gamma correction to apply\n"
-" -l LAT:LON\tYour current location\n"
-" -m METHOD\tMethod to use to set color temperature (randr or vidmode)\n"
-" -o\t\tOne shot mode (do not continously adjust color temperature)\n"
-" -r\t\tDisable initial temperature transition\n"
-" -s SCREEN\tX screen to apply adjustments to\n"
-" -t DAY:NIGHT\tColor temperature to set at daytime/night\n"
-msgstr ""
-" -g R:G:B\tYderligere gamma-korrektion som skal anvendes\n"
-" -l BRED:LÆNG\tKoordinater for din placering\n"
-" -m METODE\tMetode som benyttes til at sætte farvetemperatur (randr eller "
-"vidmode)\n"
-" -o\t\tEngangsmodus (bliver ikke ved med at justere farvetemperatur)\n"
-" -r\t\tSlå indledende temperaturovergang fra\n"
-" -s SKÆRM\tX-skærm som skal justeres\n"
-" -t DAG:NAT\tFarvetemperatur som sættes hhv. dag og nat\n"
-
-#: src/redshift.c:278
-msgid "Malformed gamma argument.\n"
-msgstr "Fejl i gamma-argument.\n"
-
-#: src/redshift.c:280 src/redshift.c:299 src/redshift.c:350 src/redshift.c:363
-#: src/redshift.c:373
-msgid "Try `--help' for more information.\n"
-msgstr "Prøv `--help' for mere information.\n"
-
-#: src/redshift.c:297
-msgid "Malformed location argument.\n"
-msgstr "Fejl i placeringsargument.\n"
-
-#: src/redshift.c:313
-msgid "RANDR method was not enabled at compile time.\n"
-msgstr "RANDR metode blev ikke slået til under kompilering.\n"
-
-#: src/redshift.c:323
-msgid "VidMode method was not enabled at compile time.\n"
-msgstr "VidMode metode blev ikke slået til under kompilering.\n"
-
-#. TRANSLATORS: This refers to the method
-#. used to adjust colors e.g VidMode
-#: src/redshift.c:331
-#, c-format
-msgid "Unknown method `%s'.\n"
-msgstr "Ukendt metode `%s'.\n"
-
-#: src/redshift.c:348
-msgid "Malformed temperature argument.\n"
-msgstr "Fejl i temperaturargument.\n"
-
-#: src/redshift.c:362
-#, c-format
-msgid "Unknown parameter `%c'.\n"
-msgstr "Ukendt parameter `%c'.\n"
-
-#: src/redshift.c:372
-msgid "Latitude and longitude must be set.\n"
-msgstr "Breddegrad og længdegrad skal angives.\n"
-
-#. TRANSLATORS: Append degree symbols if possible.
-#: src/redshift.c:380
-#, c-format
-msgid "Location: %f, %f\n"
-msgstr "Placering: %f°, %f°\n"
-
-#: src/redshift.c:387
-#, c-format
-msgid "Latitude must be between %.1f and %.1f.\n"
-msgstr "Breddegrad skal være mellem %.1f° og %.1f°.\n"
-
-#: src/redshift.c:396
-#, c-format
-msgid "Longitude must be between %.1f and %.1f.\n"
-msgstr "Længdegrad skal være mellem %.1f° og %.1f°.\n"
-
-#: src/redshift.c:404 src/redshift.c:412
-#, c-format
-msgid "Temperature must be between %uK and %uK.\n"
-msgstr "Temperatur skal være mellem %uK og %uK.\n"
-
-#: src/redshift.c:422
-#, c-format
-msgid "Gamma value must be between %.1f and %.1f.\n"
-msgstr "Gamma-værdi skal være mellem %.1f og %.1f.\n"
-
-#: src/redshift.c:428
-#, c-format
-msgid "Gamma: %.3f, %.3f, %.3f\n"
-msgstr "Gamma: %.3f, %.3f, %.3f\n"
-
-#: src/redshift.c:440
-msgid "Initialization of RANDR failed.\n"
-msgstr "Fejl under klargøring af RANDR.\n"
-
-#: src/redshift.c:442
-msgid "Trying other method...\n"
-msgstr "Prøver anden metode...\n"
-
-#: src/redshift.c:457
-msgid "Initialization of VidMode failed.\n"
-msgstr "Fejl under klargøring af VidMode.\n"
-
-#. TRANSLATORS: Append degree symbol if possible.
-#: src/redshift.c:480
-#, c-format
-msgid "Solar elevation: %f\n"
-msgstr "Solhøjde: %f°\n"
-
-#: src/redshift.c:487 src/redshift.c:649
-#, c-format
-msgid "Color temperature: %uK\n"
-msgstr "Farvetemperatur: %uK\n"
-
-#: src/redshift.c:493 src/redshift.c:658
-msgid "Temperature adjustment failed.\n"
-msgstr "Fejl ved justering af temperatur.\n"
-
-#: src/vidmode.c:42 src/vidmode.c:54 src/vidmode.c:64 src/vidmode.c:94
-#: src/vidmode.c:125 src/vidmode.c:154
-#, c-format
-msgid "X request failed: %s\n"
-msgstr "Fejl ved X forespørgsel: %s\n"
-
-#: src/vidmode.c:71 src/randr.c:157
-#, c-format
-msgid "Gamma ramp size too small: %i\n"
-msgstr "Størrelsen på gammarampen er for lille: %i\n"
-
-#: src/randr.c:57 src/randr.c:104 src/randr.c:144 src/randr.c:172
-#: src/randr.c:231 src/randr.c:283
-#, c-format
-msgid "`%s' returned error %d\n"
-msgstr "`%s' returnerede fejlen %d\n"
-
-#: src/randr.c:65
-#, c-format
-msgid "Unsupported RANDR version (%u.%u)\n"
-msgstr "Ikke-understøttet RANDR version (%u.%u)\n"
-
-#: src/randr.c:88
-#, c-format
-msgid "Screen %i could not be found.\n"
-msgstr "Skærm %i kunne ikke findes.\n"
-
-#: src/randr.c:233
-#, c-format
-msgid "Unable to restore CRTC %i\n"
-msgstr "Kan ikke genskabe CRTC %i\n"
diff --git a/po/redshift/ru.po b/po/ru.po
index 50ac556..9188d23 100644
--- a/po/redshift/ru.po
+++ b/po/ru.po
@@ -3,19 +3,24 @@
# This file is distributed under the same license as the redshift package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
#
+#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: redshift\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2010-02-02 00:50+0100\n"
-"PO-Revision-Date: 2010-02-02 21:12+0000\n"
+"Report-Msgid-Bugs-To: https://bugs.launchpad.net/redshift\n"
+"POT-Creation-Date: 2010-02-10 23:46+0100\n"
+"PO-Revision-Date: 2010-02-02 09:20+0000\n"
"Last-Translator: Gregory Petrosyan <gregory.petrosyan@gmail.com>\n"
"Language-Team: Russian <ru@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"#-#-#-#-# ru.po (redshift) #-#-#-#-#\n"
"X-Launchpad-Export-Date: 2010-02-03 04:52+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
+"#-#-#-#-# ru.po (redshift) #-#-#-#-#\n"
+"X-Launchpad-Export-Date: 2010-02-03 04:51+0000\n"
+"X-Generator: Launchpad (build Unknown)\n"
#: src/redshift.c:172
#, c-format
@@ -32,7 +37,7 @@ msgstr "Период: Переходный (%.2f%% дневной)\n"
msgid "Period: Daytime\n"
msgstr "Период: День\n"
-#. TRANSLATORS: --help output 1
+#. TRANSLATORS: help output 1
#. LAT is latitude, LON is longitude,
#. DAY is temperature at daytime,
#. NIGHT is temperature at night
@@ -42,13 +47,13 @@ msgstr "Период: День\n"
msgid "Usage: %s -l LAT:LON -t DAY:NIGHT [OPTIONS...]\n"
msgstr "Использование: %s -l ШИР:ДОЛ -t ДЕНЬ:НОЧЬ [ОПЦИИ...]\n"
-#. TRANSLATORS: --help output 2
+#. TRANSLATORS: help output 2
#. no-wrap
#: src/redshift.c:204
msgid "Set color temperature of display according to time of day.\n"
msgstr "Установить цветовую температуру в соответствии со временем суток.\n"
-#. TRANSLATORS: --help output 3
+#. TRANSLATORS: help output 3
#. no-wrap
#: src/redshift.c:210
msgid ""
@@ -58,7 +63,7 @@ msgstr ""
" -h\t\tОтобразить это справочное сообщение\n"
" -v\t\tМногословный вывод\n"
-#. TRANSLATORS: --help output 4
+#. TRANSLATORS: help output 4
#. no-wrap
#: src/redshift.c:216
msgid ""
@@ -82,10 +87,10 @@ msgstr ""
msgid "Malformed gamma argument.\n"
msgstr "Некорректная величина гаммы.\n"
-#: src/redshift.c:280 src/redshift.c:299 src/redshift.c:350 src/redshift.c:363
-#: src/redshift.c:373
-msgid "Try `--help' for more information.\n"
-msgstr "Воспользуйтесь «--help» для получения дополнительной информации.\n"
+#: src/redshift.c:280 src/redshift.c:299 src/redshift.c:350 src/redshift.c:362
+#: src/redshift.c:371
+msgid "Try `-h' for more information.\n"
+msgstr "Воспользуйтесь «-h» для получения дополнительной информации.\n"
#: src/redshift.c:297
msgid "Malformed location argument.\n"
@@ -110,84 +115,68 @@ msgstr "Неизвестный метод «%s».\n"
msgid "Malformed temperature argument.\n"
msgstr "Некорректное значение температуры.\n"
-#: src/redshift.c:362
-#, c-format
-msgid "Unknown parameter `%c'.\n"
-msgstr "Неизвестный параметр «%c».\n"
-
-#: src/redshift.c:372
+#: src/redshift.c:370
msgid "Latitude and longitude must be set.\n"
msgstr "Широта и долгота должны быть указаны.\n"
#. TRANSLATORS: Append degree symbols if possible.
-#: src/redshift.c:380
+#: src/redshift.c:377
#, c-format
msgid "Location: %f, %f\n"
msgstr "Местоположение: %f°, %f°\n"
-#: src/redshift.c:387
+#: src/redshift.c:384
#, c-format
msgid "Latitude must be between %.1f and %.1f.\n"
msgstr "Широта должна быть между %.1f и %.1f.\n"
-#: src/redshift.c:396
+#: src/redshift.c:393
#, c-format
msgid "Longitude must be between %.1f and %.1f.\n"
msgstr "Долгота должна быть между %.1f и %.1f.\n"
-#: src/redshift.c:404 src/redshift.c:412
+#: src/redshift.c:401 src/redshift.c:409
#, c-format
msgid "Temperature must be between %uK and %uK.\n"
msgstr "Температура должна быть между %uK и %uK.\n"
-#: src/redshift.c:422
+#: src/redshift.c:419
#, c-format
msgid "Gamma value must be between %.1f and %.1f.\n"
msgstr "Гамма должна быть между %.1f и %.1f.\n"
-#: src/redshift.c:428
+#: src/redshift.c:425
#, c-format
msgid "Gamma: %.3f, %.3f, %.3f\n"
msgstr "Гамма: %.3f, %.3f, %.3f\n"
-#: src/redshift.c:440
+#: src/redshift.c:437
msgid "Initialization of RANDR failed.\n"
msgstr "Инициализация RANDR не удалась.\n"
-#: src/redshift.c:442
+#: src/redshift.c:439
msgid "Trying other method...\n"
msgstr "Пробую другой метод...\n"
-#: src/redshift.c:457
+#: src/redshift.c:454
msgid "Initialization of VidMode failed.\n"
msgstr "Инициализация VidMode не удалась.\n"
#. TRANSLATORS: Append degree symbol if possible.
-#: src/redshift.c:480
+#: src/redshift.c:477
#, c-format
msgid "Solar elevation: %f\n"
msgstr "Высота Солнца над горизонтом: %f°\n"
-#: src/redshift.c:487 src/redshift.c:649
+#: src/redshift.c:484 src/redshift.c:646
#, c-format
msgid "Color temperature: %uK\n"
msgstr "Цветовая температура: %uK\n"
-#: src/redshift.c:493 src/redshift.c:658
+#: src/redshift.c:490 src/redshift.c:655
msgid "Temperature adjustment failed.\n"
msgstr "Корректировка цветовой температуры не удалась.\n"
-#: src/vidmode.c:42 src/vidmode.c:54 src/vidmode.c:64 src/vidmode.c:94
-#: src/vidmode.c:125 src/vidmode.c:154
-#, c-format
-msgid "X request failed: %s\n"
-msgstr "Запрос X не удался: %s\n"
-
-#: src/vidmode.c:71 src/randr.c:157
-#, c-format
-msgid "Gamma ramp size too small: %i\n"
-msgstr "Размер кривой гаммы слишком мал: %i\n"
-
#: src/randr.c:57 src/randr.c:104 src/randr.c:144 src/randr.c:172
#: src/randr.c:231 src/randr.c:283
#, c-format
@@ -204,7 +193,25 @@ msgstr "Неподдерживаемая версия RANDR (%u.%u)\n"
msgid "Screen %i could not be found.\n"
msgstr "Экран %i не может быть найден.\n"
+#: src/randr.c:157 src/vidmode.c:71
+#, c-format
+msgid "Gamma ramp size too small: %i\n"
+msgstr "Размер кривой гаммы слишком мал: %i\n"
+
#: src/randr.c:233
#, c-format
msgid "Unable to restore CRTC %i\n"
msgstr "Не удается восстановить CRTC %i\n"
+
+#: src/vidmode.c:42 src/vidmode.c:54 src/vidmode.c:64 src/vidmode.c:94
+#: src/vidmode.c:125 src/vidmode.c:154
+#, c-format
+msgid "X request failed: %s\n"
+msgstr "Запрос X не удался: %s\n"
+
+#: src/gtk-redshift/gtk-redshift.py:61
+msgid "Toggle"
+msgstr "Включить / Выключить"
+
+#~ msgid "Unknown parameter `%c'.\n"
+#~ msgstr "Неизвестный параметр «%c».\n"
diff --git a/src/gtk-redshift/defs.py.in b/src/gtk-redshift/defs.py.in
new file mode 100644
index 0000000..91eccf9
--- /dev/null
+++ b/src/gtk-redshift/defs.py.in
@@ -0,0 +1,21 @@
+#!/usr/bin/env python
+# defs.py -- GTK+ redshift local definitions
+# This file is part of Redshift.
+
+# Redshift is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# Redshift is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with Redshift. If not, see <http://www.gnu.org/licenses/>.
+
+# Copyright (c) 2010 Jon Lund Steffensen <jonlst@gmail.com>
+
+
+LOCALEDIR = '@localedir@'
diff --git a/src/gtk-redshift/gtk-redshift b/src/gtk-redshift/gtk-redshift.py
index cdb4ebe..a737154 100755
--- a/src/gtk-redshift/gtk-redshift
+++ b/src/gtk-redshift/gtk-redshift.py
@@ -27,11 +27,13 @@ pygtk.require("2.0")
import gtk, glib
+import defs
+
if __name__ == '__main__':
# Internationalisation
- gettext.bindtextdomain('gtk-redshift')
- gettext.textdomain('gtk-redshift')
+ gettext.bindtextdomain('redshift', defs.LOCALEDIR)
+ gettext.textdomain('redshift')
_ = gettext.gettext
# Start redshift with arguments from the command line
diff --git a/src/redshift.c b/src/redshift.c
index c022224..9c3f404 100644
--- a/src/redshift.c
+++ b/src/redshift.c
@@ -190,7 +190,7 @@ calculate_temp(double elevation, int temp_day, int temp_night,
static void
print_help(const char *program_name)
{
- /* TRANSLATORS: --help output 1
+ /* TRANSLATORS: help output 1
LAT is latitude, LON is longitude,
DAY is temperature at daytime,
NIGHT is temperature at night
@@ -199,19 +199,19 @@ print_help(const char *program_name)
program_name);
fputs("\n", stdout);
- /* TRANSLATORS: --help output 2
+ /* TRANSLATORS: help output 2
no-wrap */
fputs(_("Set color temperature of display"
" according to time of day.\n"), stdout);
fputs("\n", stdout);
- /* TRANSLATORS: --help output 3
+ /* TRANSLATORS: help output 3
no-wrap */
fputs(_(" -h\t\tDisplay this help message\n"
" -v\t\tVerbose output\n"), stdout);
fputs("\n", stdout);
- /* TRANSLATORS: --help output 4
+ /* TRANSLATORS: help output 4
no-wrap */
fputs(_(" -g R:G:B\tAdditional gamma correction to apply\n"
" -l LAT:LON\tYour current location\n"
@@ -225,7 +225,7 @@ print_help(const char *program_name)
stdout);
fputs("\n", stdout);
- /* TRANSLATORS: --help output 5 */
+ /* TRANSLATORS: help output 5 */
printf("Please report bugs to <%s>\n", PACKAGE_BUGREPORT);
}
@@ -241,8 +241,8 @@ main(int argc, char *argv[])
#ifdef ENABLE_NLS
/* Internationalisation */
- bindtextdomain("redshift", "/usr/share/locale");
- textdomain("redshift");
+ bindtextdomain(PACKAGE, LOCALEDIR);
+ textdomain(PACKAGE);
#endif
/* Initialize to defaults */
@@ -277,7 +277,7 @@ main(int argc, char *argv[])
if (s == NULL) {
fputs(_("Malformed gamma argument.\n"),
stderr);
- fputs(_("Try `--help' for more"
+ fputs(_("Try `-h' for more"
" information.\n"), stderr);
exit(EXIT_FAILURE);
}
@@ -296,8 +296,8 @@ main(int argc, char *argv[])
if (s == NULL) {
fputs(_("Malformed location argument.\n"),
stderr);
- fputs(_("Try `--help' for more"
- " information.\n"), stderr);
+ fputs(_("Try `-h' for more information.\n"),
+ stderr);
exit(EXIT_FAILURE);
}
*(s++) = '\0';
@@ -347,8 +347,8 @@ main(int argc, char *argv[])
if (s == NULL) {
fputs(_("Malformed temperature argument.\n"),
stderr);
- fputs(_("Try `--help' for more"
- " information.\n"), stderr);
+ fputs(_("Try `-h' for more information.\n"),
+ stderr);
exit(EXIT_FAILURE);
}
*(s++) = '\0';
@@ -358,10 +358,8 @@ main(int argc, char *argv[])
case 'v':
verbose = 1;
break;
- default:
- fprintf(stderr, _("Unknown parameter `%c'.\n"), opt);
- fputs(_("Try `--help' for more"
- " information.\n"), stderr);
+ case '?':
+ fputs(_("Try `-h' for more information.\n"), stderr);
exit(EXIT_FAILURE);
break;
}
@@ -370,8 +368,7 @@ main(int argc, char *argv[])
/* Latitude and longitude must be set */
if (isnan(lat) || isnan(lon)) {
fputs(_("Latitude and longitude must be set.\n"), stderr);
- fputs(_("Try `--help' for more"
- " information.\n"), stderr);
+ fputs(_("Try `-h' for more information.\n"), stderr);
exit(EXIT_FAILURE);
}