Skip to content
Snippets Groups Projects
Commit 1c311c36 authored by Robin Appelman's avatar Robin Appelman
Browse files

add translation wrappers to gallery strings in js

parent 42ef44e1
Branches
No related tags found
No related merge requests found
...@@ -37,14 +37,14 @@ var totalAlbums = 0; ...@@ -37,14 +37,14 @@ var totalAlbums = 0;
function scanForAlbums() { function scanForAlbums() {
var albumCounter = 0; var albumCounter = 0;
var totalAlbums = 0; var totalAlbums = 0;
$('#notification').text("Scanning directories"); $('#notification').text(t('gallery',"Scanning directories"));
$("#notification").fadeIn(); $("#notification").fadeIn();
$("#notification").slideDown(); $("#notification").slideDown();
$.getJSON('ajax/galleryOp.php?operation=filescan', function(r) { $.getJSON('ajax/galleryOp.php?operation=filescan', function(r) {
if (r.status == 'success') { if (r.status == 'success') {
totalAlbums = r.paths.length; totalAlbums = r.paths.length;
$('#notification').text("Creating thumbnails ... " + Math.floor((albumCounter/totalAlbums)*100) + "%"); $('#notification').text(t('gallery','Creating thumbnails')+' ... ' + Math.floor((albumCounter/totalAlbums)*100) + "%");
for(var a in r.paths) { for(var a in r.paths) {
$.getJSON('ajax/galleryOp.php?operation=partial_create&path='+r.paths[a], function(r) { $.getJSON('ajax/galleryOp.php?operation=partial_create&path='+r.paths[a], function(r) {
...@@ -53,7 +53,7 @@ function scanForAlbums() { ...@@ -53,7 +53,7 @@ function scanForAlbums() {
} }
albumCounter++; albumCounter++;
$('#notification').text("Creating thumbnails ... " + Math.floor((albumCounter/totalAlbums)*100) + "%"); $('#notification').text(t('gallery','Creating thumbnails')+' ... ' + Math.floor((albumCounter/totalAlbums)*100) + "%");
if (albumCounter == totalAlbums) { if (albumCounter == totalAlbums) {
$("#notification").fadeOut(); $("#notification").fadeOut();
$("#notification").slideUp(); $("#notification").slideUp();
...@@ -74,7 +74,7 @@ function scanForAlbums() { ...@@ -74,7 +74,7 @@ function scanForAlbums() {
} }
function galleryRemove(albumName) { function galleryRemove(albumName) {
if (confirm("Do you wan't to remove album " + albumName + "?")) { if (confirm(t('gallery',"Do you wan't to remove album")+' ' + albumName + "?")) {
$.getJSON("ajax/galleryOp.php", {operation: "remove", name: albumName}, function(r) { $.getJSON("ajax/galleryOp.php", {operation: "remove", name: albumName}, function(r) {
if (r.status == "success") { if (r.status == "success") {
$("#gallery_album_box[title='"+albumName+"']").remove(); $("#gallery_album_box[title='"+albumName+"']").remove();
...@@ -87,7 +87,7 @@ function galleryRemove(albumName) { ...@@ -87,7 +87,7 @@ function galleryRemove(albumName) {
} }
function galleryRename(name) { function galleryRename(name) {
var result = window.prompt("Input new gallery name", name); var result = window.prompt(t('gallery',"Input new gallery name"), name);
if (result) { if (result) {
if (Albums.find(result)) { if (Albums.find(result)) {
alert("Album named '" + result + "' already exists"); alert("Album named '" + result + "' already exists");
...@@ -102,7 +102,7 @@ function galleryRename(name) { ...@@ -102,7 +102,7 @@ function galleryRename(name) {
}); });
} else { } else {
alert("Album name can't be empty") alert(t('gallery',"Album name can't be empty"))
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment