[freeipa PR#2046][opened] Apply validate_doc() to NO_CLI commands
by stanislavlevin
URL: https://github.com/freeipa/freeipa/pull/2046
Author: stanislavlevin
Title: #2046: Apply validate_doc() to NO_CLI commands
Action: opened
PR body:
"""
For now validate_doc() checks NO_CLI commands only.
From validate_doc:
```
* Every command must have documentation
and it must be marked for international translation
* Every module hosting a command must have documentation
and it must be marked for international translation
* Every module topic must be marked for international translation
```
So, to prevent from NO_CLI commands have no translatable
description or have no one at all in Web UI API Browser
validation of ```__doc__``` is required.
https://pagure.io/freeipa/issue/7592
Additionally,
```
1 commands without doc, 0 commands whose doc is not i18n
1 modules without doc, 2 modules whose doc is not i18n
```
are fixed.
"""
To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/2046/head:pr2046
git checkout pr2046
5 years, 10 months
[freeipa PR#1793][opened] [WIP] ipa tests: Set default TTL for the IPA zone to 1 second
by abbra
URL: https://github.com/freeipa/freeipa/pull/1793
Author: abbra
Title: #1793: [WIP] ipa tests: Set default TTL for the IPA zone to 1 second
Action: opened
PR body:
"""
When running IPA tests, a default TTL for the zone should be set
very low to allow get rid of timeouts in the tests. Zone updates should
be propagated to the clients as soon as possible.
This is not something that should be used in production so the change is
done purely at install time within the tests. As zone information is
replicated, we only modify it when creating a master with integrated
DNS.
This change should fix a number of DNSSEC-related tests where default
TTL is longer than what a test expects and a change of DNSSEC keys
never gets noticed by the BIND. As result, DNSSEC tests never match
their expected output with what they received from the BIND.
"""
To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/1793/head:pr1793
git checkout pr1793
5 years, 10 months
[freeipa PR#1997][opened] Fix translation of python brace formatted messages
by stanislavlevin
URL: https://github.com/freeipa/freeipa/pull/1997
Author: stanislavlevin
Title: #1997: Fix translation of python brace formatted messages
Action: opened
PR body:
"""
Some of the messages cannot be translated because of a broken python brace formatting.
Simple reproducer:
Take a translatable message string from ipaserver/plugins/topology.py ```Topology management requires minimum domain level {0} ``` and put it on a test script with original formatting:
```python
#!/usr/bin/python
import gettext
ru = gettext.translation('ipa', languages=['ru'])
ru.install()
_ = ru.gettext
test_value = '1'
msgtest = _('Topology management requires minimum domain level {0} '.format(test_value))
print(msgtest)
```
Out: ```Topology management requires minimum domain level 1```
But msgid is here, should be no problem:
```msgunfmt /usr/share/locale/ru/LC_MESSAGES/ipa.mo | grep 'Topology management requires minimum domain level {0} ' -A 1
msgid "Topology management requires minimum domain level {0} "
msgstr "Управление топологией требует уровня домена не ниже {0}"
```
Cause: The 'format' method should be called after a gettext one
to follow 'python-brace-format' rule:
```python
msgtest = _('Topology management requires minimum domain level {0} ').format(desired_value)
```
with correct out:
```Управление топологией требует уровня домена не ниже 1```
List of affected:
```
ipaserver/plugins/idrange.py:56
ipaserver/plugins/idrange.py:246
ipaserver/plugins/idrange.py:383
ipaserver/plugins/idrange.py:616
ipaserver/plugins/trust.py:688
ipaserver/plugins/topology.py:88
ipaserver/plugins/topology.py:257
ipaserver/plugins/topology.py:265
ipaserver/plugins/serverroles.py:82
ipaserver/plugins/serverroles.py:167
ipaserver/plugins/domainlevel.py:68
ipaserver/plugins/domainlevel.py:153
```
This patch should fix it.
"""
To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/1997/head:pr1997
git checkout pr1997
5 years, 10 months