예제 #1
0
## You should have received a copy of the GNU General Public License
## along with Lino; if not, write to the Free Software Foundation,
## Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA



raise """
Task moved to lino.console.task
Job no longer used
"""

from lino.i18n import itr,_

itr("Working",
   de="Arbeitsvorgang läuft",
   fr="Travail en cours")
itr("%d warnings",
    de="%d Warnungen",
    fr="%d avertissements")
itr("%d errors" ,
    de="%d Fehler",
    fr="%d erreurs")
itr("Aborted",
    de="Vorgang abgebrochen")
#itr("Success",
#    de="Vorgang erfolgreich beendet")



class JobAborted(Exception):
예제 #2
0
## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
## or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
## License for more details.

## You should have received a copy of the GNU General Public License
## along with Lino; if not, write to the Free Software Foundation,
## Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

import os
from lino.console import syscon
from lino.console.exceptions import UserAborted

from lino.i18n import itr, _

itr("Are you sure you want to abort?",
    de="Arbeitsvorgang abbrechen?",
    fr="Interrompre le travail en cours?")


class Session:
    """A process capable to interact with the user.
    
    The user is usually a human sitting in front of a computer.
    A Session runs in a given Toolkit.

    Session is the base class for Application and for Task.

    """
    name = None

    def __init__(self, toolkit=None, **kw):
예제 #3
0
## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
## or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
## License for more details.

## You should have received a copy of the GNU General Public License
## along with Lino; if not, write to the Free Software Foundation,
## Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

import os
from lino.console import syscon
from lino.console.exceptions import UserAborted

from lino.i18n import itr,_

itr("Are you sure you want to abort?",
    de="Arbeitsvorgang abbrechen?",
    fr="Interrompre le travail en cours?")


class Session:
    """A process capable to interact with the user.
    
    The user is usually a human sitting in front of a computer.
    A Session runs in a given Toolkit.

    Session is the base class for Application and for Task.

    """
    name=None

    def __init__(self,toolkit=None,**kw):
예제 #4
0
class NeitherFileNorDirectory(Exception): pass



## if gettext.find('lino')!=None:
##     gettext.translation('lino').install()
##     print "using language file ",gettext.find('dirssync')
## else:
##     print "no language file found."
##     _=lambda msg: msg
 



itr("Start?",
   de=u"Arbeitsvorgang starten?",
   fr=u"Démarrer?")
itr("%d target files are NEWER! Are you sure?",
    de=u"%d Zieldateien sind NEUER! Sind Sie sicher?",
    fr=u"%d fichiers cible sont plus récents! Etes-vous certain?")

itr("Counting files...",
    de=u"Dateien zählen..."
    )
itr("Analyzing %s ...",
    de=u"Analysiere %s ...",
    fr=u"Analyse de %s en cours ..."
    )
itr("Nothing to do",de="Nichts zu tun")
itr("Synchronizing %s ...",
    de=u"Synchronisiere %s ...",
예제 #5
0
import types

from email import encoders
from email.message import Message
from email.mime.audio import MIMEAudio
from email.mime.base import MIMEBase
from email.mime.image import MIMEImage
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email.header import Header
from email.utils import getaddresses, formataddr, parseaddr

from lino.i18n import itr, _

itr("Message size: %d bytes.",
    de=u"Größe: %d Bytes",
    fr=u"Taille: %d octets")
itr("Send this to %d recipients: %s",
    de=u"Mail schicken an %d Empfänger: %s",
    fr=u"Envoyer ce mail a %d destinataires: %s")
itr("Sent to %d recipients.",
    de=u"Verschickt an %d Empfänger.",
    fr=u"Envoyé ? %d destinataires.")
itr("%d recipients refused.",
    de=u"%d Empfänger verweigert.",
    fr=u"%d destinataires ont été refusés.")


class MyMessage(Message):
    def __init__(self):
        Message.__init__(self)
예제 #6
0

from email import encoders
from email.message import Message
from email.mime.audio import MIMEAudio
from email.mime.base import MIMEBase
from email.mime.image import MIMEImage
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email.header import Header
from email.utils import getaddresses, formataddr, parseaddr


from lino.i18n import itr, _

itr("Message size: %d bytes.", de=u"Größe: %d Bytes", fr=u"Taille: %d octets")
itr(
    "Send this to %d recipients: %s",
    de=u"Mail schicken an %d Empfänger: %s",
    fr=u"Envoyer ce mail a %d destinataires: %s",
)
itr("Sent to %d recipients.", de=u"Verschickt an %d Empfänger.", fr=u"Envoyé ? %d destinataires.")
itr("%d recipients refused.", de=u"%d Empfänger verweigert.", fr=u"%d destinataires ont été refusés.")


class MyMessage(Message):
    def __init__(self):
        Message.__init__(self)
        """
        If I don't set transfer-encoding myself, set_charset()
        will set it to base64 which apparently is wrong
예제 #7
0
from lino.console.exceptions import OperationFailed
from lino.console.task import Progresser, Task


class NeitherFileNorDirectory(Exception):
    pass


## if gettext.find('lino')!=None:
##     gettext.translation('lino').install()
##     print "using language file ",gettext.find('dirssync')
## else:
##     print "no language file found."
##     _=lambda msg: msg

itr("Start?", de=u"Arbeitsvorgang starten?", fr=u"Démarrer?")
itr("%d target files are NEWER! Are you sure?",
    de=u"%d Zieldateien sind NEUER! Sind Sie sicher?",
    fr=u"%d fichiers cible sont plus récents! Etes-vous certain?")

itr("Counting files...", de=u"Dateien zählen...")
itr("Analyzing %s ...",
    de=u"Analysiere %s ...",
    fr=u"Analyse de %s en cours ...")
itr("Nothing to do", de="Nichts zu tun")
itr(
    "Synchronizing %s ...",
    de=u"Synchronisiere %s ...",
    fr=u"Synchronisation de %s en cours ...",
)
itr("Source directory '%s' doesn't exist.",