diff options
author | ArthurHoaro <arthur@hoa.ro> | 2017-10-22 13:19:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-22 13:19:51 +0200 |
commit | d8acf8550480694d050091e270a06c01e7b313f0 (patch) | |
tree | f62befb2351c4b6550f71e11f6845bc3acb78a5d /application/NetscapeBookmarkUtils.php | |
parent | efd3a6405a381501b070b8805ae37d1313969784 (diff) | |
parent | 1a47014f99d2f7aae00d37e62e0364d4eaa1ce29 (diff) | |
download | Shaarli-d8acf8550480694d050091e270a06c01e7b313f0.tar.gz Shaarli-d8acf8550480694d050091e270a06c01e7b313f0.tar.zst Shaarli-d8acf8550480694d050091e270a06c01e7b313f0.zip |
Merge pull request #871 from ArthurHoaro/feature/translation
Shaarli's translation
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 | } |