Re: xml2po Error !
- From: Karam Qubsi <karamqubsi gmail com>
- To: jwcampbell gmail com
- Cc: Shaun McCance <shaunm gnome org>, gnome-doc-devel-list gnome org
- Subject: Re: xml2po Error !
- Date: Sun, 22 Jul 2012 18:34:19 +0300
thank you all
I fixed this problem :)
but I'm facing with an other problem
I convert the xml to pot
and po for my lang
then I edited the po and try to convert it back to xml
first I convert it to mo by run the command
msgfmt mypofile.po
then it generate a mo file
I try to generate the xml file back from it by :
itstool -m mypofile.mo -o ar/ *.xml
but the result is :
Error: cannot open mo file mypofile.mo
and the file is exist and all permission is sets
so what is the problem ?
thanks :)
On Sat, Jul 21, 2012 at 1:32 AM, Karam Qubsi
<karamqubsi gmail com> wrote:
Thank you all
Thank you Jim
Thank you Shaun
I'm now using "itstool"
thank you to inform me about it
I follow the instruction in :
Extract
ITS Tool will scan your XML files and generate a POT (PO template) file. You can edit this file directory, or use tools like msgmerge to merge its messages into an existing PO file. To create a POT file, simply pass a list of XML files to itstool on the command line. By default, itstool simply outputs to standard output. Use the -o option to specify an output file.
For example, to generate a POT file called mydoc.pot from all the Mallard page files in a directory:
itstool -o mydoc.pot *.page
but as you can see in the terminal it gave me the following
what is the problem ?
# itstool -o mydoc.pot *.xml
Error: Could not parse document:
manual.xml:1961: parser error : Entity 'lsquo' not defined
<para>This preference allows for ‘Personal Name
^
manual.xml:1985: parser error : Entity 'lsquo' not defined
for ‘Personal Name Authorities' to replace authors as
^
manual.xml:1988: parser error : Entity 'lsquo' not defined
will only be used if ‘z3950NormalizeAuthor' is set to
^
manual.xml:1989: parser error : Entity 'ldquo' not defined
“Copy". The default field are 700, 701, and 702.</para>
^
manual.xml:2211: parser error : Entity 'ldquo' not defined
as “not for loan". Setting it to “Allow" would
^
manual.xml:2211: parser error : Entity 'ldquo' not defined
as “not for loan". Setting it to “Allow" would
^
manual.xml:2212: parser error : Entity 'ldquo' not defined
allow such items to be checked out, setting it to “Don't
^
manual.xml:2247: parser error : Entity 'ldquo' not defined
of times an item can be renewed. Setting it to “Allow"
^
manual.xml:2249: parser error : Entity 'ldquo' not defined
“Don't allow" would prevent this. This is a preference
^
manual.xml:2250: parser error : Entity 'ldquo' not defined
in which if it is set to “allow" it would allow the
^
manual.xml:2252: parser error : Entity 'ldquo' not defined
limit for special cases, setting it to “Don't allow"
^
manual.xml:2284: parser error : Entity 'ldquo' not defined
or not. If set to “Don't", the staff member checking an
^
manual.xml:2288: parser error : Entity 'ldquo' not defined
location) or returned. Setting it to “Do" will ensure
^
manual.xml:2617: parser error : Entity 'ldquo' not defined
this is set to “Require", then a due date of any checked
^
manual.xml:2619: parser error : Entity 'ldquo' not defined
patron's card expiration. If the setting is left “Don't
^
manual.xml:2818: parser error : Entity 'ldquo' not defined
calendar and mark certain days as “holidays" ahead of
^
manual.xml:2912: parser error : Entity 'ldquo' not defined
marked as “damaged" (items are marked as damaged by
^
manual.xml:2914: parser error : Entity 'ldquo' not defined
“Don't allow" will prevent anyone from placing a hold on
^
manual.xml:2915: parser error : Entity 'ldquo' not defined
such items, setting it to “Allow" will allow it. This
^
manual.xml:2919: parser error : Entity 'ldquo' not defined
library may wish to set this to “Don't allow" if they
^
manual.xml:2922: parser error : Entity 'ldquo' not defined
beyond repair). Setting it to “Allow" would allow a
^
manual.xml:2956: parser error : Entity 'ldquo' not defined
Setting this value to “Don't allow" will prevent anyone
^
manual.xml:2957: parser error : Entity 'ldquo' not defined
from overriding, setting it to “Allow" will allow it.
^
manual.xml:2960: parser error : Entity 'ldquo' not defined
“Allow", exceptions can be made for patrons who are
^
manual.xml:2963: parser error : Entity 'ldquo' not defined
it is set to “Don't allow", no abuse of the system is
^
manual.xml:2996: parser error : Entity 'ldquo' not defined
currently checked out. Setting it to “Don't allow"
^
manual.xml:2999: parser error : Entity 'ldquo' not defined
in the library), setting it to “Allow" allows borrowers
^
manual.xml:3005: parser error : Entity 'ldquo' not defined
from home through the OPAC. Setting it to “Don't allow"
^
manual.xml:3059: parser error : Entity 'ldquo' not defined
If the preference is set to “Allow" patrons can place
^
manual.xml:3060: parser error : Entity 'ldquo' not defined
such holds, if it is set to “Don't allow" they cannot.
^
manual.xml:3066: parser error : Entity 'ldquo' not defined
“Don't allow".</para>
^
manual.xml:3357: parser error : Entity 'lsquo' not defined
<para>This preference refers to ‘item specific' holds
^
manual.xml:3359: parser error : Entity 'lsquo' not defined
preference allows a library to decide whether an ‘item
^
manual.xml:3360: parser error : Entity 'ldquo' not defined
specific' hold is marked as “Waiting" at the time the
^
manual.xml:3362: parser error : Entity 'ldquo' not defined
“Waiting" after the item is checked in. This preference
^
manual.xml:3363: parser error : Entity 'lsquo' not defined
will tell the patron that their item is ‘Waiting' for
^
manual.xml:3392: parser error : Entity 'ldquo' not defined
If the RandomizeHoldsQueueWeight is set as “in random
^
manual.xml:3528: parser error : Entity 'ldquo' not defined
the circulation input field. Setting it to “Try" would
^
manual.xml:3531: parser error : Entity 'ldquo' not defined
completing it. Setting it to “Don't try" would disable
^
manual.xml:3893: parser error : Entity 'ldquo' not defined
circumstance. The “Allow" setting would allow for this
^
manual.xml:3894: parser error : Entity 'ldquo' not defined
option to be utilized by staff, the “Don't allow"
^
manual.xml:4358: parser error : Entity 'ldquo' not defined
OPAC; the 'FRBRizeEditions' option must be turned “On"
^
manual.xml:4972: parser error : Entity 'egrave' not defined
<title>Babelthèque</title>
^
manual.xml:4982: parser error : Entity 'egrave' not defined
citations) from Babelthèque in item detail pages on the
^
manual.xml:5014: parser error : Entity 'egrave' not defined
<screeninfo>Data from Babelthèque on the bib
^
manual.xml:5114: parser error : Entity 'ldquo' not defined
“My Library Bookstore." In order to participate in this
^
manual.xml:5127: parser error : Entity 'ldquo' not defined
the URL. The “key" value (key=) should be appended to
^
manual.xml:5156: parser error : Entity 'eacute' not defined
paid subscription to the external Content Café service
^
manual.xml:5158: parser error : Entity 'eacute' not defined
library's Content Café username and password. Also,
^
manual.xml:5163: parser error : Entity 'eacute' not defined
settings are properly set. The Content Café service is
^
manual.xml:5252: parser error : Entity 'ldquo' not defined
<para>Set to 'Use' to display an “Editions" tab on the
^
manual.xml:5641: parser error : Entity 'ldquo' not defined
<para>Set to 'Use' to display an “Editions" tab on the
^
manual.xml:6938: parser error : Entity 'ldquo' not defined
“Don't show," the lost item is not shown on the OPAC. By
^
manual.xml:6939: parser error : Entity 'ldquo' not defined
setting the value “Show," the lost item is shown on the
^
manual.xml:7495: parser error : Entity 'ldquo' not defined
users. When this preference is switched to “Show" the
^
manual.xml:8034: parser error : Entity 'lsquo' not defined
‘opaclayoutstylesheet' or ‘opacstylesheet'. Styles
^
manual.xml:8034: parser error : Entity 'lsquo' not defined
‘opaclayoutstylesheet' or ‘opacstylesheet'. Styles
^
manual.xml:8296: parser error : Entity 'ldquo' not defined
preference to “Allow" patrons can use this search link
^
manual.xml:8629: parser error : Entity 'ldquo' not defined
show the “Most Popular" link at the top of the OPAC
^
manual.xml:8630: parser error : Entity 'ldquo' not defined
under the search box. The “Most Popular" page shows the
^
manual.xml:8747: parser error : Entity 'ldquo' not defined
to “Allow" reviews are first sent to the staff client
^
manual.xml:9332: parser error : Entity 'ldquo' not defined
their system. If the preference is set to “Don't allow"
^
manual.xml:9334: parser error : Entity 'ldquo' not defined
On the “Home" screen of the OPAC users have the choice
^
manual.xml:9336: parser error : Entity 'ldquo' not defined
preference to “Allow" will display only one branch's
^
manual.xml:10372: parser error : Entity 'ldquo' not defined
example, a search for the word “invent" with auto
^
manual.xml:10376: parser error : Entity 'ldquo' not defined
manually by adding an asterisk (*). Typing “invent*"
^
manual.xml:10410: parser error : Entity 'ldquo' not defined
<para>This preference enables “fuzzy" searching, in
^
manual.xml:11217: parser error : Entity 'ldquo' not defined
enabled or disabled for the library. When set to “Add",
^
manual.xml:11330: parser error : Entity 'lsquo' not defined
‘brief' option displays a one-line summary of the volume
^
manual.xml:11332: parser error : Entity 'lsquo' not defined
library. The ‘full' option displays a more detailed
^
manual.xml:12090: parser error : Entity 'lsquo' not defined
‘participants': Data Providers and Service Providers.
^
manual.xml:16833: parser error : Entity 'pound' not defined
ilization" by Harrison, John B, 909.09821 H2451, Barcode: 08030003 Fine: £
^
manual.xml:16834: parser error : Entity 'pound' not defined
es, Carlton Joseph Huntley, 909.09821 H3261 v.1, Barcode: 08030004 Fine: £
^
manual.xml:25338: parser error : Entity 'nbsp' not defined
item. Learn more about Analytics in Chapter 13 of AACR2.</para>
^
manual.xml:35914: parser error : Entity 'lsquo' not defined
marked as ‘not for loan'</para>
^
manual.xml:35937: parser error : Entity 'lsquo' not defined
‘Calculate and Charge' before go live if you charge
^
manual.xml:36844: parser error : Entity 'egrave' not defined
linkend="Babelthequeprefs">Babelthèque</link></para>
^
manual.xml:36848: parser error : Entity 'egrave' not defined
<para>This is a pay service. Contact Babelthèque to learn
^
manual.xml:37101: parser error : Entity 'eacute' not defined
<firstname>Jean-André</firstname>
^
manual.xml:38648: parser error : Entity 'eacute' not defined
<subfield code="a">Guide des récifs coralliens / A Guide to Coral R
^
manual.xml:38649: parser error : Entity 'eacute' not defined
<subfield code="b">Texte imprimé</subfield>
^
manual.xml:38656: parser error : Entity 'eacute' not defined
<subfield code="c">Delachaux et Niestlé</subfield>
^
manual.xml:39008: parser error : Entity 'infin' not defined
ogue/search.pl?op=do_search{&q=461t&idx=ti}">{461t}</a>{N&infin
^
manual.xml:39135: parser error : Entity 'nbsp' not defined
{995y}</td><td>{995e} </td><td>
^
manual.xml:39135: parser error : Entity 'nbsp' not defined
{995y}</td><td>{995e} </td><td>
^
manual.xml:40597: parser error : Entity 'nbsp' not defined
<para>To prepend data the special character is: ^b To simply
^
manual.xml:41410: parser error : Entity 'ldquo' not defined
just returns a little message that says “renewal failed". Any
^
manual.xml:42125: parser error : Entity 'lsquo' not defined
between a keyword search using the ‘*’ (asterisk) versus
^
manual.xml:42125: parser error : Entity 'rsquor' not defined
between a keyword search using the ‘*’ (asterisk) versus
^
manual.xml:42126: parser error : Entity 'lsquo' not defined
a keyword search using the ‘%’ (percent)? Both work in
^
manual.xml:42126: parser error : Entity 'rsquor' not defined
a keyword search using the ‘%’ (percent)? Both work in
^
manual.xml:42132: parser error : Entity 'lsquo' not defined
in Koha searches are the asterisk (‘*’) and the percent
^
manual.xml:42132: parser error : Entity 'rsquor' not defined
in Koha searches are the asterisk (‘*’) and the percent
^
manual.xml:42133: parser error : Entity 'lsquo' not defined
sign (‘%’). However, these two characters act differently
^
manual.xml:42133: parser error : Entity 'rsquor' not defined
sign (‘%’). However, these two characters act differently
^
manual.xml:42136: parser error : Entity 'lsquo' not defined
<para>The ‘*’ is going to force a more exact search of
^
manual.xml:42136: parser error : Entity 'rsquor' not defined
<para>The ‘*’ is going to force a more exact search of
^
manual.xml:42137: parser error : Entity 'lsquo' not defined
the first few characters you enter prior to the ‘*’. The
^
manual.xml:42137: parser error : Entity 'rsquor' not defined
the first few characters you enter prior to the ‘*’. The
^
manual.xml:42144: parser error : Entity 'lsquo' not defined
<para>The ‘%’ will treat the words you enter in the terms
^
manual.xml:42144: parser error : Entity 'rsquor' not defined
<para>The ‘%’ will treat the words you enter in the terms
^
manual.xml:42145: parser error : Entity 'ldquo' not defined
of “is like”. So a search of Smi% will search for words
^
manual.xml:42145: parser error : Entity 'rdquor' not defined
of “is like”. So a search of Smi% will search for words
^
manual.xml:42151: parser error : Entity 'lsquo' not defined
<para>The bottom line in searching with wildcards: ‘*’ is
^
manual.xml:42151: parser error : Entity 'rsquor' not defined
<para>The bottom line in searching with wildcards: ‘*’ is
^
manual.xml:42152: parser error : Entity 'lsquo' not defined
more exact while ‘%’ searches for like terms.</para>
^
manual.xml:42152: parser error : Entity 'rsquor' not defined
more exact while ‘%’ searches for like terms.</para>
^
manual.xml:42356: parser error : Entity 'nbsp' not defined
truncate session table: </para>
^
manual.xml:42585: parser error : Entity 'copy' not defined
<para>Copyright © 2007 Free Software Foundation, Inc. <ulink
^
manual.xml:42600: parser error : Entity 'mdash' not defined
program—to make sure it remains free software for all its users. We,
^
manual.xml:42661: parser error : Entity 'ldquo' not defined
<para>“This License" refers to version 3 of the
^
manual.xml:42664: parser error : Entity 'ldquo' not defined
<para>“Copyright" also means copyright-like laws that apply to other
^
manual.xml:42667: parser error : Entity 'ldquo' not defined
<para>“The Program" refers to any copyrightable work licensed under
^
manual.xml:42668: parser error : Entity 'ldquo' not defined
this License. Each licensee is addressed as “you". “Licensees"
^
manual.xml:42668: parser error : Entity 'ldquo' not defined
this License. Each licensee is addressed as “you". “Licensees"
^
manual.xml:42669: parser error : Entity 'ldquo' not defined
and “recipients" may be individuals or organizations.</para>
^
manual.xml:42671: parser error : Entity 'ldquo' not defined
<para>To “modify" a work means to copy from or adapt all or part of
^
manual.xml:42673: parser error : Entity 'ldquo' not defined
making of an exact copy. The resulting work is called a “modified
^
manual.xml:42674: parser error : Entity 'ldquo' not defined
version" of the earlier work or a work “based on" the earlier
^
manual.xml:42677: parser error : Entity 'ldquo' not defined
<para>A “covered work" means either the unmodified Program or a work
^
manual.xml:42680: parser error : Entity 'ldquo' not defined
<para>To “propagate" a work means to do anything with it that,
^
manual.xml:42687: parser error : Entity 'ldquo' not defined
<para>To “convey" a work means any kind of propagation that enables
^
manual.xml:42692: parser error : Entity 'ldquo' not defined
<para>An interactive user interface displays “Appropriate Legal
^
manual.xml:42703: parser error : Entity 'ldquo' not defined
<para>The “source code" for a work means the preferred form of the
^
manual.xml:42704: parser error : Entity 'ldquo' not defined
work for making modifications to it. “Object code" means any
^
manual.xml:42707: parser error : Entity 'ldquo' not defined
<para>A “Standard Interface" means an interface that either is an
^
manual.xml:42712: parser error : Entity 'ldquo' not defined
<para>The “System Libraries" of an executable work include anything,
^
manual.xml:42718: parser error : Entity 'ldquo' not defined
“Major Component", in this context, means a major essential
^
manual.xml:42723: parser error : Entity 'ldquo' not defined
<para>The “Corresponding Source" for a work in object code form
^
manual.xml:42815: parser error : Entity 'ldquo' not defined
This requirement modifies the requirement in section 4 to “keep
^
manual.xml:42841: parser error : Entity 'ldquo' not defined
“aggregate" if the compilation and its resulting copyright are not
^
manual.xml:42912: parser error : Entity 'ldquo' not defined
<para>A “User Product" is either (1) a “consumer product",
^
manual.xml:42912: parser error : Entity 'ldquo' not defined
<para>A “User Product" is either (1) a “consumer product",
^
manual.xml:42917: parser error : Entity 'ldquo' not defined
For a particular product received by a particular user, “normally
^
manual.xml:42925: parser error : Entity 'ldquo' not defined
<para>“Installation Information" for a User Product means any
^
manual.xml:42961: parser error : Entity 'ldquo' not defined
<para>“Additional permissions" are terms that supplement the terms
^
manual.xml:43019: parser error : Entity 'ldquo' not defined
“further restrictions" within the meaning of section 10. If the
^
manual.xml:43085: parser error : Entity 'ldquo' not defined
<para>An “entity transaction" is a transaction transferring control
^
manual.xml:43105: parser error : Entity 'ldquo' not defined
<para>A “contributor" is a copyright holder who authorizes use under
^
manual.xml:43107: parser error : Entity 'ldquo' not defined
work thus licensed is called the contributor's “contributor
^
manual.xml:43110: parser error : Entity 'ldquo' not defined
<para>A contributor's “essential patent claims" are all patent
^
manual.xml:43116: parser error : Entity 'ldquo' not defined
definition, “control" includes the right to grant patent sublicenses
^
manual.xml:43124: parser error : Entity 'ldquo' not defined
<para>In the following three paragraphs, a “patent license" is any
^
manual.xml:43127: parser error : Entity 'ldquo' not defined
to sue for patent infringement). To “grant" such a patent license to
^
manual.xml:43139: parser error : Entity 'ldquo' not defined
recipients. “Knowingly relying" means you have actual knowledge
^
manual.xml:43153: parser error : Entity 'ldquo' not defined
<para>A patent license is “discriminatory" if it does not include
^
manual.xml:43207: parser error : Entity 'ldquo' not defined
<acronym>GNU</acronym> General Public License “or any later version"
^
manual.xml:43229: parser error : Entity 'ldquo' not defined
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS" WITHOUT
^
manual.xml:43272: parser error : Entity 'ldquo' not defined
“copyright" line and a pointer to where the full notice is
^
manual.xml:43302: parser error : Entity 'lsquo' not defined
This program comes with ABSOLUTELY NO WARRANTY; for details type ‘<literal
^
manual.xml:43304: parser error : Entity 'lsquo' not defined
under certain conditions; type ‘<literal>show c</literal>' for details.
^
manual.xml:43307: parser error : Entity 'lsquo' not defined
<para>The hypothetical commands ‘<literal>show w</literal>' and
^
manual.xml:43308: parser error : Entity 'lsquo' not defined
‘<literal>show c</literal>' should show the appropriate parts of the
^
manual.xml:43310: parser error : Entity 'ldquo' not defined
different; for a GUI interface, you would use an “about box".</para>
^
manual.xml:43313: parser error : Entity 'ldquo' not defined
school, if any, to sign a “copyright disclaimer" for the program, if
^
I'm using itstool 1.2.0
on debian
and the xml file is docbook file
and its attached in this email :)
--
Karam Qubsi
Koha Arab Translating Team
http://koha.wikibrary.org/Wikibrary for Arab Librarians
http://wikibrary.org
On Wed, Jul 18, 2012 at 8:29 PM, Shaun McCance
<shaunm gnome org> wrote:
On Wed, 2012-07-18 at 10:42 +0300, Karam Qubsi wrote:
> Hi All ,
>
>
> I don't know what is the problem
>
>
> I installed the gnome docs utilities
> and the process of generating the pot and po files from the xml
> (docbook) is done successfully
>
>
> but when try to convert the po to xml !
Hi Karam,
This looks like a problem with the po file, though I can't
be sure without looking at it. Can you run msgfmt on the
po file without errors?
Also, xml2po isn't actively developed anymore. You should
try using itstool instead.
http://itstool.org/
> from termenal :
> xml2po -p manual.ar.po -o manual.ar.xml manual.xml
>
>
> the resulte :
> Traceback (most recent call last):
> File "/usr/bin/xml2po", line 191, in <module>
> main(sys.argv[1:])
> File "/usr/bin/xml2po", line 174, in main
> xml2po_main.merge(mofile, filenames[0])
> File "/usr/lib/python2.7/dist-packages/xml2po/__init__.py", line
> 601, in merge
>
self.gt = gettext.GNUTranslations(mfile)
> File "/usr/lib/python2.7/gettext.py", line 180, in __init__
> self._parse(fp)
> File "/usr/lib/python2.7/gettext.py", line 314, in _parse
> plural = v[1].split('plural=')[1]
> IndexError: list index out of range
>
> So please HELP About this issue
>
>
> we are trying to make manuals of koha translatable
>
>
> koha is an Open source software for library systems
>
>
>
>
> Thanks A lot :)
>
>
> --
> Karam.
>
>
> _______________________________________________
> gnome-doc-devel-list mailing list
> gnome-doc-devel-list gnome org
> https://mail.gnome.org/mailman/listinfo/gnome-doc-devel-list
--
Karam Qubsi
Koha Arab Translating Team
http://koha.wikibrary.org/
Wikibrary for Arab Librarians
http://wikibrary.org
--
Karam Qubsi
Koha Arab Translating Team
http://koha.wikibrary.org/Wikibrary for Arab Librarians
http://wikibrary.org
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]