translate.storage.placeables.general

Package translate :: Package storage :: Package placeables :: Module general |
[hide private]
[frames] | no frames]

# Module general

source code

Contains general placeable implementations. That is placeables that does not fit into any other sub-category.

Classes | [hide private]
| AltAttrPlaceable Placeable for the "alt=..." attributes inside XML tags.
| NewlinePlaceable Matches new-lines.
| NumberPlaceable Placeable for numbers.
| QtFormattingPlaceable Placeable representing a Qt string formatting variable.
| PythonFormattingPlaceable Placeable representing a Python string formatting variable.
| JavaMessageFormatPlaceable Placeable representing a Java MessageFormat formatting variable.
| FormattingPlaceable Placeable representing string formatting variables.
| UrlPlaceable Placeable handling URI.
| FilePlaceable Placeable handling file locations.
| EmailPlaceable Placeable handling emails.
| PunctuationPlaceable Placeable handling punctuation.
| XMLEntityPlaceable Placeable handling XML entities (`&xxxxx;`-style entities).
| CapsPlaceable Placeable handling long all-caps strings.
| CamelCasePlaceable Placeable handling camel case strings.
| SpacesPlaceable Placeable handling unusual spaces in strings.
| XMLTagPlaceable Placeable handling XML tags.
| OptionPlaceable Placeble handling command line options e.g.

Functions | [hide private]
regex_parse(cls, pstr) A parser method to extract placeables from a string based on a regular expression. | source code
to_general_placeables(tree, classmap=`{`<class 'translate.storage.placeables.base.Ph'>`:` `(`<class 'tran`...`) | source code

Variables | [hide private]
| parsers = ``[`<bound method type.regex_parse of <class 'translate`...``

Imports: re, G, Ph, StringElem

Function Details | [hide private]

### regex_parse(cls, pstr) | source code
A parser method to extract placeables from a string based on a regular expression. Use this function as the `@parse()` method of a placeable class.

Variables Details | [hide private]

  ### parsers Value:
      [<bound method type.regex_parse of <class 'translate.storage.placeable
      s.general.NewlinePlaceable'>>,
       <bound method type.regex_parse of <class 'translate.storage.placeable
      s.general.XMLTagPlaceable'>>,
       <bound method type.regex_parse of <class 'translate.storage.placeable
      s.general.AltAttrPlaceable'>>,
       <bound method type.regex_parse of <class 'translate.storage.placeable
      s.general.XMLEntityPlaceable'>>,
      ...