[Top][All Lists]

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

[Octave-bug-tracker] [bug #64982] Translation file (*.ts) for Octave 9.1

From: Rik
Subject: [Octave-bug-tracker] [bug #64982] Translation file (*.ts) for Octave 9.1 Release
Date: Thu, 7 Dec 2023 15:10:55 -0500 (EST)

Follow-up Comment #15, bug#64982 (group octave):

Okay, the issue is that nearly all of the Octave code now resides in the
"octave::" namespace.  To do that the code uses macros


However, the Qt utility 'lupdate' just reads the bare C++ files without
pre-processing.  Hence, it doesn't see that a namespace has been created.

So, the macros need no be expanded.  One way would be to call 'cpp' from the
bash script 'update_ts_files' and generate an intermediate file and then call
'lupdate' on that intermediate file.  The filename in the comment in the .ts
file would be wrong, but we could use a naming convention so it was obvious
which original file was the source.

Another way would be to fold this in to the Makefile build system.  We have
clearly run into this issue before with Qt because jwe wrote a changeset to
pre-process Qt moc files.

changeset:   31642:670f3f17c280
branch:      stable
parent:      31635:7d3467f8d713
user:        John W. Eaton <jwe@octave.org>
date:        Tue Dec 06 14:19:16 2022 -0500
summary:     use sed to preprocess OCTAVE_(BEGIN|END)_NAMESPACE macros for Qt

This involved defining a new rule to use 'sed' (because it is easier than cpp
for just two substitutions).

define moc-h-command
$(SED) -e 's/OCTAVE_BEGIN_NAMESPACE *(\([^)]*\))/namespace \1 {/' \
         -e 's/OCTAVE_END_NAMESPACE *([^)]*)/}/' $< > $@

moc-%.h: %.h

I'm adding jwe to the CC list.  Maybe he has some thoughts here.


Reply to this item at:


Message sent via Savannah

reply via email to

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