This is really how the file looks like. My file was well formatted before importing it in pootle. The corruption happened while translating the file and I had to manually fix the ags to be able to continue translating with pootle.

It's been the second time I have XML corruption. I didn't find a way to make this bug reproducable, but it happens sometimes.
I attached the first error I got with the Korean language.

Thanks.

Le 23/03/2010 09:31, Alaa Abd El Fattah a écrit :
On Tue, 23 Mar 2010 09:18:43 -0500
Laurent Marchal<[email protected]>  wrote:

Hi,

      Here is another XML parsing error that happened while
translating, In French this time. Should I open a bug ?

_Line that caused the error:

<state="needs-review-translation"></><alt-trans xml:space="preserve"
I don't know if this is really how the file looks like of if something
got jumbled in email but it looks like<state>  tag is not closed and
there is an invalid</>  tag

maybe it should be<state="needs-review-translation" />  ?

cheers,
Alaa

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Translate-pootle mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/translate-pootle
--- Begin Message ---
   Hello,

       We started to translate our project (XLIFF files) in Korean, but this
   morming when I clicked on quick translate, I got a server error. It seems
   that the xml created has been corrupted by Pootle. I think the problems
   comes from a suggestion and not a translation.
   I use Pootle 2.0.3 with Translate Toolkit 1.6.0, and lxml 2.2.6
   Line that caused the error:
   <trans-unit id="CommonMachineDetails_MachineType" xml:space="preserve"
   approved="yes">
   <source xml:lang="en">Machine Type</source>
   <>호스트 종류</><alt-trans xml:space="preserve" 
origin="nobody"><target>호스트
   종류</target></alt-trans></trans-unit>
   Python traceback
   Traceback (most recent call last):
     File
   "/usr/lib/python2.5/site-packages/Django-1.1.1-py2.5.egg/django/core/handler
   s/base.py", line 92, in get_response
       response = callback(request, *callback_args, **callback_kwargs)
     File "/var/www/Pootle/local_apps/pootle_app/views/language/view.py", line
   56, in decorated_f
       return f(request, translation_project, *args, **kwargs)
     File "/var/www/Pootle/local_apps/pootle_app/views/language/view.py", line
   66, in decorated_f
       return f(request, translation_project, *args, **kwargs)
     File "/var/www/Pootle/local_apps/pootle_app/views/language/view.py", line
   203, in handle_file
       return handle_translation_file(request, translation_project, file_path)
     File "/var/www/Pootle/local_apps/pootle_app/views/language/view.py", line
   127, in handle_translation_file
        return  find_and_display(request,  store.parent, next_store_item,
   prev_store_item)
     File
   "/var/www/Pootle/local_apps/pootle_app/views/language/translate_page.py",
   line 846, in find_and_display
       return view(request, directory, store, item)
     File
   "/var/www/Pootle/local_apps/pootle_app/views/language/translate_page.py",
   line 871, in view
       items, translations, first_item = make_table(request, profile, store,
   item)
     File
   "/var/www/Pootle/local_apps/pootle_app/views/language/translate_page.py",
   line 594, in make_table
       editable, first_item, translations = get_translations(request, profile,
   store, item)
     File
   "/var/www/Pootle/local_apps/pootle_app/views/language/translate_page.py",
   line 161, in get_translations
       items = get_units(store, first_item, last_item)
     File
   "/var/www/Pootle/local_apps/pootle_app/views/language/translate_page.py",
   line 141, in get_units
           return    [store.file.store.units[index]    for    index    in
   store.file.total[max(item_start, 0):item_stop]]
     File "/var/www/Pootle/local_apps/pootle_store/fields.py", line 263, in
   _get_store
       self._update_store_cache()
     File "/var/www/Pootle/local_apps/pootle_store/fields.py", line 278, in
   _update_store_cache
          self._store_tuple   =   StoreTuple(factory.getobject(self.path,
   ignore=self.field.ignore), mod_info, self.realpath)
    File"/usr/lib/python2.5/site-packages/translate/storage/factory.py",line
   190, in getobject
       store = storeclass.parsefile(storefile)
     File "/usr/lib/python2.5/site-packages/translate/storage/base.py", line
   683, in parsefile
       newstore = cls.parsestring(storestring)
     File "/usr/lib/python2.5/site-packages/translate/storage/xliff.py", line
   637, in parsestring
       xliff = super(xlifffile, cls).parsestring(storestring)
     File "/usr/lib/python2.5/site-packages/translate/storage/base.py", line
   630, in parsestring
       newstore.parse(storestring)
     File "/usr/lib/python2.5/site-packages/translate/storage/lisa.py", line
   340, in parse
       self.document = etree.fromstring(xml, parser).getroottree()
       File   "lxml.etree.pyx",   line   2532,  in  lxml.etree.fromstring
   (src/lxml/lxml.etree.c:48634)
      File  "parser.pxi",  line  1545, in lxml.etree._parseMemoryDocument
   (src/lxml/lxml.etree.c:72245)
        File    "parser.pxi",    line   1424,   in   lxml.etree._parseDoc
   (src/lxml/lxml.etree.c:71106)
      File  "parser.pxi",  line  938, in lxml.etree._BaseParser._parseDoc
   (src/lxml/lxml.etree.c:67875)
     File "parser.pxi", line 539, in
   lxml.etree._ParserContext._handleParseResultDoc
   (src/lxml/lxml.etree.c:64257)
       File  "parser.pxi",  line  625,  in  lxml.etree._handleParseResult
   (src/lxml/lxml.etree.c:65178)
       File   "parser.pxi",   line  565,  in  lxml.etree._raiseParseError
   (src/lxml/lxml.etree.c:64521)
   XMLSyntaxError: StartTag: invalid element name, line 121, column 2
   Traceback (most recent call last):
     File
   "/usr/lib/python2.5/site-packages/Django-1.1.1-py2.5.egg/django/core/handler
   s/base.py", line 92, in get_response
       response = callback(request, *callback_args, **callback_kwargs)
     File "/var/www/Pootle/local_apps/pootle_app/views/language/view.py", line
   56, in decorated_f
       return f(request, translation_project, *args, **kwargs)
     File "/var/www/Pootle/local_apps/pootle_app/views/language/view.py", line
   66, in decorated_f
       return f(request, translation_project, *args, **kw[Tue Mar 09 17:13:56
   2010]
   Thanks.
   Laurent Marchal.

--- End Message ---
------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Translate-pootle mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/translate-pootle

Reply via email to