mirror of
https://github.com/Hopiu/django-rosetta.git
synced 2026-03-16 21:30:24 +00:00
Stop loading jQuery from Google
This commit is contained in:
parent
636cbf6e76
commit
66268b4e57
3 changed files with 10 additions and 6 deletions
|
|
@ -10,13 +10,9 @@
|
|||
<style type="text/css" media="screen">
|
||||
{% include 'rosetta/css/rosetta.css' %}
|
||||
</style>
|
||||
<script src="//www.google.com/jsapi" type="text/javascript"></script>
|
||||
<script src="//code.jquery.com/jquery-1.12.4.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
//<!--
|
||||
google.load("jquery", "1.3");
|
||||
{% if rosetta_settings.ENABLE_TRANSLATION_SUGGESTIONS %}google.load("language", "1");{% endif %}
|
||||
{% include 'rosetta/js/rosetta.js' %}
|
||||
//-->
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
|||
|
|
@ -1,12 +1,14 @@
|
|||
{% load rosetta %}
|
||||
|
||||
google.setOnLoadCallback(function() {
|
||||
$(document).ready(function() {
|
||||
|
||||
$('.location a').show().toggle(function() {
|
||||
$('.hide', $(this).parent()).show();
|
||||
}, function() {
|
||||
$('.hide', $(this).parent()).hide();
|
||||
});
|
||||
|
||||
|
||||
{% if rosetta_settings.ENABLE_TRANSLATION_SUGGESTIONS %}
|
||||
|
||||
{% if rosetta_settings.AZURE_CLIENT_SECRET or rosetta_settings.GOOGLE_APPLICATION_CREDENTIALS_PATH %}
|
||||
|
|
@ -96,6 +98,7 @@ google.setOnLoadCallback(function() {
|
|||
origs=$(this).parents('tr').find('.original>.message').html().match(RX),
|
||||
trads=$(this).val().match(RX),
|
||||
error = $('<span class="alert">Unmatched variables</span>');
|
||||
|
||||
if (origs && trads) {
|
||||
for (var i = trads.length; i--;){
|
||||
var key = trads[i];
|
||||
|
|
|
|||
|
|
@ -33,3 +33,8 @@ msgid_plural ""
|
|||
"%(num_bottles)s bottles of beer on the wall\n"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
|
||||
#: templates/test.html:3
|
||||
msgid "We need %(num_bottles)s bottles!"
|
||||
msgstr ""
|
||||
|
|
|
|||
Loading…
Reference in a new issue