I18N for web

Performing I18N completely on the server, to leverage the
existing gettext architecture.
Also, the browser does not have access to the Language header.

Added the additional po files for a set of required languages

conflict with install/static/ipa.js was resolved.

Note that the addition of the .po files in this patch is necessary.
In order to get Transifex support, we need to update the LINGUAS
file with the languages for which we want support.  If we don't
add the .po files in, they get automatically generated by the rpmbuild
process.  Our implementation of gettext has a bug in it (It might
be F13 thing) where the the Plurals line is not getting correctly
transformed, which causes a build failure.  However, since the
RPM would have the .po files  anyway, we should revision control
the ones we have, even if they are empty.

Fixed the Bug reporting url to the original value.
Corrected the Chartype encoding for UK
This commit is contained in:
Adam Young 2010-09-24 20:48:23 -04:00
parent 65b455edf9
commit c187702bfe
30 changed files with 25102 additions and 2764 deletions

View File

@ -1,8 +1,17 @@
bn_IN
de
es
fr
id
it
iw
jp
kn
ko
pl
pt
pt_BR
ru
uk
zh_CN
zh_TW

286
install/po/Makefile Normal file
View File

@ -0,0 +1,286 @@
prefix = /usr
exec_prefix = ${prefix}
datarootdir = ${prefix}/share
datadir = ${datarootdir}
localedir = ${datarootdir}/locale
INSTALL = /usr/bin/install -c
INSTALL_DATA = /usr/bin/install -c -m 644
AWK = gawk
SED = /bin/sed
MKDIR_P = /bin/mkdir -p
XGETTEXT = /usr/bin/xgettext
MSGFMT = /usr/bin/msgfmt
MSGINIT = /usr/bin/msginit
MSGMERGE = /usr/bin/msgmerge
MSGCMP = /usr/bin/msgcmp
DOMAIN = ipa
MSGMERGE_UPDATE = $(MSGMERGE) --update
COPYRIGHT_HOLDER = Red Hat
PACKAGE_NAME = $(DOMAIN)
PACKAGE_BUGREPORT = https://hosted.fedoraproject.org/projects/freeipa/newticket
XGETTEXT_OPTIONS = \
--add-comments="TRANSLATORS:" \
--copyright-holder="$(COPYRIGHT_HOLDER)" \
--package-name="$(PACKAGE_NAME)" \
--msgid-bugs-address="$(PACKAGE_BUGREPORT)"
languages = $(shell $(SED) 's/\#.*//' LINGUAS) # The sed command removes comments
po_files = $(patsubst %, %.po, $(languages))
mo_files = $(patsubst %.po, %.mo, $(po_files))
po_count=$(words $(po_files))
PYTHON_POTFILES = \
../../ipa \
../../lite-server.py \
../../ipapython/config.py \
../../ipapython/sysrestore.py \
../../ipapython/__init__.py \
../../ipapython/ipautil.py \
../../ipapython/certdb.py \
../../ipapython/ipavalidate.py \
../../ipapython/dnsclient.py \
../../ipapython/dogtag.py \
../../ipapython/nsslib.py \
../../ipapython/entity.py \
../../install/tools/ipa-replica-manage \
../../install/tools/ipa-server-certinstall \
../../install/tools/ipa-replica-install \
../../install/tools/ipa-nis-manage \
../../install/tools/ipa-upgradeconfig \
../../install/tools/ipa-replica-prepare \
../../install/tools/ipa-compat-manage \
../../install/tools/ipa-server-install \
../../install/tools/ipa-ldap-updater \
../../install/migration/migration.py \
../../ipalib/config.py \
../../ipalib/parameters.py \
../../ipalib/request.py \
../../ipalib/output.py \
../../ipalib/__init__.py \
../../ipalib/backend.py \
../../ipalib/pkcs10.py \
../../ipalib/x509.py \
../../ipalib/plugable.py \
../../ipalib/constants.py \
../../ipalib/aci.py \
../../ipalib/base.py \
../../ipalib/ipauuid.py \
../../ipalib/crud.py \
../../ipalib/cli.py \
../../ipalib/text.py \
../../ipalib/compat.py \
../../ipalib/frontend.py \
../../ipalib/rpc.py \
../../ipalib/errors.py \
../../ipalib/encoder.py \
../../ipalib/util.py \
../../ipalib/plugins/config.py \
../../ipalib/plugins/rolegroup.py \
../../ipalib/plugins/host.py \
../../ipalib/plugins/group.py \
../../ipalib/plugins/migration.py \
../../ipalib/plugins/xmlclient.py \
../../ipalib/plugins/service.py \
../../ipalib/plugins/passwd.py \
../../ipalib/plugins/__init__.py \
../../ipalib/plugins/virtual.py \
../../ipalib/plugins/hbac.py \
../../ipalib/plugins/cert.py \
../../ipalib/plugins/baseldap.py \
../../ipalib/plugins/aci.py \
../../ipalib/plugins/kerberos.py \
../../ipalib/plugins/krbtpolicy.py \
../../ipalib/plugins/dns.py \
../../ipalib/plugins/automount.py \
../../ipalib/plugins/netgroup.py \
../../ipalib/plugins/misc.py \
../../ipalib/plugins/user.py \
../../ipalib/plugins/taskgroup.py \
../../ipalib/plugins/hostgroup.py \
../../ipalib/plugins/pwpolicy.py \
../../ipalib/plugins/internal.py \
../../ipaserver/__init__.py \
../../ipaserver/servercore.py \
../../ipaserver/ipautil.py \
../../ipaserver/rpcserver.py \
../../ipaserver/conn.py \
../../ipaserver/ipaldap.py \
../../ipaserver/install/installutils.py \
../../ipaserver/install/service.py \
../../ipaserver/install/ldapupdate.py \
../../ipaserver/install/__init__.py \
../../ipaserver/install/cainstance.py \
../../ipaserver/install/ntpinstance.py \
../../ipaserver/install/bindinstance.py \
../../ipaserver/install/krbinstance.py \
../../ipaserver/install/certs.py \
../../ipaserver/install/dsinstance.py \
../../ipaserver/install/replication.py \
../../ipaserver/install/httpinstance.py \
../../ipaserver/plugins/ldap2.py \
../../ipaserver/plugins/rabase.py \
../../ipaserver/plugins/selfsign.py \
../../ipaserver/plugins/__init__.py \
../../ipaserver/plugins/join.py \
../../ipaserver/plugins/ldapapi.py \
../../ipaserver/plugins/xmlserver.py \
../../ipaserver/plugins/dogtag.py \
../../contrib/RHEL4/ipachangeconf.py \
../../ipa-client/ipaclient/ntpconf.py \
../../ipa-client/ipaclient/__init__.py \
../../ipa-client/ipaclient/ipachangeconf.py \
../../ipa-client/ipaclient/ipadiscovery.py \
../../ipa-client/ipa-install/ipa-client-install
C_POTFILES = \
../../daemons/ipa-kpasswd/ipa_kpasswd.c \
../../daemons/ipa-slapi-plugins/ipa-enrollment/ipa_enrollment.c \
../../daemons/ipa-slapi-plugins/ipa-memberof/ipa-memberof.c \
../../daemons/ipa-slapi-plugins/ipa-memberof/ipa-memberof.h \
../../daemons/ipa-slapi-plugins/ipa-memberof/ipa-memberof_config.c \
../../daemons/ipa-slapi-plugins/ipa-pwd-extop/ipa_pwd_extop.c \
../../daemons/ipa-slapi-plugins/ipa-winsync/ipa-winsync-config.c \
../../daemons/ipa-slapi-plugins/ipa-winsync/ipa-winsync.c \
../../daemons/ipa-slapi-plugins/ipa-winsync/ipa-winsync.h \
../../ipa-client/config.c \
../../ipa-client/ipa-getkeytab.c \
../../ipa-client/ipa-join.c \
../../ipa-client/ipa-rmkeytab.c
POTFILES = $(PYTHON_POTFILES) $(C_POTFILES)
.SUFFIXES:
.SUFFIXES: .po .mo
.PHONY: all create-po update-po update-pot install mostlyclean clean distclean test_lang test mo-files
all:
SUFFIXES = .po .mo
.po.mo:
@echo Creating $@; \
$(MSGFMT) -c -o t-$@ $< && mv t-$@ $@
$(po_files): $(DOMAIN).pot
@if [ ! -f $@ ]; then \
lang=`echo $@ | $(SED) -r -e 's/\.po$$//'` # Strip .po suffix ; \
echo Creating nonexistent $@, you should add this file to your SCM repository; \
$(MSGINIT) --locale $$lang --no-translator -i $(DOMAIN).pot -o $@; \
fi; \
$(MSGMERGE) $@ -o $@ $(DOMAIN).pot
create-po: $(DOMAIN).pot
@for po_file in $(po_files); do \
if [ ! -e $$po_file ]; then \
lang=`echo $$po_file | $(SED) -r -e 's/\.po$$//'` # Strip .po suffix ; \
echo Creating nonexistent $$po_file, you should add this file to your SCM repository; \
$(MSGINIT) --locale $$lang --no-translator -i $(DOMAIN).pot -o $$po_file; \
fi; \
done
update-po: update-pot
$(MAKE) all
update-pot:
@rm -f $(DOMAIN).pot.update
@$(XGETTEXT) $(XGETTEXT_OPTIONS) \
--output $(DOMAIN).pot.update \
--language="python" \
$(PYTHON_POTFILES) \
&& \
$(XGETTEXT) $(XGETTEXT_OPTIONS) \
--output $(DOMAIN).pot.update \
--join-existing \
--language="c" \
$(C_POTFILES) ; \
$(SED) '/^"POT-Creation-Date: .*"$$/d' $(DOMAIN).pot.update > $(DOMAIN).pot.update.tmp ; \
$(SED) -i -r -e 's%("Content-Type: text/plain; charset=)(.*)(\\n")%\1UTF-8\3%' $(DOMAIN).pot.update.tmp ; \
$(SED) '/^"POT-Creation-Date: .*"$$/d' $(DOMAIN).pot > $(DOMAIN).pot.tmp ; \
if ! cmp -s $(DOMAIN).pot.update.tmp $(DOMAIN).pot.tmp ; then \
echo "$(DOMAIN).pot updated" ; \
mv $(DOMAIN).pot.update $(DOMAIN).pot ; \
# Replace the charset with UTF-8 ; \
$(SED) -i -r -e 's%("Content-Type: text/plain; charset=)(.*)(\\n")%\1UTF-8\3%' $(DOMAIN).pot ; \
else \
echo "$(DOMAIN).pot unmodified" ; \
fi || :
@rm -f $(DOMAIN).pot.update $(DOMAIN).pot.update.tmp $(DOMAIN).pot.tmp
msg-stats:
@pot_count=`$(MSGFMT) --statistics $(DOMAIN).pot 2>&1 | \
$(AWK) '{match($$0, /([0-9]+) translated messages, ([0-9]+) untranslated messages/, groups); \
printf "%s\n", groups[2];}'` ; \
echo "$(DOMAIN).pot has $$pot_count messages. There are $(po_count) po translation files." ; \
for po_file in $(po_files); do \
$(MSGCMP) $$po_file $(DOMAIN).pot 2>&1 | \
$(AWK) -v po_file=$$po_file -v pot_count=$$pot_count -v pot_file=$(DOMAIN).pot \
'BEGIN {po_untranslated=0; undefined=0; \
po_name = gensub(/.po$$/, "", 1, po_file)} \
/this message is untranslated/ {po_untranslated++} \
/this message is used but not defined/ {undefined++} \
END {untranslated = po_untranslated+undefined; \
translated = pot_count - untranslated; \
ratio = sprintf("%d/%d", translated, pot_count); \
printf "%-7s %8s %5.1f%% %4d po untranslated, %4d missing, %4d untranslated\n", \
po_name ":", ratio, translated/pot_count*100.0, po_untranslated, undefined, untranslated;}'; \
done
mo-files: $(mo_files)
install: $(mo_files)
@for lang in $(languages); do \
dstdir=$(DESTDIR)$(localedir)/$$lang/LC_MESSAGES; \
$(MKDIR_P) $$dstdir; \
$(INSTALL) $$lang.mo $$dstdir/$(DOMAIN).mo; \
done
mostlyclean:
rm -rf *.mo test.po test_locale
rm -f $(DOMAIN).pot.update $(DOMAIN).pot.update.tmp $(DOMAIN).pot.tmp
clean: mostlyclean
distclean: clean
rm -f Makefile
maintainer-clean: distclean
# We test our translations by taking the original untranslated string
# (e.g. msgid) and prepend a prefix character and then append a suffix
# character. The test consists of asserting that the first character in the
# translated string is the prefix, the last character in the translated string
# is the suffix and the everything between the first and last character exactly
# matches the original msgid.
#
# We use unicode characters not in the ascii character set for the prefix and
# suffix to enhance the test. To make reading the translated string easier the
# prefix is the unicode right pointing arrow and the suffix left pointing arrow,
# thus the translated string looks like the original string enclosed in
# arrows. In ASCII art the string "foo" would render as:
# -->foo<--
#
# Unicode right pointing arrow: u'\u2192', utf-8 = '\xe2\x86\x92'
# Unicode left pointing arrow: u'\u2190', utf-8 = '\xe2\x86\x90'
#
# The sed command below performs the prefix and suffix substitution.
#
# When msginit is invoked with an English target locale it copies the msgid
# into the msgstr. This is an undocumented feature of msginit. Otherwise the
# msgstr will be set to the empty string (i.e. untranslated). We depend on
# the msgid being copied to the msgstr.
test_lang:
rm -rf test.po test_locale
$(MSGINIT) --no-translator -i $(DOMAIN).pot -l en_US -o test.po
$(SED) -i -r -e 's/^msgstr[ \t]+"(.*)"[ \t]*$$/msgstr "\xe2\x86\x92\1\xe2\x86\x90"/' test.po
$(MKDIR_P) test_locale/en_US/LC_MESSAGES
$(MSGFMT) -o test_locale/en_US/LC_MESSAGES/ipa.mo test.po
test: test_lang
./test_i18n.py
maintainer-clean:

View File

@ -37,7 +37,6 @@ PYTHON_POTFILES = \
../../lite-server.py \
../../ipapython/config.py \
../../ipapython/sysrestore.py \
../../ipapython/ipasslfile.py \
../../ipapython/__init__.py \
../../ipapython/ipautil.py \
../../ipapython/certdb.py \
@ -102,6 +101,7 @@ PYTHON_POTFILES = \
../../ipalib/plugins/taskgroup.py \
../../ipalib/plugins/hostgroup.py \
../../ipalib/plugins/pwpolicy.py \
../../ipalib/plugins/internal.py \
../../ipaserver/__init__.py \
../../ipaserver/servercore.py \
../../ipaserver/ipautil.py \

View File

@ -19,7 +19,9 @@ Q: How do I add a new language for translation?
A: Edit the LINGUAS file and add the new language. Then run "make create-po".
This will generate a new .po file for each language which doesn't have one
yet. Be sure to add the new .po file(s) to the source code repository.
yet. Be sure to add the new .po file(s) to the source code repository. For
certain languages, you may have to edit the Plurals line. See:
http://www.gnu.org/software/hello/manual/gettext/Plural-forms.html
Q: What files must be under source code control?

File diff suppressed because it is too large Load Diff

1822
install/po/de.po Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1822
install/po/fr.po Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1822
install/po/it.po Normal file

File diff suppressed because it is too large Load Diff

1823
install/po/iw.po Normal file

File diff suppressed because it is too large Load Diff

1822
install/po/jp.po Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1812
install/po/ko.po Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1822
install/po/pt.po Normal file

File diff suppressed because it is too large Load Diff

1822
install/po/pt_BR.po Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1823
install/po/zh_TW.po Normal file

File diff suppressed because it is too large Load Diff

View File

@ -40,7 +40,7 @@
<img src="ipalogo.png" />
</span>
<span id="loggedinas" class="header-loggedinas">
<a href="#">Logged in as <strong>hardcoded@FREEIP.ORG</strong></a>
<a href="#"><span id="login_header">Logged in as</span>: <strong>user@FREEIP.ORG</strong></a>
</span>
</div>

View File

@ -37,6 +37,7 @@ var ipa_ajax_options = {
var ipa_jsonrpc_id = 0;
/* IPA objects data in JSON format */
var ipa_messages = {};
var ipa_objs = {};
@ -55,7 +56,8 @@ function ipa_init(url, use_static_files, on_win, on_error)
ipa_cmd('json_metadata', [], {},
function(data, status, xhr) {
ipa_objs = data.result.result;
ipa_objs = data.result.metadata;
ipa_messages = data.result.messages;
if (on_win) on_win(data, status, xhr);
},
on_error

View File

@ -42,7 +42,13 @@ function nav_generate_tabs(nls, container, tabclass, depth)
for (var i = 0; i < nls.length; ++i) {
var n = nls[i];
nav_insert_tab_li(ul, n[0], n[1]);
var name = n[1];
if ((ipa_objs[n[0]]) && (ipa_objs[n[0]].label)){
name = ipa_objs[n[0]].label;
}
nav_insert_tab_li(ul, n[0], name);
nav_insert_tab_div(container, n[0]);
var div = ul.parent().children().last();

View File

@ -48,7 +48,7 @@ function search_create(obj_name, scl, container)
var jobj = div.children().last();
jobj.append('<input type="text" />');
jobj.children().last().attr('name', 'search-' + obj_name + '-filter')
jobj.append('<input type="submit" value="find" />');;
jobj.append('<input type="submit" value="'+ipa_messages.button.find+ '" />');
jobj.children().last().click(find_on_click);
div.append('<span class="search-buttons"></span>');

View File

@ -1,8 +1,33 @@
{
"error": null,
"id": 0,
"id": 6,
"result": {
"result": {
"messages": {
"button": {
"add": "Add",
"enroll": "Enroll",
"find": "Find",
"reset": "Reset",
"update": "Update"
},
"search":{
"quick_links":"Quick Links"
},
"details": {
"account": "Account Details",
"contact": "Contact Details",
"employee": " Employee Information",
"identity": "Identity Details",
"mailing": "Mailing Address",
"misc": "Misc. Information",
"to_top": "Back to Top"
},
"login": {
"header": "Logged In As"
}
},
"metadata": {
"aci": {
"__base64__": ""
},
@ -46,6 +71,7 @@
"doc": "Automount key name",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "Key",
"length": null,
@ -70,6 +96,7 @@
"doc": "Mount information",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "Mount information",
"length": null,
@ -94,6 +121,7 @@
"doc": "description",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "description",
"length": null,
@ -149,6 +177,7 @@
"doc": "Automount location name",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "Location",
"length": null,
@ -206,6 +235,7 @@
"doc": "Automount map name",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "Map",
"length": null,
@ -230,6 +260,7 @@
"doc": "Description",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "Description",
"length": null,
@ -267,7 +298,7 @@
"objectclass",
"aci"
],
"label": "<config.label>",
"label": "Configuration",
"methods": [
"mod",
"show"
@ -289,6 +320,7 @@
"doc": "Max username length",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "Max username length",
"maxvalue": null,
@ -310,6 +342,7 @@
"doc": "Default location of home directories",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "Home directory base",
"length": null,
@ -334,6 +367,7 @@
"doc": "Default shell for new users",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "Default shell",
"length": null,
@ -358,6 +392,7 @@
"doc": "Default group for new users",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "Default users group",
"length": null,
@ -382,6 +417,7 @@
"doc": "Default e-mail domain new users",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "Default e-mail domain",
"length": null,
@ -406,6 +442,7 @@
"doc": "Max. amount of time (sec.) for a search (-1 is unlimited)",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "Search time limit",
"maxvalue": null,
@ -427,6 +464,7 @@
"doc": "Max. number of records to search (-1 is unlimited)",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "Search size limit",
"maxvalue": null,
@ -448,6 +486,7 @@
"doc": "A comma-separated list of fields to search when searching for users",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "User search fields",
"length": null,
@ -472,6 +511,7 @@
"doc": "A comma-separated list of fields to search when searching for groups",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "Group search fields",
"length": null,
@ -501,6 +541,7 @@
"false"
],
"flags": [],
"hint": null,
"include": null,
"label": "Migration mode",
"multivalue": false,
@ -522,9 +563,10 @@
"cli_name": "subject",
"cli_short_name": null,
"default": null,
"doc": "base for certificate subjects (OU=Test,O=Example)",
"doc": "Base for certificate subjects (OU=Test,O=Example)",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "Certificate Subject base",
"length": null,
@ -585,6 +627,7 @@
"doc": "<cn>",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "<cn>",
"length": null,
@ -609,6 +652,7 @@
"doc": "<krbpwdpolicyreference>",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "<krbpwdpolicyreference>",
"length": null,
@ -633,6 +677,7 @@
"doc": "<cospriority>",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "<cospriority>",
"maxvalue": null,
@ -706,6 +751,7 @@
"doc": "Group name",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "Group name",
"length": null,
@ -730,6 +776,7 @@
"doc": "Group description",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "Description",
"length": null,
@ -754,6 +801,7 @@
"doc": "GID (use this option to set it manually)",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "GID",
"maxvalue": null,
@ -779,6 +827,7 @@
"no_create",
"no_search"
],
"hint": null,
"include": null,
"label": "Member groups",
"length": null,
@ -807,6 +856,7 @@
"no_create",
"no_search"
],
"hint": null,
"include": null,
"label": "Member users",
"length": null,
@ -906,6 +956,7 @@
"doc": "Rule name",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "Rule name",
"length": null,
@ -930,6 +981,7 @@
"doc": "Rule type (allow or deny)",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "Rule type",
"multivalue": false,
@ -953,6 +1005,7 @@
"doc": "User category the rule applies to",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "User category",
"multivalue": false,
@ -975,6 +1028,7 @@
"doc": "Host category the rule applies to",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "Host category",
"multivalue": false,
@ -997,6 +1051,7 @@
"doc": "Source host category the rule applies to",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "Source host category",
"multivalue": false,
@ -1019,6 +1074,7 @@
"doc": "Service category the rule applies to",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "Service category",
"multivalue": false,
@ -1041,6 +1097,7 @@
"doc": "Access time",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "Access time",
"length": null,
@ -1065,6 +1122,7 @@
"doc": "Description",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "Description",
"length": null,
@ -1098,6 +1156,7 @@
"no_create",
"no_search"
],
"hint": null,
"include": null,
"label": "Enabled",
"multivalue": false,
@ -1126,6 +1185,7 @@
"no_create",
"no_search"
],
"hint": null,
"include": null,
"label": "Users",
"length": null,
@ -1154,6 +1214,7 @@
"no_create",
"no_search"
],
"hint": null,
"include": null,
"label": "Hosts",
"length": null,
@ -1182,6 +1243,7 @@
"no_create",
"no_search"
],
"hint": null,
"include": null,
"label": "Host Groups",
"length": null,
@ -1210,6 +1272,7 @@
"no_create",
"no_search"
],
"hint": null,
"include": null,
"label": "Source hosts",
"length": null,
@ -1238,6 +1301,7 @@
"no_create",
"no_search"
],
"hint": null,
"include": null,
"label": "Services",
"length": null,
@ -1266,6 +1330,7 @@
"no_create",
"no_search"
],
"hint": null,
"include": null,
"label": "Service Groups",
"length": null,
@ -1323,6 +1388,7 @@
"doc": "HBAC Service",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "Service name",
"length": null,
@ -1347,6 +1413,7 @@
"doc": "Description of service",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "Description",
"length": null,
@ -1416,6 +1483,7 @@
"doc": "Service group name",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "Service group name",
"length": null,
@ -1440,6 +1508,7 @@
"doc": "HBAC service group description",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "Description",
"length": null,
@ -1468,6 +1537,7 @@
"no_create",
"no_search"
],
"hint": null,
"include": null,
"label": "Member services",
"length": null,
@ -1496,6 +1566,7 @@
"no_create",
"no_search"
],
"hint": null,
"include": null,
"label": "Member service groups",
"length": null,
@ -1524,6 +1595,7 @@
"no_create",
"no_search"
],
"hint": null,
"include": null,
"label": "Member of service groups",
"length": null,
@ -1602,6 +1674,7 @@
"doc": "Host name",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "Host name",
"length": null,
@ -1626,6 +1699,7 @@
"doc": "A description of this host",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "Description",
"length": null,
@ -1650,6 +1724,7 @@
"doc": "Host locality (e.g. \"Baltimore, MD\")",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "Locality",
"length": null,
@ -1674,6 +1749,7 @@
"doc": "Host location (e.g. \"Lab 2\")",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "Location",
"length": null,
@ -1698,6 +1774,7 @@
"doc": "Host hardware platform (e.g. \"Lenovo T61\")",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "Platform",
"length": null,
@ -1722,6 +1799,7 @@
"doc": "Host operating system and version (e.g. \"Fedora 9\")",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "Operating system",
"length": null,
@ -1746,6 +1824,7 @@
"doc": "Password used in bulk enrollment",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "User password",
"length": null,
@ -1770,6 +1849,7 @@
"doc": "Base-64 encoded server certificate",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "Certificate",
"length": null,
@ -1798,6 +1878,7 @@
"no_create",
"no_search"
],
"hint": null,
"include": null,
"label": "Principal name",
"length": null,
@ -1826,6 +1907,7 @@
"no_create",
"no_search"
],
"hint": null,
"include": null,
"label": "Member of host-groups",
"length": null,
@ -1854,6 +1936,7 @@
"no_create",
"no_search"
],
"hint": null,
"include": null,
"label": "Member of net-groups",
"length": null,
@ -1882,6 +1965,7 @@
"no_create",
"no_search"
],
"hint": null,
"include": null,
"label": "Member of role-groups",
"length": null,
@ -1951,6 +2035,7 @@
"doc": "Name of host-group",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "Host-group",
"length": null,
@ -1975,6 +2060,7 @@
"doc": "A description of this host-group",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "Description",
"length": null,
@ -2003,6 +2089,7 @@
"no_create",
"no_search"
],
"hint": null,
"include": null,
"label": "Member hosts",
"length": null,
@ -2031,6 +2118,7 @@
"no_create",
"no_search"
],
"hint": null,
"include": null,
"label": "Member host-groups",
"length": null,
@ -2059,6 +2147,7 @@
"no_create",
"no_search"
],
"hint": null,
"include": null,
"label": "Member of host-groups",
"length": null,
@ -2111,6 +2200,7 @@
"doc": "Manage ticket policy for specific user",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "User name",
"length": null,
@ -2135,6 +2225,7 @@
"doc": "Maximum ticket life (seconds)",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "Max life",
"maxvalue": null,
@ -2156,6 +2247,7 @@
"doc": "Maximum renewable age (seconds)",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "Max renew",
"maxvalue": null,
@ -2230,6 +2322,7 @@
"doc": "Netgroup name",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "Netgroup name",
"length": null,
@ -2254,6 +2347,7 @@
"doc": "Netgroup description",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "Description",
"length": null,
@ -2278,6 +2372,7 @@
"doc": "NIS domain name",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "NIS domain name",
"length": null,
@ -2305,6 +2400,7 @@
"no_update",
"no_create"
],
"hint": null,
"include": null,
"label": "IPA unique ID",
"length": null,
@ -2368,6 +2464,7 @@
"doc": "Manage password policy for specific group",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "Group",
"length": null,
@ -2392,6 +2489,7 @@
"doc": "Maximum password lifetime (in days)",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "Max lifetime (days)",
"maxvalue": null,
@ -2413,6 +2511,7 @@
"doc": "Minimum password lifetime (in hours)",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "Min lifetime (hours)",
"maxvalue": null,
@ -2434,6 +2533,7 @@
"doc": "Password history size",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "History size",
"maxvalue": null,
@ -2455,6 +2555,7 @@
"doc": "Minimum number of character classes",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "Character classes",
"maxvalue": 5,
@ -2476,6 +2577,7 @@
"doc": "Minimum length of password",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "Min length",
"maxvalue": null,
@ -2497,6 +2599,7 @@
"doc": "Priority of the policy (higher number means lower priority",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "Priority",
"maxvalue": null,
@ -2565,6 +2668,7 @@
"doc": "Role-group name",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "Role-group name",
"length": null,
@ -2589,6 +2693,7 @@
"doc": "A description of this role-group",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "Description",
"length": null,
@ -2617,6 +2722,7 @@
"no_create",
"no_search"
],
"hint": null,
"include": null,
"label": "Member groups",
"length": null,
@ -2645,6 +2751,7 @@
"no_create",
"no_search"
],
"hint": null,
"include": null,
"label": "Member users",
"length": null,
@ -2673,6 +2780,7 @@
"no_create",
"no_search"
],
"hint": null,
"include": null,
"label": "Member of task-groups",
"length": null,
@ -2743,6 +2851,7 @@
"doc": "Service principal",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "Principal",
"length": null,
@ -2809,6 +2918,7 @@
"doc": "Task-group name",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "Task-group name",
"length": null,
@ -2833,6 +2943,7 @@
"doc": "Task-group description",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "Description",
"length": null,
@ -2861,6 +2972,7 @@
"no_create",
"no_search"
],
"hint": null,
"include": null,
"label": "Member groups",
"length": null,
@ -2889,6 +3001,7 @@
"no_create",
"no_search"
],
"hint": null,
"include": null,
"label": "Member users",
"length": null,
@ -2917,6 +3030,7 @@
"no_create",
"no_search"
],
"hint": null,
"include": null,
"label": "Member role-groups",
"length": null,
@ -2989,6 +3103,7 @@
"doc": "User login",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "User login",
"length": null,
@ -3013,6 +3128,7 @@
"doc": "First name",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "First name",
"length": null,
@ -3037,6 +3153,7 @@
"doc": "Last name",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "Last name",
"length": null,
@ -3061,6 +3178,7 @@
"doc": "Home directory",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "Home directory",
"length": null,
@ -3085,6 +3203,7 @@
"doc": "GECOS field",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "GECOS field",
"length": null,
@ -3109,6 +3228,7 @@
"doc": "Login shell",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "Login shell",
"length": null,
@ -3133,6 +3253,7 @@
"doc": "Kerberos principal",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "Kerberos principal",
"length": null,
@ -3157,6 +3278,7 @@
"doc": "Email address",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "Email address",
"length": null,
@ -3183,6 +3305,7 @@
"webui"
],
"flags": [],
"hint": null,
"include": null,
"label": "Password",
"length": null,
@ -3207,6 +3330,7 @@
"doc": "User ID Number (system will assign one if not provided)",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "UID",
"maxvalue": null,
@ -3228,6 +3352,7 @@
"doc": "Street address",
"exclude": null,
"flags": [],
"hint": null,
"include": null,
"label": "Street address",
"length": null,
@ -3256,6 +3381,7 @@
"no_create",
"no_search"
],
"hint": null,
"include": null,
"label": "Groups",
"length": null,
@ -3284,6 +3410,7 @@
"no_create",
"no_search"
],
"hint": null,
"include": null,
"label": "Netgroups",
"length": null,
@ -3312,6 +3439,7 @@
"no_create",
"no_search"
],
"hint": null,
"include": null,
"label": "Rolegroups",
"length": null,
@ -3340,6 +3468,7 @@
"no_create",
"no_search"
],
"hint": null,
"include": null,
"label": "Taskgroups",
"length": null,

View File

@ -70,7 +70,7 @@ $(function() {
$.bbq.pushState(state);
}
nav_create(nav_tabs_lists, $('#navigation'), 'tabs');
$('#login_header').html(ipa_messages.login.header);
}else{
alert("Unable to find prinicpal for logged in user");
}

View File

@ -70,6 +70,8 @@ class config(LDAPObject):
'ipamigrationenabled', 'ipacertificatesubjectbase',
]
label = _('Configuration')
takes_params = (
Int('ipamaxusernamelength?',
cli_name='maxusername',

View File

@ -33,7 +33,29 @@ class json_metadata(Command):
"""
Export plugin meta-data for the webUI.
"""
INTERNAL = True
INTERNAL = False
messages={
"login": {"header" :_("Logged In As")},
"button":{
"add":_("Add"),
"find": _("Find"),
"reset":_("Reset"),
"update":_("Update"),
"enroll":_("Enroll")
},
"search":{
"quick_links":_("Quick Links")
},
"details":{
"identity":_("Identity Details"),
"account":_("Account Details"),
"contact":_("Contact Details"),
"mailing":_("Mailing Address"),
"employee":_(" Employee Information"),
"misc":_("Misc. Information"),
"to_top":_("Back to Top")}
}
takes_args = (
Str('objname?',
@ -42,7 +64,8 @@ class json_metadata(Command):
)
has_output = (
Output('result', dict, doc=_('Dict of JSON encoded IPA Objects')),
Output('metadata', dict, doc=_('Dict of JSON encoded IPA Objects')),
Output('messages', dict, doc=_('Dict of I18N messages')),
)
def execute(self, objname):
@ -52,11 +75,12 @@ class json_metadata(Command):
((objname, json_serialize(self.api.Object[objname])), )
)
)
return dict(
result=dict(
(o.name, json_serialize(o)) for o in self.api.Object()
result=dict(
(o.name, json_serialize(o)) for o in self.api.Object()
)
)
retval= dict([("metadata",result),("messages",json_serialize(self.messages))])
return retval
def output_for_cli(self, textui, result, *args, **options):
print json.dumps(result, default=json_serialize)