fixing url translation issues in javascript files

This commit is contained in:
Adolfo Fitoria 2010-04-05 01:54:05 -06:00
parent d519c56071
commit 8822e0f2cf
2 changed files with 4 additions and 3 deletions

2
forum/skins/default/media/js/com.cnprog.i18n.js Normal file → Executable file
View File

@ -147,6 +147,8 @@ var i18nEs = {
'enter url':'introduzca direcciones web, ejemplo<br />http://www.cnprog.com/ \"titulo del enlace\"</p>"',
'upload image':'cargar imagen',
'questions/' : 'preguntas/',
'answers/' : 'respuestas/',
'comments/' : 'comentarios/',
'vote/' : 'votar/'
};

5
forum/skins/default/media/js/com.cnprog.post.js Normal file → Executable file
View File

@ -516,7 +516,7 @@ function createComments(type) {
var getComments = function(id, jDiv) {
//appendLoaderImg(id);
$.getJSON(scriptUrl + objectType + "s/" + id + "/" + $.i18n._("comments/"),
$.getJSON(scriptUrl + $.i18n._(objectType + "s/") + id + "/" + $.i18n._("comments/"),
function(json) { showComments(id, json); });
};
@ -575,10 +575,9 @@ function createComments(type) {
var formSelector = "#" + formId;
var textarea = $(formSelector + " textarea");
//todo fix url translations!!!
$.ajax({
type: "POST",
url: scriptUrl + objectType + "s/" + id + "/" + $.i18n._("comments/"),
url: scriptUrl + $.i18n._(objectType + "s/") + id + "/" + $.i18n._("comments/"),
dataType: "json",
data: { comment: textarea.val() },
success: function(json) {