Bug 9266 - Untranslated strings in tags moderation

There are a couple of English strings in tags moderation JavaScript
which are not properly enclosed in the _() function enabling
translation. As a result, clicking a translated 'Approve' or
'Reject' button in the table of tags would change the button's
neighbor's label to the English string. This patch
corrects it.

To test, apply the patch and regenerate a translation to test with. Go
to Tools -> Tags and find a list of tags to moderate (pending, approved,
or rejected). When you click on an 'Approve' or 'Reject' tag in the
table of tags, the buttons in each Approve/Reject pair should retain
their correct translated label. For instance, looking at approved tags
in French:

[ Approuvé ] [ Rejeter ]

Clicking the "Rejetee" button should change the state to:

[ Approuver ] [ Rejetée ]

Clicking "Approuver" should return the buttons to the first state.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
This commit is contained in:
Owen Leonard 2013-04-26 14:20:49 -04:00 committed by Jared Camins-Esakov
parent c04260dbaf
commit acfbfcb7d9

View file

@ -96,7 +96,7 @@ td input,td input[type="submit"] { font-size: 85%; padding: 1px; }
"data": {ok: $(event.target).attr("title")}, "data": {ok: $(event.target).attr("title")},
"success": count_approve // success_approve "success": count_approve // success_approve
}); });
$(event.target).next(".rej").removeAttr("disabled").attr("value","Reject").css("color","#000"); $(event.target).next(".rej").removeAttr("disabled").attr("value",_("Reject")).css("color","#000");
$(event.target).attr( "value",_("Approved")).attr("disabled","disabled").css("color","#666"); $(event.target).attr( "value",_("Approved")).attr("disabled","disabled").css("color","#666");
return false; // cancel submit return false; // cancel submit
} }
@ -105,7 +105,7 @@ td input,td input[type="submit"] { font-size: 85%; padding: 1px; }
"data": {rej: $(event.target).attr("title")}, "data": {rej: $(event.target).attr("title")},
"success": count_reject // success_reject "success": count_reject // success_reject
}); });
$(event.target).prev(".ok").removeAttr("disabled").attr("value","Approve").css("color","#000"); $(event.target).prev(".ok").removeAttr("disabled").attr("value",_("Approve")).css("color","#000");
$(event.target).attr( "value",_("Rejected")).attr("disabled","disabled").css("color","#666"); $(event.target).attr( "value",_("Rejected")).attr("disabled","disabled").css("color","#666");
return false; // cancel submit return false; // cancel submit
} }