[Top][All Lists]

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

Re: manual translation

From: Paul Kienzle
Subject: Re: manual translation
Date: Mon, 4 Jul 2005 14:13:56 -0400

On Jul 4, 2005, at 12:44 PM, David Bateman wrote:
Here is a patch for a simple solution I worked on and suggested two years ago that didn't get applied. The idea was that all of the helpstrings were stored together with a special flag to seperate them, and the one to use selected by the octave_language variable, if no translation was available default to english... This would have worked except that the size of the oct-files would get significantly larger as more translations were added. It also didn't address the warning/error messages etc...

The patch I believe is against 2.1.50... Note this was just a proof of concept, and had a few missing features. See


for the original message.

The following is more like what I had in mind. Help files are named fn.pt somewhere on the LOADPATH. Note that it does not currently check if the builtin help has changed since translation since octave does not currently return the raw help text if asked. It should be enough to get started translating while John decides what the best approach is.

- Paul

## Portuguese help function
function ayuda(varargin)

  for s = varargin
    filename = file_in_loadpath([s{1},'.pt']);
    if isempty(filename), help(s{1});
isinfo = ['grep \'^-[*]- texinfo -[*]- *$\' ', filename, ' >/dev/null'];
      makeinfo = [MAKEINFO_PROGRAM, ...
' --fill-column 80 --no-warn --no-validate --no-headers --force --ifinfo'];
      system(['(', isinfo, ...
                ' && (tail +3 ', filename, ' | ', makeinfo, ')', ...
                ' || (tail +2 ', filename, ')', ...
              ') | ', PAGER]);


<md5hash for docstring cat>
this is portuguese help for cat

<md5hash for docstring dog>
-*- texinfo -*-
@deftypefn {Function File} {} dog (@var{x})
this is portuguese help for @var{dog}
@end deftypefn

reply via email to

[Prev in Thread] Current Thread [Next in Thread]