Easyling Release Notes - 2016 November
This post has not been updated in a long time. The information may be out of date.
November started off with our Halloween special (did you check the browser icon?), and carried with it several new enhancements to the Proxy’s processing ability. The Translation Proxy can now handle stringified JavaScript in other JSONs, we’ve reworded the crawl log attached to the emails, the Remote Cache can now be set to store images as well, and DELETE methods can be used through the proxy (with some caveats). See the full details after the jump!
JavaScript in JSONString
The Proxy’s ability to translate JavaScript variables and JSON responses to requests is nothing new. We’ve even had the ability to translate stringified JSONs. However, stringified JavaScript was only made possible by the recent deployment of the Flexible Content Pipeline that allows us to expand our processing abilities almost without limits.
Consider the following response:
<code id="highlighter">{
"plaintext":"test string please ignore",
"script":"var test = \"another test string please ignore\"; alert(test);"
}</code>
and the following JSONPaths:
<code id="highlighter">json.plaintext
json.script javascript
json.script.test</code>
The first rule is fairly obvious, it marks the given key as translatable. The second and third are, however, new. Much like the old html
switch, this changes the processing mode of the Translator, allowing the user to continue the path on the next line to select variables declared in the JS-code sent (in this case, the variable to be displayed in a popup).
Remote cache and images
Also nothing new is the Proxy’s ability to store the source site’s raw data and re-use it as the basis of translation. This feature is called the Source Cache. When the Source Cache was first created, it was restricted to only HTML, CSS, and JavaScript - image data was ignored entirely due to size constraints. Which led to potential unfortunate scenarios as the images were still subject to change or removal on the source server.
Not any more. We’ve implemented a method to cache images referenced on the pages the crawler visits as well, and re-use them during serving. Of course, this is still subject to the same size limitation as other resources that we can store. Also, the option is still in its public BETA phase - if you would like it activated on a project, please contact our support channel to have the option enabled.
HTTP DELETE
Method
The HTTP Specification declares a number of “methods” or “verbs” that can be used to designate the nature of a given request to the server, and are commonly used in client-facing portals. One such method is DELETE
, used to signal a request for removal of a resource. We have recently implemented our support for this method as well, allowing the proxying of client-facing portals (or at least, a wider range of websites) while preserving functionality.
There is an important caveat that needs to be mentioned, however: due to the limitations of the underlying infrastructure of Google AppEngine, transmitting the request payload on DELETE
requests is not supported! This means that while the request will be transmitted, it will have its payload stripped, which can lead to erroneous or undefined behavior in the remote server.
How can we assist you?
We are happy to help with your questions and concerns about your website localization project.
Book a 30-minutes consultancy meeting with our experts and ask your questions!