Closed (fixed)
Project:
Localization server
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
27 Dec 2007 at 23:21 UTC
Updated:
9 May 2008 at 19:51 UTC
Jump to comment: Most recent file
Comments
Comment #1
gábor hojtsyThis might even be related to http://drupal.org/node/195421 although the error report is very vague there (and it was closed being totally without feedback).
Comment #2
meba commentedSource:
Comment #3
meba commentedJavaScript/AJAX don't like: quotes, newlines, carriage returns, tabs. Just escape them.
Comment #4
gábor hojtsyWhat if we reuse the same code as used by drupal_add_js() when we add the settings strings (ie. the edit buttons for the original strings and translations)? Even if it does not have reusable parts, we might still miss something here. Better to reuse that or steal from there as it is already proven to work :)
Comment #5
gábor hojtsyMeba? What do you think?
Comment #6
meba commentedWill look into this on Code Sprint...
Comment #7
meba commentedOK, found drupal_to_js().
Comment #8
gábor hojtsyHm, I applied this patch and found a few issues:
- drupal_to_js() generates the quotes on its own, so we should not
- escaping \0 just ends up as \\0 (through drupal_to_js()'s addslashes()), which is not useful to us at all, since it should be \O (uppercase "oh" letter!)
This way it works again on my system and can copy plural suggestions to the edit field again. With your patch, due to these two errors, it did not (or in fact the first error just added the quotes into the string, the second stopped it from working).
I committed this edition of the patch: http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/l10n_server...
Comment #9
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.