home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / share / hplip / base / strings.py < prev    next >
Encoding:
Python Source  |  2009-04-14  |  23.3 KB  |  615 lines

  1. # -*- coding: utf-8 -*-
  2. #
  3. # (c) Copyright 2003-2007 Hewlett-Packard Development Company, L.P.
  4. #
  5. # This program is free software; you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation; either version 2 of the License, or
  8. # (at your option) any later version.
  9. #
  10. # This program is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. # GNU General Public License for more details.
  14. #
  15. # You should have received a copy of the GNU General Public License
  16. # along with this program; if not, write to the Free Software
  17. # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
  18. #
  19. # Author: Don Welch
  20. #
  21.  
  22. # string_table := { 'string_id' : 'short', 'long' ), ... }
  23.  
  24. # string_id's for error codes are the string form of the error code
  25. # Strings that need localization use  (self.__tr'string' ) form.
  26. # Strings that refer to other strings, use '%reference%' form.
  27. # Blank strings use '' form.
  28.  
  29. class StringTable:
  30.     def __init__(self):
  31.  
  32.         self.string_table = {
  33.  
  34.             '0' :               (self.__tr('Unknown'),
  35.                                  ''),
  36.  
  37.             'unknown'   :       (self.__tr('Unknown'),
  38.                                  ''),
  39.  
  40.             'try_again' :       ('',
  41.                                  self.__tr('Please correct the problem and try again')),
  42.  
  43.             'press_continue' :  ('',
  44.                                  self.__tr('Please correct the problem and press continue on the printer')),
  45.  
  46.             '500' :             (self.__tr('Started a print job'),
  47.                                  ''),
  48.  
  49.             '501' :             (self.__tr('Print job has completed'),
  50.                                  ''),
  51.  
  52.             '502' :             (self.__tr("Print job failed - required plug-in not found"),
  53.                                  self.__tr("Please run hp-plugin (as root) to install the required plug-in")),
  54.  
  55.             '600' :             (self.__tr('Started a fax job'),
  56.                                  ''),
  57.  
  58.             '601' :             (self.__tr('Fax job is ready for send'),
  59.                                  ''),
  60.  
  61.             '700' :             (self.__tr('Printer queue stopped'),
  62.                                  ''),
  63.  
  64.             '701' :             (self.__tr('Printer queue started'),
  65.                                  ''),
  66.  
  67.             '702' :             (self.__tr('Printer is rejecting jobs'),
  68.                                  ''),
  69.  
  70.             '703' :             (self.__tr('Printer is accepting jobs'),
  71.                                  ''),
  72.  
  73.             '704' :             (self.__tr('Printer set as default'),
  74.                                  ''),
  75.  
  76.             '800' :             (self.__tr('Fax queue stopped'),
  77.                                  ''),
  78.  
  79.             '801' :             (self.__tr('Fax queue started'),
  80.                                  ''),
  81.  
  82.             '802' :             (self.__tr('Fax is rejecting jobs'),
  83.                                  ''),
  84.  
  85.             '803' :             (self.__tr('Fax is accepting jobs'),
  86.                                  ''),
  87.  
  88.             '804' :             (self.__tr('Fax set as default'),
  89.                                  ''),
  90.  
  91.             '805' :             (self.__tr("Fax job failed - required plug-in not found"),
  92.                                  '%502%'),
  93.  
  94.             '1000' :            (self.__tr('Idle'),
  95.                                   ''),
  96.  
  97.             '1001' :            (self.__tr('Busy'),
  98.                                  ''),
  99.  
  100.             '1002' :            (self.__tr('Print job is continuing'),
  101.                                   ''),
  102.  
  103.             '1003' :            (self.__tr('Turning off'),
  104.                                   ''),
  105.  
  106.             '1004' :            (self.__tr('Report printing'),
  107.                                   ''),
  108.  
  109.             '1005' :            (self.__tr('Canceling'),
  110.                                   ''),
  111.  
  112.             '1006' :            ('%5002%',
  113.                                 '%try_again%'),
  114.  
  115.             '1007' :            (self.__tr('Waiting for ink to dry'),
  116.                                  ''),
  117.  
  118.             '1008' :            (self.__tr('Pen change'),
  119.                                  ''),
  120.  
  121.             '1009' :            (self.__tr('The printer is out of paper'),
  122.                                  self.__tr('Please load more paper and follow the instructions on the front panel (if any) to continue printing')),
  123.  
  124.             '1010' :            (self.__tr('Banner eject needed'),
  125.                                  ''),
  126.  
  127.             '1011' :            (self.__tr('Banner mismatch'),
  128.                                  '%try_again%'),
  129.  
  130.             '1012' :            (self.__tr('Photo mismatch'),
  131.                                  '%try_again%'),
  132.  
  133.             '1013' :            (self.__tr('Duplex mismatch'),
  134.                                  '%try_again'),
  135.  
  136.             '1014' :            (self.__tr('Paper or cartridge carriage jammed'),
  137.                                  self.__tr('Please clear the jam and press continue on the printer')),
  138.  
  139.             '1015' :            ('%1014%',
  140.                                  '%1014%'),
  141.  
  142.             '1016' :            ('%1014%',
  143.                                  '%1014%'),
  144.  
  145.             '1017' :            (self.__tr('There is a problem with a print cartridge'),
  146.                                  '%press_continue%'),
  147.  
  148.             '1018' :            ('%unknown_error%',
  149.                                   '%try_again%'),
  150.  
  151.             '1019' :            (self.__tr('Powering down'),
  152.                                  ''),
  153.  
  154.             '1020' :            (self.__tr('Front panel test'),
  155.                                  ''),
  156.  
  157.             '1021' :            (self.__tr('Clean out tray missing'),
  158.                                  '%try_again%'),
  159.  
  160.             '1022' :            (self.__tr('Output bin full'),
  161.                                  '%try_again%'),
  162.  
  163.             '1023' :            (self.__tr('Media size mismatch'),
  164.                                  '%try_again%'),
  165.  
  166.             '1024' :            (self.__tr('Duplexer is jammed'),
  167.                                  '%1014%'),
  168.  
  169.             '1025' :            ('%1014%',
  170.                                  '%1014%'),
  171.  
  172.             '1026' :            (self.__tr('An ink cartridge is out of ink'),
  173.                                  '%try_again%'),
  174.  
  175.             '1027' :            (self.__tr('Internal device error'),
  176.                                  '%try_again%'),
  177.  
  178.             '1028' :            ('%1014%',
  179.                                  '%1014%'),
  180.  
  181.             '1029' :            (self.__tr('Second tray missing'),
  182.                                  '%try_again%'),
  183.  
  184.             '1030' :            (self.__tr('Duplexer missing'),
  185.                                  '%try_again%'),
  186.  
  187.             '1031' :            (self.__tr('Rear tray missing'),
  188.                                  '%try_again%'),
  189.  
  190.             '1032' :            (self.__tr('Cartridge not latched'),
  191.                                  '%try_again%'),
  192.  
  193.             '1033' :            (self.__tr('Battery very low'),
  194.                                  '%try_again%'),
  195.  
  196.             '1034' :            ('%1017%',
  197.                                  '%try_again%'),
  198.  
  199.             '1035' :            (self.__tr('Output tray closed'),
  200.                                  '%try_again%'),
  201.  
  202.             '1036' :            (self.__tr('Manual feed blocked'),
  203.                                  '%1014%'),
  204.  
  205.             '1037' :            (self.__tr('Rear feed blocked'),
  206.                                  '%1014%'),
  207.  
  208.             '1038' :            (self.__tr('Second tray out of paper'),
  209.                                  '%1009%'),
  210.  
  211.             '1039' :            (self.__tr('Input tray locked'),
  212.                                  '%try_again%'),
  213.  
  214.             '1040' :            (self.__tr('Non-HP ink'),
  215.                                  '%try_again%'),
  216.  
  217.             '1041' :            (self.__tr('Pen calibration needs resume'),
  218.                                  '%press_continue%'),
  219.  
  220.             '1042' :            (self.__tr('Media type mismatch'),
  221.                                  '%try_again%'),
  222.  
  223.             '1043' :            (self.__tr('Custom media mismatch'),
  224.                                  '%try_again%'),
  225.  
  226.             '1044' :            (self.__tr('Pen cleaning in progress'),
  227.                                  ''),
  228.  
  229.             '1045' :            (self.__tr('Pen checking in progress'),
  230.                                  ''),
  231.  
  232.             '1501' :            (self.__tr('Black cartridge is low on ink'),
  233.                                  ''),
  234.  
  235.             '1502' :            (self.__tr('Tri-color cartridge is low on ink'),
  236.                                  ''),
  237.  
  238.             '1503' :            (self.__tr('Photo cartridge is low on ink'),
  239.                                  ''),
  240.  
  241.             '1504' :            (self.__tr('Cyan cartridge is low on ink'),
  242.                                  ''),
  243.  
  244.             '1505' :            (self.__tr('Magenta cartridge is low on ink'),
  245.                                  ''),
  246.  
  247.             '1506' :            (self.__tr('Yellow cartridge is low on ink'),
  248.                                  ''),
  249.  
  250.             '1507' :            (self.__tr('Photo cyan cartridge is low on ink'),
  251.                                  ''),
  252.  
  253.             '1508' :            (self.__tr('Photo magenta cartridge is low on ink'),
  254.                                  ''),
  255.  
  256.             '1509' :            (self.__tr('Photo yellow cartridge is low on ink'),
  257.                                  ''),
  258.  
  259.             '1510' :            (self.__tr('Photo gray cartridge is low on ink'),
  260.                                  ''),
  261.  
  262.             '1511' :            (self.__tr('Photo blue cartridge is low on ink'),
  263.                                  ''),
  264.  
  265.             '1601' :            (self.__tr('Black cartridge is low on toner'),
  266.                                  ''),
  267.  
  268.             '1604' :            (self.__tr('Cyan cartridge is low on toner'),
  269.                                  ''),
  270.  
  271.             '1605' :            (self.__tr('Magenta cartridge is low on toner'),
  272.                                  ''),
  273.  
  274.             '1606' :            (self.__tr('Yellow cartridge is low on toner'),
  275.                                  ''),
  276.  
  277.             '1800' :            (self.__tr('Warming up'),
  278.                                  ''),
  279.  
  280.             '1801' :            (self.__tr('Low paper'),
  281.                                  ''),
  282.  
  283.             '1802' :            (self.__tr('Door open'),
  284.                                  '%try_again%'),
  285.  
  286.             '1803' :            (self.__tr('Offline'),
  287.                                  ''),
  288.  
  289.             '1804' :            (self.__tr('Low toner'),
  290.                                  ''),
  291.  
  292.             '1805' :            (self.__tr('No toner'),
  293.                                  '%try_again%'),
  294.  
  295.             '1806' :            (self.__tr('Service request'),
  296.                                  '%try_again%'),
  297.  
  298.             '1807' :            (self.__tr('Fuser error'),
  299.                                  '%try_again%'),
  300.  
  301.             '1900' :            (self.__tr('Unsupported printer model'),
  302.                                  ''),
  303.  
  304.             '2000' :            (self.__tr('Scan job started'),
  305.                                  ''),
  306.  
  307.             '2001' :            (self.__tr('Scan job completed'),
  308.                                  ''),
  309.  
  310.             '2002' :            (self.__tr('Scan job failed'),
  311.                                  '%try_again%'),
  312.  
  313.             '2003' :            (self.__tr("Scan job failed - Required plug-in not found"),
  314.                                  '%502%'),
  315.  
  316.             '3000' :            (self.__tr('Fax job started'),
  317.                                  ''),
  318.  
  319.             '3001' :            (self.__tr('Fax job complete'),
  320.                                  ''),
  321.  
  322.             '3002' :            (self.__tr('Fax job failed'),
  323.                                  '%try_again%'),
  324.  
  325.             '3003' :            (self.__tr('Fax job canceled'),
  326.                                  ''),
  327.  
  328.             '3004' :            (self.__tr('Fax send job continuing'),
  329.                                  ''),
  330.  
  331.             '3005' :            (self.__tr('Fax receive job continuing'),
  332.                                  ''),
  333.  
  334.             '4000' :            (self.__tr('Copy job started'),
  335.                                  ''),
  336.  
  337.             '4001' :            (self.__tr('Copy job complete'),
  338.                                  ''),
  339.  
  340.             '4002' :            (self.__tr('Copy job failed'),
  341.                                  '%try_again%'),
  342.  
  343.             '4003' :            (self.__tr('Copy job canceled'),
  344.                                  ''),
  345.  
  346.             '5002' :            (self.__tr('Device is busy, powered down, or unplugged'),
  347.                                  '%5012%'),
  348.  
  349.             '5004' :            (self.__tr('Invalid device URI'),
  350.                                  '%5012%'),
  351.  
  352.             '5012' :            (self.__tr('Device communication error'),
  353.                                  '%try_again%'),
  354.  
  355.             '5021' :            (self.__tr('Device is busy'),
  356.                                  ''),
  357.  
  358.             '5026' :            (self.__tr("Device status not available"),
  359.                                  ''),
  360.  
  361.             '5031' :            ('%5021%',
  362.                                  ''),
  363.  
  364.             '5034' :            (self.__tr('Device does not support requested operation'),
  365.                                  '%try_again%'),
  366.  
  367.             '6000' :            (self.__tr('Photocard unload started'),
  368.                                  ''),
  369.  
  370.             '6001' :            (self.__tr('Photocard unload ended'),
  371.                                  ''),
  372.  
  373.             '6002' :            (self.__tr('Photocard unload failed'),
  374.                                  self.__tr('Make sure photocard is inserted properly and try again')),
  375.  
  376.             '6003' :            (self.__tr('Unable to mount photocard on device'),
  377.                                  '%6002%'),
  378.  
  379.             '6004' :            (self.__tr('Photocard unloaded successfully'),
  380.                                  ''),
  381.  
  382.             'unknown_error' :   (self.__tr('Unknown error'),
  383.                                  ''),
  384.  
  385.             'print' :           (self.__tr('Print'),
  386.                                  ''),
  387.  
  388.             'scan' :            (self.__tr('Scan'),
  389.                                  ''),
  390.  
  391.             'send_fax' :        (self.__tr('Send fax'),
  392.                                  ''),
  393.  
  394.             'make_copies' :     (self.__tr('Make copies'),
  395.                                  ''),
  396.  
  397.             'access_photo_cards' :    (self.__tr('Access photo cards'),
  398.                                        ''),
  399.  
  400.             'agent_invalid_invalid' : (self.__tr('Invalid/missing'),
  401.                                        ''),
  402.  
  403.             'agent_invalid_supply' :  (self.__tr('Invalid/missing ink cartridge'),
  404.                                        ''),
  405.  
  406.             'agent_invalid_cartridge':(self.__tr('Invalid/missing cartridge'),
  407.                                        ''),
  408.  
  409.             'agent_invalid_head' :    (self.__tr('Invalid/missing print head'),
  410.                                        ''),
  411.  
  412.             'agent_unknown_unknown' : ('%unknown%',
  413.                                        ''),
  414.  
  415.             'agent_unspecified_battery' : ('Battery',
  416.                                            ''),
  417.  
  418.             'agent_black_head' :      (self.__tr('Black print head'),
  419.                                        ''),
  420.  
  421.             'agent_black_supply' :    (self.__tr('Black ink cartridge'),
  422.                                        ''),
  423.  
  424.             'agent_black_cartridge' : (self.__tr('Black cartridge'),
  425.                                        ''),
  426.  
  427.             'agent_cmy_head' :        (self.__tr('Tri-color print head'),
  428.                                        ''),
  429.  
  430.             'agent_cmy_supply' :      (self.__tr('Tri-color ink cartridge'),
  431.                                        ''),
  432.  
  433.             'agent_cmy_cartridge' :   (self.__tr('Tri-color cartridge'),
  434.                                        ''),
  435.  
  436.             'agent_kcm_head' :        (self.__tr('Photo print head'),
  437.                                        ''),
  438.  
  439.             'agent_kcm_supply' :      (self.__tr('Photo ink cartridge'),
  440.                                        ''),
  441.  
  442.             'agent_kcm_cartridge' :   (self.__tr('Photo cartridge'),
  443.                                        ''),
  444.  
  445.             'agent_cyan_head' :       (self.__tr('Cyan print head'),
  446.                                        ''),
  447.  
  448.             'agent_cyan_supply' :     (self.__tr('Cyan ink cartridge'),
  449.                                        ''),
  450.  
  451.             'agent_cyan_cartridge' :  (self.__tr('Cyan cartridge'),
  452.                                        ''),
  453.  
  454.             'agent_magenta_head' :    (self.__tr('Magenta print head'),
  455.                                        ''),
  456.  
  457.             'agent_magenta_supply' :  (self.__tr('Magenta ink cartridge'),
  458.                                        ''),
  459.  
  460.             'agent_magenta_cartridge':(self.__tr('Magenta cartridge'),
  461.                                        ''),
  462.  
  463.             'agent_yellow_head' :     (self.__tr('Yellow print head'),
  464.                                        ''),
  465.  
  466.             'agent_yellow_supply' :   (self.__tr('Yellow ink cartridge'),
  467.                                        ''),
  468.  
  469.             'agent_yellow_cartridge': (self.__tr('Yellow cartridge'),
  470.                                        ''),
  471.  
  472.             'agent_photo_cyan_head' :       (self.__tr('Photo cyan print head'),
  473.                                              ''),
  474.  
  475.             'agent_photo_cyan_supply' :     (self.__tr('Photo cyan ink cartridge'),
  476.                                              ''),
  477.  
  478.             'agent_photo_cyan_cartridge' :  (self.__tr('Photo cyan cartridge'),
  479.                                              ''),
  480.  
  481.             'agent_photo_magenta_head' :    (self.__tr('Photo magenta print head'),
  482.                                              ''),
  483.  
  484.             'agent_photo_magenta_supply' :  (self.__tr('Photo magenta ink cartridge'),
  485.                                              ''),
  486.  
  487.             'agent_photo_magenta_cartridge':(self.__tr('Photo magenta cartridge'),
  488.                                              ''),
  489.  
  490.             'agent_photo_yellow_head' :     (self.__tr('Photo yellow print head'),
  491.                                              ''),
  492.  
  493.             'agent_photo_yellow_supply' :   (self.__tr('Photo yellow ink cartridge'),
  494.                                              ''),
  495.  
  496.             'agent_photo_yellow_cartridge': (self.__tr('Photo yellow cartridge'),
  497.                                              ''),
  498.  
  499.             'agent_photo_gray_head' :       (self.__tr('Photo gray print head'),
  500.                                              ''),
  501.  
  502.             'agent_photo_gray_supply' :     (self.__tr('Photo gray ink cartridge'),
  503.                                              ''),
  504.  
  505.             'agent_photo_gray_cartridge' :  (self.__tr('Photo gray cartridge'),
  506.                                              ''),
  507.  
  508.             'agent_photo_blue_head' :       (self.__tr('Photo blue print head'),
  509.                                              ''),
  510.  
  511.             'agent_photo_blue_supply' :     (self.__tr('Photo blue ink cartridge'),
  512.                                              ''),
  513.  
  514.             'agent_photo_blue_cartridge' :  (self.__tr('Photo blue cartridge'),
  515.                                              ''),
  516.  
  517.             'agent_kcmy_cm_head' :          (self.__tr('Print head'),
  518.                                              ''),
  519.  
  520.             'agent_photo_cyan_and_photo_magenta_head' : (self.__tr('Photo magenta and photo cyan print head'),
  521.                                                          ''),
  522.  
  523.             'agent_yellow_and_magenta_head' :           (self.__tr('Magenta and yellow print head'),
  524.                                                          '' ),
  525.  
  526.             'agent_cyan_and_black_head' :               (self.__tr('Black and cyan print head'),
  527.                                                          '' ),
  528.  
  529.             'agent_light_gray_and_photo_black_head' :    (self.__tr('Light gray and photo black print head'),
  530.                                                           '' ),
  531.  
  532.             'agent_light_gray_supply' :                 (self.__tr('Light gray ink cartridge'), # LG
  533.                                                          '' ),
  534.  
  535.             'agent_medium_gray_supply' :                (self.__tr('Medium gray ink cartridge'),
  536.                                                          '' ),
  537.  
  538.             'agent_photo_gray_supply' :                 (self.__tr('Photo black ink cartridge'), # PK
  539.                                                          '' ),
  540.  
  541.             'agent_cyan_and_magenta_head' :             (self.__tr('Cyan and magenta print head'),
  542.                                                           ''),
  543.  
  544.             'agent_black_and_yellow_head' :             (self.__tr('Black and yellow print head'),
  545.                                                           ''),
  546.  
  547.             'agent_black_toner' :           (self.__tr('Black toner cartridge'),
  548.                                              ''),
  549.  
  550.             'agent_cyan_toner' :            (self.__tr('Cyan toner cartridge'),
  551.                                              ''),
  552.  
  553.             'agent_magenta_toner' :         (self.__tr('Magenta toner cartridge'),
  554.                                              ''),
  555.  
  556.             'agent_yellow_toner' :          (self.__tr('Yellow toner cartridge'),
  557.                                              ''),
  558.  
  559.             'agent_unspecified_maint_kit' : (self.__tr('Maintenance kit (fuser)'),
  560.                                              ''),
  561.  
  562.             'agent_unspecified_adf_kit'   : (self.__tr('Document feeder (ADF) kit'),
  563.                                              ''),
  564.  
  565.             'agent_unspecified_drum_kit'   : (self.__tr('Drum maintenance kit'),
  566.                                               ''),
  567.  
  568.             'agent_unspecified_transfer_kit'   : (self.__tr('Image transfer kit'),
  569.                                                   ''),
  570.  
  571.             'agent_health_unknown'     : ('Unknown',
  572.                                           ''),
  573.  
  574.             'agent_health_ok'          : (self.__tr('Good/OK'),
  575.                                            ''),
  576.  
  577.             'agent_health_fair_moderate' : (self.__tr('Fair/Moderate'),
  578.                                             ''),
  579.  
  580.             'agent_health_misinstalled': (self.__tr('Not installed'),
  581.                                           ''),
  582.  
  583.             'agent_health_incorrect'   : (self.__tr('Incorrect'),
  584.                                           ''),
  585.  
  586.             'agent_health_failed'      : (self.__tr('Failed'),
  587.                                           ''),
  588.  
  589.             'agent_health_overtemp'      : (self.__tr('Overheated'),
  590.                                             ''),
  591.  
  592.             'agent_health_discharging'      : (self.__tr('Discharging'),
  593.                                                ''),
  594.  
  595.             'agent_health_charging'      : (self.__tr('Charging'),
  596.                                             ''),
  597.  
  598.             'agent_level_unknown'      : ('%unknown%',
  599.                                           ''),
  600.  
  601.             'agent_level_low'          : (self.__tr('Low'),
  602.                                           ''),
  603.  
  604.             'agent_level_out'          : (self.__tr('Very low'),
  605.                                           ''),
  606.  
  607.         }
  608.  
  609.     def __tr(self,s,c = None):
  610.         return s
  611.  
  612.  
  613.  
  614.  
  615.