Using AMOS tool for language pack translation

Limited length of strings

 
Picture of koen roggemans
Limited length of strings
by koen roggemans - Monday, 3 September 2012, 4:16 AM
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',
)

Picture of Károly Fábricz
Tárgy: Limited length of strings
by Károly Fábricz - Monday, 3 September 2012, 2:07 PM
Language pack maintainers

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

 

Picture of David Mudrák
Re: Limited length of strings
by David Mudrák - Monday, 3 September 2012, 8:49 PM
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!
Picture of koen roggemans
Re: Limited length of strings
by koen roggemans - Monday, 3 September 2012, 9:57 PM
Language pack maintainers

It was not the first time I was confronted with this. That's why I spotted it within the hour smile