Warning, /sdk/pology/lang/ca/rules/README is written in an unsupported language. File is not indexed.

0001 Rule files syntax
0002 =================
0003 
0004 There is a good documentation in pology/doc-html/user/en_US/ch-lingo.html#sec-lgrules about rules syntax.
0005 
0006 Next, a little summary:
0007 
0008 Naming and path: 
0009 - a rule file must end with a ".rules" suffix.
0010 - rule files must be located into the lang/<lang>/rules directory, where <lang> corresponds to your language code (eg. 'fr' for french rules).
0011 
0012 File structure and syntax: 
0013 - All lines begining with a # are considered as comments.
0014 - Each rule file must begin with a header indicating the author(s) and license.
0015 - Each rule file must end with a footer composed of a line of comment (eg. # End of rule file).
0016 - A blank line is used to separate two rules.
0017 
0018 Rule definition: 
0019 - A rule is composed of three parts: 
0020         o The pattern. It is used to find text matching the rule. The pattern should be a valid regular expression.
0021         o The hint. It indicates the user what to do to correct the message.
0022         o Valid expression. It indicates exceptions for which the rule should not match.
0023 - Pattern and hint are mandatory. Valid expression is optional.
0024 
0025 Pattern syntax: 
0026 - [regexp] # where 'regexp' is a regular expression ; eg. [status|statut] will trigger the rule for the words 'status' and 'statut'.
0027 
0028 Hint syntax: 
0029 - hint="hint message" # eg. hint="remplacer `status' ou `statut' par `état'".
0030 
0031 Valid expression syntax: 
0032 One rule can have multiple valid expressions. Each is evaluated separately and may be made of regular expressions (represented below with the word 'regexp'). Here are some examples:
0033 - valid after="regexp" # the rule will not match if it is found after the provided pattern/word
0034 - valid before="regexp" # the rule will not match if it is found before the provided pattern/word
0035 - valid before="regexp" after="regexp" # both are needed to cancel the rule triggering
0036 - valid file="myApps.po" # always valid for this .po file
0037 - valid file="myApps.po" after="regexp" before="regexp"
0038 - valid ctx="regexp" after="regexp" before="regexp" # only in a message in this PO context
0039 - valid file="myApps.po" msgid="The msgid to consider" # only in this message in this .po file (but do we really need this kind of rules ?)
0040 
0041 Eg. of rule: 
0042 [status|statut]
0043 valid after="[Ss]mb"   
0044 hint="remplacer `status' ou `statut' par `état'"