bugGNU Octave - Bugs: bug #55772, Untranslated text in GUI

 
 

bug #55772: Untranslated text in GUI

Submitted by:  Philip Nienhuis <philipnienhuis>
Submitted on:  Sun 24 Feb 2019 11:33:50 AM UTC  
 
Category:  GUI Severity:  2 - Minor
Priority:  5 - Normal Item Group:  Documentation
Status:  Fixed Assigned to:  Torsten Lilge <ttl>
Originator Name:  Philip Nienhuis Open/Closed:  Closed
Release:  5.1.0 Operating System:  Any

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

( Jump to the original submission)

Thu 23 May 2019 06:59:40 PM UTC, comment #18: 

I haved pushed changeset http://hg.savannah.gnu.org/hgweb/octave/rev/9fc02c2b6dbc which provides updated languages files with the non-translated strings.

Closing this report

Torsten Lilge <ttl>
Project MemberIn charge of this item.
Tue 21 May 2019 09:28:41 PM UTC, comment #17: 

Translations seem like a stable branch fix.

Rik <rik5>
Project Administrator
Tue 21 May 2019 08:19:51 PM UTC, comment #16: 

I think I have found the related source file and can add it to the search path for generating the translation files. Should this go into the stable or dev branch?

Torsten Lilge <ttl>
Project MemberIn charge of this item.
Tue 21 May 2019 04:24:44 PM UTC, comment #15: 

Last action on this bug report was March 7th.  Is the only outstanding issue the untranslated word "Search"?  Maybe we just live with that.

Rik <rik5>
Project Administrator
Thu 07 Mar 2019 09:03:22 PM UTC, comment #14: 

I have already searched (but not very deeply yet) in the Qt sources for the occurrence of the "Search" string in order to include this file into the scan while updating language files. This is already done for some Qt headers for languages that do not have a Qt translation.

Torsten Lilge <ttl>
Project MemberIn charge of this item.
Thu 07 Mar 2019 07:43:07 PM UTC, comment #13: 

The issue with the "Search" button within the Search tab of the Documentation tab is likely to reside deep in Qt.  The code in documentation.cc is

// Search
QHelpSearchEngine *search_engine = m_help_engine->searchEngine ();
QHelpSearchQueryWidget *search = search_engine->queryWidget ();
QHelpSearchResultWidget *result = search_engine->resultWidget ();

Documentation on QHelpSearchQueryWidget is at https://doc.qt.io/qt-5/qhelpsearchquerywidget.html.

It is possible that you need to install additional sets of translation files for the base Qt libraries on your system.  It is also possible that Qt itself forgot to marke a string for translation.  I would look at the first solution.  If that doesn't work, then maybe it is an upstream bug.

Rik <rik5>
Project Administrator
Thu 07 Mar 2019 07:32:05 PM UTC, comment #12: 

The text for About Octave is not static at compile time so that is why it is not being translated.  See libgui/src/main-window.cc

  void main_window::show_about_octave (void)
  {
    std::string message
      = octave_name_version_copyright_copying_warranty_and_bugs (true);

    QMessageBox::about (this, tr ("About Octave"),
                        QString::fromStdString (message));
  }

The call octave_name_version_copyright_copying_warranty_and_bugs() is to a function located in liboctave/version.cc which does some more string manipulation.

std::string
octave_name_version_copyright_copying_warranty_and_bugs
  (bool html, const std::string& extra_info)
{
  std::string sep = (html ? "\n</p>\n<p>\n" : "\n\n");

  std::string msg;

  if (html)
    msg = "<p>\n";

  msg += octave_name_version_copyright_copying_and_warranty (html, extra_info)
         + sep
         + octave_www_statement (html)
         + sep
         + octave_contrib_statement (html)
         + sep
         + octave_bugs_statement (html)
         + (html ? "\n</p>" : "");

  return msg;
}

Potentially, there could be two strings which are static at compile time, one in plain text format and one in HTML format and then the code would have to be changed to call the right one.  But, part of this is hooked in with the GNU build system which I believe auto-generates version.cc.

My thought is that getting this translated would involve a lot of pain, for very little gain.  Thus, I'm inclined not to fix this instance.

Rik <rik5>
Project Administrator
Sun 03 Mar 2019 07:25:48 PM UTC, comment #11: 

The "Help" -> "About Octave" dialogue also isn't translated.

Markus M├╝tzel <mmuetzel>
Project Member
Sun 03 Mar 2019 06:07:47 PM UTC, comment #10: 

The language were updated with cset http://hg.savannah.gnu.org/hgweb/octave/rev/0bec36b8a619 on stable, at least with respect to the context menu entries in the variable editor. An update with the strings of the search pane in the doc browser is still missing.

Reopening the report

Torsten Lilge <ttl>
Project MemberIn charge of this item.
Sun 03 Mar 2019 03:04:44 PM UTC, comment #9: 

The translation files can be updated on stable. 

Rik <rik5>
Project Administrator
Sun 03 Mar 2019 10:14:07 AM UTC, comment #8: 

Well, this bug is closed but the language files themselves still need updating.

I didn't note yet that the .tts files have been updated by Torsten, I'll make the Dutch translation soon (the updates were made on default (AFAICS)

Philip Nienhuis <philipnienhuis>
Project Member
Mon 25 Feb 2019 09:22:57 PM UTC, comment #7: 

@Rik: This is exactly the case.

I have updated the language files with cset http://hg.savannah.gnu.org/hgweb/octave/rev/0bec36b8a619 with respect to Rik's changes and the changes made in the html codes in the welcome wizard (without removing translated text).

Torsten Lilge <ttl>
Project MemberIn charge of this item.
Mon 25 Feb 2019 06:07:11 AM UTC, comment #6: 

The first case in the variable editor is probably because the tr() macro which marks strings for translation requires static strings rather than a variable piece of code.  I made this change.

diff -r bb3a441addb0 -r 1ff470c9e9c2 libgui/src/variable-editor.cc
--- a/libgui/src/variable-editor.cc     Sun Feb 24 21:22:49 2019 +0100
+++ b/libgui/src/variable-editor.cc     Sun Feb 24 22:02:04 2019 -0800
@@ -668,7 +668,7 @@ namespace octave
       }

     QString column_string
-      = tr (column_selection_count > 1 ? " columns" : " column");
+      = column_selection_count > 1 ? tr (" columns") : tr (" column");

     QMenu *menu = new QMenu (this);

@@ -715,7 +715,7 @@ namespace octave
         rowselection_count = 1;
       }

-    QString row_string = tr (rowselection_count > 1 ? " rows" : " row");
+    QString row_string = rowselection_count > 1 ? tr (" rows") : tr (" row");

     QMenu *menu = new QMenu (this);

Rik <rik5>
Project Administrator
Sun 24 Feb 2019 11:03:16 PM UTC, comment #5: 

Thanks for the explanation.
I'm regularly intrigued by unexpected or illogical things I see in Octave but if it isn't too much in my way I tend to ignore them until I'm convinced it is either easily solvable, or someone else also notes it, or it turns out it does need fixing after all.

As to qt-settings / file browser headings, it is on Windows 7.
I experimented a bit but couldn't come up with a reproducible scenario. I'm using 6.0.0 and 5.0.91 side by side.
Maybe ignore this until it is reproduced or pops up more reliably. With another newly initialized qt-settings file Octave still behaves well after 10 restarts and 2-3 language changes ....

BTW are you convinced the language files need this fix before 5.1.0 is released? AFAIK the Variable Editor is still considered experimental, so cosmetics perhaps can wait until a bug fix release in the summer or so.

Philip Nienhuis <philipnienhuis>
Project Member
Sun 24 Feb 2019 09:32:31 PM UTC, comment #4: 

The partly translated strings in VE are caused by a string that is composed by "cut" and a variable part "row", "rows", "column" and "columns". The translation of this variable part obviously does not work. This is already fixed, but I am still trying to update the language files.

The dependence of the file browser translation on the settings file is really weird. Does this happen on Linux (KDE?) or Windows?

Torsten Lilge <ttl>
Project MemberIn charge of this item.
Sun 24 Feb 2019 08:51:35 PM UTC, comment #3: 

After restarting Octave a few times with the new qt-settings file, the file browser headers become untranslated again ....

Philip Nienhuis <philipnienhuis>
Project Member
Sun 24 Feb 2019 08:45:33 PM UTC, comment #2: 

Torsten,
After renaming .config/octave/qt-settings indeed the file browser headers became translated.

On the one hand that is good, OTOH it's fishy as AFAIU the qt-settings file should be upwards-compatible. Or am I wrong here?

Anyway what struck me (but I didn't mention) is that the V.E. context menu texts were partly translated: e.g., "Ausschneiden column".

Philip Nienhuis <philipnienhuis>
Project Member
Sun 24 Feb 2019 08:10:48 PM UTC, comment #1: 

I can confirm the issue with the variable editor and in the documentation search pane. For the latter, there is probably not much we can do because this text directly comes from Qt. The translation of the headers in the file browser is complete on my system (tested for de_DE and nl_NL).

I will update the language files but have to make some fixes beforehand because there were changes in some html-codes after the last translations. An ordinary update of the language files would remove the translated text within this html-code.

Torsten Lilge <ttl>
Project MemberIn charge of this item.
Sun 24 Feb 2019 11:33:50 AM UTC, original submission:  

Just a few cases I hit last week:

Variable editor
When right-clicking on a column or row header, I see in e.g., Spanish translation terms like "Cortar column" and "Copiar row", resp. Similar holds for Dutch and German translations.
Text in these VE context menus e.g., "Cut column" and "Copy row" etc. don't show show up in any .tts file.

Documentation pane
"(e.g., German, French) "Suchen" or "Recherche" tab: the text to the right of the search text box mentions "Search"

File Browser
The column headers mention "Name", "Size", "Date Modified" etc. while in the context menu one gets after right-clicking the column headers, the translations are shown.
In the Workspace pane the column headers are translated so I suppose it should be possible to get it right.

No big deal I guess but is might appear a bit sloppy to unwary users.
I'm prepared to update translations quickly but maybe wait for the 5.<whatever> bug fix release?

Philip Nienhuis <philipnienhuis>
Project Member

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by ttl (Posted a comment)
  • -email is unavailable- added by philipnienhuis (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    Follow 11 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-05-23 ttl StatusIn Progress => Fixed
        Open/ClosedOpen => Closed
    2019-03-03 rik5 Carbon-CopyRemoved 72865 => -
    2019-03-03 ttl Assigned toNone => ttl
    2019-03-03 ttl StatusFixed => In Progress
        Open/ClosedClosed => Open
    2019-03-02 rik5 StatusReady For Test => Fixed
        Open/ClosedOpen => Closed
    2019-02-26 mtmiller Severity3 - Normal => 2 - Minor
        StatusNone => Ready For Test
        Release5.0.91 => 5.1.0

    Back to the top


    Powered by Savane 3.5