Common mistakes u prevodima
 
meka (592) #4623
12. apr. 06. 16:00
steveb, da li predlazes da cekamo? Zna li se otprilike koliko (developement nikad nije moguce vremenski oceniti, ali barem nesto okvirno)? Ako ne treba da cekamo, imam dve molbe. Prvo, da li bi jedan od vas dvojice (steveb, vec duze vreme pricas sa neysx-om dok nam je daniel vodja projekta) mogao da pita neysx-a da li da je greska ako mi prevedemo linkove? Drugo, da li da pravim error.xml?

daniel1988 (106) #4627
12. apr. 06. 18:37
@meka: čitaj 1. post, 2. citat. Linkovi se ne prevode.

@steveb: pretpostavljao sam da je to offline skripta - kad se doda novi file, sve se prođe kroz skriptu i najverovatnije sačuvaju promene. I tako uvek kad se doda nešto novo.
I nama treba jedna takva skripta ili da updateujemo fajlove iz Gentoo CVS-a.
Pošto si ti već diskutovao sa Xavierom o gorg-u, pošalji mu mail i pitaj ga koje su izmene u novom gorg-u (i kad će da ga doda u portage), da vidimo da li je rešen problem sa nepostojećim fajlom - u suprotnom da meka napravi error.xml.

poz

steveb (226) #4631
13. apr. 06. 00:07
To mi je Xavier napisao na Date: Tue, 21 Mar 2006 11:13:24 +0100 (moje pitanje je quoted):
> BTW2: Gorg is very sensitive to errors in the XML documents. When you
> use the or > id="whatever">whatever.xml and the file is not on the file
> system, then gorg is crashing with "child pid 28931 exit signal
> Segmentation fault (11)". Turning on debug information does not show
> what the reason is for the crash. It would be a nice option, if I could
> turn on a switch in gorg.conf to force gorg to check the existence of
> the file, before including it and when needed print out error statements
> in the log so that tracing down the error can be done more easy. I can
> imagine, that this would slow down gorg, but that was the reason I wrote
> about a option in gorg.conf. Like this the option can be enabled or
> disabled.

Gorg does not know the tag because it's a tag we made up like all
other GuideXML tags. Gorg does not know anything about guidexml at all because
that would tie it up with gentoo docs. It can apply any xsl to any xml, and it
uses libxslt/libxml2 for that.
I can't reproduce the segfault. Could be a problem in libxml2 itself?
You should get the following error as returned by libxml2:
"""
Internal Server Error
xmlErrMsg:failed to load external entity
"/home/neysx/gentoo.org/neysx.gentoo/tmp/htdocs/doc/fr/handbook/b-inst all-about.xml"
xmlErrLevel:1
xmlErrCode:1549
"""

I've tested gorg on various platforms: x86 (hardened and not), sparc, amd64,
hppa. It's ppc64 marked, so I suppose it works there too, I'll test it on my
PPC G3 in the coming months.

This happens when the document('file') XSL function is used and 'file' does
not exist. The standard says it's ok to either return an error or ignore it.
As AxKit (still used on 1 www.g.o node out of 3) returns a 500 error, I made
gorg do the same. I had thought about adding a parameter to ignore error 1549,
but it could be masked by another error. I'd have to investigate more deeply
in the libxml2 api and I'm not sure the xsl could test whether document()
returns nothing.
Until I can do better, next version of gorg will return "" when
libxml2 asks for a missing file. No more error and the xsl can test whether
the file exists. It's a bit hackish because I don't know that libxml2 is
asking for an xml file as a result of a document() call. All files are
requested the same way (catalog, xsl, dtd, main xml file, a document() call).


Kako vidite, on pise:
Until I can do better, next version of gorg will return "" when
libxml2 asks for a missing file.


Znaci je nabolje da cekamo, dok on to sredi.


Pozdrav

Stevan

meka (592) #4633
13. apr. 06. 11:47
daniele, ako ostavimo linkove da su .../en/... onda naš gorg nema smisla. Možeš pročitati index.xml i na svaki drugi link na koji klikneš će te baciti na englesku dokumentaciju. Zbog toga mislim da je bolje da se prevodi.

steveb (226) #4643
13. apr. 06. 22:49
Evo "simple" bash script za "mail handbook # for _xml in *.xml ; do for _link in $(sed -n "s:.*Fali za handbook-amd64.xml: hb-install-network.xml
Fali za handbook-amd64.xml: hb-install-stage.xml
Fali za handbook-amd64.xml: hb-install-config.xml
Fali za handbook-amd64.xml: hb-install-finalise.xml
Fali za handbook-amd64.xml: hb-install-next.xml
Fali za handbook-amd64.xml: hb-working-portage.xml
Fali za handbook-amd64.xml: hb-working-features.xml
Fali za handbook-amd64.xml: hb-working-rcscripts.xml
Fali za handbook-amd64.xml: hb-working-variables.xml
Fali za handbook-amd64.xml: hb-portage-files.xml
Fali za handbook-amd64.xml: hb-portage-configuration.xml
Fali za handbook-amd64.xml: hb-portage-branches.xml
Fali za handbook-amd64.xml: hb-portage-diverttree.xml
Fali za handbook-amd64.xml: hb-portage-ebuild.xml
Fali za handbook-amd64.xml: hb-net-start.xml
Fali za handbook-amd64.xml: hb-net-advanced.xml
Fali za handbook-amd64.xml: hb-net-modules.xml
Fali za handbook-amd64.xml: hb-net-wireless.xml
Fali za handbook-amd64.xml: hb-net-functions.xml
Fali za handbook-amd64.xml: hb-net-management.xml
Fali za handbook-x86.xml: hb-install-x86-medium.xml
Fali za handbook-x86.xml: hb-install-network.xml
Fali za handbook-x86.xml: hb-install-x86-disk.xml
Fali za handbook-x86.xml: hb-install-stage.xml
Fali za handbook-x86.xml: hb-install-x86-kernel.xml
Fali za handbook-x86.xml: hb-install-config.xml
Fali za handbook-x86.xml: hb-install-x86-bootloader.xml
Fali za handbook-x86.xml: hb-install-finalise.xml
Fali za handbook-x86.xml: hb-install-next.xml
Fali za handbook-x86.xml: hb-working-portage.xml
Fali za handbook-x86.xml: hb-working-features.xml
Fali za handbook-x86.xml: hb-working-rcscripts.xml
Fali za handbook-x86.xml: hb-working-variables.xml
Fali za handbook-x86.xml: hb-portage-files.xml
Fali za handbook-x86.xml: hb-portage-configuration.xml
Fali za handbook-x86.xml: hb-portage-branches.xml
Fali za handbook-x86.xml: hb-portage-diverttree.xml
Fali za handbook-x86.xml: hb-portage-ebuild.xml
Fali za handbook-x86.xml: hb-net-start.xml
Fali za handbook-x86.xml: hb-net-advanced.xml
Fali za handbook-x86.xml: hb-net-modules.xml
Fali za handbook-x86.xml: hb-net-wireless.xml
Fali za handbook-x86.xml: hb-net-functions.xml
Fali za handbook-x86.xml: hb-net-management.xml
mail handbook #



A za "for _xml in *.xml ; do for _link in $(sed -n "s:.*<\(\(book\|guide\)[ ]\)*link="\([^"]*\).*:\3:gIp" ${_xml}) ; do [[ "${_link:0:1}" == "/" ]] && _check="/var/www/vu-hosting/gentoo-srbija.org/htdocs.docs${_link}" || _check="${_link}" ; [[ ! -f "${_check}" ]] && echo "Fali za ${_xml}: ${_link}" ; done ; done


Promeni "/var/www/vu-hosting/gentoo-srbija.org/htdocs.docs" sa tvojim root gde je dokumentacia.


Pozdrav

Stevan

SticH (292) #4644
14. apr. 06. 00:11
Sve je to lepo ali mogao bi neko nesto i da prevede :)

Nemanja Jakovljevic (528) #4645
14. apr. 06. 00:31
Pa prevedi!

daniel1988 (106) #4650
14. apr. 06. 22:09
@meka: njima se šalje sve sa /en/, tako njima najviše odgovara, a za naš gorg - to je već druga stvar. A kako misliš to da prevodimo? Na svaki link koji naletiš treba da pogledaš da li je fajl preveden (ako ne znaš napamet) i da eventualno zameniš link. Pa recimo neki dokumnet alfa sadrži link beta koji još nije preveden. Kad prevedeš beta, treba da ponovo otvoriš doc alfa i da u njemu zameniš link. A kad link beta menja stvar i u dokumentima gama, pi i sigma, malo je zamorno sve otvarati i menjati.
Ili da zapisuješ koji se sve linkovi javljaju u svakom prevedenom dokumentu pa onda da vidiš iz toga - smor, a?
Zato kažem da nam treba skripta koje će da pogleda da li ima nekih izmena i da ukaže koji link je moguće promeniti. Ako ti imaš neku bolju ideju za linkove, reci?


@Nemanja: pa on najviše i prevodi :) A ja pregledavam sve prevode, tako da sad imam dosta posla i nemam vremena da išta prevodim; dok ne završim sa pregledavanjem.


@steveb: e upravo tako nešto sam i mislio (napisao bih i sam, ali ne znam bash scripting, bar za sada). Koliko vidim, ove skripte proveravaju koji fajlovi nedostaju, tj. šta je još potrebno prevesti da bi na određenoj stranici radili svi linkovi. Grešim li?
Probaj da napraviš tako da grabuje iz xml fajla sve linkove koje sadrže /en/ i da proveri da li postoji isti filename u .../trunk/doc/sr grani i da o tome obavesti - da kaže u kom xml fajlu se nalazi link koji je moguće izmeniti i na kojoj liniji koda se link nalazi.


---------------------------------------------------------------------- -----------------------------------
evo još informacija o greškama u prevodima:
1.
FYI: You shouldn't change any of or when you translate a doc.
They must remain the same as in the original document.

2.
Please leave the $header$ line as it is, it helps checking which file you have
actually translated. CVS will update the committed version automatically.


ima još i pod 3 - pogledaću u čemu je problem i javiću naknadno

daniel1988 (106) #5183
22. jul 06. 13:35
u mailu od neysx-a:
Please, pretty please, do not change the cvs tags (the xml comment with
$Header...$ or $Id...$) because that will confuse patch every time a change
occurs at the beginning.
I don't mind fixing a failed hunk once in a while, but not every time.

Tako da nemojte da mi dirate $Header$-e i $Id$-jeve; lakške mi je da napravim patch (ne moram da izgubim 10 min da nađem koja verzija fajla je zapravo prevedena, jer se tagovi Version i Date ne menju uvek...)

Na teme mogu odgovarati samo članovi. Morate biti prijavljeni ili se registrovati.