WP Native Dashboard - Version 1.3.9

Version Description

Download this release

Release Info

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

Code changes from version 1.3.8 to 1.3.9

i18n/wp-native-dashboard-de_DE.mo CHANGED
Binary file
i18n/wp-native-dashboard-de_DE.po CHANGED
@@ -1,9 +1,9 @@
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"
@@ -25,8 +25,8 @@ msgid "The network connection to <strong>svn.automattic.com</strong> is currentl
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:326
28
- #: automattic.php:532
29
- #: wp-native-dashboard.php:348
30
  #@ wp-native-dashboard
31
  msgid "right to left"
32
  msgstr "rechts nach links"
@@ -36,28 +36,28 @@ msgstr "rechts nach links"
36
  msgid "Download"
37
  msgstr "Herunterladen"
38
 
39
- #: automattic.php:399
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:534
45
- #: wp-native-dashboard.php:350
46
  #@ wp-native-dashboard
47
  msgid "Delete"
48
  msgstr "Löschen"
49
 
50
- #: automattic.php:545
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:387
56
  #@ wp-native-dashboard
57
  msgid "Available for download:"
58
  msgstr "verfügbare Downloads:"
59
 
60
- #: loginselector.php:27
61
  #: personalprofile.php:20
62
  #@ wp-native-dashboard
63
  msgid "Language"
@@ -68,72 +68,72 @@ 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:252
72
  #@ wp-native-dashboard
73
  msgid "Native Dashboard"
74
  msgstr "Native Dashboard"
75
 
76
- #: wp-native-dashboard.php:271
77
  #@ default
78
  msgid "Cheatin&#8217; uh?"
79
  msgstr ""
80
 
81
- #: wp-native-dashboard.php:302
82
  #@ wp-native-dashboard
83
  msgid "Capabilities"
84
  msgstr "Fähigkeiten"
85
 
86
- #: wp-native-dashboard.php:303
87
  #@ wp-native-dashboard
88
  msgid "Installed Languages"
89
  msgstr "Installierte Sprachen"
90
 
91
- #: wp-native-dashboard.php:304
92
  #@ wp-native-dashboard
93
  msgid "Downloads"
94
  msgstr "Downloads"
95
 
96
- #: wp-native-dashboard.php:311
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:314
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:319
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:329
112
  #@ wp-native-dashboard
113
  msgid "read more &raquo;"
114
  msgstr "Lesen Sie mehr »"
115
 
116
- #: wp-native-dashboard.php:329
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:337
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:396
127
  #@ wp-native-dashboard
128
  msgid "check repository &raquo;"
129
  msgstr "prüfen »"
130
 
131
- #: wp-native-dashboard.php:417
132
  #@ wp-native-dashboard
133
  msgid "Native Dashboard Settings"
134
  msgstr "Native Dashboard Einstellungen"
135
 
136
- #: wp-native-dashboard.php:436
137
  #@ wp-native-dashboard
138
  msgid "cleanup all settings at plugin deactivation."
139
  msgstr "alle Einstellungen bei Plugin-Deaktivierung entfernen."
@@ -164,7 +164,7 @@ msgstr "Fehler"
164
  msgid "User Credentials required"
165
  msgstr "Anmeldeinformationen erforderlich"
166
 
167
- #: wp-native-dashboard.php:384
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."
@@ -175,19 +175,71 @@ msgstr "Viele Sprachen werden von Polyglott Übersetzungsteams als Download für
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:463
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:325
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
 
1
  msgid ""
2
  msgstr ""
3
+ "Project-Id-Version: WP Native Dashboard v1.3.9\n"
4
  "Report-Msgid-Bugs-To: \n"
5
  "POT-Creation-Date: \n"
6
+ "PO-Revision-Date: 2012-12-02 16:13:43+0000\n"
7
  "Last-Translator: admin <webmaster@wordpress28.test>\n"
8
  "Language-Team: \n"
9
  "MIME-Version: 1.0\n"
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:326
28
+ #: automattic.php:550
29
+ #: wp-native-dashboard.php:504
30
  #@ wp-native-dashboard
31
  msgid "right to left"
32
  msgstr "rechts nach links"
36
  msgid "Download"
37
  msgstr "Herunterladen"
38
 
39
+ #: automattic.php:405
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:552
45
+ #: wp-native-dashboard.php:506
46
  #@ wp-native-dashboard
47
  msgid "Delete"
48
  msgstr "Löschen"
49
 
50
+ #: automattic.php:563
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:543
56
  #@ wp-native-dashboard
57
  msgid "Available for download:"
58
  msgstr "verfügbare Downloads:"
59
 
60
+ #: loginselector.php:29
61
  #: personalprofile.php:20
62
  #@ wp-native-dashboard
63
  msgid "Language"
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:343
72
  #@ wp-native-dashboard
73
  msgid "Native Dashboard"
74
  msgstr "Native Dashboard"
75
 
76
+ #: wp-native-dashboard.php:362
77
  #@ default
78
  msgid "Cheatin&#8217; uh?"
79
  msgstr ""
80
 
81
+ #: wp-native-dashboard.php:393
82
  #@ wp-native-dashboard
83
  msgid "Capabilities"
84
  msgstr "Fähigkeiten"
85
 
86
+ #: wp-native-dashboard.php:394
87
  #@ wp-native-dashboard
88
  msgid "Installed Languages"
89
  msgstr "Installierte Sprachen"
90
 
91
+ #: wp-native-dashboard.php:395
92
  #@ wp-native-dashboard
93
  msgid "Downloads"
94
  msgstr "Downloads"
95
 
96
+ #: wp-native-dashboard.php:454
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:462
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:467
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:485
112
  #@ wp-native-dashboard
113
  msgid "read more &raquo;"
114
  msgstr "Lesen Sie mehr »"
115
 
116
+ #: wp-native-dashboard.php:485
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:493
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:552
127
  #@ wp-native-dashboard
128
  msgid "check repository &raquo;"
129
  msgstr "prüfen »"
130
 
131
+ #: wp-native-dashboard.php:573
132
  #@ wp-native-dashboard
133
  msgid "Native Dashboard Settings"
134
  msgstr "Native Dashboard Einstellungen"
135
 
136
+ #: wp-native-dashboard.php:592
137
  #@ wp-native-dashboard
138
  msgid "cleanup all settings at plugin deactivation."
139
  msgstr "alle Einstellungen bei Plugin-Deaktivierung entfernen."
164
  msgid "User Credentials required"
165
  msgstr "Anmeldeinformationen erforderlich"
166
 
167
+ #: wp-native-dashboard.php:540
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."
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:469
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:82
185
  #@ wp-native-dashboard
186
  msgid "-n.a.-"
187
  msgstr ""
188
 
189
+ #: wp-native-dashboard.php:401
190
+ #@ wp-native-dashboard
191
+ msgid "Overview"
192
+ msgstr "Übersicht"
193
+
194
+ #: wp-native-dashboard.php:407
195
+ #@ wp-native-dashboard
196
+ msgid "Template Tags"
197
+ msgstr "Template-Tags"
198
+
199
+ #: wp-native-dashboard.php:418
200
+ #@ wp-native-dashboard
201
+ msgid "... use your backend with your prefered language"
202
+ msgstr "... verwenden Sie Ihre Admin-Oberfläche in Ihrer bevorzugten Sprache"
203
+
204
+ #: wp-native-dashboard.php:421
205
+ #@ wp-native-dashboard
206
+ msgid "While get in touch with WordPress you will find out, that the initial delivery package comes only with english localization. If you want WordPress to show your native language, you have to provide the appropriated language file at languages folder. This files will be used to replace the english text phrases during the process of page generation. This translation capability has the origin at the gettext functionality which currently been used across a wide range of open source projects."
207
+ msgstr ""
208
+ "Wenn man sich mit WordPress näher beschäftigt, fällt einem auf, das man im Auslieferungszustand alles in englisch bekommt. Um WordPress an seine eigene Muttersprache anzupassen, kann man WordPress Sprachdateien zur Verfügung stellen. Diese werden dann dazu benutzt, die in englisch vorgegebenen Textfragmente während der Seitenerzeugung zu ersetzen.\n"
209
+ "Diese Übersetzungfähigkeiten basieren auf der Verwendung der gettext Funktionalität, die in sehr vielen Open Source Projekten zum Einsatz kommt."
210
+
211
+ #: wp-native-dashboard.php:428
212
+ #@ wp-native-dashboard
213
+ msgid "Translate WordPress, Themes and Plugins into your Language"
214
+ msgstr "Übersetzen Sie WordPress, Themes und Plugins in Ihre Sprache"
215
+
216
+ #: wp-native-dashboard.php:436
217
+ #@ wp-native-dashboard
218
+ msgid "Template Tags within your Plugins or Themes"
219
+ msgstr "Template-Tags innerhalb Ihrer Plugins oder Themes"
220
+
221
+ #: wp-native-dashboard.php:439
222
+ #@ wp-native-dashboard
223
+ msgid "If you need the select box from normal login screen within your own login implementation, you can activate the template tags for. Add the following codelines into your widget, template or whereever required."
224
+ msgstr "Wenn Sie die Sprach-Auswahlbox des Anmeldebildschirm in Ihrer eigenen Implementierung benötigen, können Sie die dafür benötigten Template-Tags aktivieren. Fügen Sie danach folgende Codezeilen in Ihre Widget, Template oder wo immer Sie es brauchen ein."
225
+
226
+ #: wp-native-dashboard.php:458
227
+ #@ wp-native-dashboard
228
+ msgid "enable template tag usage of login selector (see help screen)."
229
+ msgstr "Template-Tag Nutzung der Anmeldungsauswahlbox aktivieren (siehe Hilfe-Bildschirm)."
230
+
231
+ #: wp-native-dashboard.php:473
232
+ #@ wp-native-dashboard
233
+ msgid "extend <em>Backend Admin Bar</em> with a language quick selector."
234
+ msgstr "erweitere die <em>Backend Admin Bar</em> um die Direktauswahl der Sprache."
235
+
236
+ #: wp-native-dashboard.php:477
237
+ #@ wp-native-dashboard
238
+ msgid "translate <em>Frontend Admin Bar</em> using backend selected language."
239
+ msgstr "<em>Frontend-Admin-Bar</em> mit der ausgewählten Backend Sprache übersetzen"
240
+
241
+ #: wp-native-dashboard.php:481
242
  #@ wp-native-dashboard
243
+ msgid "enable locale abbreviations behind the language name."
244
+ msgstr "Gebietsschema Abkürzungen hinter dem Namen der Sprache aktivieren"
245
 
license.txt ADDED
@@ -0,0 +1,280 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ GNU GENERAL PUBLIC LICENSE
2
+ Version 2, June 1991
3
+
4
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
5
+ 675 Mass Ave, Cambridge, MA 02139, USA
6
+ Everyone is permitted to copy and distribute verbatim copies
7
+ of this license document, but changing it is not allowed.
8
+
9
+ Preamble
10
+
11
+ The licenses for most software are designed to take away your
12
+ freedom to share and change it. By contrast, the GNU General Public
13
+ License is intended to guarantee your freedom to share and change free
14
+ software--to make sure the software is free for all its users. This
15
+ General Public License applies to most of the Free Software
16
+ Foundation's software and to any other program whose authors commit to
17
+ using it. (Some other Free Software Foundation software is covered by
18
+ the GNU Library General Public License instead.) You can apply it to
19
+ your programs, too.
20
+
21
+ When we speak of free software, we are referring to freedom, not
22
+ price. Our General Public Licenses are designed to make sure that you
23
+ have the freedom to distribute copies of free software (and charge for
24
+ this service if you wish), that you receive source code or can get it
25
+ if you want it, that you can change the software or use pieces of it
26
+ in new free programs; and that you know you can do these things.
27
+
28
+ To protect your rights, we need to make restrictions that forbid
29
+ anyone to deny you these rights or to ask you to surrender the rights.
30
+ These restrictions translate to certain responsibilities for you if you
31
+ distribute copies of the software, or if you modify it.
32
+
33
+ For example, if you distribute copies of such a program, whether
34
+ gratis or for a fee, you must give the recipients all the rights that
35
+ you have. You must make sure that they, too, receive or can get the
36
+ source code. And you must show them these terms so they know their
37
+ rights.
38
+
39
+ We protect your rights with two steps: (1) copyright the software, and
40
+ (2) offer you this license which gives you legal permission to copy,
41
+ distribute and/or modify the software.
42
+
43
+ Also, for each author's protection and ours, we want to make certain
44
+ that everyone understands that there is no warranty for this free
45
+ software. If the software is modified by someone else and passed on, we
46
+ want its recipients to know that what they have is not the original, so
47
+ that any problems introduced by others will not reflect on the original
48
+ authors' reputations.
49
+
50
+ Finally, any free program is threatened constantly by software
51
+ patents. We wish to avoid the danger that redistributors of a free
52
+ program will individually obtain patent licenses, in effect making the
53
+ program proprietary. To prevent this, we have made it clear that any
54
+ patent must be licensed for everyone's free use or not licensed at all.
55
+
56
+ The precise terms and conditions for copying, distribution and
57
+ modification follow.
58
+
59
+ GNU GENERAL PUBLIC LICENSE
60
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61
+
62
+ 0. This License applies to any program or other work which contains
63
+ a notice placed by the copyright holder saying it may be distributed
64
+ under the terms of this General Public License. The "Program", below,
65
+ refers to any such program or work, and a "work based on the Program"
66
+ means either the Program or any derivative work under copyright law:
67
+ that is to say, a work containing the Program or a portion of it,
68
+ either verbatim or with modifications and/or translated into another
69
+ language. (Hereinafter, translation is included without limitation in
70
+ the term "modification".) Each licensee is addressed as "you".
71
+
72
+ Activities other than copying, distribution and modification are not
73
+ covered by this License; they are outside its scope. The act of
74
+ running the Program is not restricted, and the output from the Program
75
+ is covered only if its contents constitute a work based on the
76
+ Program (independent of having been made by running the Program).
77
+ Whether that is true depends on what the Program does.
78
+
79
+ 1. You may copy and distribute verbatim copies of the Program's
80
+ source code as you receive it, in any medium, provided that you
81
+ conspicuously and appropriately publish on each copy an appropriate
82
+ copyright notice and disclaimer of warranty; keep intact all the
83
+ notices that refer to this License and to the absence of any warranty;
84
+ and give any other recipients of the Program a copy of this License
85
+ along with the Program.
86
+
87
+ You may charge a fee for the physical act of transferring a copy, and
88
+ you may at your option offer warranty protection in exchange for a fee.
89
+
90
+ 2. You may modify your copy or copies of the Program or any portion
91
+ of it, thus forming a work based on the Program, and copy and
92
+ distribute such modifications or work under the terms of Section 1
93
+ above, provided that you also meet all of these conditions:
94
+
95
+ a) You must cause the modified files to carry prominent notices
96
+ stating that you changed the files and the date of any change.
97
+
98
+ b) You must cause any work that you distribute or publish, that in
99
+ whole or in part contains or is derived from the Program or any
100
+ part thereof, to be licensed as a whole at no charge to all third
101
+ parties under the terms of this License.
102
+
103
+ c) If the modified program normally reads commands interactively
104
+ when run, you must cause it, when started running for such
105
+ interactive use in the most ordinary way, to print or display an
106
+ announcement including an appropriate copyright notice and a
107
+ notice that there is no warranty (or else, saying that you provide
108
+ a warranty) and that users may redistribute the program under
109
+ these conditions, and telling the user how to view a copy of this
110
+ License. (Exception: if the Program itself is interactive but
111
+ does not normally print such an announcement, your work based on
112
+ the Program is not required to print an announcement.)
113
+
114
+ These requirements apply to the modified work as a whole. If
115
+ identifiable sections of that work are not derived from the Program,
116
+ and can be reasonably considered independent and separate works in
117
+ themselves, then this License, and its terms, do not apply to those
118
+ sections when you distribute them as separate works. But when you
119
+ distribute the same sections as part of a whole which is a work based
120
+ on the Program, the distribution of the whole must be on the terms of
121
+ this License, whose permissions for other licensees extend to the
122
+ entire whole, and thus to each and every part regardless of who wrote it.
123
+ Thus, it is not the intent of this section to claim rights or contest
124
+ your rights to work written entirely by you; rather, the intent is to
125
+ exercise the right to control the distribution of derivative or
126
+ collective works based on the Program.
127
+
128
+ In addition, mere aggregation of another work not based on the Program
129
+ with the Program (or with a work based on the Program) on a volume of
130
+ a storage or distribution medium does not bring the other work under
131
+ the scope of this License.
132
+
133
+ 3. You may copy and distribute the Program (or a work based on it,
134
+ under Section 2) in object code or executable form under the terms of
135
+ Sections 1 and 2 above provided that you also do one of the following:
136
+
137
+ a) Accompany it with the complete corresponding machine-readable
138
+ source code, which must be distributed under the terms of Sections
139
+ 1 and 2 above on a medium customarily used for software interchange; or,
140
+
141
+ b) Accompany it with a written offer, valid for at least three
142
+ years, to give any third party, for a charge no more than your
143
+ cost of physically performing source distribution, a complete
144
+ machine-readable copy of the corresponding source code, to be
145
+ distributed under the terms of Sections 1 and 2 above on a medium
146
+ customarily used for software interchange; or,
147
+
148
+ c) Accompany it with the information you received as to the offer
149
+ to distribute corresponding source code. (This alternative is
150
+ allowed only for noncommercial distribution and only if you
151
+ received the program in object code or executable form with such
152
+ an offer, in accord with Subsection b above.)
153
+
154
+ The source code for a work means the preferred form of the work for
155
+ making modifications to it. For an executable work, complete source
156
+ code means all the source code for all modules it contains, plus any
157
+ associated interface definition files, plus the scripts used to
158
+ control compilation and installation of the executable. However, as a
159
+ special exception, the source code distributed need not include
160
+ anything that is normally distributed (in either source or binary
161
+ form) with the major components (compiler, kernel, and so on) of the
162
+ operating system on which the executable runs, unless that component
163
+ itself accompanies the executable.
164
+
165
+ If distribution of executable or object code is made by offering
166
+ access to copy from a designated place, then offering equivalent
167
+ access to copy the source code from the same place counts as
168
+ distribution of the source code, even though third parties are not
169
+ compelled to copy the source along with the object code.
170
+
171
+ 4. You may not copy, modify, sublicense, or distribute the Program
172
+ except as expressly provided under this License. Any attempt
173
+ otherwise to copy, modify, sublicense or distribute the Program is
174
+ void, and will automatically terminate your rights under this License.
175
+ However, parties who have received copies, or rights, from you under
176
+ this License will not have their licenses terminated so long as such
177
+ parties remain in full compliance.
178
+
179
+ 5. You are not required to accept this License, since you have not
180
+ signed it. However, nothing else grants you permission to modify or
181
+ distribute the Program or its derivative works. These actions are
182
+ prohibited by law if you do not accept this License. Therefore, by
183
+ modifying or distributing the Program (or any work based on the
184
+ Program), you indicate your acceptance of this License to do so, and
185
+ all its terms and conditions for copying, distributing or modifying
186
+ the Program or works based on it.
187
+
188
+ 6. Each time you redistribute the Program (or any work based on the
189
+ Program), the recipient automatically receives a license from the
190
+ original licensor to copy, distribute or modify the Program subject to
191
+ these terms and conditions. You may not impose any further
192
+ restrictions on the recipients' exercise of the rights granted herein.
193
+ You are not responsible for enforcing compliance by third parties to
194
+ this License.
195
+
196
+ 7. If, as a consequence of a court judgment or allegation of patent
197
+ infringement or for any other reason (not limited to patent issues),
198
+ conditions are imposed on you (whether by court order, agreement or
199
+ otherwise) that contradict the conditions of this License, they do not
200
+ excuse you from the conditions of this License. If you cannot
201
+ distribute so as to satisfy simultaneously your obligations under this
202
+ License and any other pertinent obligations, then as a consequence you
203
+ may not distribute the Program at all. For example, if a patent
204
+ license would not permit royalty-free redistribution of the Program by
205
+ all those who receive copies directly or indirectly through you, then
206
+ the only way you could satisfy both it and this License would be to
207
+ refrain entirely from distribution of the Program.
208
+
209
+ If any portion of this section is held invalid or unenforceable under
210
+ any particular circumstance, the balance of the section is intended to
211
+ apply and the section as a whole is intended to apply in other
212
+ circumstances.
213
+
214
+ It is not the purpose of this section to induce you to infringe any
215
+ patents or other property right claims or to contest validity of any
216
+ such claims; this section has the sole purpose of protecting the
217
+ integrity of the free software distribution system, which is
218
+ implemented by public license practices. Many people have made
219
+ generous contributions to the wide range of software distributed
220
+ through that system in reliance on consistent application of that
221
+ system; it is up to the author/donor to decide if he or she is willing
222
+ to distribute software through any other system and a licensee cannot
223
+ impose that choice.
224
+
225
+ This section is intended to make thoroughly clear what is believed to
226
+ be a consequence of the rest of this License.
227
+
228
+ 8. If the distribution and/or use of the Program is restricted in
229
+ certain countries either by patents or by copyrighted interfaces, the
230
+ original copyright holder who places the Program under this License
231
+ may add an explicit geographical distribution limitation excluding
232
+ those countries, so that distribution is permitted only in or among
233
+ countries not thus excluded. In such case, this License incorporates
234
+ the limitation as if written in the body of this License.
235
+
236
+ 9. The Free Software Foundation may publish revised and/or new versions
237
+ of the General Public License from time to time. Such new versions will
238
+ be similar in spirit to the present version, but may differ in detail to
239
+ address new problems or concerns.
240
+
241
+ Each version is given a distinguishing version number. If the Program
242
+ specifies a version number of this License which applies to it and "any
243
+ later version", you have the option of following the terms and conditions
244
+ either of that version or of any later version published by the Free
245
+ Software Foundation. If the Program does not specify a version number of
246
+ this License, you may choose any version ever published by the Free Software
247
+ Foundation.
248
+
249
+ 10. If you wish to incorporate parts of the Program into other free
250
+ programs whose distribution conditions are different, write to the author
251
+ to ask for permission. For software which is copyrighted by the Free
252
+ Software Foundation, write to the Free Software Foundation; we sometimes
253
+ make exceptions for this. Our decision will be guided by the two goals
254
+ of preserving the free status of all derivatives of our free software and
255
+ of promoting the sharing and reuse of software generally.
256
+
257
+ NO WARRANTY
258
+
259
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
260
+ FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
261
+ OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
262
+ PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
263
+ OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
264
+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
265
+ TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
266
+ PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
267
+ REPAIR OR CORRECTION.
268
+
269
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
270
+ WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
271
+ REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
272
+ INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
273
+ OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
274
+ TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
275
+ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
276
+ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
277
+ POSSIBILITY OF SUCH DAMAGES.
278
+
279
+ END OF TERMS AND CONDITIONS
280
+
loginselector.php CHANGED
@@ -7,8 +7,10 @@ if (!function_exists ('add_action')) {
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
  }
7
  }
8
 
9
  class wp_native_dashboard_loginselector {
10
+ function wp_native_dashboard_loginselector($permit_template_tags) {
11
  add_action('login_head', array(&$this, 'on_login_head'));
12
+ if ($permit_template_tags)
13
+ add_action('wp_head', array(&$this, 'on_login_head'));
14
  add_action('login_form', array(&$this, 'on_login_form'));
15
  add_action('wp_login', array(&$this, 'on_wp_login'));
16
  }
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.4-RC1
6
- Stable tag: 1.3.8
7
 
8
  Enables selection of administration language either by logon, dashboard quick switcher or user profile setting.
9
 
@@ -49,6 +49,13 @@ Please visit [the official website](http://www.code-styling.de/english/developme
49
 
50
  == Changelog ==
51
 
 
 
 
 
 
 
 
52
  = Version 1.3.8 =
53
  * bugfix: build in language "en_US" could not longer be selected, if WPLANG explicitely defined.
54
  * feature: supports new translation files introduced with WordPress 3.4 version
2
  Contributors: codestyling
3
  Tags: wordpress, dashboard, multi-lingual, languages, backend, localization, plugin
4
  Requires at least: 2.7
5
+ Tested up to: 3.5-RC1
6
+ Stable tag: 1.3.9
7
 
8
  Enables selection of administration language either by logon, dashboard quick switcher or user profile setting.
9
 
49
 
50
  == Changelog ==
51
 
52
+ = Version 1.3.9 =
53
+ * bugfix: using SSL either forced or fully did produce a mixed mode admin page delivery
54
+ * bugfix: translation of frontend admin bar now works with any type of extension (includes debug-bar plugin).
55
+ * feature: added plugin help screen for WordPress >= 3.3
56
+ * feature: additional option to remove locale abbreviation brackets
57
+ * feature: new option for using login language selector within your own login plugins/widgets (see help screen)
58
+
59
  = Version 1.3.8 =
60
  * bugfix: build in language "en_US" could not longer be selected, if WPLANG explicitely defined.
61
  * feature: supports new translation files introduced with WordPress 3.4 version
wp-native-dashboard.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://www.code-styling.de/english/development/wordpress-plugin-wp-n
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.8
9
 
10
  License:
11
  ==============================================================================
@@ -33,6 +33,14 @@ if (!function_exists ('add_action')) {
33
  exit();
34
  }
35
 
 
 
 
 
 
 
 
 
36
  if ( !defined('WP_PLUGIN_URL') )
37
  define('WP_PLUGIN_URL', WP_CONTENT_URL.'/plugins');
38
 
@@ -69,10 +77,11 @@ if(!function_exists('update_user_meta')) {
69
  }
70
 
71
  function wp_native_dashboard_get_name_of($locale) {
72
- global $wpnd_language_names;
73
  list($lang,) = explode('_', $locale);
74
  $name = isset($wpnd_language_names[$lang]) ? $wpnd_language_names[$lang] : __('-n.a.-', 'wp-native-dashboard');
75
- return '<b>'.$name .'</b>&nbsp;<i>('.$locale.')</i>';
 
76
  }
77
 
78
  function wp_native_dashboard_is_rtl_language($locale) {
@@ -84,6 +93,12 @@ function wp_native_dashboard_rtl_extension_file_content() {
84
  return '<?php'."\n".'$text_direction = \'rtl\';'."\n".'?>"';
85
  }
86
 
 
 
 
 
 
 
87
  class wp_native_dashboard {
88
 
89
  function wp_native_dashboard() {
@@ -92,9 +107,11 @@ class wp_native_dashboard {
92
  $this->defaults->version = '1.0';
93
  $this->defaults->installed = false;
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->translate_front_adminbar = false;
99
  $this->defaults->cleanup_on_deactivate = false;
100
 
@@ -104,9 +121,12 @@ class wp_native_dashboard {
104
  //compat
105
  if (!isset($this->options->enable_adminbar_switcher)) $this->options->enable_adminbar_switcher = false;
106
  if (!isset($this->options->translate_front_adminbar)) $this->options->translate_front_adminbar = false;
 
 
107
 
108
  //keep it for later use
109
- $this->plugin_url = WP_PLUGIN_URL.'/'.dirname(plugin_basename(__FILE__));
 
110
 
111
  //detect the current main version
112
  global $wp_version;
@@ -114,7 +134,7 @@ class wp_native_dashboard {
114
  $this->root_tagged_version = $hits[1].'.'.$hits[2];
115
  $this->tagged_version = $this->root_tagged_version;
116
  if (!empty($hits[3])) $this->tagged_version .= '.'.$hits[3];
117
-
118
  //register at plugin activation/deactivation hooks
119
  register_activation_hook(plugin_basename(__FILE__), array(&$this, 'activate_plugin'));
120
  register_deactivation_hook(plugin_basename(__FILE__), array(&$this, 'deactivate_plugin'));
@@ -133,6 +153,23 @@ class wp_native_dashboard {
133
 
134
  global $wp_version;
135
  $this->no_dashboard_headline = version_compare($wp_version, '3.0', '>=');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
136
  }
137
 
138
  //check required versions
@@ -193,7 +230,7 @@ class wp_native_dashboard {
193
  //setup the correct user prefered language
194
  function on_locale($loc) {
195
  $skip = !$this->options->enable_login_selector && !$this->options->enable_profile_extension && !$this->options->enable_language_switcher && !$this->options->enable_adminbar_switcher;
196
- if ((is_admin() && !$skip) || ($this->options->translate_front_adminbar && isset($_REQUEST['wpnd']) && $_REQUEST['wpnd'] == 'translate_front_adminbar')) {
197
  if (function_exists('wp_get_current_user')) {
198
  $u = wp_get_current_user();
199
  if (!isset($u->wp_native_dashboard_language)) {
@@ -222,7 +259,7 @@ class wp_native_dashboard {
222
  //load the login selector module if it has been enabled to provide language choise at login screen
223
  if ($this->options->enable_login_selector /*&& (is_admin() || defined('DOING_AJAX'))*/) {
224
  require_once(dirname(__FILE__).'/loginselector.php');
225
- $this->loginselector = new wp_native_dashboard_loginselector();
226
  $this->_load_translation_file();
227
  if (is_admin()) wp_enqueue_script('jquery');
228
  }
@@ -244,47 +281,56 @@ class wp_native_dashboard {
244
  }
245
 
246
  //front end admin bar handling
247
- if($this->options->translate_front_adminbar && !is_admin() && is_user_logged_in()) {
248
- wp_enqueue_script('jquery');
249
- if (isset($_REQUEST['wpnd']) && $_REQUEST['wpnd'] == 'translate_front_adminbar') {
250
- ob_start(array(&$this, 'on_translated_frontend_adminbar'));
251
- add_action('wp_before_admin_bar_render', array(&$this, 'on_before_admin_bar_render_rip_on'), 0);
252
- add_action('wp_after_admin_bar_render', array(&$this, 'on_after_admin_bar_render_park_content'),9999);
253
- }else{
254
- add_action('wp_before_admin_bar_render', array(&$this, 'on_before_admin_bar_render_rip_on'), 0);
255
- add_action('wp_after_admin_bar_render', array(&$this, 'on_after_admin_bar_render_rip_off'),9999);
256
- }
257
  }
258
  }
259
-
260
- function on_before_admin_bar_render_rip_on() {
261
  ob_start();
262
  }
263
 
264
- function on_after_admin_bar_render_rip_off() {
265
- ob_end_clean();
266
- //replace frontend admin bar markup and script with jquery loader, that is abel to translate the bar
267
- global $wp, $wp_rewrite;
268
- $query_string = $wp_rewrite->using_permalinks() ? '' : $wp->query_string;
269
- $query_string = (empty($query_string) ? $query_string.'?' : $query_string.'&').'wpnd=translate_front_adminbar';
270
- $current_url = add_query_arg( $query_string, '', home_url( $wp->request ) );
271
- ?>
272
- <script type="text/javascript">
273
- jQuery.get("<?php echo $current_url; ?>", function(data) {
274
- jQuery('body').append(data);
275
- });
276
- </script>
277
- <?php
278
  }
279
 
280
- function on_after_admin_bar_render_park_content() {
281
- $this->parked_admin_bar = ob_get_clean();
 
282
  }
283
-
284
- function on_translated_frontend_adminbar($content) {
285
- return $this->parked_admin_bar;
286
  }
287
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
288
  function on_admin_menu() {
289
  //load the personal profile setting extension if needed
290
  if ($this->options->enable_profile_extension) {
@@ -346,6 +392,58 @@ class wp_native_dashboard {
346
  add_meta_box('wp-native-dashboard-acl', __('Capabilities', 'wp-native-dashboard'), array(&$this, 'on_print_metabox_content_acl'), $this->pagehook, 'normal', 'core');
347
  add_meta_box('wp-native-dashboard-installed-i18n', __('Installed Languages', 'wp-native-dashboard'), array(&$this, 'on_print_metabox_installed_i18n'), $this->pagehook, 'normal', 'core');
348
  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');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
349
  }
350
 
351
  function on_print_metabox_content_acl($data) {
@@ -353,7 +451,12 @@ class wp_native_dashboard {
353
  <p>
354
  <input id="enable_login_selector" type="checkbox" value="1" name="enable_login_selector"<?php if ($this->options->enable_login_selector) echo ' checked="checked"'; ?> />
355
  <?php _e('extend the <em>WordPress Logon Screen</em> to choose a language too.', "wp-native-dashboard"); ?>
356
- </p><p>
 
 
 
 
 
357
  <input id="enable_profile_extension" type="checkbox" value="1" name="enable_profile_extension"<?php if ($this->options->enable_profile_extension) echo ' checked="checked"'; ?> />
358
  <?php _e('extend <a href="profile.php" target="_blank">Personal Profile Settings</a> with users prefered language.', "wp-native-dashboard"); ?>
359
  </p>
@@ -372,13 +475,17 @@ class wp_native_dashboard {
372
  <input id="translate_front_adminbar" type="checkbox" value="1" name="translate_front_adminbar"<?php if ($this->options->translate_front_adminbar) echo ' checked="checked"'; ?> />
373
  <?php _e('translate <em>Frontend Admin Bar</em> using backend selected language.', "wp-native-dashboard"); ?>
374
  </p>
 
 
 
 
375
  <?php endif; ?>
376
  <p class="csp-read-more">
377
  <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>
378
  </p>
379
  <?php
380
  }
381
-
382
  function on_print_metabox_installed_i18n() {
383
  $installed = wp_native_dashboard_collect_installed_languages();
384
  ?>
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
9
 
10
  License:
11
  ==============================================================================
33
  exit();
34
  }
35
 
36
+ if (!function_exists('plugins_url')) {
37
+ function plugins_url($plugin) { return WP_PLUGIN_URL . '/' . dirname(plugin_basename($plugin)); }
38
+ }
39
+
40
+ if (!function_exists('get_site_url')) {
41
+ function get_site_url() { return get_option('site_url'); }
42
+ }
43
+
44
  if ( !defined('WP_PLUGIN_URL') )
45
  define('WP_PLUGIN_URL', WP_CONTENT_URL.'/plugins');
46
 
77
  }
78
 
79
  function wp_native_dashboard_get_name_of($locale) {
80
+ global $wpnd_language_names, $my_wp_native_dashboard;
81
  list($lang,) = explode('_', $locale);
82
  $name = isset($wpnd_language_names[$lang]) ? $wpnd_language_names[$lang] : __('-n.a.-', 'wp-native-dashboard');
83
+ $abbr = ($my_wp_native_dashboard->with_abbreviations() ? "&nbsp;<i>($locale)</i>" : '');
84
+ return "<b>$name</b>$abbr";
85
  }
86
 
87
  function wp_native_dashboard_is_rtl_language($locale) {
93
  return '<?php'."\n".'$text_direction = \'rtl\';'."\n".'?>"';
94
  }
95
 
96
+ function wp_native_dashboard_custom_language_selector() {
97
+ global $my_wp_native_dashboard;
98
+ if($my_wp_native_dashboard->with_tag_support())
99
+ do_action('login_form');
100
+ }
101
+
102
  class wp_native_dashboard {
103
 
104
  function wp_native_dashboard() {
107
  $this->defaults->version = '1.0';
108
  $this->defaults->installed = false;
109
  $this->defaults->enable_login_selector = false;
110
+ $this->defaults->enable_login_custom = false;
111
  $this->defaults->enable_profile_extension = false;
112
  $this->defaults->enable_language_switcher = false;
113
  $this->defaults->enable_adminbar_switcher = false;
114
+ $this->defaults->enable_locale_abbreviations= false;
115
  $this->defaults->translate_front_adminbar = false;
116
  $this->defaults->cleanup_on_deactivate = false;
117
 
121
  //compat
122
  if (!isset($this->options->enable_adminbar_switcher)) $this->options->enable_adminbar_switcher = false;
123
  if (!isset($this->options->translate_front_adminbar)) $this->options->translate_front_adminbar = false;
124
+ if (!isset($this->options->enable_locale_abbreviations)) $this->options->enable_locale_abbreviations = true;
125
+ if (!isset($this->options->enable_login_custom)) $this->options->enable_login_custom = false;
126
 
127
  //keep it for later use
128
+ //bugfix: for FORCE_SSL_ADMIN / $this->plugin_url = WP_PLUGIN_URL.'/'.dirname(plugin_basename(__FILE__));
129
+ $this->plugin_url = plugins_url(dirname(plugin_basename(__FILE__)));
130
 
131
  //detect the current main version
132
  global $wp_version;
134
  $this->root_tagged_version = $hits[1].'.'.$hits[2];
135
  $this->tagged_version = $this->root_tagged_version;
136
  if (!empty($hits[3])) $this->tagged_version .= '.'.$hits[3];
137
+
138
  //register at plugin activation/deactivation hooks
139
  register_activation_hook(plugin_basename(__FILE__), array(&$this, 'activate_plugin'));
140
  register_deactivation_hook(plugin_basename(__FILE__), array(&$this, 'deactivate_plugin'));
153
 
154
  global $wp_version;
155
  $this->no_dashboard_headline = version_compare($wp_version, '3.0', '>=');
156
+
157
+ $this->user_agent_is_wp_native_dashboard = ($_SERVER["HTTP_USER_AGENT"] == "WP_NATIVE_DASHBOARD");
158
+
159
+ if ( $this->user_agent_is_wp_native_dashboard ) {
160
+ //suppress all except the frontend admin bar rendering
161
+ ob_start();
162
+ add_action('shutdown', array(&$this, 'on_shutdown_render_admin_bar'), 0);
163
+ }
164
+
165
+ }
166
+
167
+ function with_abbreviations() {
168
+ return $this->options->enable_locale_abbreviations;
169
+ }
170
+
171
+ function with_tag_support() {
172
+ return $this->options->enable_login_custom;
173
  }
174
 
175
  //check required versions
230
  //setup the correct user prefered language
231
  function on_locale($loc) {
232
  $skip = !$this->options->enable_login_selector && !$this->options->enable_profile_extension && !$this->options->enable_language_switcher && !$this->options->enable_adminbar_switcher;
233
+ if ((is_admin() && !$skip) || ($this->options->translate_front_adminbar && $this->user_agent_is_wp_native_dashboard)) {
234
  if (function_exists('wp_get_current_user')) {
235
  $u = wp_get_current_user();
236
  if (!isset($u->wp_native_dashboard_language)) {
259
  //load the login selector module if it has been enabled to provide language choise at login screen
260
  if ($this->options->enable_login_selector /*&& (is_admin() || defined('DOING_AJAX'))*/) {
261
  require_once(dirname(__FILE__).'/loginselector.php');
262
+ $this->loginselector = new wp_native_dashboard_loginselector($this->options->enable_login_custom);
263
  $this->_load_translation_file();
264
  if (is_admin()) wp_enqueue_script('jquery');
265
  }
281
  }
282
 
283
  //front end admin bar handling
284
+ if($this->options->translate_front_adminbar && !is_admin() && is_user_logged_in() && !$this->user_agent_is_wp_native_dashboard) {
285
+ add_action('wp_before_admin_bar_render', array(&$this, 'on_start_suppress_admin_bar'), 0);
286
+ add_action('wp_after_admin_bar_render', array(&$this, 'on_request_suppressed_admin_bar_translated'),9999);
287
+ }
288
+ if($this->options->translate_front_adminbar && !is_admin() && is_user_logged_in() && $this->user_agent_is_wp_native_dashboard) {
289
+ add_action('wp_before_admin_bar_render', array(&$this, 'on_start_capture_admin_bar'), 0);
290
+ add_action('wp_after_admin_bar_render', array(&$this, 'on_end_capture_admin_bar'), 9999);
 
 
 
291
  }
292
  }
293
+
294
+ function on_start_capture_admin_bar() {
295
  ob_start();
296
  }
297
 
298
+ function on_end_capture_admin_bar() {
299
+ $this->frontend_admin_bar = ob_get_clean();
 
 
 
 
 
 
 
 
 
 
 
 
300
  }
301
 
302
+ function on_shutdown_render_admin_bar() {
303
+ ob_end_clean();
304
+ echo $this->frontend_admin_bar;
305
  }
306
+ function on_start_suppress_admin_bar() {
307
+ ob_start();
 
308
  }
309
 
310
+ function on_request_suppressed_admin_bar_translated() {
311
+ ob_end_clean();
312
+ $cookies = array();
313
+ foreach($_COOKIE as $key => $val) {
314
+ $cookie = new WP_Http_Cookie( $key );
315
+ $cookie->name = $key;
316
+ $cookie->value = $val;
317
+ $cookie->expires = mktime( 0, 0, 0, date('m'), date('d') + 7, date('Y') ); // expires in 7 days
318
+ $cookie->path = '/';
319
+ //$cookie->domain = get_site_url();
320
+ $cookies[] = $cookie;
321
+ }
322
+ $response = wp_remote_get(
323
+ get_site_url().$_SERVER["REQUEST_URI"],
324
+ array(
325
+ 'sslverify' => false,
326
+ 'cookies' => $cookies,
327
+ 'user-agent' => 'WP_NATIVE_DASHBOARD'
328
+ )
329
+ );
330
+ if (!is_object($response) && isset($response['body']))
331
+ echo $response['body'];
332
+ }
333
+
334
  function on_admin_menu() {
335
  //load the personal profile setting extension if needed
336
  if ($this->options->enable_profile_extension) {
392
  add_meta_box('wp-native-dashboard-acl', __('Capabilities', 'wp-native-dashboard'), array(&$this, 'on_print_metabox_content_acl'), $this->pagehook, 'normal', 'core');
393
  add_meta_box('wp-native-dashboard-installed-i18n', __('Installed Languages', 'wp-native-dashboard'), array(&$this, 'on_print_metabox_installed_i18n'), $this->pagehook, 'normal', 'core');
394
  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');
395
+ global $wp_version;
396
+ if (version_compare($wp_version, '3.3', '>=')) {
397
+ $screen = get_current_screen();
398
+ //$request = unserialize(csp_fetch_remote_content('http://api.wordpress.org/plugins/info/1.0/codestyling-localization'));
399
+ $screen->add_help_tab(array(
400
+ 'title' => __('Overview','wp-native-dashboard'),
401
+ 'id' => 'overview',
402
+ 'content' => '',
403
+ 'callback' => array($this, 'on_callback_help_overview')
404
+ ));
405
+ $screen->add_help_tab(array(
406
+ 'title' => __('Template Tags','wp-native-dashboard'),
407
+ 'id' => 'template_tags',
408
+ 'content' => '',
409
+ 'callback' => array($this, 'on_callback_help_template_tags')
410
+ ));
411
+ }
412
+ }
413
+
414
+ function on_callback_help_overview() {
415
+ ?>
416
+ <p>
417
+ <strong>WP Native Dashboard </strong> - <em>"<?php _e('... use your backend with your prefered language', "wp-native-dashboard"); ?>"</em>
418
+ </p>
419
+ <p>
420
+ <?php _e('While get in touch with WordPress you will find out, that the initial delivery package comes only with english localization. If you want WordPress to show your native language, you have to provide the appropriated language file at languages folder. This files will be used to replace the english text phrases during the process of page generation. This translation capability has the origin at the gettext functionality which currently been used across a wide range of open source projects.', "wp-native-dashboard"); ?>
421
+ </p>
422
+ <p style="margin-top: 50px;padding-top:10px; border-top: solid 1px #ccc;">
423
+ <small class="alignright" style="position:relative; margin-top: -30px; color: #aaa;">&copy; 2008 - 2012 by Heiko Rabe</small>
424
+ <a href="http://wordpress.org/extend/plugins/wp-native-dashboard/" target="_blank">Plugin Directory</a> |
425
+ <a href="http://wordpress.org/extend/plugins/wp-native-dashboard/changelog/" target="_blank">Change Logs</a> |
426
+ <a href="<?php echo $this->plugin_url."/license.txt";?>" target="_blank">License</a>
427
+ <a class="alignright" href="http://wordpress.org/extend/plugins/codestyling-localization/" target="_blank"><?php _e('Translate WordPress, Themes and Plugins into your Language',"wp-native-dashboard");?></a>
428
+ </p>
429
+ <?php
430
+ }
431
+
432
+ function on_callback_help_template_tags() {
433
+ ?>
434
+ <p>
435
+ <strong><?php _e('Template Tags within your Plugins or Themes',"wp-native-dashboard"); ?></strong>
436
+ </p>
437
+ <p>
438
+ <?php _e('If you need the select box from normal login screen within your own login implementation, you can activate the template tags for. Add the following codelines into your widget, template or whereever required.',"wp-native-dashboard"); ?>
439
+ </p>
440
+ <pre>
441
+ &lt;?php
442
+ if (function_exists('wp_native_dashboard_custom_language_selector'))
443
+ wp_native_dashboard_custom_language_selector();
444
+ ?&gt;
445
+ </pre>
446
+ <?php
447
  }
448
 
449
  function on_print_metabox_content_acl($data) {
451
  <p>
452
  <input id="enable_login_selector" type="checkbox" value="1" name="enable_login_selector"<?php if ($this->options->enable_login_selector) echo ' checked="checked"'; ?> />
453
  <?php _e('extend the <em>WordPress Logon Screen</em> to choose a language too.', "wp-native-dashboard"); ?>
454
+ </p>
455
+ <p style="margin-left: 16px;">
456
+ <input id="enable_login_custom" type="checkbox" value="1" name="enable_login_custom"<?php if ($this->options->enable_login_custom) echo ' checked="checked"'; ?> />
457
+ <?php _e('enable template tag usage of login selector (see help screen).', "wp-native-dashboard"); ?>
458
+ </p>
459
+ <p>
460
  <input id="enable_profile_extension" type="checkbox" value="1" name="enable_profile_extension"<?php if ($this->options->enable_profile_extension) echo ' checked="checked"'; ?> />
461
  <?php _e('extend <a href="profile.php" target="_blank">Personal Profile Settings</a> with users prefered language.', "wp-native-dashboard"); ?>
462
  </p>
475
  <input id="translate_front_adminbar" type="checkbox" value="1" name="translate_front_adminbar"<?php if ($this->options->translate_front_adminbar) echo ' checked="checked"'; ?> />
476
  <?php _e('translate <em>Frontend Admin Bar</em> using backend selected language.', "wp-native-dashboard"); ?>
477
  </p>
478
+ <p>
479
+ <input id="enable_locale_abbreviations" type="checkbox" value="1" name="enable_locale_abbreviations"<?php if ($this->options->enable_locale_abbreviations) echo ' checked="checked"'; ?> />
480
+ <?php _e('enable locale abbreviations behind the language name.', "wp-native-dashboard"); ?>
481
+ </p>
482
  <?php endif; ?>
483
  <p class="csp-read-more">
484
  <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>
485
  </p>
486
  <?php
487
  }
488
+
489
  function on_print_metabox_installed_i18n() {
490
  $installed = wp_native_dashboard_collect_installed_languages();
491
  ?>