GNOME Bugzilla – Bug 592708
Orca should attempt to recognize Evo's Setup Assistant and present the (non-focused) prompts
Last modified: 2009-11-09 21:35:06 UTC
In src/orca/scripts/apps/evolution/script.py, the assumption is made that the localized phrases "Please", "Welcome" and "Congratulations" will be at the start of whatever text they're in. This assumption does not necessarily hold true. In Irish, the translation of "Please" will consistently fall at the end of the sentence it's in. A quick example: English: "*Please* enter your password:" Irish: "Iontráil d'fhocal faire, *le do thoil*:" This means Orca will fail to correctly identify these lines.
Seán, you are absolutely correct (of course). Sorry about that! That said, I just tried it for the en_US.UTF-8 locale and we're not presenting these things correctly anyway: We're not speaking the items this code would suggest we'd speak; we are skipping over text we shouldn't skip over because it lacks the magical words; we are speaking greyed-out labels simply because they begin with the magical words; etc. It's old code.... :-( Given that: 1. The code is broken for everyone. 2. In a wizard, it would be nice to present the text/prompts that are present even if they don't include "please", "thank you", or "have a nice day". I am hijacking this bug. In the process of fixing it, the i18n issue in the opening report will become a non-issue because we will no longer be taking our cue regarding what we should and should not present from pleasantries. ;-)
Created attachment 141461 [details] [review] Fix for Evo - revision 1 This patch: 1. Fixes the bulk of the presentation problems of the Setup Assistant in Evo. 2. Adds skeletal support for all scripts ('ROLE_WIZARD' formatting string, presentWizardNewInfo method in the default script, and an empty/to-be-overridden isWizardNewInfoEvent also in the default script.) 3. Resolves Seán's bug because all of the code in the Evo script in which we were examining strings and asking the translators to make things match has been ripped out. :-) As for 2.28 inclusion or not... In terms of impact: Our presentation of the Setup Assistant current is busted (presumably) for all locales and the Evo script is doing things it shouldn't do i18n-wize. This patch addresses these problems. In terms of risk: I'm not sure. I believe what I have done is sound. The skeletal additions to default.py and formatting.py are not being used by anything but Evo. Everything *seems* to work. :-) But we do not currently have any Evo regression tests. I don't feel that strongly about this and could go either way on inclusion for 2.28. Will, thoughts? (And if you think we should include it potentially, please review.) Thanks!
(In reply to comment #2) > Created an attachment (id=141461) [details] > Fix for Evo - revision 1 > > This patch: > > 1. Fixes the bulk of the presentation problems of the Setup Assistant in Evo. Yeah! This I like. > 2. Adds skeletal support for all scripts ('ROLE_WIZARD' formatting string, > presentWizardNewInfo method in the default script, and an > empty/to-be-overridden isWizardNewInfoEvent also in the default script.) This I'm not so sure about. I have no real great alternatives, but I'm not really sure we understand the "wizard" interfaces well enough to do something generic yet. > 3. Resolves Seán's bug because all of the code in the Evo script in which we > were examining strings and asking the translators to make things match has been > ripped out. :-) Yeah! This I like. Is there a way to accomplish #1 and #3 without introducing the ROLE_WIZARD thing yet? What I'm thinking is that it would be great to try to address the core problems, but then open a separate bug for something such as "Orca needs to better address wizard-like interfaces".
Created attachment 141505 [details] [review] Limit the fix to Evo; nuke ROLE_WIZARD (In reply to comment #3) > (In reply to comment #2) > > 2. Adds skeletal support for all scripts ('ROLE_WIZARD' formatting string, > > presentWizardNewInfo method in the default script, and an > > empty/to-be-overridden isWizardNewInfoEvent also in the default script.) > > This I'm not so sure about. I have no real great alternatives, but I'm not > really sure we understand the "wizard" interfaces well enough to do something > generic yet. Fair enough (especially this close to the release). > Is there a way to accomplish #1 and #3 without introducing the ROLE_WIZARD > thing yet? What I'm thinking is that it would be great to try to address the > core problems, but then open a separate bug for something such as "Orca needs > to better address wizard-like interfaces". Yeah. What I did in this patch is move everything into Evo (script.py and speech_generator.py). ROLE_WIZARD is gone and instead the Evo script uses pyatspi.ROLE_DIALOG. The impact of this is that before each properly-spoken screen we speak the name of the Frame (all ROLE_WIZARD's formatting string was a copy of the string used for pyatspi.ROLE_DIALOG and pyatspi.ROLE_ALERT sans the label/name of the dialog). While I'm not jazzed about this repetition, it's really not a big deal -- especially not compared to the improvement overall (i.e. we now speak the wizard screens as expected) Could I move the handling out of the speech generator and into the script? Of course. But I had looked at a number of other wizards (OOo Writer and Tbird) while working on the first version of this patch, and my money is on the final solution at least resembling what I proposed in the first patch (in which case the handling will need to be in the speech generator and not the script). Will, please review. Thanks!
Comment on attachment 141505 [details] [review] Limit the fix to Evo; nuke ROLE_WIZARD > patch, and my money is on the final solution at least resembling what I > proposed in the first patch (in which case the handling will need to be in the > speech generator and not the script). It may indeed end up that way. For where we are in the release right now, though, I think the more isolated/conservative approach is the right thing to do until we start the next release cycle. Many thanks for being flexible on this one and for working up the revised patch. I say commit for 2.27.91. Thanks!
Done. I've also opened an RFE (bug 592820) to address Wizards in general. Closing this bug as FIXED. (Are string removals string changes that need to be announced?)
(In reply to comment #6) > Done. I've also opened an RFE (bug 592820) to address Wizards in general. > Closing this bug as FIXED. > > (Are string removals string changes that need to be announced?) http://live.gnome.org/TranslationProject/HandlingStringFreezes says that the removal of a string is OK. Thanks for your work!