[nvda-addons] Re: Emoticons: new add-on to review

  • From: Noelia <nrm1977@xxxxxxxxx>
  • To: nvda-addons@xxxxxxxxxxxxx
  • Date: Mon, 14 Oct 2013 23:15:17 +0200

I have tested and it's better to use raw strings, at least in certain
cases, i.e. when writing \b, though there are expressions that are
writeng as symbols otherwise and would need to be Escaped with a
double back slash.
Tomorrow I will commit this to noDicFile branch, or even I can paste
all the expressions contained in the dictionary and merge to master.
Thanks.

2013/10/14, Noelia <nrm1977@xxxxxxxxx>:
> Hi, I don't know if we need raw strings for regular expressions.
> Perhaps it's better, but I'm not sure. I will test it checking the
> result shown in the dictionary dialog too.
> According to my test, we need two back slash in the replacement
> variable. I have writen this like that:
>
> firstGroup = "\\1".
>
> Then we use %s when it is necessary, for instance %ssad smiley, and
> translators have to write %sEmoticono triste, in Spanish.
> We can do this automatically when generating the temporary dictionary,
> but I think it's better not to do it for flexibility.
> Thanks.
>
> 2013/10/14, Mesar Hameed <mesar.hameed@xxxxxxxxx>:
>> Hi Chris,
>>
>> On Mon 14/10/13,12:16, Ch-L wrote:
>>> Just a question; the backslash character  have the same meaning that
>>> in dictionaries regex?
>>> Or shold be doubled?
>>
>> I think you are right, instead of double escaping, we can use raw
>> strings.
>> var = r'regexp'
>>
>> or in our case:
>>  # Translators:  :) Smile
>>  ( r'(\s|^)(:([\-]|)([)]{1})(\B|\s|$))', _("\1smiley Smile"), True,
>> True),
>>
>> By the way, regexps that have back references in the replacement should
>> probably be rewritten. we don't want to expose \1 \2 etc to translators.
>>
>>> I can not download this branch with git,
>>
>> If you already have the repo.
>> git fetch --all
>> git checkout noDicFile
>>
>> Should hopefully do it.
>> thanks,
>> Mesar
>>> Il 13/10/2013 19:27, Mesar Hameed ha scritto:
>>> >Hi Nolia,
>>> >
>>> >On Sun 13/10/13,14:15, Noelia wrote:
>>> >>something like that is done and posted on noDicFile branch
>>> >>for Emoticons add-on.
>>> >
>>> >I think with my latest changes the code is complete, unless you can
>>> > spot
>>> >anything missing/errors.
>>> >If you can test again please that would be great.
>>> >Note I changed the internal addon name from capital Emoticon to
>>> >lowercase, so probably need to uninstall the uppercase version before
>>> >installing this one.
>>> >
>>> >thanks,
>>> >Mesar
>>
>
----------------------------------------------------------------

NVDA add-ons Central: A list for discussing NVDA add-ons

To post a message, send an email to nvda-addons@xxxxxxxxxxxxx.

To unsubscribe, send an email with the subject line of "unsubscribe" (without 
quotes) to nvda-addons-request@xxxxxxxxxxxxx.

If you have questions for list moderators, please send a message to 
nvda-addons-moderators@xxxxxxxxxxxxx.

Community addons can be found here: http://addons.nvda-project.org

Other related posts: