On Wednesday 03 April 2002 12:14 pm, Lars Gullik Bjønnes wrote: > Angus Leeming <[EMAIL PROTECTED]> writes: > | In the fdesign generated dialog files we have code like this in the build > | routine. > | > | { > | char const * const dummy = N_("Some string|#S"); > | fdui->browser_bib = obj = fl_add_browser(..., idex(_(dummy))); > | fl_set_button_shortcut(obj, scex(_(dummy)), 1); > | } > | > | Is there any need to use N_() in this instance? Wouldn't this work just > | as well: > | { > | char const * const dummy = _("Some string|#S"); > | fdui->browser_bib = obj = fl_add_browser(..., idex(dummy)); > | fl_set_button_shortcut(obj, scex(dummy), 1); > | } > > yes it probably would.
Well I'm happy to sit on this, but this patch is tested and works. Your call. If you do apply it, don't forget "make updatesrc" in the xforms/forms dir. Angus
? src/frontends/xforms/forms/form_paragraph_new.fd.gz ? src/frontends/xforms/forms/form_preferences_new.fd.gz Index: src/frontends/xforms/ChangeLog =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/xforms/ChangeLog,v retrieving revision 1.341 diff -u -p -r1.341 ChangeLog --- src/frontends/xforms/ChangeLog 3 Apr 2002 07:04:28 -0000 1.341 +++ src/frontends/xforms/ChangeLog 3 Apr 2002 11:37:37 -0000 @@ -1,3 +1,8 @@ +2002-04-03 Angus Leeming <[EMAIL PROTECTED]> + + * forms/fdfixc.sed: Don't use N_() and _() together when a single + call to _() is all that is needed. + 2002-04-03 Lars Gullik Bjønnes <[EMAIL PROTECTED]> * FormCharacter.C (findPos): add a missing typename Index: src/frontends/xforms/forms/fdfixc.sed =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/xforms/forms/fdfixc.sed,v retrieving revision 1.6 diff -u -p -r1.6 fdfixc.sed --- src/frontends/xforms/forms/fdfixc.sed 16 Mar 2001 12:08:12 -0000 1.6 +++ src/frontends/xforms/forms/fdfixc.sed 3 Apr 2002 11:37:37 -0000 @@ -59,39 +59,24 @@ s/#include \"forms\.h\"/#include FORMS_H # fdui->counter_zoom = obj; # { # // xgettext:no-c-format -# char const * const dummy = N_("Zoom %|#Z"); -# fdui->counter_zoom = obj = fl_add_counter(FL_NORMAL_COUNTER,1,2,3,4,idex(_(dummy))); -# fl_set_button_shortcut(obj,scex(_(dummy)),1); +# char const * const dummy = _("Zoom %|#Z"); +# fdui->counter_zoom = obj = fl_add_counter(FL_NORMAL_COUNTER,1,2,3,4,idex(dummy)); +# fl_set_button_shortcut(obj,scex(dummy),1); # } /fl_add/{ /".*[|].*"/{ s/fdui\(.*\)"\(.*\)".*/{\ - char const * const dummy = N_("\2");\ - fdui\1idex(_(dummy)));\ - fl_set_button_shortcut(obj,scex(_(dummy)),1);\ + char const * const dummy = _("\2");\ + fdui\1idex(dummy));\ + fl_set_button_shortcut(obj,scex(dummy),1);\ }/ - /N_(".*[%].*");/ s/\(.*\)\(char const [*]\)/\1\/\/ xgettext:no-c-format\ + /_(".*[%].*");/ s/\(.*\)\(char const [*]\)/\1\/\/ xgettext:no-c-format\ \2/ } } - -# /fl_add/{ -# /".*[|].*"/{ -# -# s/ = fl_add\(.*\)"\(.*\)".*/;\ -# {\ -# char const * dummy = N_("\2");\ -# obj = fl_add\1idex(_(dummy)));\ -# fl_set_button_shortcut(obj,scex(_(dummy)),1);\ -# }/ -# -# /N_(".*[%].*");/ s/\(.*\)\(char const [*]\)/\1\/\/ xgettext:no-c-format\ -# \2/ -# } -# } # We use new/delete not malloc/free so change to suit. s/\(\(FD_[^ ]*\) \*fdui =\).*sizeof(\*fdui))/\1 new \2/