File: //usr/bin/msgfmt.pyo
mς
=5Dc @ s d Z d k Z d k Z d k Z d k Z d k Z d Z h a d d Z d Z d Z
d Z d Z e
d j o e n d S(
s Generate binary message catalog from textual translation description.
This program converts a textual Uniforum-style message catalog (.po file) into
a binary GNU catalog (.mo file). This is essentially the same function as the
GNU msgfmt program, however, it is a simpler implementation.
Usage: msgfmt.py [OPTIONS] filename.po
Options:
-o file
--output-file=file
Specify the output file to write to. If omitted, output will go to a
file named filename.mo (based off the input file name).
-h
--help
Print this message and exit.
-V
--version
Display version information and exit.
Ns 1.1t c C s6 t i t IJ| o t i | IJn t i | d S( N( t syst stderrt __doc__t msgt exitt code( R R ( ( t /usr/bin/msgfmt.pyt usage( s
c C s! | o | o | t | <n d S( s. Add a non-fuzzy translation to the dictionary.N( t fuzzyt strt MESSAGESt id( R R
R ( ( R t add0 s c C s t i } | i g } d } } xc | D][ } | i t | t | t | t t | f | | d 7} | t | d 7} q- Wd }
d d d t | }
|
t | } g } g } xB | D]: \ } } } } | | | |
g 7} | | | | g 7} qΝ W| | } t i d d d t | d d d d t | d d d }
|
t i d
| i 7}
|
| 7}
|
| 7}
|
S( s Return the generated output.R t i i i t Iiiiiiil ή* i i t iN( R t keyst sortt offsetst idst strsR t appendt lent outputt keystartt
valuestartt koffsetst voffsetst o1t l1t o2t l2t structt packt arrayt tostring( R R R R R R R R R R R R R R ( ( R t generate8 s@
5
c C sΔ d } d } | i d o
| } n | d } | d j o t i i | d d } n y t
| i } Wn/ t
j
o# } t i | IJt i d n Xd } d }
d } x| D]} | d 7} | d d j o- | | j o t | | |
d } d }
n | d d j o | i d o
d }
n | d d j o qΌ n | i d o? | | j o t | | |
n | } | d
} d } } n% | i d o | } | d
} n | i } | p qΌ n t | } | | j o | | 7} qΌ | | j o | | 7} qΌ t i d | | f Id IJt i | IJt i d qΌ W| | j o t | | |
n t }
y t
| d i |
Wn"