-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for locales, (en and it included)
Based on PR #18, modified to no longer require pyyaml This keeps email_reply_parser stdlib only, and allows easy addition of new locales without needing to parse config files
- Loading branch information
Showing
6 changed files
with
22 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
class Locales(object): | ||
@classmethod | ||
def get_locale(cls, locale='en'): | ||
return getattr(cls, locale) | ||
|
||
en = dict( | ||
sig='(--|__|-\w)|(^Sent from my (\w+\s*){1,3})', | ||
quote_hdr='^:etorw.*nO', | ||
multi_quote_hdr='(?!On.*On\s.+?wrote:)(On\s(.+?)wrote:)', | ||
quoted='(>+)', | ||
header='^(From|Sent|To|Subject): .+', | ||
) | ||
it = dict( | ||
sig='(--|__|-\w)|(^Inviato da (\w+\s*){1,3})', | ||
quote_hdr='^:ottircs\sah.*lI', | ||
multi_quote_hdr='(?!Il.*Il\s.+?ha\sscritto:)(Il\s(.+?)ha\sscritto:)', | ||
quoted='(>+)', | ||
header='^(Da|Data|A|Ogg): .+', | ||
) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters