jenkins-bot has submitted this change and it was merged.

Change subject: Localize admin pages
......................................................................


Localize admin pages

Change-Id: I97ce973bcb88a2de4df2bcc8e8ccfdc0eac13f82
---
M data/i18n/en.php
M data/templates/admin/user.html
M data/templates/admin/users.html
3 files changed, 38 insertions(+), 21 deletions(-)

Approvals:
  BryanDavis: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/data/i18n/en.php b/data/i18n/en.php
index cf27aa1..2af8115 100644
--- a/data/i18n/en.php
+++ b/data/i18n/en.php
@@ -189,4 +189,21 @@
        'new-password' => "New password:",
        'new-password-again' => "New password (again):",
        'save-password' => "Save password",
+
+       'admin-user-id' => 'Id: $1',
+       'admin-user-email' => 'Email:',
+       'admin-user-reviewer' => "Is reviewer:",
+       'admin-user-valid' => "Is valid:",
+       'admin-user-admin' => "Is admin:",
+       'admin-user-blocked' => "Is blocked:",
+       'admin-user-save' => "Save new user",
+       'admin-users-id' => "id",
+       'admin-users-username' => "username",
+       'admin-users-email' => "email",
+       'admin-users-reviewer' => "reviewer?",
+       'admin-users-admin' => "admin?",
+       'admin-users-blocked' => "blocked?",
+       'admin-users-yes' => "yes",
+       'admin-users-no' => "no",
+       'admin-users-add' => "Add new user",
 );
diff --git a/data/templates/admin/user.html b/data/templates/admin/user.html
index 5ec3175..e7fa65e 100644
--- a/data/templates/admin/user.html
+++ b/data/templates/admin/user.html
@@ -10,34 +10,34 @@
 <form method="post" action="{{ urlFor( 'admin_user_post' ) }}">
   <input type="hidden" name="id" value="{{ id }}"/>
   <fieldset>
-    <legend>Id: {{ id }}</legend>
+    <legend>{{ wgLang.message( 'admin-user-id', [ id ] ) }}
     <ul>
-      <li {{ 'username' in errors ? 'class="fieldWithErrors"' }}><label 
for"username">Username:</label>
+      <li {{ 'username' in errors ? 'class="fieldWithErrors"' }}><label 
for"username">{{ wgLang.message( 'username' ) }}</label>
         <input type="text" name="username" id="username" value="{{ u.username 
}}" required="required"/>
       </li>
       {% if id == 'new' %}
-      <li {{ 'password' in errors ? 'class="fieldWithErrors"' }}><label 
for="password">Password:</label>
+      <li {{ 'password' in errors ? 'class="fieldWithErrors"' }}><label 
for="password">{{ wgLang.message( 'password' ) }}</label>
         <input type="text" name="password" id="password" value="{{ u.password 
}}" required="required"/>
       </li>
       {% endif %}
-      <li {{ 'email' in errors ? 'class="fieldWithErrors"' }}><label 
for="email">Email:</label>
+      <li {{ 'email' in errors ? 'class="fieldWithErrors"' }}><label 
for="email">{{ wgLang.message( 'admin-user-email' ) }}</label>
         <input type="text" name="email" id="email" value="{{ u.email }}" 
required="required"/>
       </li>
-      <li><label for="reviewer" class="inline">Is Reviewer?:</label>
+      <li><label for="reviewer" class="inline">{{ wgLang.message( 
'admin-user-reviewer' ) }}</label>
         <input type="checkbox" name="reviewer" id="reviewer" value="1" {{ 
u.reviewer == 1 ? 'checked="checked"' }}/>
       </li>
-      <li><label for="isvalid" class="inline">Is Valid?:</label>
+      <li><label for="isvalid" class="inline">{{ wgLang.message( 
'admin-user-valid' ) }}</label>
         <input type="checkbox" name="isvalid" id="isvalid" value="1" {{ 
u.isvalid == 1 ? 'checked="checked"' }}/>
       </li>
-      <li><label for="isadmin" class="inline">Is Admin?:</label>
+      <li><label for="isadmin" class="inline">{{ wgLang.message( 
'admin-user-admin' ) }}</label>
         <input type="checkbox" name="isadmin" id="isadmin" value="1" {{ 
u.isadmin == 1 ? 'checked="checked"' }}/>
       </li>
-      <li><label for="blocked" class="inline">Blocked?:</label>
+      <li><label for="blocked" class="inline">{{ wgLang.message( 
'admin-user-blocked' ) }}</label>
         <input type="checkbox" name="blocked" id="blocked" value="1" {{ 
u.blocked == 1 ? 'checked="checked"' }}/>
       </li>
     </ul>
   </fieldset>
-  <input type="submit" id="save" name="save" value="Save"/>
+  <input type="submit" id="save" name="save" value="{{ wgLang.message( 
'admin-user-save' ) }}"/>
 </form>
 {% endspaceless %}
 {% endblock content %}
diff --git a/data/templates/admin/users.html b/data/templates/admin/users.html
index 7c8f7c6..e932354 100644
--- a/data/templates/admin/users.html
+++ b/data/templates/admin/users.html
@@ -4,28 +4,28 @@
 {% spaceless %}
 <table class="grid">
   <tr>
-    <th>id</th>
-    <th>username</th>
-    <th>email</th>
-    <th>reviewer?</th>
-    <th>valid?</th>
-    <th>admin?</th>
-    <th>blocked?</th>
+    <th>{{ wgLang.message( 'admin-users-id' ) }}</th>
+    <th>{{ wgLang.message( 'admin-users-username' ) }}</th>
+    <th>{{ wgLang.message( 'admin-users-email' ) }}</th>
+    <th>{{ wgLang.message( 'admin-users-reviewer' ) }}</th>
+    <th>{{ wgLang.message( 'admin-users-valid' ) }}</th>
+    <th>{{ wgLang.message( 'admin-users-admin' ) }}</th>
+    <th>{{ wgLang.message( 'admin-users-blocked' ) }}</th>
   </tr>
   {% for row in records %}
   <tr class="{{ cycle( [ 'oddrow', 'evenrow' ], loop.index ) }}">
     <td>{{ row.id }}</td>
     <td><a href="{{ urlFor( 'admin_user', { 'id':row.id} ) }}">{{ row.username 
}}</a></td>
     <td><a href="mailto:{{ row.email|url_encode }}">{{ row.email }}</a></td>
-    <td>{{ row.reviewer ? 'yes' : 'no' }}</td>
-    <td>{{ row.isvalid ? 'yes' : 'no' }}</td>
-    <td>{{ row.isadmin ? 'yes' : 'no' }}</td>
-    <td>{{ row.blocked ? 'yes' : 'no' }}</td>
+    <td>{{ row.reviewer ? {{ wgLang.message( 'admin-users-yes' ) }} : {{ 
wgLang.message( 'admin-users-no' ) }} }}</td>
+    <td>{{ row.isvalid ? {{ wgLang.message( 'admin-users-yes' ) }} : {{ 
wgLang.message( 'admin-users-no' ) }} }}</td>
+    <td>{{ row.isadmin ? {{ wgLang.message( 'admin-users-yes' ) }} : {{ 
wgLang.message( 'admin-users-no' ) }} }}</td>
+    <td>{{ row.blocked ? {{ wgLang.message( 'admin-users-yes' ) }} : {{ 
wgLang.message( 'admin-users-no' ) }} }}</td>
   </tr>
   {% endfor %}
 </table>
 {% if isadmin %}
-<p><a href="{{ urlFor( 'admin_user', { 'id':'new' } ) }}">New user</a></p>
+<p><a href="{{ urlFor( 'admin_user', { 'id':'new' } ) }}">{{ wgLang.message( 
'admin-users-add' ) }}</a></p>
 {% endif %}
 {% endspaceless %}
 {% endblock content %}

-- 
To view, visit https://gerrit.wikimedia.org/r/101234
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I97ce973bcb88a2de4df2bcc8e8ccfdc0eac13f82
Gerrit-PatchSet: 2
Gerrit-Project: wikimedia/wikimania-scholarships
Gerrit-Branch: master
Gerrit-Owner: Chad <ch...@wikimedia.org>
Gerrit-Reviewer: BryanDavis <bda...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to