Attachment 'gettext.py'
Download   1 # -*- coding: utf-8 -*-
   2 """
   3 	MoinMoin - Gettext Source Parser
   4 
   5 	Copyright (c) 2002 by Lukáš Lalinský <lalinsky at gmail dot com>
   6 	All rights reserved.
   7 """
   8 
   9 from MoinMoin.util.ParserBase import ParserBase
  10 
  11 Dependencies = []
  12 
  13 class Parser(ParserBase):
  14 
  15     parsername = "ColorizedGettext"
  16     extensions = ['.po']
  17     Dependencies = []
  18 
  19     def setupRules(self):
  20         ParserBase.setupRules(self)
  21         self.addRule("Comment","#.*$")
  22         self.addRulePair("String",'"', r'$|[^\\](\\\\)*"')
  23         self.addRule("ID","[a-zA-Z_][0-9a-zA-Z_]*") 
  24         reserved_words = ['msgstr','msgid','msgid_plural']
  25         self.addReserved(reserved_words)
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.You are not allowed to attach a file to this page.
