WP Native Dashboard - Version 1.3.1

Version Description

Download this release

Release Info

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

Code changes from version 1.3.0 to 1.3.1

automattic.php CHANGED
@@ -6,6 +6,12 @@ if (!function_exists ('add_action')) {
6
  exit();
7
  }
8
 
 
 
 
 
 
 
9
  class wp_native_dashboard_automattic {
10
  function wp_native_dashboard_automattic($tagged, $root_tagged) {
11
  $this->tagged_version = $tagged;
@@ -57,13 +63,13 @@ class wp_native_dashboard_automattic {
57
  closeOnEscape: false,
58
  modal: true,
59
  resizable: false,
60
- title: '<b><?php echo js_escape(__('User Credentials required', 'wp-native-dashboard')); ?></b>',
61
  buttons: {
62
- "<?php echo js_escape(__('Ok', 'wp-native-dashboard')); ?>": function() {
63
  jQuery('#csp-credentials').dialog("close");
64
  elem.trigger('click');
65
  },
66
- "<?php echo js_escape(__('Cancel', 'wp-native-dashboard')); ?>": function() {
67
  elem.parent().find('.ajax-feedback').css({visibility : 'hidden' });
68
  jQuery('#csp-credentials').dialog("close");
69
  }
@@ -81,9 +87,9 @@ class wp_native_dashboard_automattic {
81
  closeOnEscape: false,
82
  modal: true,
83
  resizable: false,
84
- title: '<b><?php echo js_escape('Error', 'wp-native-dashboard'); ?></b>',
85
  buttons: {
86
- "<?php echo js_escape(__('Ok', 'wp-native-dashboard')); ?>": function() {
87
  elem.parent().find('.ajax-feedback').css({visibility : 'hidden' });
88
  jQuery('#csp-credentials').dialog("close");
89
  },
@@ -171,13 +177,13 @@ class wp_native_dashboard_automattic {
171
  closeOnEscape: false,
172
  modal: true,
173
  resizable: false,
174
- title: '<b><?php echo js_escape(__('User Credentials required', 'wp-native-dashboard')); ?></b>',
175
  buttons: {
176
- "<?php echo js_escape(__('Ok', 'wp-native-dashboard')); ?>": function() {
177
  jQuery('#csp-credentials').dialog("close");
178
  elem.trigger('click');
179
  },
180
- "<?php echo js_escape(__('Cancel', 'wp-native-dashboard')); ?>": function() {
181
  elem.parent().find('.ajax-feedback').css({visibility : 'hidden' });
182
  jQuery('#csp-credentials').dialog("close");
183
  }
@@ -195,9 +201,9 @@ class wp_native_dashboard_automattic {
195
  closeOnEscape: false,
196
  modal: true,
197
  resizable: false,
198
- title: '<b><?php echo js_escape(__('Error', 'wp-native-dashboard')); ?></b>',
199
  buttons: {
200
- "<?php echo js_escape(__('Ok', 'wp-native-dashboard')); ?>": function() {
201
  jQuery('#csp-credentials').dialog("close");
202
  },
203
  },
@@ -288,7 +294,7 @@ class wp_native_dashboard_automattic {
288
  $found = false;
289
  $tagged = $this->tagged_version;
290
 
291
- if (!is_wp_error($response_mo)){
292
  if (preg_match("/href\s*=\s*\"".$lang."\.mo\"/", $response_mo['body']))
293
  $found = true;
294
  }
@@ -296,7 +302,7 @@ class wp_native_dashboard_automattic {
296
  $url = $url_root;
297
  $tagged = $this->root_tagged_version;
298
  $response_mo = @wp_remote_get($url);
299
- if (!is_wp_error($response_mo)){
300
  if (preg_match("/href\s*=\s*\"".$lang."\.mo\"/", $response_mo['body']))
301
  $found = true;
302
  }
@@ -424,8 +430,9 @@ class wp_native_dashboard_automattic {
424
  if (preg_match('/\/tags\/(\d+\.\d+|\d+\.\d+\.\d+)\/messages/', $_POST['file'], $h)) {
425
  $tagged = $h[1];
426
  }
 
427
  $response_mo = @wp_remote_get("http://svn.automattic.com/wordpress-i18n/".$lang."/tags/".$tagged."/messages/".$file);
428
- if(!is_wp_error($response_mo)) {
429
  ob_start();
430
  if ( WP_Filesystem($credentials) && is_object($wp_filesystem) ) {
431
  $dir = $wp_filesystem->find_folder(WP_LANG_DIR.'/');
@@ -446,18 +453,63 @@ class wp_native_dashboard_automattic {
446
  $done = $wp_filesystem->put_contents($dir.$file, $response_mo['body']);
447
  if ($done) {
448
  global $wp_version;
449
- if (version_compare($wp_version, '2.8', '>=')) {
450
- $response_cities_mo = @wp_remote_get("http://svn.automattic.com/wordpress-i18n/".$lang."/tags/".$tagged."/dist/wp-content/languages/continents-cities-".$file);
451
- if(!is_wp_error($response_cities_mo)) {
452
- $wp_filesystem->put_contents($dir.'continents-cities-'.$file, $response_cities_mo['body']);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
453
  }
454
  }
455
- if (wp_native_dashboard_is_rtl_language($lang)) {
456
- $content = wp_native_dashboard_rtl_extension_file_content();
457
- $response_php = @wp_remote_get("http://svn.automattic.com/wordpress-i18n/".$lang."/tags/".$tagged."/dist/wp-content/languages/".$lang.'.php');
458
- if(!is_wp_error($response_php)) { $content = $response_php['body']; }
459
- $wp_filesystem->put_contents($dir.$lang.'.php', $content);
460
- }
461
  ob_end_clean();
462
  $mo = str_replace('\\', '/', WP_LANG_DIR.'/'.$file);
463
  ?>
6
  exit();
7
  }
8
 
9
+ if (!function_exists('esc_js')) {
10
+ function esc_js($text) {
11
+ return js_escape($text);
12
+ }
13
+ }
14
+
15
  class wp_native_dashboard_automattic {
16
  function wp_native_dashboard_automattic($tagged, $root_tagged) {
17
  $this->tagged_version = $tagged;
63
  closeOnEscape: false,
64
  modal: true,
65
  resizable: false,
66
+ title: '<b><?php echo esc_js(__('User Credentials required', 'wp-native-dashboard')); ?></b>',
67
  buttons: {
68
+ "<?php echo esc_js(__('Ok', 'wp-native-dashboard')); ?>": function() {
69
  jQuery('#csp-credentials').dialog("close");
70
  elem.trigger('click');
71
  },
72
+ "<?php echo esc_js(__('Cancel', 'wp-native-dashboard')); ?>": function() {
73
  elem.parent().find('.ajax-feedback').css({visibility : 'hidden' });
74
  jQuery('#csp-credentials').dialog("close");
75
  }
87
  closeOnEscape: false,
88
  modal: true,
89
  resizable: false,
90
+ title: '<b><?php echo esc_js(__('Error', 'wp-native-dashboard')); ?></b>',
91
  buttons: {
92
+ "<?php echo esc_js(__('Ok', 'wp-native-dashboard')); ?>": function() {
93
  elem.parent().find('.ajax-feedback').css({visibility : 'hidden' });
94
  jQuery('#csp-credentials').dialog("close");
95
  },
177
  closeOnEscape: false,
178
  modal: true,
179
  resizable: false,
180
+ title: '<b><?php echo esc_js(__('User Credentials required', 'wp-native-dashboard')); ?></b>',
181
  buttons: {
182
+ "<?php echo esc_js(__('Ok', 'wp-native-dashboard')); ?>": function() {
183
  jQuery('#csp-credentials').dialog("close");
184
  elem.trigger('click');
185
  },
186
+ "<?php echo esc_js(__('Cancel', 'wp-native-dashboard')); ?>": function() {
187
  elem.parent().find('.ajax-feedback').css({visibility : 'hidden' });
188
  jQuery('#csp-credentials').dialog("close");
189
  }
201
  closeOnEscape: false,
202
  modal: true,
203
  resizable: false,
204
+ title: '<b><?php echo esc_js(__('Error', 'wp-native-dashboard')); ?></b>',
205
  buttons: {
206
+ "<?php echo esc_js(__('Ok', 'wp-native-dashboard')); ?>": function() {
207
  jQuery('#csp-credentials').dialog("close");
208
  },
209
  },
294
  $found = false;
295
  $tagged = $this->tagged_version;
296
 
297
+ if (!is_wp_error($response_mo)&&($response_mo['response']['code'] != 404)){
298
  if (preg_match("/href\s*=\s*\"".$lang."\.mo\"/", $response_mo['body']))
299
  $found = true;
300
  }
302
  $url = $url_root;
303
  $tagged = $this->root_tagged_version;
304
  $response_mo = @wp_remote_get($url);
305
+ if (!is_wp_error($response_mo)&&($response_mo['response']['code'] != 404)){
306
  if (preg_match("/href\s*=\s*\"".$lang."\.mo\"/", $response_mo['body']))
307
  $found = true;
308
  }
430
  if (preg_match('/\/tags\/(\d+\.\d+|\d+\.\d+\.\d+)\/messages/', $_POST['file'], $h)) {
431
  $tagged = $h[1];
432
  }
433
+
434
  $response_mo = @wp_remote_get("http://svn.automattic.com/wordpress-i18n/".$lang."/tags/".$tagged."/messages/".$file);
435
+ if(!is_wp_error($response_mo) && ($response_mo['response']['code'] != 404)) {
436
  ob_start();
437
  if ( WP_Filesystem($credentials) && is_object($wp_filesystem) ) {
438
  $dir = $wp_filesystem->find_folder(WP_LANG_DIR.'/');
453
  $done = $wp_filesystem->put_contents($dir.$file, $response_mo['body']);
454
  if ($done) {
455
  global $wp_version;
456
+ $additional_download_files = array(
457
+ //FORMAT: file system name => ( min-version => 'x.x', 'location' => url, 'alternative' => url)
458
+ //continent cities translation
459
+ $dir.'continents-cities-'.$file => array(
460
+ 'min-version' => '2.8',
461
+ 'location' => "http://svn.automattic.com/wordpress-i18n/".$lang."/tags/".$tagged."/dist/wp-content/languages/continents-cities-".$file,
462
+ 'alternative' => "http://svn.automattic.com/wordpress-i18n/".$lang."/tags/".$tagged."/messages/continents-cities-".$file
463
+ ),
464
+ //multisite translations
465
+ $dir.'ms-'.$file => array(
466
+ 'min-version' => '3.0',
467
+ 'location' => "http://svn.automattic.com/wordpress-i18n/".$lang."/tags/".$tagged."/dist/wp-content/languages/ms-".$file,
468
+ 'alternative' => "http://svn.automattic.com/wordpress-i18n/".$lang."/tags/".$tagged."/messages/ms-".$file
469
+ ),
470
+ //RTL or language adjustment support
471
+ $dir.$lang.'.php' => array(
472
+ 'min-version' => '2.0',
473
+ 'location' => "http://svn.automattic.com/wordpress-i18n/".$lang."/tags/".$tagged."/dist/wp-content/languages/".$lang.'.php',
474
+ 'alternative' => false
475
+ ),
476
+ //language related stylesheet extensions
477
+ $dir.$lang.'.css' => array(
478
+ 'min-version' => '3.0',
479
+ 'location' => "http://svn.automattic.com/wordpress-i18n/".$lang."/tags/".$tagged."/dist/wp-content/languages/".$lang.'.css',
480
+ 'alternative' => false
481
+ ),
482
+ $dir.$lang.'-ie.css' => array(
483
+ 'min-version' => '3.0',
484
+ 'location' => "http://svn.automattic.com/wordpress-i18n/".$lang."/tags/".$tagged."/dist/wp-content/languages/".$lang.'-ie.css',
485
+ 'alternative' => false
486
+ ),
487
+ $dir.'ms-'.$lang.'.css' => array(
488
+ 'min-version' => '3.0',
489
+ 'location' => "http://svn.automattic.com/wordpress-i18n/".$lang."/tags/".$tagged."/dist/wp-content/languages/ms-".$lang.'.css',
490
+ 'alternative' => false
491
+ )
492
+ );
493
+
494
+ foreach($additional_download_files as $fsf => $desc) {
495
+ if (version_compare($wp_version, $desc['min-version'], '>=')) {
496
+ $response_additional = @wp_remote_get($desc['location']);
497
+ if(is_wp_error($response_additional)||($response_additional['response']['code'] == 404)) {
498
+ if ($desc['alternative'] !== false) {
499
+ $response_additional = @wp_remote_get($desc['alternative']);
500
+ }
501
+ }
502
+ if(!is_wp_error($response_additional)&&($response_additional['response']['code'] != 404)) {
503
+ $wp_filesystem->put_contents($fsf, $response_additional['body']);
504
+ }else {
505
+ //special turn for required but not yet provided RTL extension files
506
+ //enables RTL support for affected languages anyway
507
+ if (($fsf == $dir.$lang.'.php') && wp_native_dashboard_is_rtl_language($lang)) {
508
+ $wp_filesystem->put_contents($fsf, wp_native_dashboard_rtl_extension_file_content());
509
+ }
510
+ }
511
  }
512
  }
 
 
 
 
 
 
513
  ob_end_clean();
514
  $mo = str_replace('\\', '/', WP_LANG_DIR.'/'.$file);
515
  ?>
css/style-rtl.css CHANGED
@@ -24,6 +24,7 @@
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;
24
  border-radius: 12px;
25
  border-style:solid;
26
  border-width:1px;
27
+ overflow: hidden;
28
  }
29
  #csp-langswitcher-actions .slide-down {
30
  background:#797979 url(../img/fav-top.png) repeat-x scroll 0 center;
i18n/wp-native-dashboard-de_DE.mo CHANGED
Binary file
i18n/wp-native-dashboard-de_DE.po CHANGED
@@ -19,40 +19,40 @@ msgstr ""
19
  "X-Poedit-SearchPath-0: .\n"
20
  "X-Textdomain-Support: yes"
21
 
22
- #: automattic.php:262
23
  #@ wp-native-dashboard
24
  msgid "The network connection to <strong>svn.automattic.com</strong> is currently not available. Please try again later."
25
  msgstr "Die Netzwerkverbindung zu <strong>svn.automattic.com</strong> ist derzeit nicht verfügbar. Bitte versuchen Sie es später erneut."
26
 
27
- #: automattic.php:309
28
- #: automattic.php:466
29
- #: wp-native-dashboard.php:315
30
  #@ wp-native-dashboard
31
  msgid "right to left"
32
  msgstr "rechts nach links"
33
 
34
- #: automattic.php:312
35
  #@ wp-native-dashboard
36
  msgid "Download"
37
  msgstr "Herunterladen"
38
 
39
- #: automattic.php:380
40
  #@ wp-native-dashboard
41
  msgid "You do not have the permission to delete language files."
42
  msgstr "Sie haben nicht die Berechtigung zum Löschen von Sprachdateien."
43
 
44
- #: automattic.php:468
45
- #: wp-native-dashboard.php:317
46
  #@ wp-native-dashboard
47
  msgid "Delete"
48
  msgstr "Löschen"
49
 
50
- #: automattic.php:479
51
  #@ wp-native-dashboard
52
  msgid "The download is currently not available."
53
  msgstr "Der Download ist derzeit nicht verfügbar."
54
 
55
- #: wp-native-dashboard.php:332
56
  #@ wp-native-dashboard
57
  msgid "Available for download:"
58
  msgstr "verfügbare Downloads:"
@@ -68,114 +68,120 @@ msgstr "Sprache"
68
  msgid "Select your prefered language that will be used to show the Admin Center."
69
  msgstr "Wählen Sie Ihre bevorzugte Sprache, die im Admin-Center verwendet werden soll."
70
 
71
- #: wp-native-dashboard.php:232
72
  #@ wp-native-dashboard
73
  msgid "Native Dashboard"
74
  msgstr "Native Dashboard"
75
 
76
- #: wp-native-dashboard.php:247
77
  msgid "Cheatin&#8217; uh?"
78
  msgstr ""
79
 
80
- #: wp-native-dashboard.php:278
81
  #@ wp-native-dashboard
82
  msgid "Capabilities"
83
  msgstr "Fähigkeiten"
84
 
85
- #: wp-native-dashboard.php:279
86
  #@ wp-native-dashboard
87
  msgid "Installed Languages"
88
  msgstr "Installierte Sprachen"
89
 
90
- #: wp-native-dashboard.php:280
91
  #@ wp-native-dashboard
92
  msgid "Downloads"
93
  msgstr "Downloads"
94
 
95
- #: wp-native-dashboard.php:287
96
  #@ wp-native-dashboard
97
  msgid "extend the <em>WordPress Logon Screen</em> to choose a language too."
98
  msgstr "erweitere den <em>WordPress Anmelde-Bildschirm</em> um eine Sprache auszuwählen."
99
 
100
- #: wp-native-dashboard.php:290
101
  #@ wp-native-dashboard
102
  msgid "extend <a href=\"profile.php\" target=\"_blank\">Personal Profile Settings</a> with users prefered language."
103
  msgstr "erweitere die <a href=\"profile.php\" target=\"_blank\">persönlichen Profil-Einstellungen</a> um eine benutzerspezifische Sprachwahl."
104
 
105
- #: wp-native-dashboard.php:293
106
  #@ wp-native-dashboard
107
  msgid "extend <em>Admin Center Headline</em> with a language quick selector."
108
  msgstr "erweitere die <em>Admin-Center Kopfzeile</em> mit einer Sprachumschaltung."
109
 
110
- #: wp-native-dashboard.php:296
111
  #@ wp-native-dashboard
112
  msgid "read more &raquo;"
113
  msgstr "Lesen Sie mehr »"
114
 
115
- #: wp-native-dashboard.php:296
116
  #@ wp-native-dashboard
117
  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)."
118
  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önnte 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)."
119
 
120
- #: wp-native-dashboard.php:304
121
  #@ wp-native-dashboard
122
  msgid "Your WordPress installation currectly supports this list of languages at your Dashboard."
123
  msgstr "Ihre WordPress-Installation unterstützt momentan diese Liste der Sprachen in Ihrem Dashboard."
124
 
125
- #: wp-native-dashboard.php:332
126
  #@ wp-native-dashboard
127
  msgid "check repository &raquo;"
128
  msgstr "prüfen »"
129
 
130
- #: wp-native-dashboard.php:352
131
  #@ wp-native-dashboard
132
  msgid "Native Dashboard Settings"
133
  msgstr "Native Dashboard Einstellungen"
134
 
135
- #: wp-native-dashboard.php:371
136
  #@ wp-native-dashboard
137
  msgid "cleanup all settings at plugin deactivation."
138
  msgstr "alle Einstellungen bei Plugin-Deaktivierung entfernen."
139
 
140
- #: automattic.php:62
141
- #: automattic.php:86
142
- #: automattic.php:176
143
- #: automattic.php:200
144
  #@ wp-native-dashboard
145
  msgid "Ok"
146
  msgstr "Ok"
147
 
148
- #: automattic.php:66
149
- #: automattic.php:180
150
  #@ wp-native-dashboard
151
  msgid "Cancel"
152
  msgstr "Abbrechen"
153
 
154
- #: automattic.php:198
 
155
  #@ wp-native-dashboard
156
  msgid "Error"
157
  msgstr "Fehler"
158
 
159
- #: automattic.php:60
160
- #: automattic.php:174
161
  #@ wp-native-dashboard
162
  msgid "User Credentials required"
163
  msgstr "Anmeldeinformationen erforderlich"
164
 
165
- #: wp-native-dashboard.php:331
166
  #@ wp-native-dashboard
167
  msgid "A lot of languages should be provided by polyglott translation teams as download into your WordPress installation."
168
  msgstr "Viele Sprachen werden von Polyglott Übersetzungsteams als Download für Ihre WordPress-Installation angeboten."
169
 
170
- #: automattic.php:363
171
  #, php-format
172
  #@ wp-native-dashboard
173
  msgid "The language file %s you tried to delete does not exist."
174
  msgstr "Die Sprachdatei %s die Sie löschen möchten, gibt es nicht."
175
 
176
- #: automattic.php:442
177
  #, php-format
178
  #@ wp-native-dashboard
179
  msgid "The missing languages directory could not be created at '%s'."
180
  msgstr "Das fehlenden Sprachdatei-Verzeichnis konnte nicht erstellt werden in '%s'."
181
 
 
 
 
 
 
19
  "X-Poedit-SearchPath-0: .\n"
20
  "X-Textdomain-Support: yes"
21
 
22
+ #: automattic.php:268
23
  #@ wp-native-dashboard
24
  msgid "The network connection to <strong>svn.automattic.com</strong> is currently not available. Please try again later."
25
  msgstr "Die Netzwerkverbindung zu <strong>svn.automattic.com</strong> ist derzeit nicht verfügbar. Bitte versuchen Sie es später erneut."
26
 
27
+ #: automattic.php:315
28
+ #: automattic.php:491
29
+ #: wp-native-dashboard.php:320
30
  #@ wp-native-dashboard
31
  msgid "right to left"
32
  msgstr "rechts nach links"
33
 
34
+ #: automattic.php:318
35
  #@ wp-native-dashboard
36
  msgid "Download"
37
  msgstr "Herunterladen"
38
 
39
+ #: automattic.php:386
40
  #@ wp-native-dashboard
41
  msgid "You do not have the permission to delete language files."
42
  msgstr "Sie haben nicht die Berechtigung zum Löschen von Sprachdateien."
43
 
44
+ #: automattic.php:493
45
+ #: wp-native-dashboard.php:322
46
  #@ wp-native-dashboard
47
  msgid "Delete"
48
  msgstr "Löschen"
49
 
50
+ #: automattic.php:504
51
  #@ wp-native-dashboard
52
  msgid "The download is currently not available."
53
  msgstr "Der Download ist derzeit nicht verfügbar."
54
 
55
+ #: wp-native-dashboard.php:338
56
  #@ wp-native-dashboard
57
  msgid "Available for download:"
58
  msgstr "verfügbare Downloads:"
68
  msgid "Select your prefered language that will be used to show the Admin Center."
69
  msgstr "Wählen Sie Ihre bevorzugte Sprache, die im Admin-Center verwendet werden soll."
70
 
71
+ #: wp-native-dashboard.php:237
72
  #@ wp-native-dashboard
73
  msgid "Native Dashboard"
74
  msgstr "Native Dashboard"
75
 
76
+ #: wp-native-dashboard.php:252
77
  msgid "Cheatin&#8217; uh?"
78
  msgstr ""
79
 
80
+ #: wp-native-dashboard.php:283
81
  #@ wp-native-dashboard
82
  msgid "Capabilities"
83
  msgstr "Fähigkeiten"
84
 
85
+ #: wp-native-dashboard.php:284
86
  #@ wp-native-dashboard
87
  msgid "Installed Languages"
88
  msgstr "Installierte Sprachen"
89
 
90
+ #: wp-native-dashboard.php:285
91
  #@ wp-native-dashboard
92
  msgid "Downloads"
93
  msgstr "Downloads"
94
 
95
+ #: wp-native-dashboard.php:292
96
  #@ wp-native-dashboard
97
  msgid "extend the <em>WordPress Logon Screen</em> to choose a language too."
98
  msgstr "erweitere den <em>WordPress Anmelde-Bildschirm</em> um eine Sprache auszuwählen."
99
 
100
+ #: wp-native-dashboard.php:295
101
  #@ wp-native-dashboard
102
  msgid "extend <a href=\"profile.php\" target=\"_blank\">Personal Profile Settings</a> with users prefered language."
103
  msgstr "erweitere die <a href=\"profile.php\" target=\"_blank\">persönlichen Profil-Einstellungen</a> um eine benutzerspezifische Sprachwahl."
104
 
105
+ #: wp-native-dashboard.php:298
106
  #@ wp-native-dashboard
107
  msgid "extend <em>Admin Center Headline</em> with a language quick selector."
108
  msgstr "erweitere die <em>Admin-Center Kopfzeile</em> mit einer Sprachumschaltung."
109
 
110
+ #: wp-native-dashboard.php:301
111
  #@ wp-native-dashboard
112
  msgid "read more &raquo;"
113
  msgstr "Lesen Sie mehr »"
114
 
115
+ #: wp-native-dashboard.php:301
116
  #@ wp-native-dashboard
117
  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)."
118
  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önnte 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)."
119
 
120
+ #: wp-native-dashboard.php:309
121
  #@ wp-native-dashboard
122
  msgid "Your WordPress installation currectly supports this list of languages at your Dashboard."
123
  msgstr "Ihre WordPress-Installation unterstützt momentan diese Liste der Sprachen in Ihrem Dashboard."
124
 
125
+ #: wp-native-dashboard.php:338
126
  #@ wp-native-dashboard
127
  msgid "check repository &raquo;"
128
  msgstr "prüfen »"
129
 
130
+ #: wp-native-dashboard.php:359
131
  #@ wp-native-dashboard
132
  msgid "Native Dashboard Settings"
133
  msgstr "Native Dashboard Einstellungen"
134
 
135
+ #: wp-native-dashboard.php:378
136
  #@ wp-native-dashboard
137
  msgid "cleanup all settings at plugin deactivation."
138
  msgstr "alle Einstellungen bei Plugin-Deaktivierung entfernen."
139
 
140
+ #: automattic.php:68
141
+ #: automattic.php:92
142
+ #: automattic.php:182
143
+ #: automattic.php:206
144
  #@ wp-native-dashboard
145
  msgid "Ok"
146
  msgstr "Ok"
147
 
148
+ #: automattic.php:72
149
+ #: automattic.php:186
150
  #@ wp-native-dashboard
151
  msgid "Cancel"
152
  msgstr "Abbrechen"
153
 
154
+ #: automattic.php:90
155
+ #: automattic.php:204
156
  #@ wp-native-dashboard
157
  msgid "Error"
158
  msgstr "Fehler"
159
 
160
+ #: automattic.php:66
161
+ #: automattic.php:180
162
  #@ wp-native-dashboard
163
  msgid "User Credentials required"
164
  msgstr "Anmeldeinformationen erforderlich"
165
 
166
+ #: wp-native-dashboard.php:337
167
  #@ wp-native-dashboard
168
  msgid "A lot of languages should be provided by polyglott translation teams as download into your WordPress installation."
169
  msgstr "Viele Sprachen werden von Polyglott Übersetzungsteams als Download für Ihre WordPress-Installation angeboten."
170
 
171
+ #: automattic.php:369
172
  #, php-format
173
  #@ wp-native-dashboard
174
  msgid "The language file %s you tried to delete does not exist."
175
  msgstr "Die Sprachdatei %s die Sie löschen möchten, gibt es nicht."
176
 
177
+ #: automattic.php:448
178
  #, php-format
179
  #@ wp-native-dashboard
180
  msgid "The missing languages directory could not be created at '%s'."
181
  msgstr "Das fehlenden Sprachdatei-Verzeichnis konnte nicht erstellt werden in '%s'."
182
 
183
+ #: wp-native-dashboard.php:67
184
+ #@ wp-native-dashboard
185
+ msgid "-n.a.-"
186
+ msgstr ""
187
+
langswitcher.php CHANGED
@@ -81,8 +81,9 @@ class wp_native_dashboard_langswitcher {
81
  function on_ajax_wp_native_dashboard_change_language() {
82
  //TODO: standardize the USER-META behavoir
83
  $u = wp_get_current_user();
84
- if (!$u->wp_native_dashboard_language) exit();
85
- update_usermeta($u->ID, 'wp_native_dashboard_language', $_POST['locale']);
 
86
  exit();
87
  }
88
 
81
  function on_ajax_wp_native_dashboard_change_language() {
82
  //TODO: standardize the USER-META behavoir
83
  $u = wp_get_current_user();
84
+
85
+ if (!isset($u->wp_native_dashboard_language)) exit();
86
+ update_user_meta($u->ID, 'wp_native_dashboard_language', $_POST['locale']);
87
  exit();
88
  }
89
 
loginselector.php CHANGED
@@ -43,7 +43,13 @@ class wp_native_dashboard_loginselector {
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
 
43
 
44
  function on_wp_login($who) {
45
  //TODO: standardize the USER-META behavoir
46
+ global $wp_version;
47
+ if (version_compare($wp_version, '3.0', '>=')) {
48
+ $user = get_user_by( 'login', $who );
49
+ update_user_meta((int)$user->ID, 'wp_native_dashboard_language', $_POST['wp_native_dashboard_language']);
50
+ } else {
51
+ update_usermeta(get_profile('ID', $who), 'wp_native_dashboard_language', $_POST['wp_native_dashboard_language']);
52
+ }
53
  }
54
  }
55
 
personalprofile.php CHANGED
@@ -26,10 +26,10 @@ class wp_native_dashboard_personalprofile {
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\"";
@@ -50,7 +50,7 @@ class wp_native_dashboard_personalprofile {
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
 
26
 
27
  //TODO: standardize the USER-META behavoir
28
  $u = wp_get_current_user();
29
+ if (!isset($u->wp_native_dashboard_language)){
30
  $u->wp_native_dashboard_language = get_locale();
31
  //persist it now for later update only
32
+ update_user_meta($u->ID, 'wp_native_dashboard_language', $u->wp_native_dashboard_language);
33
  }
34
  foreach($langs as $lang) {
35
  echo "<option value=\"$lang\"";
50
  function on_personal_options_update() {
51
  //TODO: standardize the USER-META behavoir
52
  $u = wp_get_current_user();
53
+ update_user_meta($u->ID, 'wp_native_dashboard_language', $_POST['wp_native_dashboard_language']);
54
  }
55
  }
56
 
readme.txt CHANGED
@@ -2,8 +2,8 @@
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
6
- Stable tag: 1.3.0
7
 
8
  Enables selection of administration language either by logon, dashboard quick switcher or user profile setting.
9
 
@@ -46,6 +46,14 @@ Please visit [the official website](http://www.code-styling.de/english/developme
46
 
47
  == Changelog ==
48
 
 
 
 
 
 
 
 
 
49
  = Version 1.3.0 =
50
  * several checks at PHP 5.3 or higher were missing and may stop some functions
51
 
@@ -73,6 +81,12 @@ Please visit [the official website](http://www.code-styling.de/english/developme
73
  = Where can I get more information? =
74
  Please visit [the official website](http://www.code-styling.de/english/development/wordpress-plugin-wp-native-dashboard-en "WP Native Dashboard") for further details, documentation and the latest information on this plugin.
75
 
 
 
 
 
 
 
76
 
77
  == Screenshots ==
78
  1. dashboard quick switcher
2
  Contributors: codestyling
3
  Tags: wordpress, dashboard, multi-lingual, languages, backend, localization, plugin
4
  Requires at least: 2.7
5
+ Tested up to: 3.0
6
+ Stable tag: 1.3.1
7
 
8
  Enables selection of administration language either by logon, dashboard quick switcher or user profile setting.
9
 
46
 
47
  == Changelog ==
48
 
49
+ = Version 1.3.1 =
50
+ * clean working debug mode (removed deprecated warnings)
51
+ * bugfix for user specific values during config
52
+ * checked RTL support and reported new trac ticket: http://core.trac.wordpress.org/ticket/14129
53
+ * language download supports now WP 3.0 new capabilities (ms-xx_XX.mo / xx_XX.css / xx_XX-ie.css / ms-xx_XX.css)
54
+ * bugfix login selector for WP 3.0
55
+ * login permanently denied by some languages like ru_RU (please read Frequently Asked Questions)
56
+
57
  = Version 1.3.0 =
58
  * several checks at PHP 5.3 or higher were missing and may stop some functions
59
 
81
  = Where can I get more information? =
82
  Please visit [the official website](http://www.code-styling.de/english/development/wordpress-plugin-wp-native-dashboard-en "WP Native Dashboard") for further details, documentation and the latest information on this plugin.
83
 
84
+ = Why I can't login anymore if I did download and activate as example ru_RU? =
85
+ This happens if you did not define you own phrases inside the wp-config.php file.
86
+ If the default is still in place at any of those defines like define('AUTH_KEY', 'put your unique phrase here'); the internal validation fails.
87
+ The failure reason is the additional file needed for russian language named "ru_RU.php" in cooperation with your wp-config.php file.
88
+ Inside this file the default phrase has been changed to $wp_default_secret_key = 'впишите сюда уникальную фразу'; instead of original 'put your unique phrase here'.
89
+ This can be solved if you modify the wp-config.php file with your own phases as highly recommended by WP core teams too.
90
 
91
  == Screenshots ==
92
  1. dashboard quick switcher
wp-native-dashboard.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://www.code-styling.de/english/development/wordpress-plugin-wp-
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.3.0
9
 
10
  License:
11
  ==============================================================================
@@ -61,6 +61,13 @@ function wp_native_dashboard_collect_installed_languages() {
61
  return $installed;
62
  }
63
 
 
 
 
 
 
 
 
64
  function wp_native_dashboard_get_name_of($locale) {
65
  global $wpnd_language_names;
66
  list($lang,) = explode('_', $locale);
@@ -97,7 +104,7 @@ class wp_native_dashboard {
97
 
98
  //detect the current main version
99
  global $wp_version;
100
- preg_match("/^(\d+)\.(\d+)\.(\d+|)/", $wp_version, $hits);
101
  $this->root_tagged_version = $hits[1].'.'.$hits[2];
102
  $this->tagged_version = $this->root_tagged_version;
103
  if (!empty($hits[3])) $this->tagged_version .= '.'.$hits[3];
@@ -180,7 +187,7 @@ class wp_native_dashboard {
180
  if (is_admin() && !$skip) {
181
  if (function_exists('wp_get_current_user')) {
182
  $u = wp_get_current_user();
183
- if (!$u->wp_native_dashboard_language) {
184
  if ($loc)
185
  $u->wp_native_dashboard_language = $loc;
186
  else
@@ -201,7 +208,7 @@ class wp_native_dashboard {
201
  function on_init() {
202
  //some modules need to be loaded here, because they have to support ajax or affect the login page :-)
203
  //load the login selector module if it has been enabled to provide language choise at login screen
204
- if ($this->options->enable_login_selector && (is_admin() || defined('DOING_AJAX'))) {
205
  require_once(dirname(__FILE__).'/loginselector.php');
206
  $this->loginselector = new wp_native_dashboard_loginselector();
207
  $this->_load_translation_file();
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.3.1
9
 
10
  License:
11
  ==============================================================================
61
  return $installed;
62
  }
63
 
64
+ //WP 3.0 compatibility
65
+ if(!function_exists('update_user_meta')) {
66
+ function update_user_meta($user_id, $meta_key, $meta_value, $prev_value = '') {
67
+ return update_usermeta($user_id, $meta_key, $meta_value);
68
+ }
69
+ }
70
+
71
  function wp_native_dashboard_get_name_of($locale) {
72
  global $wpnd_language_names;
73
  list($lang,) = explode('_', $locale);
104
 
105
  //detect the current main version
106
  global $wp_version;
107
+ preg_match("/^(\d+)\.(\d+)(\.\d+|)/", $wp_version, $hits);
108
  $this->root_tagged_version = $hits[1].'.'.$hits[2];
109
  $this->tagged_version = $this->root_tagged_version;
110
  if (!empty($hits[3])) $this->tagged_version .= '.'.$hits[3];
187
  if (is_admin() && !$skip) {
188
  if (function_exists('wp_get_current_user')) {
189
  $u = wp_get_current_user();
190
+ if (!isset($u->wp_native_dashboard_language)) {
191
  if ($loc)
192
  $u->wp_native_dashboard_language = $loc;
193
  else
208
  function on_init() {
209
  //some modules need to be loaded here, because they have to support ajax or affect the login page :-)
210
  //load the login selector module if it has been enabled to provide language choise at login screen
211
+ if ($this->options->enable_login_selector /*&& (is_admin() || defined('DOING_AJAX'))*/) {
212
  require_once(dirname(__FILE__).'/loginselector.php');
213
  $this->loginselector = new wp_native_dashboard_loginselector();
214
  $this->_load_translation_file();