Ticket #1332 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

i18n IndexError exceptions

Reported by: dread Owned by:
Priority: minor Milestone:
Component: ckan Keywords:
Cc: havardfe@… Repository: ckan
Theme: none

Description (last modified by dread) (diff)

We get this i18n error for the URL http://no.ckan.net/authorizationgroup (which runs 1.4.2 with Norwegian translation). I'm not sure why it occurs. Fixing it is low importance though, because this site doesn't use Authorization Group feature

Usually caused by bots. The user does not appear to be logged in.

WebApp Error: <type 'exceptions.IndexError'>: list index out of range
...
Module genshi.filters.i18n:177 in _generate
<<                  msgbuf.append(*previous)
                       previous = None
                   for event in msgbuf.translate(gettext(msgbuf.format())):
                       yield event
                   if previous:
>>  for event in msgbuf.translate(gettext(msgbuf.format())):
Module genshi.filters.i18n:1029 in translate
<<                      )
       
               parts = parse_msg(string)
               parts_counter = {}
               for order, string in parts:
>>  parts = parse_msg(string)
Module genshi.filters.i18n:1143 in parse_msg
<<      if string:
               parts.append((stack[-1], string))
       
           return parts
>>  parts.append((stack[-1], string))
IndexError: list index out of range

Change History

comment:1 Changed 3 years ago by dread

  • Description modified (diff)

comment:2 Changed 3 years ago by dread

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

Fixed in cset:860b357a2aec for release 1.4.3 and updated no.ckan.net.

This problem was due to [1:authorization group] being translated as [autoriseringsgruppe] and I corrected it to [1:autoriseringsgruppe]. This word has a bold tag, hence the brackets and the number is used to identify which bracketed word is which (when you have more than one).

It is a shame that Transifex doesn't draw attention to this problem and Babel doesn't spot the error on compilation.

Note: See TracTickets for help on using tickets.