mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-11 00:31:56 -06:00
e2a3907726
We had been using shell scripts and sed to test our translations. But trying to edit pot and po files with sed is nearly impossible because the file format can vary significantly and the sed editing was failing and gettext tools were complaining about our test strategy. We had been using a Python script (test_i18n.py) to perform the actual test after using shell, sed, and gettext tools to create the files. There is a Python library (polib) which can read/write/edit pot/po/mo files (used internally by Transifex, our translation portal). The strategy now is to do everything in Python (in test_i18n.py). This is easier, more robust and allows us to do more things. * add python-polib to BuildRequires * Remove the logic for creating the test lang from Makefile.in and replace it with calls to test_i18n.py * add argument parsing, usage, configuration parameters, etc. to test_i18n.py to make it easier to use and configurable. * add function to generate a test po and mo file. It also writes the files and creates the test directory structure. * Took the existing validate code and refactored it into validation function. It used to just pick one string and test it, now it iterates over all strings and all plural forms. * Validate anonymous Python format substitutions in pot file * added support for plural forms. * Add pot po file validation for variable substitution * In install/po subdir you can now do: $ make test $ make validate-pot $ make validate-po * The options for running test_i18n.py are: $ ./test_i18n.py --help Usage: test_i18n.py --test-gettext test_i18n.py --create-test test_i18n.py --validate-pot [pot_file1, ...] test_i18n.py --validate-po po_file1 [po_file2, ...] Options: -h, --help show this help message and exit -s, --show-strings show the offending string when an error is detected --pedantic be aggressive when validating -v, --verbose be informative --traceback print the traceback when an exception occurs Operational Mode: You must select one these modes to run in -g, --test-gettext create the test translation file(s) and exercise them -c, --create-test create the test translation file(s) -P, --validate-pot validate pot file(s) -p, --validate-po validate po file(s) Run Time Parameters: These may be used to modify the run time defaults --test-lang=TEST_LANG test po file uses this as it's basename (default=test) --lang=LANG lang used for locale, MUST be a valid lang (default=xh_ZA) --domain=DOMAIN translation domain used during test (default=ipa) --locale=LOCALE locale used during test (default=test_locale) --pot-file=POT_FILE default pot file, used when validating pot file or generating test po and mo files (default=ipa.pot) https://fedorahosted.org/freeipa/ticket/2044 |
||
---|---|---|
.tx | ||
checks | ||
contrib | ||
daemons | ||
doc | ||
init | ||
install | ||
ipa-client | ||
ipalib | ||
ipapython | ||
ipaserver | ||
selinux | ||
tests | ||
util | ||
.bzrignore | ||
.gitignore | ||
API.txt | ||
autogen.sh | ||
BUILD.txt | ||
Contributors.txt | ||
COPYING | ||
freeipa.spec.in | ||
ipa | ||
ipa-compliance.cron | ||
ipa.1 | ||
lite-server.py | ||
make-doc | ||
make-lint | ||
make-test | ||
make-testcert | ||
makeapi | ||
Makefile | ||
MANIFEST.in | ||
README | ||
setup-client.py | ||
setup.py | ||
TODO | ||
VERSION | ||
version.m4.in |
IPA Server What is it? ----------- For efficiency, compliance and risk mitigation, organizations need to centrally manage and correlate vital security information including: * Identity (machine, user, virtual machines, groups, authentication credentials) * Policy (configuration settings, access control information) * Audit (events, logs, analysis thereof) Since these are not new problems. there exist many approaches and products focused on addressing them. However, these tend to have the following weaknesses: * Focus on solving identity management across the enterprise has meant less focus on policy and audit. * Vendor focus on Web identity management problems has meant less well developed solutions for central management of the Linux and Unix world's vital security info. Organizations are forced to maintain a hodgepodge of internal and proprietary solutions at high TCO. * Proprietary security products don't easily provide access to the vital security information they collect or manage. This makes it difficult to synchronize and analyze effectively. The Latest Version ------------------ Details of the latest version can be found on the IPA server project page under <http://www.freeipa.org/>. Documentation ------------- The most up-to-date documentation can be found at <http://freeipa.org/page/Documentation/>. Quick Start ----------- To get started quickly, start here: <https://fedorahosted.org/freeipa/wiki/QuickStartGuide> Licensing --------- Please see the file called COPYING. Contacts -------- * If you want to be informed about new code releases, bug fixes, security fixes, general news and information about the IPA server subscribe to the freeipa-announce mailing list at <https://www.redhat.com/mailman/listinfo/freeipa-interest/>. * If you have a bug report please submit it at: <https://bugzilla.redhat.com> * If you want to participate in actively developing IPA please subscribe to the freeipa-devel mailing list at <https://www.redhat.com/mailman/listinfo/freeipa-devel/> or join us in IRC at irc://irc.freenode.net/freeipa