Pagina 1 di 1
File delle differenze
Inviato: venerdì 4 luglio 2008, 13:00
da cristian_c
Ciao,essendo sottoscrittore di un bug ho ricevuto questi due messaggi,incluso un file:
This bug was fixed in the package libtranslate - 0.99-0ubuntu5
---------------
libtranslate (0.99-0ubuntu5) intrepid; urgency=low
* debian/patches/05_systran.patch: allow use of systran again. Based on
patch from Dmitry Butskoy
* References
LP: #230027
http://savannah.nongnu.org/download/lib ... vices.diff
-- Jamie Strandboge Thu, 03 Jul 2008 13:30:39
-0400
** Changed in: libtranslate (Ubuntu)
Status: In Progress => Fix Released
--
libtranslate doesn't translate english/italian
https://bugs.launchpad.net/bugs/230027
You received this bug notification because you are a direct subscriber
of the bug.
Changing to libtranslate as that is where the problem lies.
** Changed in: libtranslate (Ubuntu)
Sourcepackagename: gnome-translate => libtranslate
Assignee: (unassigned) => Jamie Strandboge (jdstrand)
Status: Confirmed => In Progress
** Summary changed:
- gnome-translate doesn't translate english/italian
+ libtranslate doesn't translate english/italian
** Description changed:
- Binary package hint: gnome-translate
+ Binary package hint: libtranslate
I'm using Ubuntu 8.04
The gnome-translate version is 0.99-0ubuntu2
gnome-translate doesn't translate from English to Italian and if I start
the application with the terminal I can see the error:
(gnome-translate:7232): libtranslate-WARNING **: unable to translate
chunk using Babel Fish: unable to parse server data
(gnome-translate:7232): libtranslate-WARNING **: unable to translate
chunk using SYSTRAN: Not Found
--
libtranslate doesn't translate english/italian
https://bugs.launchpad.net/bugs/230027
You received this bug notification because you are a direct subscriber
of the bug.
il file in questione si chiama:libtranslate-0.99-services.diff
Come si usa?
Re: File delle differenze
Inviato: sabato 5 luglio 2008, 3:38
da crap0101
di solito basta fare così:
patch -p0 < file.diff
guarda
man patch
per le varie opzioni
Re: File delle differenze
Inviato: lunedì 7 luglio 2008, 12:57
da cristian_c
grazie della risposta.
Ho guardato il manuale alla voce patch, ma ancora non ho capito a cosa serve l'opzione p0
Re: File delle differenze
Inviato: lunedì 7 luglio 2008, 19:14
da crap0101
con p0 prende il path che c'è nel file senza modificarlo, mentre con numeri >= 1 li "estrude"
qui forse è spiegato meglio
http://www.cpqlinux.com/patch.html
EDIT:
o anche qui:
http://help.ubuntu-it.org/7.04/ubuntu/p ... rereq.html
Re: File delle differenze
Inviato: martedì 8 luglio 2008, 11:43
da cristian_c
dalla prima pagina linkata:
Levels in the Patch Command (-p0 or -p1?):
The -p option will optionally strip off directory levels from the patchfile. For Ex: if you have a patchfile with a header as such:
--- old/modules/pcitable Mon Sep 27 11:03:56 1999
+++ new/modules/pcitable Tue Dec 19 20:05:41 2000
Using a -p0 will expect, from your current working directory, to find a subdirectory called "new", then "modules" below that, then the "pcitable" file below that.
Using a -p1 will strip off the 1st level from the path and will expect to find (from your current working directory) a directory called "modules", then a file called "pcitable". Patch will ignore the "new" directory mentioned in the header of the patchfile.
Using a -p2 will strip of the first two levels from the path. Patch will expect to find "pcitable" in the current working directory. Patch will ignore the "new" and "modules" directories mentioned in the header of the patchfile.
Using a -p3 in this example would not be a good thing. Patch probably wouldn't patch anything.
non ho ancora capito come usare i livelli
Il mio file diff l'ho piazzato in ~/Scrivania e il suo nome esatto è: libtranslate-0.99-services.diff
Re: File delle differenze
Inviato: martedì 8 luglio 2008, 21:14
da crap0101
con la cartella dei sorgenti anche lei sulla scrivania:
marco@gNS:~/Desktop$ patch -p0 < libtranslate-0.99-services.diff
patching file libtranslate-0.99/data/services.xml.in
se invece hai il .deb puoi guardare qua:
http://guide.debianizzati.org/index.php ... tto_Debian
Re: File delle differenze
Inviato: mercoledì 9 luglio 2008, 19:54
da cristian_c
La cartella dei sorgenti e' quella evidenziata nei risultati della ricerca?
P.S. Non ho capito quella storia dei .deb
Re: File delle differenze
Inviato: mercoledì 16 luglio 2008, 22:20
da cristian_c
Per individuare la cartella dei sorgenti giusta,ho digitato il comando seguente ed ho avuto come risultato:
Codice: Seleziona tutto
cristiancozzolino@cristiancozzolino-laptop:~/Scrivania$ dpkg -l | grep libtranslate
ii gnome-translate 0.99-0ubuntu2 GNOME interface to libtranslate
ii libtranslate0 0.99-0ubuntu4 library for translating text and web pages
cristiancozzolino@cristiancozzolino-laptop:~/Scrivania$
Poi ho dato il comando che mi e' stato detto per la patch e che e' presente anche nel man alla voce patch,ma il risultato e' un po' diverso da come mi aspettavo (ovviamente ho messo la cartella libtranslate0 nella stessa ubicazione della patch)
Codice: Seleziona tutto
cristiancozzolino@cristiancozzolino-laptop:~/Scrivania$ patch -p0 < libtranslate-0.99-services.diff
can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -Nrbu libtranslate-0.99/data/services.xml.in libtranslate-0.99-OK/data/services.xml.in
|--- libtranslate-0.99/data/services.xml.in 2005-01-17 19:54:27.000000000 +0300
|+++ libtranslate-0.99-OK/data/services.xml.in 2007-12-10 15:09:25.000000000 +0300
--------------------------
File to patch:
Re: File delle differenze
Inviato: mercoledì 16 luglio 2008, 22:38
da crap0101
questo vuol dire che non è la cartella giusta (di solito). Però se sei sicuro che sia quella, non so...
ho provato scaricando il sorgente e il file diff, e funziona... ???
Re: File delle differenze
Inviato: giovedì 17 luglio 2008, 20:26
da cristian_c
questo vuol dire che non è la cartella giusta (di solito). Però se sei sicuro che sia quella, non so...
il problema e' che non c'e' un metodo per individuare la cartella giusta.Ho scelto quella tra le possibilita' in base al risultato del comando
dpkg -l | grep libtranslate.Come bisogna procedere in questi casi?
ho provato scaricando il sorgente e il file diff, e funziona... Huh?
Vorrei sapere di piu riguardo questa cosa.Ma strano,i file sono gli stessi!
E gli output li ho postati.
Re: File delle differenze
Inviato: giovedì 17 luglio 2008, 22:26
da crap0101
cristian_c ha scritto:
Vorrei sapere di piu riguardo questa cosa.Ma strano,i file sono gli stessi!
E gli output li ho postati.
di più in che senso?

comunque ho fatto così:
marco@gNS:~/Desktop$ patch -p0 < libtranslate-0.99-services.diff
patching file libtranslate-0.99/data/services.xml.in
marco@gNS:~/Desktop$
Re: File delle differenze
Inviato: venerdì 18 luglio 2008, 0:08
da cristian_c
ho provato scaricando il sorgente e il file diff, e funziona... Huh?
mi riferivo al fatto di aver scaricato il file sorgente oltre al file diff.
Re: File delle differenze
Inviato: lunedì 28 luglio 2008, 9:46
da cristian_c
@crap.
ho provato ancora ma ricevo degli errori.Che cosa devo fare per eliminarli?
Codice: Seleziona tutto
cristiancozzolino@cristiancozzolino-laptop:~$ cd /usr/share/libtranslate
cristiancozzolino@cristiancozzolino-laptop:/usr/share/libtranslate$ patch -p0 < libtranslate-0.99-services.diff
can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -Nrbu libtranslate-0.99/data/services.xml.in libtranslate-0.99-OK/data/services.xml.in
|--- libtranslate-0.99/data/services.xml.in 2005-01-17 19:54:27.000000000 +0300
|+++ libtranslate-0.99-OK/data/services.xml.in 2007-12-10 15:09:25.000000000 +0300
--------------------------
File to patch: services.xml
patching file services.xml
Hunk #1 FAILED at 73.
Hunk #2 FAILED at 126.
Hunk #3 FAILED at 154.
Hunk #4 FAILED at 162.
Hunk #5 FAILED at 182.
patch: **** Can't rename file services.xml to services.xml.orig : Permission denied
cristiancozzolino@cristiancozzolino-laptop:/usr/share/libtranslate$ sudo patch -p0 < libtranslate-0.99-services.diff
[sudo] password for cristiancozzolino:
can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -Nrbu libtranslate-0.99/data/services.xml.in libtranslate-0.99-OK/data/services.xml.in
|--- libtranslate-0.99/data/services.xml.in 2005-01-17 19:54:27.000000000 +0300
|+++ libtranslate-0.99-OK/data/services.xml.in 2007-12-10 15:09:25.000000000 +0300
--------------------------
File to patch: services.xml
patching file services.xml
Hunk #1 FAILED at 73.
Hunk #2 FAILED at 126.
Hunk #3 FAILED at 154.
Hunk #4 FAILED at 162.
Hunk #5 FAILED at 182.
5 out of 5 hunks FAILED -- saving rejects to file services.xml.rej
cristiancozzolino@cristiancozzolino-laptop:/usr/share/libtranslate$
Re: File delle differenze
Inviato: lunedì 28 luglio 2008, 13:48
da crap0101
bho! mi sembra giusto così, però pare proprio che non trova il file. L` unica spiegazione è che non ci sia veramente. Se non l' hai cancellato acidentalmente... non so. A sto punto potresti provare a reistallare la libreria origiale e applicarci subito la patch
Re: File delle differenze
Inviato: lunedì 28 luglio 2008, 14:22
da cristian_c
Purtroppo non ho cancellato niente.
Il dubbio che la libreria originale non ci fosse era venuto anche a me.Forse non c'e' mai stata.
Nella patch libtranslate-0.99-services.diff si fa riferimento in cima a:
diff -Nrbu libtranslate-0.99/data/services.xml.in libtranslate-0.99-OK/data/services.xml.in
--- libtranslate-0.99/data/services.xml.in 2005-01-17 19:54:27.000000000 +0300
+++ libtranslate-0.99-OK/data/services.xml.in 2007-12-10 15:09:25.000000000 +0300
L'unico file services.xml che ha a che fare con libtranslate si trova in /usr/share/libtranslate
Codice: Seleziona tutto
cristiancozzolino@cristiancozzolino-laptop:~$ cd /usr/share/libtranslate
cristiancozzolino@cristiancozzolino-laptop:/usr/share/libtranslate$ ls
libtranslate-0.99-services.diff services.xml services.xml.rej
services.dtd services.xml.orig
cristiancozzolino@cristiancozzolino-laptop:/usr/share/libtranslate$
i due file services.xml.orig e services.xml.rej sono comparsi dopo che ho provato a patchare, mentre il file .diff l'ho aggiunto io prima di provare ad applicare la patch.
Se puo essere utile, posto completamente il contenuto della patch:
Codice: Seleziona tutto
diff -Nrbu libtranslate-0.99/data/services.xml.in libtranslate-0.99-OK/data/services.xml.in
--- libtranslate-0.99/data/services.xml.in 2005-01-17 19:54:27.000000000 +0300
+++ libtranslate-0.99-OK/data/services.xml.in 2007-12-10 15:09:25.000000000 +0300
@@ -73,28 +73,34 @@
<language tag="ru" to="en"/>
<language tag="es" to="en,fr"/>
<language tag="sv" to="en"/>
- <http-header name="Referer" value="http://www.systransoft.com/"/>
- <text-translation url="http://www.systranbox.com/systran/box?systran_charset=utf-8&ttype=text&systran_text=${text:escape}&systran_lp=${from}_${to}">
- <pre-marker text="<textarea name="translation""/>
- <pre-marker text=">"/>
- <post-marker text="</textarea>"/>
+ <text-translation url="http://www2.systranbox.com/sai?gui=sbox/normal/systran/sboxEN&lp=${from}_${to}&service=translate" post="${text}">
+ <pre-marker text="body=
"/>
</text-translation>
- <web-page-translation url="http://www.systranbox.com/systran/box?systran_id=SystranSoft-en&systran_url=${url:escape}&systran_lp=${from}_${to}&systran_f=${time}"/>
+ <web-page-translation url="http://svsurl.systransoft.com/?trans=1&gui=sbox/normal/systran/systranEN&lp=${from}_${to}&loc_lang=en&path=systran/systranEN&frame=1&url=${url:escape}"/>
</group>
</service>
<service name="google" nick="Google">
<group>
<language tag="en" to="*"/>
- <language tag="fr" to="en,de"/>
+ <language tag="ar" to="en"/>
<language tag="de" to="en,fr"/>
+ <language tag="el" to="en"/>
+ <language tag="es" to="en"/>
+ <language tag="fr" to="en,de"/>
<language tag="it" to="en"/>
+ <language tag="ja" to="en"/>
+ <language tag="ko" to="en"/>
+ <language tag="nl" to="en"/>
<language tag="pt" to="en"/>
- <language tag="es" to="en"/>
+ <language tag="ru" to="en"/>
+ <language tag="zh" service-tag="zh-CN" to="en,zh-TW"/>
+ <language tag="zh-TW" to="zh"/>
<text-translation url="http://www.google.com/translate_t?text=${text:escape}&langpair=${from}|${to}&ie=utf8&oe=utf8">
- <pre-marker text="<textarea"/>
+ <pre-marker text="<div id="/>
+ <pre-marker text="result_box"/>
<pre-marker text=">"/>
- <post-marker text="</textarea>"/>
+ <post-marker text="</div>"/>
</text-translation>
<web-page-translation url="http://www.google.com/translate_c?u=${url:escape}&langpair=${from}|${to}"/>
</group>
@@ -120,29 +126,10 @@
<language tag="ru" service-tag="russian" to="en"/>
<text-translation url="http://ets6.freetranslation.com/?sequence=core&srctext=${text:escape}&language=${from}/${to}&charset=utf-8"/>
</group>
- </service>
-
- <service name="worldlingo" nick="WorldLingo">
<group>
- <language tag="en" to="*"/>
- <language tag="zh" service-tag="zh_cn" to="*"/>
- <language tag="zh-TW" service-tag="zh_tw" to="*"/>
- <language tag="nl" to="*"/>
- <language tag="fr" to="*"/>
- <language tag="de" to="*"/>
- <language tag="el" to="*"/>
- <language tag="it" to="*"/>
- <language tag="ja" to="*"/>
- <language tag="ko" to="*"/>
- <language tag="pt" to="*"/>
- <language tag="ru" to="*"/>
- <language tag="es" to="*"/>
- <text-translation url="http://www.worldlingo.com/wl/translate?wl_text=${text:escape}&wl_srclang=${from}&wl_trglang=${to}&wl_ucp=1">
- <pre-marker text="<textarea name="wl_result"/>
- <pre-marker text=">"/>
- <post-marker text="</textarea>"/>
- </text-translation>
- <web-page-translation url="http://www.worldlingo.com/wl/translate?wl_url=${url:escape}&wl_srclang=${from}&wl_trglang=${to}&wl_fl=2"/>
+ <language tag="en" service-tag="english" to="*"/>
+ <language tag="ja" service-tag="japanese" to ="en"/>
+ <text-translation url="http://tets9.freetranslation.com/?sequence=core&srctext=${text:escape}&language=${from}/${to}&charset=utf-8"/>
</group>
</service>
@@ -167,7 +154,7 @@
<language tag="uk" service-tag="Ukrainian" to="*"/>
<text-translation
url="http://www.1-800-translate.com/machine_trans/process_free_trans.asp"
- post="transfrom=${from}&transto=${to}&sourcetext=${text:escape}&expiredlang=no">
+ post="transfrom=${from}&transto=${to}&transtext=${text:escape}&expiredlang=no">
<pre-marker text="<textarea name="transresult"/>
<pre-marker text=">
"/>
<post-marker text="
</textarea>"/>
@@ -175,48 +162,6 @@
</group>
</service>
- <service name="tsunami" nick="Tsunami">
- <group>
- <language tag="ar" service-tag="AR"/>
- <language tag="bg" service-tag="BL" to="*"/>
- <language tag="zh" service-tag="ZH" to="*"/>
- <language tag="zh-TW" service-tag="ZH_TW" to="*"/>
- <language tag="hr" service-tag="CR" to="*"/>
- <language tag="cs" service-tag="CZ" to="*"/>
- <language tag="da" service-tag="DN" to="*"/>
- <language tag="nl" service-tag="NL" to="*"/>
- <language tag="en" service-tag="EN" to="*"/>
- <language tag="fi" service-tag="FI" to="*"/>
- <language tag="fr" service-tag="FR" to="*"/>
- <language tag="de" service-tag="DE" to="*"/>
- <language tag="el" service-tag="EL" to="*"/>
- <language tag="hu" service-tag="HN" to="*"/>
- <language tag="is" service-tag="IC" to="*"/>
- <language tag="it" service-tag="IT" to="*"/>
- <language tag="ja" service-tag="JA" to="*"/>
- <language tag="ko" service-tag="KO" to="*"/>
- <language tag="la" service-tag="LT" to="*"/>
- <language tag="no" service-tag="NW" to="*"/>
- <language tag="pl" service-tag="PO" to="*"/>
- <language tag="pt" service-tag="PT" to="*"/>
- <language tag="ro" service-tag="RO" to="*"/>
- <language tag="ru" service-tag="RU" to="*"/>
- <language tag="sr" service-tag="SB" to="*"/>
- <language tag="sk" service-tag="SL" to="*"/>
- <language tag="es" service-tag="ES" to="*"/>
- <language tag="sv" service-tag="SW" to="*"/>
- <language tag="tr" service-tag="TK" to="*"/>
- <language tag="cy" service-tag="WE" to="*"/>
- <text-translation url="http://www.translationbooth.com/tb/aojb/Tpl/freeTranslation/?textCheck=1&original=${text:escape}&srcLang=${from}&trgLang=${to}">
- <pre-marker text="<textarea name="original"/>
- <pre-marker text="<textarea"/>
- <pre-marker text=">"/>
- <post-marker text="</textarea>"/>
- <error-marker text=">Translation Server Busy, Please Retry.<"/>
- </text-translation>
- </group>
- </service>
-
<service name="kataku" nick="Kataku">
<group>
<language tag="en" to="*"/>
@@ -237,11 +182,30 @@
<group>
<language tag="en" service-tag="E" to="*"/>
<language tag="pap" service-tag="P" to="*"/>
- <text-translation url="http://www.donamaro.nl/papiamentu/index.php3?pAction=tradusi&pSel=${from}2${to}&pFrom=${text:charset=ISO8859-1,escape}">
- <pre-marker text="<TEXTAREA NAME="pTo""/>
+ <text-translation url="http://www.donamaro.nl/papiamentu/index.php?pAction=tradusi&pSel=${from}2${to}&pFrom=${text:charset=ISO8859-1,escape}">
+ <pre-marker text="<textarea name="pTo""/>
+ <pre-marker text=">"/>
+ <post-marker text="</textarea>"/>
+ </text-translation>
+ </group>
+ </service>
+
+ <service nick="PROMT Online-Translator" name="promt" max-chunk-len="450">
+ <group>
+ <language to="de,es,fr,pt,ru" tag="en" service-tag="e"/>
+ <language to="en,fr,es,ru" tag="de" service-tag="g"/>
+ <language to="de,en,fr,ru" tag="es" service-tag="s"/>
+ <language to="de,en,es,ru" tag="fr" service-tag="f"/>
+ <language to="en,ru" tag="it" service-tag="i"/>
+ <language to="en" tag="pt" service-tag="p"/>
+ <language to="de,en,es,fr" tag="ru" service-tag="r"/>
+ <text-translation url="http://www.online-translator.com/text.asp" post="lang=en&status=translate&source=${text:charset=windows-1251,escape}&direction=${from}${to}&template=General">
+ <pre-marker text="<div id="r_text"/>
<pre-marker text=">"/>
- <post-marker text="</TEXTAREA>"/>
+ <pre-marker text="
"/>
+ <post-marker text="</div>"/>
</text-translation>
+ <web-page-translation url="http://www.online-translator.com/url/tran_url.asp?lang=en&url=${url:escape}&$direction=${from}${to}&template=General&cp1=NO&cp2=NO&autotranslate=on"/>
</group>
</service>
</services>