[Freeipa-devel] resend: internationalization of kid templates
Masato Taruishi
taruishi at redhat.com
Thu Jan 31 01:47:17 UTC 2008
Ah, I'm very sorry about my late reply.
I missed your reply.
> Masato Taruishi wrote:
> > Hi,
> >
> > I wrote a patch to internationalize kid templates. In addition
> > to the general internationalization, the patch also includes
> > the japanese po file. Please see the attached screenshots.
> > Of cource, this patch supports the content negotiation feature
> > so you can see the English page, too.
> >
> > I haven't internationalize javascript and python messages yet
> > because it requires utf-8 safe. I guess it's a next work for
> > i18n related tasks.
> >
> > I hope this would help internationalization support of freeipa.
> >
> > Thanks
> > Best regards
>
>
> Hi. I'm reviewing your patch now and it looks ok, I just have a couple
> of question.
>
> What do we need to do on an ongoing basis to be sure that the messages
> stay up-to-date? Will we need to run something every time we make a
> change to a kid file?
You can collect the template pot file by running the following command:
~/ipa-server/ipa-gui$ tg-admin i18n collect
which creates locales/messages.pot. However, unfotunately, the above
command doesn't work correctly for .kid files unless you apply the
following patch:
--- /usr/lib/python2.5/site-packages/turbogears/command/i18n.py
2007-07-22 05:08:37.000000000 +0900
+++ i18n.py 2008-01-31 01:02:13.000000000 +0900
@@ -251,7 +251,12 @@
if self.options.loose_kid_support or el.get('lang',
None):
tag = re.sub('({[^}]+})?(\w+)', '\\2', el.tag)
ents = []
- if el.text: ents = [el.text.strip()]
+ if el.text and not ( el.text.strip() in keys):
+ if el.tag == "script":
+ ents = [el.text.strip()]
+ else:
+ messages.append((tag, fname,
el.text.strip()))
+ keys.append(el.text.strip())
if el.attrib: ents.extend(el.attrib.values())
for k in ents:
key = None
> The .po files have a header. Currently the translator field is empty. Is
> it common for this to be the default, FULL NAME <EMAIL at ADDRESS>?
Ah, I forgot to change that to my name. Can you change it
to my name?
> It pulled in some pure code in some cases. It looks like:
>
> +#: ipagui/templates/ipapolicyshow.kid:td
> +msgid "${ipapolicy.get(\"ipasearchtimelimit\")}"
> +msgstr ""
>
> Should we leave these in there or remove them?
Or use py:content for the code in the td tag.
Thanks
> thanks
>
> rob
More information about the Freeipa-devel
mailing list