bugGNU Octave - Bugs: bug #64982, Translation file (*.ts) for Octave...

 
 

bug #64982: Translation file (*.ts) for Octave 9.1 Release

Submitter:  Rik <rik5>
Submitted:  Tue 05 Dec 2023 05:33:57 AM UTC
   
 
Category:  GUI Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Documentation
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 9.0.90 Release: 
Operating System:  * Any Fixed Release:  None
Planned Release:  9.1.0
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Tue 26 Dec 2023 09:25:22 PM UTC, comment #47: 

I want to give a big thanks to all the translators who worked on the Octave 9.1 release.

We have finished this step in the release process so I will close this bug report now.

Rik <rik5>
Group administrator
Sun 17 Dec 2023 11:55:33 PM UTC, comment #46: 

We're doing pretty well.  It would be nice to have Italian (it_IT.ts) and at least one Portuguese translation (pt_PT.ts or pt_BR.ts) before the release.

Rik <rik5>
Group administrator
Sun 17 Dec 2023 11:52:10 PM UTC, comment #45: 

Thanks A.R. and Philip for the joint work on the Dutch translation.  I pushed updated nl_NL.ts in this changeset https://hg.savannah.gnu.org/hgweb/octave/rev/a33afa8ec752.

Rik <rik5>
Group administrator
Sun 17 Dec 2023 04:44:39 PM UTC, comment #44: 

I have pushed the German translation de_DE.ts with cset http://hg.savannah.gnu.org/hgweb/octave/rev/f0af05bcb45d

Torsten Lilge <ttl>
Group Member
Fri 15 Dec 2023 01:59:14 PM UTC, comment #43: 

Thanks Philip, I agree, good to go then I guess.

A.R. Burgers <arb>
Thu 14 Dec 2023 04:44:30 PM UTC, comment #42: 

'Next weekend' came quick (for the wrong reason, BTW).
@arb:
I only changed "matchende" into "bijbehorende" and uppercased some nearby letter. I hope you agree.

New nl_NL.ts attached.

Thanks very much arb!

(file #55452)

Philip Nienhuis <philipnienhuis>
Group Member
Thu 14 Dec 2023 10:12:13 AM UTC, comment #41: 

@arb:
Good!
thanks, I'll have a look next weekend then.

Philip Nienhuis <philipnienhuis>
Group Member
Wed 13 Dec 2023 10:26:13 PM UTC, comment #40: 

I uploaded a dutch translation. Maybe Philip can review it

(file #55450)

A.R. Burgers <arb>
Wed 13 Dec 2023 08:31:14 PM UTC, comment #39: 

@Rik comment #34:
Thanks, you've answered all my questions, and you correctly interpreted the last one :-)

Supposedly I could easily remove the offending 'type="unfinished"' tags using a regexp in notepad++. But in the course of several consecutive Octave releases I've been changing some existing translations in the hope to improve them :-)  so I comb through all of them them anyway.

Hopefully I can upload the Dutch translation next weekend.

Philip Nienhuis <philipnienhuis>
Group Member
Wed 13 Dec 2023 04:27:48 PM UTC, comment #38: 

I pushed the Hungarian translation to the stable branch in this changeset https://hg.savannah.gnu.org/hgweb/octave/rev/5383ad4d16c1.

Thank you!

Rik <rik5>
Group administrator
Wed 13 Dec 2023 08:32:30 AM UTC, comment #37: 
Anonymous
Wed 13 Dec 2023 08:21:06 AM UTC, comment #36: 

Attached magyar (Hungarian) hu_HU.ts should be 100% complete.

(file #55443)

Anonymous
Wed 13 Dec 2023 05:49:05 AM UTC, comment #35: 

@Philip: Maybe you can give the Qt-tool "linguist" a try. It makes it much easier to finish (many) translations.

Torsten Lilge <ttl>
Group Member
Tue 12 Dec 2023 09:44:42 PM UTC, comment #34: 

Item #1

When the .ts files are re-generated, it adds the "unfinished" tag to all(?) translations that don't exactly match for both file and location.  But, it also does a fuzzy match and is usually able to find an existing translation and match it to the new location.  Overall, one ends up with correct translations most of the time that now have the "unfinished" tag on them.  Most of the time this will be just fine and if you want I can simply remove the unfinished tag on existing translations using Perl.

Item #2

Yes, this is okay.  The menu entries are a toggle which hides or shows the filter.  Only one menu entry is ever present, not both, and it makes sense to use the same shortcut key to toggle the display of the filter.

Item #3

I agree, although too late to change the message for the 9.1 release.  I never use the GUI or the Editor so I missed this message when I was reviewing things.  Suggestions are welcome.  Perhaps, "Swap line with line above"?

Item #4

I'm not sure I understand.  But, I can explain that the behavior by Qt is to use whatever character follows "&amp;" as the shortcut key.  For English, "&amp;File" will make 'F' the shortcut key and in Dutch it will be 'B'.  If there are other translations that result in 'B' being a shortcut then you have a choice.  You could try to translate things slightly differently so as to avoid the collision, you could move the "&amp;" within a translation so that another key becomes the shortcut key in the Dutch translation, or you could just let Qt deal with it.  When Qt detects two identical shortcuts you can use Alt+Key multiple times to move between each of the possible menu selections and <Return> to invoke the menu.

Rik <rik5>
Group administrator
Tue 12 Dec 2023 08:59:59 PM UTC, comment #33: 

I'm slowly grinding tru the Dutch translation and I have a few questions about it (sorry if one, or some, or all of them are stupid questions):

  • I saw a lot of "unfinished" tags in the Dutch translation file (nl_NL.ts) for entries that already had a translation. Do those tags refer to modified English text entries?  AFAICS those existing English texts and Dutch translations match the ones I uploaded last year. It's quite a bit of work digging through and wiping those ' type="unfinished"' tags.


  • Near L. 1300 I see entries for 'Hide &amp;Filter' and 'Show %amp;Filter', i.e., each with the same shortcut ('f'). Is that really intended?


  • In the editor, "Edit | Commands | Transpose line' really means 'move lowest selected line upwards', isn't it? (at least, that's what I see happening). If so, IMO the English wording could be enhanced.


  • Several letter shortcuts in the English text ('&amp;') have no identical letter in the Dutch translation (e.g., '&amp;File' => '&amp;Bestand'). Do the default (hard-coded) shortcuts have to be adapted as well?


Philip Nienhuis <philipnienhuis>
Group Member
Sun 10 Dec 2023 07:32:00 PM UTC, comment #32: 

@José: Thank you.  I checked in the complete and final Spanish translation file here https://hg.savannah.gnu.org/hgweb/octave/rev/3f744873ad4d.

Rik <rik5>
Group administrator
Sun 10 Dec 2023 12:50:07 AM UTC, comment #31: 

Sorry, I forgot to check them in Qt Linguist. Attached I send the corrected Spanish file


comentario nº29:

> @José: There are two translations in es_ES.ts marked as unfinished.  They are
>


>         <source>Go home</source>
>         <translation type="unfinished">Ir al índice general</translation>
>
> AND
>
>         <source>Loading current preferences ... </source>
>         <translation type="unfinished">Cargando las preferencias actuales... </translation>


>
> The translations look fine to me with my limited Spanish.  May I take away the "unfinished" attribute?


(file #55431)

José Luis García Pallero <jgpallero>
Sun 10 Dec 2023 12:39:33 AM UTC, comment #30: 

I manually merged the fr_FR.ts file and checked it in here https://hg.savannah.gnu.org/hgweb/octave/rev/73f1b8374ae0.  Thank you @Pantxo for doing the translation work.

Rik <rik5>
Group administrator
Sat 09 Dec 2023 11:54:03 PM UTC, comment #29: 

@José: There are two translations in es_ES.ts marked as unfinished.  They are


        <source>Go home</source>
        <translation type="unfinished">Ir al índice general</translation>

AND

        <source>Loading current preferences ... </source>
        <translation type="unfinished">Cargando las preferencias actuales... </translation>


The translations look fine to me with my limited Spanish.  May I take away the "unfinished" attribute?

Rik <rik5>
Group administrator
Sat 09 Dec 2023 10:38:52 PM UTC, comment #28: 

Here is again the Spanish translation with a small correction. Use this file, please

(file #55428)

José Luis García Pallero <jgpallero>
Sat 09 Dec 2023 10:19:40 PM UTC, comment #27: 

Here is the Spanish translation

(file #55427)

José Luis García Pallero <jgpallero>
Sat 09 Dec 2023 06:08:35 PM UTC, comment #26: 

All Translators: The Octave translation files (.ts) have been re-generated in this changeset https://hg.savannah.gnu.org/hgweb/octave/rev/643eed4c804e.

We are very sorry, but we found a problem with the files that could not be simply corrected, and the resolution was to re-generate the files.  We ask that you use the new files as the basis of your work.

Unfortunately, I have not found an automated way to incorporate changes from the translation files submitted, fr_FR.ts and es_ES.ts, into the new file.  It may be easier to hand-edit the XML and copy over the specifically new translations.  To get an idea of the size of the issue I did


grep 'type="unfinished"><' fr_FR.ts | wc -l
75
grep 'type="unfinished"><' es_ES.ts | wc -l
65


This only accounts for missing translations.  If there were changes to existing translations then there will be more instances to modify.

Rik <rik5>
Group administrator
Sat 09 Dec 2023 05:54:45 PM UTC, comment #25: 

Thanks, Rik. Then, must we do the translations again with these new files?

José Luis García Pallero <jgpallero>
Sat 09 Dec 2023 05:50:50 PM UTC, comment #24: 

The long-term solution needs to developed.  In the mean time, I copied over the entire libgui/ directory, expanded all OCTAVE_BEGIN_NAMESPACE macros, and re-generated the .ts translation files.

Rik <rik5>
Group administrator
Fri 08 Dec 2023 09:48:38 PM UTC, comment #23: 

The Makefile rule for updating the .ts files doesn't have to be a dependency of any other rule.  But having it would be a way of recording exactly what needs to be done.  Also, as a Makefile rule it would have access to the exact list of source files that need translations so we could arrange for the update_ts_files script to use exactly those files and there would be no chance of accidentally picking up random files in the source directory tree.

John W. Eaton <jwe>
Group administrator
Fri 08 Dec 2023 07:31:50 PM UTC, comment #22: 

I do not see the benefit of having update_ts_files invoked during make and possibly changing the ts-files even when there . Since the script only has to be called for a new release with new translations we can just let update_ts_files copy the libgui directory, exchange the macro by a recursive sed command, let lupdate scan the copies directory and finally remove the copied directory. I could extend the script in this way.

Torsten Lilge <ttl>
Group Member
Fri 08 Dec 2023 01:00:31 PM UTC, comment #21: 

One option is to replace the OCTAVE_NAMESPACE_BEGIN/END macros with "namespace octave {" and "}" in the actual source files but I'd rather not do that if we can avoid it.

If we do keep the macros, then I guess we need to generate some intermediate files for lupdate to work on.  That shouldn't be too hard to do.

Maybe there should be a Makefile rule to invoke the update_ts_files script?  Then it could easily list the exact list of source files to work on instead of letting lupdate recursively search a directory tree for files.

John W. Eaton <jwe>
Group administrator
Fri 08 Dec 2023 12:32:31 AM UTC, comment #20: 

I notice that I didn't include libgui when I updated the code base to use macros for the namespaces in cset e88a07dec498 on Dec. 1st, 2022.  You then added the special build rules for the Qt moc files and converted libgui in cset c6d54dd31a7e on Dec. 6th, 2022.  This must was nearly a year after the .ts files were update in cset e032e75a8871 on Dec. 16th, 2021.  Hence, we didn't catch the issue until now.

Rik <rik5>
Group administrator
Fri 08 Dec 2023 12:22:30 AM UTC, comment #19: 

The .ts files are updated once before each release using the bash script in libgui/languages/build_ts/update_ts_files.

The underlying call in the script is to 'lupdate' which is a Qt utility that scans files for translation strings.  It's simple in that you just give it a few paths and it does a recursive search.  But, it's bad for us in that we potentially need to translate OCTAVE_NAMESPACE_BEGIN/END in 157 files.


grep -rl OCTAVE_BEGIN_NAMESPACE * | wc -l


Rik <rik5>
Group administrator
Fri 08 Dec 2023 12:05:21 AM UTC, comment #18: 

Sorry, i meant what commands are executed that generate the files that are missing the namespace prefix?  Is that part of the build process or something that is done manually?

John W. Eaton <jwe>
Group administrator
Thu 07 Dec 2023 11:35:54 PM UTC, comment #17: 

Steps to Reproduce:

1) run-octave --gui
2) Edit->Preferences
  a) General Tab, Change Language to "fr_FR"
3) exit Octave
4) run-octave --gui

Observe that main menu bar is still in English with first item being "File" instead of "Fichier".  Click on Edit->Preferences.  Observe that General tab of Preferences is in French.

5) Apply following patch which adds namespace to the main_window entry in the fr_FR.ts file.  Patch is attached for download as well.


diff --git a/libgui/languages/fr_FR.ts b/libgui/languages/fr_FR.ts
--- a/libgui/languages/fr_FR.ts
+++ b/libgui/languages/fr_FR.ts
@@ -2067,7 +2067,7 @@ Cliquez &quot;Suivant&quot; pour créer un fichier de configuration et lancer Octave.&lt;/p&gt;
     </message>
 </context>
 <context>
-    <name>main_window</name>
+    <name>octave::main_window</name>
     <message>
         <location filename="../src/main-window.cc" line="+155"/>
         <source>Profiler</source>


6) make all
7) run-octave --gui

Observe that menu bar is now in French as well as most menu entries.



(file #55420)

Rik <rik5>
Group administrator
Thu 07 Dec 2023 08:57:46 PM UTC, comment #16: 

Exactly what commands do I need to execute to reproduce the problem?

John W. Eaton <jwe>
Group administrator
Thu 07 Dec 2023 08:10:55 PM UTC, comment #15: 

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


OCTAVE_BEGIN_NAMESPACE(octave)
..
..
OCTAVE_END_NAMESPACE(octave)


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 moc


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 *([^)]*)/}/' $< > $@
endef

moc-%.h: %.h
        $(AM_V_GEN)$(moc-h-command)


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

Rik <rik5>
Group administrator
Thu 07 Dec 2023 07:47:10 PM UTC, comment #14: 

Well, I know the cause now.  In the .ts files that work, the component declaration is fully qualified meaning it includes the "octave::" namespace.


    <name>octave::main_window</name>


So, the question is how to get Qt and its lupdate program to insert that tag.

Good news, translations have not been wasted.

Rik <rik5>
Group administrator
Thu 07 Dec 2023 07:38:23 PM UTC, comment #13: 

I use qt5 so that is not the problem.

I tried installing to /usr/local and /usr in case it was an issue of Qt not looking in the correct directory to find the .qm file, but that also didn't help.

I tried reverting to the changeset Dmitri found to be good, changeset: 32531:435cfe35e3c6, and that does help.

It seems we are all having some trouble.  I got this e-mail from Marco Caliari doing the Italian translation


Hi Rik,

nice to hear you again. I tried to do something, but there is probably
something wrong in my work flow. I am on brach stable, changeset:
32543:019af368d790, translated some words (for instance, "Second color
mode (light/dark)"), ./run-octave, applied Italian language, restart and
I can see my translation in the Preferences window. All good so far.
Now I do the same with the Find Files window. I translated all the
occurences of Find Files with or without ... But the window is always
named Find Files. This happens with many other examples (for instance,
all the translations in that windows). What am I doing wrong?



Rik <rik5>
Group administrator
Thu 07 Dec 2023 12:24:30 PM UTC, comment #12: 

I use don't have qt6-dev installed so the problem is probably not due to the Qt version.

Pantxo Diribarne <pantxo>
Group Member
Thu 07 Dec 2023 05:52:00 AM UTC, comment #11: 

I At a first glance I have seen that the script update_ts_files still contains the parameter -qt5 in the call of lupdate. Maybe this causes the trouble unsder qt6.
Sorry, I can not have a closer look before tomorrow evening.

Torsten Lilge <ttl>
Group Member
Thu 07 Dec 2023 02:47:21 AM UTC, comment #10: 

Did bissection. Rev

changeset:   32531:435cfe35e3c6
branch:      stable
user:        John W. Eaton <jwe@octave.org>
date:        Mon Dec 04 09:52:14 2023 -0500
summary:     disable building bytecode evaluator by default (bug #64977)

good,


changeset:   32533:97e55a21cd20
branch:      stable
parent:      32531:435cfe35e3c6
user:        Rik <rik@octave.org>
date:        Mon Dec 04 20:38:36 2023 -0800
summary:     maint: Update translation files *.ts ahead of version 9.1.0 release.


bad.

(Compiled wioth Qt5, in case it matters.)

Dmitri.
--


Dmitri A. Sergatskov <dasergatskov>
Thu 07 Dec 2023 01:32:08 AM UTC, comment #9: 

The compiled .qm file seems to be generated correctly.  I used 'lconvert' to convert the created .qm file back to a .ts file and it contains the French translations as expected.

Rik <rik5>
Group administrator
Thu 07 Dec 2023 01:10:45 AM UTC, comment #8: 

I downloaded the fr_FR.ts file and I can also verify that just about everything in the GUI is still in English.  I'm not sure what is going on.  I can see from running make that the fr_FR.qm file is being created.  And I used 'make install' to install Octave locally rather using 'run-octave' script in a build directory.  I also tried reverting fr_FR.ts to cset b870a8c28aaa from November 2022, and making, and installing but the translations still don't show up.

@Torsten: Do you have any idea what is going on?

Rik <rik5>
Group administrator
Wed 06 Dec 2023 10:36:48 PM UTC, comment #7: 


comentario nº6:

> I have updated the french translation file (attached) and rebuilt but most translations seem to not work. The menus are still in English while most strings (not all) in the preference dialog are in French. Is it only me?
>
> I hope I won't have to redo the whole job since it took me hours...
>
> (file #55417)


The same for me with the Spanish trabslation

José Luis García Pallero <jgpallero>
Wed 06 Dec 2023 10:17:13 PM UTC, comment #6: 

I have updated the french translation file (attached) and rebuilt but most translations seem to not work. The menus are still in English while most strings (not all) in the preference dialog are in French. Is it only me?

I hope I won't have to redo the whole job since it took me hours...

(file #55417)

Pantxo Diribarne <pantxo>
Group Member
Tue 05 Dec 2023 09:30:59 PM UTC, comment #5: 

I cloned the Mercurial repository today (Dec. 23rd) at 17:25 UTC. Are there any changes after this date?

José Luis García Pallero <jgpallero>
Tue 05 Dec 2023 08:04:56 PM UTC, comment #4: 

2023-12-05: The .ts files have been updated today incorporating some small changes from the Qt sources, rather than Octave sources. I’m sorry that we didn’t catch that earlier. An HTML link to the language files is http://hg.savannah.gnu.org/hgweb/octave/file/f3df7a95ff16/libgui/languages/xx_XX.ts`` where xx_XXis the language code such asen_US`.

Rik <rik5>
Group administrator
Tue 05 Dec 2023 07:15:36 PM UTC, comment #3: 

Here the upgraded Spanish translation

(file #55407)

José Luis García Pallero <jgpallero>
Tue 05 Dec 2023 06:42:28 PM UTC, comment #2: 

You can download a language file (*.ts) via web from this location. After having selected a file, you have to select "raw" in the left navigation in order to download the displayed file.

You can also clone the repository and change into the directory of the language files by

hg clone hg clone https://hg.savannah.gnu.org/hgweb/octave/
cd octave/libgui/languages



Torsten Lilge <ttl>
Group Member
Tue 05 Dec 2023 09:09:27 AM UTC, comment #1: 

Can you please advise the exact location (i.e. hyperlink) for the  file(s) to be translated for hu_HU?

Sorry, are more familiar with translations using Weblate with program translation on Hosted Weblate.

Thank you

Anonymous
Tue 05 Dec 2023 05:33:57 AM UTC, original submission:  

This issue report is dedicated to the translation files for the Octave 9.1 Release.

The .ts files in libgui/languages have been updated on the stable branch and contain quite a few modifications and additions.

The Octave Developers are asking translators to review the .ts file for their language, fix an translations marked "unfinished", and upload the final file to this bug report.

The Octave Maintainers will then download the files, place them under version control, and incorporate them into the 9.1 release.

Rik <rik5>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #55470:  zh_CN.ts added by junwang (192KiB - text/plain - This is chinese translation file. (zh_CN))
file #55452:  nl_NL.ts added by philipnienhuis (196KiB - text/vnd.trolltech.linguist)
file #55450:  nl_NL.ts added by arb (196KiB - video/vnd.dlna.mpeg-tts)
file #55443:  hu_HU.ts added by None (203KiB - text/vnd.trolltech.linguist)
file #55431:  es_ES.ts added by jgpallero (177KiB - video/mpeg)
file #55428:  es_ES.ts added by jgpallero (177KiB - video/mpeg)
file #55427:  es_ES.ts added by jgpallero (177KiB - video/mpeg)
file #55420:  working_fr_FR.diff added by rik5 (472B - text/x-patch)
file #55417:  fr_FR.ts added by pantxo (178KiB - text/vnd.trolltech.linguist)
file #55407:  es_ES.ts added by jgpallero (179KiB - video/mpeg)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by junwang (Updated the item)
  • -email is unavailable- added by arb (Updated the item)
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by rik5
  • -email is unavailable- added by dasergatskov (Posted a comment)
  • -email is unavailable- added by pantxo (Updated the item)
  • -email is unavailable- added by jgpallero (Updated the item)
  • -email is unavailable- added by ttl (Posted a comment)
  • -email is unavailable- added by rik5 (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 13 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-12-26 rik5 StatusIn Progress Fixed
        Open/ClosedOpen Closed
    2023-12-20 junwang Attached File- Added zh_CN.ts, #55470
    2023-12-14 philipnienhuis Attached File- Added nl_NL.ts, #55452
    2023-12-13 arb Attached File- Added nl_NL.ts, #55450
    2023-12-13 None Attached File- Added hu_HU.ts, #55443
    2023-12-10 jgpallero Attached File- Added es_ES.ts, #55431
    2023-12-09 jgpallero Attached File- Added es_ES.ts, #55428
    2023-12-09 jgpallero Attached File- Added es_ES.ts, #55427
    2023-12-07 rik5 Attached File- Added working_fr_FR.diff, #55420
    2023-12-07 rik5 Carbon-Copy- Added jwe
    2023-12-06 pantxo Attached File- Added fr_FR.ts, #55417
    2023-12-05 jgpallero Attached File- Added es_ES.ts, #55407

    Back to the top

    Powered by Savane 3.15-e6e5.
    Corresponding source code