Opened 10 years ago

Closed 8 years ago

#2696 closed defect (fixed)

Xgettext error

Reported by: RafaelOrtiz Owned by: RafaelOrtiz
Priority: High Milestone: Unspecified
Component: localization Version: Unspecified
Severity: Unspecified Keywords:
Cc: cjl, sascha_silbe Distribution/OS: Unspecified
Bug Status: Unconfirmed

Description

Potupdater (po updater) is failling for xgettext for some activities

ERROR - xgettext failed with return code 1.

This is preventing updates for .pots, of some activities.

specifically:

Arithmetic.
Record.
Gogo.
Maze.

Change History (9)

comment:1 Changed 10 years ago by RafaelOrtiz

  • Owner changed from alsroot to RafaelOrtiz
  • Status changed from new to assigned

comment:2 Changed 10 years ago by RafaelOrtiz

  • Component changed from Poll to untriaged

comment:3 Changed 10 years ago by sascha_silbe

I can reproduce some error with Record, though I'm not sure it's the same one since you didn't provide the actual error message. This is what I see:

(sugar-jhbuild1)sascha.silbe@twin:~/sugar-jhbuild/source/record$ ~/sugar-jhbuild/sugar-jhbuild run ./setup.py genpot
Warning: unknown distro version, automatic fallback to unstable.
/home/sascha.silbe/sugar-jhbuild/install/lib/python2.6/site-packages/sugar/bundle/activitybundle.py:175: DeprecationWarning: use exec instead of class in your activity.info
  'in your activity.info', DeprecationWarning)
model.py:153: warning: 'msgid' format string with unnamed arguments cannot be properly localized:
                       The translator cannot reorder the arguments.
                       Please consider using a format string with named arguments,
                       and a mapping instead of a tuple for the arguments.
model.py:361: warning: 'msgid' format string with unnamed arguments cannot be properly localized:
                       The translator cannot reorder the arguments.
                       Please consider using a format string with named arguments,
                       and a mapping instead of a tuple for the arguments.
xgettext: Non-ASCII string at network.py:547.
          Please specify the source encoding through --from-code.
ERROR - xgettext failed with return code 1.
(sugar-jhbuild1)sascha.silbe@twin:~/sugar-jhbuild/source/record$

Line 547 of network.py contains:

        pattern = "([\xf6-\xf7][\x80-\xbf]{0,2}|[\xe0-\xef][\x80-\xbf]{0,1}|[\xc0-\xdf])$"

Note that this is a byte string constant (not a unicode one) and there's no use of any translation related function on this line (and it doesn't get translated anywhere else in the code either). The non-ASCII bytes are fragments of UTF-8 sequences, so the byte string cannot be decoded to any sequence of characters, no matter what encoding.

Looks like an xgettext bug to me. Please report it upstream.

comment:4 Changed 10 years ago by RafaelOrtiz

Thanks for the follow-up, pogenerator is not so well trained for error outputs.yes this is the error I'm seeing also.

reporting upstream..

comment:6 Changed 10 years ago by cjl

  • Cc cjl added

comment:7 Changed 10 years ago by sascha_silbe

  • Cc sascha_silbe added
  • Component changed from untriaged to localization

comment:8 Changed 10 years ago by dsd

Regarding, the Record error reported above: network.py was only ever in the Record repo by accident. Removing it has now caused pootle to carry on updating the pot file as normal.

You will still have this issue for Arithmetic, Gogo and Maze. It would probably be worth verifying that it is the same error - xgettext choking on untranslated strings.

comment:9 Changed 8 years ago by godiard

  • Resolution set to fixed
  • Status changed from assigned to closed

The pending activities (Arithmetic, Gogo and Maze) do not show errors in Pootle log.

Clossing

Note: See TracTickets for help on using tickets.