After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 670663 - Since beginning rolename refactoring, Orca present wrong capital signal some role names
Since beginning rolename refactoring, Orca present wrong capital signal some ...
Status: RESOLVED FIXED
Product: orca
Classification: Applications
Component: braille
3.3.x
Other Linux
: Normal normal
: ---
Assigned To: Joanmarie Diggs (IRC: joanie)
Orca Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-02-23 09:21 UTC by Hammer Attila
Modified: 2012-02-23 17:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Debug file with shows possible why happening the problem (191.82 KB, application/octet-stream)
2012-02-23 09:21 UTC, Hammer Attila
Details

Description Hammer Attila 2012-02-23 09:21:58 UTC
Created attachment 208237 [details]
Debug file with shows possible why happening the problem

Dear Developers,

Since begin rolename refactoring, Orca presents braille wrong capital simbol with middle or end the rolename texts.
Typical examples is page tabs, check boxes, etc.
In Atk translations I changed for example the page tab text translation with lowercase letters, but I see following text my braille display when I land the general page tab in Orca Preferences dialog:
generate braille results:
  Component: 'orca $alkalma2"$s', 0
  Region: ' ', 0
  Component: '$be"ll|t"sok $p"$rbe51$dablak', 1
  Region: ' ', 0
  Component: '$"ltal"nos $lapf{$l', 1
BRAILLE LINE:  'orca $alkalma2"$s $be"ll|t"sok $p"$rbe51$dablak $"ltal"nos $lapf{$l'
     VISIBLE:  'orca $alkalma2"$s $be"ll|t"sok $p"$rbe51$dablak $"ltal"nos $lapf{$l', cursor=50

And look now the speech result, this is full ok:
generate speech for unfocused app.name='orca' name='Általános' role='page tab' state='enabled multi line selectable selected sensitive showing visible' relations='' (args={'recursing': True, 'priorObj': <Accessible object at 0xa7cb34c (AtspiAccessible at 0xac2f290)>, 'role': <enum ATSPI_ROLE_PAGE_TAB of type Role>, 'mode': 'speech', 'formatType': 'unfocused'}) using 'newAncestors + newRowHeader + newColumnHeader + newRadioButtonGroup + labelAndName + roleName + pause + positionInList + (mnemonic and (pause + mnemonic + lineBreak) or []) + accelerator + newNodeLevel + unselectedCell + (tutorial and (pause + tutorial) or [])'
script_utilities.commonAncestor...
...script_utilities.commonAncestor
GENERATION  TIME: 0.0023  ---->  newAncestors=[]
GENERATION  TIME: 0.0004  ---->  newRowHeader=[]
GENERATION  TIME: 0.0004  ---->  newColumnHeader=[]
GENERATION  TIME: 0.0003  ---->  newRadioButtonGroup=[]
GENERATION  TIME: 0.0003  ---->  labelAndName=['\xc3\x81ltal\xc3\xa1nos', {u'average-pitch': 3.0, u'rate': 90.0, u'family': {u'locale': u'hu', u'name': u'magyar'}}]
GENERATION  TIME: 0.0007  ---->  roleName=['lapf\xc3\xbcl', {}]
GENERATION  TIME: 0.0003  ---->  pause=[<orca.speech_generator.Pause instance at 0xa1edc2c>]
GENERATION  TIME: 0.0016  ---->  positionInList=['1 per 8.', {}]
GENERATION  TIME: 0.0003  ---->  mnemonic=[]
GENERATION  TIME: 0.0002  ---->  accelerator=[]
GENERATION  TIME: 0.0007  ---->  newNodeLevel=[]
GENERATION  TIME: 0.0004  ---->  unselectedCell=[]
GENERATOR: _getTutorialForPageTabList
           obj             = Általános
           role            = page tab
           alreadyFocused  = False
           utterances:
               (A lapfülek közötti váltáshoz használja a balra- és jobbra nyíl billentyűket.)
GENERATOR: getTutorial
           obj             = Általános
           role            = page tab
           alreadyFocused  = False
           utterances:
               (A lapfülek közötti váltáshoz használja a balra- és jobbra nyíl billentyűket.)
GENERATION  TIME: 0.0009  ---->  tutorial=['A lapf\xc3\xbclek k\xc3\xb6z\xc3\xb6tti v\xc3\xa1lt\xc3\xa1shoz haszn\xc3\xa1lja a balra- \xc3\xa9s jobbra ny\xc3\xadl billenty\xc5\xb1ket.', {}]
COMPLETION  TIME: 0.0104
generate speech results:
  Általános
  {u'average-pitch': 3.0, u'rate': 90.0, u'family': {u'locale': u'hu', u'name': u'magyar'}}
  lapfül
  {}
  <orca.speech_generator.Pause instance at 0xa1edc2c>
  1 per 8.
  {}
  <orca.speech_generator.Pause instance at 0xa1edc2c>
  A lapfülek közötti váltáshoz használja a balra- és jobbra nyíl billentyűket.
  {}
SPEECH OUTPUT: 'Általános lapfül.'
SPEECH OUTPUT: '1 per 8.'
SPEECH OUTPUT: 'A lapfülek közötti váltáshoz használja a balra- és jobbra nyíl billentyűket.'
So you see, the "lapfül" text containing full lowercase letters, braille text is presenting wrong.

Reproducation steps:
1. Pull latest master Orca version, and enable contracted braille feature.
2. Look typical role names with braille output.

I attached the debug.out file.

Attila
Attila
Comment 1 Joanmarie Diggs (IRC: joanie) 2012-02-23 12:22:49 UTC
Seems that str.title() screws up accented words.
Comment 2 Joanmarie Diggs (IRC: joanie) 2012-02-23 12:25:15 UTC
Please test master.
Comment 3 Hammer Attila 2012-02-23 14:21:02 UTC
Hy Joanie,

If I see right, the problem is fixed.
I tested the problem with latest Orca master version and Ubuntu precise packaged atk component.

I have got a question:
All rolenames default the first character is converting Orca with uppercase letter? If this method have purpose, I think nothing need changing.
Please don't close this bug until friday evening, because I would like looking Atk master version the new hungarian translations.
Not matter if my translations is beginning lowercase letters?
Unfortunately, when I try now looking atk master version this problem, Orca won't want restart.
I doed following steps to atk compilation:
1. Downloaded atk source with git clone git://git.gnome.org/atk
2. Run ./autogen.sh --prefix=/usr command.
3. Run general make and make install commands, and try run orca --replace command. After this, my braille display is freezed, and Orca not restarted.
I doed anything wrong?

Attila
Comment 4 Joanmarie Diggs (IRC: joanie) 2012-02-23 14:33:38 UTC
(In reply to comment #3)
 
> If I see right, the problem is fixed.

Thanks!

> I have got a question:
> All rolenames default the first character is converting Orca with uppercase
> letter?

Yes. And the reason why was to try to keep consistency. Back when Orca was providing all the rolename strings you saw stuff like this:

#. Translators: long braille for the rolename of a toolbar.
#.
#: ../src/orca/rolenames.py:1007
msgid "ToolBar"
msgstr ""

#. Translators: spoken words for the rolename of a toolbar.
#.
#: ../src/orca/rolenames.py:1010
msgid "tool bar"
msgstr ""

In other words, the speech version was two lowercase words; the long braille version was those two words combined into a single, camel-cased word. Why it was done that way originally, I'm not sure. My guess would be to preserve space on the braille display. Anyway, my goal was to use the proper/correct way to get the localized role names (i.e. via AT-SPI2) and at the same time not completely change what users saw. Make sense?

> Please don't close this bug until friday evening,

Okie dokie.

> Not matter if my translations is beginning lowercase letters?

Not a problem. See the above, original Orca example for tool bar.

> Unfortunately, when I try now looking atk master version this problem, Orca
> won't want restart.
> I doed following steps to atk compilation:
> 1. Downloaded atk source with git clone git://git.gnome.org/atk
> 2. Run ./autogen.sh --prefix=/usr command.
> 3. Run general make and make install commands, and try run orca --replace
> command. After this, my braille display is freezed, and Orca not restarted.
> I doed anything wrong?

Dang. That should not happen. I'll see if I can reproduce it.
Comment 5 Hammer Attila 2012-02-23 15:54:45 UTC
Joanie, if I understanding right your comment part, Orca do prewious following in braille role names:
If the translator translated for example with ToolBar the tool bar role name in long braille, Orca present ToolBar style the text.
But if translator using tool bar text with long braille text, Orca sending the translator gived text. This method is good, if for example the translator want correct grammatical writing braille too the rolename text.
Orca prewious use this method with non english locales?

For example, the layered pane role name is two word. What happening now this two word role names with braille output? For example, this two word containing rolename presenting non english locales with two single word if the translator fill two single word the layered pane translated text in Atk translation?

Attila
Comment 6 Joanmarie Diggs (IRC: joanie) 2012-02-23 16:20:26 UTC
Before there were three separate strings used:

1. Speech
2. Long braille
3. Short braille

They were presented for localization as:

1. tool bar (all lowercase with a space)
2. ToolBar (capitalize the first letter in each word, remove space in between)
3. tbar (an abbreviation)

What individual translators did, I'd have to look. What was expected of the translators is to follow the pattern above.

What Orca does now is:

1. Take what we get via AT-SPI2 and present it for speech
2. Take what we get via AT-SPI2, capitalize the first letter in each word, remove the space in between.
3. Take what we get from the translation in Orca because AT-SPI2 doesn't have a method to get the abbreviation and we cannot do that through code alone in Orca.
Comment 7 Hammer Attila 2012-02-23 16:51:31 UTC
Okai, I understand now.
Look for example following strings with atk translation:
#: ../atk/atkobject.c:85
msgid "combo box"
msgstr "kombinált listamező"

#: ../atk/atkobject.c:87
msgid "desktop icon"
msgstr "asztali ikon"

#: ../atk/atkobject.c:104
msgid "layered pane"
msgstr "réteges ablaktábla"

If future full removing with Orca role names translation strings in src/orca/rolenames.py file, braille output will be not right if hardcoded joining the translated output with one word this strings for example. Hungarian language absolute sure not.
Kombináltlistamező, rétegesablaktábla and asztaliikon is not valid grammatical words in hungarian language, independent have capital beginning letter between two word parts.
What can possible doing future to prewent this situation?
For example, in Orca Xdesktop branch version and prewious days master branch version this situation not happening, because in hungarian translation file this rolenames translation I wrote grammatical right format (kombinált listamező, asztali ikon and réteges ablaktábla).

Have an another question:
Future what will be happening the abbrewiated role names feature? Or this translations is keeping in Orca code both speech and braille?

Attila
Comment 8 Joanmarie Diggs (IRC: joanie) 2012-02-23 17:33:27 UTC
> What can possible doing future to prewent this situation?

I'll stop the camel casing and word combining. Long braille is the same as speech.

The abbreviated role names will be kept only for braille -- they never existed for speech. And the reason they will be kept is because of what I already said in comment #6: I cannot generate the right abbreviation.

Any other problems?
Comment 9 Joanmarie Diggs (IRC: joanie) 2012-02-23 17:46:48 UTC
Also, I am going to close this bug as FIXED now. The bug was: Long braille names are not correct because I was manipulating them (capitalization, camel casing). The fix is: stop manipulating them and just present the speech. And the fix has been committed. For new issues that crop up, please open new bugs.