Ticket #144 (closed defect: fixed)

Opened 4 years ago

Last modified 2 years ago

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:

  1. Invoke rrdtool help.


I'm attaching the patch.

Attachments

rrdtool-6662646-g11n-i18n-ui.diff Download (16.6 KB) - added by human 4 years ago.
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
rrdtool-6662646-g11n-i18n-ui-head.diff Download (17.5 KB) - added by human 4 years ago.
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

Change History

Changed 4 years ago by human

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:1 Changed 4 years ago by human

  • Cc takao.fujiwara@… 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

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

comment:8 Changed 4 years ago by human

Cool, that's a right fix. I also checked intltool.m4 but I misleaded the contents with the broken rendering of terminal emulator...
Thanks for the integration.

Note: See TracTickets for help on using tickets.

NOTE: The content of this website is accessible with any browser. The graphical design though relies completely on CSS2 styles. If you see this text, this means that your browser does not support CSS2. Consider upgrading to a standard conformant browser like Mozilla Firefox or Opera but also Apple's Safari or KDE's Konqueror for example. It may also be that you are looking at a mirror page which did not copy the CSS for this page. Or if some pictu res are missing, then the mirror may not have picked up the contents of the inc directory.