1# 2# Copyright 2010 Zuza Software Foundation 3# 4# This file is part of the Translate Toolkit. 5# 6# This program 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# This program 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 Punjabi language. 20 21.. seealso:: http://en.wikipedia.org/wiki/Punjabi_language 22""" 23 24 25import re 26 27from translate.lang import common 28 29 30class pa(common.Common): 31 """This class represents Punjabi.""" 32 33 sentenceend = "।!?…" 34 35 sentencere = re.compile( 36 r"""(?s) # make . also match newlines 37 .*? # anything, but match non-greedy 38 [%s] # the puntuation for sentence ending 39 \s+ # the spacing after the puntuation 40 (?=[^a-z\d])# lookahead that next part starts with 41 # caps 42 """ 43 % sentenceend, 44 re.VERBOSE, 45 ) 46 47 puncdict = { 48 ". ": "। ", 49 ".\n": "।\n", 50 } 51 52 ignoretests = { 53 "all": ["simplecaps", "startcaps"], 54 } 55