[bug #17269] localized headers in .mc/history



Follow-up Comment #3, bug #17269 (project mc):

I looked at that problem and the solution is pretty easy. Still I'd like to
discuss the issue with anyone interested so we can find the best way to solve
the problem.

Most of the problematic entries are created by an invocation of the function
nice_cd() located in src/cmd.c . Its first argument is a string to be used as
the heading of the dialog. The same string is also used to form the name of
the section in the history file where entries fed to the input field of the
dialog will be stored. A typical call to nice_cd() looks like this:

  nice_cd (_("Title string"), ...)

So as you can see nice_cd() is passed a translated string - this is why a
translated section name is written to the history file. However this is
unnecessary since later the title string is translated one more time when
quick_dialog() is invoked to show the dialog. So, one way to solve the
problem is to change nice_cd() invocations like this:

  nice_cd (N_("Title string"), ...)

However, this may not be the best solution since the programmer must know
that it should call nice_cd () with N_() instead of _(). So, maybe a better
way to solve the problem would be to add
a new argument to nice_cd() which will hold the history section name.

Any thoughts ?


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?17269>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]