Bug 411861 - wrong libtranslate behavior
Summary: wrong libtranslate behavior
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: libtranslate
Version: 8
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Dmitry Butskoy
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-12-05 11:51 UTC by Timon
Modified: 2007-12-10 12:04 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-12-10 12:04:25 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
solve this bug (296 bytes, patch)
2007-12-05 13:04 UTC, Timon
no flags Details | Diff

Description Timon 2007-12-05 11:51:13 UTC
Description of problem:


Version-Release number of selected component (if applicable):
libtranslate-0.99-9.fc6

Steps to Reproduce:
edit services.xml and add something like this:

<text-translation
url="http://www2.systranbox.com/sai?gui=sbox/normal/systran/sboxEN&amp;lp=${from}_${to}&amp;service=translate"
post="${text}">
   <pre-marker text="body=" />
</text-translation>
#as you see whe have pre-marker node, and doesn't have post-marker node

then try to translate using systran
  
Actual results:
body=
translation text

Expected results:
translation text

Additional info:
from man libtranslate:
If  no  pre-marker element is specified, the translated text starts at the 
first  character  of  the  server response.
If no post-marker element is specified, the translated text ends at the last
character of the server response.

but this is not working :( i need simply skip first "body=" from server response

i think this is a bug in file modules/translate-generic-service.c in functinon
translate_generic_service_translate_text near construction           
if (work)
            {
              if (group->text_post_marker)
                {
                  char *s;

                  s = strstr(work, group->text_post_marker);

maybe i'll write patch later :)

Comment 1 Timon 2007-12-05 13:04:27 UTC
Created attachment 278261 [details]
solve this bug

Comment 2 Dmitry Butskoy 2007-12-06 15:58:28 UTC
Thanks

Comment 3 Fedora Update System 2007-12-07 21:30:38 UTC
libtranslate-0.99-11.fc8 has been pushed to the Fedora 8 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update libtranslate'

Comment 4 Fedora Update System 2007-12-07 21:30:47 UTC
libtranslate-0.99-11.fc7 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update libtranslate'


Note You need to log in before you can comment on or make changes to this bug.