Bug 411861 - wrong libtranslate behavior
wrong libtranslate behavior
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: libtranslate (Show other bugs)
8
All Linux
low Severity medium
: ---
: ---
Assigned To: Dmitry Butskoy
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-12-05 06:51 EST by Timon
Modified: 2007-12-10 07:04 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-12-10 07:04:25 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Timon 2007-12-05 06:51:13 EST
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 08:04:27 EST
Created attachment 278261 [details]
solve this bug
Comment 2 Dmitry Butskoy 2007-12-06 10:58:28 EST
Thanks
Comment 3 Fedora Update System 2007-12-07 16:30:38 EST
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 16:30:47 EST
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.