menu
Tatoeba
language
Register Log in
language English
menu
Tatoeba

chevron_right Register

chevron_right Log in

Browse

chevron_right Show random sentence

chevron_right Browse by language

chevron_right Browse by list

chevron_right Browse by tag

chevron_right Browse audio

Community

chevron_right Wall

chevron_right List of all members

chevron_right Languages of members

chevron_right Native speakers

search
clear
swap_horiz
search
raeldor raeldor August 14, 2014 August 14, 2014 at 7:52:23 PM UTC link Permalink

Hi,

When doing the search on the annotations editing screen for the japanese sentences, is there a way to have to not trim the spaces when doing a search. For example, if I search for '四 ' in the search box, it actually searches for '四'. This makes it difficult to find instances where '四' stands alone and has not been qualified.

Thanks
Ray

{{vm.hiddenReplies[20152] ? 'expand_more' : 'expand_less'}} hide replies show replies
TRANG TRANG August 16, 2014 August 16, 2014 at 1:56:02 PM UTC link Permalink

Yes, you have to actually type <space>. What you want to search is: 四<space>

{{vm.hiddenReplies[20161] ? 'expand_more' : 'expand_less'}} hide replies show replies
User55521 User55521 August 17, 2014 August 17, 2014 at 6:45:40 PM UTC link Permalink

I’m afraid it doesn’t work.

raeldor raeldor August 17, 2014 August 17, 2014 at 11:45:13 PM UTC link Permalink

This worked for me by typing the literal string '<space>', thank you!

raeldor raeldor August 17, 2014 August 17, 2014 at 11:51:22 PM UTC link Permalink

Oops, spoke too soon. Works for search, but when I try and replace and preview it doesn't find anything. For example if I search for '<space>四<space>' to replace with '<space>四(よん)<space>'.

{{vm.hiddenReplies[20175] ? 'expand_more' : 'expand_less'}} hide replies show replies
TRANG TRANG August 18, 2014 August 18, 2014 at 5:55:45 PM UTC link Permalink

It's only when searching that you need to use <space>, and only for spaces at the beginning or the end.
When replacing you would use a normal space.

{{vm.hiddenReplies[20179] ? 'expand_more' : 'expand_less'}} hide replies show replies
raeldor raeldor August 18, 2014 August 18, 2014 at 8:14:04 PM UTC link Permalink

I'm guessing the algorithm only works when <space> is at the beginning OR the end then? Because when it's both it doesn't seem to work. :(

{{vm.hiddenReplies[20180] ? 'expand_more' : 'expand_less'}} hide replies show replies
TRANG TRANG August 19, 2014 August 19, 2014 at 3:20:38 PM UTC link Permalink

Searching "<space>四<space>" works fine for me.

{{vm.hiddenReplies[20183] ? 'expand_more' : 'expand_less'}} hide replies show replies
raeldor raeldor August 20, 2014 August 20, 2014 at 7:34:13 PM UTC link Permalink

Yes, the search works, but have you tried replacing that?

{{vm.hiddenReplies[20185] ? 'expand_more' : 'expand_less'}} hide replies show replies
TRANG TRANG August 21, 2014 August 21, 2014 at 1:41:08 PM UTC link Permalink

Indeed, the replace doesn't highlight. But it may be just an issue with the javascript. I'll take a look later.

If you're wondering how it works, the related code is here:
https://github.com/Tatoeba/tato...ons.preview.js
https://github.com/Tatoeba/tato...annotation.php

{{vm.hiddenReplies[20191] ? 'expand_more' : 'expand_less'}} hide replies show replies
raeldor raeldor August 25, 2014 August 25, 2014 at 9:18:26 PM UTC link Permalink

Hi Trang,

Did you get a chance to take a look at this?

Thanks
Ray

{{vm.hiddenReplies[20236] ? 'expand_more' : 'expand_less'}} hide replies show replies
TRANG TRANG August 25, 2014 August 25, 2014 at 11:28:50 PM UTC link Permalink

Yes, it was a problem with the preview. If you did the replace, it would actually replace properly. But I fixed the preview and it should highlight the strings as intended now.

{{vm.hiddenReplies[20238] ? 'expand_more' : 'expand_less'}} hide replies show replies
raeldor raeldor August 26, 2014 August 26, 2014 at 4:44:06 AM UTC link Permalink

Awesome, thank you so much!