WP Native Dashboard - Version 1.0

Version Description

Download this release

Release Info

Developer codestyling
Plugin Icon wp plugin WP Native Dashboard
Version 1.0
Comparing to
See all releases

Version 1.0

Files changed (148) hide show
  1. automattic.php +321 -0
  2. css/style-rtl.css +149 -0
  3. css/style.css +170 -0
  4. i18n/wp-native-dashboard-de_DE.mo +0 -0
  5. i18n/wp-native-dashboard-de_DE.po +178 -0
  6. img/countries/ae.gif +0 -0
  7. img/countries/af.gif +0 -0
  8. img/countries/al.gif +0 -0
  9. img/countries/am.gif +0 -0
  10. img/countries/ar.gif +0 -0
  11. img/countries/at.gif +0 -0
  12. img/countries/au.gif +0 -0
  13. img/countries/az.gif +0 -0
  14. img/countries/ba.gif +0 -0
  15. img/countries/bd.gif +0 -0
  16. img/countries/be.gif +0 -0
  17. img/countries/bg.gif +0 -0
  18. img/countries/bh.gif +0 -0
  19. img/countries/bn.gif +0 -0
  20. img/countries/bo.gif +0 -0
  21. img/countries/br.gif +0 -0
  22. img/countries/by.gif +0 -0
  23. img/countries/bz.gif +0 -0
  24. img/countries/ca.gif +0 -0
  25. img/countries/ch.gif +0 -0
  26. img/countries/ci.gif +0 -0
  27. img/countries/cl.gif +0 -0
  28. img/countries/cn.gif +0 -0
  29. img/countries/co.gif +0 -0
  30. img/countries/cr.gif +0 -0
  31. img/countries/cs.gif +0 -0
  32. img/countries/cy.gif +0 -0
  33. img/countries/cz.gif +0 -0
  34. img/countries/da.gif +0 -0
  35. img/countries/de.gif +0 -0
  36. img/countries/dk.gif +0 -0
  37. img/countries/do.gif +0 -0
  38. img/countries/dz.gif +0 -0
  39. img/countries/ec.gif +0 -0
  40. img/countries/ee.gif +0 -0
  41. img/countries/eg.gif +0 -0
  42. img/countries/en.gif +0 -0
  43. img/countries/eo.gif +0 -0
  44. img/countries/es.gif +0 -0
  45. img/countries/eu.gif +0 -0
  46. img/countries/fi.gif +0 -0
  47. img/countries/fo.gif +0 -0
  48. img/countries/fr.gif +0 -0
  49. img/countries/gb.gif +0 -0
  50. img/countries/gr.gif +0 -0
  51. img/countries/gt.gif +0 -0
  52. img/countries/hk.gif +0 -0
  53. img/countries/hn.gif +0 -0
  54. img/countries/hr.gif +0 -0
  55. img/countries/hu.gif +0 -0
  56. img/countries/id.gif +0 -0
  57. img/countries/ie.gif +0 -0
  58. img/countries/il.gif +0 -0
  59. img/countries/in.gif +0 -0
  60. img/countries/iq.gif +0 -0
  61. img/countries/ir.gif +0 -0
  62. img/countries/is.gif +0 -0
  63. img/countries/it.gif +0 -0
  64. img/countries/ja.gif +0 -0
  65. img/countries/jm.gif +0 -0
  66. img/countries/jo.gif +0 -0
  67. img/countries/jp.gif +0 -0
  68. img/countries/kk.gif +0 -0
  69. img/countries/kp.gif +0 -0
  70. img/countries/kr.gif +0 -0
  71. img/countries/kw.gif +0 -0
  72. img/countries/ky.gif +0 -0
  73. img/countries/lb.gif +0 -0
  74. img/countries/li.gif +0 -0
  75. img/countries/lk.gif +0 -0
  76. img/countries/ls.gif +0 -0
  77. img/countries/lt.gif +0 -0
  78. img/countries/lu.gif +0 -0
  79. img/countries/lv.gif +0 -0
  80. img/countries/ly.gif +0 -0
  81. img/countries/ma.gif +0 -0
  82. img/countries/mk.gif +0 -0
  83. img/countries/mm.gif +0 -0
  84. img/countries/mo.gif +0 -0
  85. img/countries/mt.gif +0 -0
  86. img/countries/mx.gif +0 -0
  87. img/countries/my.gif +0 -0
  88. img/countries/nb.gif +0 -0
  89. img/countries/ni.gif +0 -0
  90. img/countries/nl.gif +0 -0
  91. img/countries/nn.gif +0 -0
  92. img/countries/no.gif +0 -0
  93. img/countries/nz.gif +0 -0
  94. img/countries/om.gif +0 -0
  95. img/countries/pa.gif +0 -0
  96. img/countries/pe.gif +0 -0
  97. img/countries/ph.gif +0 -0
  98. img/countries/pk.gif +0 -0
  99. img/countries/pl.gif +0 -0
  100. img/countries/pr.gif +0 -0
  101. img/countries/pt.gif +0 -0
  102. img/countries/py.gif +0 -0
  103. img/countries/qa.gif +0 -0
  104. img/countries/ro.gif +0 -0
  105. img/countries/rs.gif +0 -0
  106. img/countries/ru.gif +0 -0
  107. img/countries/sa.gif +0 -0
  108. img/countries/se.gif +0 -0
  109. img/countries/sg.gif +0 -0
  110. img/countries/si.gif +0 -0
  111. img/countries/sk.gif +0 -0
  112. img/countries/sv.gif +0 -0
  113. img/countries/sy.gif +0 -0
  114. img/countries/th.gif +0 -0
  115. img/countries/tn.gif +0 -0
  116. img/countries/tr.gif +0 -0
  117. img/countries/tt.gif +0 -0
  118. img/countries/tw.gif +0 -0
  119. img/countries/tz.gif +0 -0
  120. img/countries/ua.gif +0 -0
  121. img/countries/unknown.gif +0 -0
  122. img/countries/us.gif +0 -0
  123. img/countries/uy.gif +0 -0
  124. img/countries/uz.gif +0 -0
  125. img/countries/ve.gif +0 -0
  126. img/countries/vn.gif +0 -0
  127. img/countries/xh.gif +0 -0
  128. img/countries/ye.gif +0 -0
  129. img/countries/za.gif +0 -0
  130. img/countries/zu.gif +0 -0
  131. img/fav-arrow-rtl.png +0 -0
  132. img/fav-arrow.png +0 -0
  133. img/fav-bottom.png +0 -0
  134. img/fav-menu.png +0 -0
  135. img/fav-top.png +0 -0
  136. img/fav.png +0 -0
  137. img/icon/settings.png +0 -0
  138. langswitcher.php +94 -0
  139. loginselector.php +50 -0
  140. personalprofile.php +57 -0
  141. readme.txt +64 -0
  142. screenshot-1.png +0 -0
  143. screenshot-2.png +0 -0
  144. screenshot-3.png +0 -0
  145. screenshot-4.png +0 -0
  146. screenshot-5.png +0 -0
  147. screenshot-6.png +0 -0
  148. wp-native-dashboard.php +401 -0
automattic.php ADDED
@@ -0,0 +1,321 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if (!function_exists ('add_action')) {
4
+ header('Status: 403 Forbidden');
5
+ header('HTTP/1.1 403 Forbidden');
6
+ exit();
7
+ }
8
+
9
+ class wp_native_dashboard_automattic {
10
+ function wp_native_dashboard_automattic($tagged, $root_tagged) {
11
+ $this->tagged_version = $tagged;
12
+ $this->root_tagged_version = $root_tagged;
13
+ add_action('admin_head', array(&$this, 'on_admin_head'));
14
+ add_action('wp_ajax_wp_native_dashboard_check_repository', array(&$this, 'on_ajax_wp_native_dashboard_check_repository'));
15
+ add_action('wp_ajax_wp_native_dashboard_check_language', array(&$this, 'on_ajax_wp_native_dashboard_check_language'));
16
+ add_action('wp_ajax_wp_native_dashboard_delete_language', array(&$this, 'on_ajax_wp_native_dashboard_delete_language'));
17
+ add_action('wp_ajax_wp_native_dashboard_download_language', array(&$this, 'on_ajax_wp_native_dashboard_download_language'));
18
+ }
19
+
20
+ function on_admin_head() {
21
+ ?>
22
+ <script type="text/javascript">
23
+ //<![CDATA[
24
+ function wpnd_delete_language() {
25
+ var elem = jQuery(this);
26
+ jQuery.ajax({
27
+ type: "POST",
28
+ url: "admin-ajax.php",
29
+ data: { action: 'wp_native_dashboard_delete_language', file : jQuery(this).attr('href') },
30
+ success: function(msg){
31
+ elem.parents('tr').fadeOut('slow', function() { jQuery(this).remove(); });
32
+ },
33
+ error: function(XMLHttpRequest, textStatus, errorThrown) {
34
+ //handled in next version that also support all file system types
35
+ }
36
+ });
37
+ return false;
38
+ }
39
+ var last_auto_row = 0;
40
+ function analyse_automattic_repository(idx) {
41
+ if (idx<wp_native_dashboard_repository.entries) {
42
+ if (idx==0) {
43
+ last_auto_row = 0;
44
+ jQuery('#svn-downloads .progressbar>div>div').css({ 'width' : '0%' });
45
+ jQuery('#svn-downloads .progressbar div div div').html('0&nbsp;%');
46
+ jQuery('#svn-downloads .progressbar').show();
47
+ jQuery('#csp-check-repository').parent().find('.ajax-feedback').css({visibility : 'visible' });
48
+ }
49
+ jQuery.post("admin-ajax.php", { action: 'wp_native_dashboard_check_language', language: wp_native_dashboard_repository.langs[idx], row: last_auto_row },
50
+ function(data) {
51
+ if (data != '') {
52
+ jQuery('#table_svn_i18n>tbody').append(data);
53
+ last_auto_row += 1;
54
+ }
55
+ var perc = Math.min((idx+1)*100.0 / wp_native_dashboard_repository.entries, 100.0);
56
+ jQuery('#svn-downloads .progressbar>div>div').css({ 'width' : perc + '%' });
57
+ jQuery('#svn-downloads .progressbar div div div').html(Math.round(perc)+'&nbsp;%');
58
+ window.setTimeout('analyse_automattic_repository('+(idx+1)+')', 50);
59
+ }
60
+ )
61
+ }
62
+ else{
63
+ jQuery('#table_svn_i18n').show();
64
+ jQuery('#svn-downloads .progressbar').hide();
65
+ jQuery('#csp-check-repository').show();
66
+ jQuery('#csp-check-repository').parent().find('.ajax-feedback').css({visibility : 'hidden' });
67
+ jQuery('.csp-download-svn-file').click(function() {
68
+ var elem = jQuery(this);
69
+ elem.parent().find('.ajax-feedback').css({visibility : 'visible' });
70
+ jQuery.ajax({
71
+ type: "POST",
72
+ url: "admin-ajax.php",
73
+ data: { action: 'wp_native_dashboard_download_language', file : elem.attr('href') },
74
+ success: function(msg){
75
+ jQuery('#table_local_i18n').append(msg);
76
+ jQuery('#table_local_i18n tr:last .csp-delete-local-file').click(wpnd_delete_language);
77
+ elem.parents('tr').fadeOut('slow', function() { elem.remove(); });
78
+ elem.parent().find('.ajax-feedback').css({visibility : 'hidden' });
79
+ csl_refresh_language_switcher();
80
+ },
81
+ error: function(XMLHttpRequest, textStatus, errorThrown) {
82
+ //handled in next version that also support all file system types
83
+ elem.parent().find('.ajax-feedback').css({visibility : 'hidden' });
84
+ }
85
+ });
86
+ return false;
87
+ });
88
+ }
89
+ }
90
+ jQuery(document).ready(function($) {
91
+ $('#csp-check-repository').click(function() {
92
+ jQuery('#table_svn_i18n').hide();
93
+ var self = $(this);
94
+ self.parent().find('.ajax-feedback').css({visibility : 'visible' });
95
+ $.post("admin-ajax.php", { action: 'wp_native_dashboard_check_repository' },
96
+ function(data) {
97
+ self.parent().find('.ajax-feedback').css({visibility : 'hidden' });
98
+ $(document.body).append(data);
99
+ }
100
+ )
101
+ return false;
102
+ });
103
+ $('.csp-delete-local-file').click(wpnd_delete_language);
104
+ });
105
+ //]]>
106
+ </script>
107
+ <?php
108
+ }
109
+
110
+ function on_ajax_wp_native_dashboard_check_repository() {
111
+ $installed = wp_native_dashboard_collect_installed_languages();
112
+ $revision = 0;
113
+ $langs = $installed;
114
+ $url = 'http://svn.automattic.com/wordpress-i18n/';
115
+ $response = wp_remote_get($url);
116
+ $error = is_wp_error($response);
117
+ if(!$error) {
118
+ $lines = split("\n",$response['body']);
119
+ foreach($lines as $line) {
120
+ if (preg_match("/href\s*=\s*\"(\S+)\/\"/", $line, $hits)) {
121
+ if (in_array($hits[1], array('tools', 'theme', 'pot', 'http://subversion.tigris.org'))) continue;
122
+ if (preg_match("/@/", $hits[1])) continue;
123
+ if (!in_array($hits[1], $langs)) $langs[] = $hits[1];
124
+ }
125
+ }
126
+ sort($langs);
127
+ }
128
+ ?>
129
+ <script type="text/javascript">
130
+ //<![CDATA[
131
+ var wp_native_dashboard_repository = {
132
+ error: "<?php if(!$error) echo __('The network connection to <strong>svn.automattic.com</strong> is currently not available. Please try again later.', 'wp-native-dashboard'); ?>",
133
+ entries: <?php echo count($langs); ?>,
134
+ langs : ["<?php echo implode('","', $langs); ?>"]
135
+ }
136
+ if(wp_native_dashboard_repository.error.length!=0) {
137
+ jQuery('#csp-check-repository').hide();
138
+ jQuery('#table_svn_i18n tbody').html('');
139
+ analyse_automattic_repository(0);
140
+ }
141
+ else {
142
+ jQuery('#csp-check-repository').hide();
143
+ jQuery('#table_svn_i18n tbody').html('<tr><td align="center">'+wp_native_dashboard_repository.error+'</td></tr>').parent().show();
144
+ }
145
+ //]]>
146
+ </script>
147
+ <?php
148
+ exit();
149
+ }
150
+
151
+ function on_ajax_wp_native_dashboard_check_language() {
152
+ $lang = $_POST['language'];
153
+ $row = $_POST['row'];
154
+ $installed = wp_native_dashboard_collect_installed_languages();
155
+ $url = "http://svn.automattic.com/wordpress-i18n/".$lang."/tags/".$this->tagged_version."/messages/";
156
+ $url_root = "http://svn.automattic.com/wordpress-i18n/".$lang."/tags/".$this->root_tagged_version."/messages/";
157
+ $response_mo = wp_remote_get($url);
158
+ $found = false;
159
+ $tagged = $this->tagged_version;
160
+
161
+ if (!is_wp_error($response_mo)){
162
+ if (preg_match("/href\s*=\s*\"".$lang."\.mo\"/", $response_mo['body']))
163
+ $found = true;
164
+ }
165
+ if ($found === false) {
166
+ $url = $url_root;
167
+ $tagged = $this->root_tagged_version;
168
+ $response_mo = wp_remote_get($url);
169
+ if (!is_wp_error($response_mo)){
170
+ if (preg_match("/href\s*=\s*\"".$lang."\.mo\"/", $response_mo['body']))
171
+ $found = true;
172
+ }
173
+ }
174
+ if ($found === false) exit();
175
+ $url .= $lang.'.mo';
176
+ ?>
177
+ <tr id="tr-i18n-download-<?php echo $lang; ?>" class="<?php if (($row + 1) % 2) echo 'alternate'; ?>">
178
+ <td><span class="i18n-file csp-<?php echo $lang; ?>"><?php echo $lang; ?></span></td>
179
+ <td><?php echo (wp_native_dashboard_is_rtl_language($lang) ? __('right to left', 'wp-native-dashboard') : '&nbsp;'); ?></td>
180
+ <td>-n.a.-</td>
181
+ <td><?php if(!in_array($lang, $installed)) : ?>
182
+ <a class="csp-download-svn-file" href="<?php echo $url; ?>"><?php _e('Download','wp-native-dashboard'); echo '&nbsp;('.$tagged.')'; ?></a>&nbsp;<span><img src="images/loading.gif" class="ajax-feedback" title="" alt="" /></span>
183
+ <?php else: echo '&nbsp;'; endif; ?>
184
+ </td>
185
+ </tr>
186
+ <?php
187
+ exit();
188
+ }
189
+
190
+ function on_ajax_wp_native_dashboard_delete_language() {
191
+ if (is_user_logged_in() && current_user_can('manage_options')) {
192
+ global $wp_filesystem;
193
+ $file = basename($_POST['file']);
194
+ if (file_exists(WP_CONTENT_DIR.'/languages/'.$file)) {
195
+ ob_start();
196
+ if ( WP_Filesystem(true) && is_object($wp_filesystem) ) {
197
+ if($wp_filesystem->delete(WP_CONTENT_DIR.'/languages/'.$file)) {
198
+ $wp_filesystem->delete(WP_CONTENT_DIR.'/languages/'.substr($file, 0, -2).'php');
199
+ $wp_filesystem->delete(WP_CONTENT_DIR.'/languages/continents-cities-'.$file);
200
+ ob_end_clean();
201
+ exit();
202
+ }
203
+ }
204
+ ob_end_clean();
205
+ }
206
+ }
207
+ header('Status: 404 Not Found');
208
+ header('HTTP/1.1 404 Not Found');
209
+ _e("You do not have the permission to delete language files.", 'wp-native-dashboard');
210
+ exit();
211
+ }
212
+
213
+ function on_ajax_wp_native_dashboard_download_language() {
214
+ if (is_user_logged_in() && current_user_can('manage_options')) {
215
+ global $wp_filesystem;
216
+ $file = basename($_POST['file']);
217
+ $lang = substr($file,0,-3);
218
+ $tagged = $this->tagged_version;
219
+ if (preg_match('/\/tags\/(\d+\.\d+|\d+\.\d+\.\d+)\/messages/', $_POST['file'], $h)) {
220
+ $tagged = $h[1];
221
+ }
222
+ $response_mo = wp_remote_get("http://svn.automattic.com/wordpress-i18n/".$lang."/tags/".$tagged."/messages/".$file);
223
+ if(!is_wp_error($response_mo)) {
224
+ ob_start();
225
+ if ( WP_Filesystem(true) && is_object($wp_filesystem) ) {
226
+ $done = $wp_filesystem->put_contents(WP_CONTENT_DIR.'/languages/'.$file, $response_mo['body'], FS_CHMOD_FILE);
227
+ if ($done) {
228
+ global $wp_version;
229
+ if (version_compare($wp_version, '2.8', '>=')) {
230
+ $response_cities_mo = wp_remote_get("http://svn.automattic.com/wordpress-i18n/".$lang."/tags/".$tagged."/dist/wp-content/languages/continents-cities-".$file);
231
+ if(!is_wp_error($response_cities_mo)) {
232
+ $wp_filesystem->put_contents(WP_CONTENT_DIR.'/languages/continents-cities-'.$file, $response_cities_mo['body'], FS_CHMOD_FILE);
233
+ }
234
+ }
235
+ if (wp_native_dashboard_is_rtl_language($lang)) {
236
+ $content = wp_native_dashboard_rtl_extension_file_content();
237
+ $response_php = wp_remote_get("http://svn.automattic.com/wordpress-i18n/".$lang."/tags/".$tagged."/dist/wp-content/languages/".$lang.'.php');
238
+ if(!is_wp_error($response_php)) { $content = $response_php['body']; }
239
+ $wp_filesystem->put_contents(WP_CONTENT_DIR.'/languages/'.$lang.'.php', $content, FS_CHMOD_FILE);
240
+ }
241
+ ob_end_clean();
242
+ $can_write_direct = (get_filesystem_method(array()) == 'direct');
243
+ $mo = str_replace('\\', '/', WP_CONTENT_DIR.'/languages/'.$file);
244
+ ?>
245
+ <tr id="tr-i18n-installed-<?php echo $lang; ?>">
246
+ <td><span class="i18n-file csp-<?php echo $lang; ?>"><?php echo $lang; ?></span></td>
247
+ <td><?php echo (wp_native_dashboard_is_rtl_language($lang) ? __('right to left', 'wp-native-dashboard') : '&nbsp;'); ?></td>
248
+ <td><?php echo filesize($mo).'&nbsp;Bytes'; ?></td>
249
+ <td><?php if($lang != 'en_US' && $can_write_direct) : ?><a class="csp-delete-local-file" href="<?php echo $mo; ?>"><?php _e('Delete','wp-native-dashboard'); ?></a><?php endif; ?></td>
250
+ </tr>
251
+ <?php
252
+ exit();
253
+ }
254
+ }
255
+ ob_end_clean();
256
+ }
257
+ }
258
+ header('Status: 404 Not Found');
259
+ header('HTTP/1.1 404 Not Found');
260
+ _e("The download is currently not available.", 'wp-native-dashboard');
261
+ exit();
262
+ }
263
+
264
+
265
+ function on_print_metabox_automattic_i18n() {
266
+ $installed = wp_native_dashboard_collect_installed_languages();
267
+
268
+ $revision = 0;
269
+ $langs = $installed;
270
+ $url = 'http://svn.automattic.com/wordpress-i18n/';
271
+ $response = wp_remote_get($url);
272
+ $error = is_wp_error($response);
273
+ if(!$error) {
274
+ $lines = split("\n",$response['body']);
275
+ foreach($lines as $line) {
276
+ if (preg_match('/Revision\s*(\d+)/', $line, $hits)) {
277
+ $revision = (int)$hits[1];
278
+ }elseif (preg_match("/href\s*=\s*\"(\S+)\/\"/", $line, $hits)) {
279
+ if (in_array($hits[1], array('tools', 'theme', 'pot', 'http://subversion.tigris.org'))) continue;
280
+ if (preg_match("/@/", $hits[1])) continue;
281
+ if (!in_array($hits[1], $langs)) $langs[] = $hits[1];
282
+ }
283
+ }
284
+ sort($langs);
285
+ }
286
+ ?>
287
+ <p><?php echo sprintf(__('All listed languages <em><small>(rev. %d)</small></em> should be supported by polyglot translation teams as download into your WordPress installation.','wp-native-dashboard'), $revision); ?></p>
288
+ <?php if ($error) : ?>
289
+ <p class="center error"><?php _e('The network connection to <strong>svn.automattic.com</strong> is currently not available. Please try again later.', 'wp-native-dashboard'); ?></p>
290
+ <?php else: ?>
291
+ <p class="csp-read-more center"><?php _e('Available for download:', 'wp-native-dashboard'); ?></p>
292
+ <table id="table_svn_i18n" class="widefat fixed" cellspacing="0">
293
+ <tbody>
294
+ <?php
295
+ $state=0;
296
+ foreach($langs as $lang) {
297
+ $state = ($state + 1) % 2;
298
+ $mo = WP_CONTENT_DIR.'/languages/'.$lang.'.mo';
299
+ ?>
300
+ <tr id="tr-i18n-svn-download-<?php echo $lang; ?>" class="<?php if ($state) echo 'alternate'; ?><?php if (in_array($lang, $installed)) echo " lang-installed"; ?>">
301
+ <td><span class="i18n-file csp-<?php echo $lang; ?>"><?php echo $lang; ?></span></td>
302
+ <td><?php echo (wp_native_dashboard_is_rtl_language($lang) ? __('right to left', 'wp-native-dashboard') : ''); ?></td>
303
+ <td>
304
+ <?php if (in_array($lang, $installed)) :?>
305
+ <?php _e('installed', 'wp-native-dashboard'); ?>
306
+ <?php elseif($lang == 'en_US') : _e('(build in)', 'wp-native-dashboard'); else : ?>
307
+ <a href="http://svn.automattic.com/wordpress-i18n/<?php echo $lang; ?>/tags/<?php echo $this->tagged_version; ?>/messages/<?php echo $lang; ?>.mo"><?php _e('download', 'wp-native-dashboard'); ?></a>&nbsp;<span><img src="images/loading.gif" class="ajax-feedback" title="" alt="" /></span>
308
+ <?php endif; ?>
309
+ </td>
310
+ </tr>
311
+ <?php
312
+ }
313
+ ?>
314
+ </tbody>
315
+ </table>
316
+ <?php endif;
317
+ }
318
+
319
+ }
320
+
321
+ ?>
css/style-rtl.css ADDED
@@ -0,0 +1,149 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ #icon-wp-native-dashboard { background:transparent url(../img/icon/settings.png) no-repeat scroll left top; }
3
+
4
+ /* language switcher styles */
5
+ #csp-langswitcher-actions {
6
+ padding: 0px;
7
+ position:relative;
8
+ top: 11px;
9
+ left: 10px;
10
+ margin-right:20px;
11
+ width: 100px;
12
+ }
13
+ *:first-child + html #csp-langswitcher-actions { z-index: 103; }
14
+
15
+ #csp-langswitcher-current {
16
+ padding: 4px 3px 4px 90px;
17
+ background:#797979 url(../img/fav.png) repeat-x scroll 0 center;
18
+ line-height: 14px;
19
+ vertical-align: middle;
20
+ border-color:#777777 #777777 #666666 !important;
21
+ -moz-border-radius: 12px;
22
+ -khtml-border-radius: 12px;
23
+ -webkit-border-radius: 12px;
24
+ border-radius: 12px;
25
+ border-style:solid;
26
+ border-width:1px;
27
+ }
28
+ #csp-langswitcher-actions .slide-down {
29
+ background:#797979 url(../img/fav-top.png) repeat-x scroll 0 center;
30
+ -moz-border-radius: 12px 12px 0 0;
31
+ -webkit-border-bottom-right-radius: 0;
32
+ -webkit-border-bottom-left-radius: 0;
33
+ -khtml-border-bottom-right-radius: 0;
34
+ -khtml-border-bottom-left-radius: 0;
35
+ border-bottom-right-radius: 0;
36
+ border-bottom-left-radius: 0;
37
+ border-bottom-width: 1px;
38
+ border-bottom-style: solid;
39
+ }
40
+ #csp-langswitcher-current span {
41
+ font-size: 12px; font-family: monospace; margin:0; padding-right: 24px; background:transparent url(../img/countries/unknown.gif) no-repeat right 2px; color: #ddd;
42
+ }
43
+ *:first-child + html #csp-langswitcher-current,
44
+ *:first-child + html #csp-langswitcher-current span {zoom: 100%; } /* IE hack */
45
+ html:first-child>b\ody #csp-langswitcher-current span { padding-right: 0px !important; padding-left: 24px; background:transparent url(../img/countries/unknown.gif) no-repeat 6px 2px; } /*opera*/
46
+
47
+ #csp-langswitcher-toggle {
48
+ right: auto;
49
+ left: 0;
50
+ top:1px;
51
+ background:transparent url(../img/fav-arrow-rtl.png) no-repeat 10px -4px;
52
+ height:22px;
53
+ position:absolute;
54
+ width:28px;
55
+ }
56
+
57
+ #csp-langoptions {
58
+ border-color: #797979;
59
+ background: #797979 url(../img/fav-bottom.png) repeat-x 0 bottom;
60
+ z-index: 102;
61
+ position: absolute;
62
+ display: none;
63
+ padding: 3px;
64
+ padding-bottom: 6px;
65
+ font-size: 12px;
66
+ font-family: monospace;
67
+ -moz-border-radius: 0 0 12px 12px;
68
+ -webkit-border-bottom-right-radius: 12px;
69
+ -webkit-border-bottom-left-radius: 12px;
70
+ -khtml-border-bottom-right-radius: 12px;
71
+ -khtml-border-bottom-left-radius: 12px;
72
+ border-bottom-right-radius: 12px;
73
+ border-bottom-left-radius: 12px;
74
+ border-color: #797979;
75
+ border-style:solid;
76
+ border-width:1px;
77
+ }
78
+
79
+ .csp-langoption { display: block; text-decoration: none !important; color:#ddd; padding: 0px 0px 2px 0px; background:transparent url(../img/countries/unknown.gif) no-repeat right 4px;}
80
+ .csp-langoption span {padding-right: 24px;}
81
+ html:first-child>b\ody .csp-langoption span { padding-right: 0 !important; padding-left: 24px; } /*opera*/
82
+ *:first-child + html .csp-langoption span { padding-right: 0 !important; padding-left: 24px; } /*IE*/
83
+
84
+ a.csp-langoption:hover { background-color: #FFFABF !important; color: #000; }
85
+
86
+ .lang-installed { background-color: #E7F7D3 !important; }
87
+
88
+ .csp-read-more { border-top: 1px dotted #aaa !important; padding:10px 0px 5px 0px !important; font-size:10px !important; }
89
+ .csp-copyright { font-size:8px !important; color: #aaa; margin-top: -25px; margin-right: 10px; }
90
+ .csp-warning { color: #C00; }
91
+
92
+ .i18n-file { font-size: 12px; font-family: monospace; height: 18px; padding-top:2px; padding-right: 24px; background:transparent url(../img/countries/unknown.gif) no-repeat right 2px;}
93
+
94
+
95
+ .csp-af, .csp-af_AF { background:transparent url(../img/countries/af.gif) no-repeat right 2px !important; }
96
+ .csp-bn_BD { background:transparent url(../img/countries/bd.gif) no-repeat right 2px !important; }
97
+ .csp-bg_BG { background:transparent url(../img/countries/bg.gif) no-repeat right 2px !important; }
98
+ .csp-zh_CN { background:transparent url(../img/countries/cn.gif) no-repeat right 2px !important; }
99
+ .csp-zh_HK { background:transparent url(../img/countries/hk.gif) no-repeat right 2px !important; }
100
+ .csp-zh_TW { background:transparent url(../img/countries/tw.gif) no-repeat right 2px !important; }
101
+ .csp-cs_CZ { background:transparent url(../img/countries/cz.gif) no-repeat right 2px !important; }
102
+ .csp-da_DK { background:transparent url(../img/countries/dk.gif) no-repeat right 2px !important; }
103
+ .csp-de, .csp-de_DE { background:transparent url(../img/countries/de.gif) no-repeat right 2px !important; }
104
+ .csp-nl_NL { background:transparent url(../img/countries/nl.gif) no-repeat right 2px !important; }
105
+ .csp-cy, .csp-el_CY { background:transparent url(../img/countries/cy.gif) no-repeat right 2px !important; }
106
+ .csp-el, .csp-el_GR { background:transparent url(../img/countries/gr.gif) no-repeat right 2px !important; }
107
+ .csp-en_US { background:transparent url(../img/countries/us.gif) no-repeat right 2px !important; }
108
+ .csp-eo, .csp-eo_EO { background:transparent url(../img/countries/eo.gif) no-repeat right 2px !important; }
109
+ .csp-et, .csp-et_EE { background:transparent url(../img/countries/ee.gif) no-repeat right 2px !important; }
110
+ .csp-es, .csp-es_ES, .csp-gl_ES, .csp-ca { background:transparent url(../img/countries/es.gif) no-repeat right 2px !important; }
111
+ .csp-eu, .csp-eu_ES { background:transparent url(../img/countries/eu.gif) no-repeat right 2px !important; }
112
+ .csp-fa_IR { background:transparent url(../img/countries/ir.gif) no-repeat right 2px !important; }
113
+ .csp-fi, .csp-fi_FI { background:transparent url(../img/countries/fi.gif) no-repeat right 2px !important; }
114
+ .csp-fo, .csp-fo_FO { background:transparent url(../img/countries/fo.gif) no-repeat right 2px !important; }
115
+ .csp-fr_FR { background:transparent url(../img/countries/fr.gif) no-repeat right 2px !important; }
116
+ .csp-fr_BE { background:transparent url(../img/countries/be.gif) no-repeat right 2px !important; }
117
+ .csp-he_IL { background:transparent url(../img/countries/il.gif) no-repeat right 2px !important; }
118
+ .csp-hi_IN , .csp-ml_IN, .csp-ta_IN { background:transparent url(../img/countries/in.gif) no-repeat right 2px !important; }
119
+ .csp-hr, .csp-hr_HR { background:transparent url(../img/countries/hr.gif) no-repeat right 2px !important; }
120
+ .csp-hu_HU { background:transparent url(../img/countries/hu.gif) no-repeat right 2px !important; }
121
+ .csp-id_ID, .csp-su_ID { background:transparent url(../img/countries/id.gif) no-repeat right 2px !important; }
122
+ .csp-it_IT { background:transparent url(../img/countries/it.gif) no-repeat right 2px !important; }
123
+ .csp-ja, .csp-ja_JP { background:transparent url(../img/countries/jp.gif) no-repeat right 2px !important; }
124
+ .csp-ko_KR { background:transparent url(../img/countries/kr.gif) no-repeat right 2px !important; }
125
+ .csp-ky_KY { background:transparent url(../img/countries/ky.gif) no-repeat right 2px !important; }
126
+ .csp-lv, .csp-lv_LV { background:transparent url(../img/countries/lv.gif) no-repeat right 2px !important; }
127
+ .csp-mk_MK { background:transparent url(../img/countries/mk.gif) no-repeat right 2px !important; }
128
+ .csp-ms_MY {background:transparent url(../img/countries/my.gif) no-repeat right 2px !important; }
129
+ .csp-my_MM {background:transparent url(../img/countries/mm.gif) no-repeat right 2px !important; }
130
+ .csp-nl, .csp-nl_NL {background:transparent url(../img/countries/nl.gif) no-repeat right 2px !important; }
131
+ .csp-nb_NO { background:transparent url(../img/countries/no.gif) no-repeat right 2px !important; }
132
+ .csp-no_NO, .csp-nn_NO { background:transparent url(../img/countries/no.gif) no-repeat right 2px !important; }
133
+ .csp-pl_PL { background:transparent url(../img/countries/pl.gif) no-repeat right 2px !important; }
134
+ .csp-pt_BR { background:transparent url(../img/countries/br.gif) no-repeat right 2px !important; }
135
+ .csp-pt, .csp-pt_PT { background:transparent url(../img/countries/pt.gif) no-repeat right 2px !important; }
136
+ .csp-ro, .csp-ro_RO { background:transparent url(../img/countries/ro.gif) no-repeat right 2px !important; }
137
+ .csp-ru_RU { background:transparent url(../img/countries/ru.gif) no-repeat right 2px !important; }
138
+ .csp-uk, .csp-ru_UA { background:transparent url(../img/countries/ua.gif) no-repeat right 2px !important; }
139
+ .csp-sd_PK { background:transparent url(../img/countries/pk.gif) no-repeat right 2px !important; }
140
+ .csp-si_LK { background:transparent url(../img/countries/lk.gif) no-repeat right 2px !important; }
141
+ .csp-sk, .csp-sk_SK { background:transparent url(../img/countries/sk.gif) no-repeat right 2px !important; }
142
+ .csp-sl_SI { background:transparent url(../img/countries/si.gif) no-repeat right 2px !important; }
143
+ .csp-sq { background:transparent url(../img/countries/al.gif) no-repeat right 2px !important; }
144
+ .csp-sr_CS { background:transparent url(../img/countries/cs.gif) no-repeat right 2px !important; }
145
+ .csp-sr_RS { background:transparent url(../img/countries/rs.gif) no-repeat right 2px !important; }
146
+ .csp-sv_SE { background:transparent url(../img/countries/se.gif) no-repeat right 2px !important; }
147
+ .csp-th, .csp-th_TH { background:transparent url(../img/countries/th.gif) no-repeat right 2px !important; }
148
+ .csp-tr, .csp-tr_TR, .csp-ckb { background:transparent url(../img/countries/tr.gif) no-repeat right 2px !important; }
149
+ .csp-uz_UZ { background:transparent url(../img/countries/uz.gif) no-repeat right 2px !important; }
css/style.css ADDED
@@ -0,0 +1,170 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ #icon-wp-native-dashboard { background:transparent url(../img/icon/settings.png) no-repeat scroll left top; }
3
+
4
+ /* language switcher styles */
5
+ #csp-langswitcher-actions {
6
+ padding: 0px;
7
+ position:relative;
8
+ top: 11px;
9
+ left: 10px;
10
+ margin-right:20px;
11
+ width: 100px;
12
+ }
13
+ *:first-child + html #csp-langswitcher-actions { z-index: 103; }
14
+
15
+ #csp-langswitcher-current {
16
+ padding: 4px 90px 4px 3px;
17
+ background:#797979 url(../img/fav.png) repeat-x scroll 0 center;
18
+ line-height: 14px;
19
+ vertical-align: middle;
20
+ border-color:#777777 #777777 #666666 !important;
21
+ -moz-border-radius: 12px;
22
+ -khtml-border-radius: 12px;
23
+ -webkit-border-radius: 12px;
24
+ border-radius: 12px;
25
+ border-style:solid;
26
+ border-width:1px;
27
+ }
28
+ #csp-langswitcher-actions .slide-down {
29
+ background:#797979 url(../img/fav-top.png) repeat-x scroll 0 center;
30
+ -moz-border-radius: 12px 12px 0 0;
31
+ -webkit-border-bottom-right-radius: 0;
32
+ -webkit-border-bottom-left-radius: 0;
33
+ -khtml-border-bottom-right-radius: 0;
34
+ -khtml-border-bottom-left-radius: 0;
35
+ border-bottom-right-radius: 0;
36
+ border-bottom-left-radius: 0;
37
+ border-bottom-width: 1px;
38
+ border-bottom-style: solid;
39
+ }
40
+ #csp-langswitcher-current span {
41
+ font-size: 10px; /* font-family: monospace; */ margin:0;padding:0; padding-left: 24px; background:transparent url(../img/countries/unknown.gif) no-repeat 2px top; color: #ddd;
42
+ }
43
+ *:first-child + html #csp-langswitcher-current,
44
+ *:first-child + html #csp-langswitcher-current span {zoom: 100%; } /* IE hack */
45
+
46
+ #csp-langswitcher-toggle {
47
+ background:transparent url(../img/fav-arrow.png) no-repeat scroll 0 -4px;
48
+ height:22px;
49
+ position:absolute;
50
+ right:0;
51
+ top:1px;
52
+ width:28px;
53
+ }
54
+
55
+ #csp-langoptions {
56
+ border-color: #797979;
57
+ background: #797979 url(../img/fav-bottom.png) repeat-x 0 bottom;
58
+ z-index: 102;
59
+ position: absolute;
60
+ display: none;
61
+ padding: 3px;
62
+ padding-bottom: 6px;
63
+ font-size: 10px;
64
+ /* font-family: monospace; */
65
+ -moz-border-radius: 0 0 12px 12px;
66
+ -webkit-border-bottom-right-radius: 12px;
67
+ -webkit-border-bottom-left-radius: 12px;
68
+ -khtml-border-bottom-right-radius: 12px;
69
+ -khtml-border-bottom-left-radius: 12px;
70
+ border-bottom-right-radius: 12px;
71
+ border-bottom-left-radius: 12px;
72
+ border-color: #797979;
73
+ border-style:solid;
74
+ border-width:1px;
75
+ }
76
+
77
+ .csp-langoption { display: block; text-decoration: none !important; color:#ddd; padding: 0px 0px 0px 0px; margin-bottom: 6px; background:transparent url(../img/countries/unknown.gif) no-repeat 2px 3px;}
78
+ .csp-langoption span { padding-left: 24px;}
79
+ a.csp-langoption:hover { background-color: #FFFABF !important; color: #000; }
80
+
81
+ .lang-installed { background-color: #E7F7D3 !important; }
82
+
83
+ .csp-read-more { border-top: 1px dotted #aaa !important; padding:10px 0px 5px 0px !important; font-size:10px !important; }
84
+ .csp-copyright { font-size:8px !important; color: #aaa; margin-top: -25px; margin-right: 10px; }
85
+ .csp-warning { color: #C00; }
86
+
87
+ .i18n-file { font-size: 10px; /* font-family: monospace; */ height: 18px; padding-left: 24px; background:transparent url(../img/countries/unknown.gif) no-repeat 2px top;}
88
+
89
+ .csp-af,
90
+ .csp-af_AF { background:transparent url(../img/countries/af.gif) no-repeat 2px top !important; }
91
+ .csp-bn_BD { background:transparent url(../img/countries/bd.gif) no-repeat 2px top !important; }
92
+ .csp-bg_BG { background:transparent url(../img/countries/bg.gif) no-repeat 2px top !important; }
93
+ .csp-zh_CN { background:transparent url(../img/countries/cn.gif) no-repeat 2px top !important; }
94
+ .csp-zh_HK { background:transparent url(../img/countries/hk.gif) no-repeat 2px top !important; }
95
+ .csp-zh_TW { background:transparent url(../img/countries/tw.gif) no-repeat 2px top !important; }
96
+ .csp-cs_CZ { background:transparent url(../img/countries/cz.gif) no-repeat 2px top !important; }
97
+ .csp-da_DK { background:transparent url(../img/countries/dk.gif) no-repeat 2px top !important; }
98
+ .csp-de,
99
+ .csp-de_DE { background:transparent url(../img/countries/de.gif) no-repeat 2px top !important; }
100
+ .csp-nl_NL { background:transparent url(../img/countries/nl.gif) no-repeat 2px top !important; }
101
+ .csp-cy,
102
+ .csp-el_CY { background:transparent url(../img/countries/cy.gif) no-repeat 2px top !important; }
103
+ .csp-el,
104
+ .csp-el_GR { background:transparent url(../img/countries/gr.gif) no-repeat 2px top !important; }
105
+ .csp-en_US { background:transparent url(../img/countries/us.gif) no-repeat 2px top !important; }
106
+ .csp-eo,
107
+ .csp-eo_EO { background:transparent url(../img/countries/eo.gif) no-repeat 2px top !important; }
108
+ .csp-es,
109
+ .csp-es_ES,
110
+ .csp-gl_ES,
111
+ .csp-ca { background:transparent url(../img/countries/es.gif) no-repeat 2px top !important; }
112
+ .csp-et,
113
+ .csp-et_EE { background:transparent url(../img/countries/ee.gif) no-repeat 2px top !important; }
114
+ .csp-eu,
115
+ .csp-eu_ES { background:transparent url(../img/countries/eu.gif) no-repeat 2px top !important; }
116
+ .csp-fa_IR { background:transparent url(../img/countries/ir.gif) no-repeat 2px top !important; }
117
+ .csp-fi,
118
+ .csp-fi_FI { background:transparent url(../img/countries/fi.gif) no-repeat 2px top !important; }
119
+ .csp-fo,
120
+ .csp-fo_FO { background:transparent url(../img/countries/fo.gif) no-repeat 2px top !important; }
121
+ .csp-fr_FR { background:transparent url(../img/countries/fr.gif) no-repeat 2px top !important; }
122
+ .csp-fr_BE { background:transparent url(../img/countries/be.gif) no-repeat 2px top !important; }
123
+ .csp-he_IL { background:transparent url(../img/countries/il.gif) no-repeat 2px top !important; }
124
+ .csp-hi_IN,
125
+ .csp-ml_IN,
126
+ .csp-ta_IN { background:transparent url(../img/countries/in.gif) no-repeat 2px top !important; }
127
+ .csp-hr,
128
+ .csp-hr_HR { background:transparent url(../img/countries/hr.gif) no-repeat 2px top !important; }
129
+ .csp-hu_HU { background:transparent url(../img/countries/hu.gif) no-repeat 2px top !important; }
130
+ .csp-id_ID,
131
+ .csp-su_ID { background:transparent url(../img/countries/id.gif) no-repeat 2px top !important; }
132
+ .csp-it_IT { background:transparent url(../img/countries/it.gif) no-repeat 2px top !important; }
133
+ .csp-ja,
134
+ .csp-ja_JP { background:transparent url(../img/countries/jp.gif) no-repeat 2px top !important; }
135
+ .csp-ko_KR { background:transparent url(../img/countries/kr.gif) no-repeat 2px top !important; }
136
+ .csp-ky_KY { background:transparent url(../img/countries/ky.gif) no-repeat 2px top !important; }
137
+ .csp-lv,
138
+ .csp-lv_LV { background:transparent url(../img/countries/lv.gif) no-repeat 2px top !important; }
139
+ .csp-mk_MK { background:transparent url(../img/countries/mk.gif) no-repeat 2px top !important; }
140
+ .csp-ms_MY { background:transparent url(../img/countries/my.gif) no-repeat 2px top !important; }
141
+ .csp-my_MM { background:transparent url(../img/countries/mm.gif) no-repeat 2px top !important; }
142
+ .csp-nl,
143
+ .csp-nl_NL { background:transparent url(../img/countries/nl.gif) no-repeat 2px top !important; }
144
+ .csp-nb_NO { background:transparent url(../img/countries/no.gif) no-repeat 2px top !important; }
145
+ .csp-no_NO,
146
+ .csp-nn_NO { background:transparent url(../img/countries/no.gif) no-repeat 2px top !important; }
147
+ .csp-pl_PL { background:transparent url(../img/countries/pl.gif) no-repeat 2px top !important; }
148
+ .csp-pt_BR { background:transparent url(../img/countries/br.gif) no-repeat 2px top !important; }
149
+ .csp-pt,
150
+ .csp-pt_PT { background:transparent url(../img/countries/pt.gif) no-repeat 2px top !important; }
151
+ .csp-ro,
152
+ .csp-ro_RO { background:transparent url(../img/countries/ro.gif) no-repeat 2px top !important; }
153
+ .csp-ru_RU { background:transparent url(../img/countries/ru.gif) no-repeat 2px top !important; }
154
+ .csp-uk,
155
+ .csp-ru_UA { background:transparent url(../img/countries/ua.gif) no-repeat 2px top !important; }
156
+ .csp-sd_PK { background:transparent url(../img/countries/pk.gif) no-repeat 2px top !important; }
157
+ .csp-si_LK { background:transparent url(../img/countries/lk.gif) no-repeat 2px top !important; }
158
+ .csp-sk,
159
+ .csp-sk_SK { background:transparent url(../img/countries/sk.gif) no-repeat 2px top !important; }
160
+ .csp-sl_SI { background:transparent url(../img/countries/si.gif) no-repeat 2px top !important; }
161
+ .csp-sq { background:transparent url(../img/countries/al.gif) no-repeat 2px top !important; }
162
+ .csp-sr_CS { background:transparent url(../img/countries/cs.gif) no-repeat 2px top !important; }
163
+ .csp-sr_RS { background:transparent url(../img/countries/rs.gif) no-repeat 2px top !important; }
164
+ .csp-sv_SE { background:transparent url(../img/countries/se.gif) no-repeat 2px top !important; }
165
+ .csp-th,
166
+ .csp-th_TH { background:transparent url(../img/countries/th.gif) no-repeat 2px top !important; }
167
+ .csp-tr,
168
+ .csp-tr_TR,
169
+ .csp-ckb { background:transparent url(../img/countries/tr.gif) no-repeat 2px top !important; }
170
+ .csp-uz_UZ { background:transparent url(../img/countries/uz.gif) no-repeat 2px top !important; }
i18n/wp-native-dashboard-de_DE.mo ADDED
Binary file
i18n/wp-native-dashboard-de_DE.po ADDED
@@ -0,0 +1,178 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: WP Native Dashboard v1.0\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: \n"
6
+ "PO-Revision-Date: 2009-07-13 18:07+0200\n"
7
+ "Last-Translator: admin <webmaster@wordpress28.test>\n"
8
+ "Language-Team: \n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "Plural-Forms: nplurals=2; plural=n != 1;\n"
13
+ "X-Poedit-Language: German\n"
14
+ "X-Poedit-Country: GERMANY\n"
15
+ "X-Poedit-SourceCharset: utf-8\n"
16
+ "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;\n"
17
+ "X-Poedit-Basepath: \n"
18
+ "X-Poedit-Bookmarks: \n"
19
+ "X-Poedit-SearchPath-0: .\n"
20
+ "X-Textdomain-Support: yes"
21
+
22
+ #: automattic.php:132
23
+ #: automattic.php:289
24
+ #@ wp-native-dashboard
25
+ msgid "The network connection to <strong>svn.automattic.com</strong> is currently not available. Please try again later."
26
+ msgstr "Die Netzwerkverbindung zu <strong>svn.automattic.com</strong> ist derzeit nicht verfügbar. Bitte versuchen Sie es später erneut."
27
+
28
+ #: automattic.php:179
29
+ #: automattic.php:247
30
+ #: automattic.php:302
31
+ #: wp-native-dashboard.php:311
32
+ #@ wp-native-dashboard
33
+ msgid "right to left"
34
+ msgstr "rechts nach links"
35
+
36
+ #: automattic.php:182
37
+ #@ wp-native-dashboard
38
+ msgid "Download"
39
+ msgstr "Herunterladen"
40
+
41
+ #: automattic.php:209
42
+ #@ wp-native-dashboard
43
+ msgid "You do not have the permission to delete language files."
44
+ msgstr "Sie haben nicht die Berechtigung zum Löschen von Sprachdateien."
45
+
46
+ #: automattic.php:249
47
+ #: wp-native-dashboard.php:313
48
+ #@ wp-native-dashboard
49
+ msgid "Delete"
50
+ msgstr "Löschen"
51
+
52
+ #: automattic.php:260
53
+ #@ wp-native-dashboard
54
+ msgid "The download is currently not available."
55
+ msgstr "Der Download ist derzeit nicht verfügbar."
56
+
57
+ #: automattic.php:287
58
+ #, php-format
59
+ #@ wp-native-dashboard
60
+ msgid "All listed languages <em><small>(rev. %d)</small></em> should be supported by polyglot translation teams as download into your WordPress installation."
61
+ msgstr "Alle aufgeführten Sprachen <small><em>(rev.% d)</em></small> sollten durch Polyglot Übersetzungteams als Download für Ihre WordPress-Installation verfügbar sein."
62
+
63
+ #: automattic.php:291
64
+ #: wp-native-dashboard.php:332
65
+ #@ wp-native-dashboard
66
+ msgid "Available for download:"
67
+ msgstr "verfügbare Downloads:"
68
+
69
+ #: automattic.php:305
70
+ #@ wp-native-dashboard
71
+ msgid "installed"
72
+ msgstr "installiert"
73
+
74
+ #: automattic.php:306
75
+ #@ wp-native-dashboard
76
+ msgid "(build in)"
77
+ msgstr "(im Aufbau)"
78
+
79
+ #: automattic.php:307
80
+ #@ wp-native-dashboard
81
+ msgid "download"
82
+ msgstr "herunterladen"
83
+
84
+ #: loginselector.php:27
85
+ #: personalprofile.php:20
86
+ #@ wp-native-dashboard
87
+ msgid "Language"
88
+ msgstr "Sprache"
89
+
90
+ #: personalprofile.php:41
91
+ #@ wp-native-dashboard
92
+ msgid "Select your prefered language that will be used to show the Admin Center."
93
+ msgstr "Wählen Sie Ihre bevorzugte Sprache, die im Admin-Center verwendet werden soll."
94
+
95
+ #: wp-native-dashboard.php:218
96
+ #@ wp-native-dashboard
97
+ msgid "Native Dashboard"
98
+ msgstr "Native Dashboard"
99
+
100
+ #: wp-native-dashboard.php:233
101
+ msgid "Cheatin&#8217; uh?"
102
+ msgstr ""
103
+
104
+ #: wp-native-dashboard.php:261
105
+ #@ wp-native-dashboard
106
+ msgid "Capabilities"
107
+ msgstr "Fähigkeiten"
108
+
109
+ #: wp-native-dashboard.php:262
110
+ #@ wp-native-dashboard
111
+ msgid "Installed Languages"
112
+ msgstr "Installierten Sprachen"
113
+
114
+ #: wp-native-dashboard.php:263
115
+ #@ wp-native-dashboard
116
+ msgid "Downloads"
117
+ msgstr "Downloads"
118
+
119
+ #: wp-native-dashboard.php:270
120
+ #@ wp-native-dashboard
121
+ msgid "extend the <em>WordPress Logon Screen</em> to choose a language too."
122
+ msgstr "erweitere den <em>WordPress Anmelde-Bildschirm</em> um eine Sprache auszuwählen."
123
+
124
+ #: wp-native-dashboard.php:273
125
+ #@ wp-native-dashboard
126
+ msgid "extend <a href=\"profile.php\" target=\"_blank\">Personal Profile Settings</a> with users prefered language."
127
+ msgstr "erweitere die <a href=\"profile.php\" target=\"_blank\">persönlichen Profil-Einstellungen</a> um eine benutzerspezifische Sprachwahl."
128
+
129
+ #: wp-native-dashboard.php:276
130
+ #@ wp-native-dashboard
131
+ msgid "extend <em>Admin Center Headline</em> with a language quick selector."
132
+ msgstr "erweitere die <em>Admin-Center Kopfzeile</em> mit einer Sprachumschaltung."
133
+
134
+ #: wp-native-dashboard.php:279
135
+ #@ wp-native-dashboard
136
+ msgid "read more &raquo;"
137
+ msgstr "Lesen Sie mehr »"
138
+
139
+ #: wp-native-dashboard.php:279
140
+ #@ wp-native-dashboard
141
+ msgid "If you are using one of the current available <a href=\"http://wordpress.org/extend/plugins/search.php?q=multilingual\" target=\"_blank\">multilingual plugins</a>, which permits you writing and publishing posts in several languages, you may also have the need, that native speaking authors should be able to choose their prefered backend language while writing. It's your decision if and how this will be possible. This feature set does not impact your frontend language (defined by config or by any multilingual plugin)."
142
+ msgstr "Wenn Sie eines der aktuellen <a href=\"http://wordpress.org/extend/plugins/search.php?q=multilingual\" target=\"_blank\">Plugins für Mehrsprachigkeit</a> benutzen, das Ihnen erlaubt, Beiträge in mehreren Sprachen zu schreiben und zu veröffentlichen, könnten es notwendig werden, dass die muttersprachlichen Autoren in der Lage sein sollten, in ihrer bevorzugte Sprache im Backend zu schreiben. Es ist Ihre Entscheidung, ob und wie dies möglich sein wird. Diese Funktionen haben keinen Einfluss auf Ihre Frontend Sprache (definiert durch die Konfiguration oder durch ein Plugin für Mehrsprachigkeit)."
143
+
144
+ #: wp-native-dashboard.php:287
145
+ #@ wp-native-dashboard
146
+ msgid "Your WordPress installation currectly supports this list of languages at your Dashboard."
147
+ msgstr "Ihre WordPress-Installation unterstützt momentan diese Liste der Sprachen in Ihrem Dashboard."
148
+
149
+ #: wp-native-dashboard.php:328
150
+ #@ wp-native-dashboard
151
+ msgid "A lot of languages should be provided by polyglot translation teams as download into your WordPress installation."
152
+ msgstr "Viele Sprachen werden von Polyglot Übersetzungsteams als Download für Ihre WordPress-Installation angeboten."
153
+
154
+ #: wp-native-dashboard.php:330
155
+ #@ wp-native-dashboard
156
+ msgid "Downloads:"
157
+ msgstr "Downloads:"
158
+
159
+ #: wp-native-dashboard.php:330
160
+ #@ wp-native-dashboard
161
+ msgid "Sorry, your installation doesn't support direct file access, complete support comming soon."
162
+ msgstr "Es tut uns leid, Ihre Installation unterstützt keinen direkten Dateizugriff, volle Unterstützung steht in Kürze zur Verfügung."
163
+
164
+ #: wp-native-dashboard.php:332
165
+ #@ wp-native-dashboard
166
+ msgid "check repository &raquo;"
167
+ msgstr "prüfen »"
168
+
169
+ #: wp-native-dashboard.php:352
170
+ #@ wp-native-dashboard
171
+ msgid "Native Dashboard Settings"
172
+ msgstr "Native Dashboard Einstellungen"
173
+
174
+ #: wp-native-dashboard.php:371
175
+ #@ wp-native-dashboard
176
+ msgid "cleanup all settings at plugin deactivation."
177
+ msgstr "alle Einstellungen bei Plugin-Deaktivierung entfernen."
178
+
img/countries/ae.gif ADDED
Binary file
img/countries/af.gif ADDED
Binary file
img/countries/al.gif ADDED
Binary file
img/countries/am.gif ADDED
Binary file
img/countries/ar.gif ADDED
Binary file
img/countries/at.gif ADDED
Binary file
img/countries/au.gif ADDED
Binary file
img/countries/az.gif ADDED
Binary file
img/countries/ba.gif ADDED
Binary file
img/countries/bd.gif ADDED
Binary file
img/countries/be.gif ADDED
Binary file
img/countries/bg.gif ADDED
Binary file
img/countries/bh.gif ADDED
Binary file
img/countries/bn.gif ADDED
Binary file
img/countries/bo.gif ADDED
Binary file
img/countries/br.gif ADDED
Binary file
img/countries/by.gif ADDED
Binary file
img/countries/bz.gif ADDED
Binary file
img/countries/ca.gif ADDED
Binary file
img/countries/ch.gif ADDED
Binary file
img/countries/ci.gif ADDED
Binary file
img/countries/cl.gif ADDED
Binary file
img/countries/cn.gif ADDED
Binary file
img/countries/co.gif ADDED
Binary file
img/countries/cr.gif ADDED
Binary file
img/countries/cs.gif ADDED
Binary file
img/countries/cy.gif ADDED
Binary file
img/countries/cz.gif ADDED
Binary file
img/countries/da.gif ADDED
Binary file
img/countries/de.gif ADDED
Binary file
img/countries/dk.gif ADDED
Binary file
img/countries/do.gif ADDED
Binary file
img/countries/dz.gif ADDED
Binary file
img/countries/ec.gif ADDED
Binary file
img/countries/ee.gif ADDED
Binary file
img/countries/eg.gif ADDED
Binary file
img/countries/en.gif ADDED
Binary file
img/countries/eo.gif ADDED
Binary file
img/countries/es.gif ADDED
Binary file
img/countries/eu.gif ADDED
Binary file
img/countries/fi.gif ADDED
Binary file
img/countries/fo.gif ADDED
Binary file
img/countries/fr.gif ADDED
Binary file
img/countries/gb.gif ADDED
Binary file
img/countries/gr.gif ADDED
Binary file
img/countries/gt.gif ADDED
Binary file
img/countries/hk.gif ADDED
Binary file
img/countries/hn.gif ADDED
Binary file
img/countries/hr.gif ADDED
Binary file
img/countries/hu.gif ADDED
Binary file
img/countries/id.gif ADDED
Binary file
img/countries/ie.gif ADDED
Binary file
img/countries/il.gif ADDED
Binary file
img/countries/in.gif ADDED
Binary file
img/countries/iq.gif ADDED
Binary file
img/countries/ir.gif ADDED
Binary file
img/countries/is.gif ADDED
Binary file
img/countries/it.gif ADDED
Binary file
img/countries/ja.gif ADDED
Binary file
img/countries/jm.gif ADDED
Binary file
img/countries/jo.gif ADDED
Binary file
img/countries/jp.gif ADDED
Binary file
img/countries/kk.gif ADDED
Binary file
img/countries/kp.gif ADDED
Binary file
img/countries/kr.gif ADDED
Binary file
img/countries/kw.gif ADDED
Binary file
img/countries/ky.gif ADDED
Binary file
img/countries/lb.gif ADDED
Binary file
img/countries/li.gif ADDED
Binary file
img/countries/lk.gif ADDED
Binary file
img/countries/ls.gif ADDED
Binary file
img/countries/lt.gif ADDED
Binary file
img/countries/lu.gif ADDED
Binary file
img/countries/lv.gif ADDED
Binary file
img/countries/ly.gif ADDED
Binary file
img/countries/ma.gif ADDED
Binary file
img/countries/mk.gif ADDED
Binary file
img/countries/mm.gif ADDED
Binary file
img/countries/mo.gif ADDED
Binary file
img/countries/mt.gif ADDED
Binary file
img/countries/mx.gif ADDED
Binary file
img/countries/my.gif ADDED
Binary file
img/countries/nb.gif ADDED
Binary file
img/countries/ni.gif ADDED
Binary file
img/countries/nl.gif ADDED
Binary file
img/countries/nn.gif ADDED
Binary file
img/countries/no.gif ADDED
Binary file
img/countries/nz.gif ADDED
Binary file
img/countries/om.gif ADDED
Binary file
img/countries/pa.gif ADDED
Binary file
img/countries/pe.gif ADDED
Binary file
img/countries/ph.gif ADDED
Binary file
img/countries/pk.gif ADDED
Binary file
img/countries/pl.gif ADDED
Binary file
img/countries/pr.gif ADDED
Binary file
img/countries/pt.gif ADDED
Binary file
img/countries/py.gif ADDED
Binary file
img/countries/qa.gif ADDED
Binary file
img/countries/ro.gif ADDED
Binary file
img/countries/rs.gif ADDED
Binary file
img/countries/ru.gif ADDED
Binary file
img/countries/sa.gif ADDED
Binary file
img/countries/se.gif ADDED
Binary file
img/countries/sg.gif ADDED
Binary file
img/countries/si.gif ADDED
Binary file
img/countries/sk.gif ADDED
Binary file
img/countries/sv.gif ADDED
Binary file
img/countries/sy.gif ADDED
Binary file
img/countries/th.gif ADDED
Binary file
img/countries/tn.gif ADDED
Binary file
img/countries/tr.gif ADDED
Binary file
img/countries/tt.gif ADDED
Binary file
img/countries/tw.gif ADDED
Binary file
img/countries/tz.gif ADDED
Binary file
img/countries/ua.gif ADDED
Binary file
img/countries/unknown.gif ADDED
Binary file
img/countries/us.gif ADDED
Binary file
img/countries/uy.gif ADDED
Binary file
img/countries/uz.gif ADDED
Binary file
img/countries/ve.gif ADDED
Binary file
img/countries/vn.gif ADDED
Binary file
img/countries/xh.gif ADDED
Binary file
img/countries/ye.gif ADDED
Binary file
img/countries/za.gif ADDED
Binary file
img/countries/zu.gif ADDED
Binary file
img/fav-arrow-rtl.png ADDED
Binary file
img/fav-arrow.png ADDED
Binary file
img/fav-bottom.png ADDED
Binary file
img/fav-menu.png ADDED
Binary file
img/fav-top.png ADDED
Binary file
img/fav.png ADDED
Binary file
img/icon/settings.png ADDED
Binary file
langswitcher.php ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if (!function_exists ('add_action')) {
4
+ header('Status: 403 Forbidden');
5
+ header('HTTP/1.1 403 Forbidden');
6
+ exit();
7
+ }
8
+
9
+ class wp_native_dashboard_langswitcher {
10
+ function wp_native_dashboard_langswitcher($plugin_url) {
11
+ global $text_direction;
12
+ if ($text_direction == 'rtl')
13
+ wp_enqueue_style('wp-native-dashboard-css-rtl', $plugin_url.'/css/style-rtl.css');
14
+ else
15
+ wp_enqueue_style('wp-native-dashboard-css', $plugin_url.'/css/style.css');
16
+ add_action('admin_head', array(&$this, 'on_admin_head'));
17
+ add_action('wp_ajax_wp_native_dashboard_change_language', array(&$this, 'on_ajax_wp_native_dashboard_change_language'));
18
+ add_action('wp_ajax_wp_native_dashboard_refresh_switcher', array(&$this, 'on_ajax_wp_native_dashboard_refresh_switcher'));
19
+ }
20
+
21
+ function on_print_dashboard_switcher() {
22
+ $langs = wp_native_dashboard_collect_installed_languages();
23
+
24
+ $loc = get_locale();
25
+ echo '<div id="csp-langswitcher-actions" class="alignleft">';
26
+ echo '<div id="csp-langswitcher-current"><span class="csp-'.$loc.'">'.$loc.'</span></div>';
27
+ echo '<div id="csp-langswitcher-toggle"><br/></div>';
28
+ if (count($langs) > 1) {
29
+ echo '<div id="csp-langoptions" style="width: 92px; display: none;">';
30
+ foreach($langs as $lang) {
31
+ if ($lang != $loc) {
32
+ echo '<a href="javascript:void(0);" class="csp-langoption" hreflang="'.$lang.'"><span class="csp-'.$lang.'">'.$lang.'</span></a>';
33
+ }
34
+ }
35
+ echo '</div>';
36
+ }
37
+ echo '</div>';
38
+ }
39
+
40
+ function on_admin_head() {
41
+ ?>
42
+ <script type="text/javascript">
43
+ //<![CDATA[
44
+ function csl_extend_dashboard_header(html) {
45
+ if (html) {
46
+ jQuery("#csp-langswitcher-actions").remove();
47
+ jQuery("h1:first").before(html);
48
+ }else{
49
+ jQuery("h1:first").before('<?php $this->on_print_dashboard_switcher(); ?>');
50
+ }
51
+ jQuery("#csp-langswitcher").click(function() {
52
+ jQuery(this).blur();
53
+ jQuery("#csp-langoptions").toggle();
54
+ });
55
+ jQuery(".csp-langoption").click(function() {
56
+ jQuery(this).blur();
57
+ jQuery("#csp-langoptions").hide();
58
+ jQuery.post("admin-ajax.php", { action: 'wp_native_dashboard_change_language', locale: jQuery(this).attr('hreflang') },
59
+ function(data) {
60
+ window.location.reload();
61
+ }
62
+ )
63
+ });
64
+ jQuery('#csp-langswitcher-toggle, #csp-langoptions').bind( 'mouseenter', function(){jQuery('#csp-langoptions').removeClass('slideUp').addClass('slideDown'); setTimeout(function(){if ( jQuery('#csp-langoptions').hasClass('slideDown') ) { jQuery('#csp-langoptions').slideDown(100); jQuery('#csp-langswitcher-current').addClass('slide-down'); }}, 200) } );
65
+ jQuery('#csp-langswitcher-toggle, #csp-langoptions').bind( 'mouseleave', function(){jQuery('#csp-langoptions').removeClass('slideDown').addClass('slideUp'); setTimeout(function(){if ( jQuery('#csp-langoptions').hasClass('slideUp') ) { jQuery('#csp-langoptions').slideUp(100, function(){ jQuery('#csp-langswitcher-current').removeClass('slide-down'); } ); }}, 300) } );
66
+ }
67
+ function csl_refresh_language_switcher() {
68
+ jQuery.post("admin-ajax.php", { action: 'wp_native_dashboard_refresh_switcher' },
69
+ function(data) {
70
+ csl_extend_dashboard_header(data);
71
+ }
72
+ )
73
+ }
74
+ jQuery(document).ready(function() {
75
+ csl_extend_dashboard_header(false);
76
+ });
77
+ //]]>
78
+ </script>
79
+ <?php
80
+ }
81
+
82
+ function on_ajax_wp_native_dashboard_change_language() {
83
+ //TODO: standardize the USER-META behavoir
84
+ $u = wp_get_current_user();
85
+ if (!$u->wp_native_dashboard_language) exit();
86
+ update_usermeta($u->ID, 'wp_native_dashboard_language', $_POST['locale']);
87
+ exit();
88
+ }
89
+
90
+ function on_ajax_wp_native_dashboard_refresh_switcher() {
91
+ $this->on_print_dashboard_switcher();
92
+ exit();
93
+ }
94
+ }
loginselector.php ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if (!function_exists ('add_action')) {
4
+ header('Status: 403 Forbidden');
5
+ header('HTTP/1.1 403 Forbidden');
6
+ exit();
7
+ }
8
+
9
+ class wp_native_dashboard_loginselector {
10
+ function wp_native_dashboard_loginselector() {
11
+ add_action('login_head', array(&$this, 'on_login_head'));
12
+ add_action('login_form', array(&$this, 'on_login_form'));
13
+ add_action('wp_login', array(&$this, 'on_wp_login'));
14
+ }
15
+
16
+ function on_login_head() {
17
+ ?>
18
+ <style type="text/css">
19
+ #wp_native_dashboard_language {padding: 2px;border-width: 1px;border-style: solid;height: 2em;vertical-align:top;margin-top: 2px;font-size:16px;width:100%; }
20
+ #wp_native_dashboard_language option { padding-left: 4px; }
21
+ </style>
22
+ <?php
23
+ }
24
+
25
+ function on_login_form() {
26
+ ?>
27
+ <label><?php _e('Language', 'wp-native-dashboard'); ?></label><br/>
28
+ <select id="wp_native_dashboard_language" name="wp_native_dashboard_language" tabindex="30">
29
+ <?php
30
+ $langs = wp_native_dashboard_collect_installed_languages();
31
+
32
+ $loc = get_locale();
33
+ foreach($langs as $lang) {
34
+ echo "<option value=\"$lang\"";
35
+ if ($loc == $lang) echo ' selected="selected"';
36
+ echo ">$lang</option>";
37
+ }
38
+ ?>
39
+ </select>
40
+ <br/><br/>
41
+ <?php
42
+ }
43
+
44
+ function on_wp_login($who) {
45
+ //TODO: standardize the USER-META behavoir
46
+ update_usermeta(get_profile('ID', $who), 'wp_native_dashboard_language', $_POST['wp_native_dashboard_language']);
47
+ }
48
+ }
49
+
50
+ ?>
personalprofile.php ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if (!function_exists ('add_action')) {
4
+ header('Status: 403 Forbidden');
5
+ header('HTTP/1.1 403 Forbidden');
6
+ exit();
7
+ }
8
+
9
+ class wp_native_dashboard_personalprofile {
10
+ function wp_native_dashboard_personalprofile() {
11
+ add_action('profile_personal_options', array(&$this, 'on_profile_personal_options'));
12
+ add_action('personal_options_update', array(&$this, 'on_personal_options_update'));
13
+ }
14
+
15
+ function on_profile_personal_options() {
16
+ ?>
17
+ <table class="form-table">
18
+ <tbody>
19
+ <tr valign="top">
20
+ <th scope="row"><?php _e('Language', 'wp-native-dashboard'); ?></th>
21
+ <td>
22
+ <label>
23
+ <select name="wp_native_dashboard_language">
24
+ <?php
25
+ $langs = wp_native_dashboard_collect_installed_languages();
26
+
27
+ //TODO: standardize the USER-META behavoir
28
+ $u = wp_get_current_user();
29
+ if (!$u->wp_native_dashboard_language) {
30
+ $u->wp_native_dashboard_language = get_locale();
31
+ //persist it now for later update only
32
+ update_usermeta($u->ID, 'wp_native_dashboard_language', $u->wp_native_dashboard_language);
33
+ }
34
+ foreach($langs as $lang) {
35
+ echo "<option value=\"$lang\"";
36
+ if ($u->wp_native_dashboard_language == $lang) echo ' selected="selected"';
37
+ echo ">$lang</option>";
38
+ }
39
+ ?>
40
+ </select>
41
+ <?php _e('Select your prefered language that will be used to show the Admin Center.','wp-native-dashboard'); ?>
42
+ </label>
43
+ </td>
44
+ </tr>
45
+ </tbody>
46
+ </table>
47
+ <?php
48
+ }
49
+
50
+ function on_personal_options_update() {
51
+ //TODO: standardize the USER-META behavoir
52
+ $u = wp_get_current_user();
53
+ update_usermeta($u->ID, 'wp_native_dashboard_language', $_POST['wp_native_dashboard_language']);
54
+ }
55
+ }
56
+
57
+ ?>
readme.txt ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === WP Native Dashboard ===
2
+ Contributors: codestyling
3
+ Tags: wordpress, dashboard, multi-lingual, languages, backend, localization, plugin
4
+ Requires at least: 2.7
5
+ Tested up to: 2.9-rare
6
+ Stable tag: 1.0
7
+
8
+ Enables selection of administration language either by logon, dashboard quick switcher or user profile setting.
9
+
10
+ == Description ==
11
+
12
+ This plugin enables the selection of your prefered language the dashboard (and whole administration) will be shown during your work.
13
+ Several options can be enabled and also combinations out of:
14
+
15
+ 1. logon screen extension - user can specify his/her prefered language during logon
16
+ 1. dashboard quick switcher extension - user can easily switch language at every admin page
17
+ 1. user profile setting - each user can define at profile his/her prefered language
18
+
19
+ The plugin also includes a repository scan on demand (svn.automattic.com) for available language file downloads.
20
+ You can download the required files into your installation and immediately use them at admin pages.
21
+ The new administration page is restricted to administrators only, the profile setting also work for subscriber.
22
+ Currently downloads are limit to direct file access at your host and will be deactivated if impossible.
23
+
24
+ = Next Steps =
25
+
26
+ Upcomming versions will support also those hoster, that have strong permissions and/or safemode environments.
27
+ The download of language files will be done like plugin updates (using FTP instead).
28
+ If you have a local WordPress community providing their own downloads for language files, please let me know, if you would like to get it integrated it too.
29
+
30
+ = Requirements =
31
+
32
+ 1. WordPress version 2.7 and later
33
+ 1. PHP Interpreter version 4.4.2 or later
34
+
35
+ Official Website comming soon, is in progress.
36
+
37
+ == Installation ==
38
+
39
+ 1. Uncompress the download package
40
+ 1. Upload folder including all files and sub directories to the `/wp-content/plugins/` directory.
41
+ 1. Activate the plugin through the 'Plugins' menu in WordPress
42
+ 1. Navigate to your Dashboard and enjoy status informations
43
+
44
+ == Changelog ==
45
+
46
+ = Version 1.0 =
47
+ * initial version
48
+
49
+
50
+ == Frequently Asked Questions ==
51
+ = History? =
52
+ Official Website comming soon, is in progress.
53
+
54
+ = Where can I get more information? =
55
+ Official Website comming soon, is in progress.
56
+
57
+
58
+ == Screenshots ==
59
+ 1. dashboard quick switcher
60
+ 1. user profile setting extension
61
+ 1. extended WordPress login screen
62
+ 1. administration page
63
+ 1. download scan process
64
+ 1. full administration page
screenshot-1.png ADDED
Binary file
screenshot-2.png ADDED
Binary file
screenshot-3.png ADDED
Binary file
screenshot-4.png ADDED
Binary file
screenshot-5.png ADDED
Binary file
screenshot-6.png ADDED
Binary file
wp-native-dashboard.php ADDED
@@ -0,0 +1,401 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Plugin Name: WP Native Dashboard
4
+ Plugin URI: http://www.code-styling.de
5
+ Description: You can configure your blog working at administration with different languages depends on users choice and capabilities the admin has been enabled.
6
+ Author: Heiko Rabe
7
+ Author URI: http://www.code-styling.de/
8
+ Version: 1.0
9
+
10
+ License:
11
+ ==============================================================================
12
+ Copyright 2009 Heiko Rabe (email : info@code-styling.de)
13
+
14
+ This program is free software; you can redistribute it and/or modify
15
+ it under the terms of the GNU General Public License as published by
16
+ the Free Software Foundation; either version 2 of the License, or
17
+ (at your option) any later version.
18
+
19
+ This program is distributed in the hope that it will be useful,
20
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
21
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22
+ GNU General Public License for more details.
23
+
24
+ You should have received a copy of the GNU General Public License
25
+ along with this program; if not, write to the Free Software
26
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
27
+ */
28
+
29
+ //avoid direct calls to this file where wp core files not present
30
+ if (!function_exists ('add_action')) {
31
+ header('Status: 403 Forbidden');
32
+ header('HTTP/1.1 403 Forbidden');
33
+ exit();
34
+ }
35
+
36
+ if ( !defined('WP_PLUGIN_URL') )
37
+ define('WP_PLUGIN_URL', WP_CONTENT_URL.'/plugins');
38
+
39
+ function wp_native_dashboard_collect_installed_languages() {
40
+ $installed = array();
41
+ $d = @opendir(WP_CONTENT_DIR.'/languages');
42
+ if (!$d) return false;
43
+ while(false !== ($item = readdir($d))) {
44
+ $f = str_replace("\\",'/',WP_CONTENT_DIR.'/languages' . '/' . $item);
45
+ if ('.' == $item || '..' == $item)
46
+ continue;
47
+ if (is_file($f)){
48
+ if (preg_match("/^([a-z][a-z]_[A-Z][A-Z]|[a-z][a-z]|[a-z][a-z][a-z]?)\.mo$/", $item, $h)) {
49
+ $installed[] = $h[1];
50
+ }
51
+ }
52
+ }
53
+ closedir($d);
54
+ if (!in_array('en_US', $installed)) $installed[] = 'en_US';
55
+ sort($installed);
56
+ return $installed;
57
+ }
58
+
59
+ function wp_native_dashboard_is_rtl_language($locale) {
60
+ $rtl = array('ar', 'ckb', 'fa', 'he', 'ur');
61
+ return in_array(array_shift(split('_',$locale)), $rtl);
62
+ }
63
+
64
+ function wp_native_dashboard_rtl_extension_file_content() {
65
+ return '<?php'."\n".'$text_direction = \'rtl\';'."\n".'?>"';
66
+ }
67
+
68
+ class wp_native_dashboard {
69
+
70
+ function wp_native_dashboard() {
71
+ //options defaults
72
+ $this->defaults = new stdClass;
73
+ $this->defaults->version = '1.0';
74
+ $this->defaults->installed = false;
75
+ $this->defaults->enable_login_selector = false;
76
+ $this->defaults->enable_profile_extension = false;
77
+ $this->defaults->enable_language_switcher = false;
78
+ $this->defaults->cleanup_on_deactivate = false;
79
+
80
+ //try to get the options now
81
+ $this->options = get_option('wp-native-dashboard', $this->defaults);
82
+
83
+ //keep it for later use
84
+ $this->plugin_url = WP_PLUGIN_URL.'/'.dirname(plugin_basename(__FILE__));
85
+
86
+ //detect the current main version
87
+ global $wp_version;
88
+ preg_match("/^(\d+)\.(\d+)\.(\d+|)/", $wp_version, $hits);
89
+ $this->root_tagged_version = $hits[1].'.'.$hits[2];
90
+ $this->tagged_version = $this->root_tagged_version;
91
+ if (!empty($hits[3])) $this->tagged_version .= '.'.$hits[3];
92
+
93
+ //register at plugin activation/deactivation hooks
94
+ register_activation_hook(plugin_basename(__FILE__), array(&$this, 'activate_plugin'));
95
+ register_deactivation_hook(plugin_basename(__FILE__), array(&$this, 'deactivate_plugin'));
96
+
97
+ //if the activation has been failed, show it
98
+ $this->_display_version_errors();
99
+
100
+ add_filter('locale', array(&$this, 'on_locale'), 9999);
101
+ add_action('init', array(&$this, 'on_init'));
102
+ add_action('admin_menu', array(&$this, 'on_admin_menu'));
103
+ //add filter for WordPress 2.8 changed backend box system !
104
+ add_filter('screen_layout_columns', array(&$this, 'on_screen_layout_columns'), 10, 2);
105
+ add_action('admin_post_wp_native_dashoard_save_settings', array(&$this, 'on_save_settings'));
106
+
107
+ $this->i18n_loaded = false;
108
+ }
109
+
110
+ //check required versions
111
+ function _get_version_errors() {
112
+ $res = array();
113
+ global $wp_version;
114
+ if (!version_compare($wp_version, '2.7alpha', '>=')) {
115
+ $res['WordPress Version'] = array('required' => '2.7alpha', 'found' => $wp_version);
116
+ }
117
+ if (!version_compare(phpversion(), '4.4.3', '>=')) {
118
+ $res['PHP Version'] = array('required' => '4.4.3', 'found' => phpversion());
119
+ }
120
+ return $res;
121
+ }
122
+
123
+ //display potential install errors
124
+ function _display_version_errors() {
125
+ if (($_GET['action'] == 'error_scrape') && ($_GET['plugin'] == plugin_basename(__FILE__) )) {
126
+ $version_error = $this->_get_version_errors();
127
+ if (count($version_error) != 0) {
128
+ echo "<table>";
129
+ echo "<tr style=\"font-size: 12px;\"><td><strong style=\"border-bottom: 1px solid #000;\">Plugin can not be activated.</strong></td><td> | required</td><td> | actual</td></tr>";
130
+ foreach($version_error as $key => $value) {
131
+ echo "<tr style=\"font-size: 12px;\"><td>$key</td><td align=\"center\"> &gt;= <strong>".$value['required']."</strong></td><td align=\"center\"><span style=\"color:#f00;\">".$value['found']."</span></td></tr>";
132
+ }
133
+ echo "</table>";
134
+ }
135
+ }
136
+ }
137
+
138
+ //try to activate this plugin and rollback on insufficiant requirements
139
+ function activate_plugin() {
140
+ $version_error = $this->_get_version_errors();
141
+ if (count($version_error) != 0) {
142
+ $current = get_option('active_plugins');
143
+ array_splice($current, array_search(plugin_basename(__FILE__), $current), 1 );
144
+ update_option('active_plugins', $current);
145
+ exit();
146
+ }
147
+ if (!$this->options->installed) {
148
+ $this->options->installed = true;
149
+ add_option('wp-native-dashboard', $this->options);
150
+ }
151
+
152
+ }
153
+
154
+ //deactivate the plugin and make a decision what's to cleanup
155
+ function deactivate_plugin() {
156
+ if ($this->options->cleanup_on_deactivate) {
157
+ delete_option('wp-native-dashboard');
158
+ //cleanup the user dependend settings (cleanup of all profiles affected currently not supported by WP core!)
159
+ //TODO: standardize the USER-META behavoir
160
+ global $wpdb;
161
+ $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->usermeta WHERE meta_key = %s", 'wp_native_dashboard_language') );
162
+ }
163
+ }
164
+
165
+ //setup the correct user prefered language
166
+ function on_locale($loc) {
167
+ $skip = !$this->options->enable_login_selector && !$this->options->enable_profile_extension && !$this->options->enable_language_switcher;
168
+ if (is_admin() && !$skip) {
169
+ if (function_exists('wp_get_current_user')) {
170
+ $u = wp_get_current_user();
171
+ if (!$u->wp_native_dashboard_language) {
172
+ if ($loc)
173
+ $u->wp_native_dashboard_language = $loc;
174
+ else
175
+ $u->wp_native_dashboard_language = 'en_US';
176
+ }
177
+ return $u->wp_native_dashboard_language;
178
+ }
179
+ }
180
+ return $loc;
181
+ }
182
+
183
+ function _load_translation_file() {
184
+ if ($this->i18n_loaded) return;
185
+ load_plugin_textdomain('wp-native-dashboard', false, dirname( plugin_basename(__FILE__) ) . '/i18n' );
186
+ $this->i18n_loaded = true;
187
+ }
188
+
189
+ function on_init() {
190
+ //some modules need to be loaded here, because they have to support ajax or affect the login page :-)
191
+ //load the login selector module if it has been enabled to provide language choise at login screen
192
+ if ($this->options->enable_login_selector && (is_admin() || DOING_AJAX)) {
193
+ require_once(dirname(__FILE__).'/loginselector.php');
194
+ $this->loginselector = new wp_native_dashboard_loginselector();
195
+ require_once(dirname(__FILE__).'/automattic.php');
196
+ $this->automattic = new wp_native_dashboard_automattic($this->tagged_version, $this->root_tagged_version);
197
+ $this->_load_translation_file();
198
+ }
199
+ //do all stuff while we are at admin center
200
+ if (is_admin()) {
201
+ //load the language switcher ajax module if it has been enabled to provide the dropdown extenstion
202
+ if ($this->options->enable_language_switcher) {
203
+ require_once(dirname(__FILE__).'/langswitcher.php');
204
+ $this->langswitcher = new wp_native_dashboard_langswitcher($this->plugin_url);
205
+ $this->_load_translation_file();
206
+ }
207
+ }
208
+ }
209
+
210
+ function on_admin_menu() {
211
+ //load the personal profile setting extension if needed
212
+ if ($this->options->enable_profile_extension) {
213
+ require_once(dirname(__FILE__).'/personalprofile.php');
214
+ $this->langswitcher = new wp_native_dashboard_personalprofile();
215
+ }
216
+ $this->_load_translation_file();
217
+ //add our own option page, you can also add it to different sections or use your own one
218
+ $this->pagehook = add_options_page(__("Native Dashboard", "wp-native-dashboard" ), __("Native Dashboard", "wp-native-dashboard" ), 'manage_options', 'wp-native-dashboard', array(&$this, 'on_show_page'));
219
+ //register callback gets call prior your own page gets rendered
220
+ add_action('load-'.$this->pagehook, array(&$this, 'on_load_page'));
221
+ }
222
+
223
+ //for WordPress 2.8 we have to tell, that we could support 2 columns, but currently only set to 1
224
+ function on_screen_layout_columns($columns, $screen) {
225
+ if ($screen == $this->pagehook) {
226
+ $columns[$this->pagehook] = 1;
227
+ }
228
+ return $columns;
229
+ }
230
+
231
+ function on_save_settings() {
232
+ if (!is_user_logged_in() || !current_user_can('manage_options') )
233
+ wp_die( __('Cheatin&#8217; uh?') );
234
+ //cross check the given referer
235
+ check_admin_referer('wp_native_dashoard_save_settings');
236
+ //handle here the DB saving of configuration options,
237
+ $this->options = $this->defaults;
238
+ foreach(array_keys(get_object_vars($this->defaults)) as $key) {
239
+ if (isset($_POST[$key]))
240
+ $this->options->$key = $_POST[$key];
241
+ }
242
+ update_option('wp-native-dashboard', $this->options);
243
+ wp_redirect($_POST['_wp_http_referer']);
244
+ }
245
+
246
+ //will be executed if wordpress core detects this page has to be rendered
247
+ function on_load_page() {
248
+ //ensure, that the needed javascripts been loaded to allow drag/drop, expand/collapse and hide/show of boxes
249
+ wp_enqueue_script('common');
250
+ wp_enqueue_script('wp-lists');
251
+ wp_enqueue_script('postbox');
252
+
253
+ // enqueue here your scripts/css needed for page or load some additional data
254
+ global $text_direction;
255
+ if ($text_direction == 'rtl')
256
+ wp_enqueue_style('wp-native-dashboard-css-rtl', $this->plugin_url.'/css/style-rtl.css');
257
+ else
258
+ wp_enqueue_style('wp-native-dashboard-css', $this->plugin_url.'/css/style.css');
259
+
260
+ //add several metaboxes now, all metaboxes registered during load page can be switched off/on at "Screen Options" automatically, nothing special to do therefore
261
+ add_meta_box('wp-native-dashboard-acl', __('Capabilities', 'wp-native-dashboard'), array(&$this, 'on_print_metabox_content_acl'), $this->pagehook, 'normal', 'core');
262
+ add_meta_box('wp-native-dashboard-installed-i18n', __('Installed Languages', 'wp-native-dashboard'), array(&$this, 'on_print_metabox_installed_i18n'), $this->pagehook, 'normal', 'core');
263
+ add_meta_box('wp-native-dashboard-download-i18n', __('Downloads', 'wp-native-dashboard').' <small style="font-weight:normal;">(<i>svn.automattic.com</i>)</small>', array(&$this, 'on_print_metabox_automattic_i18n'), $this->pagehook, 'normal', 'core');
264
+ }
265
+
266
+ function on_print_metabox_content_acl($data) {
267
+ ?>
268
+ <p>
269
+ <input id="enable_login_selector" type="checkbox" value="1" name="enable_login_selector"<?php if ($this->options->enable_login_selector) echo ' checked="checked"'; ?> />
270
+ <?php _e('extend the <em>WordPress Logon Screen</em> to choose a language too.', "wp-native-dashboard"); ?>
271
+ </p><p>
272
+ <input id="enable_profile_extension" type="checkbox" value="1" name="enable_profile_extension"<?php if ($this->options->enable_profile_extension) echo ' checked="checked"'; ?> />
273
+ <?php _e('extend <a href="profile.php" target="_blank">Personal Profile Settings</a> with users prefered language.', "wp-native-dashboard"); ?>
274
+ </p><p>
275
+ <input id="enable_language_switcher" type="checkbox" value="1" name="enable_language_switcher"<?php if ($this->options->enable_language_switcher) echo ' checked="checked"'; ?> />
276
+ <?php _e('extend <em>Admin Center Headline</em> with a language quick selector.', "wp-native-dashboard"); ?>
277
+ </p>
278
+ <p class="csp-read-more">
279
+ <em><a href="javascript:void(0)" onclick="jQuery(this).slideUp();jQuery('#wpf-languages').slideDown();"><?php _e('read more &raquo;', "wp-native-dashboard"); ?></a><span id="wpf-languages" style="display:none;"><?php _e('If you are using one of the current available <a href="http://wordpress.org/extend/plugins/search.php?q=multilingual" target="_blank">multilingual plugins</a>, which permits you writing and publishing posts in several languages, you may also have the need, that native speaking authors should be able to choose their prefered backend language while writing. It\'s your decision if and how this will be possible. This feature set does not impact your frontend language (defined by config or by any multilingual plugin).', "wp-native-dashboard"); ?></span></em>
280
+ </p>
281
+ <?php
282
+ }
283
+
284
+ function on_print_metabox_installed_i18n() {
285
+ $installed = wp_native_dashboard_collect_installed_languages();
286
+ ?>
287
+ <p><?php _e('Your WordPress installation currectly supports this list of languages at your Dashboard.','wp-native-dashboard'); ?></p>
288
+ <?php
289
+ //global $wp_filesystem;
290
+ //var_dump($wp_filesystem);
291
+ //$url = wp_nonce_url('options-general.php?page=wp-native-dashboard');
292
+ //var_dump(get_filesystem_method(array()));
293
+ //var_dump(request_filesystem_credentials($url));
294
+ // wp-admin/includes/plugin.php:412
295
+ // wp-admin/includes/file.php:631
296
+
297
+ //testing if we are able to use direct file system
298
+ //TODO: next version will support also all other types
299
+ $can_write_direct = (get_filesystem_method(array()) == 'direct');
300
+ ?>
301
+ <table id="table_local_i18n" class="widefat fixed" cellspacing="0">
302
+ <tbody>
303
+ <?php
304
+ $state=0;
305
+ foreach($installed as $lang) {
306
+ $state = ($state + 1) % 2;
307
+ $mo = str_replace('\\','/', WP_CONTENT_DIR.'/languages/'.$lang.'.mo');
308
+ ?>
309
+ <tr id="tr-i18n-installed-<?php echo $lang; ?>" class="<?php if ($state) echo 'alternate'; ?>">
310
+ <td><span class="i18n-file csp-<?php echo $lang; ?>"><?php echo $lang; ?></span></td>
311
+ <td><?php echo (wp_native_dashboard_is_rtl_language($lang) ? __('right to left', 'wp-native-dashboard') : '&nbsp;'); ?></td>
312
+ <td><?php echo (is_file($mo) ? filesize($mo). '&nbsp;Bytes' : '-n.a.-'); ?></td>
313
+ <td><?php if($lang != 'en_US' && $can_write_direct) : ?><a class="csp-delete-local-file" href="<?php echo $mo; ?>"><?php _e('Delete','wp-native-dashboard'); ?></a><?php endif; ?></td>
314
+ </tr>
315
+ <?php
316
+ }
317
+ ?>
318
+ </tbody>
319
+ </table>
320
+ <?php
321
+ }
322
+
323
+ function on_print_metabox_automattic_i18n() {
324
+ $color = '#21759B';
325
+ $perc = 0.0;
326
+ $can_write_direct = (get_filesystem_method(array()) == 'direct');
327
+ ?>
328
+ <p><?php echo sprintf(__('A lot of languages should be provided by polyglot translation teams as download into your WordPress installation.','wp-native-dashboard'), $revision); ?></p>
329
+ <?php if (!$can_write_direct) : ?>
330
+ <p class="csp-read-more center"><b><?php _e('Downloads:', 'wp-native-dashboard'); ?></b>&nbsp;<?php _e('Sorry, your installation doesn\'t support direct file access, complete support comming soon.', 'wp-native-dashboard'); ?></p>
331
+ <?php else : ?>
332
+ <p class="csp-read-more center"><?php _e('Available for download:', 'wp-native-dashboard'); ?> <a id="csp-check-repository" href="#svn"><?php _e('check repository &raquo;','wp-native-dashboard'); ?></a> <span><img src="images/loading.gif" class="ajax-feedback" title="" alt="" /></span></p>
333
+ <div id="svn-downloads">
334
+ <div class="progressbar" style="display:none;">
335
+ <div class="widget" style="height:12px; border:1px solid #DDDDDD; background-color:#F9F9F9;width:100%; margin: 3px 0;">
336
+ <div class="widget" style="width: <?php echo min($perc, 100.0) ?>%;height:100%;background-color:<?php echo $color; ?>!important;border-width:0px;text-shadow:0 1px 0 #000000;color:#FFFFFF;text-align:right;font-weight:bold;font-size:8px;margin-bottom:4px;"><div style="padding:0 10px 0 0; white-space:nowrap;word-wrap:normal!important;overflow: hidden;"><?php echo $perc; ?>&nbsp;%</div></div>
337
+ </div>
338
+ </div>
339
+ <table id="table_svn_i18n" class="widefat fixed" cellspacing="0" style="display:none">
340
+ <tbody></tbody>
341
+ </table>
342
+ </div>
343
+ <?php endif;
344
+ }
345
+
346
+ //executed to show the plugins complete admin page
347
+ function on_show_page() {
348
+ global $screen_layout_columns;
349
+ ?>
350
+ <div id="howto-metaboxes-general" class="wrap">
351
+ <?php screen_icon('wp-native-dashboard'); ?>
352
+ <h2><?php _e("Native Dashboard Settings", "wp-native-dashboard"); ?></h2>
353
+ <form action="admin-post.php" method="post">
354
+ <?php wp_nonce_field('wp_native_dashoard_save_settings'); ?>
355
+ <?php wp_nonce_field('closedpostboxes', 'closedpostboxesnonce', false ); ?>
356
+ <?php wp_nonce_field('meta-box-order', 'meta-box-order-nonce', false ); ?>
357
+ <input type="hidden" name="action" value="wp_native_dashoard_save_settings" />
358
+
359
+ <div id="poststuff" class="metabox-holder<?php echo 2 == $screen_layout_columns ? ' has-right-sidebar' : ''; ?>">
360
+ <div id="side-info-column" class="inner-sidebar">
361
+ <?php do_meta_boxes($this->pagehook, 'side', $data); ?>
362
+ </div>
363
+ <div id="post-body" class="has-sidebar">
364
+ <div id="post-body-content" class="has-sidebar-content">
365
+ <?php do_meta_boxes($this->pagehook, 'normal', $data); ?>
366
+ <br/>
367
+ <p class="csp-read-more">
368
+ <span class="alignright csp-copyright">copyright &copy 2008 - 2009 by Heiko Rabe</span>
369
+ <label for="cleanup_on_deactivate" class="alignleft">
370
+ <input id="cleanup_on_deactivate" type="checkbox" value="1" name="cleanup_on_deactivate"<?php if ($this->options->cleanup_on_deactivate) echo ' checked="checked"'; ?> />
371
+ <span class="csp-warning"><?php _e('cleanup all settings at plugin deactivation.', 'wp-native-dashboard'); ?></span>
372
+ </label>
373
+ <br class="clear"/>
374
+ </p>
375
+ <p>
376
+ <input type="submit" value="Save Changes" class="button-primary" name="Submit"/>
377
+ </p>
378
+ </div>
379
+ </div>
380
+ <br class="clear"/>
381
+ </div>
382
+ </form>
383
+ </div>
384
+ <script type="text/javascript">
385
+ //<![CDATA[
386
+ jQuery(document).ready( function($) {
387
+ // close postboxes that should be closed
388
+ $('.if-js-closed').removeClass('if-js-closed').addClass('closed');
389
+ // postboxes setup
390
+ postboxes.add_postbox_toggles('<?php echo $this->pagehook; ?>');
391
+ });
392
+ //]]>
393
+ </script>
394
+
395
+ <?php
396
+ }
397
+ }
398
+
399
+ $my_wp_native_dashboard = new wp_native_dashboard();
400
+
401
+ ?>