~roadmr/checkbox/coverage-reviewer

« back to all changes in this revision

Viewing changes to plainbox/plainbox/impl/result.py

  • Committer: Daniel Manrique
  • Author(s): Zygmunt Krynicki
  • Date: 2014-06-02 15:26:13 UTC
  • mfrom: (3042.2.29 launchpad/recovery-plan)
  • Revision ID: daniel_manrique-20140602152613-fcz5za7e48ht0kx0
"automatic merge by tarmac [r=sylvain-pineau][bug=][author=zkrynicki]"

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
 
36
36
from plainbox.abc import IJobResult
37
37
from plainbox.i18n import gettext as _
 
38
from plainbox.i18n import pgettext as C_
38
39
from plainbox.impl.signal import Signal
39
40
 
40
41
logger = logging.getLogger("plainbox.result")
58
59
    Get the translated value of OUTCOME_ constant
59
60
    """
60
61
    return {
61
 
        IJobResult.OUTCOME_NONE: _("none"),
62
 
        IJobResult.OUTCOME_PASS: _("pass"),
63
 
        IJobResult.OUTCOME_FAIL: _("fail"),
64
 
        IJobResult.OUTCOME_SKIP: _("skip"),
65
 
        IJobResult.OUTCOME_NOT_SUPPORTED: _("not supported"),
66
 
        IJobResult.OUTCOME_NOT_IMPLEMENTED: _("not implemented"),
67
 
        IJobResult.OUTCOME_UNDECIDED: _("undecided")
 
62
        IJobResult.OUTCOME_NONE: C_(
 
63
            "textual outcome", "job didn't run"),
 
64
        IJobResult.OUTCOME_PASS: C_(
 
65
            "textual outcome", "job passed"),
 
66
        IJobResult.OUTCOME_FAIL: C_(
 
67
            "textual outcome", "job failed"),
 
68
        IJobResult.OUTCOME_SKIP: C_(
 
69
            "textual outcome", "job skipped"),
 
70
        IJobResult.OUTCOME_NOT_SUPPORTED: C_(
 
71
            "textual outcome", "job cannot be started"),
 
72
        IJobResult.OUTCOME_NOT_IMPLEMENTED: C_(
 
73
            "textual outcome", "job is not implemented"),
 
74
        IJobResult.OUTCOME_UNDECIDED: C_(
 
75
            "textual outcome", "job needs verification")
68
76
    }[outcome]
69
77
 
70
78