Warning, /sdk/pology/lang/es/rules/README is written in an unsupported language. File is not indexed.
0001 Rule files syntax 0002 ================= 0003 0004 Naming and path: 0005 - a rule file must end with a ".rules" suffix. 0006 - rule files must be located into the lang/<lang>/rules directory, where <lang> corresponds to your language code (eg. 'es' for spanish rules). 0007 0008 File structure and syntax: 0009 - All lines begining with a # are considered as comments. 0010 - Each rule file must begin with a header indicating the author(s) and license. 0011 - Each rule file must end with a footer composed of a line of comment (eg. # End of rule file). 0012 - A blank line is used to separate two rules. 0013 0014 Rule definition: 0015 - A rule is composed of three parts: 0016 o The pattern. It is used to find text matching the rule. The pattern should be a valid regular expression. 0017 o The id. An unique identificator for the rule. 0018 o The hint. It indicates the user what to do to correct the message. 0019 o Valid expression. It indicates exceptions for which the rule should not match. 0020 - Pattern and hint are mandatory. Valid expression and id are optional. 0021 0022 Pattern syntax: 0023 - [regexp] # where 'regexp' is a regular expression ; eg. [status|statut] will trigger the rule for the words 'status' and 'statut'. 0024 0025 Hint syntax: 0026 - hint="hint message" # eg. hint="remplacer `status' ou `statut' par `état'". 0027 0028 Valid expression syntax: 0029 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: 0030 - valid after="regexp" # the rule will not match if it is found after the provided pattern/word 0031 - valid before="regexp" # the rule will not match if it is found before the provided pattern/word 0032 - valid before="regexp" after="regexp" # both are needed to cancel the rule triggering 0033 - valid file="myApps.po" # always valid for this .po file 0034 - valid file="myApps.po" after="regexp" before="regexp" 0035 - valid ctx="regexp" after="regexp" before="regexp" # only in a message in this PO context 0036 - 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 ?) 0037 0038 Eg. of rule: 0039 [status|statut] 0040 valid after="[Ss]mb" 0041 hint="remplacer `status' ou `statut' par `état'"