Translation/localisation of the GNU Octave GUI using GNU/Linux operating system

To localise/localize the GUI for GNU Octave Qt Linguist is required.

  1. Linux Mint, Software Manager, qttools5-dev-tools (includes Qt Linguist). What version of Qt is GNU Octave written in as Qt 6.2 is released?
  2. Please advise the location of the GNU Octave .ts files to translate?

Thank you

Thanks for your interest in translating the GUI to your language :slightly_smiling_face:

I do not know, if there are severe changes between qt5 and qt6 regarding the linguist. Maybe you can give it a try with qt6 and if problems occur Octave should solve them, as qt5 will not exist forever in the future.

The translation files are available in the development repository (follow the first steps in Building - Octave) and then you will find them in the libgui/languages subdirectory.

If you face any problems, please ask here again.

Thank you for your reply.

Which version is GNU Octave written with? Qt6 or Qt5?

Does qttools6-dev-tools exist? If so, do you know where they are located?

Thank you

Instructions for Linux Mint 20.2 Cinnamon (based on Ubuntu 20.04 (LTS))

  1. Octave for Debian systems - Octave
sudo apt-get install gcc g++ gfortran make libblas-dev liblapack-dev libpcre3-dev libarpack2-dev libcurl4-gnutls-dev epstool libfftw3-dev fig2dev libfltk1.3-dev libfontconfig1-dev libfreetype6-dev libgl2ps-dev libglpk-dev libreadline-dev gnuplot-x11 libgraphicsmagick++1-dev libhdf5-dev openjdk-8-jdk libsndfile1-dev llvm-dev texinfo libgl1-mesa-dev libosmesa6-dev pstoedit portaudio19-dev libqhull-dev libqrupdate-dev libsuitesparse-dev texlive-latex-extra libxft-dev zlib1g-dev autoconf automake bison flex gperf gzip icoutils librsvg2-bin libtool perl rsync tar qtbase5-dev qttools5-dev qttools5-dev-tools libqscintilla2-qt5-dev libsundials-dev
  1. Building - Octave. Each line below was done one at a time:
sudo apt install mercurial
hg clone
cd octave

All seemed fine until after ./bootstrap as an error occurred:

./bootstrap: 499: git: not found
./bootstrap: Error: 'git' not found

./bootstrap: Please install the prerequisite programs

Do you know what the prerequisite programs are?

Thank you


Qt Linguist, Open, libgui/languages, /home/…/octave/libgui/language/en_US.ts

For translating into Hungarian (magyar), are the defaults in the image correct or need to be updated, that is:

  1. Source Language POSIX
  2. Source Country/Region Any Country
  3. Target Language Hungarian (magyar)
  4. Target Country/Region Any Country

Thank you

Octave is built with Qt5. Linguist take comes with that version on Ubuntu 21.04 works for me.

I’m not sure if it is necessary to build Octave for being able to translate it.

All translation files for the GUI are in the Mercurial repository in libgui/languages.
Afaict, there is currently no .ts file for Hungarian.

@ttl: IIRC, you updated the translation files in the past ahead of a new major release. Could you please check if the process described by @ovari looks good to you?

Can you please merge the attachment with the Octave program. The attachment should the the hu (Hungarian - magyar) locale translation.

It should have the Hungarian translation at 100%. Is that possible to check?

Thank you

hu_HU.ts (152.5 KB)

@ovari: Thanks for your contribution. Do the translations apply to the stable branch or the default branch of the Octave hg repository?
Could you please open a bug report on savannah with your contribution?
Link to savannah:
GNU Octave - Bugs: Submit Item [Savannah]

I don’t speak Hungarian. So, I cannot really review. But I scrolled through the file and looked at some translations at the beginning, at some random places somewhere in the file and at the end.
Some general notes:

  • Line breaks will be displayed as given. I noticed that you translated some strings that were multiple lines in the English text into on one single long line. That might lead to odd layout in the translated application. (That might include text not fitting on screen or inside the parent window.)
  • I noticed you used literal quote characters. The original strings use escaped strings for those (like ' or "). I’m not sure if literal quotes can be used.
  • One of the strings pretty far at the end talks about “readline” which is the name of a program. I didn’t recognize that name somewhere in the translated string. Is it custom that program names also translate in Hungarian?

Thank you for your comment about readline. Perhaps the en source string should include the word program to become Select this option to prevent conflicts with the readline program shortcuts

The translation is for the development repository.

Differences In English and Hungarian is that the variables are at the beginning and end; hence, the long lines without line breaks. Sentence structure also makes words in the first and third line of the English string being in the first line in Hungarian.

Do strings word-wrap?

Thank you

The hu-HU.ts file’s first line is
<?xml version="1.0" encoding="utf-8"?>
which indicates that Octave strings are in Unicode.

The Qt 5 Linguist did the literal translation of &apos;. Does that mean there is a bug in Qt 5 Linguist?

Updated translation to include readline in the translated string and uploaded to GNU Octave - Bugs: bug #61335, hu (Hungarian - magyar) locale [Savannah]

Thank you

Afaict, not all strings line-wrap. I can’t tell what makes the difference. But I guess for strings that have line feeds in the English version, it’s probably a good idea to translate them with strings that have approximately the same line length.

Never mind. The font that I used in the editor made the quote characters in the file look very similar to “simple” ASCII quote characters. Looking at them again, you are using “slanted quotes” (or whatever they are called). So that will probably be fine.

  1. Should the quotation marks in the English source file be updated from "…" to “…”?

  2. Should 3-character ellipses ... be updated to 1-character ellipses ?

What do you think?

Thank you

IIUC, the English string literals appear directly in the source code. Afaict, the sources use primarily (exclusively?) ASCII characters. I don’t know if introducing non-ASCII characters in string literals in the sources is save on all platforms with all compilers/pre-processors we’d like to support…

IIRC, we already have UTF-8 encoded non-ASCII characters in some comments. But using them in string literals might open a whole new box of issues.

For the french translation I never refrained from using accented characters, which don’t belong to the base ASCII characters set, and it works perfectly (at least on linux). I also see that the Japanese translation file contains non ASCII characters so I guess it is safe to use them.

Non-ASCII characters in the translation files are ok.
I am not sure about non-ASCII characters in string literals in C++ files.

IIUC, @ovari proposed to change the strings in the English sources.

1 Like