HylaFAX The world's
most advanced open source fax server
|
|
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
Re: [hylafax-users] internationalization tests
Bodo, Torsten, Giuseppe, Holger, and others...
Thank you for the excellent feedback.
Attached is a revised version of the dictionary patch. It's also
available in a full-source form here:
http://prdownloads.sourceforge.net/hylafax/hylafax-4.2.3.3-test2.tar.gz?download
I've applied Torsten's translation for German (thank you, Torsten).
I've tried to be more consistent with the quotes. (I mean for them to
be there, usually.)
I've added dictionary usage on a few things that I missed before
(ReceivedOn).
I've taken several instances where dictionary items were used, separated
by a variable, and included them as evals as was suggested by Bodo.
Some more still remain in notify, I think... but will require more work
to change due to the way that notify is coded. I'd like to postpone the
work on those until instances surface where it is needed.
I've added a hook for "etc/FaxDictionary" in each of faxrcvd, notify,
and pollrcvd immediately following the sourcing of bin/dictionary...
which should allow administrators to customize any of the dictionary items.
I've added translation of the faxinfo output (well, most of it).
I've added a "bin/common-functions" script ... which is something that
we were going to do anyway, and it was useful for the translation of
faxinfo output (as both faxrcvd and pollrcvd use it).
Let me know what you think.
Thanks,
Lee.
diff -Nru hylafax.orig/configure hylafax/configure
--- hylafax.orig/configure 2005-12-22 09:24:30.000000000 -0800
+++ hylafax/configure 2005-12-26 13:03:04.000000000 -0800
@@ -4819,6 +4819,8 @@
util/faxcron.sh
util/pagesizes
util/archive.sh
+ util/dictionary.sh
+ util/common-functions.sh
util/faxrcvd.sh
util/mkcover.sh
util/notify.sh
diff -Nru hylafax.orig/distrules hylafax/distrules
--- hylafax.orig/distrules 2005-12-22 09:24:30.000000000 -0800
+++ hylafax/distrules 2005-12-26 13:03:28.000000000 -0800
@@ -363,6 +363,8 @@
util/notify.awk \
util/faxcron.sh.in \
util/archive.sh.in \
+ util/common-functions.sh.in \
+ util/dictionary.sh.in \
util/faxrcvd.sh.in \
util/mkcover.sh.in \
util/notify.sh.in \
diff -Nru hylafax.orig/pkg/sproto.stub.in hylafax/pkg/sproto.stub.in
--- hylafax.orig/pkg/sproto.stub.in 2005-12-22 09:24:30.000000000 -0800
+++ hylafax/pkg/sproto.stub.in 2005-12-26 13:04:08.000000000 -0800
@@ -134,6 +134,8 @@
f none @SPOOL@/bin/notify-4.1=../util/notify-4.1.sh 0755 @SYSUID@ @SYSGID@
f none @SPOOL@/bin/notify.awk=../@SRCDIR@/util/notify.awk 0444 @SYSUID@ @SYSGID@
f none @SPOOL@/bin/archive=../util/archive.sh 0755 @SYSUID@ @SYSGID@
+f none @SPOOL@/bin/common-functions=../util/common-functions.sh 0755 @SYSUID@ @SYSGID@
+f none @SPOOL@/bin/dictionary=../util/dictionary.sh 0755 @SYSUID@ @SYSGID@
f none @SPOOL@/bin/faxrcvd=../util/faxrcvd.sh 0755 @SYSUID@ @SYSGID@
f none @SPOOL@/bin/pollrcvd=../util/pollrcvd.sh 0755 @SYSUID@ @SYSGID@
f none @SPOOL@/bin/mkcover=../util/mkcover.sh 0755 @SYSUID@ @SYSGID@
diff -Nru hylafax.orig/util/common-functions.sh.in hylafax/util/common-functions.sh.in
--- hylafax.orig/util/common-functions.sh.in 1969-12-31 16:00:00.000000000 -0800
+++ hylafax/util/common-functions.sh.in 2005-12-26 16:38:03.000000000 -0800
@@ -0,0 +1,42 @@
+#!/bin/sh
+
+#
+# This holds various functions that are common to the
+# various bin scripts.
+#
+
+setInfoSize()
+{
+ INFOSIZE=0
+ for ITEM in DICTSENDER DICTPAGES DICTQUALITY DICTSIZE DICTRECEIVED \
+ DICTTIMETORECV DICTSIGNALRATE DICTDATAFORMAT DICTERRCORRECT \
+ DICTCALLID1 DICTCALLID2 DICTCALLID3 DICTCALLID4 DICTCALLID \
+ DICTCALLID6 DICTCALLID7 DICTRECEIVEDON DICTCOMMID; do
+ printf "%s%n" "`eval echo "$"$ITEM`" THISLEN > /dev/null
+ if [ $THISLEN -gt $INFOSIZE ]; then INFOSIZE=$THISLEN; fi
+ done
+}
+
+faxInfo()
+{
+ $INFO -n $1 | $SED -e "s/^ *Sender:/`printf %$INFOSIZE\s "$DICTSENDER"`:/g" \
+ -e "s/^ *Pages:/`printf %$INFOSIZE\s "$DICTPAGES"`:/g" \
+ -e "s/^ *Quality:/`printf %$INFOSIZE\s "$DICTQUALITY"`:/g" \
+ -e "s/^ *Page:/`printf %$INFOSIZE\s "$DICTSIZE"`:/g" \
+ -e "s/^ *Received:/`printf %$INFOSIZE\s "$DICTRECEIVED"`:/g" \
+ -e "s/^ *TimeToRecv:/`printf %$INFOSIZE\s "$DICTTIMETORECV"`:/g" \
+ -e "s/^ *SignalRate:/`printf %$INFOSIZE\s "$DICTSIGNALRATE"`:/g" \
+ -e "s/^ *DataFormat:/`printf %$INFOSIZE\s "$DICTDATAFORMAT"`:/g" \
+ -e "s/^ *ErrCorrect:/`printf %$INFOSIZE\s "$DICTERRCORRECT"`:/g" \
+ -e "s/^ *CallID1:/`printf %$INFOSIZE\s "$DICTCALLID1"`:/g" \
+ -e "s/^ *CallID2:/`printf %$INFOSIZE\s "$DICTCALLID2"`:/g" \
+ -e "s/^ *CallID3:/`printf %$INFOSIZE\s "$DICTCALLID3"`:/g" \
+ -e "s/^ *CallID4:/`printf %$INFOSIZE\s "$DICTCALLID4"`:/g" \
+ -e "s/^ *CallID5:/`printf %$INFOSIZE\s "$DICTCALLID5"`:/g" \
+ -e "s/^ *CallID6:/`printf %$INFOSIZE\s "$DICTCALLID6"`:/g" \
+ -e "s/^ *CallID7:/`printf %$INFOSIZE\s "$DICTCALLID7"`:/g" \
+ -e "s/ Yes$/ $DICTYES/g" \
+ -e "s/ No$/ $DICTNO/g" \
+ -e "s/ Normal$/ $DICTNORMAL/g" \
+ -e "s/ Fine$/ $DICTFINE/g"
+}
diff -Nru hylafax.orig/util/dictionary.sh.in hylafax/util/dictionary.sh.in
--- hylafax.orig/util/dictionary.sh.in 1969-12-31 16:00:00.000000000 -0800
+++ hylafax/util/dictionary.sh.in 2005-12-27 12:29:46.187737960 -0800
@@ -0,0 +1,341 @@
+case "$LANG" in
+ es_*)
+ DICTRECEIVEAGENT="El Agente de Recibos de HylaFAX";
+ DICTRECEIVEDFROM="Facsímil recibido de \$SENDER";
+ DICTRETRIEVEDFROM="Facsímil recuperado de \$SENDER";
+ DICTMSGINTRO="El documento entero no se recibió porque:";
+ DICTLOGFOLLOWS=" ---- La transcripción de la sesión sigue ----";
+ DICTLOGFOLLOWS2="La transcripción de la sesión sigue";
+ DICTNOLOGAVAIL=" Ninguna transcripción disponible";
+ DICTDISPATCHEDTO="El facsímil fue enviado automáticamente a: \$SENDTO.";
+ DICTPOLLDISPATCHTO="El facsímil fue votado cerca y entregado a: \$MAILADDR.";
+ DICTNOTRECEIVED="facsímil no recibido";
+ DICTATTEMPTEDFAXFAILED="Una tentativa de recibir el facsímil por \$DEVICE fallado porque:";
+ DICTATTEMPTEDPOLLFAILED="Una tentativa de recuperar el facsímil por \$DEVICE fallado porque:";
+ DICTFAILEDBECAUSE="fallado porque:";
+ DICTUNKNOWNDOCTYPE="Tipo desconocido del documento";
+ DICTNOFILEEXISTS="El archivo no existe";
+ DICTDESTINATION="Destinación";
+ DICTJOBID="IDTrabajo";
+ DICTGROUPID="IDGrupo";
+ DICTSENDER="Remitente";
+ DICTMAILADDR="Dirección";
+ DICTMODEM="Módem";
+ DICTCOMMID="IDCom";
+ DICTSUBMITTEDFROM="Sometido De";
+ DICTPAGEWIDTH="Anchura";
+ DICTPAGELENGTH="Longitud";
+ DICTRES="Resolución";
+ DICTNOTHINGAVAIL="nada disponible";
+ DICTSTATUS="Estado";
+ DICTREMOTEEXCHANGES="intercambios con el dispositivo alejado";
+ DICTDIALOGS="Diálogos";
+ DICTFAILEDCALLS="llamadas falladas consecutivas a la destinación";
+ DICTDIALS="Diales";
+ DICTTOTALCALLS="llamadas telefónicas totales puestas";
+ DICTCALLS="Llamadas";
+ DICTPAGESTRANSMITTED="páginas transmitidas";
+ DICTPAGES="Páginas";
+ DICTTOTALPAGES="páginas totales a transmitir";
+ DICTTOTPAGES="PáginaTot";
+ DICTATTEMPTSPAGE="tentativas de enviar la página actual";
+ DICTATTEMPTS="Tentativas";
+ DICTDIRNEXTPAGE="directorio de la página siguiente a enviar";
+ DICTDIRNUM="NumDir";
+ DICTDOCSSUBMITTED="Los documentos sometieron para la transmisión";
+ DICTDOCSTEXT1="Los documentos siguientes fueron sometidos para la transmisión y son";
+ DICTDOCSTEXT2="disponibles en el servidor para la reutilización hasta que estén purgado";
+ DICTDOCSTEXT3="automáticamente cuando es este trabajo esté `if [ \"\$doneop\" = archive ]; then echo 'archivado'; else echo 'quitado'; fi`. Los documentos pueden también estar quitado";
+ DICTDOCSTEXT4="manualmente usando el comando faxrm; consulte faxrm(1) para la información.";
+ DICTFILENAME="Nombre de fichero";
+ DICTSIZE="Tamaño";
+ DICTTYPE="Tipo";
+ DICTUNSENTPAGES="Las páginas no enviadas sometidas para la transmisión";
+ DICTPIN="PIN ";
+ DICTMESSAGETEXT="Texto del mensaje";
+ DICTNOREASON="ninguna razón registrada";
+ DICTYOURJOBTO="Su trabajo \$THISJOBTYPE a \$number";
+ DICTfacsimile="facsímil";
+ DICTpager="paginador";
+ DICTJOB="trabajo \$THISJOBTYPE \$jobid";
+ DICTAT="a";
+ DICTTO="a";
+ DICTCOMPLETED="se cumplió";
+ DICTCOMPLETEDSUCCESSFULLY=" se cumplió con éxito.";
+ DICTRECEIVER="Receptor";
+ DICTQUALITY="Calidad";
+ DICTFINE="Fino";
+ DICTNORMAL="Normal";
+ DICTSIGNALRATE="Metro De Señal";
+ DICTDATAFORMAT="Formato De Datos";
+ DICTREMOTEEQUIPMENT="Equipo Alejado";
+ DICTREMOTESTATION="Estación Alejada";
+ DICTPROCESSINGTIME="El tiempo de proceso era";
+ DICTADDITIONALINFO=" Información adicional:";
+ DICTFAILED="falló";
+ DICTREJECTEDBECAUSE="fue rechazado porque:";
+ DICTBLOCKED="bloqueado";
+ DICTDELAYEDBECAUSE="se retrasa en las coletas programar porque:";
+ DICTASSOONASPOSSIBLE="El trabajo será procesado cuanto antes.";
+ DICTREQUEUED="hecho cola";
+ DICTWASNOTSENT="no fue enviado porque:";
+ DICTWILLBERETRIED="El trabajo será revisado en";
+ DICTREMOVEDFROMQUEUE="quitado de coleta";
+ DICTWASDELETED="fue suprimido de la coleta.";
+ DICTTIMEDOUT="no podía ser cumplido antes del plazo designado.";
+ DICTCONVERSION1="no fue enviado porque conversión del documento";
+ DICTCONVERSION2="a un facsímil fallado. La salida del programa del convertidor era:";
+ DICTCONVERSION3="Compruebe cualquier documento de PostScript para saber si hay fuentes no estándar y construcciones inválidas";
+ DICTNOFORMATTER1="no fue enviado porque";
+ DICTNOFORMATTER2="la escritura de la conversión del documento no fue encontrada.";
+ DICTNOTICEABOUT="Aviso de";
+ DICTPOLLINGFAILED=", una petición de la interrogación, \nno podia ser terminado porque ";
+ DICTREMOTEREJECTED="el lado alejado rechazó su petición.";
+ DICTNODOCTOPOLL="no hay documento disponible para la recuperación.";
+ DICTUNSPECIFIEDPROBLEM="un problema sin especificar ocurrió.";
+ DICTUNKNOWNREASON1="hizo que algo le sucediera.";
+ DICTUNKNOWNREASON2="Desafortunadamente, la escritura de la notificación fue invocada con una razón desconocida";
+ DICTUNKNOWNREASON3="el resto de este mensaje está tan para eliminar errores:";
+ DICTUNKNOWNREASON4="Esto no debe suceder, satisfacer informe él a su administrador.";
+ DICTRECEIVEDON="Recibido De";
+ DICTPOLLFAILED="la recuperación de la encuesta del facsímil falló";
+ DICTYES="Sí";
+ DICTNO="No";
+ DICTRECEIVED="Recibido";
+ DICTTIMETORECV="Tiempo Para Recibir";
+ DICTERRCORRECT="Errores Corregidos";
+ DICTCALLID1="ID Llamada 1";
+ DICTCALLID2="ID Llamada 2";
+ DICTCALLID3="ID Llamada 3";
+ DICTCALLID4="ID Llamada 4";
+ DICTCALLID5="ID Llamada 5";
+ DICTCALLID6="ID Llamada 6";
+ DICTCALLID7="ID Llamada 7";
+ ;;
+ de_*)
+ DICTRECEIVEAGENT="Der HylaFAX Empfangsagent";
+ DICTRECEIVEDFROM="Fax empfangen von \$SENDER";
+ DICTRETRIEVEDFROM="Fax geholt von \$SENDER";
+ DICTMSGINTRO="Das ganze Dokument wurde nicht empfangen weil:";
+ DICTLOGFOLLOWS=" ---- Ablauf der Session ----";
+ DICTLOGFOLLOWS2="Ablauf der Session anbei";
+ DICTNOLOGAVAIL=" Kein Protokoll des Ablaufs verfügbar";
+ DICTDISPATCHEDTO="Das Fax wurde automatisch weitergeleitet an: \$SENDTO.";
+ DICTPOLLDISPATCHTO="Das Fax wurde abgerufen und zugestellt an: \$MAILADDR.";
+ DICTNOTRECEIVED="Fax nicht empfangen";
+ DICTATTEMPTEDFAXFAILED="Ein Versuch, ein Fax zu empfangen an \$DEVICE schlug fehl da:";
+ DICTATTEMPTEDPOLLFAILED="Ein Versuch, ein Fax zu holen an \$DEVICE schlug fehl da:";
+ DICTFAILEDBECAUSE="schlug fehl da:";
+ DICTUNKNOWNDOCTYPE="Unbekannter Dokumententyp";
+ DICTNOFILEEXISTS="Datei existiert nicht";
+ DICTDESTINATION="Ziel";
+ DICTJOBID="JobID";
+ DICTGROUPID="GruppenID";
+ DICTSENDER="Sender";
+ DICTMAILADDR="Mailaddresse";
+ DICTMODEM="Modem";
+ DICTCOMMID="KommunikationsID";
+ DICTSUBMITTEDFROM="Geschickt von";
+ DICTPAGEWIDTH="Seiten Breite";
+ DICTPAGELENGTH="Seiten Länge";
+ DICTRES="Auflösung";
+ DICTNOTHINGAVAIL="nichts verfügbar";
+ DICTSTATUS="Status";
+ DICTREMOTEEXCHANGES="Kommunikationsversuchen mit Zielfaxgerät";
+ DICTDIALOGS="Dialoge";
+ DICTFAILEDCALLS="nachfolgende fehlgeschlagene Anrufe zum Empfänger";
+ DICTDIALS="Wählversuche";
+ DICTTOTALCALLS="Anrufe insgesamt durchgeführt";
+ DICTCALLS="Anrufe";
+ DICTPAGESTRANSMITTED="Seiten übermittelt";
+ DICTPAGES="Seiten";
+ DICTTOTALPAGES="Seiten insgesamt zu übermitteln";
+ DICTTOTPAGES="TotPages";
+ DICTATTEMPTSPAGE="Versuche die derzeitige Seite zu senden";
+ DICTATTEMPTS="Versuche";
+ DICTDIRNEXTPAGE="Verzeichniss der nächsten zu übermittelnden Seite";
+ DICTDIRNUM="Dirnum";
+ DICTDOCSSUBMITTED="Dokumente zum Versand übermittelt";
+ DICTDOCSTEXT1="Die folgenden Dokumente wurden zum Versand übermittelt und sind";
+ DICTDOCSTEXT2="auf dem Server zur erneuten Nutzung verfügbar bis sie automatisch";
+ DICTDOCSTEXT3="bereinigt, wenn dieser Auftrag `if [ \"\$doneop\" = archive ]; then echo 'archiviert'; else echo 'entfernt'; fi`. Dokumente können auch manuell";
+ DICTDOCSTEXT4="entfernt werden durch Nutzung des faxrm Kommandos; siehe dazu faxrm(1) für mehr Information.";
+ DICTFILENAME="Dateiname";
+ DICTSIZE="Grösse";
+ DICTTYPE="Typ";
+ DICTUNSENTPAGES="Nicht gesendete Seiten zum Versand übermittelt";
+ DICTPIN="PIN ";
+ DICTMESSAGETEXT="Nachrichtentext";
+ DICTNOREASON="kein Grund aufgezeichnet";
+ DICTYOURJOBTO="Ihr \$THISJOBTYPE Auftrag an \$number";
+ DICTfacsimile="Fax";
+ DICTpager="Pager";
+ DICTJOB="\$THISJOBTYPE Auftrag \$jobid";
+ DICTAT="um";
+ DICTTO="an";
+ DICTCOMPLETED="abgeschlossen";
+ DICTCOMPLETEDSUCCESSFULLY=" wurde erfolgreich abgeschlossen.";
+ DICTRECEIVER="Empfänger";
+ DICTQUALITY="Qualität";
+ DICTFINE="Fine";
+ DICTNORMAL="Normal";
+ DICTSIGNALRATE="Übertragungsgeschwindigkeit";
+ DICTDATAFORMAT="Datenformat";
+ DICTREMOTEEQUIPMENT="Gegenstellen Equipment";
+ DICTREMOTESTATION="Gegenstellen Station";
+ DICTPROCESSINGTIME="Verarbeitungszeit";
+ DICTADDITIONALINFO=" Zusätzliche Information:";
+ DICTFAILED="fehlgeschlagen";
+ DICTREJECTEDBECAUSE="wurde verworfen weil:";
+ DICTBLOCKED="blockiert";
+ DICTDELAYEDBECAUSE="ist verzögert im Verarbeitungswarteschlange weil:";
+ DICTASSOONASPOSSIBLE="Der Auftrag so schnell wie möglich bearbeitet.";
+ DICTREQUEUED="wiedereingefügt";
+ DICTWASNOTSENT="wurde nicht gesendet weil:";
+ DICTWILLBERETRIED="Der Auftrag wird erneut bearbeitet um";
+ DICTREMOVEDFROMQUEUE="von der Verarbeitungswarteschlange entfernt";
+ DICTWASDELETED="wurde aus der Verarbeitungswarteschlange gelöscht.";
+ DICTTIMEDOUT="konnte nicht innerhalb der für den Auftrag verfügbaren Zeit vollendet werden.";
+ DICTCONVERSION1="wurde nicht gesendet, weil die Dokumentenkonvertierung";
+ DICTCONVERSION2="zum Fax fehlgeschlagen ist. Die Ausgabe des Konvertierungsprogrammes war:";
+ DICTCONVERSION3="Überprüfen Sie jedes PostScript Dokument auf nicht standard konforme Fonts und invalide Konstruktionen";
+ DICTNOFORMATTER1="wurde nicht gesendet weil";
+ DICTNOFORMATTER2="das Skript zur Dokumentenkonvertierung wurde nicht gefunden.";
+ DICTNOTICEABOUT="Hinweis über";
+ DICTPOLLINGFAILED=", ein Faxabruf,\nkonnte nicht vollendet werden weil ";
+ DICTREMOTEREJECTED="die Gegenstelle den Faxabruf abgewiesen hat.";
+ DICTNODOCTOPOLL="kein Dokument war zum Empfang verfügbar.";
+ DICTUNSPECIFIEDPROBLEM="ein nicht spezifiziertes Problem ist aufgetreten.";
+ DICTUNKNOWNREASON1="ist irgendwas geschehen.";
+ DICTUNKNOWNREASON2="Leider wurde das Benachrichtigungsskript aus unbekanntem Grund aufgerufen";
+ DICTUNKNOWNREASON3="so dass der Rest dieser Nachricht dem Debugging dienen kann:";
+ DICTUNKNOWNREASON4="Dies sollte nicht geschehen, bitte wenden Sie Sich an den Administrator.";
+ DICTRECEIVEDON="EmpfangenAn";
+ DICTPOLLFAILED="Faxabruf schlug fehl";
+ DICTYES="Ja";
+ DICTNO="Nein";
+ DICTRECEIVED="Empfangen";
+ DICTTIMETORECV="Zeit zu empfangen";
+ DICTERRCORRECT="Störungskorrektes";
+ DICTCALLID1="Anrufe ID 1";
+ DICTCALLID2="Anrufe ID 2";
+ DICTCALLID3="Anrufe ID 3";
+ DICTCALLID4="Anrufe ID 4";
+ DICTCALLID5="Anrufe ID 5";
+ DICTCALLID6="Anrufe ID 6";
+ DICTCALLID7="Anrufe ID 7";
+ ;;
+ *)
+ DICTRECEIVEAGENT="The HylaFAX Receive Agent";
+ DICTRECEIVEDFROM="Facsimile received from \$SENDER";
+ DICTRETRIEVEDFROM="Facsimile retrieved from \$SENDER";
+ DICTMSGINTRO="The full document was not received because:";
+ DICTLOGFOLLOWS=" ---- Transcript of session follows ----";
+ DICTLOGFOLLOWS2="Transcript of session follows";
+ DICTNOLOGAVAIL=" No transcript available";
+ DICTDISPATCHEDTO="The facsimile was automatically dispatched to: \$SENDTO.";
+ DICTPOLLDISPATCHTO="The facsimile was polled by and delivered to: \$MAILADDR.";
+ DICTNOTRECEIVED="facsimile not received";
+ DICTATTEMPTEDFAXFAILED="An attempt to receive facsimile on \$DEVICE failed because:"
+ DICTATTEMPTEDPOLLFAILED="An attempt to retrieve facsimile on \$DEVICE failed because:";
+ DICTFAILEDBECAUSE="failed because:";
+ DICTUNKNOWNDOCTYPE="Unknown document type";
+ DICTNOFILEEXISTS="File does not exist";
+ DICTDESTINATION="Destination";
+ DICTJOBID="JobID";
+ DICTGROUPID="GroupID";
+ DICTSENDER="Sender";
+ DICTMAILADDR="Mailaddr";
+ DICTMODEM="Modem";
+ DICTCOMMID="CommID";
+ DICTSUBMITTEDFROM="Submitted From";
+ DICTPAGEWIDTH="Page Width";
+ DICTPAGELENGTH="Page Length";
+ DICTRES="Resolution";
+ DICTNOTHINGAVAIL="nothing available";
+ DICTSTATUS="Status";
+ DICTREMOTEEXCHANGES="exchanges with remote device";
+ DICTDIALOGS="Dialogs";
+ DICTFAILEDCALLS="consecutive failed calls to destination";
+ DICTDIALS="Dials";
+ DICTTOTALCALLS="total phone calls placed";
+ DICTCALLS="Calls";
+ DICTPAGESTRANSMITTED="pages transmitted";
+ DICTPAGES="Pages";
+ DICTTOTALPAGES="total pages to transmit";
+ DICTTOTPAGES="TotPages";
+ DICTATTEMPTSPAGE="attempts to send current page";
+ DICTATTEMPTS="Attempts";
+ DICTDIRNEXTPAGE="directory of next page to send";
+ DICTDIRNUM="Dirnum";
+ DICTDOCSSUBMITTED="Documents submitted for transmission";
+ DICTDOCSTEXT1="The following documents were submitted for transmission and are";
+ DICTDOCSTEXT2="available on the server for reuse until they are automatically";
+ DICTDOCSTEXT3="purged when this job is `if [ \"\$doneop\" = archive ]; then echo 'archived'; else echo 'removed'; fi`. Documents may also be manually";
+ DICTDOCSTEXT4="removed using the faxrm command; consult faxrm(1) for information.";
+ DICTFILENAME="Filename";
+ DICTSIZE="Size";
+ DICTTYPE="Type";
+ DICTUNSENTPAGES="Unsent pages submitted for transmission";
+ DICTPIN="PIN ";
+ DICTMESSAGETEXT="Message text";
+ DICTNOREASON="no reason recorded";
+ DICTYOURJOBTO="Your \$THISJOBTYPE job to \$number";
+ DICTfacsimile="facsimile";
+ DICTpager="pager";
+ DICTJOB="\$THISJOBTYPE job \$jobid";
+ DICTAT="at";
+ DICTTO="to";
+ DICTCOMPLETED="completed";
+ DICTCOMPLETEDSUCCESSFULLY=" was completed successfully.";
+ DICTRECEIVER="Receiver";
+ DICTQUALITY="Quality";
+ DICTFINE="Fine";
+ DICTNORMAL="Normal";
+ DICTSIGNALRATE="Signal Rate";
+ DICTDATAFORMAT="Data Format";
+ DICTREMOTEEQUIPMENT="Remote Equipment";
+ DICTREMOTESTATION="Remote Station";
+ DICTPROCESSINGTIME="Processing time was";
+ DICTADDITIONALINFO=" Additional information:";
+ DICTFAILED="failed";
+ DICTREJECTEDBECAUSE="was rejected because:";
+ DICTBLOCKED="blocked";
+ DICTDELAYEDBECAUSE="is delayed in the scheduling queues because:";
+ DICTASSOONASPOSSIBLE="The job will be processed as soon as possible.";
+ DICTREQUEUED="requeued";
+ DICTWASNOTSENT="was not sent because:";
+ DICTWILLBERETRIED="The job will be retried at";
+ DICTREMOVEDFROMQUEUE="removed from queue";
+ DICTWASDELETED="was deleted from the queue.";
+ DICTTIMEDOUT="could not be completed before the appointed deadline.";
+ DICTCONVERSION1="was not sent because document conversion";
+ DICTCONVERSION2="to facsimile failed. The output from the converter program was:";
+ DICTCONVERSION3="Check any PostScript documents for non-standard fonts and invalid constructs";
+ DICTNOFORMATTER1="was not sent because";
+ DICTNOFORMATTER2="the document conversion script was not found.";
+ DICTNOTICEABOUT="Notice about";
+ DICTPOLLINGFAILED=", a polling request,\ncould not be completed because ";
+ DICTREMOTEREJECTED="the remote side rejected your request.";
+ DICTNODOCTOPOLL="no document was available for retrieval.";
+ DICTUNSPECIFIEDPROBLEM="an unspecified problem occurred.";
+ DICTUNKNOWNREASON1="had something happen to it.";
+ DICTUNKNOWNREASON2="Unfortunately, the notification script was invoked with an unknown reason";
+ DICTUNKNOWNREASON3="so the rest of this message is for debugging:";
+ DICTUNKNOWNREASON4="This should not happen, please report it to your administrator.";
+ DICTRECEIVEDON="Received On";
+ DICTPOLLFAILED="facsimile poll retrieval failed";
+ DICTYES="Yes";
+ DICTNO="No";
+ DICTRECEIVED="Received";
+ DICTTIMETORECV="Time To Receive";
+ DICTERRCORRECT="Error Correct";
+ DICTCALLID1="CallID1";
+ DICTCALLID2="CallID2";
+ DICTCALLID3="CallID3";
+ DICTCALLID4="CallID4";
+ DICTCALLID5="CallID5";
+ DICTCALLID6="CallID6";
+ DICTCALLID7="CallID7";
+ ;;
+esac
diff -Nru hylafax.orig/util/faxrcvd.sh.in hylafax/util/faxrcvd.sh.in
--- hylafax.orig/util/faxrcvd.sh.in 2005-12-22 09:24:30.000000000 -0800
+++ hylafax/util/faxrcvd.sh.in 2005-12-27 11:51:10.073840792 -0800
@@ -60,6 +60,7 @@
CHARSET=us-ascii
. etc/setup.cache
+. bin/common-functions
INFO=$SBIN/faxinfo
FAX2PS=$TIFFBIN/fax2ps
@@ -124,6 +125,15 @@
fi
#
+# Fetch language settings (after FaxDispatch for customization of $LANG).
+#
+. bin/dictionary
+if [ -f etc/FaxDictionary ]; then
+ . etc/FaxDictionary
+fi
+setInfoSize
+
+#
# Produce mailable encoding for binary files.
#
encode()
@@ -155,34 +165,35 @@
esac
if [ "$TOADDR" != "$SENDTO" -a "$NOTIFY_FAXMASTER" != "no" ]; then
(echo "To: $TOADDR"
- echo "From: The HylaFAX Receive Agent <$FROMADDR>"
- echo "Subject: Facsimile received from $SENDER";
+ echo "From: $DICTRECEIVEAGENT <$FROMADDR>"
+ eval echo "Subject: $DICTRECEIVEDFROM";
echo ""
- echo "$FILE (ftp://$HOSTNAME:$PORT/$FILE):"; $INFO -n $FILE
- echo "ReceivedOn: $DEVICE"
+ echo "$FILE (ftp://$HOSTNAME:$PORT/$FILE):";
+ faxInfo $FILE
+ printf "%`echo $INFOSIZE`s: $DEVICE\n" "$DICTRECEIVEDON"
if [ "$MSG" ]; then
echo ""
- echo "The full document was not received because:"
+ echo "$DICTMSGINTRO"
echo ""
echo " $MSG"
echo ""
- echo " ---- Transcript of session follows ----"
+ echo "$DICTLOGFOLLOWS"
echo ""
if [ -f log/c$COMMID ]; then
$SED -e '/-- data/d' \
-e '/start.*timer/d' -e '/stop.*timer/d' \
log/c$COMMID
elif [ -n "$COMMID" ]; then
- echo " No transcript available (CommID c$COMMID)."
+ echo "$DICTNOLOGAVAIL ($DICTCOMMID c$COMMID)."
else
- echo " No transcript available."
+ echo "$DICTNOLOGAVAIL."
fi
else
- echo " CommID: c$COMMID (ftp://$HOSTNAME:$PORT/log/c$COMMID)"
+ printf "%`echo $INFOSIZE`s: c$COMMID (ftp://$HOSTNAME:$PORT/log/c$COMMID)\n" "$DICTCOMMID"
fi
if [ -n "$SENDTO" ]; then
echo ""
- echo "The facsimile was automatically dispatched to: $SENDTO."
+ eval echo "$DICTDISPATCHEDTO"
fi
) 2>$ERRORSTO | $SENDMAIL -f$FROMADDR -oi $TOADDR
fi
@@ -192,34 +203,34 @@
echo "Content-Type: Multipart/Mixed; Boundary=\"$MIMEBOUNDARY\""
echo "Content-Transfer-Encoding: 7bit"
echo "To: $SENDTO"
- echo "From: The HylaFAX Receive Agent <$FROMADDR>"
- echo "Subject: Facsimile received from $SENDER";
+ echo "From: $DICTRECEIVEAGENT <$FROMADDR>"
+ eval echo "Subject: $DICTRECEIVEDFROM";
echo ""
echo "--$MIMEBOUNDARY"
echo "Content-Type: text/plain; charset=$CHARSET"
echo "Content-Transfer-Encoding: quoted-printable"
echo ""
- $INFO -n $FILE
- echo "ReceivedOn: $DEVICE"
+ faxInfo $FILE
+ printf "%`echo $INFOSIZE`s: $DEVICE\n" "$DICTRECEIVEDON"
if [ "$MSG" ]; then
echo ""
- echo "The full document was not received because:"
+ echo "$DICTMSGINTRO"
echo ""
echo " $MSG"
echo ""
- echo " ---- Transcript of session follows ----"
+ echo "$DICTLOGFOLLOWS"
echo ""
if [ -f log/c$COMMID ]; then
$SED -e '/-- data/d' \
-e '/start.*timer/d' -e '/stop.*timer/d' \
log/c$COMMID
elif [ -n "$COMMID" ]; then
- echo " No transcript available (CommID c$COMMID)."
+ echo "$DICTNOLOGAVAIL ($DICTCOMMID c$COMMID)."
else
- echo " No transcript available."
+ echo "$DICTNOLOGAVAIL."
fi
else
- echo " CommID: c$COMMID"
+ printf "%`echo $INFOSIZE`s: c$COMMID\n" "$DICTCOMMID"
fi
echo ""
echo "--$MIMEBOUNDARY"
@@ -256,23 +267,23 @@
# Generate notification mail for a failed attempt.
#
(echo "To: $TOADDR"
- echo "From: The HylaFAX Receive Agent <$FROMADDR>"
- echo "Subject: facsimile not received"
+ echo "From: $DICTRECEIVEAGENT <$FROMADDR>"
+ echo "Subject: $DICTNOTRECEIVED"
echo ""
- echo "An attempt to receive facsimile on $DEVICE failed because:"
+ eval echo "$DICTATTEMPTEDFAXFAILED"
echo ""
echo " $MSG"
echo ""
- echo " ---- Transcript of session follows ----"
+ echo "$DICTLOGFOLLOWS"
echo ""
if [ -f log/c$COMMID ]; then
$SED -e '/-- data/d' \
-e '/start.*timer/d' -e '/stop.*timer/d' \
log/c$COMMID
elif [ -n "$COMMID" ]; then
- echo " No transcript available (CommID c$COMMID)."
+ echo "$DICTNOLOGAVAIL ($DICTCOMMID c$COMMID)."
else
- echo " No transcript available."
+ echo "$DICTNOLOGAVAIL."
fi
) 2>$ERRORSTO | $SENDMAIL -f$FROMADDR -oi $TOADDR
fi
diff -Nru hylafax.orig/util/Makefile.in hylafax/util/Makefile.in
--- hylafax.orig/util/Makefile.in 2005-12-22 09:24:30.000000000 -0800
+++ hylafax/util/Makefile.in 2005-12-26 13:04:55.000000000 -0800
@@ -187,6 +187,8 @@
${PUTSUPD} -m 755 -src notify-4.1.sh -O notify-4.1
${PUTSUPD} -m 444 -src ${SRCDIR}/notify.awk -O notify.awk
${PUTSUPD} -m 755 -src archive.sh -O archive
+ ${PUTSUPD} -m 755 -src common-functions.sh -O common-functions
+ ${PUTSUPD} -m 755 -src dictionary.sh -O dictionary
${PUTSUPD} -m 755 -src faxrcvd.sh -O faxrcvd
${PUTSUPD} -m 755 -src pollrcvd.sh -O pollrcvd
${PUTSUPD} -m 755 -src mkcover.sh -O mkcover
@@ -202,8 +204,8 @@
# These targets are created during the configuration procedure.
#
clobberconfig:
- -${RM} -f pagesizes xferfaxstats.sh recvstats.sh faxcron.sh \
+ -${RM} -f pagesizes xferfaxstats.sh recvstats.sh faxcron.sh dictionary.sh \
faxrcvd.sh mkcover.sh notify-4.1.sh notify.sh pcl2fax.sh pollrcvd.sh \
ps2fax.dps.sh ps2fax.gs.sh ps2fax.imp.sh tiff2fax.sh \
- tiff2pdf.sh wedged.sh archive.sh pdf2fax.gs.sh
+ tiff2pdf.sh wedged.sh archive.sh pdf2fax.gs.sh common-functions.sh
diff -Nru hylafax.orig/util/notify.sh.in hylafax/util/notify.sh.in
--- hylafax.orig/util/notify.sh.in 2005-12-22 09:24:30.000000000 -0800
+++ hylafax/util/notify.sh.in 2005-12-27 18:26:09.024052736 -0800
@@ -164,6 +164,14 @@
# source notify preferecnes
. etc/FaxNotify
fi
+
+ #
+ # Language settings...
+ #
+ . bin/dictionary
+ if [ -f etc/FaxDictionary ]; then
+ . etc/FaxDictionary
+ fi
}
parseQfile()
@@ -260,10 +268,10 @@
elif (match "$FILETYPE" "pdf") ; then
echo "PDF"
else
- echo "Unknown document type"
+ echo "$DICTUNKNOWNDOCTYPE"
fi
else
- echo "File does not exist"
+ echo "$DICTNOFILEEXISTS"
fi
}
@@ -543,43 +551,43 @@
returnToSender()
{
printBanner "Unsent job status"
- printItem "%s" "Destination" "$number"
- printItem "%s" "JobID" "$jobid"
- printItem "%s" "GroupID" "$groupid"
- printItem "%s" "Sender" "$sender"
- printItem "%s" "Mailaddr" "$mailaddr"
+ printItem "%s" "$DICTDESTINATION" "$number"
+ printItem "%s" "$DICTJOBID" "$jobid"
+ printItem "%s" "$DICTGROUPID" "$groupid"
+ printItem "%s" "$DICTSENDER" "$sender"
+ printItem "%s" "$DICTMAILADDR" "$mailaddr"
if [ -n "$commid" ] ; then
- printItem "%s" "CommID" "$commid"
+ printItem "%s" "$DICTCOMMID" "$commid"
fi
if [ "$modem" != "any" -a "$RETURNTECHINFO" = "yes" ] ; then
- printItem "%s" "Modem" "$modem"
+ printItem "%s" "$DICTMODEM" "$modem"
fi
- printItem "%s" 'Submitted From' "$client"
+ printItem "%s" "$DICTSUBMITTEDFROM" "$client"
if [ "$jobtype" = "facsimile" -a "$RETURNTECHINFO" = "yes" ] ; then
- printItem "%u (mm)" "Page Width" "$pagewidth"
- printItem "%.0f (mm)" "Page Length" "$pagelength"
- printItem "%.0f (lpi)" "Resolution" "$resolution"
+ printItem "%u (mm)" "$DICTPAGEWIDTH" "$pagewidth"
+ printItem "%.0f (mm)" "$DICTPAGELENGTH" "$pagelength"
+ printItem "%.0f (lpi)" "$DICTRES" "$resolution"
fi
- if [ -z "$faxstatus" ] ; then faxstatus=" (nothing available)" ; fi
+ if [ -z "$faxstatus" ] ; then faxstatus=" ($DICTNOTHINGAVAIL)" ; fi
# we need to use the %b (instead of the %s) so the embedded escape characters will
# be interpreted.
- printItem "%b" "Status" "$faxstatus"
- printItem "%u (exchanges with remote device)" "Dialogs" "$tottries"
- printItem "%u (consecutive failed calls to destination)" "Dials" "$ndials"
- printItem "%u (total phone calls placed)" "Calls" "$totdials"
+ printItem "%b" "$DICTSTATUS" "$faxstatus"
+ printItem "%u ($DICTREMOTEEXCHANGES)" "$DICTDIALOGS" "$tottries"
+ printItem "%u ($DICTFAILEDCALLS)" "$DICTDIALS" "$ndials"
+ printItem "%u ($DICTTOTALCALLS)" "$DICTCALLS" "$totdials"
if [ "$jobtype" = "facsimile" ] ; then
- printItem "%u (pages transmitted)" "Pages" "$npages"
- printItem "%u (total pages to transmit)" "TotPages" "$totpages"
- printItem "%u (attempts to send current page)" "Attempts" "$ntries"
- printItem "%u (directory of next page to send)" "Dirnum" "$dirnum"
+ printItem "%u ($DICTPAGESTRANSMITTED)" "$DICTPAGES" "$npages"
+ printItem "%u ($DICTTOTALPAGES)" "$DICTTOTPAGES" "$totpages"
+ printItem "%u ($DICTATTEMPTSPAGE)" "$DICTATTEMPS" "$ntries"
+ printItem "%u ($DICTDIRNEXTPAGE)" "$DICTDIRNUM" "$dirnum"
if [ $nfiles -gt 0 -a "$RETURNTECHINFO" = "yes" ] ; then
- printBanner "Documents submitted for transmission"
- echo "The following documents were submitted for transmission and are"
- echo "available on the server for reuse until they are automatically"
- echo "purged when this job is ${doneop}d. Documents may also be manually"
- echo "removed using the faxrm command; consult faxrm(1) for information."
+ printBanner "$DICTDOCSSUBMITTED"
+ eval echo "$DICTDOCSTEXT1"
+ eval echo "$DICTDOCSTEXT2"
+ eval echo "$DICTDOCSTEXT3"
+ eval echo "$DICTDOCSTEXT4"
echo ""
- printf "%-20s %8s %s\n" "Filename" "Size" "Type"
+ printf "%-20s %8s %s\n" "$DICTFILENAME" "$DICTSIZE" "$DICTTYPE"
for i in `local_seq 1 $nfiles`; do
name="files_$i"
eval filename=`echo "$"$name`
@@ -604,15 +612,15 @@
fi
elif [ "$jobtype" = "pager" ] ; then
if [ $npins -ne 0 ] ; then
- printBanner "Unsent pages submitted for transmission"
+ printBanner "$DICTUNSENTPAGES"
for i in `local_seq 1 $npins`; do
name="files_$i"
eval pin=`echo "$"$name`
- printf "%15s\n" "PIN " $pin
+ printf "%15s\n" "$DICTPIN" $pin
done
fi
if [ $nfiles -ne 0 -a -s $files_0 ] ; then
- printBanner "Message text"
+ printBanner "$DICTMESSAGETEXT"
cat $files_0
fi
fi
@@ -621,15 +629,15 @@
returnTranscript()
{
if [ "$RETURNTRANSCRIPT" = "yes" ] ; then
- printBanner "Transcript of session follows"
+ printBanner "$DICTLOGFOLLOWS2"
COMFILE="log/c$commid"
if [ -f "$COMFILE" ] ; then
# dump the comfile to output except for '-- data' lines
cat $COMFILE | $GREP -v "\-\- data"
else
- printf " No transcript available"
+ printf "$DICTNOLOGAVAIL"
if [ -n "$commid" ] ; then # non 0 len commid value
- printf "(CommID c$commid)"
+ printf "($DICTCOMMID c$commid)"
fi
echo "."
fi
@@ -639,7 +647,7 @@
printStatus()
{
if [ -z "$1" ] ; then # 0 string len
- echo "<no reason recorded>"
+ echo "<$DICTNOREASON>"
else
# use -e in echo to interpret escape characters in the line
echo -e $1
@@ -652,7 +660,8 @@
echo "To: $mailaddr"
echo "Subject: $1"
putMimeTextHeader
- printf "Your $jobtype job to $number"
+ THISJOBTYPE=`eval echo "$"DICT$jobtype`
+ eval printf \"$DICTYOURJOBTO\"
}
##########
@@ -691,7 +700,8 @@
adjustNotifyFaxMaster
(if [ -z "$jobtag" ] ; then
- jobtag="$jobtype job $jobid"
+ THISJOBTYPE=`eval echo "$"DICT$jobtype`
+ jobtag="`eval echo $DICTJOB`"
fi
if [ "$doneop" = "default" ] ; then
doneop="remove"
@@ -701,7 +711,7 @@
fi
DESTINATION="$receiver"
if [ -n "$receiver" ] && [ -n "$company" ]; then
- DESTINATION="$receiver at "
+ DESTINATION="$receiver $DICTAT "
fi
DESTINATION="$DESTINATION$company"
if [ -n "$DESTINATION" ]; then
@@ -710,53 +720,53 @@
DESTINATION="$number"
fi
if [ "$WHY" = "done" ] ; then
- putHeaders "$jobtag to $DESTINATION completed"
- echo " was completed successfully."
+ putHeaders "$jobtag $DICTTO $DESTINATION $DICTCOMPLETED"
+ echo "$DICTCOMPLETEDSUCCESSFULLY";
echo "";
if [ "$jobtype" = "facsimile" ] ; then
- printItem "%u" "Pages" "$npages"
- printItem "%s" "Receiver" "$csi"
+ printItem "%u" "$DICTPAGES" "$npages"
+ printItem "%s" "$DICTRECEIVER" "$csi"
if [ "$RETURNTECHINFO" = "yes" ] ; then
if [ "$resolution" = "196" ] ; then
- printItem "%s" "Quality" "Fine"
+ printItem "%s" "$DICTQUALITY" "$DICTFINE"
else
- printItem "%s" "Quality" "Normal"
+ printItem "%s" "$DICTQUALITY" "$DICTNORMAL"
fi
- printItem "%u (mm)" "Page Width" "$pagewidth"
- printItem "%.0f (mm)" "Page Length" "$pagelength"
- printItem "%s" "Signal Rate" "$signalrate"
- printItem "%s" "Data Format" "$dataformat"
- printItem "%s" "Remote Equipment" "$equipment"
- printItem "%s" "Remote Station" "$station"
+ printItem "%u (mm)" "$DICTPAGEWIDTH" "$pagewidth"
+ printItem "%.0f (mm)" "$DICTPAGELENGTH" "$pagelength"
+ printItem "%s" "$DICTSIGNALRATE" "$signalrate"
+ printItem "%s" "$DICTDATAFORMAT" "$dataformat"
+ printItem "%s" "$DICTREMOTEEQUIPMENT" "$equipment"
+ printItem "%s" "$DICTREMOTESTATION" "$station"
fi
fi
if [ "$RETURNTECHINFO" = "yes" ] ; then
if [ "$tottries" != "1" ] ; then
- printItem "%s (exchanges with remote device)" "Dialogs" "$tottries"
+ printItem "%s ($DICTREMOTEEXCHANGES)" "$DICTDIALOGS" "$tottries"
fi
if [ "$totdials" != "1" ] ; then
- printItem "%s (total phone calls placed)" "Calls" "$totdials"
+ printItem "%s ($DICTTOTALCALLS)" "$DICTCALLS" "$totdials"
fi
if [ "$modem" != "any" ] ; then
- printItem "%s" "Modem" "$modem"
+ printItem "%s" "$DICTMODEM" "$modem"
fi
- printItem "%s" "Submitted From" "$client"
- printItem "%s" "JobID" "$jobid"
- printItem "%s" "GroupID" "$groupid"
- printItem "%s" "CommID" "c$commid"
- printf "\nProcessing time was %s.\n" "$JTIME"
+ printItem "%s" "$DICTSUBMITTEDFROM" "$client"
+ printItem "%s" "$DICTJOBID" "$jobid"
+ printItem "%s" "$DICTGROUPID" "$groupid"
+ printItem "%s" "$DICTCOMMID" "c$commid"
+ printf "\n$DICTPROCESSINGTIME %s.\n" "$JTIME"
fi
if [ -n "$faxstatus" -a "$RETURNTRANSCRIPT" = "yes" ] ; then
# use -e in echo to interpret escape characters in faxstatus
- echo -e " Additional information:\n " $faxstatus
+ echo -e "$DICTADDITIONALINFO\n " $faxstatus
returnTranscript
fi
if [ -n "$RETURNFILETYPE" ] ; then
returnFaxImage "$RETURNFILETYPE"
fi
elif [ "$WHY" = "failed" ] ; then
- putHeaders "$jobtag to $DESTINATION failed"
- printf " failed because:\n "
+ putHeaders "$jobtag $DICTTO $DESTINATION $DICTFAILED"
+ printf " $DICTFAILEDBECAUSE\n "
printStatus "$faxstatus"
returnTranscript
returnToSender
@@ -764,29 +774,29 @@
returnFaxImage "$RETURNFILETYPE"
fi
elif [ "$WHY" = "rejected" ] ; then
- putHeaders "$jobtag to $DESTINATION failed"
- printf " was rejected because:\n "
+ putHeaders "$jobtag $DICTTO $DESTINATION $DICTFAILED"
+ printf " $REJECTEDBECAUSE\n "
printStatus "$faxstatus"
returnToSender
if [ -n "$RETURNFILETYPE" ] ; then
returnFaxImage "$RETURNFILETYPE"
fi
elif [ "$WHY" = "blocked" ] ; then
- putHeaders "$jobtag to $DESTINATION blocked"
- printf " is delayed in the scheduling queues because:\n "
+ putHeaders "$jobtag $DICTTO $DESTINATION $DICTBLOCKED"
+ printf " $DICTDELAYEDBECAUSE\n "
printStatus "$faxstatus"
echo ""
- echo "The job will be processed as soon as possible."
+ echo "$DICTASSOONASPOSSIBLE"
elif [ "$WHY" = "requeued" ] ; then
- putHeaders "$jobtag to $DESTINATION requeued"
- printf " was not sent because:\n "
+ putHeaders "$jobtag $DICTTO $DESTINATION $DICTREQUEUED"
+ printf " $DICTWASNOTSENT\n "
printStatus "$faxstatus"
echo ""
- echo "The job will be retried at $NEXT."
+ echo "$DICTWILLBERETRIED $NEXT."
returnTranscript
elif [ "$WHY" = "removed" ] || [ "$WHY" = "killed" ] ; then
- putHeaders "$jobtag to $DESTINATION removed from queue"
- echo " was deleted from the queue."
+ putHeaders "$jobtag $DICTTO $DESTINATION $DICTREMOVEDFROMQUEUE"
+ echo " $DICTWASDELETED"
if [ "$WHY" = "killed" ] ; then
returnToSender
fi
@@ -794,48 +804,48 @@
returnFaxImage "$RETURNFILETYPE"
fi
elif [ "$WHY" = "timedout" ]; then
- putHeaders "$jobtag to $DESTINATION failed"
- echo " could not be completed before the appointed deadline."
+ putHeaders "$jobtag $DICTTO $DESTINATION $DICTFAILED"
+ echo " $DICTTIMEDOUT"
returnToSender
if [ -n "$RETURNFILETYPE" ] ; then
returnFaxImage "$RETURNFILETYPE"
fi
elif [ "$WHY" = "format_failed" ] ; then
- putHeaders "$jobtag to $DESTINATION failed"
- echo " was not sent because document conversion"
- echo -e "to facsimile failed. The output from the converter program was:\n"
+ putHeaders "$jobtag to $DESTINATION $DICTFAILED"
+ echo " $DICTCONVERSION1"
+ echo -e "$DICTCONVERSION2\n"
# use -e in echo to interpret escape characters in faxstatus
echo -e $faxstatus "\n"
- echo "Check any PostScript documents for non-standard fonts and invalid constructs"
+ echo "$DICTCONVERSION3"
returnToSender
elif [ "$WHY" = "no_formatter" ] ; then
- putHeaders "$jobtag to $DESTINATION failed"
- echo " was not sent because"
- echo "the document conversion script was not found."
+ putHeaders "$jobtag $DICTTO $DESTINATION $DICTFAILED"
+ echo " $DICTNOFORMATTER1"
+ echo "$DICTNOFORMATTER2"
returnToSender
elif (match "$WHY" "poll_*") ; then
- putHeaders "Notice about $jobtag"
- printf ", a polling request,\ncould not be completed because "
+ putHeaders "$DICTNOTICEABOUT $jobtag"
+ printf "$DICTPOLLINGFAILED"
if [ "$WHY" = "poll_rejected" ] ; then
- echo "the remote side rejected your request."
+ echo "$DICTREMOTEREJECTED"
elif [ "$WHY" = "poll_no_document" ] ; then
- echo "no document was available for retrieval."
+ echo "$DICTNODOCTOPOLL"
elif [ "$WHY" = "poll_failed" ] ; then
- echo "an unspecified problem occurred."
+ echo "$DICTUNSPECIFIEDPROBLEM"
fi
echo "";
- printf "Processing time was %s.\n" "$JTIME"
+ printf "$DICTPROCESSINGTIME %s.\n" "$JTIME"
returnTranscript
else
- putHeaders "Notice about $jobtag"
- echo " had something happen to it."
- echo "Unfortunately, the notification script was invoked with an unknown reason"
- echo -e "so the rest of this message is for debugging:\n"
+ putHeaders "$DICTNOTICEABOUT $jobtag"
+ echo " $DICTUNKNOWNREASON1"
+ echo "$DICTUNKNOWNREASON2"
+ echo -e "$DICTUNKNOWNREASON3\n"
echo "why: $WHY"
echo "jobTime: $JTIME"
echo "nextTry: $NEXT"
echo ""
- echo "This should not happen, please report it to your administrator."
+ echo "$DICTUNKNOWNREASON4"
returnTranscript
returnToSender
fi
diff -Nru hylafax.orig/util/pollrcvd.sh.in hylafax/util/pollrcvd.sh.in
--- hylafax.orig/util/pollrcvd.sh.in 2005-12-22 09:24:30.000000000 -0800
+++ hylafax/util/pollrcvd.sh.in 2005-12-27 11:51:29.995812192 -0800
@@ -61,12 +61,14 @@
CHARSET=us-ascii
. etc/setup.cache
+. bin/common-functions
INFO=$SBIN/faxinfo
FAX2PS=$TIFFBIN/fax2ps
TIFF2PS=tiff2ps
TOADDR=FaxMaster
TIFFINFO=tiffinfo
+FROMADDR=fax
#
# Redirect errors to a tty, if possible, rather than
@@ -125,44 +127,52 @@
}
if [ -f $FILE ]; then
- #
- # Check the sender's TSI and setup to dispatch
- # facsimile received from well-known senders.
- #
SENDER="`$INFO $FILE | $AWK -F: '/Sender/ { print $2 }' 2>/dev/null`"
- if [ -f etc/PollDispatch ]; then
- . etc/PollDispatch # NB: PollDispatch allows customization
- fi
+fi
+if [ -f etc/PollDispatch ]; then
+ . etc/PollDispatch # NB: PollDispatch allows customization
+fi
+#
+# Fetch language settings (after FaxDispatch for customization of $LANG).
+#
+. bin/dictionary
+if [ -f etc/FaxDictionary ]; then
+ . etc/FaxDictionary
+fi
+setInfoSize
+
+if [ -f $FILE ]; then
if [ "$TOADDR" != "$MAILADDR" ]; then # don't send FaxMaster duplicate
(echo "To: $TOADDR"
- echo "From: The HylaFAX Receive Agent <fax>"
- echo "Subject: Facsimile retrieved from $SENDER";
+ echo "From: $DICTRECEIVEAGENT <$FROMADDR>"
+ eval echo "Subject: $DICTRETRIEVEDFROM";
echo ""
- echo "$FILE (ftp://$HOSTNAME:$PORT/$FILE):"; $INFO -n $FILE
- echo "ReceivedOn: $DEVICE"
+ echo "$FILE (ftp://$HOSTNAME:$PORT/$FILE):";
+ faxInfo $FILE
+ printf "%`echo $INFOSIZE`s: $DEVICE\n" "$DICTRECEIVEDON"
if [ "$MSG" ]; then
echo ""
- echo "The full document was not received because:"
+ echo "$DICTMSGINTRO"
echo ""
echo " $MSG"
echo ""
- echo " ---- Transcript of session follows ----"
+ echo "$DICTLOGFOLLOWS"
echo ""
if [ -f log/c$COMMID ]; then
$SED -e '/-- data/d' \
-e '/start.*timer/d' -e '/stop.*timer/d' \
log/c$COMMID
elif [ -n "$COMMID" ]; then
- echo " No transcript available (CommID c$COMMID)."
+ echo "$DICTNOLOGAVAIL ($DICTCOMMID c$COMMID)."
else
- echo " No transcript available."
+ echo "$DICTNOLOGAVAIL."
fi
else
- echo " CommID: c$COMMID (ftp://$HOSTNAME:$PORT/log/c$COMMID)"
+ echo " $DICTCOMMID: c$COMMID (ftp://$HOSTNAME:$PORT/log/c$COMMID)"
fi
if [ -n "$MAILADDR" ]; then
echo ""
- echo "The facsimile was polled by and delivered to: $MAILADDR."
+ eval echo "$DICTPOLLDISPATCHTO"
fi
) 2>$ERRORSTO | $SENDMAIL -ffax -oi $TOADDR
fi
@@ -172,34 +182,35 @@
echo "Content-Type: Multipart/Mixed; Boundary=\"$MIMEBOUNDARY\""
echo "Content-Transfer-Encoding: 7bit"
echo "To: $MAILADDR"
- echo "From: The HylaFAX Receive Agent <fax>"
- echo "Subject: Facsimile retrieved from $SENDER";
+ echo "From: $DICTRECEIVEAGENT <$FROMADDR>"
+ eval echo "Subject: $DICTRETRIEVEDFROM";
echo ""
echo "--$MIMEBOUNDARY"
echo "Content-Type: text/plain; charset=$CHARSET"
echo "Content-Transfer-Encoding: quoted-printable"
echo ""
- echo "$FILE (ftp://$HOSTNAME:$PORT/$FILE):"; $INFO -n $FILE
- echo "ReceivedOn: $DEVICE"
+ echo "$FILE (ftp://$HOSTNAME:$PORT/$FILE):";
+ faxInfo $FILE
+ printf "%`echo $INFOSIZE`s: $DEVICE\n" "$DICTRECEIVEDON"
if [ "$MSG" ]; then
echo ""
- echo "The full document was not received because:"
+ echo "$DICTMSGINTRO"
echo ""
echo " $MSG"
echo ""
- echo " ---- Transcript of session follows ----"
+ echo "$DICTLOGFOLLOWS"
echo ""
if [ -f log/c$COMMID ]; then
sed -e '/-- data/d' \
-e '/start.*timer/d' -e '/stop.*timer/d' \
log/c$COMMID
elif [ -n "$COMMID" ]; then
- echo " No transcript available (CommID c$COMMID)."
+ echo "$DICTNOLOGAVAIL ($DICTCOMMID c$COMMID)."
else
- echo " No transcript available."
+ echo "$DICTNOLOGAVAIL."
fi
else
- echo " CommID: c$COMMID (ftp://$HOSTNAME:$PORT/log/c$COMMID)"
+ echo " $DICTCOMMID: c$COMMID (ftp://$HOSTNAME:$PORT/log/c$COMMID)"
fi
echo ""
echo "--$MIMEBOUNDARY"
@@ -236,23 +247,23 @@
# Generate notification mail for a failed attempt.
#
(echo "To: $TOADDR"
- echo "From: The HylaFAX Receive Agent <fax>"
- echo "Subject: facsimile poll retrieval failed"
+ echo "From: $DICTRECEIVEAGENT <$FROMADDR>"
+ echo "Subject: $DICTPOLLFAILED"
echo ""
- echo "An attempt to retrieve facsimile on $DEVICE failed because:"
+ eval echo "$DICTATTEMPTEDPOLLFAILED"
echo ""
echo " $MSG"
echo ""
- echo " ---- Transcript of session follows ----"
+ echo "$DICTLOGFOLLOWS"
echo ""
if [ -f log/c$COMMID ]; then
$SED -e '/-- data/d' \
-e '/start.*timer/d' -e '/stop.*timer/d' \
log/c$COMMID
elif [ -n "$COMMID" ]; then
- echo " No transcript available (CommID c$COMMID)."
+ echo "$DICTNOLOGAVAIL ($DICTCOMMID c$COMMID)."
else
- echo " No transcript available."
+ echo "$DICTNOLOGAVAIL."
fi
) 2>$ERRORSTO | $SENDMAIL -ffax -oi $TOADDR
fi