diff -r 213e81430f7a -r 1b84c7b2aeee integration/js/editor.js --- a/integration/js/editor.js Tue Dec 04 13:31:01 2012 +0100 +++ b/integration/js/editor.js Tue Dec 04 18:59:07 2012 +0100 @@ -14,22 +14,22 @@ '
  • ' + '<%= title %>' + '

    <%= title %>

    <%= description %>

    ' - + '

    <%= IriSP.translate("Duration:") %> <%= duration.toString() %>

  • ' + + '

    <%= gettext("Duration:") %> <%= duration.toString() %>

    ' ), segmenttemplate = _.template( '
  • ' + '<%= annotation.getMedia().title %>' + '
    • <%= annotation.status_messages.join("
    • ") %>

    <%= annotation.getMedia().title %>

    ' + '

    <%= annotation.title %>

    <%= annotation.begin.toString() %> - <%= annotation.end.toString() %> (<%= annotation.getDuration().toString() %>)

    ' - + '
  • ' + + '' ), mediasegmenttemplate = _.template( '
    ' + '
    ' + '
    ' - + '

    <%= annotation.title %>

    <%= IriSP.translate("Clone segment") %>' - + '

    <%= IriSP.translate("From:") %> <%= annotation.begin.toString() %> <%= IriSP.translate("to:") %> <%= annotation.end.toString() %> (<%= IriSP.translate("duration:") %> <%= annotation.getDuration().toString() %>)

    ' + + '

    <%= annotation.title %>

    <%= gettext("Clone segment") %>' + + '

    <%= gettext("From:") %> <%= annotation.begin.toString() %> <%= gettext("to:") %> <%= annotation.end.toString() %> (<%= gettext("duration:") %> <%= annotation.getDuration().toString() %>)

    ' + '
    ' ), mediasegmentlisttemplate = _.template( @@ -38,7 +38,7 @@ mediafoundtemplate = _.template( '
    ' + '
    ' ), mediafoundlisttemplate = _.template( @@ -59,19 +59,19 @@ validate: function(_s) { return (_s.getDuration() >= 1000); }, - message: "A segment must be at least one second long" + message: gettext("A segment must be at least one second long") }, { validate: function(_s) { return (_s.getDuration() < 180000); }, - message: "A segment must be at most three minutes long" + message: gettext("A segment must be at most three minutes long") }, { validate: function(_s) { - return (!!_s.title && _s.title !== IriSP.translate("Untitled segment")); + return (!!_s.title && _s.title !== gettext("Untitled segment")); }, - message: "A segment must have a title" + message: gettext("A segment must have a title") } ]; var segmentwarning = [ @@ -79,13 +79,13 @@ validate: function(_s) { return (!!_s.description); }, - message: "A segment should have a description" + message: gettext("A segment should have a description") }, { validate: function(_s) { return (!!_s.keywords.length); }, - message: "A segment should have tags" + message: gettext("A segment should have tags") } ]; @@ -94,13 +94,13 @@ validate: function(_m) { return _m.segments.length > 2; }, - message: "A hashcut must be made from at least three segments" + message: gettext("A hashcut must be made from at least three segments") }, { validate: function(_m) { - return (!!_m.title && _m.title !== IriSP.translate("Untitled Hashcut")); + return (!!_m.title && _m.title !== gettext("Untitled Hashcut")); }, - message: "A hashcut must have a title" + message: gettext("A hashcut must have a title") } ]; var mashupwarning = [ @@ -108,7 +108,7 @@ validate: function(_m) { return !!_m.description }, - message: "A hashcut should have a description" + message: gettext("A hashcut should have a description") } ]; @@ -245,7 +245,7 @@ if (!messages.length) { messages.push("Your hashcut is valid!"); } - mashupstatus = ' - ' + _(messages).map(IriSP.translate).join('\n - '); + mashupstatus = ' - ' + _(messages).join('\n - '); $(".publier-button").toggleClass("disable", critical); @@ -350,7 +350,7 @@ if (!messages.length) { messages.push("This segment is valid!") } - currentSegment.status_messages = _(messages).map(IriSP.translate); + currentSegment.status_messages = _(messages); $(".segmentation .validate").removeClass("critical warning valid").addClass(currentSegment.status); $(".segmentation .validate-tooltip").html(""); @@ -374,7 +374,7 @@ currentSegment.setMedia(currentMedia.id); currentSegment.setBegin(currentMedia.getCurrentTime()); currentSegment.setEnd(Math.min(currentMedia.getCurrentTime() + 180000, currentMedia.duration)); - currentSegment.title = IriSP.translate("Untitled segment"); + currentSegment.title = gettext("Untitled segment"); currentSegment.color = currentMedia.color; currentSegment.thumbnail = currentMedia.thumbnail; currentSegment.created = new Date(); @@ -396,8 +396,8 @@ if (currentMedia.loaded) { currentMedia.setCurrentTime(currentSegment.begin); } - $(".add-segment").val(IriSP.translate(addMode ? "Add segment to hashcut" : "Save segment")); - $(".create-or-edit").text(IriSP.translate(addMode ? "Create new segment" : "Edit existing segment")); + $(".add-segment").val(addMode ? gettext("Add segment to hashcut") : gettext("Save segment")); + $(".create-or-edit").text(addMode ? gettext("Create new segment") : gettext("Edit existing segment")); $("#segment-title").val(currentSegment.title); $("#segment-description").val(currentSegment.description); var segment_tags = $("#segment-tags"); @@ -499,7 +499,7 @@ } }); $("#segment-title").on("focus click", function() { - if ($(this).val() === IriSP.translate("Untitled segment")) { + if ($(this).val() === gettext("Untitled segment")) { $(this).val(""); } }); @@ -755,7 +755,7 @@ currentSegment.setMedia(media.id); currentSegment.setBegin(s.begin); currentSegment.setEnd(s.end); - currentSegment.title = IriSP.translate("Copy of ") + s.title; + currentSegment.title = gettext("Copy of ") + s.title; currentSegment.description = s.description; currentSegment.keywords = s.keywords; currentSegment.color = media.color; @@ -801,7 +801,7 @@ }); /* Changing Hashcut Title and description */ - mashup.title = IriSP.translate("Untitled Hashcut"); + mashup.title = gettext("Untitled Hashcut"); $(".title-video-wrap a").text(mashup.title); $("#hashcut-title").val(mashup.title); @@ -811,7 +811,7 @@ mashup.trigger("change"); }); $("#hashcut-title").on("focus click", function() { - if ($(this).val() === IriSP.translate("Untitled Hashcut")) { + if ($(this).val() === gettext("Untitled Hashcut")) { $(this).val(""); } }); @@ -829,14 +829,14 @@ /* Publication */ function onLeave() { - return IriSP.translate("You haven't published your hashcut yet.\nIf you leave this page, it will be lost"); + return gettext("You haven't published your hashcut yet.\nIf you leave this page, it will be lost."); } $(window).on("beforeunload", onLeave); $(".publier-button").click(function() { if ($(this).hasClass("disable")) { - alert(IriSP.translate("The mashup can't be published because:")+"\n\n"+mashupstatus); + alert(gettext("The hashcut can't be published because:")+"\n\n"+mashupstatus); return false; } var postproject = directory.newLocalSource(), @@ -895,7 +895,7 @@ document.location.href = destination; }, error: function(jqXHR, textStatus, errorThrown){ - alert(IriSP.translate("Server error\nYour hashcut couldn't be published")); + alert(gettext("Server error\nYour hashcut couldn't be published")); waitscreen.remove(); } });