Limited length of strings

Limited length of strings

i le koen roggemans -
Number of replies: 3
Picture of Language pack maintainers

Just found out that [createtokenforuserauto,core_webservice]  can only be 40 characters long. It ends up in the field mdl_log.action and that is only 40 chars. The English phrase (Create a token for a user automatically) is 39 chars if I counted right.

If your string is longer then 40 chars, you end up with an error message via email like this:

Insert into log table failed at Sunday 02nd of September 2012 09:27:51 PM.
 It is possible that your disk is full.

The failed query parameters are:

array (
  'time' => 1346614071,
  'userid' => '5052',
  'course' => '1',
  'ip' => '91.177.224.235',
  'module' => 'webservice',
  'cmid' => 0,
  'action' => 'Maak automatisch een token voor een gebruiker',
  'url' => '',
  'info' => 'User ID: 5052',
)

In reply to koen roggemans

Tárgy: Limited length of strings

i le Károly Fábricz -

It is fine you, Koen, that you called our attention to this constraint.

Unfortunately, at present, AMOS does not offer a way to filter limitations on string length, so translators are never aware of any errors they may make. 

It would be nice, and perhaps not that difficult, if AMOS included a hint [perhaps in square brackets after the source string in the form of a number] indicating any constraints that are to be followed. No number - no constraint.

Karoly

 

In reply to koen roggemans

Re: Limited length of strings

i le David Mudrák -
Picture of Language pack maintainers
Grrr. That is indeed a stupid bug in the webservice logging facility. The 'action' in the mdl_log table should never contain translated strings, just action codes. Koen, can you please report this to the tracker. I believe that Jérôme will be happy to fix this. Thanks for spotting this!