1#
2# Copyright 2007 Zuza Software Foundation
3#
4# This file is part of translate.
5#
6# translate is free software; you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by
8# the Free Software Foundation; either version 2 of the License, or
9# (at your option) any later version.
10#
11# translate is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14# GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License
17# along with this program; if not, see <http://www.gnu.org/licenses/>.
18
19"""This module represents the Amharic language.
20
21.. seealso:: http://en.wikipedia.org/wiki/Amharic_language
22"""
23
24
25import re
26
27from translate.lang import common
28
29
30class am(common.Common):
31    """This class represents Amharic."""
32
33    listseperator = "፣ "
34
35    sentenceend = "።!?…"
36
37    sentencere = re.compile(
38        r"""(?s)    #make . also match newlines
39                            .*?         #anything, but match non-greedy
40                            [%s]        #the puntuation for sentence ending
41                            \s*         #optional spacing after the puntuation
42                            """
43        % sentenceend,
44        re.VERBOSE,
45    )
46
47    puncdict = {
48        ".": "።",
49        ";": "፤",
50        ",": "፣",
51    }
52
53    ignoretests = {
54        "all": ["simplecaps", "startcaps"],
55    }
56