Ticket #144 (closed defect: fixed)
rrdtool command line is not localized
| Reported by: | human | Owned by: | oetiker |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | misc | Version: | 1.2.19 |
| Keywords: | Cc: | takao.fujiwara@… |
Description
rrdtool command line is not localized because there are no gettext.
To reproduce:
- Invoke rrdtool help.
I'm attaching the patch.
Attachments
Change History
Changed 4 years ago by human
-
attachment
rrdtool-6662646-g11n-i18n-ui.diff
added
comment:2 Changed 4 years ago by oetiker
- Status changed from new to assigned
Hi Takao,
This patch looks interesting. I will be glad to include it in 1.2.x AND 1.3.x if:
a) you provide patches for both 1.2.27 and 1.3beta4 (or just 1.3beta4) b) use a copyright header like in rrd_not_thread_safe.c c) make sure it works for systems without locale support
cheers tobi
Changed 4 years ago by human
-
attachment
rrdtool-6662646-g11n-i18n-ui-head.diff
added
Patch for Makefile.am, configure.ac, po/LINGUAS, po/POTFILES.in, rrdtool.spec, src/Makefile.am, src/getopt.c, src/rrd_i18n.h, src/rrd_tool.c
comment:3 Changed 4 years ago by human
Thanks for the review.
OK, I attached the patch for 1.3beta4.
It's ok with me to fix HEAD only without branches.
b) use a copyright header like in rrd_not_thread_safe.c
I'm not sure if my patch satisfies your suggestion.
comment:4 follow-up: ↓ 5 Changed 4 years ago by oetiker
Hi Takao,
I have applied your patch to head ... there are two things though
a) It seems that configure will not fail if the perl XML::Parser module is not available.
this is BAD. It must be fixed. Since rrdtool must compile without I18N as well.
b) the string "Week %V" in rrd_graph.c might also want to be translated.
cheers tobi
comment:5 in reply to: ↑ 4 Changed 4 years ago by oetiker
Replying to oetiker:
Hi Takao,
I have applied your patch to head ... there are two things though
a) It seems that configure will *now* fail if the perl XML::Parser module is not available.
this is BAD. It must be fixed. Since rrdtool must compile without I18N as well.
b) the string "Week %V" in rrd_graph.c might also want to be translated.
cheers tobi
comment:6 Changed 4 years ago by human
Thanks for the integration.
a) It seems that configure will not fail if the perl XML::Parser module is not available.
Sorry, I have no idea to avoid your situation.
The error is caused by IT_PROG_INTLTOOL in confugre.ac but my understanding is intltool.rpm has the dependencies of perl XML so the error wouldn't be happened when you install both intltool and perl XML.
The easy fix is to add "BuildRequire?: intltool" in rrdtool.spec.
Normally we separate build requirements from install requirements and I have no experience of your request.
b) the string "Week %V" in rrd_graph.c might also want to be translated.
OK, I see.
Actually I have the second patch for none UTF-8 since strftime() is the native API. I'll submit it later.
Could we close fixed this bug at the moment?
comment:7 Changed 4 years ago by oetiker
- Status changed from assigned to closed
- Resolution set to fixed
I have fixed the XML::Parser issue ... make sure you work from trunk with your next patch ... note that the audience of rrdtool is larger than redhat, there are folks building this on AIX, Solaris and even small embedded systems. By requiring things we do not actually need we make it more difficult for them ...
one should be able to build rrdtool without gettext support, and I think it works, but if configure does not even run through without all sorts of fancy dependencies installed, then this will not work ... in any event, I have fixed it ... check out the trunk ...
closeing this bug now



Patch for Makefile.am, configure.ac, po/LINGUAS, po/POTFILES.in, rrdtool.spec, src/Makefile.am, src/getopt.c, src/rrd_i18n.h, src/rrd_tool.c