~osomon/phatch/extract-all-metadata

« back to all changes in this revision

Viewing changes to actions/convert_mode.py

  • Committer: stani
  • Date: 2007-06-12 17:18:53 UTC
  • Revision ID: spe.stani.be@gmail.com-20070612171853-cndnqupa2o42iai4
gettext support, major rewrite

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
import models, base
2
 
from translation import _
 
2
from translation import _t
3
3
 
4
4
class Action(models.Action):
5
5
    """"""
6
6
    
7
 
    label       = 'Convert Mode'
 
7
    label       = _t('Convert Mode')
8
8
    author      = 'Stani'
9
9
    email       = 'spe.stani.be@gmail.com'
10
10
    version     = '0.1'
11
 
    tags        = ['Image']
12
 
    summary     = 'Convert the color mode of an image'
 
11
    tags        = [_t('Image')]
 
12
    summary     = _t('Convert the color mode of an image')
13
13
    
14
14
    def __init__(self):
15
15
        fields = models.Fields()
16
 
        fields['Mode']  = models.ImageModeField(
 
16
        fields[_t('Mode')]  = models.ImageModeField(
17
17
                                    _(models.ct.IMAGE_MODES[2]))
18
18
        super(Action,self).__init__(fields)
19
19
        
20
 
    def _gettext(self):
21
 
        """Strings to translate"""
22
 
        _('Mode') 
23
 
        
24
20
    def do(self,photo,setting,cache):
25
21
        #get info
26
22
        info        = photo.get_info()