Warning, /sdk/pology/lang/gl/rules/filter.include is written in an unsupported language. File is not indexed.

0001 # Filters include for Galician language
0002 # by the KDE Galician Team (proxecto@trasno.net)
0003 # License: GPLv3
0004 
0005 # GLOBAL FILTERS ##############################################################
0006 #
0007 # These filters are applied to all messages.
0008 
0009 # Normalize ellipsis.
0010 addFilterRegex match="\.\.\." repl="…" on="pmsgid,pmsgstr"
0011 
0012 # MIME filter, e.g. "audio/x-mp3 audio/x-wav |Sound Files"
0013 addFilterRegex match="^\s*[a-z\d-]+/[a-z\d-]+(\s*[a-z\d-]+/[a-z\d-]+)*\s*\|\s*" repl="" on="pmsgid,pmsgstr"
0014 
0015 # Remove XML entities.
0016 addFilterRegex match=" " repl=" " on="pmsgid,pmsgstr"
0017 addFilterRegex match="\&[\w\d\.\-]+?\;" repl="" on="pmsgid,pmsgstr"
0018 
0019 # Remove literal parts of messages, according to the markupaddFilterHook name="remove/remove-marlits-msg" on="msg"
0020 # Remove entities present both in source and target text
0021 addFilterHook name="remove/remove-paired-ents" on="msg"
0022 # Remove accelerator mark
0023 addFilterHook name="remove/remove-accel-msg-greedy" on="msg"
0024 
0025 # Remove function calls like foo(x, y).
0026 # Ignore foo(s) and foo(es), which are common ways of indicating optional
0027 # plural forms (e.g. ‘address(es)’).
0028 # Also ignore:
0029 # - bugs(fixes)
0030 addFilterRegex match="\w+\((?!(e?s|fixes)\))[\w\s\.\,\-\_]*?\)" repl="€" on="pmsgid,pmsgstr"
0031 
0032 # Remove XML-like tags.
0033 addFilterRegex match="\<\s*(bcode|command|envar|filename|icode|shortcut|placeholder|style|code|tt|literal|screen|option|keycap|userinput|systemitem|prompt|function|foreignphrase|varname|programlisting|token|markup|parameter|keysym|methodname|sgmltag|arg|classname|type)\b.*?\b\1\>" repl="" on="pmsgid,pmsgstr"
0034 addFilterRegex match="\<\s*(email|link)\s*>\b.*?\b\1\>" repl="" on="pmsgid,pmsgstr"
0035 addFilterRegex match="\<\s*(br|center|item|h[1-6]|li|list|nl|p|para|td|title|ul)\s*/?\s*\>" repl=" " on="pmsgid,pmsgstr"
0036 addFilterRegex match="<!\[CDATA\[.*?\]\]>" repl="" on="pmsgid,pmsgstr"
0037 addFilterRegex match="<i\s+class\s*=\s*'\s*\w{2}\b[^']*'\s*>\s*<\s*/\s*i\s*>" repl="☺" on="pmsgid,pmsgstr"  # icons
0038 addFilterRegex match="\<.*?\>" repl="" on="pmsgid,pmsgstr"
0039 
0040 # Alternatives directives
0041 addFilterRegex match="~@(.)(.*?)\1(.*?)\1" repl="¶" on="pmsgid,pmsgstr"
0042 
0043 # Extension filter, e.g. "*.png|PNG files"
0044 addFilterRegex match="^.*\*\..*\|" repl="" on="pmsgid,pmsgstr"
0045 
0046 # Wiki stuff
0047 addFilterRegex match="\[\[[^\]]*(\||\])" repl="¥" on="pmsgid,pmsgstr"
0048 addFilterRegex match="\[http[^]\s]\]*" repl="↑" on="pmsgid,pmsgstr"
0049 addFilterRegex match="\{\{.*?(\||\}\})" repl="ı" on="pmsgid,pmsgstr"
0050 
0051 # Remove long command-line options.
0052 addFilterRegex match="\-\-\w[\w\_\-]*?\b" repl="" on="pmsgid,pmsgstr"
0053 
0054 # Remove URLs
0055 addFilterRegex match="(?i)\bhttps?://[^\s]+" repl="~" on="pmsgid,pmsgstr"
0056 addFilterRegex match="\b[a-z-]+\.[a-z-][a-z./-]+\b" repl="~" on="pmsgid,pmsgstr" casesens="yes"
0057 
0058 # Remove known path patterns
0059 addFilterRegex match="(file\:|\#\!)?\/(bin|boot|cdrom|dev|etc|home|lib(32|64)?|lost\+found|media|mnt|opt|proc|root|sbin|selinux|share|srv|sys|tmp|usr|var)\b(/[/\w._-]+)*" repl="~" on="pmsgid,pmsgstr"
0060 addFilterRegex match="\.(cache|config|cups|dbus|font\w*|java|kde|local|mozilla|openoffice\.org|pulse|qt|ssh|desktop)[/\w._-]*" repl="~" on="pmsgid,pmsgstr"
0061 addFilterRegex match="\.\/?(\w+rc|\w+config|aspell\w*|bash\w*|calendar|directory|fonts\w*?|ICEauthority|lock|mailcap|kderc|profile|Xauthority|Xclients|Xmodmap|Xsession|Xdefaults|Xresources)" repl="~" on="pmsgid,pmsgstr"
0062 addFilterRegex match="\.\/configure" repl="~" on="pmsgid,pmsgstr"
0063 addFilterRegex match="\~\.?\/[\w\.\-\_]+" repl="~" on="pmsgid,pmsgstr"
0064 addFilterRegex match="['\"«‘“][\w._-]+/[/\w._-]*['\"»’”]" repl="~" on="pmsgid,pmsgstr"
0065 
0066 # Remove environment variables.
0067 addFilterRegex match="\$\<?[A-Z]+\>?" repl="Þ" on="pmsgid,pmsgstr"
0068 
0069 # Remove some abreviations.
0070 addFilterRegex match="\bn\.t\.expr\." repl="~" on="pmsgid,pmsgstr"
0071 addFilterRegex match="\b(apt\.|cent\.|dept\.)" repl="~" on="pmsgid,pmsgstr"
0072 
0073 # Remove special puntuactions.
0074 addFilterRegex match="(\?{2,3}|\%{2,3}|\:{2,3}|\_{2,3})" repl="~" on="pmsgid,pmsgstr"
0075 
0076 # Remove more usual smileis.
0077 addFilterRegex match="\s(\:\)|\(\-\:|\:\)|\(\:|\=\)|\)\-\:\)|\:\-\)|\:\-\(|\;\-\)|\;\))" repl=" ~" on="pmsgid,pmsgstr"
0078 
0079 # Remove placeholders.
0080 addFilterRegex match="%{[^}]*}" repl="~" on="pmsgid,pmsgstr"
0081 
0082 
0083 # VALID GROUPS ################################################################
0084 #
0085 # These valid groups may be used to skip certain messages in certain rules.
0086 
0087 validGroup lista-de-tradutores
0088 valid msgid="\w+m\b"
0089 valid comment="trans_comment"
0090 valid ctx="(EMAIL|NAME) OF TRANSLATORS"
0091 valid msgid="CREDIT\_FOR\_TRANSLATORS"
0092 valid msgid="EMAIL OF TRANSLATORS"
0093 valid msgid="ROLES\_OF\_TRANSLATORS"
0094 valid msgid="translator-credits"
0095 valid srcref="\bnatural(file)?queryparser\b"
0096 
0097 # Mensaxes, xeralmente listas de palabras clave, nas que o obxectivo é listar
0098 # todas as formas posíbeis de referirse a un concepto, e polo tanto as regras
0099 # de normalización non teñen sentido.
0100 validGroup keywords
0101 valid ctx="^(X-KDE-)?Keywords$"
0102 valid comment="ctx:([^,]+,)*\s*keywords\s*(,|$)"
0103 valid srcref="\.rst:1$"