Buttons key shortcuts missing

Bug #803113 reported by David Caro
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
CLI Companion
Fix Released
Low
David Caro

Bug Description

The buttons Run and Edit do not have an Alt+key shortcut.
To add it you must add an underscore before the letter for the shortcut when setting the button name, it seems that it must be done in the mo files (transslations) so when getting _('Run') the result must be '_Run' (in english).

I can do it myself, but i'm not sure how to edit the translations (.mo files).

Revision history for this message
Marek Bardoński (bdfhjk) wrote : Re: [Bug 803113] [NEW] Buttons key shortcuts missing

Hi David!

Thanks for all your work. I look at patchs and bugs reported by You,
when I end participating in NASA tournament, that consumed my time.

Maybe You thinking about joining our team?

About .mo files :

Try to look here : [1] , [2] and short tutorial [3]

Regards!

 Marek Bardoński

[1] http://www.gnu.org/software/gettext/manual/gettext.html
[2] http://docs.python.org/library/gettext.html
[3] http://oriya.sarovar.org/docs/gettext/

Revision history for this message
David Caro (dcaro) wrote :

Hi Marek,

Sure!

Revision history for this message
David Caro (dcaro) wrote :

I've changed that for spanish language, I will post the patch for all the files (and languages) here as soon as posible.

It's a little more complicated than i first thought:
The translation files (.mo) where not installed correctly, only one clicompanion.mo file was installed at the /usr/share/clicompanion/local/ dir,, fixed the setup.py file.

After that, all the key shortcuts are working :)

Revision history for this message
Marek Bardoński (bdfhjk) wrote :

I only want to notice, that we have automatic launchpad translation system, so better than make changes in all language files is modify .pot file. See in google 'automatic launchpad translations'.

Regards!

Revision history for this message
David Caro (dcaro) wrote :

Yes, I noticed :S

So I did not change the translations but added an underscore before the translation, so the first letter becomes the shortcut.

If more buttons are not going to use the stock, the same must be done for each one (now it uses the gtk.stock buttons, so they are correctly translated).

I've seen that ubuntu stores the translations sometimes as the locales are called (en_GB for example) but sometimes only as a general locale (es instead of es_ES for example) so now it looks for the fulll locale, and if not found, looks for the generic one.

I'll create another bug with the patch attached for this issue.

Revision history for this message
Marek Bardoński (bdfhjk) wrote :

I checked patch and recommend to merge it to trunk.

Thanks!

Changed in clicompanion:
status: New → Fix Committed
importance: Undecided → Low
Revision history for this message
David Caro (dcaro) wrote :

Reopened and started a branch, the first patch does not work properly for the edit button.

Changed in clicompanion:
status: Fix Committed → In Progress
assignee: nobody → David Caro (dcaro)
Revision history for this message
Marek Bardoński (bdfhjk) wrote :

Edit button shortcut is now working fine. Closing then. Thanks!

Changed in clicompanion:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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