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 /tpl | |
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 'tpl')
-rw-r--r-- | tpl/default/changetag.html | 2 | ||||
-rw-r--r-- | tpl/default/configure.html | 24 | ||||
-rw-r--r-- | tpl/default/import.html | 8 | ||||
-rw-r--r-- | tpl/default/install.html | 21 | ||||
-rw-r--r-- | tpl/default/js/shaarli.js | 11 | ||||
-rw-r--r-- | tpl/default/linklist.html | 30 | ||||
-rw-r--r-- | tpl/default/linklist.paging.html | 4 | ||||
-rw-r--r-- | tpl/default/page.footer.html | 15 | ||||
-rw-r--r-- | tpl/default/pluginsadmin.html | 4 |
9 files changed, 94 insertions, 25 deletions
diff --git a/tpl/default/changetag.html b/tpl/default/changetag.html index 49dd20d9..6606c4fa 100644 --- a/tpl/default/changetag.html +++ b/tpl/default/changetag.html | |||
@@ -32,7 +32,7 @@ | |||
32 | </div> | 32 | </div> |
33 | </form> | 33 | </form> |
34 | 34 | ||
35 | <p>You can also edit tags in the <a href="?do=taglist&sort=usage">tag list</a>.</p> | 35 | <p>{'You can also edit tags in the'|t} <a href="?do=taglist&sort=usage">{'tag list'|t}</a>.</p> |
36 | </div> | 36 | </div> |
37 | </div> | 37 | </div> |
38 | {include="page.footer"} | 38 | {include="page.footer"} |
diff --git a/tpl/default/configure.html b/tpl/default/configure.html index 76a1b9fd..cc3b299b 100644 --- a/tpl/default/configure.html +++ b/tpl/default/configure.html | |||
@@ -70,6 +70,30 @@ | |||
70 | </div> | 70 | </div> |
71 | </div> | 71 | </div> |
72 | <div class="pure-g"> | 72 | <div class="pure-g"> |
73 | <div class="pure-u-lg-{$ratioLabel} pure-u-1"> | ||
74 | <div class="form-label"> | ||
75 | <label for="language"> | ||
76 | <span class="label-name">{'Language'|t}</span> | ||
77 | </label> | ||
78 | </div> | ||
79 | </div> | ||
80 | <div class="pure-u-lg-{$ratioInput} pure-u-1"> | ||
81 | <div class="form-input"> | ||
82 | <select name="language" id="language" class="align"> | ||
83 | {loop="$languages"} | ||
84 | <option value="{$key}" | ||
85 | {if="$key===$language"} | ||
86 | selected="selected" | ||
87 | {/if} | ||
88 | > | ||
89 | {$value} | ||
90 | </option> | ||
91 | {/loop} | ||
92 | </select> | ||
93 | </div> | ||
94 | </div> | ||
95 | </div> | ||
96 | <div class="pure-g"> | ||
73 | <div class="pure-u-lg-{$ratioLabel} pure-u-1 "> | 97 | <div class="pure-u-lg-{$ratioLabel} pure-u-1 "> |
74 | <div class="form-label"> | 98 | <div class="form-label"> |
75 | <label> | 99 | <label> |
diff --git a/tpl/default/import.html b/tpl/default/import.html index 1f040685..000a50ac 100644 --- a/tpl/default/import.html +++ b/tpl/default/import.html | |||
@@ -18,7 +18,7 @@ | |||
18 | <div class="center" id="import-field"> | 18 | <div class="center" id="import-field"> |
19 | <input type="hidden" name="MAX_FILE_SIZE" value="{$maxfilesize}"> | 19 | <input type="hidden" name="MAX_FILE_SIZE" value="{$maxfilesize}"> |
20 | <input type="file" name="filetoupload"> | 20 | <input type="file" name="filetoupload"> |
21 | <p><br>Maximum size allowed: <strong>{$maxfilesizeHuman}</strong></p> | 21 | <p><br>{'Maximum size allowed:'|t} <strong>{$maxfilesizeHuman}</strong></p> |
22 | </div> | 22 | </div> |
23 | 23 | ||
24 | <div class="pure-g"> | 24 | <div class="pure-g"> |
@@ -31,15 +31,15 @@ | |||
31 | <div class="radio-buttons"> | 31 | <div class="radio-buttons"> |
32 | <div> | 32 | <div> |
33 | <input type="radio" name="privacy" value="default" checked="checked"> | 33 | <input type="radio" name="privacy" value="default" checked="checked"> |
34 | Use values from the imported file, default to public | 34 | {'Use values from the imported file, default to public'|t} |
35 | </div> | 35 | </div> |
36 | <div> | 36 | <div> |
37 | <input type="radio" name="privacy" value="private"> | 37 | <input type="radio" name="privacy" value="private"> |
38 | Import all bookmarks as private | 38 | {'Import all bookmarks as private'|t} |
39 | </div> | 39 | </div> |
40 | <div> | 40 | <div> |
41 | <input type="radio" name="privacy" value="public"> | 41 | <input type="radio" name="privacy" value="public"> |
42 | Import all bookmarks as public | 42 | {'Import all bookmarks as public'|t} |
43 | </div> | 43 | </div> |
44 | </div> | 44 | </div> |
45 | </div> | 45 | </div> |
diff --git a/tpl/default/install.html b/tpl/default/install.html index 164d453b..6199b33d 100644 --- a/tpl/default/install.html +++ b/tpl/default/install.html | |||
@@ -68,6 +68,27 @@ | |||
68 | <div class="pure-g"> | 68 | <div class="pure-g"> |
69 | <div class="pure-u-lg-{$ratioLabel} pure-u-1"> | 69 | <div class="pure-u-lg-{$ratioLabel} pure-u-1"> |
70 | <div class="form-label"> | 70 | <div class="form-label"> |
71 | <label for="language"> | ||
72 | <span class="label-name">{'Language'|t}</span> | ||
73 | </label> | ||
74 | </div> | ||
75 | </div> | ||
76 | <div class="pure-u-lg-{$ratioInput} pure-u-1"> | ||
77 | <div class="form-input"> | ||
78 | <select name="language" id="language" class="align"> | ||
79 | {loop="$languages"} | ||
80 | <option value="{$key}"> | ||
81 | {$value} | ||
82 | </option> | ||
83 | {/loop} | ||
84 | </select> | ||
85 | </div> | ||
86 | </div> | ||
87 | </div> | ||
88 | |||
89 | <div class="pure-g"> | ||
90 | <div class="pure-u-lg-{$ratioLabel} pure-u-1"> | ||
91 | <div class="form-label"> | ||
71 | <label> | 92 | <label> |
72 | <span class="label-name">{'Timezone'|t}</span><br> | 93 | <span class="label-name">{'Timezone'|t}</span><br> |
73 | <span class="label-desc">{'Continent'|t} · {'City'|t}</span> | 94 | <span class="label-desc">{'Continent'|t} · {'City'|t}</span> |
diff --git a/tpl/default/js/shaarli.js b/tpl/default/js/shaarli.js index 55656f80..09b07eed 100644 --- a/tpl/default/js/shaarli.js +++ b/tpl/default/js/shaarli.js | |||
@@ -138,6 +138,9 @@ window.onload = function () { | |||
138 | }); | 138 | }); |
139 | foldAllButton.firstElementChild.classList.toggle('fa-chevron-down'); | 139 | foldAllButton.firstElementChild.classList.toggle('fa-chevron-down'); |
140 | foldAllButton.firstElementChild.classList.toggle('fa-chevron-up'); | 140 | foldAllButton.firstElementChild.classList.toggle('fa-chevron-up'); |
141 | foldAllButton.title = state === 'down' | ||
142 | ? document.getElementById('translation-fold-all').innerHTML | ||
143 | : document.getElementById('translation-expand-all').innerHTML | ||
141 | }); | 144 | }); |
142 | }); | 145 | }); |
143 | } | 146 | } |
@@ -146,7 +149,7 @@ window.onload = function () { | |||
146 | { | 149 | { |
147 | // Switch fold/expand - up = fold | 150 | // Switch fold/expand - up = fold |
148 | if (button.classList.contains('fa-chevron-up')) { | 151 | if (button.classList.contains('fa-chevron-up')) { |
149 | button.title = 'Expand'; | 152 | button.title = document.getElementById('translation-expand').innerHTML; |
150 | if (description != null) { | 153 | if (description != null) { |
151 | description.style.display = 'none'; | 154 | description.style.display = 'none'; |
152 | } | 155 | } |
@@ -155,7 +158,7 @@ window.onload = function () { | |||
155 | } | 158 | } |
156 | } | 159 | } |
157 | else { | 160 | else { |
158 | button.title = 'Fold'; | 161 | button.title = document.getElementById('translation-fold').innerHTML; |
159 | if (description != null) { | 162 | if (description != null) { |
160 | description.style.display = 'block'; | 163 | description.style.display = 'block'; |
161 | } | 164 | } |
@@ -173,7 +176,7 @@ window.onload = function () { | |||
173 | var deleteLinks = document.querySelectorAll('.confirm-delete'); | 176 | var deleteLinks = document.querySelectorAll('.confirm-delete'); |
174 | [].forEach.call(deleteLinks, function(deleteLink) { | 177 | [].forEach.call(deleteLinks, function(deleteLink) { |
175 | deleteLink.addEventListener('click', function(event) { | 178 | deleteLink.addEventListener('click', function(event) { |
176 | if(! confirm('Are you sure you want to delete this link ?')) { | 179 | if(! confirm(document.getElementById('translation-delete-link').innerHTML)) { |
177 | event.preventDefault(); | 180 | event.preventDefault(); |
178 | } | 181 | } |
179 | }); | 182 | }); |
@@ -618,7 +621,7 @@ function activateFirefoxSocial(node) { | |||
618 | // Keeping the data separated (ie. not in the DOM) so that it's maintainable and diffable. | 621 | // Keeping the data separated (ie. not in the DOM) so that it's maintainable and diffable. |
619 | var data = { | 622 | var data = { |
620 | name: title, | 623 | name: title, |
621 | description: "The personal, minimalist, super-fast, database free, bookmarking service by the Shaarli community.", | 624 | description: document.getElementById('translation-delete-link').innerHTML, |
622 | author: "Shaarli", | 625 | author: "Shaarli", |
623 | version: "1.0.0", | 626 | version: "1.0.0", |
624 | 627 | ||
diff --git a/tpl/default/linklist.html b/tpl/default/linklist.html index 685821e3..5dab8e9a 100644 --- a/tpl/default/linklist.html +++ b/tpl/default/linklist.html | |||
@@ -86,7 +86,7 @@ | |||
86 | <div class="pure-g pure-alert pure-alert-success search-result"> | 86 | <div class="pure-g pure-alert pure-alert-success search-result"> |
87 | <div class="pure-u-2-24"></div> | 87 | <div class="pure-u-2-24"></div> |
88 | <div class="pure-u-20-24"> | 88 | <div class="pure-u-20-24"> |
89 | {function="t('%s result', '%s results', $result_count)"} | 89 | {function="sprintf(t('%s result', '%s results', $result_count), $result_count)"} |
90 | {if="!empty($search_term)"} | 90 | {if="!empty($search_term)"} |
91 | {'for'|t} <em><strong>{$search_term}</strong></em> | 91 | {'for'|t} <em><strong>{$search_term}</strong></em> |
92 | {/if} | 92 | {/if} |
@@ -117,6 +117,16 @@ | |||
117 | <div class="pure-g"> | 117 | <div class="pure-g"> |
118 | <div class="pure-u-lg-2-24 pure-u-1-24"></div> | 118 | <div class="pure-u-lg-2-24 pure-u-1-24"></div> |
119 | <div class="pure-u-lg-20-24 pure-u-22-24"> | 119 | <div class="pure-u-lg-20-24 pure-u-22-24"> |
120 | {ignore}Set translation here, for performances{/ignore} | ||
121 | {$strPrivate=t('Private')} | ||
122 | {$strEdit=t('Edit')} | ||
123 | {$strDelete=t('Delete')} | ||
124 | {$strFold=t('Fold')} | ||
125 | {$strEdited=t('Edited: ')} | ||
126 | {$strPermalink=t('Permalink')} | ||
127 | {$strPermalinkLc=t('permalink')} | ||
128 | {$strAddTag=t('Add tag')} | ||
129 | {ignore}End of translations{/ignore} | ||
120 | {loop="links"} | 130 | {loop="links"} |
121 | <div class="anchor" id="{$value.shorturl}"></div> | 131 | <div class="anchor" id="{$value.shorturl}"></div> |
122 | <div class="linklist-item linklist-item{if="$value.class"} {$value.class}{/if}" data-id="{$value.id}"> | 132 | <div class="linklist-item linklist-item{if="$value.class"} {$value.class}{/if}" data-id="{$value.id}"> |
@@ -125,12 +135,12 @@ | |||
125 | {if="isLoggedIn()"} | 135 | {if="isLoggedIn()"} |
126 | <div class="linklist-item-editbuttons"> | 136 | <div class="linklist-item-editbuttons"> |
127 | {if="$value.private"} | 137 | {if="$value.private"} |
128 | <span class="label label-private">{'Private'|t}</span> | 138 | <span class="label label-private">{$strPrivate}</span> |
129 | {/if} | 139 | {/if} |
130 | <input type="checkbox" class="delete-checkbox" value="{$value.id}"> | 140 | <input type="checkbox" class="delete-checkbox" value="{$value.id}"> |
131 | <!-- FIXME! JS translation --> | 141 | <!-- FIXME! JS translation --> |
132 | <a href="?edit_link={$value.id}" title="{'Edit'|t}"><i class="fa fa-pencil-square-o edit-link"></i></a> | 142 | <a href="?edit_link={$value.id}" title="{$strEdit}"><i class="fa fa-pencil-square-o edit-link"></i></a> |
133 | <a href="#" title="{'Fold'|t}" class="fold-button"><i class="fa fa-chevron-up"></i></a> | 143 | <a href="#" title="{$strFold}" class="fold-button"><i class="fa fa-chevron-up"></i></a> |
134 | </div> | 144 | </div> |
135 | {/if} | 145 | {/if} |
136 | 146 | ||
@@ -164,7 +174,7 @@ | |||
164 | <i class="fa fa-tags"></i> | 174 | <i class="fa fa-tags"></i> |
165 | {$tag_counter=count($value.taglist)} | 175 | {$tag_counter=count($value.taglist)} |
166 | {loop="value.taglist"} | 176 | {loop="value.taglist"} |
167 | <span class="label label-tag" title="Add tag"> | 177 | <span class="label label-tag" title="{$strAddTag}"> |
168 | <a href="?addtag={$value|urlencode}">{$value}</a> | 178 | <a href="?addtag={$value|urlencode}">{$value}</a> |
169 | </span> | 179 | </span> |
170 | {if="$tag_counter - 1 != $counter"}·{/if} | 180 | {if="$tag_counter - 1 != $counter"}·{/if} |
@@ -174,9 +184,9 @@ | |||
174 | 184 | ||
175 | <div class="pure-g"> | 185 | <div class="pure-g"> |
176 | <div class="linklist-item-infos-dateblock pure-u-lg-3-8 pure-u-1"> | 186 | <div class="linklist-item-infos-dateblock pure-u-lg-3-8 pure-u-1"> |
177 | <a href="?{$value.shorturl}" title="{'Permalink'|t}"> | 187 | <a href="?{$value.shorturl}" title="{$strPermalink}"> |
178 | {if="!$hide_timestamps || isLoggedIn()"} | 188 | {if="!$hide_timestamps || isLoggedIn()"} |
179 | {$updated=$value.updated_timestamp ? 'Edited: '. format_date($value.updated) : 'Permalink'} | 189 | {$updated=$value.updated_timestamp ? $strEdited. format_date($value.updated) : $strPermalink} |
180 | <span class="linkdate" title="{$updated}"> | 190 | <span class="linkdate" title="{$updated}"> |
181 | <i class="fa fa-clock-o"></i> | 191 | <i class="fa fa-clock-o"></i> |
182 | {$value.created|format_date} | 192 | {$value.created|format_date} |
@@ -184,7 +194,7 @@ | |||
184 | · | 194 | · |
185 | </span> | 195 | </span> |
186 | {/if} | 196 | {/if} |
187 | {'permalink'|t} | 197 | {$strPermalinkLc} |
188 | </a> | 198 | </a> |
189 | 199 | ||
190 | <div class="pure-u-0 pure-u-lg-visible"> | 200 | <div class="pure-u-0 pure-u-lg-visible"> |
@@ -205,7 +215,7 @@ | |||
205 | </a> | 215 | </a> |
206 | {if="isLoggedIn()"} | 216 | {if="isLoggedIn()"} |
207 | <a href="?delete_link&lf_linkdate={$value.id}&token={$token}" | 217 | <a href="?delete_link&lf_linkdate={$value.id}&token={$token}" |
208 | title="{'Delete'|t}" class="delete-link pure-u-0 pure-u-lg-visible confirm-delete"> | 218 | title="{$strDelete}" class="delete-link pure-u-0 pure-u-lg-visible confirm-delete"> |
209 | <i class="fa fa-trash"></i> | 219 | <i class="fa fa-trash"></i> |
210 | </a> | 220 | </a> |
211 | {/if} | 221 | {/if} |
@@ -221,7 +231,7 @@ | |||
221 | {if="isLoggedIn()"} | 231 | {if="isLoggedIn()"} |
222 | · | 232 | · |
223 | <a href="?delete_link&lf_linkdate={$value.id}&token={$token}" | 233 | <a href="?delete_link&lf_linkdate={$value.id}&token={$token}" |
224 | title="{'Delete'|t}" class="delete-link confirm-delete"> | 234 | title="{$strDelete}" class="delete-link confirm-delete"> |
225 | <i class="fa fa-trash"></i> | 235 | <i class="fa fa-trash"></i> |
226 | </a> | 236 | </a> |
227 | {/if} | 237 | {/if} |
diff --git a/tpl/default/linklist.paging.html b/tpl/default/linklist.paging.html index 41e9fa34..347b3d13 100644 --- a/tpl/default/linklist.paging.html +++ b/tpl/default/linklist.paging.html | |||
@@ -13,7 +13,7 @@ | |||
13 | <a href="?untaggedonly" title="{'Filter untagged links'|t}" | 13 | <a href="?untaggedonly" title="{'Filter untagged links'|t}" |
14 | class={if="$untaggedonly"}"filter-on"{else}"filter-off"{/if} | 14 | class={if="$untaggedonly"}"filter-on"{else}"filter-off"{/if} |
15 | ><i class="fa fa-tag"></i></a> | 15 | ><i class="fa fa-tag"></i></a> |
16 | <a href="#" class="filter-off fold-all pure-u-lg-0" title="Fold all"> | 16 | <a href="#" class="filter-off fold-all pure-u-lg-0" title="{'Fold all'|t}"> |
17 | <i class="fa fa-chevron-up"></i> | 17 | <i class="fa fa-chevron-up"></i> |
18 | </a> | 18 | </a> |
19 | {loop="$action_plugin"} | 19 | {loop="$action_plugin"} |
@@ -53,7 +53,7 @@ | |||
53 | <form method="GET" class="pure-u-0 pure-u-lg-visible"> | 53 | <form method="GET" class="pure-u-0 pure-u-lg-visible"> |
54 | <input type="text" name="linksperpage" placeholder="133"> | 54 | <input type="text" name="linksperpage" placeholder="133"> |
55 | </form> | 55 | </form> |
56 | <a href="#" class="filter-off fold-all pure-u-0 pure-u-lg-visible" title="Fold all"> | 56 | <a href="#" class="filter-off fold-all pure-u-0 pure-u-lg-visible" title="{'Fold all'|t}"> |
57 | <i class="fa fa-chevron-up"></i> | 57 | <i class="fa fa-chevron-up"></i> |
58 | </a> | 58 | </a> |
59 | </div> | 59 | </div> |
diff --git a/tpl/default/page.footer.html b/tpl/default/page.footer.html index 54b16e8a..659e8c7f 100644 --- a/tpl/default/page.footer.html +++ b/tpl/default/page.footer.html | |||
@@ -8,8 +8,8 @@ | |||
8 | {$version} | 8 | {$version} |
9 | {/if} | 9 | {/if} |
10 | · | 10 | · |
11 | The personal, minimalist, super-fast, database free, bookmarking service by the Shaarli community · | 11 | {'The personal, minimalist, super-fast, database free, bookmarking service'|t} {'by the Shaarli community'|t} · |
12 | <a href="doc/html/index.html" rel="nofollow">Documentation</a> | 12 | <a href="doc/html/index.html" rel="nofollow">{'Documentation'|t}</a> |
13 | {loop="$plugins_footer.text"} | 13 | {loop="$plugins_footer.text"} |
14 | {$value} | 14 | {$value} |
15 | {/loop} | 15 | {/loop} |
@@ -27,6 +27,17 @@ | |||
27 | <script src="{$value}#"></script> | 27 | <script src="{$value}#"></script> |
28 | {/loop} | 28 | {/loop} |
29 | 29 | ||
30 | <div id="js-translations" class="hidden"> | ||
31 | <span id="translation-fold">{'Fold'|t}</span> | ||
32 | <span id="translation-fold-all">{'Fold all'|t}</span> | ||
33 | <span id="translation-expand">{'Expand'|t}</span> | ||
34 | <span id="translation-expand-all">{'Expand all'|t}</span> | ||
35 | <span id="translation-delete-link">{'Are you sure you want to delete this link?'|t}</span> | ||
36 | <span id="translation-shaarli-desc"> | ||
37 | {'The personal, minimalist, super-fast, database free, bookmarking service'|t} {'by the Shaarli community'|t} | ||
38 | </span> | ||
39 | </div> | ||
40 | |||
30 | <script src="js/shaarli.js?v={$version_hash}"></script> | 41 | <script src="js/shaarli.js?v={$version_hash}"></script> |
31 | <script src="inc/awesomplete.js?v={$version_hash}#"></script> | 42 | <script src="inc/awesomplete.js?v={$version_hash}#"></script> |
32 | <script src="inc/awesomplete-multiple-tags.js?v={$version_hash}#"></script> | 43 | <script src="inc/awesomplete-multiple-tags.js?v={$version_hash}#"></script> |
diff --git a/tpl/default/pluginsadmin.html b/tpl/default/pluginsadmin.html index 5cc1802f..717cb517 100644 --- a/tpl/default/pluginsadmin.html +++ b/tpl/default/pluginsadmin.html | |||
@@ -116,8 +116,8 @@ | |||
116 | </section> | 116 | </section> |
117 | 117 | ||
118 | <div class="center more"> | 118 | <div class="center more"> |
119 | More plugins available | 119 | {"More plugins available"|t} |
120 | <a href="doc/Community-&-Related-software.html#third-party-plugins">in the documentation</a>. | 120 | <a href="doc/Community-&-Related-software.html#third-party-plugins">{"in the documentation"|t}</a>. |
121 | </div> | 121 | </div> |
122 | <div class="center"> | 122 | <div class="center"> |
123 | <input type="submit" value="{'Save'|t}" name="save"> | 123 | <input type="submit" value="{'Save'|t}" name="save"> |