diff --git a/apps/files_external/js/dropbox.js b/apps/files_external/js/dropbox.js
index 6082fdd2cb..c1e3864070 100644
--- a/apps/files_external/js/dropbox.js
+++ b/apps/files_external/js/dropbox.js
@@ -4,7 +4,7 @@ $(document).ready(function() {
var configured = $(this).find('[data-parameter="configured"]');
if ($(configured).val() == 'true') {
$(this).find('.configuration input').attr('disabled', 'disabled');
- $(this).find('.configuration').append('Access granted');
+ $(this).find('.configuration').append(''+t('files_external', 'Access granted')+'');
} else {
var app_key = $(this).find('.configuration [data-parameter="app_key"]').val();
var app_secret = $(this).find('.configuration [data-parameter="app_secret"]').val();
@@ -22,14 +22,16 @@ $(document).ready(function() {
$(configured).val('true');
OC.MountConfig.saveStorage(tr);
$(tr).find('.configuration input').attr('disabled', 'disabled');
- $(tr).find('.configuration').append('Access granted');
+ $(tr).find('.configuration').append(''+t('files_external', 'Access granted')+'');
} else {
- OC.dialogs.alert(result.data.message, 'Error configuring Dropbox storage');
+ OC.dialogs.alert(result.data.message,
+ t('files_external', 'Error configuring Dropbox storage')
+ );
}
});
}
} else if ($(this).find('.mountPoint input').val() != '' && $(config).find('[data-parameter="app_key"]').val() != '' && $(config).find('[data-parameter="app_secret"]').val() != '' && $(this).find('.dropbox').length == 0) {
- $(this).find('.configuration').append('Grant access');
+ $(this).find('.configuration').append(''+t('files_external', 'Grant access')+'');
}
}
});
@@ -40,7 +42,7 @@ $(document).ready(function() {
var config = $(tr).find('.configuration');
if ($(tr).find('.mountPoint input').val() != '' && $(config).find('[data-parameter="app_key"]').val() != '' && $(config).find('[data-parameter="app_secret"]').val() != '') {
if ($(tr).find('.dropbox').length == 0) {
- $(config).append('Grant access');
+ $(config).append(''+t('files_external', 'Grant access')+'');
} else {
$(tr).find('.dropbox').show();
}
@@ -67,14 +69,22 @@ $(document).ready(function() {
if (OC.MountConfig.saveStorage(tr)) {
window.location = result.data.url;
} else {
- OC.dialogs.alert('Fill out all required fields', 'Error configuring Dropbox storage');
+ OC.dialogs.alert(
+ t('files_external', 'Fill out all required fields'),
+ t('files_external', 'Error configuring Dropbox storage')
+ );
}
} else {
- OC.dialogs.alert(result.data.message, 'Error configuring Dropbox storage');
+ OC.dialogs.alert(result.data.message,
+ t('files_external', 'Error configuring Dropbox storage')
+ );
}
});
} else {
- OC.dialogs.alert('Please provide a valid Dropbox app key and secret.', 'Error configuring Dropbox storage');
+ OC.dialogs.alert(
+ t('files_external', 'Please provide a valid Dropbox app key and secret.'),
+ t('files_external', 'Error configuring Dropbox storage')
+ );
}
});
diff --git a/apps/files_external/js/google.js b/apps/files_external/js/google.js
index 7c62297df4..0b3c314eb5 100644
--- a/apps/files_external/js/google.js
+++ b/apps/files_external/js/google.js
@@ -3,7 +3,8 @@ $(document).ready(function() {
$('#externalStorage tbody tr.OC_Filestorage_Google').each(function() {
var configured = $(this).find('[data-parameter="configured"]');
if ($(configured).val() == 'true') {
- $(this).find('.configuration').append('Access granted');
+ $(this).find('.configuration')
+ .append(''+t('files_external', 'Access granted')+'');
} else {
var token = $(this).find('[data-parameter="token"]');
var token_secret = $(this).find('[data-parameter="token_secret"]');
@@ -19,13 +20,15 @@ $(document).ready(function() {
$(token_secret).val(result.access_token_secret);
$(configured).val('true');
OC.MountConfig.saveStorage(tr);
- $(tr).find('.configuration').append('Access granted');
+ $(tr).find('.configuration').append(''+t('files_external', 'Access granted')+'');
} else {
- OC.dialogs.alert(result.data.message, 'Error configuring Google Drive storage');
+ OC.dialogs.alert(result.data.message,
+ t('files_external', 'Error configuring Google Drive storage')
+ );
}
});
} else if ($(this).find('.google').length == 0) {
- $(this).find('.configuration').append('Grant access');
+ $(this).find('.configuration').append(''+t('files_external', 'Grant access')+'');
}
}
});
@@ -34,7 +37,7 @@ $(document).ready(function() {
if ($(this).hasClass('OC_Filestorage_Google') && $(this).find('[data-parameter="configured"]').val() != 'true') {
if ($(this).find('.mountPoint input').val() != '') {
if ($(this).find('.google').length == 0) {
- $(this).find('.configuration').append('Grant access');
+ $(this).find('.configuration').append(''+t('files_external', 'Grant access')+'');
}
}
}
@@ -65,10 +68,15 @@ $(document).ready(function() {
if (OC.MountConfig.saveStorage(tr)) {
window.location = result.data.url;
} else {
- OC.dialogs.alert('Fill out all required fields', 'Error configuring Google Drive storage');
+ OC.dialogs.alert(
+ t('files_external', 'Fill out all required fields'),
+ t('files_external', 'Error configuring Google Drive storage')
+ );
}
} else {
- OC.dialogs.alert(result.data.message, 'Error configuring Google Drive storage');
+ OC.dialogs.alert(result.data.message,
+ t('files_external', 'Error configuring Google Drive storage')
+ );
}
});
});