Skip to content
Softcatalà's Pology rules for Catalan language
Python HTML Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
isos
.travis.yml
README.rst
abbreviations.rules
acronyms.rules
check.sh
date-format-correct.po
date-format-incorrect.po
date-format.rules
filter.include
gender-neutralization.rules
iso_3166.rules
iso_4217.rules
iso_639.rules
punctuation.rules
tags.rules
terminology-sc.rules

README.rst

Introduction

This repository collects all the Pology rules developed by Softcatalà.

This repository is intended to facilitate the development of new rules.

Once the new rules are completed they will be contributed to upstream (Pology project).

Generating rules from PO files

We created a Python application to systematize the creation of rules from PO files with the intention to generate rules that help to make the translation of ISO standards consistant (languages names, currencies, etc).

The po-to-rules.py works like this:

  • Takes as input a PO file
  • Allows optionally to provide some exceptions (e.g. iso_639-exceptions.json)
  • Uses a mustache template to generate a Pology rules file (e.g. iso_639.mustache)

Example:

po-to-rules.py -i iso_639-3.59.ca.po -t iso_639.mustache -e iso_639-exceptions.json -o iso_639.rules

Continuous integration experiment

For every rule file there is a:

  • rule-file-correct.po -> when pology runs the rule against this file no errors are expected
  • rule-file-incorrect.po -> when pology runs the rule against this file all the strings are expected to return error

Contact Information

Jordi Mas: jmas@softcatala.org

You can’t perform that action at this time.