diff --git a/po/Makefile.in b/po/Makefile.in new file mode 100644 index 0000000..024418b --- /dev/null +++ b/po/Makefile.in @@ -0,0 +1,166 @@ +include Makevars + +top_srcdir = @top_srcdir@ +PACKAGE = @PACKAGE@ +VERSION = @VERSION@ +distdir = $(top_srcdir)/$(PACKAGE)-$(VERSION) + +XGETTEXT = xgettext +MSGFMT = msgfmt +MSGMERGE = msgmerge +MSGINIT = msginit + +LOCALEDIR = @LOCALEDIR@ +APPLICATIONSDIR = @APPLICATIONSDIR@ + +DISTFILES= en.po fr.po Makefile.in Makevars sane-frontends.pot + +XGETTEXTOPTIONSCOMMON = --add-comments --sort-output --msgid-bugs-address=$(BUGSADDR) --package-name=$(DOMAIN) --from-code=UTF-8 + +PO_REGEX = ^([a-z][a-z]|[a-z][a-z]_[A-Z][A-Z])\.po$$ +LOCALE_REGEX = ^[a-z][a-z]_[A-Z][A-Z]\.utf8$$ + +check_defined = \ + $(strip $(foreach 1,$1, \ + $(call __check_defined,$1,$(strip $(value 2))))) +__check_defined = \ + $(if $(value $1),, \ + $(error Undefined $1$(if $2, ($2)))) + +$(call check_defined, DOMAIN) +$(call check_defined, BUGSADDR) + + +.SUFFIXES: .po .mo .pot + +PO = $(wildcard *.po) +LANG = $(basename $(PO)) +ifneq ($(SOURCES_SH)$(SOURCES_PY)$(SOURCES_JAVA)$(SOURCES_C)$(SOURCES_CPP),) +MO = $(addsuffix .mo,$(LANG)) +endif +DESKTOPS = $(basename $(SOURCES_DESKTOP)) + +%.mo: %.po + @$(MSGFMT) -c --verbose --statistics -o $@ $< + +%.po: SHELL := /bin/bash +%.po: + @if [[ ! "$@" =~ $(PO_REGEX) ]] ; then \ + echo "Invalid po file name, must be either xx.po or xx_YY.po" ;\ + exit 1; \ + fi + @if ! test -f $@; then \ + echo "File $@ does not exist." ; \ + if [[ "$*.utf8" =~ $(LOCALE_REGEX) ]] ; then \ + if LANG=POSIX locale -a | grep -qxF "$*.utf8" ; then : ; else \ + echo "Locale '$*.utf8' not found on your system" ; exit 1 ; \ + fi; \ + else \ + if LANG=POSIX locale -a | grep -qE "^$*_" ; then : ; else \ + echo "No locale matching '$*' found on your system (see 'locale -a')" ; exit 1; \ + fi; \ + fi; \ + echo -e "You can create it with :\n"; \ + for ln in $$(LANG=POSIX locale -a | grep -E "^($*_|$*).*\.utf8") ; do \ + echo " # $(MSGINIT) -l $$ln -i $(DOMAIN).pot -o $@"; \ + done; \ + echo ; exit 1; \ + fi; + +%.desktop: %.desktop.in $(PO) + @echo Generating desktop file : $@ + @tmpfiles="$@-t $@-n-t"; \ + cp $< $@-t || exit 1; \ + for pofile in $(PO); do \ + $(MSGFMT) --desktop --template $@-t -o $@-n-t \ + --locale $${pofile%.po} $$pofile \ + || { $(RM) $$tmpfiles; exit 1; }; \ + mv $@-n-t $@-t || { $(RM) $$tmpfiles; exit 1; } \ + done; \ + mv $@-t $@ || { $(RM) $$tmpfiles; exit 1; } \ + +all: $(MO) $(DESKTOPS) + +update-po: SHELL := /bin/bash +update-po: $(DOMAIN).pot + @for po in $(PO); do \ + echo -n "Updating $$po "; \ + if [[ ! "$$po" =~ $(PO_REGEX) ]] ; then \ + echo " : invalid po file name, must be either xx.po or xx_YY.po" ;\ + exit 1; \ + fi; \ + $(MSGMERGE) --previous -U $$po $(DOMAIN).pot; \ + done; + +$(DOMAIN).pot: Makevars $(SOURCES_SH) $(SOURCES_PY) $(SOURCES_JAVA) $(SOURCES_C) $(SOURCES_CPP) $(SOURCES_DESKTOP) + @echo "Updating $@ .. " + @$(shell :> $@) +ifdef SOURCES_SH + @echo -n " - SH .. " + @$(XGETTEXT) $(XGETTEXTOPTIONSCOMMON) $(XGETTEXTOPTIONS_SH) -o $@ -j $(SOURCES_SH) + @echo done +endif +ifdef SOURCES_PY + @echo -n " - PY .. " + @$(XGETTEXT) $(XGETTEXTOPTIONSCOMMON) $(XGETTEXTOPTIONS_PY) -o $@ -j $(SOURCES_PY) + @echo done +endif +ifdef SOURCES_JAVA + @echo -n " - JAVA .. " + @$(XGETTEXT) $(XGETTEXTOPTIONSCOMMON) $(XGETTEXTOPTIONS_JAVA) -o $@ -j $(SOURCES_JAVA) + @echo done +endif +ifdef SOURCES_C + @echo -n " - C .. " + @$(XGETTEXT) $(XGETTEXTOPTIONSCOMMON) $(XGETTEXTOPTIONS_C) -o $@ -j $(SOURCES_C) + @echo done +endif +ifdef SOURCES_CPP + @echo -n " - CPP .. " + @$(XGETTEXT) $(XGETTEXTOPTIONSCOMMON) $(XGETTEXTOPTIONS_CPP) -o $@ -j $(SOURCES_CPP) + @echo done +endif +ifdef SOURCES_DESKTOP + @echo -n " - DESKTOP .. " + @$(XGETTEXT) $(XGETTEXTOPTIONSCOMMON) $(XGETTEXTOPTIONS_DESKTOP) -o $@ -j $(SOURCES_DESKTOP) + @echo done +endif + +install: all + for i in $(MO) ; do \ + t=$(DESTDIR)/$(LOCALEDIR)/`basename $$i .mo`/LC_MESSAGES ;\ + install -d $$t ;\ + install -m 644 $$i $$t/$(DOMAIN).mo ;\ + done + for i in $(DESKTOPS) ; do \ + t=$(DESTDIR)/$(APPLICATIONSDIR) ;\ + install -d $$t ;\ + install -m 644 $$i $$t/`basename $$i` ;\ + done + +clean: + $(RM) $(MO) *~ $(DESKTOPS) + +distclean: clean + +maintainer-clean: clean + +check: SHELL := /bin/bash +check: + @for po in $(PO); do \ + echo -n "Checking $$po "; \ + if [[ ! "$$po" =~ $(PO_REGEX) ]] ; then \ + echo " : invalid po file name, must be either xx.po or xx_YY.po" ;\ + exit 1; \ + else \ + echo ".. done"; \ + fi; \ + done; + +.PHONY: all update-po install clean distclean maintainer-clean check + +dist: $(DISTFILES) + for file in $(DISTFILES); do \ + ln $$file $(distdir)/po 2> /dev/null \ + || cp -p $$file $(distdir)/po ; \ + done diff --git a/po/Makevars b/po/Makevars new file mode 100644 index 0000000..097e4b8 --- /dev/null +++ b/po/Makevars @@ -0,0 +1,9 @@ +DOMAIN = sane-frontends + +BUGSADDR = bugs@sane.fr + +# find .. -type f \! -path "*/.svn/*" \! -path "../po/*" -name "*.c" -exec grep -lF 'D_(' {} \; | sed -e 's/^/ /;s/$/ \\/' +XGETTEXTOPTIONS_C = --keyword=_ +SOURCES_C = \ + ../src/*.c + diff --git a/po/en.po b/po/en.po new file mode 100644 index 0000000..1ba66b8 --- /dev/null +++ b/po/en.po @@ -0,0 +1,391 @@ +msgid "" +msgstr "" +"Project-Id-Version: sconfig\n" +"Report-Msgid-Bugs-To: bugs@sane.fr\n" +"POT-Creation-Date: 2025-01-27 21:58+0100\n" +"Language: en\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: POEditor.com\n" + +#: ../src/xcam.c:1320 +msgid " Play " +msgstr "" + +#: ../src/xcam.c:1326 +msgid " Stop " +msgstr "" + +#: ../src/xcam.c:1401 +msgid "" +" TXT \n" +" OFF " +msgstr "" + +#: ../src/xcam.c:1406 +msgid "" +" TXT \n" +" ON " +msgstr "" + +#: ../src/xscanimage.c:525 +#, c-format +msgid "%dxunknown: unknown size" +msgstr "" + +#: ../src/xscanimage.c:999 +#, c-format +msgid "%s.input_available: bad frame format %d\n" +msgstr "" + +#: ../src/xscanimage.c:2129 +#, c-format +msgid "%s: GIMP support missing.\n" +msgstr "" + +#: ../src/xscanimage.c:2199 +#, c-format +msgid "%s: device %d is unavailable.\n" +msgstr "" + +#: ../src/xscanimage.c:1925 +msgid "0x0: 0KB" +msgstr "" + +#: ../src/xscanimage.c:333 ../src/xscanimage.c:380 +msgid "8th June 1997" +msgstr "" + +#: ../src/xscanimage.c:334 +msgid "/File/Acquire/xscanimage/Device dialog..." +msgstr "" + +#: ../src/xscanimage.c:331 ../src/xscanimage.c:332 ../src/xscanimage.c:378 +#: ../src/xscanimage.c:379 +msgid "Andy Beck, Tristan Tarrant, and David Mosberger" +msgstr "" + +#: ../src/xscanimage.c:1887 +msgid "Browse" +msgstr "" + +#. The Cancel button +#: ../src/gtkglue.c:338 ../src/gtkglue.c:360 ../src/xscanimage.c:1642 +#: ../src/xscanimage.c:2059 +msgid "Cancel" +msgstr "" + +#: ../src/xscanimage.c:1010 +#, c-format +msgid "Cannot handle depth %d." +msgstr "" + +#: ../src/xcam.c:1721 +msgid "Device" +msgstr "" + +#: ../src/xscanimage.c:827 +#, c-format +msgid "Error during read: %s." +msgstr "" + +#: ../src/gtkglue.c:1307 +msgid "Error obtaining option count." +msgstr "" + +#: ../src/xscanimage.c:1475 +msgid "Exit" +msgstr "" + +#: ../src/xscanimage.c:572 +#, c-format +msgid "Failed to create file: %s." +msgstr "" + +#: ../src/gtkglue.c:128 +#, c-format +msgid "Failed to determine home directory: %s." +msgstr "" + +#: ../src/xscanimage.c:1211 +#, c-format +msgid "Failed to get parameters: %s" +msgstr "" + +#: ../src/xcam.c:1253 +#, c-format +msgid "Failed to get parameters: %s." +msgstr "" + +#: ../src/gtkglue.c:400 +#, c-format +msgid "Failed to obtain value of option %s: %s." +msgstr "" + +#: ../src/xcam.c:1375 +#, c-format +msgid "Failed to open `%s': %s" +msgstr "" + +#: ../src/gtkglue.c:1298 +#, c-format +msgid "Failed to open device `%s': %s." +msgstr "" + +#: ../src/xcam.c:1367 +#, c-format +msgid "Failed to scan, wrong file extension, use pnm, pgm, pbm or ppm `%s'" +msgstr "" + +#: ../src/gtkglue.c:229 +#, c-format +msgid "Failed to set value of option %s: %s." +msgstr "" + +#: ../src/xscanimage.c:1201 +#, c-format +msgid "Failed to start scanner: %s" +msgstr "" + +#: ../src/xcam.c:1243 +#, c-format +msgid "Failed to start webcam: %s." +msgstr "" + +#: ../src/xcam.c:1717 ../src/xscanimage.c:1858 +msgid "File" +msgstr "" + +#: ../src/xscanimage.c:1876 +msgid "Filename" +msgstr "" + +#: ../src/xscanimage.c:328 ../src/xscanimage.c:374 +msgid "Front-end to the SANE interface" +msgstr "" + +#: ../src/xscanimage.c:1620 +msgid "Gamma correction value" +msgstr "" + +#: ../src/xscanimage.c:1222 +#, c-format +msgid "Hand-Scanner mode not supported" +msgstr "" + +#: ../src/xcam.c:1750 +msgid "Image view" +msgstr "" + +#: ../src/xscanimage.c:549 +#, c-format +msgid "Invalid parameters." +msgstr "" + +#: ../src/xscanimage.c:1787 +msgid "Length unit" +msgstr "" + +#: ../src/xscanimage.c:2224 +msgid "" +"No scanners were identified. If you were expecting something\n" +" different, check that the scanner is plugged in, turned on and\n" +" detected by sane-find-scanner (if appropriate). Please read\n" +" the documentation which came with this software (README, FAQ,\n" +" manpages).\n" +msgstr "" + +#. the confirmation button +#. fill in action area: +#: ../src/gtkglue.c:281 ../src/xscanimage.c:1635 +msgid "OK" +msgstr "" + +#. The OK button +#: ../src/gtkglue.c:337 ../src/gtkglue.c:359 ../src/xscanimage.c:2052 +msgid "Ok" +msgstr "" + +#: ../src/xscanimage.c:1867 +msgid "Output" +msgstr "" + +#: ../src/xcam.c:1632 +msgid "Output Filename" +msgstr "" + +#: ../src/xcam.c:1725 ../src/xscanimage.c:1862 +msgid "Preferences" +msgstr "" + +#. The Preview button +#: ../src/xscanimage.c:1944 +msgid "Preview Window" +msgstr "" + +#. preview options: +#: ../src/xscanimage.c:1796 +msgid "Preview options..." +msgstr "" + +#: ../src/xscanimage.c:335 ../src/xscanimage.c:380 +msgid "RGB, GRAY" +msgstr "" + +#: ../src/xscanimage.c:1358 +#, c-format +msgid "Receiving %s data for GIMP..." +msgstr "" + +#: ../src/xscanimage.c:1295 +#, c-format +msgid "Receiving %s data for `%s'..." +msgstr "" + +#: ../src/xscanimage.c:1800 +msgid "Restore device settings" +msgstr "" + +#: ../src/xcam.c:1385 +msgid "" +"Save\n" +"Frame" +msgstr "" + +#. insert separator: +#: ../src/xscanimage.c:1799 +msgid "Save device settings" +msgstr "" + +#: ../src/xcam.c:1350 +msgid "Saving started" +msgstr "" + +#. The Scan button +#: ../src/xscanimage.c:1935 +msgid "Scan" +msgstr "" + +#: ../src/xscanimage.c:1175 +#, c-format +msgid "Scanner is warming up." +msgstr "" + +#. scan_win.shell; +#: ../src/xscanimage.c:2007 +msgid "Select device" +msgstr "" + +#: ../src/xscanimage.c:1265 +#, c-format +msgid "Separate channel transfers are not supported with %d bits/channel." +msgstr "" + +#: ../src/xscanimage.c:1772 +msgid "Show advanced options" +msgstr "" + +#: ../src/xscanimage.c:1776 +msgid "Show tooltips" +msgstr "" + +#: ../src/xscanimage.c:1780 +msgid "Show two column display" +msgstr "" + +#: ../src/xscanimage.c:1309 +#, c-format +msgid "The Gimp doesn't support images with %d bits/channel." +msgstr "" + +#: ../src/xscanimage.c:329 ../src/xscanimage.c:375 +msgid "" +"This function provides access to scanners and other image acquisition " +"devices through the SANE (Scanner Access Now Easy) interface." +msgstr "" + +#: ../src/gtkglue.c:422 +msgid "Turns on automatic mode." +msgstr "" + +#: ../src/xcam.c:1655 +#, c-format +msgid "" +"Usage: %s [OPTION]... [DEVICE]\n" +"\n" +"Start up graphical user interface to access SANE (Scanner Access Now\n" +"Easy) devices.\n" +"\n" +"-h, --help display this help message and exit\n" +"-B, --buffersize set buffersize 1024 * 1024\n" +"-V, --version print version information\n" +msgstr "" + +#: ../src/xscanimage.c:2072 +#, c-format +msgid "" +"Usage: %s [OPTION]... [DEVICE]\n" +"\n" +"Start up graphical user interface to access SANE (Scanner Access Now\n" +"Easy) devices.\n" +"\n" +"-h, --help display this help message and exit\n" +"-V, --version print version information\n" +msgstr "" + +#: ../src/xscanimage.c:1605 +msgid "Use private colormap" +msgstr "" + +#: ../src/xscanimage.c:1176 +msgid "Warming up ..." +msgstr "" + +#: ../src/xscanimage.c:1791 +msgid "centimeters" +msgstr "" + +#: ../src/xscanimage.c:1793 +msgid "inches" +msgstr "" + +#: ../src/xscanimage.c:1789 +msgid "millimeters" +msgstr "" + +#: ../src/xscanimage.c:1579 +msgid "preview options" +msgstr "" + +#, fuzzy, c-format +#~| msgid "" +#~| "Appareil :\n" +#~| "\t%s (%s)\n" +#~| "\tD-Bus : %s\n" +#~| "\tType : %s\n" +#~| "\tJumelé : %s \n" +#~| "\tDe confiance : %s \n" +#~| "\tConnecté : %s\n" +#~ msgid "" +#~ "Appareil:\n" +#~ "\t%s (%s)\n" +#~ "\tD-Bus : %s\n" +#~ "\tType : %s\n" +#~ "\tJumelé : %s \n" +#~ "\tDe confiance : %s \n" +#~ "\tConnecté : %s\n" +#~ msgstr "" +#~ "Device :\n" +#~ "\t%s (%s)\n" +#~ "\tD-Bus : %s\n" +#~ "\tType : %s\n" +#~ "\tPaired : %s \n" +#~ "\tTrusted : %s \n" +#~ "\tConnected : %s\n" + +#~ msgid "Non" +#~ msgstr "False" + +#~ msgid "Oui" +#~ msgstr "True" diff --git a/po/fr.po b/po/fr.po new file mode 100644 index 0000000..2680080 --- /dev/null +++ b/po/fr.po @@ -0,0 +1,388 @@ +# French translations for sconfig-plugin-bluez package. +# Copyright (C) 2021 THE sconfig-plugin-bluez'S COPYRIGHT HOLDER +# This file is distributed under the same license as the sconfig-plugin-bluez package. +# Automatically generated, 2021. +# +msgid "" +msgstr "" +"Project-Id-Version: sconfig-plugin-bluez\n" +"Report-Msgid-Bugs-To: bugs@sane.fr\n" +"POT-Creation-Date: 2025-01-27 21:58+0100\n" +"PO-Revision-Date: 2021-07-20 13:35+0200\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: fr\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" + +#: ../src/xcam.c:1320 +msgid " Play " +msgstr "" + +#: ../src/xcam.c:1326 +msgid " Stop " +msgstr "" + +#: ../src/xcam.c:1401 +msgid "" +" TXT \n" +" OFF " +msgstr "" + +#: ../src/xcam.c:1406 +msgid "" +" TXT \n" +" ON " +msgstr "" + +#: ../src/xscanimage.c:525 +#, c-format +msgid "%dxunknown: unknown size" +msgstr "" + +#: ../src/xscanimage.c:999 +#, c-format +msgid "%s.input_available: bad frame format %d\n" +msgstr "%s.input_available : format de trame incorrect %d\n" + +#: ../src/xscanimage.c:2129 +#, c-format +msgid "%s: GIMP support missing.\n" +msgstr "%s: Support GIMP manquant.\n" + +#: ../src/xscanimage.c:2199 +#, c-format +msgid "%s: device %d is unavailable.\n" +msgstr "%s : le périphérique %d est indisponible.\n" + +#: ../src/xscanimage.c:1925 +msgid "0x0: 0KB" +msgstr "0x0: 0KB" + +#: ../src/xscanimage.c:333 ../src/xscanimage.c:380 +msgid "8th June 1997" +msgstr "8 juin 1997" + +#: ../src/xscanimage.c:334 +msgid "/File/Acquire/xscanimage/Device dialog..." +msgstr "" + +#: ../src/xscanimage.c:331 ../src/xscanimage.c:332 ../src/xscanimage.c:378 +#: ../src/xscanimage.c:379 +msgid "Andy Beck, Tristan Tarrant, and David Mosberger" +msgstr "Andy Beck, Tristan Tarrant, et David Mosberger" + +#: ../src/xscanimage.c:1887 +msgid "Browse" +msgstr "Parcourir" + +#. The Cancel button +#: ../src/gtkglue.c:338 ../src/gtkglue.c:360 ../src/xscanimage.c:1642 +#: ../src/xscanimage.c:2059 +msgid "Cancel" +msgstr "Annuler" + +#: ../src/xscanimage.c:1010 +#, c-format +msgid "Cannot handle depth %d." +msgstr "Impossible de gérer une profondeur de %d." + +#: ../src/xcam.c:1721 +msgid "Device" +msgstr "" + +#: ../src/xscanimage.c:827 +#, c-format +msgid "Error during read: %s." +msgstr "Erreur lors de la lecture : %s." + +#: ../src/gtkglue.c:1307 +msgid "Error obtaining option count." +msgstr "" + +#: ../src/xscanimage.c:1475 +msgid "Exit" +msgstr "Quitter" + +#: ../src/xscanimage.c:572 +#, c-format +msgid "Failed to create file: %s." +msgstr "Échec de la création du fichier : %s." + +#: ../src/gtkglue.c:128 +#, c-format +msgid "Failed to determine home directory: %s." +msgstr "Échec pour trouver le dossier home : %s." + +#: ../src/xscanimage.c:1211 +#, c-format +msgid "Failed to get parameters: %s" +msgstr "Échec de l'obtention des paramètres : %s." + +#: ../src/xcam.c:1253 +#, c-format +msgid "Failed to get parameters: %s." +msgstr "Échec de l'obtention des paramètres : %s." + +#: ../src/gtkglue.c:400 +#, c-format +msgid "Failed to obtain value of option %s: %s." +msgstr "Échec de l'obtention de la valeur de l'option %s : %s." + +#: ../src/xcam.c:1375 +#, c-format +msgid "Failed to open `%s': %s" +msgstr "Échec de l'ouverture de %s : %s." + +#: ../src/gtkglue.c:1298 +#, c-format +msgid "Failed to open device `%s': %s." +msgstr "Échec de l'ouverture du periphérique %s : %s." + +#: ../src/xcam.c:1367 +#, c-format +msgid "Failed to scan, wrong file extension, use pnm, pgm, pbm or ppm `%s'" +msgstr "" + +#: ../src/gtkglue.c:229 +#, c-format +msgid "Failed to set value of option %s: %s." +msgstr "Échec de la restauration de la valeur de l'option %s : %s." + +#: ../src/xscanimage.c:1201 +#, c-format +msgid "Failed to start scanner: %s" +msgstr "Échec du démarrage du scanner : %s" + +#: ../src/xcam.c:1243 +#, c-format +msgid "Failed to start webcam: %s." +msgstr "Échec du démarrage de la webcam : %s." + +#: ../src/xcam.c:1717 ../src/xscanimage.c:1858 +msgid "File" +msgstr "Fichier" + +#: ../src/xscanimage.c:1876 +msgid "Filename" +msgstr "Nom du fichier" + +#: ../src/xscanimage.c:328 ../src/xscanimage.c:374 +msgid "Front-end to the SANE interface" +msgstr "Interface utilisateur pour l'interface SANE" + +#: ../src/xscanimage.c:1620 +msgid "Gamma correction value" +msgstr "Valeur de correction gamma" + +#: ../src/xscanimage.c:1222 +#, c-format +msgid "Hand-Scanner mode not supported" +msgstr "Mode scanner manuel non pris en charge" + +#: ../src/xcam.c:1750 +msgid "Image view" +msgstr "aperçu image" + +#: ../src/xscanimage.c:549 +#, c-format +msgid "Invalid parameters." +msgstr "Paramètres invalides." + +#: ../src/xscanimage.c:1787 +msgid "Length unit" +msgstr "Unité de longueur" + +#: ../src/xscanimage.c:2224 +msgid "" +"No scanners were identified. If you were expecting something\n" +" different, check that the scanner is plugged in, turned on and\n" +" detected by sane-find-scanner (if appropriate). Please read\n" +" the documentation which came with this software (README, FAQ,\n" +" manpages).\n" +msgstr "" +"Aucun scanner n'a été détecté. Si vous vous attendiez à un résultat\n" +" différent, vérifiez que le scanner est branché, allumé et\n" +" détecté par sane-find-scanner (si applicable). Veuillez consulter\n" +" la documentation fournie avec ce logiciel (README, FAQ,\n" +" pages de manuel).\n" + +#. the confirmation button +#. fill in action area: +#: ../src/gtkglue.c:281 ../src/xscanimage.c:1635 +msgid "OK" +msgstr "Ok" + +#. The OK button +#: ../src/gtkglue.c:337 ../src/gtkglue.c:359 ../src/xscanimage.c:2052 +msgid "Ok" +msgstr "Ok" + +#: ../src/xscanimage.c:1867 +msgid "Output" +msgstr "Sortie" + +#: ../src/xcam.c:1632 +msgid "Output Filename" +msgstr "Nom du fichier de sorti" + +#: ../src/xcam.c:1725 ../src/xscanimage.c:1862 +msgid "Preferences" +msgstr "Préférences" + +#. The Preview button +#: ../src/xscanimage.c:1944 +msgid "Preview Window" +msgstr "Fenêtre d'aperçu" + +#. preview options: +#: ../src/xscanimage.c:1796 +msgid "Preview options..." +msgstr "Options d'aperçu..." + +#: ../src/xscanimage.c:335 ../src/xscanimage.c:380 +msgid "RGB, GRAY" +msgstr "RVB, GRIS" + +#: ../src/xscanimage.c:1358 +#, c-format +msgid "Receiving %s data for GIMP..." +msgstr "Réception des données %s pour GIMP..." + +#: ../src/xscanimage.c:1295 +#, c-format +msgid "Receiving %s data for `%s'..." +msgstr "Réception des données %s pour '%s'..." + +#: ../src/xscanimage.c:1800 +msgid "Restore device settings" +msgstr "Restaurer les paramètres du périphérique" + +#: ../src/xcam.c:1385 +msgid "" +"Save\n" +"Frame" +msgstr "" + +#. insert separator: +#: ../src/xscanimage.c:1799 +msgid "Save device settings" +msgstr "Enregistrer les paramètres du périphérique" + +#: ../src/xcam.c:1350 +msgid "Saving started" +msgstr "" + +#. The Scan button +#: ../src/xscanimage.c:1935 +msgid "Scan" +msgstr "Numériser" + +#: ../src/xscanimage.c:1175 +#, c-format +msgid "Scanner is warming up." +msgstr "Le scanner est en cours de préchauffage." + +#. scan_win.shell; +#: ../src/xscanimage.c:2007 +msgid "Select device" +msgstr "Sélectionner un périphérique" + +#: ../src/xscanimage.c:1265 +#, c-format +msgid "Separate channel transfers are not supported with %d bits/channel." +msgstr "" +"Les transferts de canaux séparés ne sont pas pris en charge avec %d bits par " +"canal." + +#: ../src/xscanimage.c:1772 +msgid "Show advanced options" +msgstr "Afficher les options avancées" + +#: ../src/xscanimage.c:1776 +msgid "Show tooltips" +msgstr "Afficher les infobulles" + +#: ../src/xscanimage.c:1780 +msgid "Show two column display" +msgstr "Afficher sur deux colonnes" + +#: ../src/xscanimage.c:1309 +#, c-format +msgid "The Gimp doesn't support images with %d bits/channel." +msgstr "GIMP ne prend pas en charge les images avec %d bits par canal." + +#: ../src/xscanimage.c:329 ../src/xscanimage.c:375 +msgid "" +"This function provides access to scanners and other image acquisition " +"devices through the SANE (Scanner Access Now Easy) interface." +msgstr "" + +#: ../src/gtkglue.c:422 +msgid "Turns on automatic mode." +msgstr "" + +#: ../src/xcam.c:1655 +#, c-format +msgid "" +"Usage: %s [OPTION]... [DEVICE]\n" +"\n" +"Start up graphical user interface to access SANE (Scanner Access Now\n" +"Easy) devices.\n" +"\n" +"-h, --help display this help message and exit\n" +"-B, --buffersize set buffersize 1024 * 1024\n" +"-V, --version print version information\n" +msgstr "" +"Utilisation : %s [OPTION]... [PÉRIPHÉRIQUE]\n" +"\n" +"Lancer l'interface utilisateur graphique pour accéder aux périphériques\n" +"SANE (Scanner Access Now Easy).\n" +"\n" +"-h, --help afficher ce message d'aide et quitter\n" +"-V, --version afficher les informations de version\n" + +#: ../src/xscanimage.c:2072 +#, c-format +msgid "" +"Usage: %s [OPTION]... [DEVICE]\n" +"\n" +"Start up graphical user interface to access SANE (Scanner Access Now\n" +"Easy) devices.\n" +"\n" +"-h, --help display this help message and exit\n" +"-V, --version print version information\n" +msgstr "" +"Utilisation : %s [OPTION]... [PÉRIPHÉRIQUE]\n" +"\n" +"Lancer l'interface utilisateur graphique pour accéder aux périphériques\n" +"SANE (Scanner Access Now Easy).\n" +"\n" +"-h, --help afficher ce message d'aide et quitter\n" +"-V, --version afficher les informations de version\n" + +#: ../src/xscanimage.c:1605 +msgid "Use private colormap" +msgstr "Utiliser une palette de couleurs privée" + +#: ../src/xscanimage.c:1176 +msgid "Warming up ..." +msgstr "Préchauffage en cours ..." + +#: ../src/xscanimage.c:1791 +msgid "centimeters" +msgstr "centimètres" + +#: ../src/xscanimage.c:1793 +msgid "inches" +msgstr "pouces" + +#: ../src/xscanimage.c:1789 +msgid "millimeters" +msgstr "millimètres" + +#: ../src/xscanimage.c:1579 +msgid "preview options" +msgstr "options d'aperçu" diff --git a/po/sane-frontends.pot b/po/sane-frontends.pot new file mode 100644 index 0000000..e115c17 --- /dev/null +++ b/po/sane-frontends.pot @@ -0,0 +1,367 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the sane-frontends package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: sane-frontends\n" +"Report-Msgid-Bugs-To: bugs@sane.fr\n" +"POT-Creation-Date: 2025-01-27 21:58+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" + +#: ../src/xcam.c:1320 +msgid " Play " +msgstr "" + +#: ../src/xcam.c:1326 +msgid " Stop " +msgstr "" + +#: ../src/xcam.c:1401 +msgid "" +" TXT \n" +" OFF " +msgstr "" + +#: ../src/xcam.c:1406 +msgid "" +" TXT \n" +" ON " +msgstr "" + +#: ../src/xscanimage.c:525 +#, c-format +msgid "%dxunknown: unknown size" +msgstr "" + +#: ../src/xscanimage.c:999 +#, c-format +msgid "%s.input_available: bad frame format %d\n" +msgstr "" + +#: ../src/xscanimage.c:2129 +#, c-format +msgid "%s: GIMP support missing.\n" +msgstr "" + +#: ../src/xscanimage.c:2199 +#, c-format +msgid "%s: device %d is unavailable.\n" +msgstr "" + +#: ../src/xscanimage.c:1925 +msgid "0x0: 0KB" +msgstr "" + +#: ../src/xscanimage.c:333 ../src/xscanimage.c:380 +msgid "8th June 1997" +msgstr "" + +#: ../src/xscanimage.c:334 +msgid "/File/Acquire/xscanimage/Device dialog..." +msgstr "" + +#: ../src/xscanimage.c:331 ../src/xscanimage.c:332 ../src/xscanimage.c:378 +#: ../src/xscanimage.c:379 +msgid "Andy Beck, Tristan Tarrant, and David Mosberger" +msgstr "" + +#: ../src/xscanimage.c:1887 +msgid "Browse" +msgstr "" + +#. The Cancel button +#: ../src/gtkglue.c:338 ../src/gtkglue.c:360 ../src/xscanimage.c:1642 +#: ../src/xscanimage.c:2059 +msgid "Cancel" +msgstr "" + +#: ../src/xscanimage.c:1010 +#, c-format +msgid "Cannot handle depth %d." +msgstr "" + +#: ../src/xcam.c:1721 +msgid "Device" +msgstr "" + +#: ../src/xscanimage.c:827 +#, c-format +msgid "Error during read: %s." +msgstr "" + +#: ../src/gtkglue.c:1307 +msgid "Error obtaining option count." +msgstr "" + +#: ../src/xscanimage.c:1475 +msgid "Exit" +msgstr "" + +#: ../src/xscanimage.c:572 +#, c-format +msgid "Failed to create file: %s." +msgstr "" + +#: ../src/gtkglue.c:128 +#, c-format +msgid "Failed to determine home directory: %s." +msgstr "" + +#: ../src/xscanimage.c:1211 +#, c-format +msgid "Failed to get parameters: %s" +msgstr "" + +#: ../src/xcam.c:1253 +#, c-format +msgid "Failed to get parameters: %s." +msgstr "" + +#: ../src/gtkglue.c:400 +#, c-format +msgid "Failed to obtain value of option %s: %s." +msgstr "" + +#: ../src/xcam.c:1375 +#, c-format +msgid "Failed to open `%s': %s" +msgstr "" + +#: ../src/gtkglue.c:1298 +#, c-format +msgid "Failed to open device `%s': %s." +msgstr "" + +#: ../src/xcam.c:1367 +#, c-format +msgid "Failed to scan, wrong file extension, use pnm, pgm, pbm or ppm `%s'" +msgstr "" + +#: ../src/gtkglue.c:229 +#, c-format +msgid "Failed to set value of option %s: %s." +msgstr "" + +#: ../src/xscanimage.c:1201 +#, c-format +msgid "Failed to start scanner: %s" +msgstr "" + +#: ../src/xcam.c:1243 +#, c-format +msgid "Failed to start webcam: %s." +msgstr "" + +#: ../src/xcam.c:1717 ../src/xscanimage.c:1858 +msgid "File" +msgstr "" + +#: ../src/xscanimage.c:1876 +msgid "Filename" +msgstr "" + +#: ../src/xscanimage.c:328 ../src/xscanimage.c:374 +msgid "Front-end to the SANE interface" +msgstr "" + +#: ../src/xscanimage.c:1620 +msgid "Gamma correction value" +msgstr "" + +#: ../src/xscanimage.c:1222 +#, c-format +msgid "Hand-Scanner mode not supported" +msgstr "" + +#: ../src/xcam.c:1750 +msgid "Image view" +msgstr "" + +#: ../src/xscanimage.c:549 +#, c-format +msgid "Invalid parameters." +msgstr "" + +#: ../src/xscanimage.c:1787 +msgid "Length unit" +msgstr "" + +#: ../src/xscanimage.c:2224 +msgid "" +"No scanners were identified. If you were expecting something\n" +" different, check that the scanner is plugged in, turned on and\n" +" detected by sane-find-scanner (if appropriate). Please read\n" +" the documentation which came with this software (README, FAQ,\n" +" manpages).\n" +msgstr "" + +#. the confirmation button +#. fill in action area: +#: ../src/gtkglue.c:281 ../src/xscanimage.c:1635 +msgid "OK" +msgstr "" + +#. The OK button +#: ../src/gtkglue.c:337 ../src/gtkglue.c:359 ../src/xscanimage.c:2052 +msgid "Ok" +msgstr "" + +#: ../src/xscanimage.c:1867 +msgid "Output" +msgstr "" + +#: ../src/xcam.c:1632 +msgid "Output Filename" +msgstr "" + +#: ../src/xcam.c:1725 ../src/xscanimage.c:1862 +msgid "Preferences" +msgstr "" + +#. The Preview button +#: ../src/xscanimage.c:1944 +msgid "Preview Window" +msgstr "" + +#. preview options: +#: ../src/xscanimage.c:1796 +msgid "Preview options..." +msgstr "" + +#: ../src/xscanimage.c:335 ../src/xscanimage.c:380 +msgid "RGB, GRAY" +msgstr "" + +#: ../src/xscanimage.c:1358 +#, c-format +msgid "Receiving %s data for GIMP..." +msgstr "" + +#: ../src/xscanimage.c:1295 +#, c-format +msgid "Receiving %s data for `%s'..." +msgstr "" + +#: ../src/xscanimage.c:1800 +msgid "Restore device settings" +msgstr "" + +#: ../src/xcam.c:1385 +msgid "" +"Save\n" +"Frame" +msgstr "" + +#. insert separator: +#: ../src/xscanimage.c:1799 +msgid "Save device settings" +msgstr "" + +#: ../src/xcam.c:1350 +msgid "Saving started" +msgstr "" + +#. The Scan button +#: ../src/xscanimage.c:1935 +msgid "Scan" +msgstr "" + +#: ../src/xscanimage.c:1175 +#, c-format +msgid "Scanner is warming up." +msgstr "" + +#. scan_win.shell; +#: ../src/xscanimage.c:2007 +msgid "Select device" +msgstr "" + +#: ../src/xscanimage.c:1265 +#, c-format +msgid "Separate channel transfers are not supported with %d bits/channel." +msgstr "" + +#: ../src/xscanimage.c:1772 +msgid "Show advanced options" +msgstr "" + +#: ../src/xscanimage.c:1776 +msgid "Show tooltips" +msgstr "" + +#: ../src/xscanimage.c:1780 +msgid "Show two column display" +msgstr "" + +#: ../src/xscanimage.c:1309 +#, c-format +msgid "The Gimp doesn't support images with %d bits/channel." +msgstr "" + +#: ../src/xscanimage.c:329 ../src/xscanimage.c:375 +msgid "" +"This function provides access to scanners and other image acquisition " +"devices through the SANE (Scanner Access Now Easy) interface." +msgstr "" + +#: ../src/gtkglue.c:422 +msgid "Turns on automatic mode." +msgstr "" + +#: ../src/xcam.c:1655 +#, c-format +msgid "" +"Usage: %s [OPTION]... [DEVICE]\n" +"\n" +"Start up graphical user interface to access SANE (Scanner Access Now\n" +"Easy) devices.\n" +"\n" +"-h, --help display this help message and exit\n" +"-B, --buffersize set buffersize 1024 * 1024\n" +"-V, --version print version information\n" +msgstr "" + +#: ../src/xscanimage.c:2072 +#, c-format +msgid "" +"Usage: %s [OPTION]... [DEVICE]\n" +"\n" +"Start up graphical user interface to access SANE (Scanner Access Now\n" +"Easy) devices.\n" +"\n" +"-h, --help display this help message and exit\n" +"-V, --version print version information\n" +msgstr "" + +#: ../src/xscanimage.c:1605 +msgid "Use private colormap" +msgstr "" + +#: ../src/xscanimage.c:1176 +msgid "Warming up ..." +msgstr "" + +#: ../src/xscanimage.c:1791 +msgid "centimeters" +msgstr "" + +#: ../src/xscanimage.c:1793 +msgid "inches" +msgstr "" + +#: ../src/xscanimage.c:1789 +msgid "millimeters" +msgstr "" + +#: ../src/xscanimage.c:1579 +msgid "preview options" +msgstr "" diff --git a/src/gtkglue.c b/src/gtkglue.c index c112d40..6d69e58 100644 --- a/src/gtkglue.c +++ b/src/gtkglue.c @@ -124,7 +124,7 @@ gsg_make_path (size_t buf_size, char *buf, pw = getpwuid (getuid ()); if (!pw) { - snprintf (buf, buf_size, "Failed to determine home directory: %s.", + snprintf (buf, buf_size, _("Failed to determine home directory: %s."), strerror (errno)); gsg_error (buf); return -1; @@ -225,7 +225,7 @@ set_option (GSGDialog * dialog, int opt_num, void *val, SANE_Action action) status = sane_control_option (dialog->dev, opt_num, action, val, &info); if (status != SANE_STATUS_GOOD) { - snprintf (buf, sizeof (buf), "Failed to set value of option %s: %s.", + snprintf (buf, sizeof (buf), _("Failed to set value of option %s: %s."), sane_get_option_descriptor (dialog->dev, opt_num)->name, sane_strstatus (status)); gsg_error (buf); @@ -278,7 +278,7 @@ gsg_message (gchar * title, gchar * message) gtk_widget_show (label); /* the confirmation button */ - button = gtk_button_new_with_label ("OK"); + button = gtk_button_new_with_label (_("OK")); g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (gsg_close_dialog_callback), message_dialog); @@ -308,8 +308,8 @@ gsg_get_filename (const char *label, const char *default_name, GtkWidget *filesel; filesel = gtk_file_chooser_dialog_new ((char*) label, NULL, GTK_FILE_CHOOSER_ACTION_SAVE, - "Ok", GTK_RESPONSE_ACCEPT, - "Cancel", GTK_RESPONSE_CANCEL, + _("Ok"), GTK_RESPONSE_ACCEPT, + _("Cancel"), GTK_RESPONSE_CANCEL, NULL); gtk_window_set_modal (GTK_WINDOW (filesel), TRUE); @@ -368,7 +368,7 @@ autobutton_update (GtkWidget * widget, GSGDialogElement * elem) if (status != SANE_STATUS_GOOD) { snprintf (buf, sizeof (buf), - "Failed to obtain value of option %s: %s.", + _("Failed to obtain value of option %s: %s."), opt->name, sane_strstatus (status)); gsg_error (buf); } @@ -390,7 +390,7 @@ autobutton_new (GtkWidget * parent, GSGDialogElement * elem, gtk_widget_set_size_request (button, 20, 20); g_signal_connect (G_OBJECT (button), "toggled", G_CALLBACK (autobutton_update), elem); - set_tooltip (button, "Turns on automatic mode."); + set_tooltip (button, _("Turns on automatic mode.")); gtk_box_pack_end (GTK_BOX (parent), label, FALSE, FALSE, 0); gtk_box_pack_end (GTK_BOX (parent), button, FALSE, FALSE, 2); @@ -994,10 +994,10 @@ panel_build (GSGDialog * dialog) elem->dialog = dialog; if (opt->unit == SANE_UNIT_NONE) - snprintf (title, sizeof (title), "%s", opt->title); + snprintf (title, sizeof (title), "%s", S_(opt->title)); else snprintf (title, sizeof (title), - "%s [%s]", opt->title, unit_string (opt->unit)); + "%s [%s]", S_(opt->title), unit_string (opt->unit)); switch (opt->type) { @@ -1021,7 +1021,7 @@ panel_build (GSGDialog * dialog) if (status != SANE_STATUS_GOOD) goto get_value_failed; - button_new (parent, title, val, elem, dialog->tooltips, opt->desc, + button_new (parent, title, val, elem, dialog->tooltips, S_(opt->desc), SANE_OPTION_IS_SETTABLE (opt->cap)); gtk_widget_show (gtk_widget_get_parent (parent)); break; @@ -1052,7 +1052,7 @@ panel_build (GSGDialog * dialog) opt->constraint.range->min, opt->constraint.range->max, quant, (opt->cap & SANE_CAP_AUTOMATIC), elem, - opt->desc, + S_(opt->desc), SANE_OPTION_IS_SETTABLE (opt->cap)); gtk_widget_show (gtk_widget_get_parent (parent)); break; @@ -1079,7 +1079,7 @@ panel_build (GSGDialog * dialog) val = opt->constraint.word_list[1]; sprintf (str, "%d", val); option_menu_new (parent, title, str_list, str, elem, - opt->desc, + S_(opt->desc), SANE_OPTION_IS_SETTABLE (opt->cap)); free (str_list); gtk_widget_show (gtk_widget_get_parent (parent)); @@ -1132,7 +1132,7 @@ panel_build (GSGDialog * dialog) } scale_new (parent, title, dval, dmin, dmax, dquant, (opt->cap & SANE_CAP_AUTOMATIC), elem, - opt->desc, + S_(opt->desc), SANE_OPTION_IS_SETTABLE (opt->cap)); gtk_widget_show (gtk_widget_get_parent (parent)); break; @@ -1150,7 +1150,7 @@ panel_build (GSGDialog * dialog) str_list[j] = 0; sprintf (str, "%g", SANE_UNFIX (val)); option_menu_new (parent, title, str_list, str, elem, - opt->desc, + S_(opt->desc), SANE_OPTION_IS_SETTABLE (opt->cap)); free (str_list); gtk_widget_show (gtk_widget_get_parent (parent)); @@ -1188,14 +1188,14 @@ panel_build (GSGDialog * dialog) /* use a "list-selection" widget */ option_menu_new (parent, title, (char **) opt->constraint.string_list, buf, - elem, opt->desc, + elem, S_(opt->desc), SANE_OPTION_IS_SETTABLE (opt->cap)); gtk_widget_show (gtk_widget_get_parent (parent)); break; case SANE_CONSTRAINT_NONE: text_entry_new (parent, title, buf, elem, - opt->desc, + S_(opt->desc), SANE_OPTION_IS_SETTABLE (opt->cap)); gtk_widget_show (gtk_widget_get_parent (parent)); break; @@ -1216,7 +1216,7 @@ panel_build (GSGDialog * dialog) "clicked", G_CALLBACK (push_button_callback), elem); - set_tooltip (button, opt->desc); + set_tooltip (button, S_(opt->desc)); label = gtk_label_new (title); gtk_container_add (GTK_CONTAINER (button), label); @@ -1285,7 +1285,7 @@ gsg_create_dialog (GtkWidget * window, const char *device_name, status = sane_open (device_name, &dev); if (status != SANE_STATUS_GOOD) { - sprintf (buf, "Failed to open device `%s': %s.", + sprintf (buf, _("Failed to open device `%s': %s."), device_name, sane_strstatus (status)); gsg_error (buf); return 0; @@ -1294,7 +1294,7 @@ gsg_create_dialog (GtkWidget * window, const char *device_name, if (sane_control_option (dev, 0, SANE_ACTION_GET_VALUE, &num_elements, 0) != SANE_STATUS_GOOD) { - gsg_error ("Error obtaining option count."); + gsg_error (_("Error obtaining option count.")); sane_close (dev); return 0; } diff --git a/src/preferences.h b/src/preferences.h index 5c58df3..4866eb0 100644 --- a/src/preferences.h +++ b/src/preferences.h @@ -1,6 +1,8 @@ #ifndef preferences_h #define preferences_h +#include +#include #include typedef struct @@ -22,4 +24,16 @@ extern Preferences preferences; extern void preferences_save (int fd); extern void preferences_restore (int fd); +#ifdef _ +#undef _ +#endif + +#define _(v) g_dgettext("sane-frontends", v) + + +#ifdef S_ +#undef S_ +#endif + +#define S_(v) g_dgettext("sane-backends", v) #endif /* preferences_h */ diff --git a/src/xcam.c b/src/xcam.c index 65e7c3e..229af2e 100644 --- a/src/xcam.c +++ b/src/xcam.c @@ -1249,7 +1249,7 @@ next_frame (void) #endif if (status != SANE_STATUS_GOOD) { - sprintf (buf, "Failed to start webcam: %s.", sane_strstatus (status)); + sprintf (buf, _("Failed to start webcam: %s."), sane_strstatus (status)); gsg_error (buf); win.playing = FALSE; stop_camera (); @@ -1259,7 +1259,7 @@ next_frame (void) status = sane_get_parameters (gsg_dialog_get_device (dialog), &win.params); if (status != SANE_STATUS_GOOD) { - sprintf (buf, "Failed to get parameters: %s.", sane_strstatus (status)); + sprintf (buf, _("Failed to get parameters: %s."), sane_strstatus (status)); gsg_error (buf); win.playing = FALSE; stop_camera (); @@ -1327,13 +1327,13 @@ play_stop_button (GtkWidget * widget, gpointer client_data, if (win.playing) { win.playing = FALSE; - gtk_label_set_text (GTK_LABEL (win.play_stop_label), " Play "); + gtk_label_set_text (GTK_LABEL (win.play_stop_label), _(" Play ")); DBG (DBG_debug, "xcam: wait for play button to be pushed\n"); } else if (win.gdk_input_tag < 0) { win.playing = TRUE; - gtk_label_set_text (GTK_LABEL (win.play_stop_label), " Stop "); + gtk_label_set_text (GTK_LABEL (win.play_stop_label), _(" Stop ")); DBG (DBG_debug, "xcam: wait for stop button to be pushed\n"); next_frame (); } @@ -1357,7 +1357,7 @@ save_frame_button (GtkWidget * widget, gpointer client_data, else if (win.gdk_input_tag < 0) { win.saving = TRUE; - gtk_label_set_text (GTK_LABEL (win.save_frame_label), "Saving started"); + gtk_label_set_text (GTK_LABEL (win.save_frame_label), _("Saving started")); /* ------------------------------------------ */ /* test for pnm formats */ @@ -1374,7 +1374,7 @@ save_frame_button (GtkWidget * widget, gpointer client_data, (!strncmp (testfilename, "MPP.", 4)))) { snprintf (buf, sizeof (buf), - "Failed to scan, wrong file extension, use pnm, pgm, pbm or ppm `%s'", + _("Failed to scan, wrong file extension, use pnm, pgm, pbm or ppm `%s'"), preferences.filename); gsg_error (buf); return; @@ -1382,7 +1382,7 @@ save_frame_button (GtkWidget * widget, gpointer client_data, win.out = fopen (preferences.filename, "w"); if (!win.out) { - snprintf (buf, sizeof (buf), "Failed to open `%s': %s", + snprintf (buf, sizeof (buf), _("Failed to open `%s': %s"), preferences.filename, strerror (errno)); gsg_error (buf); return; @@ -1392,7 +1392,7 @@ save_frame_button (GtkWidget * widget, gpointer client_data, save_frame (); buttons_enable (); gsg_sync (dialog); - gtk_label_set_text (GTK_LABEL (win.save_frame_label), "Save\nFrame"); + gtk_label_set_text (GTK_LABEL (win.save_frame_label), _("Save\nFrame")); DBG (DBG_debug, "xcam: save_frame_button: exit\n"); } @@ -1408,12 +1408,12 @@ txt_button (GtkWidget * widget, gpointer client_data, gpointer call_data) { win.saving = FALSE; win.value_txt = 0; - gtk_label_set_text (GTK_LABEL (win.txt_label), " TXT \n OFF "); + gtk_label_set_text (GTK_LABEL (win.txt_label), _(" TXT \n OFF ")); } else if (win.gdk_input_tag < 0) { win.saving = TRUE; - gtk_label_set_text (GTK_LABEL (win.txt_label), " TXT \n ON "); + gtk_label_set_text (GTK_LABEL (win.txt_label), _(" TXT \n ON ")); win.value_txt = 1; } gsg_sync (dialog); @@ -1592,7 +1592,7 @@ browse_filename_callback (GtkWidget * widget, gpointer data) } else strcpy (filename, OUTFILENAME); - gsg_get_filename ("Output Filename", filename, sizeof (filename), filename); + gsg_get_filename (_("Output Filename"), filename, sizeof (filename), filename); gtk_entry_set_text (GTK_ENTRY (win.filename_entry), filename); if (preferences.filename) @@ -1615,14 +1615,14 @@ filename_changed_callback (GtkWidget * widget, gpointer data) static void usage (void) { - printf ("Usage: %s [OPTION]... [DEVICE]\n\ + printf (_("Usage: %s [OPTION]... [DEVICE]\n\ \n\ Start up graphical user interface to access SANE (Scanner Access Now\n\ Easy) devices.\n\ \n\ -h, --help display this help message and exit\n\ -B, --buffersize set buffersize 1024 * 1024\n\ --V, --version print version information\n", prog_name); +-V, --version print version information\n"), prog_name); } int @@ -1710,21 +1710,21 @@ main (int argc, char **argv) win.devices.menu = build_device_menu (); /* "Files" entry: */ - menu_bar_item = gtk_menu_item_new_with_label ("File"); + menu_bar_item = gtk_menu_item_new_with_label (_("File")); gtk_container_add (GTK_CONTAINER (menu_bar), menu_bar_item); menu = build_files_menu (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu_bar_item), menu); gtk_widget_show (menu_bar_item); /* "Devices" entry: */ - win.devices.item = gtk_menu_item_new_with_label ("Devices"); + win.devices.item = gtk_menu_item_new_with_label (_("Devices")); gtk_container_add (GTK_CONTAINER (menu_bar), win.devices.item); gtk_menu_item_set_submenu (GTK_MENU_ITEM (win.devices.item), win.devices.menu); gtk_widget_show (win.devices.item); /* "Preferences" entry: */ - menu_bar_item = gtk_menu_item_new_with_label ("Preferences"); + menu_bar_item = gtk_menu_item_new_with_label (_("Preferences")); gtk_container_add (GTK_CONTAINER (menu_bar), menu_bar_item); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu_bar_item), build_preferences_menu (dialog)); @@ -1760,7 +1760,7 @@ main (int argc, char **argv) gtk_box_set_homogeneous (GTK_BOX (preview_vbox), FALSE); gtk_box_pack_start (GTK_BOX (hbox), preview_vbox, TRUE, TRUE, 0); - frame = gtk_frame_new ("Image view"); + frame = gtk_frame_new (_("Image view")); gtk_container_set_border_width (GTK_CONTAINER (frame), 8); gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_IN); gtk_container_add (GTK_CONTAINER (preview_vbox), frame); diff --git a/src/xscanimage.c b/src/xscanimage.c index ad6bd84..0c86740 100644 --- a/src/xscanimage.c +++ b/src/xscanimage.c @@ -87,6 +87,12 @@ # endif /* ENABLE_GIMP_1_2 */ # endif +#ifdef _ +#undef _ +#endif + +#define _(v) g_dgettext("sane-frontends", v) + static void query (void); #ifndef ENABLE_GIMP_1_2 static void run (const gchar * name, gint nparams, const GimpParam * param, @@ -315,14 +321,14 @@ query (void) DBG (DBG_debug, "query\n"); gimp_install_procedure ("xscanimage", - "Front-end to the SANE interface", - "This function provides access to scanners and other image acquisition " - "devices through the SANE (Scanner Access Now Easy) interface.", - "Andy Beck, Tristan Tarrant, and David Mosberger", - "Andy Beck, Tristan Tarrant, and David Mosberger", - "8th June 1997", - "/File/Acquire/xscanimage/Device dialog...", - "RGB, GRAY", + _("Front-end to the SANE interface"), + _("This function provides access to scanners and other image acquisition " + "devices through the SANE (Scanner Access Now Easy) interface."), + _("Andy Beck, Tristan Tarrant, and David Mosberger"), + _("Andy Beck, Tristan Tarrant, and David Mosberger"), + _("8th June 1997"), + _("/File/Acquire/xscanimage/Device dialog..."), + _("RGB, GRAY"), GIMP_EXTENSION, nargs, nreturn_vals, args, return_vals); @@ -361,13 +367,13 @@ query (void) mpath[len++] = '\0'; gimp_install_procedure - (name, "Front-end to the SANE interface", - "This function provides access to scanners and other image " + (name, _("Front-end to the SANE interface"), + _("This function provides access to scanners and other image " "acquisition devices through the SANE (Scanner Access Now Easy) " - "interface.", - "Andy Beck, Tristan Tarrant, and David Mosberger", - "Andy Beck, Tristan Tarrant, and David Mosberger", - "8th June 1997", mpath, "RGB, GRAY", GIMP_EXTENSION, + "interface."), + _("Andy Beck, Tristan Tarrant, and David Mosberger"), + _("Andy Beck, Tristan Tarrant, and David Mosberger"), + _("8th June 1997"), mpath, _("RGB, GRAY"), GIMP_EXTENSION, nargs, nreturn_vals, args, return_vals); } sane_exit (); @@ -512,7 +518,7 @@ update_param (GSGDialog * dialog, void *arg) if (params.lines == -1) { - snprintf (buf, sizeof (buf), "%dxunknown: unknown size", + snprintf (buf, sizeof (buf), _("%dxunknown: unknown size"), params.pixels_per_line); } else @@ -536,7 +542,7 @@ update_param (GSGDialog * dialog, void *arg) } } else - snprintf (buf, sizeof (buf), "Invalid parameters."); + snprintf (buf, sizeof (buf), _("Invalid parameters.")); gtk_label_set_text (GTK_LABEL (scan_win.info_label), buf); if (scan_win.preview) @@ -559,7 +565,7 @@ pref_xscanimage_save (void) { char buf[256]; - snprintf (buf, sizeof (buf), "Failed to create file: %s.", + snprintf (buf, sizeof (buf), _("Failed to create file: %s."), strerror (errno)); gsg_error (buf); return; @@ -815,7 +821,7 @@ input_available (gpointer data, gint source, GIOCondition cond) } else { - snprintf (buf, sizeof (buf), "Error during read: %s.", + snprintf (buf, sizeof (buf), _("Error during read: %s."), sane_strstatus (status)); gsg_error (buf); } @@ -987,7 +993,7 @@ input_available (gpointer data, gint source, GIOCondition cond) break; default: - fprintf (stderr, "%s.input_available: bad frame format %d\n", + fprintf (stderr, _("%s.input_available: bad frame format %d\n"), prog_name, scan_win.param.format); scan_done (); return FALSE; @@ -998,7 +1004,7 @@ input_available (gpointer data, gint source, GIOCondition cond) #ifdef HAVE_LIBGIMP_GIMP_H bad_depth: - snprintf (buf, sizeof (buf), "Cannot handle depth %d.", + snprintf (buf, sizeof (buf), _("Cannot handle depth %d."), scan_win.param.depth); gsg_error (buf); scan_done (); @@ -1162,8 +1168,8 @@ scan_start (void) { if (scan_win.progress) progress_free (scan_win.progress); - snprintf (buf, sizeof (buf), "Scanner is warming up."); - scan_win.progress = progress_new ("Warming up ...", buf, scan_win.shell, + snprintf (buf, sizeof (buf), _("Scanner is warming up.")); + scan_win.progress = progress_new (_("Warming up ..."), buf, scan_win.shell, G_CALLBACK (cancel_action), NULL); #ifdef HAVE_SYS_TIME_H struct timeval start, current; @@ -1188,7 +1194,7 @@ scan_start (void) { gsg_set_sensitivity (dialog, TRUE); gtk_widget_set_sensitive (scan_win.scan_button, TRUE); - snprintf (buf, sizeof (buf), "Failed to start scanner: %s", + snprintf (buf, sizeof (buf), _("Failed to start scanner: %s"), sane_strstatus (status)); gsg_error (buf); return; @@ -1198,7 +1204,7 @@ scan_start (void) if (status != SANE_STATUS_GOOD) { gsg_set_sensitivity (dialog, TRUE); - snprintf (buf, sizeof (buf), "Failed to get parameters: %s", + snprintf (buf, sizeof (buf), _("Failed to get parameters: %s"), sane_strstatus (status)); gsg_error (buf); scan_done (); @@ -1209,7 +1215,7 @@ scan_start (void) { gsg_set_sensitivity (dialog, TRUE); gtk_widget_set_sensitive (scan_win.scan_button, TRUE); - snprintf (buf, sizeof (buf), "Hand-Scanner mode not supported"); + snprintf (buf, sizeof (buf), _("Hand-Scanner mode not supported")); gsg_error (buf); scan_done (); return; @@ -1252,8 +1258,8 @@ scan_start (void) gsg_set_sensitivity (dialog, TRUE); gtk_widget_set_sensitive (scan_win.scan_button, TRUE); snprintf (buf, sizeof (buf), - "Separate channel transfers are not supported " - "with %d bits/channel.", scan_win.param.depth); + _("Separate channel transfers are not supported " + "with %d bits/channel."), scan_win.param.depth); gsg_error (buf); scan_done (); return; @@ -1282,7 +1288,7 @@ scan_start (void) fseek (scan_win.out, scan_win.header_size + scan_win.param.format - SANE_FRAME_RED, SEEK_SET); - snprintf (buf, sizeof (buf), "Receiving %s data for `%s'...", + snprintf (buf, sizeof (buf), _("Receiving %s data for `%s'..."), frame_type, preferences.filename); } #ifdef HAVE_LIBGIMP_GIMP_H @@ -1296,8 +1302,8 @@ scan_start (void) { gsg_set_sensitivity (dialog, TRUE); gtk_widget_set_sensitive (scan_win.scan_button, TRUE); - snprintf (buf, sizeof (buf), "The Gimp doesn't support images " - "with %d bits/channel.", scan_win.param.depth); + snprintf (buf, sizeof (buf), _("The Gimp doesn't support images " + "with %d bits/channel."), scan_win.param.depth); gsg_error (buf); return; } @@ -1345,7 +1351,7 @@ scan_start (void) if (scan_win.param.format >= SANE_FRAME_RED && scan_win.param.format <= SANE_FRAME_BLUE) scan_win.tile_offset = scan_win.param.format - SANE_FRAME_RED; - snprintf (buf, sizeof (buf), "Receiving %s data for GIMP...", + snprintf (buf, sizeof (buf), _("Receiving %s data for GIMP..."), frame_type); } #endif /* HAVE_LIBGIMP_GIMP_H */ @@ -1463,7 +1469,7 @@ files_build_menu (void) gtk_container_add (GTK_CONTAINER (menu), item); gtk_widget_show (item); - item = gtk_menu_item_new_with_label ("Exit"); + item = gtk_menu_item_new_with_label (_("Exit")); gtk_container_add (GTK_CONTAINER (menu), item); g_signal_connect (G_OBJECT (item), "activate", G_CALLBACK (files_exit_callback), 0); @@ -1567,7 +1573,7 @@ preview_options_dialog (GtkWidget * widget, gpointer data) DBG (DBG_debug, "preview_options_dialog\n"); dialog = gtk_dialog_new (); - sprintf (buf, "%s preview options", prog_name); + sprintf (buf, "%s %s", _("preview options"), prog_name); gtk_window_set_title (GTK_WINDOW (dialog), buf); vbox = gtk_dialog_get_content_area(GTK_DIALOG (dialog)); @@ -1593,7 +1599,7 @@ preview_options_dialog (GtkWidget * widget, gpointer data) hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2); gtk_box_set_homogeneous (GTK_BOX (hbox), FALSE); gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 2); - button = gtk_check_button_new_with_label ("Use private colormap"); + button = gtk_check_button_new_with_label (_("Use private colormap")); g_signal_connect (G_OBJECT (button), "toggled", G_CALLBACK (update_int_callback), &preferences.preview_own_cmap); @@ -1611,7 +1617,7 @@ preview_options_dialog (GtkWidget * widget, gpointer data) gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 2); gtk_widget_show (hbox); - label = gtk_label_new ("Gamma correction value"); + label = gtk_label_new (_("Gamma correction value")); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 2); gtk_widget_show (label); @@ -1625,7 +1631,7 @@ preview_options_dialog (GtkWidget * widget, gpointer data) gtk_widget_show (text); /* fill in action area: */ - button = gtk_dialog_add_button (GTK_DIALOG (dialog), "OK", GTK_RESPONSE_OK); + button = gtk_dialog_add_button (GTK_DIALOG (dialog), _("OK"), GTK_RESPONSE_OK); gtk_widget_set_can_default (button, TRUE); g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (preview_options_ok_callback), dialog); @@ -1633,7 +1639,7 @@ preview_options_dialog (GtkWidget * widget, gpointer data) gtk_widget_grab_default (button); gtk_widget_show (button); - button = gtk_dialog_add_button (GTK_DIALOG (dialog), "Cancel", GTK_RESPONSE_CANCEL); + button = gtk_dialog_add_button (GTK_DIALOG (dialog), _("Cancel"), GTK_RESPONSE_CANCEL); g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (preview_options_cancel_callback), dialog); @@ -1723,7 +1729,7 @@ pref_build_menu (void) menu = gtk_menu_new (); /* advanced user option: */ - item = gtk_check_menu_item_new_with_label ("Show advanced options"); + item = gtk_check_menu_item_new_with_label (_("Show advanced options")); gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (item), preferences.advanced); gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); @@ -1733,7 +1739,7 @@ pref_build_menu (void) /* tooltips submenu: */ - item = gtk_check_menu_item_new_with_label ("Show tooltips"); + item = gtk_check_menu_item_new_with_label (_("Show tooltips")); gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (item), preferences.tooltips_enabled); gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); @@ -1743,7 +1749,7 @@ pref_build_menu (void) /* two column submenu: */ - item = gtk_check_menu_item_new_with_label ("Show two column display"); + item = gtk_check_menu_item_new_with_label (_("Show two column display")); gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (item), preferences.twocolumn_enabled); gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); @@ -1753,23 +1759,23 @@ pref_build_menu (void) /* length unit submenu: */ - item = gtk_menu_item_new_with_label ("Length unit"); + item = gtk_menu_item_new_with_label (_("Length unit")); gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); gtk_widget_show (item); submenu = gtk_menu_new (); - unit_mm = gtk_radio_menu_item_new_with_label (units_group, "millimeters"); + unit_mm = gtk_radio_menu_item_new_with_label (units_group, _("millimeters")); units_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (unit_mm)); gtk_menu_shell_append (GTK_MENU_SHELL (submenu), unit_mm); gtk_widget_show (unit_mm); - unit_cm = gtk_radio_menu_item_new_with_label (units_group, "centimeters"); + unit_cm = gtk_radio_menu_item_new_with_label (units_group, _("centimeters")); units_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (unit_cm)); gtk_menu_shell_append (GTK_MENU_SHELL (submenu), unit_cm); gtk_widget_show (unit_cm); - unit_in = gtk_radio_menu_item_new_with_label (units_group, "inches"); + unit_in = gtk_radio_menu_item_new_with_label (units_group, _("inches")); gtk_menu_shell_append (GTK_MENU_SHELL (submenu), unit_in); gtk_widget_show (unit_in); @@ -1794,7 +1800,7 @@ pref_build_menu (void) /* preview options: */ - item = gtk_menu_item_new_with_label ("Preview options..."); + item = gtk_menu_item_new_with_label (_("Preview options...")); gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); g_signal_connect (G_OBJECT (item), "activate", G_CALLBACK (preview_options_dialog), 0); @@ -1805,13 +1811,13 @@ pref_build_menu (void) gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); gtk_widget_show (item); - item = gtk_menu_item_new_with_label ("Save device settings"); + item = gtk_menu_item_new_with_label (_("Save device settings")); gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); g_signal_connect (G_OBJECT (item), "activate", G_CALLBACK (pref_device_save), 0); gtk_widget_show (item); - item = gtk_menu_item_new_with_label ("Restore device settings"); + item = gtk_menu_item_new_with_label (_("Restore device settings")); gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); g_signal_connect (G_OBJECT (item), "activate", G_CALLBACK (pref_device_restore), 0); @@ -1878,19 +1884,18 @@ device_dialog (void) vbox = gtk_dialog_get_content_area(GTK_DIALOG (scan_win.shell)); /* create the menubar */ - scan_win.menubar = gtk_menu_bar_new (); gtk_box_pack_start (GTK_BOX (vbox), scan_win.menubar, FALSE, FALSE, 0); /* "Files" submenu: */ - menubar_item = gtk_menu_item_new_with_label ("File"); + menubar_item = gtk_menu_item_new_with_label (_("File")); gtk_container_add (GTK_CONTAINER (scan_win.menubar), menubar_item); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menubar_item), files_build_menu ()); gtk_widget_show (menubar_item); /* "Preferences" submenu: */ - menubar_item = gtk_menu_item_new_with_label ("Preferences"); + menubar_item = gtk_menu_item_new_with_label (_("Preferences")); gtk_container_add (GTK_CONTAINER (scan_win.menubar), menubar_item); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menubar_item), pref_build_menu ()); @@ -1901,7 +1906,7 @@ device_dialog (void) /* if we're running in standalone mode, provide a output filename box: */ if (scan_win.mode == STANDALONE) { - frame = gtk_frame_new ("Output"); + frame = gtk_frame_new (_("Output")); gtk_container_set_border_width (GTK_CONTAINER (frame), 4); gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_IN); gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0); @@ -1911,7 +1916,7 @@ device_dialog (void) gtk_container_set_border_width (GTK_CONTAINER (hbox), 2); gtk_container_add (GTK_CONTAINER (frame), hbox); - label = gtk_label_new ("Filename"); + label = gtk_label_new (_("Filename")); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 2); text = gtk_entry_new (); @@ -1922,7 +1927,7 @@ device_dialog (void) scan_win.filename_entry = text; - button = gtk_button_new_with_label ("Browse"); + button = gtk_button_new_with_label (_("Browse")); gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 2); g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (browse_filename_callback), 0); @@ -1972,7 +1977,7 @@ device_dialog (void) gtk_container_add (GTK_CONTAINER (frame), hbox); gtk_widget_show (hbox); - scan_win.info_label = gtk_label_new ("0x0: 0KB"); + scan_win.info_label = gtk_label_new (_("0x0: 0KB")); gtk_box_pack_start (GTK_BOX (hbox), scan_win.info_label, FALSE, FALSE, 0); gtk_widget_show (scan_win.info_label); @@ -1980,13 +1985,13 @@ device_dialog (void) /* The Scan button */ - scan_win.scan_button = gtk_dialog_add_button (GTK_DIALOG (scan_win.shell), "Scan", GTK_RESPONSE_OK); + scan_win.scan_button = gtk_dialog_add_button (GTK_DIALOG (scan_win.shell), _("Scan"), GTK_RESPONSE_OK); g_signal_connect (G_OBJECT (scan_win.scan_button), "clicked", G_CALLBACK (scan_dialog), scan_win.shell); gtk_widget_show (scan_win.scan_button); /* The Preview button */ - scan_win.preview_button = gtk_dialog_add_button (GTK_DIALOG (scan_win.shell), "Preview Window", GTK_RESPONSE_ACCEPT); + scan_win.preview_button = gtk_dialog_add_button (GTK_DIALOG (scan_win.shell), _("Preview Window"), GTK_RESPONSE_ACCEPT); g_signal_connect (G_OBJECT (scan_win.preview_button), "clicked", G_CALLBACK (scan_preview), scan_win.shell); gtk_widget_show (scan_win.preview_button); @@ -2045,7 +2050,7 @@ choose_device (void) DBG (DBG_debug, "choose_device\n"); choose_device_dialog = gtk_dialog_new (); - gtk_window_set_title (GTK_WINDOW (choose_device_dialog), "Select device"); + gtk_window_set_title (GTK_WINDOW (choose_device_dialog), _("Select device")); g_signal_connect (G_OBJECT (choose_device_dialog), "delete_event", G_CALLBACK (files_exit_callback), NULL); @@ -2083,7 +2088,7 @@ choose_device (void) } /* The OK button */ - button = gtk_dialog_add_button (GTK_DIALOG (choose_device_dialog), "OK", GTK_RESPONSE_OK); + button = gtk_dialog_add_button (GTK_DIALOG (choose_device_dialog), _("OK"), GTK_RESPONSE_OK); gtk_widget_set_can_default (button, TRUE); g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (ok_choose_dialog_callback), NULL); @@ -2092,7 +2097,7 @@ choose_device (void) gtk_widget_show (button); /* The Cancel button */ - button = gtk_dialog_add_button (GTK_DIALOG (choose_device_dialog), "Cancel", GTK_RESPONSE_OK); + button = gtk_dialog_add_button (GTK_DIALOG (choose_device_dialog), _("Cancel"), GTK_RESPONSE_OK); g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (files_exit_callback), NULL); gtk_widget_show (button); @@ -2105,13 +2110,13 @@ choose_device (void) static void usage (void) { - printf ("Usage: %s [OPTION]... [DEVICE]\n\ + printf (_("Usage: %s [OPTION]... [DEVICE]\n\ \n\ Start up graphical user interface to access SANE (Scanner Access Now\n\ Easy) devices.\n\ \n\ -h, --help display this help message and exit\n\ --V, --version print version information\n", prog_name); +-V, --version print version information\n"), prog_name); } static void @@ -2162,7 +2167,7 @@ init (int argc, char **argv) switch (ch) { case 'g': - printf ("%s: GIMP support missing.\n", argv[0]); + printf (_("%s: GIMP support missing.\n"), argv[0]); exit (0); case 'V': @@ -2237,7 +2242,7 @@ interface (int argc, char **argv) { if (seldev >= ndevs) { - fprintf (stderr, "%s: device %d is unavailable.\n", + fprintf (stderr, _("%s: device %d is unavailable.\n"), prog_name, seldev); quit_xscanimage (); } @@ -2262,11 +2267,11 @@ interface (int argc, char **argv) else { DBG (DBG_fatal, - "No scanners were identified. If you were expecting something\n" + _("No scanners were identified. If you were expecting something\n" " different, check that the scanner is plugged in, turned on and\n" " detected by sane-find-scanner (if appropriate). Please read\n" " the documentation which came with this software (README, FAQ,\n" - " manpages).\n"); + " manpages).\n")); quit_xscanimage (); } } @@ -2293,6 +2298,7 @@ main (int argc, char **argv) else prog_name = argv[0]; + setlocale(LC_ALL, ""); #ifdef HAVE_LIBGIMP_GIMP_H { GPrintFunc old_print_func;