[nvda-addons] Re: NVDA Core ticket 5185: adding a new attribute for a string to be used in synth settings ring

  • From: "Joseph Lee" <joseph.lee22590@xxxxxxxxx>
  • To: <nvda-addons@xxxxxxxxxxxxx>
  • Date: Sun, 28 Jun 2015 19:24:04 -0700

Hi,
For Espeak (or for that matter, for any synthesizer), no need to worry about
changing code unless if the synthsetting for that synthesizer uses a label with
accelerator (that is, it uses i18nName) and you want that setting to be
available in synth settings ring.
I have just published a branch for review at NVDA Core repo
(git://git.nvaccess.org/nvda.git) under t5185 branch.
Cheers,
Joseph

-----Original Message-----
From: nvda-addons-bounce@xxxxxxxxxxxxx
[mailto:nvda-addons-bounce@xxxxxxxxxxxxx] On Behalf Of Takuya Nishimoto
Sent: Sunday, June 28, 2015 7:16 PM
To: nvda-addons@xxxxxxxxxxxxx
Subject: [nvda-addons] Re: NVDA Core ticket 5185: adding a new attribute for a
string to be used in synth settings ring

Thank you for the work regarding this.

Can I understand as follows?

The planned modification for ESpeak includes the fixes in SynthDriver class
methods in synthDriverHandler.py.

Regarding other synthesizers,
if an item of SupportedSettings just uses the base class methods, such as
SynthDriver.RateSetting(), the change for the item is not necessary for the
driver source itself.

--
Takuya Nishimoto
nishimotz@xxxxxxxxx


2015-06-29 10:38 GMT+09:00 Joseph Lee <joseph.lee22590@xxxxxxxxx>:

Hi all, mostly synthesizer driver developers:

A copy of this message was sent to development list, but since we have
some synth devs here, I’m pasting it in case you have some additional
comments:



As part of adding translatable string contexts, I’m working on a way
for synth drivers and synth settings ring to output the correct name
for a setting while changing the setting via synth settings ring.



Background: A number of translators informed NVDA core contributors
that some messages doesn’t have Gettext contexts, thereby using the
same message in multiple contexts. One of the major example was usage
of translatable string reserved for voice settings – the message with
accelerator will be heard when stepping through voice settings via
synth settings ring, like
this:

· Voice Setting message: Pitch (&P)

· Synth Settings message: Pitch (P) 50

This is the case when a language that uses non-Latin characters (East
Asian languages and others) define an English accelerator, and this is
used in synth settings message after the ampersand (accelerator
specifier) is removed.



To remedy this problem, I’m thinking that a new attribute should be
added in synth setting classes to specify strings to be used for synth
settings and voice settings dialog. The plan is as follows:

· Synth setting class: Replace i18nName with two new parameters: a
mandatory displayNameWithaccelerator, and an optional displayName.

· Display name with accelerator is same as i18nName. I18nName will
be preserved for backwards compatibility but might be removed (don’t
know when, it’s up to the lead developers).

· Display name is a string that will be used to output the “real”
(display) name of the setting when stepping through synth settings
ring. For backwards compatibility, this will be optional (default will be
None).

· When looking up which output string to use, voice settings will
use displayNameWithAccelerator and synth settings ring will first try
displayName before resorting to stripping ampersand from
displayNameWithAccelerator.

· To help translators, both displayName and
displayNameWithaccelerator will be translatable with different
contexts applied.



Implementation for specific synthesizers:

· ESpeak: Nothing to change, current interface is compatible with
planned modification.

· Other synths: it’s up to you.



Ticket reference:

http://community.nvda-project.org/ticket/5185



Background ticket:

http://community.nvda-project.org/ticket/5100



Please let me know by July 1st if it is fine with you to proceed with
the above plan (for most synth drivers, no need to change anything).

Cheers,

Joseph


----------------------------------------------------------------
NVDA add-ons: A list to discuss add-on code enhancements and for reporting
bugs.

Community addons are available from: http://addons.nvda-project.org To send a
message to the list: nvda-addons@xxxxxxxxxxxxx To change your list
settings/unsubscribe: //www.freelists.org/list/nvda-addons
To contact list moderators: nvda-addons-moderators@xxxxxxxxxxxxx

----------------------------------------------------------------
NVDA add-ons: A list to discuss add-on code enhancements and for reporting bugs.

Community addons are available from: http://addons.nvda-project.org
To send a message to the list: nvda-addons@xxxxxxxxxxxxx
To change your list settings/unsubscribe:
//www.freelists.org/list/nvda-addons
To contact list moderators: nvda-addons-moderators@xxxxxxxxxxxxx

Other related posts: