string translate

This commit is contained in:
Sanj 2012-03-12 11:49:05 +05:30
parent 8e8b356524
commit 9c19cee904
2 changed files with 3 additions and 2 deletions

View File

@ -16,7 +16,8 @@ $(function() {
'translation': val 'translation': val
}; };
$(this).data("original", val); $(this).data("original", val);
var url = trans.model == 'Translation' ? '/stringtranslate/' : '/dotrans/'; // var url = trans.model == 'Translation' ? '/stringtranslate/' : '/dotrans/';
var url = '/stringtranslate/';
var $post = $.post(url, data, function(response) { var $post = $.post(url, data, function(response) {
console.log(response); console.log(response);
}, "json"); }, "json");

View File

@ -16,7 +16,7 @@ urlpatterns = patterns('',
# for human translators # for human translators
(r'^trans/(?P<model>[A-Za-z].*?)/(?P<field>[A-Za-z].*?)/(?P<page_no>\d*)/', 'ships.views.translate'), (r'^trans/(?P<model>[A-Za-z].*?)/(?P<field>[A-Za-z].*?)/(?P<page_no>\d*)/', 'ships.views.translate'),
# (r'^dotrans/(?P<model>[A-Za-z].*?)/(?P<field>[A-Za-z].*?)/', 'ships.views.dotranslate'), (r'^dotrans/(?P<model>[A-Za-z].*?)/(?P<field>[A-Za-z].*?)/', 'ships.views.dotranslate'),
# for automated google translation # for automated google translation
(r'^googletranslate/(?P<model>[A-Za-z].*?)/(?P<field>[A-Za-z].*?)/', 'ships.views.googletranslate'), (r'^googletranslate/(?P<model>[A-Za-z].*?)/(?P<field>[A-Za-z].*?)/', 'ships.views.googletranslate'),