Commit f45f902c authored by KR Moorhouse's avatar KR Moorhouse

Added localization for translation of string elements.

parent d7f52e07
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -49,10 +49,8 @@ define( ['models/formModel'], function( FormModel ) {
container.classList.add( 'message' );
title.innerHTML = formTitle;
messageBox.innerHTML += 'Once deleted, this form (<strong>'
+ formTitle + '</strong>), it\'s fields, and submissions' +
' cannot be recovered. Proceed with caution.';
' recovered. This includes submission data for that form.';
messageBox.innerHTML += nfi18n.deleteWarningA + ' (<strong>'
+ formTitle + '</strong>). ' + nfi18n.deleteWarningB;
messageBox.appendChild( document.createElement( 'br') );
messageBox.appendChild( document.createElement( 'br') );
......@@ -61,8 +59,7 @@ define( ['models/formModel'], function( FormModel ) {
exportFormLink.href = this.baseUrl + '?page=nf-import-export&exportFormId='
+ formID;
exportFormLink.innerHTML = '<i class="fa fa-download"' +
' style="padding:5px;"></i>Export' +
' Form';
' style="padding:5px;"></i>' + nfi18n.deleteXForm;
exportFormLink.target = '_blank'; // open in new tab
messageBox.appendChild( exportFormLink );
messageBox.appendChild( document.createElement( 'br') );
......@@ -75,7 +72,7 @@ define( ['models/formModel'], function( FormModel ) {
+ formID );
exportSubmissionLink.target = '_blank';
exportSubmissionLink.innerHTML = '<i class="fa fa-download" ' +
'style="padding:5px;"></i>Export Submissions';
'style="padding:5px;"></i>' + nfi18n.deleteXSubs;
messageBox.appendChild( exportSubmissionLink );
messageBox.appendChild( document.createElement( 'br') );
......@@ -84,8 +81,7 @@ define( ['models/formModel'], function( FormModel ) {
var inputLabel = document.createElement( 'label' );
inputLabel.for = 'confirmDeleteFormInput';
inputLabel.innerHTML = 'Type <span style="color:red;">DELETE</span>' +
' to confirm';
inputLabel.innerHTML = nfi18n.deleteConfirmA + ' <span style="color:red;">DELETE</span> ' + nfi18n.deleteConfirmB;
var deleteInput = document.createElement( 'input' );
deleteInput.type = 'text';
......@@ -101,9 +97,9 @@ define( ['models/formModel'], function( FormModel ) {
container.appendChild( document.createElement( 'br' ) );
container.appendChild( document.createElement( 'br' ) );
confirm.innerHTML = 'Delete';
confirm.innerHTML = nfi18n.delete;
confirm.classList.add( 'confirm', 'nf-button', 'primary', 'pull-right' );
cancel.innerHTML = 'Cancel';
cancel.innerHTML = nfi18n.cancel;
cancel.classList.add( 'cancel', 'nf-button', 'secondary' );
buttons.appendChild( cancel );
buttons.appendChild( confirm );
......@@ -113,7 +109,7 @@ define( ['models/formModel'], function( FormModel ) {
message.appendChild( container );
this.modal.setContent( message.innerHTML );
this.modal.setTitle( 'Confirm Delete' );
this.modal.setTitle( nfi18n.deleteTitle );
this.modal.open();
......
......@@ -58,5 +58,16 @@ return apply_filters( 'ninja_forms_i18n_dashboard', array(
__( 'Th', 'ninja-forms' ),
__( 'Fr', 'ninja-forms' ),
__( 'Sa', 'ninja-forms' )
)
),
'deleteWarningA' => __( 'You are about to delete the form', 'ninja-forms' ),
'deleteWarningB' => __( 'Once deleted, it\'s fields and submissions cannot be recovered. Proceed with caution.',
'ninja-forms' ),
'deleteConfirmA' => __( 'Type', 'ninja-forms' ),
'deleteConfirmB' => __( 'to confirm', 'ninja-forms' ),
'delete' => __( 'Delete', 'ninja-forms' ),
'cancel' => __( 'Cancel', 'ninja-forms' ),
'deleteTitle' => __( 'Confirm Delete', 'ninja-forms' ),
'deleteXForm' => __( 'Export Form', 'ninja-forms' ),
'deleteXSubs' => __( 'Export Submissions', 'ninja-forms' )
));
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment