Gramex now has a test framework. This automates Gramex apps testing.
$.translate() from g1 makes it easy to translate any content in a page. For example:
<ul>
<li lang-target="de">This is translated into <em>German</em></li>
<li lang-target="nl">This is translated into <em>Dutch</em></li>
</ul>
<script>
$("[lang-target]").translate({ url: "./translate" });
</script>
… renders:
Gramex translate auto-detects the source languages if you
leave the source
blank. This helps when the source data has multiple languages
(e.g. customer survey responses) and needs to be translated.
A few bugs have been fixed.
FontAwesome 5 free is now available, in addition to
FontAwesome 4. FontAwesome 5 is the new
default in gramex init
. To use it:
<link
rel="stylesheet"
href="ui/@fortawesome/fontawesome-free/css/all.min.css"
/>
UI components now support:
.ls-1
, .ls-2
, etc.lh-1
, .lh-2
, etc.The new UI theme picker looks like this:
g1 is upgraded from 0.12 to 0.13. This release features:
$.dropdown
which supports objects with different names and valuesThe encrypt:
service is no longer used. Gramex internally uses Tornado signed
values for encryption instead.
The encrypt:
service provided a way for Gramex services to share secret
information. For example, between CaptureHandler and the page, or between alerts
and CaptureHandler. This used RSA private keys. But this is a complex mechanism.
Instead, we now use Tornado’s built-in mechanism that uses the cookie_secret
setting in the application.
?x=%f4
) are ignoredTo upgrade Gramex, run:
pip install --verbose gramex==1.50
gramex setup --all # Set up UI components, puppeteer, etc