Version Description
Download this release
Release Info
Developer | codestyling |
Plugin | WP Native Dashboard |
Version | 1.3.3 |
Comparing to | |
See all releases |
Code changes from version 1.3.2 to 1.3.3
- css/style-rtl.css +3 -0
- css/style.css +3 -0
- i18n/wp-native-dashboard-de_DE.mo +0 -0
- i18n/wp-native-dashboard-de_DE.po +45 -39
- langswitcher.php +23 -2
- readme.txt +5 -2
- wp-native-dashboard.php +14 -4
css/style-rtl.css
CHANGED
@@ -91,6 +91,9 @@ html:first-child>b\ody .csp-langoption span { padding-right: 0 !important; paddi
|
|
91 |
|
92 |
a.csp-langoption:hover { background-color: #FFFABF !important; color: #000; }
|
93 |
|
|
|
|
|
|
|
94 |
.lang-installed { background-color: #E7F7D3 !important; }
|
95 |
|
96 |
.csp-read-more { border-top: 1px dotted #aaa !important; padding:10px 0px 5px 0px !important; font-size:10px !important; }
|
91 |
|
92 |
a.csp-langoption:hover { background-color: #FFFABF !important; color: #000; }
|
93 |
|
94 |
+
#wp-admin-bar-wpnd-lang-cur a span span { padding-right: 24px !important; }
|
95 |
+
.csp-langoption-adminbar a span { padding-right: 24px !important; background-position: 2px 8px !important; }
|
96 |
+
|
97 |
.lang-installed { background-color: #E7F7D3 !important; }
|
98 |
|
99 |
.csp-read-more { border-top: 1px dotted #aaa !important; padding:10px 0px 5px 0px !important; font-size:10px !important; }
|
css/style.css
CHANGED
@@ -86,6 +86,9 @@
|
|
86 |
.csp-langoption span { padding-left: 24px; }
|
87 |
a.csp-langoption:hover { background-color: #FFFABF !important; color: #000; }
|
88 |
|
|
|
|
|
|
|
89 |
.lang-installed { background-color: #E7F7D3 !important; }
|
90 |
|
91 |
.csp-read-more { border-top: 1px dotted #aaa !important; padding:10px 0px 5px 0px !important; font-size:10px !important; }
|
86 |
.csp-langoption span { padding-left: 24px; }
|
87 |
a.csp-langoption:hover { background-color: #FFFABF !important; color: #000; }
|
88 |
|
89 |
+
#wp-admin-bar-wpnd-lang-cur a span span { padding-left: 24px !important; }
|
90 |
+
.csp-langoption-adminbar a span { padding-left: 24px !important; background-position: 2px 8px !important; }
|
91 |
+
|
92 |
.lang-installed { background-color: #E7F7D3 !important; }
|
93 |
|
94 |
.csp-read-more { border-top: 1px dotted #aaa !important; padding:10px 0px 5px 0px !important; font-size:10px !important; }
|
i18n/wp-native-dashboard-de_DE.mo
CHANGED
Binary file
|
i18n/wp-native-dashboard-de_DE.po
CHANGED
@@ -13,46 +13,46 @@ msgstr ""
|
|
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:
|
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:
|
28 |
-
#: automattic.php:
|
29 |
-
#: wp-native-dashboard.php:
|
30 |
#@ wp-native-dashboard
|
31 |
msgid "right to left"
|
32 |
msgstr "rechts nach links"
|
33 |
|
34 |
-
#: automattic.php:
|
35 |
#@ wp-native-dashboard
|
36 |
msgid "Download"
|
37 |
msgstr "Herunterladen"
|
38 |
|
39 |
-
#: automattic.php:
|
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:
|
45 |
-
#: wp-native-dashboard.php:
|
46 |
#@ wp-native-dashboard
|
47 |
msgid "Delete"
|
48 |
msgstr "Löschen"
|
49 |
|
50 |
-
#: automattic.php:
|
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:
|
56 |
#@ wp-native-dashboard
|
57 |
msgid "Available for download:"
|
58 |
msgstr "verfügbare Downloads:"
|
@@ -68,120 +68,126 @@ 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:
|
72 |
#@ wp-native-dashboard
|
73 |
msgid "Native Dashboard"
|
74 |
msgstr "Native Dashboard"
|
75 |
|
76 |
-
#: wp-native-dashboard.php:
|
|
|
77 |
msgid "Cheatin’ uh?"
|
78 |
msgstr ""
|
79 |
|
80 |
-
#: wp-native-dashboard.php:
|
81 |
#@ wp-native-dashboard
|
82 |
msgid "Capabilities"
|
83 |
msgstr "Fähigkeiten"
|
84 |
|
85 |
-
#: wp-native-dashboard.php:
|
86 |
#@ wp-native-dashboard
|
87 |
msgid "Installed Languages"
|
88 |
msgstr "Installierte Sprachen"
|
89 |
|
90 |
-
#: wp-native-dashboard.php:
|
91 |
#@ wp-native-dashboard
|
92 |
msgid "Downloads"
|
93 |
msgstr "Downloads"
|
94 |
|
95 |
-
#: wp-native-dashboard.php:
|
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:
|
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:
|
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:
|
111 |
#@ wp-native-dashboard
|
112 |
msgid "read more »"
|
113 |
msgstr "Lesen Sie mehr »"
|
114 |
|
115 |
-
#: wp-native-dashboard.php:
|
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:
|
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:
|
126 |
#@ wp-native-dashboard
|
127 |
msgid "check repository »"
|
128 |
msgstr "prüfen »"
|
129 |
|
130 |
-
#: wp-native-dashboard.php:
|
131 |
#@ wp-native-dashboard
|
132 |
msgid "Native Dashboard Settings"
|
133 |
msgstr "Native Dashboard Einstellungen"
|
134 |
|
135 |
-
#: wp-native-dashboard.php:
|
136 |
#@ wp-native-dashboard
|
137 |
msgid "cleanup all settings at plugin deactivation."
|
138 |
msgstr "alle Einstellungen bei Plugin-Deaktivierung entfernen."
|
139 |
|
140 |
-
#: automattic.php:
|
141 |
-
#: automattic.php:
|
142 |
-
#: automattic.php:
|
143 |
-
#: automattic.php:
|
144 |
#@ wp-native-dashboard
|
145 |
msgid "Ok"
|
146 |
msgstr "Ok"
|
147 |
|
148 |
-
#: automattic.php:
|
149 |
-
#: automattic.php:
|
150 |
#@ wp-native-dashboard
|
151 |
msgid "Cancel"
|
152 |
msgstr "Abbrechen"
|
153 |
|
154 |
-
#: automattic.php:
|
155 |
-
#: automattic.php:
|
156 |
#@ wp-native-dashboard
|
157 |
msgid "Error"
|
158 |
msgstr "Fehler"
|
159 |
|
160 |
-
#: automattic.php:
|
161 |
-
#: automattic.php:
|
162 |
#@ wp-native-dashboard
|
163 |
msgid "User Credentials required"
|
164 |
msgstr "Anmeldeinformationen erforderlich"
|
165 |
|
166 |
-
#: wp-native-dashboard.php:
|
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:
|
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:
|
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:
|
184 |
#@ wp-native-dashboard
|
185 |
msgid "-n.a.-"
|
186 |
msgstr ""
|
187 |
|
|
|
|
|
|
|
|
|
|
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;_ex: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:273
|
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:320
|
28 |
+
#: automattic.php:526
|
29 |
+
#: wp-native-dashboard.php:336
|
30 |
#@ wp-native-dashboard
|
31 |
msgid "right to left"
|
32 |
msgstr "rechts nach links"
|
33 |
|
34 |
+
#: automattic.php:323
|
35 |
#@ wp-native-dashboard
|
36 |
msgid "Download"
|
37 |
msgstr "Herunterladen"
|
38 |
|
39 |
+
#: automattic.php:393
|
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:528
|
45 |
+
#: wp-native-dashboard.php:338
|
46 |
#@ wp-native-dashboard
|
47 |
msgid "Delete"
|
48 |
msgstr "Löschen"
|
49 |
|
50 |
+
#: automattic.php:539
|
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:354
|
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:247
|
72 |
#@ wp-native-dashboard
|
73 |
msgid "Native Dashboard"
|
74 |
msgstr "Native Dashboard"
|
75 |
|
76 |
+
#: wp-native-dashboard.php:262
|
77 |
+
#@ default
|
78 |
msgid "Cheatin’ uh?"
|
79 |
msgstr ""
|
80 |
|
81 |
+
#: wp-native-dashboard.php:293
|
82 |
#@ wp-native-dashboard
|
83 |
msgid "Capabilities"
|
84 |
msgstr "Fähigkeiten"
|
85 |
|
86 |
+
#: wp-native-dashboard.php:294
|
87 |
#@ wp-native-dashboard
|
88 |
msgid "Installed Languages"
|
89 |
msgstr "Installierte Sprachen"
|
90 |
|
91 |
+
#: wp-native-dashboard.php:295
|
92 |
#@ wp-native-dashboard
|
93 |
msgid "Downloads"
|
94 |
msgstr "Downloads"
|
95 |
|
96 |
+
#: wp-native-dashboard.php:302
|
97 |
#@ wp-native-dashboard
|
98 |
msgid "extend the <em>WordPress Logon Screen</em> to choose a language too."
|
99 |
msgstr "erweitere den <em>WordPress Anmelde-Bildschirm</em> um eine Sprache auszuwählen."
|
100 |
|
101 |
+
#: wp-native-dashboard.php:305
|
102 |
#@ wp-native-dashboard
|
103 |
msgid "extend <a href=\"profile.php\" target=\"_blank\">Personal Profile Settings</a> with users prefered language."
|
104 |
msgstr "erweitere die <a href=\"profile.php\" target=\"_blank\">persönlichen Profil-Einstellungen</a> um eine benutzerspezifische Sprachwahl."
|
105 |
|
106 |
+
#: wp-native-dashboard.php:308
|
107 |
#@ wp-native-dashboard
|
108 |
msgid "extend <em>Admin Center Headline</em> with a language quick selector."
|
109 |
msgstr "erweitere die <em>Admin-Center Kopfzeile</em> mit einer Sprachumschaltung."
|
110 |
|
111 |
+
#: wp-native-dashboard.php:317
|
112 |
#@ wp-native-dashboard
|
113 |
msgid "read more »"
|
114 |
msgstr "Lesen Sie mehr »"
|
115 |
|
116 |
+
#: wp-native-dashboard.php:317
|
117 |
#@ wp-native-dashboard
|
118 |
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)."
|
119 |
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)."
|
120 |
|
121 |
+
#: wp-native-dashboard.php:325
|
122 |
#@ wp-native-dashboard
|
123 |
msgid "Your WordPress installation currectly supports this list of languages at your Dashboard."
|
124 |
msgstr "Ihre WordPress-Installation unterstützt momentan diese Liste der Sprachen in Ihrem Dashboard."
|
125 |
|
126 |
+
#: wp-native-dashboard.php:354
|
127 |
#@ wp-native-dashboard
|
128 |
msgid "check repository »"
|
129 |
msgstr "prüfen »"
|
130 |
|
131 |
+
#: wp-native-dashboard.php:375
|
132 |
#@ wp-native-dashboard
|
133 |
msgid "Native Dashboard Settings"
|
134 |
msgstr "Native Dashboard Einstellungen"
|
135 |
|
136 |
+
#: wp-native-dashboard.php:394
|
137 |
#@ wp-native-dashboard
|
138 |
msgid "cleanup all settings at plugin deactivation."
|
139 |
msgstr "alle Einstellungen bei Plugin-Deaktivierung entfernen."
|
140 |
|
141 |
+
#: automattic.php:71
|
142 |
+
#: automattic.php:95
|
143 |
+
#: automattic.php:187
|
144 |
+
#: automattic.php:211
|
145 |
#@ wp-native-dashboard
|
146 |
msgid "Ok"
|
147 |
msgstr "Ok"
|
148 |
|
149 |
+
#: automattic.php:75
|
150 |
+
#: automattic.php:191
|
151 |
#@ wp-native-dashboard
|
152 |
msgid "Cancel"
|
153 |
msgstr "Abbrechen"
|
154 |
|
155 |
+
#: automattic.php:93
|
156 |
+
#: automattic.php:209
|
157 |
#@ wp-native-dashboard
|
158 |
msgid "Error"
|
159 |
msgstr "Fehler"
|
160 |
|
161 |
+
#: automattic.php:69
|
162 |
+
#: automattic.php:185
|
163 |
#@ wp-native-dashboard
|
164 |
msgid "User Credentials required"
|
165 |
msgstr "Anmeldeinformationen erforderlich"
|
166 |
|
167 |
+
#: wp-native-dashboard.php:353
|
168 |
#@ wp-native-dashboard
|
169 |
msgid "A lot of languages should be provided by polyglott translation teams as download into your WordPress installation."
|
170 |
msgstr "Viele Sprachen werden von Polyglott Übersetzungsteams als Download für Ihre WordPress-Installation angeboten."
|
171 |
|
172 |
+
#: automattic.php:376
|
173 |
#, php-format
|
174 |
#@ wp-native-dashboard
|
175 |
msgid "The language file %s you tried to delete does not exist."
|
176 |
msgstr "Die Sprachdatei %s die Sie löschen möchten, gibt es nicht."
|
177 |
|
178 |
+
#: automattic.php:457
|
179 |
#, php-format
|
180 |
#@ wp-native-dashboard
|
181 |
msgid "The missing languages directory could not be created at '%s'."
|
182 |
msgstr "Das fehlenden Sprachdatei-Verzeichnis konnte nicht erstellt werden in '%s'."
|
183 |
|
184 |
+
#: wp-native-dashboard.php:74
|
185 |
#@ wp-native-dashboard
|
186 |
msgid "-n.a.-"
|
187 |
msgstr ""
|
188 |
|
189 |
+
#: wp-native-dashboard.php:313
|
190 |
+
#@ wp-native-dashboard
|
191 |
+
msgid "extend <em>WordPress Admin Bar</em> with a language quick selector."
|
192 |
+
msgstr "erweitere die <em>WordPress Admin Bar</em> mit einer Sprachumschaltung."
|
193 |
+
|
langswitcher.php
CHANGED
@@ -7,7 +7,7 @@ if (!function_exists ('add_action')) {
|
|
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');
|
@@ -16,6 +16,24 @@ class wp_native_dashboard_langswitcher {
|
|
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() {
|
@@ -41,6 +59,7 @@ class wp_native_dashboard_langswitcher {
|
|
41 |
<script type="text/javascript">
|
42 |
//<![CDATA[
|
43 |
function csl_extend_dashboard_header(html) {
|
|
|
44 |
if (html) {
|
45 |
jQuery("#csp-langswitcher-actions").remove();
|
46 |
jQuery("h1:first").before(html);
|
@@ -51,7 +70,9 @@ class wp_native_dashboard_langswitcher {
|
|
51 |
jQuery(this).blur();
|
52 |
jQuery("#csp-langoptions").toggle();
|
53 |
});
|
54 |
-
|
|
|
|
|
55 |
jQuery(this).blur();
|
56 |
jQuery("#csp-langoptions").hide();
|
57 |
jQuery.post("admin-ajax.php", { action: 'wp_native_dashboard_change_language', locale: jQuery(this).attr('hreflang') },
|
7 |
}
|
8 |
|
9 |
class wp_native_dashboard_langswitcher {
|
10 |
+
function wp_native_dashboard_langswitcher($plugin_url, $as_head, $as_admin_bar) {
|
11 |
global $text_direction;
|
12 |
if ($text_direction == 'rtl')
|
13 |
wp_enqueue_style('wp-native-dashboard-css-rtl', $plugin_url.'/css/style-rtl.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 |
+
$this->as_head = $as_head;
|
21 |
+
$this->as_admin_bar = $as_admin_bar;
|
22 |
+
|
23 |
+
global $wp_admin_bar;
|
24 |
+
if(function_exists('is_admin_bar_showing') && is_admin_bar_showing() && $this->as_admin_bar) {
|
25 |
+
$langs = wp_native_dashboard_collect_installed_languages();
|
26 |
+
$loc = get_locale();
|
27 |
+
|
28 |
+
$wp_admin_bar->add_menu( array( 'id' => 'wpnd-lang-cur', 'title' => '<span class="csp-'.$loc.'">'.wp_native_dashboard_get_name_of($loc).'</span>', 'href' => '#', 'meta' => array ( 'class' => 'csp-langoption' ) ) );
|
29 |
+
if (count($langs) > 1) {
|
30 |
+
foreach($langs as $lang) {
|
31 |
+
if ($lang != $loc) {
|
32 |
+
$wp_admin_bar->add_menu( array( 'parent' => 'wpnd-lang-cur', 'id' => 'wpnd-lang-'.$lang, 'title' => '<span class="csp-'.$lang.'" hreflang="'.$lang.'">'.wp_native_dashboard_get_name_of($lang).'</span>', 'href' => '#', 'meta' => array ( 'class' => 'csp-langoption csp-langoption-adminbar' ) ) );
|
33 |
+
}
|
34 |
+
}
|
35 |
+
}
|
36 |
+
}
|
37 |
}
|
38 |
|
39 |
function on_print_dashboard_switcher() {
|
59 |
<script type="text/javascript">
|
60 |
//<![CDATA[
|
61 |
function csl_extend_dashboard_header(html) {
|
62 |
+
<?php if($this->as_head) : ?>
|
63 |
if (html) {
|
64 |
jQuery("#csp-langswitcher-actions").remove();
|
65 |
jQuery("h1:first").before(html);
|
70 |
jQuery(this).blur();
|
71 |
jQuery("#csp-langoptions").toggle();
|
72 |
});
|
73 |
+
<?php endif; ?>
|
74 |
+
jQuery("a.csp-langoption, li.csp-langoption a span").click(function(event) {
|
75 |
+
event.preventDefault();
|
76 |
jQuery(this).blur();
|
77 |
jQuery("#csp-langoptions").hide();
|
78 |
jQuery.post("admin-ajax.php", { action: 'wp_native_dashboard_change_language', locale: jQuery(this).attr('hreflang') },
|
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: 3.
|
6 |
-
Stable tag: 1.3.
|
7 |
|
8 |
Enables selection of administration language either by logon, dashboard quick switcher or user profile setting.
|
9 |
|
@@ -46,6 +46,9 @@ Please visit [the official website](http://www.code-styling.de/english/developme
|
|
46 |
|
47 |
== Changelog ==
|
48 |
|
|
|
|
|
|
|
49 |
= Version 1.3.2 =
|
50 |
* bugfix: avoid javascript error if dashboard langswitcher is off but language eigther gets delete or downloaded
|
51 |
* bugfix: how to get the icon image of user credential has been changed at WP 3.0 core and gots fixed
|
2 |
Contributors: codestyling
|
3 |
Tags: wordpress, dashboard, multi-lingual, languages, backend, localization, plugin
|
4 |
Requires at least: 2.7
|
5 |
+
Tested up to: 3.1.3
|
6 |
+
Stable tag: 1.3.3
|
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.3 =
|
50 |
+
* feature: language switcher can now be configured to occure in WP Admin Bar (WP >= 3.0)
|
51 |
+
|
52 |
= Version 1.3.2 =
|
53 |
* bugfix: avoid javascript error if dashboard langswitcher is off but language eigther gets delete or downloaded
|
54 |
* bugfix: how to get the icon image of user credential has been changed at WP 3.0 core and gots fixed
|
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.
|
9 |
|
10 |
License:
|
11 |
==============================================================================
|
@@ -94,10 +94,14 @@ class wp_native_dashboard {
|
|
94 |
$this->defaults->enable_login_selector = false;
|
95 |
$this->defaults->enable_profile_extension = false;
|
96 |
$this->defaults->enable_language_switcher = false;
|
|
|
97 |
$this->defaults->cleanup_on_deactivate = false;
|
98 |
|
99 |
//try to get the options now
|
100 |
$this->options = get_option('wp-native-dashboard', $this->defaults);
|
|
|
|
|
|
|
101 |
|
102 |
//keep it for later use
|
103 |
$this->plugin_url = WP_PLUGIN_URL.'/'.dirname(plugin_basename(__FILE__));
|
@@ -183,7 +187,7 @@ class wp_native_dashboard {
|
|
183 |
|
184 |
//setup the correct user prefered language
|
185 |
function on_locale($loc) {
|
186 |
-
$skip = !$this->options->enable_login_selector && !$this->options->enable_profile_extension && !$this->options->enable_language_switcher;
|
187 |
if (is_admin() && !$skip) {
|
188 |
if (function_exists('wp_get_current_user')) {
|
189 |
$u = wp_get_current_user();
|
@@ -223,9 +227,9 @@ class wp_native_dashboard {
|
|
223 |
//do all stuff while we are at admin center
|
224 |
if (is_admin()) {
|
225 |
//load the language switcher ajax module if it has been enabled to provide the dropdown extenstion
|
226 |
-
if ($this->options->enable_language_switcher) {
|
227 |
require_once(dirname(__FILE__).'/langswitcher.php');
|
228 |
-
$this->langswitcher = new wp_native_dashboard_langswitcher($this->plugin_url);
|
229 |
$this->_load_translation_file();
|
230 |
wp_enqueue_script('jquery');
|
231 |
}
|
@@ -303,6 +307,12 @@ class wp_native_dashboard {
|
|
303 |
<input id="enable_language_switcher" type="checkbox" value="1" name="enable_language_switcher"<?php if ($this->options->enable_language_switcher) echo ' checked="checked"'; ?> />
|
304 |
<?php _e('extend <em>Admin Center Headline</em> with a language quick selector.', "wp-native-dashboard"); ?>
|
305 |
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
306 |
<p class="csp-read-more">
|
307 |
<em><a href="javascript:void(0)" onclick="jQuery(this).slideUp();jQuery('#wpf-languages').slideDown();"><?php _e('read more »', "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>
|
308 |
</p>
|
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.3
|
9 |
|
10 |
License:
|
11 |
==============================================================================
|
94 |
$this->defaults->enable_login_selector = false;
|
95 |
$this->defaults->enable_profile_extension = false;
|
96 |
$this->defaults->enable_language_switcher = false;
|
97 |
+
$this->defaults->enable_adminbar_switcher = false;
|
98 |
$this->defaults->cleanup_on_deactivate = false;
|
99 |
|
100 |
//try to get the options now
|
101 |
$this->options = get_option('wp-native-dashboard', $this->defaults);
|
102 |
+
|
103 |
+
//compat
|
104 |
+
if (!isset($this->options->enable_adminbar_switcher)) $this->options->enable_adminbar_switcher = false;
|
105 |
|
106 |
//keep it for later use
|
107 |
$this->plugin_url = WP_PLUGIN_URL.'/'.dirname(plugin_basename(__FILE__));
|
187 |
|
188 |
//setup the correct user prefered language
|
189 |
function on_locale($loc) {
|
190 |
+
$skip = !$this->options->enable_login_selector && !$this->options->enable_profile_extension && !$this->options->enable_language_switcher && !$this->options->enable_adminbar_switcher;
|
191 |
if (is_admin() && !$skip) {
|
192 |
if (function_exists('wp_get_current_user')) {
|
193 |
$u = wp_get_current_user();
|
227 |
//do all stuff while we are at admin center
|
228 |
if (is_admin()) {
|
229 |
//load the language switcher ajax module if it has been enabled to provide the dropdown extenstion
|
230 |
+
if ($this->options->enable_language_switcher || $this->options->enable_adminbar_switcher) {
|
231 |
require_once(dirname(__FILE__).'/langswitcher.php');
|
232 |
+
$this->langswitcher = new wp_native_dashboard_langswitcher($this->plugin_url, $this->options->enable_language_switcher, $this->options->enable_adminbar_switcher);
|
233 |
$this->_load_translation_file();
|
234 |
wp_enqueue_script('jquery');
|
235 |
}
|
307 |
<input id="enable_language_switcher" type="checkbox" value="1" name="enable_language_switcher"<?php if ($this->options->enable_language_switcher) echo ' checked="checked"'; ?> />
|
308 |
<?php _e('extend <em>Admin Center Headline</em> with a language quick selector.', "wp-native-dashboard"); ?>
|
309 |
</p>
|
310 |
+
<?php if (function_exists('is_admin_bar_showing')) : ?>
|
311 |
+
<p>
|
312 |
+
<input id="enable_adminbar_switcher" type="checkbox" value="1" name="enable_adminbar_switcher"<?php if ($this->options->enable_adminbar_switcher) echo ' checked="checked"'; ?> />
|
313 |
+
<?php _e('extend <em>WordPress Admin Bar</em> with a language quick selector.', "wp-native-dashboard"); ?>
|
314 |
+
</p>
|
315 |
+
<?php endif; ?>
|
316 |
<p class="csp-read-more">
|
317 |
<em><a href="javascript:void(0)" onclick="jQuery(this).slideUp();jQuery('#wpf-languages').slideDown();"><?php _e('read more »', "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>
|
318 |
</p>
|