tooltip for menubar not localized

Bug #169103 reported by Luca Bruno
12
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Medium
Marcin Floryan

Bug Description

In recent SVN version tooltip for menubar (ie. the hint floating over
copy/cut/paste/etc. buttons) aren't translated. All the other parts of the
GUI are properly localized, and all the strings are translated in the .po
(I'm currently looking at my italian .po).
This is a regression since 0.45.1, which was working fine.

I'm currently bisecting the SVN history to found the culprit. These are the
reports for this bug:

* 0.45.1 (r14553) - bug not-present
* r15386 - bug present
* r15193 - bug present

Tags: translation ui
Revision history for this message
Bryce Harrington (bryce) wrote :

Is this still a problem in current SVN?

Changed in inkscape:
status: New → Incomplete
Revision history for this message
Luca Bruno (lucab) wrote :

Yes, just tried with SVN r16628. I'm the only one experiencing it?

Changed in inkscape:
status: Incomplete → New
Revision history for this message
theAdib (theadib) wrote :

me too, I will attach screenshot for german screen for recent svn Inkscape on Ubuntu7.10

Changed in inkscape:
status: New → Confirmed
Revision history for this message
Bryce Harrington (bryce) wrote :

Can you try the following diff (I'm not set up for testing translations yet):

Index: src/ege-adjustment-action.cpp
===================================================================
--- src/ege-adjustment-action.cpp (revision 16783)
+++ src/ege-adjustment-action.cpp (working copy)
@@ -729,7 +729,7 @@
                 if ( !act->private_data->toolTips ) {
                     act->private_data->toolTips = gtk_tooltips_new();
                 }
- gtk_tooltips_set_tip( act->private_data->toolTips, spinbutton, tipstr, 0 );
+ gtk_tooltips_set_tip( act->private_data->toolTips, spinbutton, gettext(tipstr), 0 );
             }
         }

Bryce Harrington (bryce)
Changed in inkscape:
assignee: prokoudine → bryceharrington
Revision history for this message
Luca Bruno (lucab) wrote :

Just tried, the fix doesn't work

Bryce Harrington (bryce)
Changed in inkscape:
assignee: bryceharrington → nobody
milestone: none → 0.46
Revision history for this message
Bryce Harrington (bryce) wrote :

While this is an important translation issue, it does not cause crash or data loss, so I'm decreasing the priority to Medium.

I'm leaving the milestone still to 0.46, as it would be nice to have this fixed for the release. However, since we're close to string freeze, it's nearly too late.

I don't know what needs done to fix it, and don't plan on doing further work on it, so if someone else wishes to investigate a fix for it, please do.

Changed in inkscape:
importance: Critical → Medium
Revision history for this message
Teo (leszekz) wrote :

Hi,
I'm new Polish maintainer localization, and this issue is very ugly. I used last SVN and many phrases are present in the .po but not displayed in the GUI:
Create new document from the default template
Open an existing document
Save document
Print document
Import a bitmap or SVG image into this document
Export this document or a selection as a bitmap image
Undo last action
Do again the last undone action
Copy selection to clipboard
Cut selection to clipboard
Paste objects from clipboard to mouse point, or paste text
Zoom to fit page in window
Zoom to fit drawing in window
Zoom to fit page width in window
Duplicate selected objects
Create a clone (a copy linked to the original) of selected object
Cut the selected clone's link to its original, turning it into a standalone object
Group selected objects
Ungroup selected groups
Edit objects' colors, gradients, stroke width, arrowheads, dash patterns...
View and select font family, font size and other text properties
View and edit the XML tree of the document
Align and distribute objects
Edit global Inkscape preferences
Edit properties of this document (to be saved with the document)
Select all objects or all nodes
Select all objects in all visible and unlocked layers
Deselect any selected objects or nodes
Rotate selection 90° counter-clockwise
Rotate selection 90° clockwise
Flip selected objects horizontally
Flip selected objects vertically
Lower selection to bottom
Lower selection one step
Raise selection one step
Raise selection to top
Convert selected object to path
Convert selected object's stroke to paths
Zoom in
Zoom out
Zoom to 1:1
Zoom to 1:2
Zoom to 2:1
Zoom to fit selection in window
Zoom to fit drawing in window
Zoom to fit page in window
Zoom to fit page width in window
Previous zoom (from the history of zooms)
Next zoom (from the history of zooms)
_Close"

These phrase aren't present in the .po file:

Close - displayed in the dockable and floating windows
Iconify - displayed in the dockable and floating windows
times current stroke width - global preference window

Revision history for this message
Teo (leszekz) wrote :

And next phrases:

Present in the .po file, not present in the GUI:

Toggle color managed display for this document window
Color managed view - this phrase is displayed in the GUI as Color -managed view

Not present in the .po file:

Rows and Columns
Ask Us a Question

Revision history for this message
Marcin Floryan (mfloryan) wrote :

Teo,

You may need to update the PO file in accordance with the new POT file but please be aware that I have just made some further translations with the updated PO file and forwarded it to Kuba Szypułka to complete the translation. The pl.po file now contains all the string you've mentioned and is 85% complete.

Still, there is some bug in the code that stops the translated messages to be shown correctly. It needs some further work.

Revision history for this message
Teo (leszekz) wrote : Re: [Bug 169103] Re: tooltip for menubar not localized

Hi Marcin,
I sent to mailing list information about Polish Inkscape Translation Team
but this message is waiting for administrator approval because he have
Polish localization and win installer.

"I'm team leader of Polish Inkscape Translation Team established for making
best Polish localization of Inkscape. We have agreement first Polish
translator for continue this project. I have one request for Inkscape Team -
please don't publish any Polish translation non authorized by me. At this
moment we have finished 97% of user interface translation and 100% Win
installer."

Who is Kuba Szypułka?

P.S
Are you Pole?

2008/2/8, Marcin Floryan <email address hidden>:
>
> Teo,
>
> You may need to update the PO file in accordance with the new POT file
> but please be aware that I have just made some further translations with
> the updated PO file and forwarded it to Kuba Szypułka to complete the
> translation. The pl.po file now contains all the string you've mentioned
> and is 85% complete.
>
> Still, there is some bug in the code that stops the translated messages
> to be shown correctly. It needs some further work.
>
>
> --
> tooltip for menubar not localized
> https://bugs.launchpad.net/bugs/169103
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Marcin Floryan (mfloryan) wrote :

This might not be the most elegant solution but seems to fix the bug (Since verbs.cpp use N_ macro which "Marks a string for translation, gets replaced with the untranslated string at runtime" another translation is required).

Changed in inkscape:
assignee: nobody → mfloryan
status: Confirmed → In Progress
Revision history for this message
Luca Bruno (lucab) wrote :

Oh, many many thanks. I tested and committed this in SVN r17289 (as I don't know if you SVN commit access).

Changed in inkscape:
status: In Progress → Fix Committed
Revision history for this message
Marcin Floryan (mfloryan) wrote :

The same problem still occurs with select-toolbar hence reopening the bug. More general fix on the way.

Changed in inkscape:
status: Fix Committed → In Progress
Revision history for this message
Luca Bruno (lucab) wrote :

Doing just the same in widgets/select-toolbar.cpp would be ok... Have you already in mind a concrete more general fix?

Revision history for this message
Marcin Floryan (mfloryan) wrote :

Yes. I know it would. But I felt this little adjustment could be bit better and a bit more general.

Revision history for this message
Luca Bruno (lucab) wrote :

Looking at your little accessor, does it have any trouble if _tip isn't N_() translated somewhere else?
Otherwise I'll revert the previous one and apply this.

Revision history for this message
Marcin Floryan (mfloryan) wrote :

Bruno, I was looking at the code and I did try removing the N_ in the tooltip at some point in time but this didn't prove to fix the problem for some reason. I thought the accessor way is tidy enough and will fix the issue (and will provide translated tip in other contexts as well - spotted at least one debug message in verbs.cpp that uses it). And BTW - the patch itself reverts the changes introduced by the previous one :-)

Revision history for this message
Marcin Floryan (mfloryan) wrote :

There is yet one more item overlooked. The verb's name needs to be localised as well since it is shown in the toolbox when items are shown as list and not as icons (narrow the main window down and click on the menu - >>) Though they are already localised for the the main menu which makes the accessor solution for get->name() suboptimal. I will try to track down what is done when the menu is constructed (I suppose a call to _() is simply added somewhere) but I would prefer to do that once we have agreed on the solution. Regardles, it would be nice to have it out of the way sooner rather than later.

Revision history for this message
Marcin Floryan (mfloryan) wrote :

Luca, Do you have any definite views on that? Otherwise I will commit my patch and close this bug.

Revision history for this message
Marcin Floryan (mfloryan) wrote :

Fixed in 17449.

Changed in inkscape:
status: In Progress → Fix Committed
Bryce Harrington (bryce)
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.