Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorscambra <sergio@entrecables.com>2012-09-26 09:46:04 +0400
committerscambra <sergio@entrecables.com>2012-10-16 22:53:31 +0400
commitc814a7a8411d709efd56b884f0219a18c544fcc0 (patch)
tree21d5bea0b0f39d8f09212e83a4f4059146f22b3b /apps
parente7c9d5fe54ec619793ae77829b93df4635279662 (diff)
use interpolation for some translations in js
Diffstat (limited to 'apps')
-rw-r--r--apps/files/js/filelist.js12
-rw-r--r--apps/files/js/files.js16
2 files changed, 14 insertions, 14 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index 870437ae672..6cddea8492c 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -189,9 +189,9 @@ var FileList={
checkName:function(oldName, newName, isNewFile) {
if (isNewFile || $('tr').filterAttr('data-file', newName).length > 0) {
if (isNewFile) {
- $('#notification').html(escapeHTML(newName)+' '+t('files', 'already exists')+'<span class="replace">'+t('files', 'replace')+'</span><span class="suggest">'+t('files', 'suggest name')+'</span><span class="cancel">'+t('files', 'cancel')+'</span>');
+ $('#notification').html(t('files', '{new_name} already exists', {new_name: escapeHTML(newName)})+'<span class="replace">'+t('files', 'replace')+'</span><span class="suggest">'+t('files', 'suggest name')+'</span><span class="cancel">'+t('files', 'cancel')+'</span>');
} else {
- $('#notification').html(escapeHTML(newName)+' '+t('files', 'already exists')+'<span class="replace">'+t('files', 'replace')+'</span><span class="cancel">'+t('files', 'cancel')+'</span>');
+ $('#notification').html(t('files', '{new_name} already exists', {new_name: escapeHTML(newName)})+'<span class="replace">'+t('files', 'replace')+'</span><span class="cancel">'+t('files', 'cancel')+'</span>');
}
$('#notification').data('oldName', oldName);
$('#notification').data('newName', newName);
@@ -238,9 +238,9 @@ var FileList={
FileList.finishReplace();
};
if (isNewFile) {
- $('#notification').html(t('files', 'replaced')+' '+newName+'<span class="undo">'+t('files', 'undo')+'</span>');
+ $('#notification').html(t('files', 'replaced {new_name}', {new_name: newName})+'<span class="undo">'+t('files', 'undo')+'</span>');
} else {
- $('#notification').html(t('files', 'replaced')+' '+newName+' '+t('files', 'with')+' '+oldName+'<span class="undo">'+t('files', 'undo')+'</span>');
+ $('#notification').html(t('files', 'replaced {new_name} with {old_name}', {new_name: newName}, {old_name: oldName})+'<span class="undo">'+t('files', 'undo')+'</span>');
}
$('#notification').fadeIn();
},
@@ -272,9 +272,9 @@ var FileList={
} else {
// NOTE: Temporary fix to change the text to unshared for files in root of Shared folder
if ($('#dir').val() == '/Shared') {
- $('#notification').html(t('files', 'unshared')+' '+ escapeHTML(files) +'<span class="undo">'+t('files', 'undo')+'</span>');
+ $('#notification').html(t('files', 'unshared {files}', {'files': escapeHTML(files)})+'<span class="undo">'+t('files', 'undo')+'</span>');
} else {
- $('#notification').html(t('files', 'deleted')+' '+ escapeHTML(files)+'<span class="undo">'+t('files', 'undo')+'</span>');
+ $('#notification').html(t('files', 'deleted {files}', {'files': escapeHTML(files)})+'<span class="undo">'+t('files', 'undo')+'</span>');
}
$('#notification').fadeIn();
}
diff --git a/apps/files/js/files.js b/apps/files/js/files.js
index 777a5ec647e..6715e3fec60 100644
--- a/apps/files/js/files.js
+++ b/apps/files/js/files.js
@@ -262,7 +262,7 @@ $(document).ready(function() {
uploadtext.text(t('files', '1 file uploading'));
uploadtext.show();
} else {
- uploadtext.text(currentUploads + ' ' + t('files', 'files uploading'));
+ uploadtext.text(t('files', '{count} files uploading', {count: currentUploads}));
}
}
}
@@ -307,7 +307,7 @@ $(document).ready(function() {
uploadtext.text('');
uploadtext.hide();
} else {
- uploadtext.text(currentUploads + ' ' + t('files', 'files uploading'));
+ uploadtext.text(t('files', '{count} files uploading', {count: currentUploads}));
}
})
.error(function(jqXHR, textStatus, errorThrown) {
@@ -322,7 +322,7 @@ $(document).ready(function() {
uploadtext.text('');
uploadtext.hide();
} else {
- uploadtext.text(currentUploads + ' ' + t('files', 'files uploading'));
+ uploadtext.text(t('files', '{count} files uploading', {count: currentUploads}));
}
$('#notification').hide();
$('#notification').text(t('files', 'Upload cancelled.'));
@@ -678,7 +678,7 @@ function scanFiles(force,dir){
var scannerEventSource=new OC.EventSource(OC.filePath('files','ajax','scan.php'),{force:force,dir:dir});
scanFiles.cancel=scannerEventSource.close.bind(scannerEventSource);
scannerEventSource.listen('scanning',function(data){
- $('#scan-count').text(data.count + ' ' + t('files', 'files scanned'));
+ $('#scan-count').text(t('files', '{count} files scanned', {count: data.count}));
$('#scan-current').text(data.file+'/');
});
scannerEventSource.listen('success',function(success){
@@ -788,9 +788,9 @@ function procesSelection(){
var selection='';
if(selectedFolders.length>0){
if(selectedFolders.length==1){
- selection+='1 '+t('files','folder');
+ selection+=t('files','1 folder');
}else{
- selection+=selectedFolders.length+' '+t('files','folders');
+ selection+=t('files','{count} folders',{count: selectedFolders.length});
}
if(selectedFiles.length>0){
selection+=' & ';
@@ -798,9 +798,9 @@ function procesSelection(){
}
if(selectedFiles.length>0){
if(selectedFiles.length==1){
- selection+='1 '+t('files','file');
+ selection+=t('files','1 file');
}else{
- selection+=selectedFiles.length+' '+t('files','files');
+ selection+=t('files','{count} files',{count: selectedFiles.length});
}
}
$('#headerName>span.name').text(selection);