summaryrefslogtreecommitdiffstats
path: root/ipalib/plugins
diff options
context:
space:
mode:
authorAdam Young <ayoung@redhat.com>2010-09-24 20:48:23 -0400
committerAdam Young <ayoung@redhat.com>2010-09-27 13:30:55 -0400
commitc187702bfe2c2dbc9614175db5cfa060936159bf (patch)
treee6e8bdf9de5bae7c58ad403d18e18ec2df3a7366 /ipalib/plugins
parent65b455edf97742a922e51a5d81001ce106ec0043 (diff)
downloadfreeipa-c187702bfe2c2dbc9614175db5cfa060936159bf.tar.gz
freeipa-c187702bfe2c2dbc9614175db5cfa060936159bf.tar.xz
freeipa-c187702bfe2c2dbc9614175db5cfa060936159bf.zip
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
Diffstat (limited to 'ipalib/plugins')
-rw-r--r--ipalib/plugins/config.py2
-rw-r--r--ipalib/plugins/internal.py36
2 files changed, 32 insertions, 6 deletions
diff --git a/ipalib/plugins/config.py b/ipalib/plugins/config.py
index 8b6095f74..dd1b7be97 100644
--- a/ipalib/plugins/config.py
+++ b/ipalib/plugins/config.py
@@ -70,6 +70,8 @@ class config(LDAPObject):
'ipamigrationenabled', 'ipacertificatesubjectbase',
]
+ label = _('Configuration')
+
takes_params = (
Int('ipamaxusernamelength?',
cli_name='maxusername',
diff --git a/ipalib/plugins/internal.py b/ipalib/plugins/internal.py
index 6f0c2cf10..a77705540 100644
--- a/ipalib/plugins/internal.py
+++ b/ipalib/plugins/internal.py
@@ -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)