This is a part of the split-up of bug 24072. #: ../rc.d/init.d/functions:270 msgid "Usage: status {program}\n" The "status" program here should not be translated, since it is a script name. So this message could be reduced to: "Usage: %s {program}" The benefit with this would be message re-use in the initscripts pot. #: ../rc.d/init.d/functions:172 msgid "Usage: killproc {program} [signal]\n" This could be reduced to "Usage: %s {program} [signal]\n"
More messages from initscripts package. All these messages have parameters that do not need/shouldn't need to be translated: #: ../rc.d/init.d/rawdevices:77 msgid "Usage: rawdevice {start|stop|status|restart}\n" #: ../rc.d/init.d/random:56 msgid "Usage: %s {start|stop|status|restart|reload}\n" #: ../rc.d/init.d/netfs:108 msgid "Usage: %s {start|stop|restart|reload|status}\n" #: ../rc.d/init.d/network:200 msgid "Usage: %s {start|stop|restart|reload|status|probe}\n" All these messages could be written and marked for translation as "Usage: %s %s" since neither the script name nor the parameters need translation.
This is not practical with the current (new) i18n setup.
I fail to see why?
It no longer uses printf, so the *only* available substitutions are environment variables.
But $0 is an environment variable, isn't it? Some of the other init scripts use that now, and using it everywhere would be better message reuse. Replace %s with $0 everywhere in my initial description and everything is still valid.
FYI: #: /usr/local/initfoo/etc/rc.d/init.d/ipchains:114 msgid "Usage: $0 {start|stop|restart|status|panic|save}\n" #: /usr/local/initfoo/etc/rc.d/init.d/mysqld:91 msgid "Usage: $0 {start|stop|status|reload|condrestart|restart}" #: ../sysconfig/network-scripts/ifdown-aliases:7 #: ../sysconfig/network-scripts/ifup-ipx:7 msgid "usage: $0 <net-device>" #: /usr/local/initfoo/etc/rc.d/init.d/canna:57 #: /usr/local/initfoo/etc/rc.d/init.d/gpm:82 msgid "Usage: $0 {start|stop|restart|condrestart|status}" #: /usr/local/initfoo/etc/rc.d/init.d/squid:139 msgid "Usage: $0 {start|stop|status|reload|restart|condrestart}" #: /usr/local/initfoo/etc/rc.d/init.d/kadmin:74 msgid "Usage: $0 {start|stop|status|condrestart|restart}" #: /usr/local/initfoo/etc/rc.d/init.d/linuxconf:29 msgid "Usage: $0 {start|stop}" #: /usr/local/initfoo/etc/rc.d/init.d/ldap:111 msgid "Usage: $0 {start|stop|restart|status|condrestart}" #: /usr/local/initfoo/etc/rc.d/init.d/kprop:63 #: /usr/local/initfoo/etc/rc.d/init.d/krb524:64 #: /usr/local/initfoo/etc/rc.d/init.d/krb5kdc:64 #: /usr/local/initfoo/etc/rc.d/init.d/ypserv:66 msgid "Usage: $0 {start|stop|status|restart|condrestart}" #: /usr/local/initfoo/etc/rc.d/init.d/rusersd:66 msgid "Usage: $0 {start|stop|status|restart}" #: ../rc.d/init.d/functions:80 /usr/local/initfoo/etc/rc.d/init.d/functions:80 msgid "$0: Usage: daemon [+/-nicelevel] {program}" Etc...
Some of it, yes. But they can't be reduced to the catchall 'Usage: %s %s' anymore. Ideally, usage for standard scripts would be implemened *in* init.d/functions, but that's a post-this-release feature.
Also, it's not valid for shell functions at all; $0 in them returns 'bash', which is not what you want. Everything appropriate in the initscripts package (netfs, network, rawdevices) will use $0 as of 5.60-1.
Ok. Thanks.