diff options
Diffstat (limited to 'application/NetscapeBookmarkUtils.php')
-rw-r--r-- | application/NetscapeBookmarkUtils.php | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/application/NetscapeBookmarkUtils.php b/application/NetscapeBookmarkUtils.php index 31796367..dd7057f8 100644 --- a/application/NetscapeBookmarkUtils.php +++ b/application/NetscapeBookmarkUtils.php | |||
@@ -32,11 +32,10 @@ class NetscapeBookmarkUtils | |||
32 | { | 32 | { |
33 | // see tpl/export.html for possible values | 33 | // see tpl/export.html for possible values |
34 | if (! in_array($selection, array('all', 'public', 'private'))) { | 34 | if (! in_array($selection, array('all', 'public', 'private'))) { |
35 | throw new Exception('Invalid export selection: "'.$selection.'"'); | 35 | throw new Exception(t('Invalid export selection:') .' "'.$selection.'"'); |
36 | } | 36 | } |
37 | 37 | ||
38 | $bookmarkLinks = array(); | 38 | $bookmarkLinks = array(); |
39 | |||
40 | foreach ($linkDb as $link) { | 39 | foreach ($linkDb as $link) { |
41 | if ($link['private'] != 0 && $selection == 'public') { | 40 | if ($link['private'] != 0 && $selection == 'public') { |
42 | continue; | 41 | continue; |
@@ -79,14 +78,14 @@ class NetscapeBookmarkUtils | |||
79 | $duration=0 | 78 | $duration=0 |
80 | ) | 79 | ) |
81 | { | 80 | { |
82 | $status = 'File '.$filename.' ('.$filesize.' bytes) '; | 81 | $status = sprintf(t('File %s (%d bytes) '), $filename, $filesize); |
83 | if ($importCount == 0 && $overwriteCount == 0 && $skipCount == 0) { | 82 | if ($importCount == 0 && $overwriteCount == 0 && $skipCount == 0) { |
84 | $status .= 'has an unknown file format. Nothing was imported.'; | 83 | $status .= t('has an unknown file format. Nothing was imported.'); |
85 | } else { | 84 | } else { |
86 | $status .= 'was successfully processed in '. $duration .' seconds: '; | 85 | $status .= vsprintf( |
87 | $status .= $importCount.' links imported, '; | 86 | t('was successfully processed in %d seconds: %d links imported, %d links overwritten, %d links skipped.'), |
88 | $status .= $overwriteCount.' links overwritten, '; | 87 | [$duration, $importCount, $overwriteCount, $skipCount] |
89 | $status .= $skipCount.' links skipped.'; | 88 | ); |
90 | } | 89 | } |
91 | return $status; | 90 | return $status; |
92 | } | 91 | } |