[MediaWiki-commits] [Gerrit] Implement a rough ToC - change (apps...wikipedia)

2014-01-17 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Implement a rough ToC
..


Implement a rough ToC

- Accessed from overflow menu
- Tap each section to go to it
- Only section levels 1 and 2 are shown
- Also adds fadeIn & fadeOut utility methods

Change-Id: I475fefb3d0652cf96b1246489935528c7736d1c6
---
M wikipedia/assets/main.js
M wikipedia/res/layout/fragment_page.xml
A wikipedia/res/layout/header_toc_list.xml
A wikipedia/res/layout/item_toc_entry.xml
M wikipedia/res/menu/menu_page_actions.xml
M wikipedia/res/values/strings.xml
M wikipedia/src/main/java/org/wikipedia/Utils.java
A wikipedia/src/main/java/org/wikipedia/events/ShowToCEvent.java
M wikipedia/src/main/java/org/wikipedia/page/PageActionsHandler.java
M wikipedia/src/main/java/org/wikipedia/page/PageActivity.java
M wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java
A wikipedia/src/main/java/org/wikipedia/page/ToCHandler.java
12 files changed, 252 insertions(+), 14 deletions(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/wikipedia/assets/main.js b/wikipedia/assets/main.js
index 208c530..c8b3ffd 100644
--- a/wikipedia/assets/main.js
+++ b/wikipedia/assets/main.js
@@ -11,6 +11,7 @@
 
 var title = document.createElement( "h1" );
 title.textContent = payload.title;
+title.id = "heading_" + payload.section.id;
 document.getElementById( "content" ).appendChild( title );
 
 var content = document.createElement( "div" );
@@ -76,6 +77,13 @@
 bridge.sendMessage( "imagesListResponse", { "images": imageURLs });
 } );
 
+bridge.registerListener( "scrollToSection", function ( payload ) {
+// The 52 is for dealing with the search header
+var scrollY = document.getElementById( "heading_" + 
payload.sectionID).offsetTop - 52;
+window.scrollTo(0, scrollY);
+});
+
+
 var actionHandlers = {
 "edit_section": function( el, event ) {
 bridge.sendMessage( 'editSectionClicked', { sectionID: 
el.getAttribute( 'data-id' ) } );
diff --git a/wikipedia/res/layout/fragment_page.xml 
b/wikipedia/res/layout/fragment_page.xml
index 6743479..1e9b487 100644
--- a/wikipedia/res/layout/fragment_page.xml
+++ b/wikipedia/res/layout/fragment_page.xml
@@ -17,6 +17,15 @@
 android:layout_height="match_parent"
 android:visibility="gone"
 />
+
 
+
+http://schemas.android.com/apk/res/android";
+  android:layout_width="match_parent"
+  android:layout_height="wrap_content"
+  android:fontFamily="serif"
+  android:padding="16dp"
+  android:textStyle="bold"
+  style="?android:textAppearanceLarge"
+/>
+
diff --git a/wikipedia/res/layout/item_toc_entry.xml 
b/wikipedia/res/layout/item_toc_entry.xml
new file mode 100644
index 000..f18d9b6
--- /dev/null
+++ b/wikipedia/res/layout/item_toc_entry.xml
@@ -0,0 +1,25 @@
+
+
+http://schemas.android.com/apk/res/android";
+  android:layout_width="match_parent"
+  android:layout_height="wrap_content"
+  android:orientation="horizontal"
+>
+
+
+
+
+
diff --git a/wikipedia/res/menu/menu_page_actions.xml 
b/wikipedia/res/menu/menu_page_actions.xml
index 7e31994..960f798 100644
--- a/wikipedia/res/menu/menu_page_actions.xml
+++ b/wikipedia/res/menu/menu_page_actions.xml
@@ -1,7 +1,11 @@
 
 
 http://schemas.android.com/apk/res/android";>
-
+
 Edit failed!
 Retry
 Cancel
+Table of Contents
 
\ No newline at end of file
diff --git a/wikipedia/src/main/java/org/wikipedia/Utils.java 
b/wikipedia/src/main/java/org/wikipedia/Utils.java
index cf5f1f0..39fba22 100644
--- a/wikipedia/src/main/java/org/wikipedia/Utils.java
+++ b/wikipedia/src/main/java/org/wikipedia/Utils.java
@@ -39,21 +39,37 @@
  * @param newView The new view that should be faded in
  */
 public static void crossFade(final View curView, final View newView) {
-newView.setAlpha(0f);
-newView.setVisibility(View.VISIBLE);
-newView.animate()
+fadeIn(newView);
+fadeOut(curView);
+}
+
+/**
+ * Fades in a view.
+ * @param view The currently invisible view to be faded in
+ */
+public static void fadeIn(final View view) {
+view.setAlpha(0f);
+view.setVisibility(View.VISIBLE);
+view.animate()
 .alpha(1.0f)
 .setDuration(WikipediaApp.MEDIUM_ANIMATION_DURATION)
-.setListener(null);
+.setListener(null)
+.start();
+}
 
-curView.animate()
+/**
+ * Fades out a view.
+ * @param view The currently visible view to be faded out
+ */
+public static void fadeOut(final View view) {
+view.animate()
 .alpha(0f)
 .setDuration(WikipediaApp.MEDIUM_ANIMATION

[MediaWiki-commits] [Gerrit] restore $oaiAgentRegex - change (operations/mediawiki-config)

2014-01-17 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: restore $oaiAgentRegex
..


restore $oaiAgentRegex

Was removed in 7c1d036b https://gerrit.wikimedia.org/r/#/c/105475

Change-Id: I824af4a1d4699fb0a8321195f1f7f0e61f06300b
---
M wmf-config/CommonSettings.php
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  Brion VIBBER: Looks good to me, approved



diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 711f685..38128cc 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -912,6 +912,7 @@
 
 # OAI repository for update server
 include( $IP . '/extensions/OAI/OAIRepo.php' );
+$oaiAgentRegex = '/experimental/';
 $oaiAuth = true;
 $oaiAuditDatabase = 'oai';
 $oaiChunkSize = 40;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I824af4a1d4699fb0a8321195f1f7f0e61f06300b
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Hashar 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Add Status outparam for AbortNewAccount hook to fix API erro... - change (mediawiki/core)

2014-01-17 Thread Brion VIBBER (Code Review)
Brion VIBBER has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/108088


Change subject: Add Status outparam for AbortNewAccount hook to fix API error 
handling
..

Add Status outparam for AbortNewAccount hook to fix API error handling

With this fix and relevant fix for ConfirmEdit in, an API account creation
attempt that fails the captcha check will return a much cleaner error such as:

{
  'error': {
'code': 'captcha-createaccount-fail',
'info': 'Incorrect or missing CAPTCHA.'
  }
}

Previously, the returned result would list the contents of the message
_as_ the error code, making it hard for a client to determine the error.

'AbortNewAccount' hook clients can add a '&$status=null' function paramater
on their signature, and along with the back-compat message parameter
you can set something like:

  $msg = wfMessage( 'captcha-createaccount-fail' )->text(); // back-compat
  $status = Status::newFatal( 'captcha-createaccount-fail' ); // new

Bug: 60008
Change-Id: I6ae34c00d1051d34363b6d654424be17dcb1ea30
---
M docs/hooks.txt
M includes/specials/SpecialUserlogin.php
2 files changed, 17 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/88/108088/1

diff --git a/docs/hooks.txt b/docs/hooks.txt
index 197bbd1..3405b76 100644
--- a/docs/hooks.txt
+++ b/docs/hooks.txt
@@ -269,6 +269,9 @@
 'AbortNewAccount': Return false to cancel explicit account creation.
 $user: the User object about to be created (read-only, incomplete)
 &$msg: out parameter: HTML to display on abort
+&$status: out parameter: Status object to return, replaces the older $msg 
param (added in 1.23)
+  Create the object with Status::newFatal() to ensure proper API error 
messages
+  are returned when creating account through API clients.
 
 'AbortTalkPageEmailNotification': Return false to cancel talk page email 
notification
 $targetUser: the user whom to send talk page email notification
diff --git a/includes/specials/SpecialUserlogin.php 
b/includes/specials/SpecialUserlogin.php
index 8e5ef58..8c822ee 100644
--- a/includes/specials/SpecialUserlogin.php
+++ b/includes/specials/SpecialUserlogin.php
@@ -444,12 +444,22 @@
$u->setRealName( $this->mRealName );
 
$abortError = '';
-   if ( !wfRunHooks( 'AbortNewAccount', array( $u, &$abortError ) 
) ) {
+   $abortStatus = null;
+   if ( !wfRunHooks( 'AbortNewAccount', array( $u, &$abortError, 
&$abortStatus ) ) ) {
// Hook point to add extra creation throttles and blocks
wfDebug( "LoginForm::addNewAccountInternal: a hook 
blocked creation\n" );
-   $abortError = new RawMessage( $abortError );
-   $abortError->text();
-   return Status::newFatal( $abortError );
+   if ( $abortStatus === null ) {
+   // Report back the old string as a raw message 
status.
+   // Beware this doesn't report properly back in 
API results
+   // though it works ok for the web UI.
+   $abortError = new RawMessage( $abortError );
+   $abortError->text();
+   return Status::newFatal( $abortError );
+   } else {
+   // For MediaWiki 1.23+ and updated hooks, 
return the Status object
+   // returned from the hook.
+   return $abortStatus;
+   }
}
 
// Hook point to check for exempt from account creation throttle

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6ae34c00d1051d34363b6d654424be17dcb1ea30
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Brion VIBBER 

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


[MediaWiki-commits] [Gerrit] Update ConfirmEdit to return Status object on AbortNewAccoun... - change (mediawiki...ConfirmEdit)

2014-01-17 Thread Brion VIBBER (Code Review)
Brion VIBBER has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/108089


Change subject: Update ConfirmEdit to return Status object on AbortNewAccount 
hook
..

Update ConfirmEdit to return Status object on AbortNewAccount hook

Requires core update I6ae34c0 to actually send the message key back
in the error response. On older MediaWiki versions, behavior should
remain unchanged.

Bug: 60008
Change-Id: If9cc08e44d1d2efacf817b8c6cbb2d71a4e8b692
---
M Captcha.php
M ConfirmEditHooks.php
2 files changed, 7 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ConfirmEdit 
refs/changes/89/108089/1

diff --git a/Captcha.php b/Captcha.php
index 105939d..7f8e1f3 100644
--- a/Captcha.php
+++ b/Captcha.php
@@ -537,9 +537,10 @@
 * Hook for user creation form submissions.
 * @param User $u
 * @param string $message
+* @param string $status
 * @return bool true to continue, false to abort user creation
 */
-   function confirmUserCreate( $u, &$message ) {
+   function confirmUserCreate( $u, &$message, &$status=null ) {
global $wgCaptchaTriggers, $wgUser;
if ( $wgCaptchaTriggers['createaccount'] ) {
if ( $wgUser->isAllowed( 'skipcaptcha' ) ) {
@@ -551,7 +552,10 @@
 
$this->trigger = "new account '" . $u->getName() . "'";
if ( !$this->passCaptcha() ) {
+   // For older MediaWiki
$message = wfMessage( 
'captcha-createaccount-fail' )->text();
+   // For MediaWiki 1.23+
+   $status = Status::newFatal( 
'captcha-createaccount-fail' );
return false;
}
}
diff --git a/ConfirmEditHooks.php b/ConfirmEditHooks.php
index c03e316..bbe7f21 100644
--- a/ConfirmEditHooks.php
+++ b/ConfirmEditHooks.php
@@ -39,8 +39,8 @@
return self::getInstance()->injectUserCreate( $template );
}
 
-   static function confirmUserCreate( $u, &$message ) {
-   return self::getInstance()->confirmUserCreate( $u, $message );
+   static function confirmUserCreate( $u, &$message, &$status=null ) {
+   return self::getInstance()->confirmUserCreate( $u, $message, 
$status );
}
 
static function triggerUserLogin( $user, $password, $retval ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If9cc08e44d1d2efacf817b8c6cbb2d71a4e8b692
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ConfirmEdit
Gerrit-Branch: master
Gerrit-Owner: Brion VIBBER 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Increase default search count to 12 - change (apps...wikipedia)

2014-01-20 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Increase default search count to 12
..


Increase default search count to 12

Based off designer feedback

Change-Id: Icbccadb089a2ce650fdcfe4f0560aa5ef0087441
---
M wikipedia/src/main/java/org/wikipedia/search/SearchArticlesTask.java
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git 
a/wikipedia/src/main/java/org/wikipedia/search/SearchArticlesTask.java 
b/wikipedia/src/main/java/org/wikipedia/search/SearchArticlesTask.java
index 68bec2a..d788ba6 100644
--- a/wikipedia/src/main/java/org/wikipedia/search/SearchArticlesTask.java
+++ b/wikipedia/src/main/java/org/wikipedia/search/SearchArticlesTask.java
@@ -24,7 +24,7 @@
 
 @Override
 public RequestBuilder buildRequest(Api api) {
-return api.action("opensearch").param("search", prefix).param("limit", 
"5");
+return api.action("opensearch").param("search", prefix).param("limit", 
"12");
 }
 
 @Override

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icbccadb089a2ce650fdcfe4f0560aa5ef0087441
Gerrit-PatchSet: 4
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Brion VIBBER 

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


[MediaWiki-commits] [Gerrit] Minor modification to body background - change (apps...wikipedia)

2014-01-20 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Minor modification to body background
..


Minor modification to body background

Based on feedback from designers

Change-Id: I245439153fc27a5cfec85bef37a4165a25c98b02
---
M wikipedia/assets/pagestyles.css
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/wikipedia/assets/pagestyles.css b/wikipedia/assets/pagestyles.css
index 2462d74..1a7b586 100644
--- a/wikipedia/assets/pagestyles.css
+++ b/wikipedia/assets/pagestyles.css
@@ -1,6 +1,6 @@
 /* Should be moved out to the MobileApp extension at some point */
 body {
-background-color: #FAFAFA;
+background-color: #F2F2F2;
 color: #333;
 font-family: sans-serif;
 font-size: 16px;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I245439153fc27a5cfec85bef37a4165a25c98b02
Gerrit-PatchSet: 2
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Brion VIBBER 

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


[MediaWiki-commits] [Gerrit] Switch section headers to sans-serif. Also specify sizes - change (apps...wikipedia)

2014-01-20 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Switch section headers to sans-serif. Also specify sizes
..


Switch section headers to sans-serif. Also specify sizes

Change-Id: I7a4142ce060f036e70c51d831a6d4c9ef19b0152
---
M wikipedia/assets/pagestyles.css
1 file changed, 18 insertions(+), 2 deletions(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/wikipedia/assets/pagestyles.css b/wikipedia/assets/pagestyles.css
index 25f8a38..2462d74 100644
--- a/wikipedia/assets/pagestyles.css
+++ b/wikipedia/assets/pagestyles.css
@@ -23,14 +23,30 @@
 h1 {
 font-family: serif;
 color: #064AAD;
-font-size: 24px;
+font-size: 26px;
 line-height: 36px;
 margin-bottom: 24px;
 font-weight: bold;
 }
 
 h2, h3, h4, h5, h6 {
-font-family: serif;
+font-family: sans-serif;
+}
+
+h2 {
+font-size: 22px;
+}
+
+h3 {
+font-size: 20px;
+}
+
+h4 {
+font-size: 18px;
+}
+
+h5, h6 {
+font-size: 16px;
 }
 
 /* Basic Thumbnails */

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7a4142ce060f036e70c51d831a6d4c9ef19b0152
Gerrit-PatchSet: 2
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Brion VIBBER 

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


[MediaWiki-commits] [Gerrit] Minor tweaks to scrolling to a section from ToC - change (apps...wikipedia)

2014-01-20 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Minor tweaks to scrolling to a section from ToC
..


Minor tweaks to scrolling to a section from ToC

Make sure that the space from the search bar to the heading
is the same as space from left of screen to heading

Change-Id: I4d95564b12be6a39a83627fed596bb77479be33a
---
M wikipedia/assets/main.js
1 file changed, 4 insertions(+), 2 deletions(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/wikipedia/assets/main.js b/wikipedia/assets/main.js
index c8b3ffd..202fda6 100644
--- a/wikipedia/assets/main.js
+++ b/wikipedia/assets/main.js
@@ -78,8 +78,10 @@
 } );
 
 bridge.registerListener( "scrollToSection", function ( payload ) {
-// The 52 is for dealing with the search header
-var scrollY = document.getElementById( "heading_" + 
payload.sectionID).offsetTop - 52;
+var el = document.getElementById( "heading_" + payload.sectionID);
+// Make sure there's exactly as much space on the left as on the top.
+// The 48 accounts for the search bar
+var scrollY = el.offsetTop - 48 - el.offsetLeft;
 window.scrollTo(0, scrollY);
 });
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4d95564b12be6a39a83627fed596bb77479be33a
Gerrit-PatchSet: 2
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Brion VIBBER 

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


[MediaWiki-commits] [Gerrit] Display message when no search results are found - change (apps...wikipedia)

2014-01-20 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Display message when no search results are found
..


Display message when no search results are found

Change-Id: I02ae65f4101ac578c48ae9f3be0060f313f17c72
---
M wikipedia/res/layout/fragment_search.xml
M wikipedia/res/values-qq/strings.xml
M wikipedia/res/values/strings.xml
M wikipedia/src/main/java/org/wikipedia/search/SearchArticlesFragment.java
4 files changed, 18 insertions(+), 8 deletions(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/wikipedia/res/layout/fragment_search.xml 
b/wikipedia/res/layout/fragment_search.xml
index 8de05ca..6337636 100644
--- a/wikipedia/res/layout/fragment_search.xml
+++ b/wikipedia/res/layout/fragment_search.xml
@@ -76,6 +76,15 @@
 
 
+
 Button text to retry a 
failed edit save
 Button text to cancel 
retrying a failed edit save
 Menu item text for showing the Table of 
Contents for the current article
+Message shown to user when no 
search results are found for a string
 
\ No newline at end of file
diff --git a/wikipedia/res/values/strings.xml b/wikipedia/res/values/strings.xml
index 994991f..e4acfdc 100644
--- a/wikipedia/res/values/strings.xml
+++ b/wikipedia/res/values/strings.xml
@@ -52,4 +52,5 @@
 Retry
 Cancel
 Table of Contents
+No results found
 
\ No newline at end of file
diff --git 
a/wikipedia/src/main/java/org/wikipedia/search/SearchArticlesFragment.java 
b/wikipedia/src/main/java/org/wikipedia/search/SearchArticlesFragment.java
index 68f8744..a204749 100644
--- a/wikipedia/src/main/java/org/wikipedia/search/SearchArticlesFragment.java
+++ b/wikipedia/src/main/java/org/wikipedia/search/SearchArticlesFragment.java
@@ -34,6 +34,7 @@
 private ListView searchResultsList;
 private ProgressBar searchProgress;
 private View searchNetworkError;
+private View searchNoResults;
 private View searchBarMenuButton;
 private View drawerIndicator;
 
@@ -59,15 +60,11 @@
 private void displayResults(List results) {
 adapter.setResults(results);
 
((BaseAdapter)searchResultsList.getAdapter()).notifyDataSetInvalidated();
-if (adapter.getCount() == 0) {
+if (results == null) {
 searchResultsList.setVisibility(View.GONE);
 isSearchActive = false;
-// Stupid android, making me hide the keyboard manually
-InputMethodManager inputManager = (InputMethodManager)
-
getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);
-
inputManager.hideSoftInputFromWindow(getActivity().getCurrentFocus().getWindowToken(),
-InputMethodManager.HIDE_NOT_ALWAYS);
-getActivity().getCurrentFocus().clearFocus();
+} else if (results.size() == 0) {
+searchNoResults.setVisibility(View.VISIBLE);
 } else {
 searchResultsList.setVisibility(View.VISIBLE);
 PageImagesTask imagesTask = new PageImagesTask(
@@ -115,6 +112,7 @@
 searchNetworkError = 
parentLayout.findViewById(R.id.search_network_error);
 searchBarMenuButton = 
parentLayout.findViewById(R.id.search_bar_show_menu);
 drawerIndicator = 
parentLayout.findViewById(R.id.search_drawer_indicator);
+searchNoResults = parentLayout.findViewById(R.id.search_results_empty);
 
 PopupMenu pageActionsMenu = new PopupMenu(getActivity(), 
searchBarMenuButton);
 PageActionsHandler pageActionsHandler = new 
PageActionsHandler(app.getBus(), pageActionsMenu, searchBarMenuButton);
@@ -129,7 +127,7 @@
 searchProgress.setVisibility(View.GONE);
 searchNetworkError.setVisibility(View.GONE);
 displayResults(result);
-   searchResultsCache.put(app.getPrimaryLanguage() + "-" + 
searchTerm, result);
+searchResultsCache.put(app.getPrimaryLanguage() + "-" 
+ searchTerm, result);
 lastSearchedText = searchTerm;
 curSearchTask = null;
 }
@@ -193,6 +191,7 @@
 
 @Override
 public void afterTextChanged(final Editable s) {
+searchNoResults.setVisibility(View.GONE);
 startSearch(s.toString());
 }
 });

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I02ae65f4101ac578c48ae9f3be0060f313f17c72
Gerrit-PatchSet: 3
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Brion VIBBER 

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


[MediaWiki-commits] [Gerrit] Start using browserify for the JavaScript - change (apps...wikipedia)

2014-01-20 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Start using browserify for the JavaScript
..


Start using browserify for the JavaScript

- Contains gruntfile to do the compilation steps
- Unit tests have been separated out into bundle-test.js
- Adds package.json to help people get setup easily
- Adds directions to README.md on how to run this

Change-Id: Ibec6889e7a549d9107e21cf4cf77caa940702fc6
---
M README.md
M wikipedia-it/src/main/java/org/wikipedia/test/BridgeTests.java
A wikipedia/assets/Gruntfile.js
M wikipedia/assets/bridge.js
A wikipedia/assets/bundle-test.js
A wikipedia/assets/bundle.js
M wikipedia/assets/index.html
M wikipedia/assets/main.js
A wikipedia/assets/package.json
A wikipedia/assets/tests.html
A wikipedia/assets/tests/inject.js
M wikipedia/assets/tests/pingback.js
M wikipedia/assets/transforms.js
13 files changed, 677 insertions(+), 213 deletions(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/README.md b/README.md
index 87d6710..220396f 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,26 @@
 See also https://git.wikimedia.org/summary/apps%2Fandroid%2Fjava-mwapi.git
 
 
+== Updating bundled JavaScript ==
+
+Portions of JavaScript code run inside the WebView component that displays 
articles.
+This code is prepackaged using a [Grunt-js 
task](http://gruntjs.com/getting-started), which must be re-run every time the 
master .js files are edited before building.
+
+Preparing:
+
+First, install the Grunt CLI tool:
+* npm install -g grunt-cli
+
+Install dependencies for packaging:
+* cd wikipedia/assets
+* npm install
+
+Building:
+
+* cd wikipedia/assets
+* grunt
+
+
 == Updating icons from SVG ==
 
 Many of our icons are maintained as SVG originals, rasterized to PNG at the
diff --git a/wikipedia-it/src/main/java/org/wikipedia/test/BridgeTests.java 
b/wikipedia-it/src/main/java/org/wikipedia/test/BridgeTests.java
index e84381f..05d41c9 100644
--- a/wikipedia-it/src/main/java/org/wikipedia/test/BridgeTests.java
+++ b/wikipedia-it/src/main/java/org/wikipedia/test/BridgeTests.java
@@ -26,7 +26,7 @@
 public void run() {
 startActivity(new Intent(), null, null);
 WebView webView = new WebView(getActivity());
-bridge = new CommunicationBridge(webView, 
"file:///android_asset/index.html");
+bridge = new CommunicationBridge(webView, 
"file:///android_asset/tests.html");
 bridge.addListener("DOMLoaded", new 
CommunicationBridge.JSEventListener() {
 @Override
 public JSONObject onMessage(String messageType, JSONObject 
messagePayload) {
@@ -47,27 +47,20 @@
 public void run() {
 startActivity(new Intent(), null, null);
 WebView webView = new WebView(getActivity());
-bridge = new CommunicationBridge(webView, 
"file:///android_asset/index.html");
+bridge = new CommunicationBridge(webView, 
"file:///android_asset/tests.html");
 final JSONObject payload = new JSONObject();
 try {
-payload.put("src", 
"file:///android_asset/tests/pingback.js");
+payload.put("src", "./pingback");
 } catch (JSONException e) {
 throw new RuntimeException(e); // JESUS CHRIST, JAVA!
 }
-bridge.addListener("pingBackLoaded", new 
CommunicationBridge.JSEventListener() {
+bridge.sendMessage("ping", payload);
+bridge.addListener("pong", new 
CommunicationBridge.JSEventListener() {
 @Override
 public JSONObject onMessage(String messageType, JSONObject 
messagePayload) {
-assertEquals(messageType, "pingBackLoaded");
-bridge.sendMessage("ping", payload);
-bridge.addListener("pong", new 
CommunicationBridge.JSEventListener() {
-@Override
-public JSONObject onMessage(String messageType, 
JSONObject messagePayload) {
-assertEquals(messageType, "pong");
-assertEquals(messagePayload.toString(), 
payload.toString());
-completionLatch.countDown();
-return null;
-}
-});
+assertEquals(messageType, "pong");
+assertEquals(messagePayload.toString(), 
payload.toString());
+completionLatch.countDown();
 return null;
 }
 });
diff --git a/wikipedia/assets/Gruntfile.js b/wikipedia/assets/Gruntfile.js
new file mode 100644
index 000..418f61c
--- /dev/null
+++ b/wikipedia/asset

[MediaWiki-commits] [Gerrit] Add jshint support & fix jshint errors - change (apps...wikipedia)

2014-01-20 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Add jshint support & fix jshint errors
..


Add jshint support & fix jshint errors

Slightly modified version of the .jshintrc file from
mediawiki/core.git

Change-Id: I18a1aa803e556be33813c32f711c467aeead0a38
---
A wikipedia/assets/.jshintrc
M wikipedia/assets/Gruntfile.js
M wikipedia/assets/bridge.js
M wikipedia/assets/bundle-test.js
M wikipedia/assets/bundle.js
M wikipedia/assets/main.js
M wikipedia/assets/package.json
M wikipedia/assets/transforms.js
8 files changed, 110 insertions(+), 72 deletions(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/wikipedia/assets/.jshintrc b/wikipedia/assets/.jshintrc
new file mode 100644
index 000..2af4189
--- /dev/null
+++ b/wikipedia/assets/.jshintrc
@@ -0,0 +1,40 @@
+{
+   /* Common */
+
+   // Enforcing
+   "camelcase": true,
+   "curly": true,
+   "eqeqeq": true,
+   "immed": true,
+   "latedef": true,
+   "newcap": true,
+   "noarg": true,
+   "noempty": true,
+   "nonew": true,
+   "trailing": true,
+   "undef": true,
+   "unused": true,
+
+   /* Local */
+
+   // Enforcing
+   "bitwise": true,
+   "forin": false,
+   "regexp": false,
+   "strict": false,
+   // Relaxing
+   "laxbreak": true,
+   "smarttabs": true,
+   "multistr": true,
+   // Environment
+   "browser": true,
+   // Legacy
+   "nomen": true,
+
+   "predef": [
+   "marshaller",
+"require",
+"console",
+"module"
+   ]
+}
diff --git a/wikipedia/assets/Gruntfile.js b/wikipedia/assets/Gruntfile.js
index 418f61c..7393171 100644
--- a/wikipedia/assets/Gruntfile.js
+++ b/wikipedia/assets/Gruntfile.js
@@ -8,10 +8,22 @@
 "bundle-test.js": [ "main.js", "bridge.js", "tests/*.js" ]
 }
 }
+},
+jshint: {
+allFiles: [
+"main.js",
+"transforms.js",
+"bridge.js",
+"tests/*.js"
+],
+options: {
+jshintrc: ".jshintrc"
+}
 }
 } );
 
 grunt.loadNpmTasks( 'grunt-browserify' );
+grunt.loadNpmTasks( 'grunt-contrib-jshint' );
 
 grunt.registerTask( 'default', [ 'browserify' ] );
-}
\ No newline at end of file
+};
\ No newline at end of file
diff --git a/wikipedia/assets/bridge.js b/wikipedia/assets/bridge.js
index c7a2fa8..6fb2e1d 100644
--- a/wikipedia/assets/bridge.js
+++ b/wikipedia/assets/bridge.js
@@ -23,7 +23,7 @@
 
 Bridge.prototype.sendMessage = function( messageType, payload ) {
 var messagePack = { type: messageType, payload: payload };
-var ret = prompt( JSON.stringify( messagePack) );
+var ret = window.prompt( JSON.stringify( messagePack) );
 if ( ret ) {
 return JSON.parse( ret );
 }
@@ -33,4 +33,4 @@
 // FIXME: Move this to somwehere else, eh?
 window.onload = function() {
 module.exports.sendMessage( "DOMLoaded", {} );
-}
\ No newline at end of file
+};
\ No newline at end of file
diff --git a/wikipedia/assets/bundle-test.js b/wikipedia/assets/bundle-test.js
index 0f0e85b..e4f9db8 100644
--- a/wikipedia/assets/bundle-test.js
+++ b/wikipedia/assets/bundle-test.js
@@ -24,7 +24,7 @@
 
 Bridge.prototype.sendMessage = function( messageType, payload ) {
 var messagePack = { type: messageType, payload: payload };
-var ret = prompt( JSON.stringify( messagePack) );
+var ret = window.prompt( JSON.stringify( messagePack) );
 if ( ret ) {
 return JSON.parse( ret );
 }
@@ -34,18 +34,12 @@
 // FIXME: Move this to somwehere else, eh?
 window.onload = function() {
 module.exports.sendMessage( "DOMLoaded", {} );
-}
+};
 },{}],2:[function(require,module,exports){
 var bridge = require("./bridge");
 var transforms = require("./transforms");
 
 window.bridge = bridge;
-
-function forEach( list, fun ) {
-// Hack from 
https://developer.mozilla.org/en-US/docs/Web/API/NodeList#Workarounds
-// To let me use forEach on things like NodeList objects
-Array.prototype.forEach.call( list, fun );
-}
 
 bridge.registerListener( "displayLeadSection", function( payload ) {
 // This might be a refresh! Clear out all contents!
@@ -86,10 +80,10 @@
 }
 
 bridge.registerListener( "displaySection", function ( payload ) {
-var content_wrapper = document.getElementById( "content" );
+var contentWrapper = document.getElementById( "content" );
 
 elementsForSection( payload.section ).forEach( function( element ) {
-content_wrapper.appendChild( element );
+contentWrapper.appendChild( element );
 });
 if ( !payload.isLast ) {
 bridge.sendMessage( "requestSection", { index: payload.index + 1 } );
@@ -98,7 +92,7 @@
 }
 });
 
-bridge.registerListener( "startSectionsDisplay", function( 

[MediaWiki-commits] [Gerrit] Move handleMessage out of bridge into global namespace - change (apps...wikipedia)

2014-01-20 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Move handleMessage out of bridge into global namespace
..


Move handleMessage out of bridge into global namespace

Since handleMessage shouldn't be called from JS, having it
be part of the bridge interface in JS is confusing

Change-Id: I560957d89c1927320c6ad57639cc0dbcdc90531f
---
M wikipedia/assets/bridge.js
M wikipedia/assets/bundle-test.js
M wikipedia/assets/bundle.js
M wikipedia/assets/main.js
M wikipedia/src/main/java/org/wikipedia/CommunicationBridge.java
5 files changed, 28 insertions(+), 31 deletions(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/wikipedia/assets/bridge.js b/wikipedia/assets/bridge.js
index 6fb2e1d..4e9f520 100644
--- a/wikipedia/assets/bridge.js
+++ b/wikipedia/assets/bridge.js
@@ -1,23 +1,24 @@
 function Bridge() {
-this.eventHandlers = {};
 }
 
-// This is called directly from Java, and hence needs to be available
-Bridge.prototype.handleMessage = function( type, msgPointer ) {
+var eventHandlers = {};
+
+// This is called directly from Java
+window.handleMessage = function( type, msgPointer ) {
 var that = this;
 var payload = JSON.parse( marshaller.getPayload( msgPointer ) );
-if ( this.eventHandlers.hasOwnProperty( type ) ) {
-this.eventHandlers[type].forEach( function( callback ) {
+if ( eventHandlers.hasOwnProperty( type ) ) {
+eventHandlers[type].forEach( function( callback ) {
 callback.call( that, payload );
 } );
 }
 };
 
 Bridge.prototype.registerListener = function( messageType, callback ) {
-if ( this.eventHandlers.hasOwnProperty( messageType ) ) {
-this.eventHandlers[messageType].push( callback );
+if ( eventHandlers.hasOwnProperty( messageType ) ) {
+eventHandlers[messageType].push( callback );
 } else {
-this.eventHandlers[messageType] = [ callback ];
+eventHandlers[messageType] = [ callback ];
 }
 };
 
diff --git a/wikipedia/assets/bundle-test.js b/wikipedia/assets/bundle-test.js
index e4f9db8..03d6c37 100644
--- a/wikipedia/assets/bundle-test.js
+++ b/wikipedia/assets/bundle-test.js
@@ -1,24 +1,25 @@
 (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof 
require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw 
new Error("Cannot find module '"+o+"'")}var 
f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return 
s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof 
require=="function"&&require;for(var o=0;ohttps://gerrit.wikimedia.org/r/108501
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I560957d89c1927320c6ad57639cc0dbcdc90531f
Gerrit-PatchSet: 3
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Brion VIBBER 

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


[MediaWiki-commits] [Gerrit] Moved link related actions to a separate file - change (apps...wikipedia)

2014-01-20 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Moved link related actions to a separate file
..


Moved link related actions to a separate file

Change-Id: I595bdd5011de1f4ebe25faea16f68afcc8012767
---
M wikipedia/assets/Gruntfile.js
M wikipedia/assets/bundle.js
A wikipedia/assets/linkactions.js
3 files changed, 45 insertions(+), 3 deletions(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/wikipedia/assets/Gruntfile.js b/wikipedia/assets/Gruntfile.js
index 7393171..eec9811 100644
--- a/wikipedia/assets/Gruntfile.js
+++ b/wikipedia/assets/Gruntfile.js
@@ -4,7 +4,7 @@
 browserify: {
 dist: {
 files: {
-"bundle.js": [ "main.js", "transforms.js", "bridge.js"],
+"bundle.js": [ "main.js", "transforms.js", "bridge.js", 
"linkactions.js"],
 "bundle-test.js": [ "main.js", "bridge.js", "tests/*.js" ]
 }
 }
@@ -14,6 +14,7 @@
 "main.js",
 "transforms.js",
 "bridge.js",
+"linkactions.js",
 "tests/*.js"
 ],
 options: {
diff --git a/wikipedia/assets/bundle.js b/wikipedia/assets/bundle.js
index f584039..db7e5af 100644
--- a/wikipedia/assets/bundle.js
+++ b/wikipedia/assets/bundle.js
@@ -37,6 +37,27 @@
 module.exports.sendMessage( "DOMLoaded", {} );
 };
 },{}],2:[function(require,module,exports){
+var bridge = require('./bridge');
+
+var actionHandlers = {
+"edit_section": function( el, event ) {
+bridge.sendMessage( 'editSectionClicked', { sectionID: 
el.getAttribute( 'data-id' ) } );
+event.preventDefault();
+}
+};
+
+document.onclick = function() {
+if ( event.target.tagName === "A" ) {
+if ( event.target.hasAttribute( "data-action" ) ) {
+var action = event.target.getAttribute( "data-action" );
+actionHandlers[ action ]( event.target, event );
+} else {
+bridge.sendMessage( 'linkClicked', { href: 
event.target.getAttribute( "href" ) });
+event.preventDefault();
+}
+}
+};
+},{"./bridge":1}],3:[function(require,module,exports){
 var bridge = require("./bridge");
 var transforms = require("./transforms");
 
@@ -139,7 +160,7 @@
 }
 }
 };
-},{"./bridge":1,"./transforms":3}],3:[function(require,module,exports){
+},{"./bridge":1,"./transforms":4}],4:[function(require,module,exports){
 var bridge = require("./bridge");
 var Transforms = function () {};
 
@@ -198,4 +219,4 @@
 };
 
 module.exports = new Transforms();
-},{"./bridge":1}]},{},[2,3,1])
\ No newline at end of file
+},{"./bridge":1}]},{},[3,4,1,2])
\ No newline at end of file
diff --git a/wikipedia/assets/linkactions.js b/wikipedia/assets/linkactions.js
new file mode 100644
index 000..73feb09
--- /dev/null
+++ b/wikipedia/assets/linkactions.js
@@ -0,0 +1,20 @@
+var bridge = require('./bridge');
+
+var actionHandlers = {
+"edit_section": function( el, event ) {
+bridge.sendMessage( 'editSectionClicked', { sectionID: 
el.getAttribute( 'data-id' ) } );
+event.preventDefault();
+}
+};
+
+document.onclick = function() {
+if ( event.target.tagName === "A" ) {
+if ( event.target.hasAttribute( "data-action" ) ) {
+var action = event.target.getAttribute( "data-action" );
+actionHandlers[ action ]( event.target, event );
+} else {
+bridge.sendMessage( 'linkClicked', { href: 
event.target.getAttribute( "href" ) });
+event.preventDefault();
+}
+}
+};
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I595bdd5011de1f4ebe25faea16f68afcc8012767
Gerrit-PatchSet: 2
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Brion VIBBER 

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


[MediaWiki-commits] [Gerrit] Move js files to separate directory - change (apps...wikipedia)

2014-01-20 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Move js files to separate directory
..


Move js files to separate directory

Everything in assets/ is included by default. This makes sure
that only the files that are actually needed are in the assets/
folder. A grunt copy task is defined to do that.

README.md is updated with new directions for updating these files.

Change-Id: I00dc36aa09c8245950d2533ff7bed34011fa35e8
---
M .gitignore
M README.md
D wikipedia/assets/Gruntfile.js
R wikipedia/assets/images/edit.png
C wikipedia/assets/images/images/edit.png
D wikipedia/assets/package.json
M wikipedia/assets/ui.css
R www/.jshintrc
A www/Gruntfile.js
R www/bridge.js
C www/images/edit.png
A www/index.html
R www/linkactions.js
R www/main.js
A www/package.json
A www/pagestyles.css
R www/tests.html
R www/tests/inject.js
R www/tests/pingback.js
R www/transforms.js
A www/ui.css
21 files changed, 213 insertions(+), 44 deletions(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/.gitignore b/.gitignore
index d3b8119..488209c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -19,3 +19,7 @@
 # Data pulled out of device with scripts/pullfiles.bash
 scripts/apps
 scripts/backup.ab
+
+# Node modules for the js
+www/node_modules
+www/bundle*.js
diff --git a/README.md b/README.md
index 220396f..1afc1d7 100644
--- a/README.md
+++ b/README.md
@@ -12,14 +12,16 @@
 * npm install -g grunt-cli
 
 Install dependencies for packaging:
-* cd wikipedia/assets
+* cd www
 * npm install
 
 Building:
 
-* cd wikipedia/assets
+* cd www
 * grunt
 
+This will produce output files under wikipedia/assets which will be included 
in the .apk.
+
 
 == Updating icons from SVG ==
 
diff --git a/wikipedia/assets/Gruntfile.js b/wikipedia/assets/Gruntfile.js
deleted file mode 100644
index eec9811..000
--- a/wikipedia/assets/Gruntfile.js
+++ /dev/null
@@ -1,30 +0,0 @@
-module.exports = function( grunt ) {
-grunt.initConfig( {
-pkg: grunt.file.readJSON( "package.json" ),
-browserify: {
-dist: {
-files: {
-"bundle.js": [ "main.js", "transforms.js", "bridge.js", 
"linkactions.js"],
-"bundle-test.js": [ "main.js", "bridge.js", "tests/*.js" ]
-}
-}
-},
-jshint: {
-allFiles: [
-"main.js",
-"transforms.js",
-"bridge.js",
-"linkactions.js",
-"tests/*.js"
-],
-options: {
-jshintrc: ".jshintrc"
-}
-}
-} );
-
-grunt.loadNpmTasks( 'grunt-browserify' );
-grunt.loadNpmTasks( 'grunt-contrib-jshint' );
-
-grunt.registerTask( 'default', [ 'browserify' ] );
-};
\ No newline at end of file
diff --git a/wikipedia/assets/edit.png b/wikipedia/assets/images/edit.png
similarity index 100%
rename from wikipedia/assets/edit.png
rename to wikipedia/assets/images/edit.png
Binary files differ
diff --git a/wikipedia/assets/edit.png b/wikipedia/assets/images/images/edit.png
similarity index 100%
copy from wikipedia/assets/edit.png
copy to wikipedia/assets/images/images/edit.png
Binary files differ
diff --git a/wikipedia/assets/package.json b/wikipedia/assets/package.json
deleted file mode 100644
index 2111c68..000
--- a/wikipedia/assets/package.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
-"name": "wikipedia-android",
-"description": "JS files required for the Wikipedia Android app",
-"repository": "https://gerrit.wikimedia.org/r/apps/android/wikipedia";,
-"version": "0.1.0",
-"devDependencies": {
-"grunt": "~0.4.2",
-"grunt-contrib-jshint": "~0.8.0",
-"grunt-browserify": "~1.3.0"
-}
-}
\ No newline at end of file
diff --git a/wikipedia/assets/ui.css b/wikipedia/assets/ui.css
index 5f156d2..2edab9c 100644
--- a/wikipedia/assets/ui.css
+++ b/wikipedia/assets/ui.css
@@ -1,7 +1,7 @@
 a.edit_section_button {
 height: 32px;
 width: 32px;
-background-image: url("edit.png");
+background-image: url("images/edit.png");
 background-size: 32px 32px;
 float: right;
 display: inline-float;
diff --git a/wikipedia/assets/.jshintrc b/www/.jshintrc
similarity index 100%
rename from wikipedia/assets/.jshintrc
rename to www/.jshintrc
diff --git a/www/Gruntfile.js b/www/Gruntfile.js
new file mode 100644
index 000..7158aeb
--- /dev/null
+++ b/www/Gruntfile.js
@@ -0,0 +1,45 @@
+module.exports = function( grunt ) {
+grunt.initConfig( {
+pkg: grunt.file.readJSON( "package.json" ),
+browserify: {
+dist: {
+files: {
+"bundle.js": [ "main.js", "transforms.js", "bridge.js", 
"linkactions.js"],
+"bundle-test.js": [ "main.js", "bridge.js", "tests/*.js" ]
+}
+}
+},
+jshint: {
+al

[MediaWiki-commits] [Gerrit] Add a 'watch' command to grunt to simplify development - change (apps...wikipedia)

2014-01-20 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Add a 'watch' command to grunt to simplify development
..


Add a 'watch' command to grunt to simplify development

This runs the grunt build tasks whenever the master files are modified,
while the 'grunt watch' command is running.

Change-Id: Ibd530dc12008bfeb010e986cdc3d92e611fe7a5d
---
M README.md
M www/Gruntfile.js
M www/package.json
3 files changed, 33 insertions(+), 8 deletions(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/README.md b/README.md
index 1afc1d7..6212118 100644
--- a/README.md
+++ b/README.md
@@ -23,6 +23,14 @@
 This will produce output files under wikipedia/assets which will be included 
in the .apk.
 
 
+You can also have grunt run continuously, watching the effected files for 
updates and running the build tasks automatically.
+This might be useful.
+
+* cd www
+* grunt watch
+* ... update files ...
+
+
 == Updating icons from SVG ==
 
 Many of our icons are maintained as SVG originals, rasterized to PNG at the
diff --git a/www/Gruntfile.js b/www/Gruntfile.js
index 7158aeb..e85e8b4 100644
--- a/www/Gruntfile.js
+++ b/www/Gruntfile.js
@@ -1,4 +1,19 @@
 module.exports = function( grunt ) {
+var allScriptFiles = [
+"main.js",
+"transforms.js",
+"bridge.js",
+"linkactions.js",
+"tests/*.js"
+];
+var allStyleFiles = [
+"pagestyles.css",
+"ui.css"
+];
+var allHTMLFiles = [
+"index.html",
+"tests.html"
+];
 grunt.initConfig( {
 pkg: grunt.file.readJSON( "package.json" ),
 browserify: {
@@ -10,13 +25,7 @@
 }
 },
 jshint: {
-allFiles: [
-"main.js",
-"transforms.js",
-"bridge.js",
-"linkactions.js",
-"tests/*.js"
-],
+allFiles: allScriptFiles,
 options: {
 jshintrc: ".jshintrc"
 }
@@ -34,12 +43,19 @@
 {src: ["images/*"], dest:"../wikipedia/assets/"}
 ]
 }
+},
+watch: {
+scripts: {
+files: allScriptFiles.concat( allStyleFiles ).concat( 
allHTMLFiles ),
+tasks: ["default"]
+}
 }
 } );
 
 grunt.loadNpmTasks( 'grunt-browserify' );
 grunt.loadNpmTasks( 'grunt-contrib-jshint' );
 grunt.loadNpmTasks( 'grunt-contrib-copy' );
+grunt.loadNpmTasks( 'grunt-contrib-watch' );
 
 grunt.registerTask( 'default', [ 'browserify', 'copy' ] );
 };
\ No newline at end of file
diff --git a/www/package.json b/www/package.json
index 7be16c6..94c644f 100644
--- a/www/package.json
+++ b/www/package.json
@@ -7,6 +7,7 @@
 "grunt": "~0.4.2",
 "grunt-contrib-jshint": "~0.8.0",
 "grunt-browserify": "~1.3.0",
-"grunt-contrib-copy": "~0.5.0"
+"grunt-contrib-copy": "~0.5.0",
+"grunt-contrib-watch": "~0.5.3"
   }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibd530dc12008bfeb010e986cdc3d92e611fe7a5d
Gerrit-PatchSet: 3
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Brion VIBBER 

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


[MediaWiki-commits] [Gerrit] Organize files into js and css directories - change (apps...wikipedia)

2014-01-20 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Organize files into js and css directories
..


Organize files into js and css directories

Change-Id: If47f793acd9e2ded3cdd027c24aab561d9931523
---
M wikipedia-it/src/main/java/org/wikipedia/test/BridgeTests.java
M wikipedia/assets/bundle-test.js
C wikipedia/assets/tests/index.html
M www/Gruntfile.js
R www/css/pagestyles.css
R www/css/ui.css
R www/js/bridge.js
R www/js/linkactions.js
R www/js/main.js
R www/js/transforms.js
R www/tests/index.html
M www/tests/inject.js
M www/tests/pingback.js
13 files changed, 26 insertions(+), 26 deletions(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/wikipedia-it/src/main/java/org/wikipedia/test/BridgeTests.java 
b/wikipedia-it/src/main/java/org/wikipedia/test/BridgeTests.java
index 05d41c9..02ff0cd 100644
--- a/wikipedia-it/src/main/java/org/wikipedia/test/BridgeTests.java
+++ b/wikipedia-it/src/main/java/org/wikipedia/test/BridgeTests.java
@@ -26,7 +26,7 @@
 public void run() {
 startActivity(new Intent(), null, null);
 WebView webView = new WebView(getActivity());
-bridge = new CommunicationBridge(webView, 
"file:///android_asset/tests.html");
+bridge = new CommunicationBridge(webView, 
"file:///android_asset/tests/index.html");
 bridge.addListener("DOMLoaded", new 
CommunicationBridge.JSEventListener() {
 @Override
 public JSONObject onMessage(String messageType, JSONObject 
messagePayload) {
@@ -47,7 +47,7 @@
 public void run() {
 startActivity(new Intent(), null, null);
 WebView webView = new WebView(getActivity());
-bridge = new CommunicationBridge(webView, 
"file:///android_asset/tests.html");
+bridge = new CommunicationBridge(webView, 
"file:///android_asset/tests/index.html");
 final JSONObject payload = new JSONObject();
 try {
 payload.put("src", "./pingback");
diff --git a/wikipedia/assets/bundle-test.js b/wikipedia/assets/bundle-test.js
index 03d6c37..a06cd5c 100644
--- a/wikipedia/assets/bundle-test.js
+++ b/wikipedia/assets/bundle-test.js
@@ -139,19 +139,7 @@
 }
 }
 };
-},{"./bridge":1,"./transforms":5}],3:[function(require,module,exports){
-var bridge = require("../bridge");
-bridge.registerListener( "injectScript", function( payload ) {
-require(payload.src);
-});
-},{"../bridge":1}],4:[function(require,module,exports){
-var bridge = require("../bridge");
-console.log("Something!");
-bridge.registerListener( "ping", function( payload ) {
-bridge.sendMessage( "pong", payload );
-});
-
-},{"../bridge":1}],5:[function(require,module,exports){
+},{"./bridge":1,"./transforms":3}],3:[function(require,module,exports){
 var bridge = require("./bridge");
 var Transforms = function () {};
 
@@ -210,4 +198,16 @@
 };
 
 module.exports = new Transforms();
-},{"./bridge":1}]},{},[2,1,3,4])
\ No newline at end of file
+},{"./bridge":1}],4:[function(require,module,exports){
+var bridge = require("../js/bridge");
+bridge.registerListener( "injectScript", function( payload ) {
+require(payload.src);
+});
+},{"../js/bridge":1}],5:[function(require,module,exports){
+var bridge = require("../js/bridge");
+console.log("Something!");
+bridge.registerListener( "ping", function( payload ) {
+bridge.sendMessage( "pong", payload );
+});
+
+},{"../js/bridge":1}]},{},[2,1,4,5])
\ No newline at end of file
diff --git a/www/tests.html b/wikipedia/assets/tests/index.html
similarity index 100%
copy from www/tests.html
copy to wikipedia/assets/tests/index.html
diff --git a/www/Gruntfile.js b/www/Gruntfile.js
index e85e8b4..ae90fb0 100644
--- a/www/Gruntfile.js
+++ b/www/Gruntfile.js
@@ -1,9 +1,9 @@
 module.exports = function( grunt ) {
 var allScriptFiles = [
-"main.js",
-"transforms.js",
-"bridge.js",
-"linkactions.js",
+"js/main.js",
+"js/transforms.js",
+"js/bridge.js",
+"js/linkactions.js",
 "tests/*.js"
 ];
 var allStyleFiles = [
@@ -12,15 +12,15 @@
 ];
 var allHTMLFiles = [
 "index.html",
-"tests.html"
+"tests/index.html"
 ];
 grunt.initConfig( {
 pkg: grunt.file.readJSON( "package.json" ),
 browserify: {
 dist: {
 files: {
-"bundle.js": [ "main.js", "transforms.js", "bridge.js", 
"linkactions.js"],
-"bundle-test.js": [ "main.js", "bridge.js", "tests/*.js" ]
+"bundle.js": [ "js/main.js", "js/transforms.js", 
"js/bridge.js", "js/linkactions.js"],
+"bundle-test.js": [ "js/main.js", "js/bridge.js", 
"tests/*.js" ]
 }
 }
 },
@@ -37,7 +37,7 @@

[MediaWiki-commits] [Gerrit] Moved section display JS code to its own file - change (apps...wikipedia)

2014-01-20 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Moved section display JS code to its own file
..


Moved section display JS code to its own file

Change-Id: I820bb1a94378ff5181ae9cbb5a60718dc4e0ba35
---
M wikipedia/assets/bundle-test.js
M wikipedia/assets/bundle.js
M www/Gruntfile.js
M www/js/main.js
A www/js/sections.js
5 files changed, 91 insertions(+), 272 deletions(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/wikipedia/assets/bundle-test.js b/wikipedia/assets/bundle-test.js
index a06cd5c..01bacac 100644
--- a/wikipedia/assets/bundle-test.js
+++ b/wikipedia/assets/bundle-test.js
@@ -38,63 +38,6 @@
 };
 },{}],2:[function(require,module,exports){
 var bridge = require("./bridge");
-var transforms = require("./transforms");
-
-bridge.registerListener( "displayLeadSection", function( payload ) {
-// This might be a refresh! Clear out all contents!
-document.getElementById( "content" ).innerHTML = "";
-
-var title = document.createElement( "h1" );
-title.textContent = payload.title;
-title.id = "heading_" + payload.section.id;
-document.getElementById( "content" ).appendChild( title );
-
-var content = document.createElement( "div" );
-content.innerHTML = payload.section.text;
-content.id = "#content_block_0";
-content = transforms.transform( "lead", content );
-document.getElementById( "content" ).appendChild( content );
-
-document.getElementById( "loading_sections").className = "loading";
-});
-
-function elementsForSection( section ) {
-var heading = document.createElement( "h" + ( section.toclevel + 1 ) );
-heading.textContent = section.line;
-heading.id = "heading_" + section.id;
-heading.setAttribute( 'data-id', section.id );
-
-var editButton = document.createElement( "a" );
-editButton.setAttribute( 'data-id', section.id );
-editButton.setAttribute( 'data-action', "edit_section" );
-editButton.className = "edit_section_button";
-heading.appendChild( editButton );
-
-var content = document.createElement( "div" );
-content.innerHTML = section.text;
-content.id = "content_block_" + section.id;
-content = transforms.transform( "body", content );
-
-return [ heading, content ];
-}
-
-bridge.registerListener( "displaySection", function ( payload ) {
-var contentWrapper = document.getElementById( "content" );
-
-elementsForSection( payload.section ).forEach( function( element ) {
-contentWrapper.appendChild( element );
-});
-if ( !payload.isLast ) {
-bridge.sendMessage( "requestSection", { index: payload.index + 1 } );
-} else {
-document.getElementById( "loading_sections").className = "";
-}
-});
-
-bridge.registerListener( "startSectionsDisplay", function() {
-bridge.sendMessage( "requestSection", { index: 1 } );
-});
-
 bridge.registerListener( "displayAttribution", function( payload ) {
 var lastUpdatedA = document.getElementById( "lastupdated" );
 lastUpdatedA.innerText = payload.historyText;
@@ -111,103 +54,16 @@
 }
 bridge.sendMessage( "imagesListResponse", { "images": imageURLs });
 } );
-
-bridge.registerListener( "scrollToSection", function ( payload ) {
-var el = document.getElementById( "heading_" + payload.sectionID);
-// Make sure there's exactly as much space on the left as on the top.
-// The 48 accounts for the search bar
-var scrollY = el.offsetTop - 48 - el.offsetLeft;
-window.scrollTo(0, scrollY);
-});
-
-
-var actionHandlers = {
-"edit_section": function( el, event ) {
-bridge.sendMessage( 'editSectionClicked', { sectionID: 
el.getAttribute( 'data-id' ) } );
-event.preventDefault();
-}
-};
-
-document.onclick = function() {
-if ( event.target.tagName === "A" ) {
-if ( event.target.hasAttribute( "data-action" ) ) {
-var action = event.target.getAttribute( "data-action" );
-actionHandlers[ action ]( event.target, event );
-} else {
-bridge.sendMessage( 'linkClicked', { href: 
event.target.getAttribute( "href" ) });
-event.preventDefault();
-}
-}
-};
-},{"./bridge":1,"./transforms":3}],3:[function(require,module,exports){
-var bridge = require("./bridge");
-var Transforms = function () {};
-
-function moveInfobox( leadContent ) {
-// Move infobox to the bottom of the lead section
-var infobox = leadContent.querySelector( "table.infobox" );
-if ( infobox ) {
-infobox.parentNode.removeChild( infobox );
-var pTags = leadContent.getElementsByTagName( "p" );
-if ( pTags.length ) {
-pTags[0].appendChild( infobox );
-} else {
-leadContent.appendChild( infobox );
-}
-}
-return leadContent;
-}
-
-function useLocalImagesForSavedPages( content ) {
-var images = content.querySelectorAll( "img

[MediaWiki-commits] [Gerrit] Start using LESS instead of CSS directly - change (apps...wikipedia)

2014-01-20 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Start using LESS instead of CSS directly
..


Start using LESS instead of CSS directly

- No LESS features being used... yet!
- grunt by default now does LESS compilation too

Change-Id: I4fb8ba8e4cba90f0f8e04c883c19b127deac23c1
---
M .gitignore
M wikipedia/assets/index.html
A wikipedia/assets/styles.css
M www/Gruntfile.js
M www/index.html
R www/less/pagestyles.less
R www/less/ui.less
M www/package.json
8 files changed, 134 insertions(+), 7 deletions(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/.gitignore b/.gitignore
index 488209c..d758f28 100644
--- a/.gitignore
+++ b/.gitignore
@@ -23,3 +23,4 @@
 # Node modules for the js
 www/node_modules
 www/bundle*.js
+www/styles.css
diff --git a/wikipedia/assets/index.html b/wikipedia/assets/index.html
index 5f07156..d3d5ff3 100644
--- a/wikipedia/assets/index.html
+++ b/wikipedia/assets/index.html
@@ -4,8 +4,7 @@
 https://wikipedia.org"; /> 
 
 
- 
- 
+ 
 
 
 
diff --git a/wikipedia/assets/styles.css b/wikipedia/assets/styles.css
new file mode 100644
index 000..d073bf7
--- /dev/null
+++ b/wikipedia/assets/styles.css
@@ -0,0 +1,119 @@
+/* Should be moved out to the MobileApp extension at some point */
+body {
+  background-color: #F2F2F2;
+  color: #333;
+  font-family: sans-serif;
+  font-size: 16px;
+  line-height: 24px;
+  margin: 0;
+  padding: 0;
+  margin-top: 48px;
+}
+#content {
+  padding: 8px 24px;
+}
+a {
+  color: #347BFF;
+  text-decoration: none;
+}
+/* Headers */
+h1 {
+  font-family: serif;
+  color: #064AAD;
+  font-size: 26px;
+  line-height: 36px;
+  margin-bottom: 24px;
+  font-weight: bold;
+}
+h2,
+h3,
+h4,
+h5,
+h6 {
+  font-family: sans-serif;
+}
+h2 {
+  font-size: 22px;
+}
+h3 {
+  font-size: 20px;
+}
+h4 {
+  font-size: 18px;
+}
+h5,
+h6 {
+  font-size: 16px;
+}
+/* Basic Thumbnails */
+.thumb {
+  /* Don't stick thumbnails to the text above and below it */
+  margin: 8px 0px;
+  /* Align everything inside a thumbnail to be centered */
+  text-align: center;
+}
+.thumb .thumbinner {
+  /* Make sure that thumb takes up full width */
+  width: 100% !important;
+}
+.thumb .magnify {
+  display: none;
+  /* Our parser is STUPID */
+}
+.thumb .noresize {
+  overflow-x: auto;
+  /* Scrollbars for images that shouldn't be squished */
+}
+/* Makes sure that we don't have horizontal scrollbars for the entire page 
because
+   an image is too wide to fit in to the current viewport */
+img {
+  max-width: 100% !important;
+  height: auto !important;
+}
+/* Basic tables */
+table {
+  width: 100% !important;
+  overflow-x: auto;
+  display: block;
+  border: 1px solid #ccc;
+  margin-top: 4px;
+  margin-bottom: 4px;
+}
+/* Last updated info */
+#attribution {
+  border-top: 1px solid #ccc;
+  padding: 8px;
+  text-align: center;
+  color: #888;
+  font-size: 80%;
+}
+
+a.edit_section_button {
+  height: 32px;
+  width: 32px;
+  background-image: url("images/edit.png");
+  background-size: 32px 32px;
+  float: right;
+  display: inline-float;
+}
+/* Loading animation in pure CSS
+   Thanks to http://dabblet.com/gist/7708654 */
+.loading {
+  border: 4px solid rgba(0, 0, 0, 0.1);
+  border-top: 4px solid rgba(0, 0, 0, 0.4);
+  border-radius: 100%;
+  animation: rot .6s infinite linear;
+}
+@keyframes rot {
+  from {
+transform: rotate(0deg);
+  }
+  to {
+transform: rotate(359deg);
+  }
+}
+#loading_sections {
+  margin: 8px auto;
+  height: 24px;
+  width: 24px;
+}
diff --git a/www/Gruntfile.js b/www/Gruntfile.js
index 388f757..b359975 100644
--- a/www/Gruntfile.js
+++ b/www/Gruntfile.js
@@ -25,6 +25,13 @@
 }
 }
 },
+less: {
+all: {
+files: [
+{ src: ["less/*.less"], dest: "styles.css"}
+]
+}
+},
 jshint: {
 allFiles: allScriptFiles,
 options: {
@@ -35,7 +42,7 @@
 main: {
 files: [
 // App files
-{src: ["bundle.js", "index.html", "pagestyles.css", 
"ui.css"], dest: "../wikipedia/assets/"},
+{src: ["bundle.js", "index.html", "styles.css"], dest: 
"../wikipedia/assets/"},
 
 // Test files
 {src: ["bundle-test.js", "tests/index.html"], dest: 
"../wikipedia/assets/"},
@@ -57,6 +64,7 @@
 grunt.loadNpmTasks( 'grunt-contrib-jshint' );
 grunt.loadNpmTasks( 'grunt-contrib-copy' );
 grunt.loadNpmTasks( 'grunt-contrib-watch' );
+grunt.loadNpmTasks( 'grunt-contrib-less' );
 
-grunt.registerTask( 'default', [ 'browserify', 'copy' ] );
+grunt.registerTask( 'default', [ 'browserify', 'less', 'copy' ] );
 };
\ No newline at end of file
diff --git a/www/index.html b/www/index.html
index 5f07156..d3d5ff3 100644
--- a/www/index.html
+++ b/www/index.h

[MediaWiki-commits] [Gerrit] Make CommunicationBridge fully asynchronous - change (apps...wikipedia)

2014-01-21 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Make CommunicationBridge fully asynchronous
..


Make CommunicationBridge fully asynchronous

- Removes ability to return JSON from messages
- This is because we use prompt to communicate from JS -> Java,
  but prompt blocks!
- This still breaks saved pages, because they use Java to
  calculate MD5. Fixed in later commit

Change-Id: I19edfba3f872047f274fbde75dfaf2c9f92e06bf
---
M wikipedia-it/src/main/java/org/wikipedia/test/BridgeTests.java
M wikipedia/src/main/java/org/wikipedia/CommunicationBridge.java
M wikipedia/src/main/java/org/wikipedia/Utils.java
M wikipedia/src/main/java/org/wikipedia/editing/EditHandler.java
M wikipedia/src/main/java/org/wikipedia/page/LinkHandler.java
M wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java
M wikipedia/src/main/java/org/wikipedia/savedpages/SavePageTask.java
7 files changed, 34 insertions(+), 47 deletions(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved

Objections:
  Yuvipanda: There's a problem with this change, please improve



diff --git a/wikipedia-it/src/main/java/org/wikipedia/test/BridgeTests.java 
b/wikipedia-it/src/main/java/org/wikipedia/test/BridgeTests.java
index 02ff0cd..228fc1e 100644
--- a/wikipedia-it/src/main/java/org/wikipedia/test/BridgeTests.java
+++ b/wikipedia-it/src/main/java/org/wikipedia/test/BridgeTests.java
@@ -29,10 +29,9 @@
 bridge = new CommunicationBridge(webView, 
"file:///android_asset/tests/index.html");
 bridge.addListener("DOMLoaded", new 
CommunicationBridge.JSEventListener() {
 @Override
-public JSONObject onMessage(String messageType, JSONObject 
messagePayload) {
+public void onMessage(String messageType, JSONObject 
messagePayload) {
 assertEquals(messageType, "DOMLoaded");
 completionLatch.countDown();
-return null;
 }
 });
 }
@@ -57,11 +56,10 @@
 bridge.sendMessage("ping", payload);
 bridge.addListener("pong", new 
CommunicationBridge.JSEventListener() {
 @Override
-public JSONObject onMessage(String messageType, JSONObject 
messagePayload) {
+public void onMessage(String messageType, JSONObject 
messagePayload) {
 assertEquals(messageType, "pong");
 assertEquals(messagePayload.toString(), 
payload.toString());
 completionLatch.countDown();
-return null;
 }
 });
 bridge.sendMessage("injectScript", payload);
diff --git a/wikipedia/src/main/java/org/wikipedia/CommunicationBridge.java 
b/wikipedia/src/main/java/org/wikipedia/CommunicationBridge.java
index 84e0581..ba468cf 100644
--- a/wikipedia/src/main/java/org/wikipedia/CommunicationBridge.java
+++ b/wikipedia/src/main/java/org/wikipedia/CommunicationBridge.java
@@ -1,5 +1,8 @@
 package org.wikipedia;
 
+import android.os.Handler;
+import android.os.Looper;
+import android.os.Message;
 import android.util.Log;
 import android.webkit.*;
 import org.json.JSONArray;
@@ -23,7 +26,7 @@
 private final ArrayList pendingJSMessages = new 
ArrayList();
 
 public interface JSEventListener {
-public JSONObject onMessage(String messageType, JSONObject 
messagePayload);
+public void onMessage(String messageType, JSONObject messagePayload);
 }
 
 public CommunicationBridge(final WebView webView, final String baseURL) {
@@ -40,12 +43,11 @@
 eventListeners = new HashMap>();
 this.addListener("DOMLoaded", new JSEventListener() {
 @Override
-public JSONObject onMessage(String messageType, JSONObject 
messagePayload) {
+public void onMessage(String messageType, JSONObject 
messagePayload) {
 isDOMReady = true;
 for(String jsString : pendingJSMessages) {
 CommunicationBridge.this.webView.loadUrl(jsString);
 }
-return null;
 }
 });
 }
@@ -79,34 +81,31 @@
 }
 }
 
+private static final int MESSAGE_HANDLE_MESSAGE_FROM_JS = 1;
+private Handler incomingMessageHandler = new 
Handler(Looper.getMainLooper(), new Handler.Callback() {
+@Override
+public boolean handleMessage(Message msg) {
+JSONObject messagePack = (JSONObject) msg.obj;
+String type = messagePack.optString("type");
+if (!eventListeners.containsKey(type)) {
+throw new RuntimeException("No such message type registered: " 
+ type);
+}
+ArrayList listeners = eventListeners.get(type);
+for (JSEventListener listener 

[MediaWiki-commits] [Gerrit] Use OpenSans WebFont for primary content - change (apps...wikipedia)

2014-01-21 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Use OpenSans WebFont for primary content
..


Use OpenSans WebFont for primary content

This does not adversely affect performance, since we are
loading the font locally

Change-Id: I003c70c7dcaa31069998965f5a21af6ade6eba4e
---
A wikipedia/assets/fonts/OpenSans-Bold.ttf
A wikipedia/assets/fonts/OpenSans-BoldItalic.ttf
A wikipedia/assets/fonts/OpenSans-Italic.ttf
A wikipedia/assets/fonts/OpenSans.ttf
M wikipedia/assets/styles.css
M www/Gruntfile.js
A www/fonts/OpenSans-Bold.ttf
A www/fonts/OpenSans-BoldItalic.ttf
A www/fonts/OpenSans-Italic.ttf
A www/fonts/OpenSans.ttf
A www/less/fonts.less
M www/less/pagestyles.less
12 files changed, 60 insertions(+), 9 deletions(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/wikipedia/assets/fonts/OpenSans-Bold.ttf 
b/wikipedia/assets/fonts/OpenSans-Bold.ttf
new file mode 100644
index 000..fd79d43
--- /dev/null
+++ b/wikipedia/assets/fonts/OpenSans-Bold.ttf
Binary files differ
diff --git a/wikipedia/assets/fonts/OpenSans-BoldItalic.ttf 
b/wikipedia/assets/fonts/OpenSans-BoldItalic.ttf
new file mode 100644
index 000..9bc8009
--- /dev/null
+++ b/wikipedia/assets/fonts/OpenSans-BoldItalic.ttf
Binary files differ
diff --git a/wikipedia/assets/fonts/OpenSans-Italic.ttf 
b/wikipedia/assets/fonts/OpenSans-Italic.ttf
new file mode 100644
index 000..c90da48
--- /dev/null
+++ b/wikipedia/assets/fonts/OpenSans-Italic.ttf
Binary files differ
diff --git a/wikipedia/assets/fonts/OpenSans.ttf 
b/wikipedia/assets/fonts/OpenSans.ttf
new file mode 100644
index 000..db43334
--- /dev/null
+++ b/wikipedia/assets/fonts/OpenSans.ttf
Binary files differ
diff --git a/wikipedia/assets/styles.css b/wikipedia/assets/styles.css
index d073bf7..d489102 100644
--- a/wikipedia/assets/styles.css
+++ b/wikipedia/assets/styles.css
@@ -1,10 +1,35 @@
+@font-face {
+  font-family: 'Open Sans';
+  font-style: normal;
+  font-weight: 400;
+  src: local('Open Sans'), local('OpenSans'), url(fonts/OpenSans.ttf) 
format('truetype');
+}
+@font-face {
+  font-family: 'Open Sans';
+  font-style: normal;
+  font-weight: 700;
+  src: local('Open Sans Bold'), local('OpenSans-Bold'), 
url(fonts/OpenSans-Bold.ttf) format('truetype');
+}
+@font-face {
+  font-family: 'Open Sans';
+  font-style: italic;
+  font-weight: 400;
+  src: local('Open Sans Italic'), local('OpenSans-Italic'), 
url(fonts/OpenSans-Italic.ttf) format('truetype');
+}
+@font-face {
+  font-family: 'Open Sans';
+  font-style: italic;
+  font-weight: 700;
+  src: local('Open Sans Bold Italic'), local('OpenSans-BoldItalic'), 
url(fonts/OpenSans-BoldItalic.ttf) format('truetype');
+}
+
 /* Should be moved out to the MobileApp extension at some point */
 body {
   background-color: #F2F2F2;
   color: #333;
-  font-family: sans-serif;
+  font-family: "Open Sans", sans-serif;
   font-size: 16px;
-  line-height: 24px;
+  line-height: 160%;
   margin: 0;
   padding: 0;
   margin-top: 48px;
@@ -30,7 +55,7 @@
 h4,
 h5,
 h6 {
-  font-family: sans-serif;
+  font-family: "Open Sans", sans-serif;
 }
 h2 {
   font-size: 22px;
diff --git a/www/Gruntfile.js b/www/Gruntfile.js
index b359975..65b554c 100644
--- a/www/Gruntfile.js
+++ b/www/Gruntfile.js
@@ -8,8 +8,7 @@
 "tests/*.js"
 ];
 var allStyleFiles = [
-"pagestyles.css",
-"ui.css"
+"less/*.less"
 ];
 var allHTMLFiles = [
 "index.html",
@@ -48,7 +47,10 @@
 {src: ["bundle-test.js", "tests/index.html"], dest: 
"../wikipedia/assets/"},
 
 // Images
-{src: ["images/*"], dest:"../wikipedia/assets/"}
+{src: ["images/*"], dest:"../wikipedia/assets/"},
+
+// Fonts
+{src: ["fonts/*"], dest:"../wikipedia/assets/"}
 ]
 }
 },
diff --git a/www/fonts/OpenSans-Bold.ttf b/www/fonts/OpenSans-Bold.ttf
new file mode 100644
index 000..fd79d43
--- /dev/null
+++ b/www/fonts/OpenSans-Bold.ttf
Binary files differ
diff --git a/www/fonts/OpenSans-BoldItalic.ttf 
b/www/fonts/OpenSans-BoldItalic.ttf
new file mode 100644
index 000..9bc8009
--- /dev/null
+++ b/www/fonts/OpenSans-BoldItalic.ttf
Binary files differ
diff --git a/www/fonts/OpenSans-Italic.ttf b/www/fonts/OpenSans-Italic.ttf
new file mode 100644
index 000..c90da48
--- /dev/null
+++ b/www/fonts/OpenSans-Italic.ttf
Binary files differ
diff --git a/www/fonts/OpenSans.ttf b/www/fonts/OpenSans.ttf
new file mode 100644
index 000..db43334
--- /dev/null
+++ b/www/fonts/OpenSans.ttf
Binary files differ
diff --git a/www/less/fonts.less b/www/less/fonts.less
new file mode 100644
index 000..2dcf564
--- /dev/null
+++ b/www/less/fonts.less
@@ -0,0 +1,24 @@
+@font-face {
+  font-family: 'Open Sans';
+  font-style: normal;
+  font-weight: 400;
+  src: local('Open Sans'), local('OpenSa

[MediaWiki-commits] [Gerrit] Mark all EditTexts to have the 'Done' IME Option - change (apps...wikipedia)

2014-01-21 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Mark all EditTexts to have the 'Done' IME Option
..


Mark all EditTexts to have the 'Done' IME Option

Change-Id: Iff9efeba0e4d309e817c1246278671a8104198ef
---
M wikipedia/res/layout/activity_edit_section.xml
M wikipedia/res/layout/activity_langlinks.xml
M wikipedia/res/layout/dialog_preference_languages.xml
M wikipedia/res/layout/fragment_search.xml
4 files changed, 6 insertions(+), 0 deletions(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/wikipedia/res/layout/activity_edit_section.xml 
b/wikipedia/res/layout/activity_edit_section.xml
index f246c8f..3720921 100644
--- a/wikipedia/res/layout/activity_edit_section.xml
+++ b/wikipedia/res/layout/activity_edit_section.xml
@@ -41,6 +41,7 @@
 android:layout_height="match_parent"
 android:fontFamily="monospace"
 android:gravity="top|left"
+android:imeOptions="actionDone"
 />
 
 
diff --git a/wikipedia/res/layout/activity_langlinks.xml 
b/wikipedia/res/layout/activity_langlinks.xml
index 1ca942a..877b344 100644
--- a/wikipedia/res/layout/activity_langlinks.xml
+++ b/wikipedia/res/layout/activity_langlinks.xml
@@ -50,6 +50,8 @@
 
 
diff --git a/wikipedia/res/layout/dialog_preference_languages.xml 
b/wikipedia/res/layout/dialog_preference_languages.xml
index 4e6670c..b9a1504 100644
--- a/wikipedia/res/layout/dialog_preference_languages.xml
+++ b/wikipedia/res/layout/dialog_preference_languages.xml
@@ -7,6 +7,8 @@
 
 
 https://gerrit.wikimedia.org/r/108703
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Iff9efeba0e4d309e817c1246278671a8104198ef
Gerrit-PatchSet: 2
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Yuvipanda 

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


[MediaWiki-commits] [Gerrit] Minor stylistic fixes to make use of LESS features - change (apps...wikipedia)

2014-01-21 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Minor stylistic fixes to make use of LESS features
..


Minor stylistic fixes to make use of LESS features

Change-Id: I1445658e53810bb11244e6c1df2689ab2ca6e045
---
M www/less/pagestyles.less
1 file changed, 10 insertions(+), 10 deletions(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/www/less/pagestyles.less b/www/less/pagestyles.less
index 1a7b586..5e7f2fe 100644
--- a/www/less/pagestyles.less
+++ b/www/less/pagestyles.less
@@ -55,19 +55,19 @@
 margin: 8px 0px;
 /* Align everything inside a thumbnail to be centered */
 text-align: center;
-}
 
-.thumb .thumbinner {
-/* Make sure that thumb takes up full width */
-width: 100% !important;
-}
+.thumbinner {
+/* Make sure that thumb takes up full width */
+width: 100% !important;
+}
 
-.thumb .magnify {
-display: none; /* Our parser is STUPID */
-}
+.magnify {
+display: none; /* Our parser is STUPID */
+}
 
-.thumb .noresize {
-overflow-x: auto; /* Scrollbars for images that shouldn't be squished */
+.noresize {
+overflow-x: auto; /* Scrollbars for images that shouldn't be squished 
*/
+}
 }
 
 /* Makes sure that we don't have horizontal scrollbars for the entire page 
because

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1445658e53810bb11244e6c1df2689ab2ca6e045
Gerrit-PatchSet: 2
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Brion VIBBER 

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


[MediaWiki-commits] [Gerrit] Work in progress: move edit section button styles from Andro... - change (mediawiki...MobileApp)

2014-06-24 Thread Brion VIBBER (Code Review)
Brion VIBBER has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/141762

Change subject: Work in progress: move edit section button styles from Android 
to generic
..

Work in progress: move edit section button styles from Android to generic

Change-Id: Id0767093b4beb3280d2d223b726a77c2582b9162
---
M less/android.less
M less/editlinks.less
2 files changed, 26 insertions(+), 26 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileApp 
refs/changes/62/141762/1

diff --git a/less/android.less b/less/android.less
index e4f46cd..823bc91 100644
--- a/less/android.less
+++ b/less/android.less
@@ -2,32 +2,6 @@
padding-top: 48px;
 }
 
-.no-editing {
-a.edit_section_button {
-display: none;
-}
-}
-
-.page-protected {
-   a.edit_section_button {
-   /* @embed */
-   background-image: url("../images/edit-locked.png");
-   }
-}
-
-#mainpage {
-   a.edit_section_button {
-   display: none;
-   }
-}
-
-.content-rtl a.edit_section_button {
-float: left;
-/* Flip it! */
--webkit-transform: scaleX(-1);
-transform: scaleX(-1);
-}
-
 /* Loading animation in pure CSS
Thanks to http://dabblet.com/gist/7708654 */
 .loading {
diff --git a/less/editlinks.less b/less/editlinks.less
index e796ff0..7ae3f33 100644
--- a/less/editlinks.less
+++ b/less/editlinks.less
@@ -7,3 +7,29 @@
float: right;
display: inline-float;
 }
+
+.no-editing {
+a.edit_section_button {
+display: none;
+}
+}
+
+.page-protected {
+   a.edit_section_button {
+   /* @embed */
+   background-image: url("../images/edit-locked.png");
+   }
+}
+
+#mainpage {
+   a.edit_section_button {
+   display: none;
+   }
+}
+
+.content-rtl a.edit_section_button {
+float: left;
+/* Flip it! */
+-webkit-transform: scaleX(-1);
+transform: scaleX(-1);
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id0767093b4beb3280d2d223b726a77c2582b9162
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileApp
Gerrit-Branch: master
Gerrit-Owner: Brion VIBBER 

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


[MediaWiki-commits] [Gerrit] Work in progress: adding edit protection fields - change (apps...wikipedia)

2014-06-24 Thread Brion VIBBER (Code Review)
Brion VIBBER has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/141763

Change subject: Work in progress: adding edit protection fields
..

Work in progress: adding edit protection fields

Requires CSS updates in https://gerrit.wikimedia.org/r/#/c/141762/
to get the edit buttons to show broken, assuming it works. :D

Change-Id: I894850b27e18eb150e98ad516b6a93def748c53e
---
M Wikipedia.xcodeproj/project.pbxproj
M wikipedia/Categories/Article+Convenience.h
M wikipedia/Categories/Article+Convenience.m
M wikipedia/Data/Model/Article.h
M wikipedia/Data/Model/Article.m
A wikipedia/Data/Model/ArticleData.xcdatamodeld/.xccurrentversion
A wikipedia/Data/Model/ArticleData.xcdatamodeld/ArticleData 
2.xcdatamodel/contents
M wikipedia/Data/Model/ArticleData.xcdatamodeld/ArticleData.xcdatamodel/contents
M wikipedia/Data/Operations/DownloadSectionsOp.m
M wikipedia/EventLogging/ProtectedEditAttemptFunnel.m
M wikipedia/View Controllers/WebView/WebViewController.m
M wikipedia/assets/bundle.js
M www/js/listeners.js
13 files changed, 179 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia 
refs/changes/63/141763/1

diff --git a/Wikipedia.xcodeproj/project.pbxproj 
b/Wikipedia.xcodeproj/project.pbxproj
index 24c6f2a..eb49a04 100644
--- a/Wikipedia.xcodeproj/project.pbxproj
+++ b/Wikipedia.xcodeproj/project.pbxproj
@@ -634,6 +634,7 @@
D4B0AE0C19366A5400F0AC90 /* LoginFunnel.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = 
LoginFunnel.h; path = EventLogging/LoginFunnel.h; sourceTree = ""; };
D4B0AE0D19366A5400F0AC90 /* LoginFunnel.m */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name 
= LoginFunnel.m; path = EventLogging/LoginFunnel.m; sourceTree = ""; };
D4BC22B3181E9E6300CAC673 /* empty.png */ = {isa = 
PBXFileReference; lastKnownFileType = image.png; path = empty.png; sourceTree = 
""; };
+   D4CA33D71959FDEC0093588B /* ArticleData 2.xcdatamodel */ = {isa 
= PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = 
"ArticleData 2.xcdatamodel"; sourceTree = ""; };
D4DE203018283FF200148CA2 /* CommunicationBridgeTests.m */ = 
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = 
sourcecode.c.objc; path = CommunicationBridgeTests.m; sourceTree = ""; };
D4E8A8A2190835C100DA4765 /* DataMigrator.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = 
DataMigrator.h; path = wikipedia/DataMigrator.h; sourceTree = SOURCE_ROOT; };
D4E8A8A3190835C100DA4765 /* DataMigrator.m */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name 
= DataMigrator.m; path = wikipedia/DataMigrator.m; sourceTree = SOURCE_ROOT; };
@@ -2225,9 +2226,10 @@
04FD6C78184EBFCD002CA02F /* ArticleData.xcdatamodeld */ = {
isa = XCVersionGroup;
children = (
+   D4CA33D71959FDEC0093588B /* ArticleData 
2.xcdatamodel */,
04FD6C79184EBFCD002CA02F /* 
ArticleData.xcdatamodel */,
);
-   currentVersion = 04FD6C79184EBFCD002CA02F /* 
ArticleData.xcdatamodel */;
+   currentVersion = D4CA33D71959FDEC0093588B /* 
ArticleData 2.xcdatamodel */;
path = ArticleData.xcdatamodeld;
sourceTree = "";
versionGroupType = wrapper.xcdatamodel;
diff --git a/wikipedia/Categories/Article+Convenience.h 
b/wikipedia/Categories/Article+Convenience.h
index b5cba6a..33f8d3f 100644
--- a/wikipedia/Categories/Article+Convenience.h
+++ b/wikipedia/Categories/Article+Convenience.h
@@ -19,4 +19,6 @@
 
 @property (readonly) MWPageTitle* titleObj;
 
+@property (readonly) BOOL editableBool;
+
 @end
diff --git a/wikipedia/Categories/Article+Convenience.m 
b/wikipedia/Categories/Article+Convenience.m
index 0de5870..146b5b4 100644
--- a/wikipedia/Categories/Article+Convenience.m
+++ b/wikipedia/Categories/Article+Convenience.m
@@ -130,4 +130,13 @@
 return [MWPageTitle titleWithString:self.title];
 }
 
+-(BOOL)editableBool
+{
+if (self.editable == nil) {
+return YES; // default
+} else {
+return [self.editable boolValue];
+}
+}
+
 @end
diff --git a/wikipedia/Data/Model/Article.h b/wikipedia/Data/Model/Article.h
index 2802a46..be8b1db 100644
--- a/wikipedia/Data/Model/Article.h
+++ b/wikipedia/Data/Model/Article.h
@@ -1,5 +1,10 @@
-//  Created by Monte Hurd on 5/2/14.
-//  Created by Monte Hurd on 4/29/14.
+//
+//  Article.h
+//  Wikipedia
+//
+//  Created by Brion on 6/24/14.
+//  Copyright (c) 2014 Wikimedia Foundation. All rights reserved.
+//
 
 #import 
 #import 
@@ -8,6 +13,7 @@
 
 @interface Article : NSMa

[MediaWiki-commits] [Gerrit] Proactively handle network connection error. - change (apps...wikipedia)

2014-06-25 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Proactively handle network connection error.
..


Proactively handle network connection error.

Change-Id: Ie378e5ffa67f8921a340eba7f85adda7866d5adc
---
M wikipedia/Session/SessionSingleton.h
M wikipedia/Session/SessionSingleton.m
M wikipedia/View Controllers/WebView/WebViewController.m
3 files changed, 19 insertions(+), 2 deletions(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/wikipedia/Session/SessionSingleton.h 
b/wikipedia/Session/SessionSingleton.h
index 33e7897..eec1fe1 100644
--- a/wikipedia/Session/SessionSingleton.h
+++ b/wikipedia/Session/SessionSingleton.h
@@ -27,6 +27,7 @@
 
 @property (strong, atomic) NSArray *unsupportedCharactersLanguageIds;
 
+@property (nonatomic) BOOL fallback;
 -(NSURL *)urlForDomain:(NSString *)domain;
 -(NSString *)domainNameForCode:(NSString *)code;
 
diff --git a/wikipedia/Session/SessionSingleton.m 
b/wikipedia/Session/SessionSingleton.m
index b1e75df..d5a157e 100644
--- a/wikipedia/Session/SessionSingleton.m
+++ b/wikipedia/Session/SessionSingleton.m
@@ -35,12 +35,14 @@
 
 -(NSURL *)urlForDomain:(NSString *)domain
 {
-return [NSURL URLWithString:[NSString 
stringWithFormat:@"https://%@.m.%@/w/api.php";, domain, [self site]]];
+NSString *endpoint = self.fallback ? @"" : @".m";
+return [NSURL URLWithString:[NSString 
stringWithFormat:@"https://%@%@.%@/w/api.php";, domain, endpoint, [self site]]];
 }
 
 -(NSString *)searchApiUrl
 {
-return [NSString stringWithFormat:@"https://%@.m.%@/w/api.php";, [self 
domain], [self site]];
+NSString *endpoint = self.fallback ? @"" : @".m";
+return [NSString stringWithFormat:@"https://%@%@.%@/w/api.php";, [self 
domain], endpoint, [self site]];
 }
 
 -(void)setDomain:(NSString *)domain
diff --git a/wikipedia/View Controllers/WebView/WebViewController.m 
b/wikipedia/View Controllers/WebView/WebViewController.m
index b97011c..7b3577b 100644
--- a/wikipedia/View Controllers/WebView/WebViewController.m
+++ b/wikipedia/View Controllers/WebView/WebViewController.m
@@ -1408,6 +1408,20 @@
 Article *article = (Article *)[articleDataContext_.workerContext 
objectWithID:articleID];
 [articleDataContext_.workerContext deleteObject:article];
 }
+
+// @TODO potentially do this in the difFailWithError in MWNetworkOp
+// It seems safe enough, but we didn't want to cause any sort of 
memory leak
+if (error.domain == NSStreamSocketSSLErrorDomain ||
+(error.domain == NSURLErrorDomain &&
+ (error.code == NSURLErrorSecureConnectionFailed ||
+  error.code == NSURLErrorServerCertificateHasBadDate ||
+  error.code == NSURLErrorServerCertificateUntrusted ||
+  error.code == NSURLErrorServerCertificateHasUnknownRoot ||
+  error.code == NSURLErrorServerCertificateNotYetValid)
+ )
+) {
+[SessionSingleton sharedInstance].fallback = true;
+}
 }];
 
 firstSectionOp.delegate = self;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie378e5ffa67f8921a340eba7f85adda7866d5adc
Gerrit-PatchSet: 3
Gerrit-Project: apps/ios/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Dr0ptp4kt 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Dr0ptp4kt 
Gerrit-Reviewer: Mhurd 

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


[MediaWiki-commits] [Gerrit] Add updated localization files to project - change (apps...wikipedia)

2014-06-25 Thread Brion VIBBER (Code Review)
Brion VIBBER has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/141914

Change subject: Add updated localization files to project
..

Add updated localization files to project

Change-Id: I6bb8c8ae62098197437bec492e7b2cc84428f262
---
M Wikipedia.xcodeproj/project.pbxproj
1 file changed, 102 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia 
refs/changes/14/141914/1

diff --git a/Wikipedia.xcodeproj/project.pbxproj 
b/Wikipedia.xcodeproj/project.pbxproj
index 24c6f2a..6165714 100644
--- a/Wikipedia.xcodeproj/project.pbxproj
+++ b/Wikipedia.xcodeproj/project.pbxproj
@@ -590,6 +590,51 @@
D44F637918DA793A00EAD1DD /* zh-hans */ = {isa = 
PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-hans"; 
path = "zh-hans.lproj/Main_iPhone.strings"; sourceTree = ""; };
D44F637A18DA794000EAD1DD /* zh-hant */ = {isa = 
PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-hant"; 
path = "zh-hant.lproj/InfoPlist.strings"; sourceTree = ""; };
D44F637B18DA794000EAD1DD /* zh-hant */ = {isa = 
PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-hant"; 
path = "zh-hant.lproj/Main_iPhone.strings"; sourceTree = ""; };
+   D4679060195AD36D00C4E44D /* bn */ = {isa = PBXFileReference; 
lastKnownFileType = text.plist.strings; name = bn; path = 
bn.lproj/Localizable.strings; sourceTree = ""; };
+   D4679061195AD37A00C4E44D /* ca */ = {isa = PBXFileReference; 
lastKnownFileType = text.plist.strings; name = ca; path = 
ca.lproj/Localizable.strings; sourceTree = ""; };
+   D4679062195AD38700C4E44D /* da */ = {isa = PBXFileReference; 
lastKnownFileType = text.plist.strings; name = da; path = 
da.lproj/InfoPlist.strings; sourceTree = ""; };
+   D4679063195AD38700C4E44D /* da */ = {isa = PBXFileReference; 
lastKnownFileType = text.plist.strings; name = da; path = 
da.lproj/Main_iPhone.strings; sourceTree = ""; };
+   D4679064195AD39C00C4E44D /* diq */ = {isa = PBXFileReference; 
lastKnownFileType = text.plist.strings; name = diq; path = 
diq.lproj/InfoPlist.strings; sourceTree = ""; };
+   D4679065195AD39C00C4E44D /* diq */ = {isa = PBXFileReference; 
lastKnownFileType = text.plist.strings; name = diq; path = 
diq.lproj/Localizable.strings; sourceTree = ""; };
+   D4679066195AD39C00C4E44D /* diq */ = {isa = PBXFileReference; 
lastKnownFileType = text.plist.strings; name = diq; path = 
diq.lproj/Main_iPhone.strings; sourceTree = ""; };
+   D4679067195AD3A900C4E44D /* fo */ = {isa = PBXFileReference; 
lastKnownFileType = text.plist.strings; name = fo; path = 
fo.lproj/InfoPlist.strings; sourceTree = ""; };
+   D4679068195AD3A900C4E44D /* fo */ = {isa = PBXFileReference; 
lastKnownFileType = text.plist.strings; name = fo; path = 
fo.lproj/Localizable.strings; sourceTree = ""; };
+   D4679069195AD3A900C4E44D /* fo */ = {isa = PBXFileReference; 
lastKnownFileType = text.plist.strings; name = fo; path = 
fo.lproj/Main_iPhone.strings; sourceTree = ""; };
+   D467906A195AD3B300C4E44D /* frp */ = {isa = PBXFileReference; 
lastKnownFileType = text.plist.strings; name = frp; path = 
frp.lproj/InfoPlist.strings; sourceTree = ""; };
+   D467906B195AD3B300C4E44D /* frp */ = {isa = PBXFileReference; 
lastKnownFileType = text.plist.strings; name = frp; path = 
frp.lproj/Main_iPhone.strings; sourceTree = ""; };
+   D467906C195AD3BE00C4E44D /* hrx */ = {isa = PBXFileReference; 
lastKnownFileType = text.plist.strings; name = hrx; path = 
hrx.lproj/InfoPlist.strings; sourceTree = ""; };
+   D467906D195AD3BE00C4E44D /* hrx */ = {isa = PBXFileReference; 
lastKnownFileType = text.plist.strings; name = hrx; path = 
hrx.lproj/Localizable.strings; sourceTree = ""; };
+   D467906E195AD3BE00C4E44D /* hrx */ = {isa = PBXFileReference; 
lastKnownFileType = text.plist.strings; name = hrx; path = 
hrx.lproj/Main_iPhone.strings; sourceTree = ""; };
+   D467906F195AD3CE00C4E44D /* id */ = {isa = PBXFileReference; 
lastKnownFileType = text.plist.strings; name = id; path = 
id.lproj/Localizable.strings; sourceTree = ""; };
+   D4679070195AD3DC00C4E44D /* it */ = {isa = PBXFileReference; 
lastKnownFileType = text.plist.strings; name = it; path = 
it.lproj/Localizable.strings; sourceTree = ""; };
+   D4679071195AD3E600C4E44D /* ja */ = {isa = PBXFileReference; 
lastKnownFileType = text.plist.strings; name = ja; path = 
ja.lproj/Localizable.strings; sourceTree = ""; };
+   D4679072195AD3F000C4E44D /* kn */ = {isa = PBXFileReference; 
lastKnownFileType = text.plist.strings; name = kn; path = 
kn.lproj/InfoPlist.strings; sourceTree = ""; };
+   D4679073195AD3F000C4E44D /* kn */ = {isa = PBXFileReference; 
lastKnownFileT

[MediaWiki-commits] [Gerrit] Add updated localization files to project - change (apps...wikipedia)

2014-06-25 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Add updated localization files to project
..


Add updated localization files to project

Change-Id: I6bb8c8ae62098197437bec492e7b2cc84428f262
---
M Wikipedia.xcodeproj/project.pbxproj
1 file changed, 102 insertions(+), 0 deletions(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/Wikipedia.xcodeproj/project.pbxproj 
b/Wikipedia.xcodeproj/project.pbxproj
index 24c6f2a..6165714 100644
--- a/Wikipedia.xcodeproj/project.pbxproj
+++ b/Wikipedia.xcodeproj/project.pbxproj
@@ -590,6 +590,51 @@
D44F637918DA793A00EAD1DD /* zh-hans */ = {isa = 
PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-hans"; 
path = "zh-hans.lproj/Main_iPhone.strings"; sourceTree = ""; };
D44F637A18DA794000EAD1DD /* zh-hant */ = {isa = 
PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-hant"; 
path = "zh-hant.lproj/InfoPlist.strings"; sourceTree = ""; };
D44F637B18DA794000EAD1DD /* zh-hant */ = {isa = 
PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-hant"; 
path = "zh-hant.lproj/Main_iPhone.strings"; sourceTree = ""; };
+   D4679060195AD36D00C4E44D /* bn */ = {isa = PBXFileReference; 
lastKnownFileType = text.plist.strings; name = bn; path = 
bn.lproj/Localizable.strings; sourceTree = ""; };
+   D4679061195AD37A00C4E44D /* ca */ = {isa = PBXFileReference; 
lastKnownFileType = text.plist.strings; name = ca; path = 
ca.lproj/Localizable.strings; sourceTree = ""; };
+   D4679062195AD38700C4E44D /* da */ = {isa = PBXFileReference; 
lastKnownFileType = text.plist.strings; name = da; path = 
da.lproj/InfoPlist.strings; sourceTree = ""; };
+   D4679063195AD38700C4E44D /* da */ = {isa = PBXFileReference; 
lastKnownFileType = text.plist.strings; name = da; path = 
da.lproj/Main_iPhone.strings; sourceTree = ""; };
+   D4679064195AD39C00C4E44D /* diq */ = {isa = PBXFileReference; 
lastKnownFileType = text.plist.strings; name = diq; path = 
diq.lproj/InfoPlist.strings; sourceTree = ""; };
+   D4679065195AD39C00C4E44D /* diq */ = {isa = PBXFileReference; 
lastKnownFileType = text.plist.strings; name = diq; path = 
diq.lproj/Localizable.strings; sourceTree = ""; };
+   D4679066195AD39C00C4E44D /* diq */ = {isa = PBXFileReference; 
lastKnownFileType = text.plist.strings; name = diq; path = 
diq.lproj/Main_iPhone.strings; sourceTree = ""; };
+   D4679067195AD3A900C4E44D /* fo */ = {isa = PBXFileReference; 
lastKnownFileType = text.plist.strings; name = fo; path = 
fo.lproj/InfoPlist.strings; sourceTree = ""; };
+   D4679068195AD3A900C4E44D /* fo */ = {isa = PBXFileReference; 
lastKnownFileType = text.plist.strings; name = fo; path = 
fo.lproj/Localizable.strings; sourceTree = ""; };
+   D4679069195AD3A900C4E44D /* fo */ = {isa = PBXFileReference; 
lastKnownFileType = text.plist.strings; name = fo; path = 
fo.lproj/Main_iPhone.strings; sourceTree = ""; };
+   D467906A195AD3B300C4E44D /* frp */ = {isa = PBXFileReference; 
lastKnownFileType = text.plist.strings; name = frp; path = 
frp.lproj/InfoPlist.strings; sourceTree = ""; };
+   D467906B195AD3B300C4E44D /* frp */ = {isa = PBXFileReference; 
lastKnownFileType = text.plist.strings; name = frp; path = 
frp.lproj/Main_iPhone.strings; sourceTree = ""; };
+   D467906C195AD3BE00C4E44D /* hrx */ = {isa = PBXFileReference; 
lastKnownFileType = text.plist.strings; name = hrx; path = 
hrx.lproj/InfoPlist.strings; sourceTree = ""; };
+   D467906D195AD3BE00C4E44D /* hrx */ = {isa = PBXFileReference; 
lastKnownFileType = text.plist.strings; name = hrx; path = 
hrx.lproj/Localizable.strings; sourceTree = ""; };
+   D467906E195AD3BE00C4E44D /* hrx */ = {isa = PBXFileReference; 
lastKnownFileType = text.plist.strings; name = hrx; path = 
hrx.lproj/Main_iPhone.strings; sourceTree = ""; };
+   D467906F195AD3CE00C4E44D /* id */ = {isa = PBXFileReference; 
lastKnownFileType = text.plist.strings; name = id; path = 
id.lproj/Localizable.strings; sourceTree = ""; };
+   D4679070195AD3DC00C4E44D /* it */ = {isa = PBXFileReference; 
lastKnownFileType = text.plist.strings; name = it; path = 
it.lproj/Localizable.strings; sourceTree = ""; };
+   D4679071195AD3E600C4E44D /* ja */ = {isa = PBXFileReference; 
lastKnownFileType = text.plist.strings; name = ja; path = 
ja.lproj/Localizable.strings; sourceTree = ""; };
+   D4679072195AD3F000C4E44D /* kn */ = {isa = PBXFileReference; 
lastKnownFileType = text.plist.strings; name = kn; path = 
kn.lproj/InfoPlist.strings; sourceTree = ""; };
+   D4679073195AD3F000C4E44D /* kn */ = {isa = PBXFileReference; 
lastKnownFileType = text.plist.strings; name = kn; path = 
kn.lproj/Loc

[MediaWiki-commits] [Gerrit] Work in progress: EventLogging opt-out switch - change (apps...wikipedia)

2014-06-25 Thread Brion VIBBER (Code Review)
Brion VIBBER has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/141926

Change subject: Work in progress: EventLogging opt-out switch
..

Work in progress: EventLogging opt-out switch

todo:
* show the subtitle text
* i18n

Change-Id: Iffd3ce1be2abd25005fbc1cca08fa3a9af887558
---
M wikipedia/AppDelegate.m
M wikipedia/Data/Operations/DownloadSectionsOp.m
M wikipedia/EventLogging/EventLoggingFunnel.m
M wikipedia/Session/SessionSingleton.h
M wikipedia/Session/SessionSingleton.m
M wikipedia/View Controllers/Navigation/Secondary/SecondaryMenuViewController.m
6 files changed, 43 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia 
refs/changes/26/141926/1

diff --git a/wikipedia/AppDelegate.m b/wikipedia/AppDelegate.m
index d36a165..df18e94 100644
--- a/wikipedia/AppDelegate.m
+++ b/wikipedia/AppDelegate.m
@@ -58,7 +58,8 @@
 @"ZeroOnDialogShownOnce" : @NO,
 @"ZeroOffDialogShownOnce" : @NO,
 @"FakeZeroOn" : @NO,
-@"LastHousekeepingDate" : [NSDate date] //[NSDate 
dateWithDaysBeforeNow:10]
+@"LastHousekeepingDate" : [NSDate date], //[NSDate 
dateWithDaysBeforeNow:10]
+@"SendUsageReports": @YES
 };
 [[NSUserDefaults standardUserDefaults] 
registerDefaults:userDefaultsDefaults];
 }
diff --git a/wikipedia/Data/Operations/DownloadSectionsOp.m 
b/wikipedia/Data/Operations/DownloadSectionsOp.m
index 2d35e3d..e79a130 100644
--- a/wikipedia/Data/Operations/DownloadSectionsOp.m
+++ b/wikipedia/Data/Operations/DownloadSectionsOp.m
@@ -43,8 +43,10 @@
 
 params[@"sections"] = @"0";
 
-ReadingActionFunnel *funnel = [[ReadingActionFunnel alloc] init];
-params[@"appInstallID"] = funnel.appInstallID;
+if ([SessionSingleton sharedInstance].sendUsageReports) {
+ReadingActionFunnel *funnel = [[ReadingActionFunnel alloc] 
init];
+params[@"appInstallID"] = funnel.appInstallID;
+}
 }
 
 self.request = [NSURLRequest getRequestWithURL: [[SessionSingleton 
sharedInstance] urlForDomain:domain]
diff --git a/wikipedia/EventLogging/EventLoggingFunnel.m 
b/wikipedia/EventLogging/EventLoggingFunnel.m
index 5d63b2b..2ebaa11 100644
--- a/wikipedia/EventLogging/EventLoggingFunnel.m
+++ b/wikipedia/EventLogging/EventLoggingFunnel.m
@@ -9,7 +9,7 @@
 #import "EventLoggingFunnel.h"
 #import "LogEventOp.h"
 #import "QueuesSingleton.h"
-
+#import "SessionSingleton.h"
 
 @implementation EventLoggingFunnel
 
@@ -29,11 +29,13 @@
 
 -(void)log:(NSDictionary *)eventData
 {
-LogEventOp *logOp = [[LogEventOp alloc] initWithSchema: self.schema
-  revision: self.revision
- event: [self 
preprocessData:eventData]];
-
-[[QueuesSingleton sharedInstance].eventLoggingQ addOperation:logOp];
+if ([SessionSingleton sharedInstance].sendUsageReports) {
+LogEventOp *logOp = [[LogEventOp alloc] initWithSchema: self.schema
+  revision: self.revision
+ event: [self 
preprocessData:eventData]];
+
+[[QueuesSingleton sharedInstance].eventLoggingQ addOperation:logOp];
+}
 }
 
 -(NSString *)singleUseUUID
diff --git a/wikipedia/Session/SessionSingleton.h 
b/wikipedia/Session/SessionSingleton.h
index eec1fe1..0459157 100644
--- a/wikipedia/Session/SessionSingleton.h
+++ b/wikipedia/Session/SessionSingleton.h
@@ -9,8 +9,10 @@
 
 @interface SessionSingleton : NSObject
 
+// Persistent settings and credentials
 @property (strong, nonatomic) KeychainCredentials *keychainCredentials;
 @property (strong, nonatomic) ZeroConfigState *zeroConfigState;
+@property (nonatomic) BOOL sendUsageReports;
 
 // These 6 persist across app restarts.
 @property (strong, nonatomic) NSString *site;
diff --git a/wikipedia/Session/SessionSingleton.m 
b/wikipedia/Session/SessionSingleton.m
index d5a157e..49e41c4 100644
--- a/wikipedia/Session/SessionSingleton.m
+++ b/wikipedia/Session/SessionSingleton.m
@@ -158,4 +158,16 @@
 return ([self.currentArticleTitle isEqualToString: mainArticleTitle]);
 }
 
+-(BOOL)sendUsageReports
+{
+NSNumber *val = [[NSUserDefaults standardUserDefaults] 
objectForKey:@"SendUsageReports"];
+return [val boolValue];
+}
+
+-(void)setSendUsageReports:(BOOL)sendUsageReports
+{
+[[NSUserDefaults standardUserDefaults] setObject:@(sendUsageReports) 
forKey:@"SendUsageReports"];
+}
+
+
 @end
diff --git a/wikipedia/View 
Controllers/Navigation/Secondary/SecondaryMenuViewController.m b/wikipedia/View 
Controllers/Navigation/Secondary/SecondaryMenuViewController.m
index 2f0bd1d..d944210 100644
--- a/wikipedia/View 
Controllers/Navigation/Secondary/SecondaryMenuViewController.m
+++ b/wikipedia/View 
Controllers/Navigation/S

[MediaWiki-commits] [Gerrit] Update W0 flourishes based on UX feedback for MVP. - change (apps...wikipedia)

2014-06-27 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Update W0 flourishes based on UX feedback for MVP.
..


Update W0 flourishes based on UX feedback for MVP.

* Verbiage updates.
* Always show alert for On-to-Off transition, and only have a Dismiss button.
* We may make the fixed element show only intermittently and be tappable, but 
requires exploration.

Change-Id: I28577334bcba36a4ac6fb5422a24e79afe2ac153
---
M Wikipedia.xcodeproj/project.pbxproj
M wikipedia/AppDelegate.m
D wikipedia/Settings.bundle/Root.plist
D wikipedia/Settings.bundle/en.lproj/Root.strings
M wikipedia/View Controllers/Navigation/Center/CenterNavController.h
M wikipedia/View Controllers/Navigation/Center/CenterNavController.m
M wikipedia/View Controllers/WebView/WebViewController.m
M wikipedia/Zero/ZeroConfigState.h
M wikipedia/Zero/ZeroConfigState.m
M wikipedia/en.lproj/Localizable.strings
M wikipedia/qqq.lproj/Localizable.strings
11 files changed, 36 insertions(+), 84 deletions(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved

Objections:
  Siebrand: There's a problem with this change, please improve



diff --git a/Wikipedia.xcodeproj/project.pbxproj 
b/Wikipedia.xcodeproj/project.pbxproj
index d377d30..fb3d9b2 100644
--- a/Wikipedia.xcodeproj/project.pbxproj
+++ b/Wikipedia.xcodeproj/project.pbxproj
@@ -157,7 +157,6 @@
C9180EC418AED30C006C1DCA /* WikipediaAppUtils.m in Sources */ = 
{isa = PBXBuildFile; fileRef = C9180EC318AED30C006C1DCA /* WikipediaAppUtils.m 
*/; };
C958EE3418CE73E600148D13 /* DownloadTitlesForRandomArticlesOp.m 
in Sources */ = {isa = PBXBuildFile; fileRef = C958EE3318CE73E600148D13 /* 
DownloadTitlesForRandomArticlesOp.m */; };
C9928B8618AD5C6A00FCCA9A /* DownloadWikipediaZeroMessageOp.m in 
Sources */ = {isa = PBXBuildFile; fileRef = C9928B8518AD5C6A00FCCA9A /* 
DownloadWikipediaZeroMessageOp.m */; };
-   C9928B8818AD5E1000FCCA9A /* Settings.bundle in Resources */ = 
{isa = PBXBuildFile; fileRef = C9928B8718AD5E1000FCCA9A /* Settings.bundle */; 
};
D42E75EB18D11237002EA7E5 /* MWLanguageInfo.m in Sources */ = 
{isa = PBXBuildFile; fileRef = D42E75EA18D11237002EA7E5 /* MWLanguageInfo.m */; 
};
D469889518B52DA200DBE014 /* Main_iPhone.strings in Resources */ 
= {isa = PBXBuildFile; fileRef = D469889318B52DA200DBE014 /* 
Main_iPhone.strings */; };
D46CD8C418A1AC4F0042959E /* InfoPlist.strings in Resources */ = 
{isa = PBXBuildFile; fileRef = D46CD8C018A1AC4F0042959E /* InfoPlist.strings 
*/; };
@@ -472,7 +471,6 @@
C958EE3318CE73E600148D13 /* DownloadTitlesForRandomArticlesOp.m 
*/ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = 
sourcecode.c.objc; path = DownloadTitlesForRandomArticlesOp.m; sourceTree = 
""; };
C9928B8418AD5C6A00FCCA9A /* DownloadWikipediaZeroMessageOp.h */ 
= {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = 
sourcecode.c.h; path = DownloadWikipediaZeroMessageOp.h; sourceTree = 
""; };
C9928B8518AD5C6A00FCCA9A /* DownloadWikipediaZeroMessageOp.m */ 
= {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = 
sourcecode.c.objc; path = DownloadWikipediaZeroMessageOp.m; sourceTree = 
""; };
-   C9928B8718AD5E1000FCCA9A /* Settings.bundle */ = {isa = 
PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = 
Settings.bundle; sourceTree = ""; };
D42E75E918D11237002EA7E5 /* MWLanguageInfo.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = 
MWLanguageInfo.h; path = "mw-support/MWLanguageInfo.h"; sourceTree = ""; 
};
D42E75EA18D11237002EA7E5 /* MWLanguageInfo.m */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name 
= MWLanguageInfo.m; path = "mw-support/MWLanguageInfo.m"; sourceTree = 
""; };
D44F630618DA77FF00EAD1DD /* ar */ = {isa = PBXFileReference; 
lastKnownFileType = text.plist.strings; name = ar; path = 
ar.lproj/InfoPlist.strings; sourceTree = ""; };
@@ -1478,7 +1476,6 @@
D4EE00BB182445670090790F /* mw-support */,
C9180EC118AED30C006C1DCA /* mw-utils */,
049566BF18F5F4CB0058EA12 /* Zero */,
-   C9928B8718AD5E1000FCCA9A /* Settings.bundle */,
);
name = Wikipedia;
path = wikipedia;
@@ -1705,7 +1702,6 @@
04F27B7618FE0F2E00EDD838 /* 
PageHistoryResultPrototypeView.xib in Resources */,
04C91CF319554B310035ED1B /* 
logo-onboard...@2x.png in Resources */,
04292FF4185FBA70002A13FC /* 
SearchResultPrototypeView.xib in Resources */,
-   C9928B8818AD

[MediaWiki-commits] [Gerrit] Protect css from being overwritten by zero byte response. - change (apps...wikipedia)

2014-06-27 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Protect css from being overwritten by zero byte response.
..


Protect css from being overwritten by zero byte response.

Change-Id: I666d24ed1c53cb3ea63bc853c75cb4fa27295f9a
---
M wikipedia/Data/Operations/SyncAssetsFileOp.m
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/wikipedia/Data/Operations/SyncAssetsFileOp.m 
b/wikipedia/Data/Operations/SyncAssetsFileOp.m
index 0ac6a16..84c826d 100644
--- a/wikipedia/Data/Operations/SyncAssetsFileOp.m
+++ b/wikipedia/Data/Operations/SyncAssetsFileOp.m
@@ -47,7 +47,7 @@
 if (weakSelf.dataRetrieved) {
 NSString *jsonString = [[NSString alloc] 
initWithData:weakSelf.dataRetrieved encoding:NSUTF8StringEncoding];
 //NSLog(@"jsonString = %@", jsonString);
-if (!jsonString) return;
+if (!jsonString || (jsonString.length == 0)) return;
 NSString *filePath = assetsFile.path;
 NSError *error = nil;
 [jsonString writeToFile:filePath atomically:YES 
encoding:NSUTF8StringEncoding error:&error];

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I666d24ed1c53cb3ea63bc853c75cb4fa27295f9a
Gerrit-PatchSet: 1
Gerrit-Project: apps/ios/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Mhurd 
Gerrit-Reviewer: Brion VIBBER 

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


[MediaWiki-commits] [Gerrit] Update EventLogging edit funnel - change (apps...wikipedia)

2014-06-27 Thread Brion VIBBER (Code Review)
Brion VIBBER has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/142724

Change subject: Update EventLogging edit funnel
..

Update EventLogging edit funnel

Change-Id: Ib629cd9f45f70d50ab3a8bc9fe13d6e2e21b731a
---
M wikipedia/EventLogging/EditFunnel.h
M wikipedia/EventLogging/EditFunnel.m
M wikipedia/View Controllers/Login/LoginViewController.m
M wikipedia/View Controllers/Preview/PreviewAndSaveViewController.m
4 files changed, 43 insertions(+), 45 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia 
refs/changes/24/142724/1

diff --git a/wikipedia/EventLogging/EditFunnel.h 
b/wikipedia/EventLogging/EditFunnel.h
index 9b60592..92ccdb3 100644
--- a/wikipedia/EventLogging/EditFunnel.h
+++ b/wikipedia/EventLogging/EditFunnel.h
@@ -15,17 +15,19 @@
 -(id)init;
 -(void)logStart;
 -(void)logPreview;
+/**
+ * Parameter should be one of the string keys defined at
+ * 
https://meta.wikimedia.org/wiki/Schema_talk:MobileWikiAppEdit#Schema_missing_enum_for_editSummaryTapped
+ */
+-(void)logEditSummaryTap:(NSString *)editSummaryTapped;
 -(void)logSavedRevision:(int)revID;
--(void)logLoginAttempt;
--(void)logLoginSuccess;
--(void)logLoginFailure;
 -(void)logCaptchaShown;
 -(void)logCaptchaFailure;
 -(void)logAbuseFilterWarning:(NSString *)code;
 -(void)logAbuseFilterError:(NSString *)code;
 -(void)logAbuseFilterWarningIgnore:(NSString *)code;
 -(void)logAbuseFilterWarningBack:(NSString *)code;
--(void)logSaveAnonExplicit;
+-(void)logSaveAttempt; // @FIXME USE
 -(void)logError:(NSString *)code;
 
 @end
diff --git a/wikipedia/EventLogging/EditFunnel.m 
b/wikipedia/EventLogging/EditFunnel.m
index 359ac4e..3685716 100644
--- a/wikipedia/EventLogging/EditFunnel.m
+++ b/wikipedia/EventLogging/EditFunnel.m
@@ -15,7 +15,7 @@
 -(id)init
 {
 // https://meta.wikimedia.org/wiki/Schema:MobileWikiAppEdit
-self = [super initWithSchema:@"MobileWikiAppEdit" version:8198182];
+self = [super initWithSchema:@"MobileWikiAppEdit" version:9003125];
 if (self) {
 self.editSessionToken = [self singleUseUUID];
 }
@@ -26,9 +26,14 @@
 {
 NSMutableDictionary *dict = [eventData mutableCopy];
 dict[@"editSessionToken"] = self.editSessionToken;
-NSString *userName = [SessionSingleton 
sharedInstance].keychainCredentials.userName;
-dict[@"userName"] = userName ? userName : @"";
-//dict[@"pageNS"] = @0; // @todo allow other types or ...? // Android 
doesn't send this?
+NSString *userName = [SessionSingleton 
sharedInstance].keychainCredentials.userName; // @FIXME send user ID
+if (!userName || [userName isEqualToString:@""]) {
+dict[@"userID"] = @0; // not logged in
+} else {
+// @FIXME fetch the actual user ID
+dict[@"userID"] = @(-1);
+}
+//dict[@"pageNS"] = @0; // @todo actually get the namespace...
 return [NSDictionary dictionaryWithDictionary: dict];
 }
 
@@ -44,26 +49,17 @@
 [self log:@{@"action": @"preview"}];
 }
 
+-(void)logEditSummaryTap:(NSString *)editSummaryTapped
+{
+[self log:@{@"action": @"editSummaryTap",
+@"editSummaryTapped": editSummaryTapped}];
+}
+
 -(void)logSavedRevision:(int)revID
 {
 NSNumber *revIDNumber = [NSNumber numberWithInt:revID];
 [self log:@{@"action": @"saved",
 @"revID": (revIDNumber ? revIDNumber : @"")}];
-}
-
--(void)logLoginAttempt
-{
-[self log:@{@"action": @"loginAttempt"}];
-}
-
--(void)logLoginSuccess
-{
-[self log:@{@"action": @"loginSuccess"}];
-}
-
--(void)logLoginFailure
-{
-[self log:@{@"action": @"loginFailure"}];
 }
 
 -(void)logCaptchaShown
@@ -100,9 +96,9 @@
 @"abuseFilterCode": (code ? code : @"")}];
 }
 
-- (void)logSaveAnonExplicit
+-(void)logSaveAttempt // @FIXME WHAT CALLS THIS
 {
-[self log:@{@"action": @"saveAnonExplicit"}];
+[self log:@{@"action": @"saveAttempt"}];
 }
 
 - (void)logError:(NSString *)code
diff --git a/wikipedia/View Controllers/Login/LoginViewController.m 
b/wikipedia/View Controllers/Login/LoginViewController.m
index 1226d40..f9532a9 100644
--- a/wikipedia/View Controllers/Login/LoginViewController.m
+++ b/wikipedia/View Controllers/Login/LoginViewController.m
@@ -179,10 +179,6 @@
 
 -(void)save
 {
-if (NAV.isEditorOnNavstack) {
-[NAV.editor.funnel logLoginAttempt];
-}
-
 id onboardingVC = [self 
searchModalsForViewControllerOfClass:[OnboardingViewController class]];
 
 [self loginWithUserName: self.usernameField.text
@@ -261,10 +257,6 @@
 
   [self.funnel logSuccess];
   
-  if (NAV.isEditorOnNavstack) {
-  [NAV.editor.funnel logLoginSuccess];
-  }
-  
   } cancelledBlock: ^(NSError *error){
   
   [self showAlert:error.localizedDescription];
@@ -28

[MediaWiki-commits] [Gerrit] Remove 'webkit-backface-removal' rule which made iPads super... - change (mediawiki/core)

2014-06-29 Thread Brion VIBBER (Code Review)
Brion VIBBER has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/142975

Change subject: Remove 'webkit-backface-removal' rule which made iPads super 
blurry
..

Remove 'webkit-backface-removal' rule which made iPads super blurry

An extra CSS rule was snuck into the .transition mixin in I895679ff
which caused the entire content area in Vector skin to render blurry
on iPads, especially visible on non-Retina devices.

There was no mention of it in the commit message, but a comment in
the mixin source said something about a '1px Chrome movement bug'.

With no source for said Chrome bug and a definite Safari bug, let's
try removing it for now.

Bug: 67286

Change-Id: If6e88d2b5fa7adaa3cd8198686422a65689fa68b
---
M resources/src/mediawiki.less/mediawiki.mixins.less
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/75/142975/1

diff --git a/resources/src/mediawiki.less/mediawiki.mixins.less 
b/resources/src/mediawiki.less/mediawiki.mixins.less
index 67e2f33..b65a62b 100644
--- a/resources/src/mediawiki.less/mediawiki.mixins.less
+++ b/resources/src/mediawiki.less/mediawiki.mixins.less
@@ -61,7 +61,6 @@
 }
 
 .transition(@value) {
-   -webkit-backface-visibility: hidden; // fixes Chrome 1px movement bug
-webkit-transition: @value;
-moz-transition: @value;
-o-transition: @value;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If6e88d2b5fa7adaa3cd8198686422a65689fa68b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Brion VIBBER 

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


[MediaWiki-commits] [Gerrit] Credits: "HPPLE" --> "Hpple" - change (apps...wikipedia)

2014-06-30 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Credits: "HPPLE" --> "Hpple"
..


Credits: "HPPLE" --> "Hpple"

According to the project's page on github:
, they don't
capitalize it in all caps.

Change-Id: If4a690af04a20805d087f51f982fd114f2f9a225
---
M wikipedia/Base.lproj/Main_iPhone.storyboard
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/wikipedia/Base.lproj/Main_iPhone.storyboard 
b/wikipedia/Base.lproj/Main_iPhone.storyboard
index 3d919f6..6140d84 100644
--- a/wikipedia/Base.lproj/Main_iPhone.storyboard
+++ b/wikipedia/Base.lproj/Main_iPhone.storyboard
@@ -604,7 +604,7 @@
 
 
 
-
+
 
 
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If4a690af04a20805d087f51f982fd114f2f9a225
Gerrit-PatchSet: 1
Gerrit-Project: apps/ios/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Mhurd 

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


[MediaWiki-commits] [Gerrit] Use "Content" instead of "Wiki text" - change (apps...wikipedia)

2014-06-30 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Use "Content" instead of "Wiki text"
..


Use "Content" instead of "Wiki text"

With the introduction of ContentHandler, it's no longer safe to
assume that pages are created with wikitext. In that same line,
the preferred terminology is "content".

P.S. wikitext is one word :-)

Change-Id: I26694c337666982e6d86af7204594afe3bc7f939
---
M wikipedia/en.lproj/Localizable.strings
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/wikipedia/en.lproj/Localizable.strings 
b/wikipedia/en.lproj/Localizable.strings
index 14c830c..6c5b9f3 100644
--- a/wikipedia/en.lproj/Localizable.strings
+++ b/wikipedia/en.lproj/Localizable.strings
@@ -48,9 +48,9 @@
 "login-username-placeholder-text" = "User name";
 "login-password-placeholder-text" = "Password";
 
-"wikitext-downloading" = "Loading wiki text...";
+"wikitext-downloading" = "Loading content...";
 "wikitext-download-failed" = "Unable to obtain latest revision.";
-"wikitext-download-success" = "Wiki text loaded.";
+"wikitext-download-success" = "Content loaded.";
 "wikitext-preview-changes" = "Retrieving preview of your changes...";
 "wikitext-preview-changes-none" = "No changes were made to be previewed.";
 "wikitext-upload-result-unknown" = "Unable to determine wikitext upload 
result.";

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I26694c337666982e6d86af7204594afe3bc7f939
Gerrit-PatchSet: 1
Gerrit-Project: apps/ios/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Mhurd 

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


[MediaWiki-commits] [Gerrit] Fixes for page history and language selector crashes. - change (apps...wikipedia)

2014-06-30 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Fixes for page history and language selector crashes.
..


Fixes for page history and language selector crashes.

Recent changes to "showAlert" to make it work with modally
presented views were causing crashes with non UIViewController
storyboard elements. This happened because showAlert is
adding its view to whatever view controller invokes it but
UITableViewControllers don't play nice with autolayout if
you try to add an autolayout constrained view to their view.
Super lame. Quick fix was to simply use UIViewControllers in
the storyboard (which then contain the UITableViews as
subviews).

Fixed bug with article language selection not using
MWPageTitle.

Updated page history date heading background colors to match
chrome color.

Change-Id: I9fad5d8ff75aeedd089bc8d9f0272ff4cfa9529d
---
M Wikipedia.xcodeproj/project.pbxproj
M wikipedia/Base.lproj/Main_iPhone.storyboard
R wikipedia/View Controllers/Languages/LanguagesViewController.h
R wikipedia/View Controllers/Languages/LanguagesViewController.m
M wikipedia/View Controllers/Navigation/Secondary/SecondaryMenuViewController.m
M wikipedia/View Controllers/PageHistory/PageHistoryViewController.h
M wikipedia/View Controllers/PageHistory/PageHistoryViewController.m
M wikipedia/View Controllers/WebView/WebViewController.m
8 files changed, 146 insertions(+), 99 deletions(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/Wikipedia.xcodeproj/project.pbxproj 
b/Wikipedia.xcodeproj/project.pbxproj
index fb3d9b2..e5a637d 100644
--- a/Wikipedia.xcodeproj/project.pbxproj
+++ b/Wikipedia.xcodeproj/project.pbxproj
@@ -25,7 +25,7 @@
04142A8F184F974E006EF779 /* NSDate-Utilities.m in Sources */ = 
{isa = PBXBuildFile; fileRef = 04142A8E184F974E006EF779 /* NSDate-Utilities.m 
*/; };
0415581C18ADFA5D00B81A59 /* UIImage+ColorMask.m in Sources */ = 
{isa = PBXBuildFile; fileRef = 0415581B18ADFA5C00B81A59 /* UIImage+ColorMask.m 
*/; };
041A3B5E18E11ED90079FF1C /* LanguagesCell.m in Sources */ = 
{isa = PBXBuildFile; fileRef = 041A3B5918E11ED90079FF1C /* LanguagesCell.m */; 
};
-   041A3B6218E11ED90079FF1C /* LanguagesTableVC.m in Sources */ = 
{isa = PBXBuildFile; fileRef = 041A3B5D18E11ED90079FF1C /* LanguagesTableVC.m 
*/; };
+   041A3B6218E11ED90079FF1C /* LanguagesViewController.m in 
Sources */ = {isa = PBXBuildFile; fileRef = 041A3B5D18E11ED90079FF1C /* 
LanguagesViewController.m */; };
041C55D21950B27D006CE0EF /* EditSummaryViewController.m in 
Sources */ = {isa = PBXBuildFile; fileRef = 041C55D11950B27D006CE0EF /* 
EditSummaryViewController.m */; };
04272E7B1940EEBC00CC682F /* AssetsFile.m in Sources */ = {isa = 
PBXBuildFile; fileRef = 04272E791940EEBC00CC682F /* AssetsFile.m */; };
04292FF2185FBA70002A13FC /* SearchResultCell.m in Sources */ = 
{isa = PBXBuildFile; fileRef = 04292FF0185FBA70002A13FC /* SearchResultCell.m 
*/; };
@@ -215,8 +215,8 @@
0415581B18ADFA5C00B81A59 /* UIImage+ColorMask.m */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path 
= "UIImage+ColorMask.m"; sourceTree = ""; };
041A3B5818E11ED90079FF1C /* LanguagesCell.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
LanguagesCell.h; sourceTree = ""; };
041A3B5918E11ED90079FF1C /* LanguagesCell.m */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path 
= LanguagesCell.m; sourceTree = ""; };
-   041A3B5C18E11ED90079FF1C /* LanguagesTableVC.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
LanguagesTableVC.h; sourceTree = ""; };
-   041A3B5D18E11ED90079FF1C /* LanguagesTableVC.m */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path 
= LanguagesTableVC.m; sourceTree = ""; };
+   041A3B5C18E11ED90079FF1C /* LanguagesViewController.h */ = {isa 
= PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path 
= LanguagesViewController.h; sourceTree = ""; };
+   041A3B5D18E11ED90079FF1C /* LanguagesViewController.m */ = {isa 
= PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; 
path = LanguagesViewController.m; sourceTree = ""; };
041C55D01950B27D006CE0EF /* EditSummaryViewController.h */ = 
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; 
path = EditSummaryViewController.h; sourceTree = ""; };
041C55D11950B27D006CE0EF /* EditSummaryViewController.m */ = 
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = 
sourcecode.c.objc; path = EditSummaryViewController.m; sourceTree = ""; 
};
04272E781940EEB

[MediaWiki-commits] [Gerrit] Don't append literal "Other" to edit summary when "Other" te... - change (apps...wikipedia)

2014-06-30 Thread Brion VIBBER (Code Review)
Brion VIBBER has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/143052

Change subject: Don't append literal "Other" to edit summary when "Other" text 
is filled out
..

Don't append literal "Other" to edit summary when "Other" text is filled out

Bug: 67222
Change-Id: I5af617330ff11b9e4f1b8c78c1d43188b06cc031
---
M wikipedia/View Controllers/Preview/PreviewAndSaveViewController.m
1 file changed, 5 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia 
refs/changes/52/143052/1

diff --git a/wikipedia/View Controllers/Preview/PreviewAndSaveViewController.m 
b/wikipedia/View Controllers/Preview/PreviewAndSaveViewController.m
index 42f4caa..fa46198 100644
--- a/wikipedia/View Controllers/Preview/PreviewAndSaveViewController.m
+++ b/wikipedia/View Controllers/Preview/PreviewAndSaveViewController.m
@@ -70,14 +70,15 @@
 {
 NSMutableArray *summaryArray = @[].mutableCopy;
 
-if (self.summaryText && (self.summaryText.length > 0)) {
-[summaryArray addObject:self.summaryText];
-}
 if (self.cannedSummary01.enabled) [summaryArray 
addObject:self.cannedSummary01.text];
 if (self.cannedSummary02.enabled) [summaryArray 
addObject:self.cannedSummary02.text];
 if (self.cannedSummary03.enabled) [summaryArray 
addObject:self.cannedSummary03.text];
 
-if (self.cannedSummary04.enabled) [summaryArray 
addObject:self.cannedSummary04.text];
+if (self.cannedSummary04.enabled) {
+if (self.summaryText && (self.summaryText.length > 0)) {
+[summaryArray addObject:self.summaryText];
+}
+}
 
 return [summaryArray componentsJoinedByString:@"; "];
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5af617330ff11b9e4f1b8c78c1d43188b06cc031
Gerrit-PatchSet: 1
Gerrit-Project: apps/ios/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Brion VIBBER 

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


[MediaWiki-commits] [Gerrit] Fix for logo being too close to screen top on 3.5 inch screens. - change (apps...wikipedia)

2014-06-30 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Fix for logo being too close to screen top on 3.5 inch screens.
..


Fix for logo being too close to screen top on 3.5 inch screens.

Change-Id: I4a7addfa12bb923227bdce4c70499c983b7bb66f
---
M wikipedia/Base.lproj/Main_iPhone.storyboard
M wikipedia/View Controllers/Onboarding/OnboardingViewController.m
2 files changed, 7 insertions(+), 2 deletions(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/wikipedia/Base.lproj/Main_iPhone.storyboard 
b/wikipedia/Base.lproj/Main_iPhone.storyboard
index ad70e03..cfd1212 100644
--- a/wikipedia/Base.lproj/Main_iPhone.storyboard
+++ b/wikipedia/Base.lproj/Main_iPhone.storyboard
@@ -1057,6 +1057,7 @@
 
 
 
+
 
 
 
diff --git a/wikipedia/View Controllers/Onboarding/OnboardingViewController.m 
b/wikipedia/View Controllers/Onboarding/OnboardingViewController.m
index c4386d5..abd26d3 100644
--- a/wikipedia/View Controllers/Onboarding/OnboardingViewController.m
+++ b/wikipedia/View Controllers/Onboarding/OnboardingViewController.m
@@ -22,6 +22,8 @@
 @property (weak, nonatomic) IBOutlet NSLayoutConstraint 
*spaceBelowLogoConstraint;
 @property (weak, nonatomic) IBOutlet NSLayoutConstraint 
*spaceAboveLogoConstraint;
 
+@property (weak, nonatomic) IBOutlet UIImageView *logoImage;
+
 @end
 
 @implementation OnboardingViewController
@@ -85,10 +87,12 @@
 CGFloat aboveMultiplier = 1.0;
 CGFloat belowMultiplier = 1.0;
 switch ((int)[UIScreen mainScreen].bounds.size.height) {
-case 480:
+case 480:{
 // Make everything fit on 3.5 inch screens.
-aboveMultiplier = 0.2;
+aboveMultiplier = 1.0;
 belowMultiplier = 0.0;
+self.logoImage.layer.transform = CATransform3DMakeScale(0.85, 
0.85, 1.0);
+}
 break;
 case 1024:
 // Make everything fit on iPad screens.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4a7addfa12bb923227bdce4c70499c983b7bb66f
Gerrit-PatchSet: 1
Gerrit-Project: apps/ios/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Mhurd 
Gerrit-Reviewer: Brion VIBBER 

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


[MediaWiki-commits] [Gerrit] Scrolling web view shows/hides chrome. - change (apps...wikipedia)

2014-07-01 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Scrolling web view shows/hides chrome.
..


Scrolling web view shows/hides chrome.

Whitespace tap only reveals chrome, never hides it.

Title bar tap to scroll to top reveals menu as well.

One pixel line at bottom of nav bar now appears if nav
is scrolled away.

Change-Id: I39b41b8e7bb34fbef540cbbbf0cd9cbb8703c2b8
---
M wikipedia/View Controllers/Root/RootViewController.h
M wikipedia/View Controllers/Root/RootViewController.m
M wikipedia/View Controllers/WebView/WebViewController.m
3 files changed, 56 insertions(+), 31 deletions(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/wikipedia/View Controllers/Root/RootViewController.h 
b/wikipedia/View Controllers/Root/RootViewController.h
index ef586a6..b661a75 100644
--- a/wikipedia/View Controllers/Root/RootViewController.h
+++ b/wikipedia/View Controllers/Root/RootViewController.h
@@ -12,7 +12,9 @@
 
 @property (nonatomic) BOOL topMenuHidden;
 
-- (void)animateTopAndBottomMenuToggle;
+@property (nonatomic) BOOL isAnimatingTopAndBottomMenuHidden;
+
+- (void)animateTopAndBottomMenuHidden:(BOOL)hidden;
 
 - (void)togglePrimaryMenu;
 
diff --git a/wikipedia/View Controllers/Root/RootViewController.m 
b/wikipedia/View Controllers/Root/RootViewController.m
index 73aac5a..3c536fd 100644
--- a/wikipedia/View Controllers/Root/RootViewController.m
+++ b/wikipedia/View Controllers/Root/RootViewController.m
@@ -50,9 +50,9 @@
 // Fade out the top menu when it is hidden.
 CGFloat alpha = topMenuHidden ? 0.0 : 1.0;
 
-self.topMenuViewController.navBarContainer.alpha = alpha;
-
+// Note: don't fade out the navBarContainer or the line at its bottom gets 
hidden!
 //self.topMenuViewController.navBarContainer.alpha = alpha;
+
 for (UIView *v in self.topMenuViewController.navBarContainer.subviews) {
 v.alpha = alpha;
 }
@@ -230,14 +230,19 @@
 self.centerContainerTopConstraint.constant = topMenuHeight;
 }
 
--(void)animateTopAndBottomMenuToggle
+-(void)animateTopAndBottomMenuHidden:(BOOL)hidden
 {
+// Don't toggle if hidden state isn't different or if it's already 
toggling.
+if ((self.topMenuHidden == hidden) || 
self.isAnimatingTopAndBottomMenuHidden) return;
+
+self.isAnimatingTopAndBottomMenuHidden = YES;
+
 // Queue it up so web view doesn't get blanked out.
 [[NSOperationQueue mainQueue] addOperationWithBlock:^{
 
-[UIView animateWithDuration:0.15f delay:0.0f 
options:UIViewAnimationOptionBeginFromCurrentState animations:^{
+[UIView animateWithDuration:0.12f delay:0.0f 
options:UIViewAnimationOptionBeginFromCurrentState animations:^{
 
-self.topMenuHidden = !self.topMenuHidden;
+self.topMenuHidden = hidden;
 
 WebViewController *webVC = [NAV 
searchNavStackForViewControllerOfClass:[WebViewController class]];
 webVC.bottomMenuHidden = self.topMenuHidden;
@@ -250,6 +255,7 @@
 [self.view.superview layoutIfNeeded];
 
 } completion:^(BOOL done){
+self.isAnimatingTopAndBottomMenuHidden = NO;
 }];
 
 }];
diff --git a/wikipedia/View Controllers/WebView/WebViewController.m 
b/wikipedia/View Controllers/WebView/WebViewController.m
index 27ecee1..224ce08 100644
--- a/wikipedia/View Controllers/WebView/WebViewController.m
+++ b/wikipedia/View Controllers/WebView/WebViewController.m
@@ -868,6 +868,10 @@
 
 // @todo merge this link title extraction into MWSite
 if ([href hasPrefix:@"/wiki/"]) {
+
+// Ensure the menu is visible when navigating to new page.
+[weakSelf animateTopAndBottomMenuReveal];
+
 NSString *title = [href substringWithRange:NSMakeRange(6, 
href.length - 6)];
 MWPageTitle *pageTitle = [MWPageTitle titleWithString:title];
 
@@ -925,11 +929,7 @@
 [self.bridge addListener:@"nonAnchorTouchEndedWithoutDragging" 
withBlock:^(NSString *messageType, NSDictionary *payload) {
 NSLog(@"nonAnchorTouchEndedWithoutDragging = %@", payload);
 
-if (!weakSelf.tocVC) {
-if (ROOT.topMenuViewController.navBarMode != NAVBAR_MODE_SEARCH) {
-[ROOT animateTopAndBottomMenuToggle];
-}
-}
+[weakSelf animateTopAndBottomMenuReveal];
 
 // nonAnchorTouchEndedWithoutDragging is used so TOC may be hidden if 
user tapped, but did *not* drag.
 // Used because UIWebView is difficult to attach one-finger touch 
events to.
@@ -1073,25 +1073,6 @@
 
 - (void)scrollViewDidScroll:(UIScrollView *)scrollView
 {
-/*
-// Hides nav bar when a scroll threshold is exceeded. Probably only want 
to do this
-// when the webView's scrollView scrolls. Probably also want to set the 
status bar to
-// be not transparent when the nav bar is hidden - if not po

[MediaWiki-commits] [Gerrit] Quick fix for space above onboarding globe on iOS 6. - change (apps...wikipedia)

2014-07-01 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Quick fix for space above onboarding globe on iOS 6.
..


Quick fix for space above onboarding globe on iOS 6.

Change-Id: If9bacc5ed3a5ec89f9a433646f4550a348d3e694
---
M wikipedia/View Controllers/Onboarding/OnboardingViewController.m
1 file changed, 3 insertions(+), 3 deletions(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/wikipedia/View Controllers/Onboarding/OnboardingViewController.m 
b/wikipedia/View Controllers/Onboarding/OnboardingViewController.m
index abd26d3..e26d69d 100644
--- a/wikipedia/View Controllers/Onboarding/OnboardingViewController.m
+++ b/wikipedia/View Controllers/Onboarding/OnboardingViewController.m
@@ -107,9 +107,9 @@
 self.spaceAboveLogoConstraint.constant = 
roundf(self.spaceAboveLogoConstraint.constant * aboveMultiplier);
 
 // Adjust for iOS 6 status bar height.
-//if (NSFoundationVersionNumber <= NSFoundationVersionNumber_iOS_6_1) {
-//self.spaceAboveLogoConstraint.constant -= 20;
-//}
+if (NSFoundationVersionNumber <= NSFoundationVersionNumber_iOS_6_1) {
+self.spaceAboveLogoConstraint.constant -= 20;
+}
 }
 
 -(void)styleLoginButtonText

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If9bacc5ed3a5ec89f9a433646f4550a348d3e694
Gerrit-PatchSet: 1
Gerrit-Project: apps/ios/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Mhurd 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Mhurd 

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


[MediaWiki-commits] [Gerrit] Ensure MCC/MNC enrichment for sampling only happens on mdot ... - change (apps...wikipedia)

2014-06-05 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Ensure MCC/MNC enrichment for sampling only happens on mdot API.
..


Ensure MCC/MNC enrichment for sampling only happens on mdot API.

* bits was being hit first.
* Without this change, MCC/MNC would be sent, but not observed server-side.

Change-Id: I4172eb892daffd0148fcbbc3923c4fe8b54669e1
---
M wikipedia/Categories/NSURLRequest+DictionaryRequest.m
1 file changed, 4 insertions(+), 1 deletion(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/wikipedia/Categories/NSURLRequest+DictionaryRequest.m 
b/wikipedia/Categories/NSURLRequest+DictionaryRequest.m
index cd285f4..44bf5e5 100644
--- a/wikipedia/Categories/NSURLRequest+DictionaryRequest.m
+++ b/wikipedia/Categories/NSURLRequest+DictionaryRequest.m
@@ -62,7 +62,10 @@
 
 +(void) addMCCMNCToRequestIfAppropriate: (NSMutableURLRequest*) req
 {
-if ([SessionSingleton sharedInstance].zeroConfigState.sentMCCMNC) {
+/* MCC-MNC logging is only turned with an API hook */
+if ([SessionSingleton sharedInstance].zeroConfigState.sentMCCMNC ||
+[req.URL.host rangeOfString:@".m.wikipedia.org"].location == 
NSNotFound ||
+[req.URL.relativePath rangeOfString:@"/w/api.php"].location == 
NSNotFound) {
 return;
 } else {
 CTCarrier *mno = [[[CTTelephonyNetworkInfo alloc] init] 
subscriberCellularProvider];

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4172eb892daffd0148fcbbc3923c4fe8b54669e1
Gerrit-PatchSet: 3
Gerrit-Project: apps/ios/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Dr0ptp4kt 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Dr0ptp4kt 
Gerrit-Reviewer: Mhurd 

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


[MediaWiki-commits] [Gerrit] Revert "Honor system font size setting in WebView" - change (apps...wikipedia)

2014-06-09 Thread Brion VIBBER (Code Review)
Brion VIBBER has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/138373

Change subject: Revert "Honor system font size setting in WebView"
..

Revert "Honor system font size setting in WebView"

Feature appears to be broken; huge fonts on xxhdpi devices. Needs to get the 
'dp' size of an 'sp' or something, rather than the raw pixel size?

This reverts commit ad4d74ce79dbfe29eb32b2205c71d5d256c2287c.

Change-Id: I0a3a143681884a3ec3639486ac58c26e81d15315
---
M wikipedia/res/values/dimens.xml
M wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java
2 files changed, 0 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia 
refs/changes/73/138373/1

diff --git a/wikipedia/res/values/dimens.xml b/wikipedia/res/values/dimens.xml
index 7bce777..a6dd140 100644
--- a/wikipedia/res/values/dimens.xml
+++ b/wikipedia/res/values/dimens.xml
@@ -4,7 +4,4 @@
 16dp
 16dp
 
-
-8sp
-
 
\ No newline at end of file
diff --git a/wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java 
b/wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java
index 2bed615..a3df5a3 100644
--- a/wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java
+++ b/wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java
@@ -1,7 +1,6 @@
 package org.wikipedia.page;
 
 import android.content.Intent;
-import android.content.res.Resources;
 import android.os.Build;
 import android.os.Bundle;
 import android.support.v4.app.Fragment;
@@ -271,10 +270,6 @@
 // disable TOC drawer until the page is loaded
 tocDrawer.setSlidingEnabled(false);
 searchArticlesFragment.setTocEnabled(false);
-
-// Adjust font size based on system settings
-float fontSize = getResources().getDimension(R.dimen.textSize);
-webView.getSettings().setDefaultFontSize((int) fontSize);
 
 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
 // Enable Pinch-Zoom

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0a3a143681884a3ec3639486ac58c26e81d15315
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Brion VIBBER 

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


[MediaWiki-commits] [Gerrit] Fix for edit pencil not working if user not logged in. - change (apps...wikipedia)

2014-06-11 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Fix for edit pencil not working if user not logged in.
..


Fix for edit pencil not working if user not logged in.

Change-Id: I8dae0e3212905e21134787ef6fad094cf0d8c764
---
M wikipedia/EventLogging/EditFunnel.m
1 file changed, 2 insertions(+), 1 deletion(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/wikipedia/EventLogging/EditFunnel.m 
b/wikipedia/EventLogging/EditFunnel.m
index c13125e..bdf428b 100644
--- a/wikipedia/EventLogging/EditFunnel.m
+++ b/wikipedia/EventLogging/EditFunnel.m
@@ -26,7 +26,8 @@
 {
 NSMutableDictionary *dict = [eventData mutableCopy];
 dict[@"editSessionToken"] = self.editSessionToken;
-dict[@"userName"] = [SessionSingleton 
sharedInstance].keychainCredentials.userName;
+NSString *userName = [SessionSingleton 
sharedInstance].keychainCredentials.userName;
+dict[@"userName"] = userName ? userName : @"";
 //dict[@"pageNS"] = @0; // @todo allow other types or ...? // Android 
doesn't send this?
 return [NSDictionary dictionaryWithDictionary: dict];
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8dae0e3212905e21134787ef6fad094cf0d8c764
Gerrit-PatchSet: 1
Gerrit-Project: apps/ios/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Mhurd 
Gerrit-Reviewer: Brion VIBBER 

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


[MediaWiki-commits] [Gerrit] Allow mobile to reduce image quality - change (mediawiki/core)

2014-05-09 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Allow mobile to reduce image quality
..


Allow mobile to reduce image quality

http://www.mediawiki.org/wiki/Requests_for_comment/Reducing_image_quality_for_mobile

Per above RFC, this patch implements the core changes required to
specify quality reduction of JPEG via URL. To test, make sure your
setup uses 404-based thumb generation. Vagrant supports it by adding
"multimedia" role:  $ vagrant add-role multimedia && vagrant provision
* Pick any thumbnail jpeg URL that exists on the test wiki, e.g.
  http://.../images/thumb/4/49/Img.jpg/400px-Img.jpg
* check that basic scaling works by altering 400
* add quality parameter qlow- right before px:
  http://.../images/thumb/4/49/Img.jpg/qlow-400px-Img.jpg

Change-Id: I930ea06be6d302ffc8832d12b251422a9f1b3e75
---
M includes/Linker.php
M includes/media/Bitmap.php
M includes/media/Jpeg.php
3 files changed, 101 insertions(+), 18 deletions(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/includes/Linker.php b/includes/Linker.php
index cfa0158..9ec7944 100644
--- a/includes/Linker.php
+++ b/includes/Linker.php
@@ -530,7 +530,7 @@
 *
 * @param array $handlerParams Associative array of media handler 
parameters, to be passed
 *   to transform(). Typical keys are "width" and "page".
-* @param string $time Timestamp of the file, set as false for current
+* @param string|bool $time Timestamp of the file, set as false for 
current
 * @param string $query Query params for desc url
 * @param int|null $widthOption Used by the parser to remember the user 
preference thumbnailsize
 * @since 1.20
diff --git a/includes/media/Bitmap.php b/includes/media/Bitmap.php
index 607c4e5..44be178 100644
--- a/includes/media/Bitmap.php
+++ b/includes/media/Bitmap.php
@@ -138,6 +138,10 @@
'dstUrl' => $dstUrl,
);
 
+   if ( isset( $params['quality'] ) && $params['quality'] === 
'low' ) {
+   $scalerParams['quality'] = 30;
+   }
+
# Determine scaler type
$scaler = self::getScalerType( $dstPath );
 
@@ -147,6 +151,7 @@
if ( !$image->mustRender() &&
$scalerParams['physicalWidth'] == 
$scalerParams['srcWidth']
&& $scalerParams['physicalHeight'] == 
$scalerParams['srcHeight']
+   && !isset( $scalerParams['quality'] )
) {
 
# normaliseParams (or the user) wants us to return the 
unscaled image
@@ -163,12 +168,14 @@
 
if ( $flags & self::TRANSFORM_LATER ) {
wfDebug( __METHOD__ . ": Transforming later per 
flags.\n" );
-   $params = array(
+   $newParams = array(
'width' => $scalerParams['clientWidth'],
'height' => $scalerParams['clientHeight']
);
-
-   return new ThumbnailImage( $image, $dstUrl, false, 
$params );
+   if ( isset( $params['quality'] ) ) {
+   $newParams['quality'] = $params['quality'];
+   }
+   return new ThumbnailImage( $image, $dstUrl, false, 
$newParams );
}
 
# Try to make a target path for the thumbnail
@@ -235,12 +242,14 @@
} elseif ( $mto ) {
return $mto;
} else {
-   $params = array(
+   $newParams = array(
'width' => $scalerParams['clientWidth'],
'height' => $scalerParams['clientHeight']
);
-
-   return new ThumbnailImage( $image, $dstUrl, $dstPath, 
$params );
+   if ( isset( $params['quality'] ) ) {
+   $newParams['quality'] = $params['quality'];
+   }
+   return new ThumbnailImage( $image, $dstUrl, $dstPath, 
$newParams );
}
}
 
@@ -314,7 +323,8 @@
$animation_post = array();
$decoderHint = array();
if ( $params['mimeType'] == 'image/jpeg' ) {
-   $quality = array( '-quality', '80' ); // 80%
+   $qualityVal = isset( $params['quality'] ) ? (string) 
$params['quality'] : null;
+   $quality = array( '-quality', $qualityVal ?: '80' ); // 
80%
# Sharpening, see bug 6193
if ( ( $params['physicalWidth'] + 
$params['physicalHeight'] )
/ ( $params['srcWidth'] + $params['srcHeight'] )
@@ -419,7 +429,8 @@

[MediaWiki-commits] [Gerrit] SpecialUserlogin: Error out when attempting to create a user... - change (mediawiki/core)

2014-05-09 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: SpecialUserlogin: Error out when attempting to create a 
username with a '#'
..


SpecialUserlogin: Error out when attempting to create a username with a '#'

"Best practices"? Ain't never heard of it.

Bug: 64960
Change-Id: I88c479cea2bc9d2eab882e0ee8ebcbe2d1dd125e
---
M includes/specials/SpecialUserlogin.php
1 file changed, 5 insertions(+), 1 deletion(-)

Approvals:
  Brion VIBBER: Looks good to me, approved



diff --git a/includes/specials/SpecialUserlogin.php 
b/includes/specials/SpecialUserlogin.php
index 4006e49..5ce2812 100644
--- a/includes/specials/SpecialUserlogin.php
+++ b/includes/specials/SpecialUserlogin.php
@@ -435,7 +435,11 @@
 
// Normalize the name so that silly things don't cause "invalid 
username"
// errors. User::newFromName does some rather strict checking, 
rejecting
-   // e.g. leading/trailing/multiple spaces.
+   // e.g. leading/trailing/multiple spaces. But first we need to 
reject
+   // usernames that would be treated as titles with a fragment 
part.
+   if ( strpos( $this->mUsername, '#' ) !== false ) {
+   return Status::newFatal( 'noname' );
+   }
$title = Title::makeTitleSafe( NS_USER, $this->mUsername );
if ( !is_object( $title ) ) {
return Status::newFatal( 'noname' );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I88c479cea2bc9d2eab882e0ee8ebcbe2d1dd125e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Anonymous editing killswitch. - change (apps...wikipedia)

2014-05-09 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Anonymous editing killswitch.
..


Anonymous editing killswitch.

Syncs with config/ios.json at most once a day. Adjusts saving
interface to hide anon saving option if ios.json has flag for
disabling anon editing.

The periodic sync code is done in generic fashion to make
future sync between server and bundled app json files
painless.

Note: will need to amend copyBundledFolderToAppDataDocuments
to copy files and folders which don't exist in documents
directory after initial install. Right now it won't copy
if it sees the Json folder has already been copied from the
bundle to the writable documents dir.

Will also need to rename all of the "bundled" things from
this commit as they're not really bundled now that they've
been moved to the documents directory.

Change-Id: Ia64c060806c14cbf08cacb3168af8f471c8de048
---
M Wikipedia.xcodeproj/project.pbxproj
M wikipedia/AppDelegate.m
A wikipedia/BundledJson/BundledJson.h
A wikipedia/BundledJson/BundledJson.m
A wikipedia/BundledJson/BundledJsonEnum.h
A wikipedia/BundledPaths/BundledPaths.h
A wikipedia/BundledPaths/BundledPaths.m
A wikipedia/BundledPaths/BundledPathsEnum.h
A wikipedia/Data/Operations/ConfigFileSyncOp.h
A wikipedia/Data/Operations/ConfigFileSyncOp.m
M wikipedia/Data/Operations/DownloadLangLinksOp.h
M wikipedia/Data/Operations/DownloadLangLinksOp.m
R wikipedia/Json/Languages/languages.json
R wikipedia/Json/Languages/mainpages.json
A wikipedia/Json/config/ios.json
M wikipedia/Queues/QueuesSingleton.h
M wikipedia/Queues/QueuesSingleton.m
M wikipedia/Session/SessionSingleton.h
M wikipedia/Session/SessionSingleton.m
M wikipedia/View Controllers/Languages/LanguagesTableVC.m
M wikipedia/View Controllers/Preview/PreviewChoicesMenuView.m
M wikipedia/View Controllers/Preview/PreviewChoicesMenuView.xib
M wikipedia/View Controllers/TopNav/NavController.m
M wikipedia/View Controllers/WebView/WebViewController.m
24 files changed, 414 insertions(+), 49 deletions(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/Wikipedia.xcodeproj/project.pbxproj 
b/Wikipedia.xcodeproj/project.pbxproj
index 262a856..cc69069 100644
--- a/Wikipedia.xcodeproj/project.pbxproj
+++ b/Wikipedia.xcodeproj/project.pbxproj
@@ -43,6 +43,10 @@
043DAC4B1901C3EE001CD17C /* CreditsViewController.m in Sources 
*/ = {isa = PBXBuildFile; fileRef = 043DAC4A1901C3EE001CD17C /* 
CreditsViewController.m */; };
043F18E118D9691D00D8489A /* TopActionSheetLabel.m in Sources */ 
= {isa = PBXBuildFile; fileRef = 043F18DC18D9691D00D8489A /* 
TopActionSheetLabel.m */; };
043F18E518D9691D00D8489A /* 
UINavigationController+TopActionSheet.m in Sources */ = {isa = PBXBuildFile; 
fileRef = 043F18E018D9691D00D8489A /* UINavigationController+TopActionSheet.m 
*/; };
+   044213C8191C3C2A006C03BF /* ConfigFileSyncOp.m in Sources */ = 
{isa = PBXBuildFile; fileRef = 044213C7191C3C2A006C03BF /* ConfigFileSyncOp.m 
*/; };
+   044213D0191D6F43006C03BF /* BundledPaths.m in Sources */ = {isa 
= PBXBuildFile; fileRef = 044213CF191D6F43006C03BF /* BundledPaths.m */; };
+   044213D4191D70E9006C03BF /* BundledJson.m in Sources */ = {isa 
= PBXBuildFile; fileRef = 044213D3191D70E9006C03BF /* BundledJson.m */; };
+   044213D8191D99FB006C03BF /* Json in Resources */ = {isa = 
PBXBuildFile; fileRef = 044213D7191D99FB006C03BF /* Json */; };
0442F57B19006DCC00F55DF9 /* PageHistoryLabel.m in Sources */ = 
{isa = PBXBuildFile; fileRef = 0442F57A19006DCC00F55DF9 /* PageHistoryLabel.m 
*/; };
0442F57E190071A100F55DF9 /* WikiFont.ttf in Resources */ = {isa 
= PBXBuildFile; fileRef = 0442F57D190071A100F55DF9 /* WikiFont.ttf */; };
0447862F185145090050563B /* HistoryResultCell.m in Sources */ = 
{isa = PBXBuildFile; fileRef = 04478621185145090050563B /* HistoryResultCell.m 
*/; };
@@ -107,7 +111,6 @@
04C695CE18ED08D900D9F2DA /* UIView+SearchSubviews.m in Sources 
*/ = {isa = PBXBuildFile; fileRef = 04C695CD18ED08D900D9F2DA /* 
UIView+SearchSubviews.m */; };
04C695D218ED213000D9F2DA /* 
UIScrollView+NoHorizontalScrolling.m in Sources */ = {isa = PBXBuildFile; 
fileRef = 04C695D118ED213000D9F2DA /* UIScrollView+NoHorizontalScrolling.m */; 
};
04C8781018F4A42700FA3B99 /* AccountCreationTokenOp.m in Sources 
*/ = {isa = PBXBuildFile; fileRef = 04C8780F18F4A42700FA3B99 /* 
AccountCreationTokenOp.m */; };
-   04CF1CB6187C8F4400E9516F /* Languages in Resources */ = {isa = 
PBXBuildFile; fileRef = 04CF1CB5187C8F4400E9516F /* Languages */; };
04D122321899B8AC006B9A30 /* AlertWebView.m in Sources */ = {isa 
= PBXBuildFile; fileRef = 04D122311899B8AC006B9A30 /* AlertWebView.m */; };
04D149DD18877343006B4104 /* AlertLabel.m in Sources */ = {isa = 

[MediaWiki-commits] [Gerrit] bump version to 47 (2.0-alpha-2014-05-10) - change (apps...wikipedia)

2014-05-10 Thread Brion VIBBER (Code Review)
Brion VIBBER has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/132677

Change subject: bump version to 47 (2.0-alpha-2014-05-10)
..

bump version to 47 (2.0-alpha-2014-05-10)

Change-Id: I3c4de07fc48ec410fca548022ba1dd8735a9a90c
---
M wikipedia/AndroidManifest.xml
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia 
refs/changes/77/132677/1

diff --git a/wikipedia/AndroidManifest.xml b/wikipedia/AndroidManifest.xml
index 1fe5989..cd47c9d 100644
--- a/wikipedia/AndroidManifest.xml
+++ b/wikipedia/AndroidManifest.xml
@@ -1,8 +1,8 @@
 
 http://schemas.android.com/apk/res/android";
 package="org.wikipedia"
-android:versionCode="46"
-android:versionName="2.0-alpha-2014-05-09">
+android:versionCode="47"
+android:versionName="2.0-alpha-2014-05-10">
 
 https://gerrit.wikimedia.org/r/132677
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3c4de07fc48ec410fca548022ba1dd8735a9a90c
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Brion VIBBER 

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


[MediaWiki-commits] [Gerrit] CSS style to make HTML5 work on IE 8-11 - change (mediawiki/core)

2014-05-10 Thread Brion VIBBER (Code Review)
Brion VIBBER has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/132750

Change subject: CSS style to make HTML5  work on IE 8-11
..

CSS style to make HTML5  work on IE 8-11

(Note that using the zero-width space directly is roughly equivalent;
see https://en.wikipedia.org/wiki/Zero-width_space )

Bug: 65155
Change-Id: I53f62fdb26cec65a3f4a5bea1bb9b1d7a9cb9c13
---
M skins/common/shared.css
1 file changed, 5 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/50/132750/1

diff --git a/skins/common/shared.css b/skins/common/shared.css
index ac7f407..f9f0372 100644
--- a/skins/common/shared.css
+++ b/skins/common/shared.css
@@ -38,7 +38,11 @@
background-color: yellow;
color: black;
 }
-
+/* Helper for wbr element on IE 8+; in HTML5 but not supported by default as 
of IE 11 */
+/* Note canonical HTML5 styles recommend "content: \u200B" but this doesn't 
work as of IE 11 */
+wbr {
+   display: inline-block;
+}
 /* Input types that should follow user direction, like buttons */
 /* TODO: What about buttons in wikipage content ? */
 input[type="submit"],

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I53f62fdb26cec65a3f4a5bea1bb9b1d7a9cb9c13
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Brion VIBBER 

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


[MediaWiki-commits] [Gerrit] tyop fxi - change (mediawiki/core)

2014-05-11 Thread Brion VIBBER (Code Review)
Brion VIBBER has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/132906

Change subject: tyop fxi
..

tyop fxi

Change-Id: I05cd37b3dab7d0eeffb4df81f906fd1e881b7f9f
---
M includes/content/ContentHandler.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/06/132906/1

diff --git a/includes/content/ContentHandler.php 
b/includes/content/ContentHandler.php
index defa7da..dd7e27d 100644
--- a/includes/content/ContentHandler.php
+++ b/includes/content/ContentHandler.php
@@ -454,7 +454,7 @@
 
/**
 * Creates a new Content object that acts as a redirect to the given 
page,
-* or null of redirects are not supported by this content model.
+* or null if redirects are not supported by this content model.
 *
 * This default implementation always returns null. Subclasses 
supporting redirects
 * must override this method.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I05cd37b3dab7d0eeffb4df81f906fd1e881b7f9f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Brion VIBBER 

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


[MediaWiki-commits] [Gerrit] Merge common LESS files properly - change (mediawiki...MobileApp)

2014-05-16 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Merge common LESS files properly
..


Merge common LESS files properly

Change-Id: Id8d6a2394130ca6a92c4cef59369e2d8e445450b
---
M MobileApp.php
1 file changed, 4 insertions(+), 4 deletions(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/MobileApp.php b/MobileApp.php
index dd2ec81..3f479aa 100644
--- a/MobileApp.php
+++ b/MobileApp.php
@@ -41,13 +41,13 @@
 );
 
 $wgResourceModules['mobile.app.pagestyle'] = array(
-   'styles' => array(
+   'styles' => array_merge( array(
'less/ui.less',
-   ) + $wgCommonMobileAppLESSFiles
+   ), $wgCommonMobileAppLESSFiles )
 ) + $wgCommonMobileAppModuleDef;
 
 $wgResourceModules['mobile.app.preview'] = array(
-   'styles' => array(
+   'styles' => array_merge( array(
'less/preview.less',
-   ) + $wgCommonMobileAppLESSFiles
+   ), $wgCommonMobileAppLESSFiles )
 ) + $wgCommonMobileAppModuleDef;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id8d6a2394130ca6a92c4cef59369e2d8e445450b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileApp
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Brion VIBBER 

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


[MediaWiki-commits] [Gerrit] Removed extra files. - change (apps...wikipedia)

2014-05-16 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Removed extra files.
..


Removed extra files.

Change-Id: I479e1533039c23a3c0b545bdb5abda0617602df6
---
M wikipedia/View Controllers/Navigation/Center/CenterNavController.h
D wikipedia/View Controllers/Navigation/Center/NavBarContainerView.h
D wikipedia/View Controllers/Navigation/Center/NavBarContainerView.m
D wikipedia/View Controllers/Navigation/Center/NavBarTextField.h
D wikipedia/View Controllers/Navigation/Center/NavBarTextField.m
D wikipedia/View Controllers/Navigation/Center/NavButtonLabel.h
D wikipedia/View Controllers/Navigation/Center/NavButtonLabel.m
D wikipedia/View Controllers/Navigation/Center/NavButtonView.h
D wikipedia/View Controllers/Navigation/Center/NavButtonView.m
9 files changed, 1 insertion(+), 224 deletions(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/wikipedia/View Controllers/Navigation/Center/CenterNavController.h 
b/wikipedia/View Controllers/Navigation/Center/CenterNavController.h
index 7e6ff88..cf28919 100644
--- a/wikipedia/View Controllers/Navigation/Center/CenterNavController.h
+++ b/wikipedia/View Controllers/Navigation/Center/CenterNavController.h
@@ -27,4 +27,4 @@
 
 @end
 
-//TODO: maybe use currentNavBarTextFieldText instead of currentSearchString?
+//TODO: maybe use currentTopMenuTextFieldText instead of currentSearchString?
diff --git a/wikipedia/View Controllers/Navigation/Center/NavBarContainerView.h 
b/wikipedia/View Controllers/Navigation/Center/NavBarContainerView.h
deleted file mode 100644
index a232121..000
--- a/wikipedia/View Controllers/Navigation/Center/NavBarContainerView.h
+++ /dev/null
@@ -1,8 +0,0 @@
-//  Created by Monte Hurd on 2/6/14.
-//  Copyright (c) 2013 Wikimedia Foundation. Provided under MIT-style license; 
please copy and modify!
-
-#import 
-
-@interface NavBarContainerView : UIView
-
-@end
diff --git a/wikipedia/View Controllers/Navigation/Center/NavBarContainerView.m 
b/wikipedia/View Controllers/Navigation/Center/NavBarContainerView.m
deleted file mode 100644
index d0758e4..000
--- a/wikipedia/View Controllers/Navigation/Center/NavBarContainerView.m
+++ /dev/null
@@ -1,17 +0,0 @@
-//  Created by Monte Hurd on 2/6/14.
-//  Copyright (c) 2013 Wikimedia Foundation. Provided under MIT-style license; 
please copy and modify!
-
-#import "NavBarContainerView.h"
-
-@implementation NavBarContainerView
-
-- (void)drawRect:(CGRect)rect {
-CGContextRef context = UIGraphicsGetCurrentContext();
-CGContextMoveToPoint(context, CGRectGetMinX(rect), CGRectGetMaxY(rect));
-CGContextAddLineToPoint(context, CGRectGetMaxX(rect), CGRectGetMaxY(rect));
-CGContextSetStrokeColorWithColor(context, [[UIColor lightGrayColor] 
CGColor] );
-CGContextSetLineWidth(context, 1.0f / [UIScreen mainScreen].scale);
-CGContextStrokePath(context);
-}
-
-@end
diff --git a/wikipedia/View Controllers/Navigation/Center/NavBarTextField.h 
b/wikipedia/View Controllers/Navigation/Center/NavBarTextField.h
deleted file mode 100644
index 0e48205..000
--- a/wikipedia/View Controllers/Navigation/Center/NavBarTextField.h
+++ /dev/null
@@ -1,11 +0,0 @@
-//  Created by Monte Hurd on 11/23/13.
-//  Copyright (c) 2013 Wikimedia Foundation. Provided under MIT-style license; 
please copy and modify!
-
-#import 
-
-@interface NavBarTextField : UITextField
-
-@property(nonatomic, copy) NSString *placeholder;
-@property(nonatomic, strong) UIColor *placeholderColor;
-
-@end
diff --git a/wikipedia/View Controllers/Navigation/Center/NavBarTextField.m 
b/wikipedia/View Controllers/Navigation/Center/NavBarTextField.m
deleted file mode 100644
index ccb5735..000
--- a/wikipedia/View Controllers/Navigation/Center/NavBarTextField.m
+++ /dev/null
@@ -1,77 +0,0 @@
-//  Created by Monte Hurd on 11/23/13.
-//  Copyright (c) 2013 Wikimedia Foundation. Provided under MIT-style license; 
please copy and modify!
-
-#import "NavBarTextField.h"
-#import "Defines.h"
-
-@implementation NavBarTextField
-
-@synthesize placeholder = _placeholder;
-@synthesize placeholderColor = _placeholderColor;
-
-- (id)initWithFrame:(CGRect)frame
-{
-self = [super initWithFrame:frame];
-if (self) {
-self.placeholderColor = SEARCH_FIELD_PLACEHOLDER_TEXT_COLOR;
-}
-return self;
-}
-
-// Adds left padding without messing up leftView or rightView.
-// From: http://stackoverflow.com/a/14357720
-
-- (CGRect)textRectForBounds:(CGRect)bounds {
-CGRect ret = [super textRectForBounds:bounds];
-ret.origin.x = ret.origin.x + 10;
-ret.size.width = ret.size.width - 20;
-return ret;
-}
-
-- (CGRect)editingRectForBounds:(CGRect)bounds {
-return [self textRectForBounds:bounds];
-}
-
--(void)setPlaceholder:(NSString *)placeholder
-{
-_placeholder = placeholder;
-self.attributedPlaceholder = [self 
getAttributedPlaceholderForString:(!placeholder) ? @"": placeholder];
-}
-
--(v

[MediaWiki-commits] [Gerrit] Work in progress: language marker button in doc area (not ye... - change (apps...wikipedia)

2014-05-21 Thread Brion VIBBER (Code Review)
Brion VIBBER has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/134678

Change subject: Work in progress: language marker button in doc area (not yet 
functional)
..

Work in progress: language marker button in doc area (not yet functional)

Looks more or less like the mockup at
https://trello-attachments.s3.amazonaws.com/52e98a603e6d08a53861025b/5363dc861f242dbd5eb6af22/4881x3543/879a1efeee2a2eb7ad4fa19e4de513e0/Apps_Language%26EditHistory_Sprint31.png
though not 100% exact just yet.

Do we need/want a single-character icon in the icon font for the Aあ bit?

Change-Id: I46f40a347ee5d0c60b9c9b320c4bffc8da780d07
---
M wikipedia/View Controllers/WebView/WebViewController.m
M wikipedia/assets/styles.css
M wikipedia/en.lproj/Localizable.strings
M wikipedia/qqq.lproj/Localizable.strings
M www/Gruntfile.js
5 files changed, 55 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia 
refs/changes/78/134678/1

diff --git a/wikipedia/View Controllers/WebView/WebViewController.m 
b/wikipedia/View Controllers/WebView/WebViewController.m
index ad60e83..762c914 100644
--- a/wikipedia/View Controllers/WebView/WebViewController.m
+++ b/wikipedia/View Controllers/WebView/WebViewController.m
@@ -1308,7 +1308,9 @@
 self.scrollOffset = scrollOffset;
 
 
-[sectionTextArray addObject:[NSString stringWithFormat:@"THIS MANY LANGS 
AVAILABLE = %d", langCount.integerValue]];
+if (mode != DISPLAY_LEAD_SECTION) {
+[sectionTextArray addObject: [self renderLanguageButtonForCount: 
langCount.integerValue]];
+}
 
 
 // Join article sections text
@@ -1331,6 +1333,15 @@
 }];
 }
 
+-(NSString *)renderLanguageButtonForCount:(NSInteger)count
+{
+NSString *aa = @"Aあ";
+NSString *countStr = [NSString stringWithFormat:@"%d", (int)count];
+NSString *otherLanguages = [NSString stringWithFormat:@"%@", 
MWLocalizedString(@"language-button-other-languages", nil)];
+
+return [NSString stringWithFormat:@"%@%@%@", aa, countStr, otherLanguages];
+}
+
 #pragma mark Scroll to last section after rotate
 
 
-(void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
 duration:(NSTimeInterval)duration
diff --git a/wikipedia/assets/styles.css b/wikipedia/assets/styles.css
index 60cf097..d64ed09 100644
--- a/wikipedia/assets/styles.css
+++ b/wikipedia/assets/styles.css
@@ -8,7 +8,8 @@
   line-height: 26px;
 }
 html {
--webkit-text-size-adjust: none; /* Never autoresize text */
+  -webkit-text-size-adjust: none;
+  /* Never autoresize text */
 }
 #ios_app_content {
   margin: 0px;
@@ -154,3 +155,40 @@
   -webkit-transform: scaleX(-1);
   transform: scaleX(-1);
 }
+
+.mw-language-button {
+  appearance: none;
+  -webkit-appearance: none;
+  display: -webkit-flex;
+  -webkit-flex-direction: row;
+  -webkit-flex-wrap: nowrap;
+  -webkit-align-items: center;
+  width: 200px;
+  color: #aaa;
+  background: #222;
+  font-size: 24px;
+  padding: 12px;
+}
+.mw-language-icon,
+.mw-language-number,
+.mw-language-label {
+  -webkit-flex-grow: 2;
+}
+.mw-language-icon {
+  text-align: right;
+  color: white;
+  padding-right: 12px;
+  border-right: solid 1px #aaa;
+  white-space: nowrap;
+  font-family: "AvenirNextCondensed-Medium";
+}
+.mw-language-count {
+  text-align: center;
+  padding-left: 12px;
+}
+.mw-language-label {
+  -webkit-flex-grow: 5;
+  text-align: left;
+  padding-left: 12px;
+  font-size: 10px;
+}
diff --git a/wikipedia/en.lproj/Localizable.strings 
b/wikipedia/en.lproj/Localizable.strings
index 9b0839f..ae19526 100644
--- a/wikipedia/en.lproj/Localizable.strings
+++ b/wikipedia/en.lproj/Localizable.strings
@@ -3,6 +3,8 @@
 "article-languages-downloading" = "Loading article languages...";
 "article-languages-filter-placeholder" = "Filter";
 
+"language-button-other-languages" = "Other Languages";
+
 "history-label" = "Browsing History";
 "history-section-today" = "Today";
 "history-section-yesterday" = "Yesterday";
diff --git a/wikipedia/qqq.lproj/Localizable.strings 
b/wikipedia/qqq.lproj/Localizable.strings
index 9962213..58bb95e 100644
--- a/wikipedia/qqq.lproj/Localizable.strings
+++ b/wikipedia/qqq.lproj/Localizable.strings
@@ -110,3 +110,4 @@
 "credits-gerrit-repo" = "Text for item linking to the app's main gerrit 
repository";
 "credits-github-mirror" = "Text for item linking to the app's mirrored GitHub 
repository";
 "credits-external-libraries" = "Title for area of credits page showing 
external open source libraries used by app.\n{{Identical|External}}";
+"language-button-other-languages" = "Label for 'other languages' button in 
content area. Button also shows the number of available languages, but an 
indeterminate plural should be used here.";
diff --git a/www/Gruntfile.js b/www/Gruntfile.js
index ce00dff..759d6b5 100644
--- a/www/Gruntfile.js
+++ b/www/Gruntfile.js
@@ -22,7 +22,7 @@
 less: {
  

[MediaWiki-commits] [Gerrit] Update to wikiFont adding temp supplemental ios characters. - change (apps...wikipedia)

2014-05-21 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Update to wikiFont adding temp supplemental ios characters.
..


Update to wikiFont adding temp supplemental ios characters.

Change-Id: I09d42ba0e3deb38aeecc279c3e1109b00a48e302
---
M wikipedia/Base.lproj/Main_iPhone.storyboard
M wikipedia/Defines/WMF_WikiFont_Chars.h
M wikipedia/Fonts/WikiFont.ttf
M wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.h
M wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.m
M wikipedia/View Controllers/Navigation/Top/TopMenuButtonView.h
M wikipedia/View Controllers/Navigation/Top/TopMenuButtonView.m
M wikipedia/View Controllers/Navigation/Top/TopMenuLabel.m
M wikipedia/View Controllers/Navigation/Top/TopMenuViewController.m
M wikipedia/View Controllers/WebView/WebViewController.m
M wikipedia/Wikipedia-Prefix.pch
11 files changed, 193 insertions(+), 119 deletions(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/wikipedia/Base.lproj/Main_iPhone.storyboard 
b/wikipedia/Base.lproj/Main_iPhone.storyboard
index 21c605a..1fd3ae6 100644
--- a/wikipedia/Base.lproj/Main_iPhone.storyboard
+++ b/wikipedia/Base.lproj/Main_iPhone.storyboard
@@ -1212,73 +1212,42 @@
 
 
 
-
+
 
-
+
+
 
-
+
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
 
-
+
+
 
-
+
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
 
-
+
 
-
-
-
-
-
-
-
-
-
-
-
-
+
 
 
 
-
-
-
-
-
-
-
-
-
+
+
+
+   

[MediaWiki-commits] [Gerrit] Hooked up basic share sheet. - change (apps...wikipedia)

2014-05-21 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Hooked up basic share sheet.
..


Hooked up basic share sheet.

Change-Id: Ib2eb26ec68515a01204157cc207eee5db66d1e3c
---
M wikipedia/Categories/NSString+Extras.h
M wikipedia/Categories/NSString+Extras.m
M wikipedia/Data/Operations/DownloadNonLeadSectionsOp.m
M wikipedia/View Controllers/History/HistoryViewController.m
M wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.m
M wikipedia/View Controllers/Navigation/Top/TopMenuButtonView.m
M wikipedia/View Controllers/SavedPages/SavedPagesViewController.m
M wikipedia/View Controllers/SearchResults/SearchResultsController.m
M wikipedia/View Controllers/WebView/WebViewController.m
9 files changed, 58 insertions(+), 21 deletions(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/wikipedia/Categories/NSString+Extras.h 
b/wikipedia/Categories/NSString+Extras.h
index 2d9a6dd..5574f05 100644
--- a/wikipedia/Categories/NSString+Extras.h
+++ b/wikipedia/Categories/NSString+Extras.h
@@ -14,6 +14,7 @@
 
 - (NSString *)randomlyRepeatMaxTimes:(NSUInteger)maxTimes;
 
-- (NSString *)cleanWikiTitle;
+- (NSString *)wikiTitleWithoutUnderscores;
+- (NSString *)wikiTitleWithoutSpaces;
 
 @end
diff --git a/wikipedia/Categories/NSString+Extras.m 
b/wikipedia/Categories/NSString+Extras.m
index 1b0975e..74fc208 100644
--- a/wikipedia/Categories/NSString+Extras.m
+++ b/wikipedia/Categories/NSString+Extras.m
@@ -99,9 +99,14 @@
 return [NSString stringWithFormat:@"<%@>", [randStr 
stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]];
 }
 
-- (NSString *)cleanWikiTitle
+- (NSString *)wikiTitleWithoutUnderscores
 {
 return [self stringByReplacingOccurrencesOfString:@"_" withString:@" "];
 }
 
+- (NSString *)wikiTitleWithoutSpaces
+{
+return [self stringByReplacingOccurrencesOfString:@" " withString:@"_"];
+}
+
 @end
diff --git a/wikipedia/Data/Operations/DownloadNonLeadSectionsOp.m 
b/wikipedia/Data/Operations/DownloadNonLeadSectionsOp.m
index 00048d1..376c605 100644
--- a/wikipedia/Data/Operations/DownloadNonLeadSectionsOp.m
+++ b/wikipedia/Data/Operations/DownloadNonLeadSectionsOp.m
@@ -68,7 +68,7 @@
 NSMutableDictionary *mutableSection = section.mutableCopy;
 if ([mutableSection[@"fromtitle"] isKindOfClass:[NSString 
class]]) {
 NSString *fromTitle = mutableSection[@"fromtitle"];
-if ([[title cleanWikiTitle] isEqualToString:[fromTitle 
cleanWikiTitle]]) {
+if ([[title wikiTitleWithoutUnderscores] 
isEqualToString:[fromTitle wikiTitleWithoutUnderscores]]) {
 [mutableSection removeObjectForKey:@"fromtitle"];
 }
 }else{
diff --git a/wikipedia/View Controllers/History/HistoryViewController.m 
b/wikipedia/View Controllers/History/HistoryViewController.m
index 4fffbe3..80fdd4e 100644
--- a/wikipedia/View Controllers/History/HistoryViewController.m
+++ b/wikipedia/View Controllers/History/HistoryViewController.m
@@ -283,7 +283,7 @@
 historyEntry = (History *)[articleDataContext_.mainContext 
objectWithID:historyEntryId];
 }];
 
-NSString *title = [historyEntry.article.title cleanWikiTitle];
+NSString *title = [historyEntry.article.title wikiTitleWithoutUnderscores];
 NSString *language = [NSString stringWithFormat:@"\n%@", 
historyEntry.article.domainName];
 
 NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] 
init];
diff --git a/wikipedia/View 
Controllers/Navigation/Bottom/BottomMenuViewController.m b/wikipedia/View 
Controllers/Navigation/Bottom/BottomMenuViewController.m
index 29602ef..a7ec2b2 100644
--- a/wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.m
+++ b/wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.m
@@ -12,6 +12,8 @@
 #import "TopMenuButtonView.h"
 #import "TopMenuLabel.h"
 #import "UIViewController+Alert.h"
+#import "UIView+TemporaryAnimatedXF.h"
+#import "NSString+Extras.h"
 
 typedef NS_ENUM(NSInteger, BottomMenuItemTag) {
 BOTTOM_MENU_BUTTON_UNKNOWN = 0,
@@ -70,14 +72,25 @@
 
 #pragma mark Bottom bar button methods
 
-//TODO: Pull bottomBarView and into own object (and its subviews - the back 
and forward view/buttons/methods, etc).
-
 - (void)buttonPushed:(UITapGestureRecognizer *)sender
 {
-TopMenuButtonView *tappedButton = (TopMenuButtonView *)sender.view;
-if (!tappedButton.enabled)return;
+// If the tapped item was a button, first animate it briefly, then perform 
action.
+if([sender.view isKindOfClass:[TopMenuButtonView class]]){
+TopMenuButtonView *button = (TopMenuButtonView *)sender.view;
+if (!button.enabled)return;
+CGFloat animationScale = 1.25f;
+[button.label animateAndRewindXF: 
CATransform3DMakeScale(animationScale, animationScale, 1.0f

[MediaWiki-commits] [Gerrit] Marked lang insertion point. - change (apps...wikipedia)

2014-05-21 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Marked lang insertion point.
..


Marked lang insertion point.

Change-Id: I5145eb987c54b3eb07c8c93ae13bb204da7f45a1
---
M wikipedia/View Controllers/WebView/WebViewController.m
1 file changed, 4 insertions(+), 0 deletions(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/wikipedia/View Controllers/WebView/WebViewController.m 
b/wikipedia/View Controllers/WebView/WebViewController.m
index d029ea7..ad509ea 100644
--- a/wikipedia/View Controllers/WebView/WebViewController.m
+++ b/wikipedia/View Controllers/WebView/WebViewController.m
@@ -1302,6 +1302,10 @@
 }
 
 self.scrollOffset = scrollOffset;
+
+
+[sectionTextArray addObject:[NSString stringWithFormat:@"THIS MANY LANGS 
AVAILABLE = %d", langCount.integerValue]];
+
 
 // Join article sections text
 NSString *joint = @""; //@"";

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5145eb987c54b3eb07c8c93ae13bb204da7f45a1
Gerrit-PatchSet: 3
Gerrit-Project: apps/ios/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Mhurd 
Gerrit-Reviewer: Brion VIBBER 

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


[MediaWiki-commits] [Gerrit] Work in progress: language marker button in doc area - change (apps...wikipedia)

2014-05-21 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Work in progress: language marker button in doc area
..


Work in progress: language marker button in doc area

Looks more or less like the mockup at
https://trello-attachments.s3.amazonaws.com/52e98a603e6d08a53861025b/5363dc861f242dbd5eb6af22/4881x3543/879a1efeee2a2eb7ad4fa19e4de513e0/Apps_Language%26EditHistory_Sprint31.png
though not 100% exact just yet.

Questions:

* Should this be added to ToC as well?
* Do we need/want a single-character icon in the icon font for the Aあ bit?
  Or should we use the existing one that's different from the mockup?
* How should the button respond visually while being pressed?
* How should the marker be displayed when no languages available? Or leave it 
out as now?
* Exact wrapping/pixel-level details and localization questions...

Change-Id: I46f40a347ee5d0c60b9c9b320c4bffc8da780d07
---
M wikipedia/View Controllers/WebView/WebViewController.m
M wikipedia/assets/bundle.js
M wikipedia/assets/styles.css
M wikipedia/en.lproj/Localizable.strings
M wikipedia/qqq.lproj/Localizable.strings
M www/Gruntfile.js
M www/js/listeners.js
A www/less/langbutton.less
8 files changed, 189 insertions(+), 24 deletions(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/wikipedia/View Controllers/WebView/WebViewController.m 
b/wikipedia/View Controllers/WebView/WebViewController.m
index ad509ea..027e01c 100644
--- a/wikipedia/View Controllers/WebView/WebViewController.m
+++ b/wikipedia/View Controllers/WebView/WebViewController.m
@@ -678,7 +678,12 @@
 
 [weakSelf showSectionEditor];
 }];
-
+
+[self.bridge addListener:@"langClicked" withBlock:^(NSString *messageType, 
NSDictionary *payload) {
+NSLog(@"Language button pushed");
+[weakSelf languageButtonPushed];
+}];
+
 [self.bridge addListener:@"nonAnchorTouchEndedWithoutDragging" 
withBlock:^(NSString *messageType, NSDictionary *payload) {
 NSLog(@"nonAnchorTouchEndedWithoutDragging = %@", payload);
 
@@ -1304,7 +1309,9 @@
 self.scrollOffset = scrollOffset;
 
 
-[sectionTextArray addObject:[NSString stringWithFormat:@"THIS MANY LANGS 
AVAILABLE = %d", langCount.integerValue]];
+if (mode != DISPLAY_LEAD_SECTION) {
+[sectionTextArray addObject: [self renderLanguageButtonForCount: 
langCount.integerValue]];
+}
 
 
 // Join article sections text
@@ -1327,6 +1334,19 @@
 }];
 }
 
+-(NSString *)renderLanguageButtonForCount:(NSInteger)count
+{
+if (count > 0) {
+NSString *aa = @"Aあ";
+NSString *countStr = [NSString stringWithFormat:@"%d", (int)count];
+NSString *otherLanguages = [NSString stringWithFormat:@"%@", 
MWLocalizedString(@"language-button-other-languages", nil)];
+
+return [NSString stringWithFormat:@"%@%@%@", aa, countStr, 
otherLanguages];
+} else {
+return @"";
+}
+}
+
 #pragma mark Scroll to last section after rotate
 
 
-(void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
 duration:(NSTimeInterval)duration
diff --git a/wikipedia/assets/bundle.js b/wikipedia/assets/bundle.js
index c4caa93..896ca6f 100644
--- a/wikipedia/assets/bundle.js
+++ b/wikipedia/assets/bundle.js
@@ -158,6 +158,41 @@
 bridge.sendMessage( "pong", payload );
 });
 
+/**
+ * Quickie function to walk from the current element up to parents and match 
CSS-ish selectors.
+ * Think of it as a reverse element.querySelector :)
+ *
+ * Takes only element names, raw classes, and ids right now. Combines all 
given.
+ */
+function findParent(element, selector) {
+var matches = 
selector.match(/^([a-z0-9]*)(?:\.([a-z0-9-]+))?(?:#([a-z0-9-]+))?$/i);
+if (matches) {
+var selectorName = matches[1] || null;
+var selectorClass = matches[2] || null;
+var selectorId = matches[3] || null;
+
+var candidate = element;
+while (candidate) {
+do {
+if (selectorName && candidate.tagName && 
selectorName.toLowerCase() !== candidate.tagName.toLowerCase()) {
+break;
+}
+if (selectorClass && selectorClass !== candidate.className) {
+break;
+}
+if (selectorId && selectorId !== candidate.id) {
+break;
+}
+return candidate;
+} while (false);
+candidate = candidate.parentNode;
+}
+} else {
+throw new Error("Unexpected findParent selector format: " + selector);
+}
+return null;
+}
+
 document.onclick = function() {
 
 /*
@@ -171,15 +206,7 @@
 encountered.
 */
 
-var anchorTarget = null;
-var potentialAnchorTarget = event.target;
-while (potentialAnchorTarget) {
-if ( potentialAnchorTarget.tagName === "A" ){

[MediaWiki-commits] [Gerrit] Fix for search term highlighting font size and TOC updates. - change (apps...wikipedia)

2014-05-22 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Fix for search term highlighting font size and TOC updates.
..


Fix for search term highlighting font size and TOC updates.

When non-lead section of article were retrieved while TOC was
open, there was a regression which caused new sections/images
to not appear in the TOC until it was closed and opened again.

Ran ttfautohint on WikiFont.ttf

Fix for sharing some articles with special characters in
their titles causing app crash.

When you select a search result the top menu switches back
to default chrome.

Returned search result text size - had accidentally shrunken
the result article titles.

Change-Id: I1d96b8f9d01e5077f5091a4ad161a36272ac6112
---
M wikipedia/Categories/Article+Convenience.h
M wikipedia/Categories/Article+Convenience.m
M wikipedia/Defines/Defines.h
M wikipedia/Fonts/WikiFont.ttf
M wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.m
M wikipedia/View Controllers/Navigation/Top/TopMenuViewController.m
M wikipedia/View Controllers/SearchResults/SearchResultsController.m
M wikipedia/View Controllers/WebView/WebViewController.m
8 files changed, 54 insertions(+), 24 deletions(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/wikipedia/Categories/Article+Convenience.h 
b/wikipedia/Categories/Article+Convenience.h
index 8c6dac3..ed58405 100644
--- a/wikipedia/Categories/Article+Convenience.h
+++ b/wikipedia/Categories/Article+Convenience.h
@@ -12,4 +12,6 @@
 // larger than 99 x 99 px.
 - (UIImage *)getThumbnailUsingContext:(NSManagedObjectContext *)context;
 
+- (NSURL *)desktopURL;
+
 @end
diff --git a/wikipedia/Categories/Article+Convenience.m 
b/wikipedia/Categories/Article+Convenience.m
index 167ad22..70a22d0 100644
--- a/wikipedia/Categories/Article+Convenience.m
+++ b/wikipedia/Categories/Article+Convenience.m
@@ -5,6 +5,7 @@
 #import "ArticleCoreDataObjects.h"
 #import "Image+Convenience.h"
 #import "Defines.h"
+#import "NSString+Extras.h"
 
 @implementation Article (Convenience)
 
@@ -88,4 +89,17 @@
 return sectionImages;
 }
 
+-(NSURL *)desktopURL
+{
+NSString *titleWithoutSpaces = [self.title wikiTitleWithoutSpaces];
+
+NSString *urlString =
+[NSString stringWithFormat:@"https://%@.%@/wiki/%@";, self.domain, 
self.site, titleWithoutSpaces];
+
+NSString *encodedUrlString =
+[urlString 
stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
+
+return encodedUrlString ? [NSURL URLWithString:encodedUrlString] : nil;
+}
+
 @end
diff --git a/wikipedia/Defines/Defines.h b/wikipedia/Defines/Defines.h
index 2983b1b..01ab479 100644
--- a/wikipedia/Defines/Defines.h
+++ b/wikipedia/Defines/Defines.h
@@ -4,11 +4,14 @@
 #define SEARCH_RESULT_HEIGHT 60
 #define SEARCH_MAX_RESULTS @"25"
 
-#define SEARCH_FONT [UIFont systemFontOfSize:14.0]
-#define SEARCH_FONT_COLOR [UIColor colorWithWhite:0.0 alpha:0.85]
+#define SEARCH_TEXT_FIELD_FONT [UIFont systemFontOfSize:14.0]
+#define SEARCH_TEXT_FIELD_HIGHLIGHTED_COLOR [UIColor blackColor]
 
-#define SEARCH_FONT_HIGHLIGHTED [UIFont boldSystemFontOfSize:16.0]
-#define SEARCH_FONT_HIGHLIGHTED_COLOR [UIColor blackColor]
+#define SEARCH_RESULT_FONT [UIFont systemFontOfSize:16.0]
+#define SEARCH_RESULT_FONT_COLOR [UIColor colorWithWhite:0.0 alpha:0.85]
+
+#define SEARCH_RESULT_FONT_HIGHLIGHTED [UIFont boldSystemFontOfSize:16.0]
+#define SEARCH_RESULT_FONT_HIGHLIGHTED_COLOR [UIColor blackColor]
 
 #define SEARCH_FIELD_PLACEHOLDER_TEXT_COLOR [UIColor colorWithRed:0.7 
green:0.7 blue:0.7 alpha:1.0]
 
diff --git a/wikipedia/Fonts/WikiFont.ttf b/wikipedia/Fonts/WikiFont.ttf
index ab851d0..66ec0c0 100644
--- a/wikipedia/Fonts/WikiFont.ttf
+++ b/wikipedia/Fonts/WikiFont.ttf
Binary files differ
diff --git a/wikipedia/View 
Controllers/Navigation/Bottom/BottomMenuViewController.m b/wikipedia/View 
Controllers/Navigation/Bottom/BottomMenuViewController.m
index a7ec2b2..b5df308 100644
--- a/wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.m
+++ b/wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.m
@@ -14,6 +14,7 @@
 #import "UIViewController+Alert.h"
 #import "UIView+TemporaryAnimatedXF.h"
 #import "NSString+Extras.h"
+#import "Article+Convenience.h"
 
 typedef NS_ENUM(NSInteger, BottomMenuItemTag) {
 BOTTOM_MENU_BUTTON_UNKNOWN = 0,
@@ -108,7 +109,7 @@
 - (void)shareButtonPushed
 {
 NSString *title = @"";
-NSURL *URL = nil;
+NSURL *desktopURL = nil;
 
 NSManagedObjectID *articleID =
 [articleDataContext_.mainContext getArticleIDForTitle: [SessionSingleton 
sharedInstance].currentArticleTitle
@@ -116,13 +117,18 @@
 if (articleID) {
 Article *article = (Article *)[articleDataContext_.mainContext 
objectWithID:articleID];
 if (article) {
-NSString *titleWithoutSpaces = [article.title 
wikiTitleWithoutSpaces];
-URL = 

[MediaWiki-commits] [Gerrit] Added save button to share menu - hooked it up too. - change (apps...wikipedia)

2014-05-23 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Added save button to share menu - hooked it up too.
..


Added save button to share menu - hooked it up too.

Change-Id: I6bf18ac4d4a60fe76bef74e3a5de450ade3b6146
---
M Wikipedia.xcodeproj/project.pbxproj
M wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.m
A wikipedia/View Controllers/Navigation/Bottom/ShareMenuSavePageActivity.h
A wikipedia/View Controllers/Navigation/Bottom/ShareMenuSavePageActivity.m
M wikipedia/en.lproj/Localizable.strings
M wikipedia/qqq.lproj/Localizable.strings
6 files changed, 150 insertions(+), 2 deletions(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/Wikipedia.xcodeproj/project.pbxproj 
b/Wikipedia.xcodeproj/project.pbxproj
index 1b165ef..93b09ae 100644
--- a/Wikipedia.xcodeproj/project.pbxproj
+++ b/Wikipedia.xcodeproj/project.pbxproj
@@ -41,6 +41,7 @@
042A5B36192591520095E172 /* TopMenuTextField.m in Sources */ = 
{isa = PBXBuildFile; fileRef = 042A5B31192591520095E172 /* TopMenuTextField.m 
*/; };
042A5B37192591520095E172 /* TopMenuLabel.m in Sources */ = {isa 
= PBXBuildFile; fileRef = 042A5B33192591520095E172 /* TopMenuLabel.m */; };
042A5B38192591520095E172 /* TopMenuButtonView.m in Sources */ = 
{isa = PBXBuildFile; fileRef = 042A5B35192591520095E172 /* TopMenuButtonView.m 
*/; };
+   042B3996192EAEEA0066B270 /* ShareMenuSavePageActivity.m in 
Sources */ = {isa = PBXBuildFile; fileRef = 042B3995192EAEEA0066B270 /* 
ShareMenuSavePageActivity.m */; };
0433542218A023FE009305F0 /* UIViewController+HideKeyboard.m in 
Sources */ = {isa = PBXBuildFile; fileRef = 0433542118A023FE009305F0 /* 
UIViewController+HideKeyboard.m */; };
0433542618A093C5009305F0 /* UIView+RemoveConstraints.m in 
Sources */ = {isa = PBXBuildFile; fileRef = 0433542518A093C5009305F0 /* 
UIView+RemoveConstraints.m */; };
043C668A18BE9A8E00580E9B /* PreviewWikiTextOp.m in Sources */ = 
{isa = PBXBuildFile; fileRef = 043C668918BE9A8E00580E9B /* PreviewWikiTextOp.m 
*/; };
@@ -231,6 +232,8 @@
042A5B33192591520095E172 /* TopMenuLabel.m */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path 
= TopMenuLabel.m; sourceTree = ""; };
042A5B34192591520095E172 /* TopMenuButtonView.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
TopMenuButtonView.h; sourceTree = ""; };
042A5B35192591520095E172 /* TopMenuButtonView.m */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path 
= TopMenuButtonView.m; sourceTree = ""; };
+   042B3994192EAEEA0066B270 /* ShareMenuSavePageActivity.h */ = 
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; 
path = ShareMenuSavePageActivity.h; sourceTree = ""; };
+   042B3995192EAEEA0066B270 /* ShareMenuSavePageActivity.m */ = 
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = 
sourcecode.c.objc; path = ShareMenuSavePageActivity.m; sourceTree = ""; 
};
0433542018A023FE009305F0 /* UIViewController+HideKeyboard.h */ 
= {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = 
sourcecode.c.h; path = "UIViewController+HideKeyboard.h"; sourceTree = 
""; };
0433542118A023FE009305F0 /* UIViewController+HideKeyboard.m */ 
= {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = 
sourcecode.c.objc; path = "UIViewController+HideKeyboard.m"; sourceTree = 
""; };
0433542418A093C5009305F0 /* UIView+RemoveConstraints.h */ = 
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; 
path = "UIView+RemoveConstraints.h"; sourceTree = ""; };
@@ -717,6 +720,8 @@
042A5B2B19253E690095E172 /* 
BottomMenuViewController.m */,
04B162EF19284A6F00B1ABC2 /* 
BottomMenuContainerView.h */,
04B162F019284A6F00B1ABC2 /* 
BottomMenuContainerView.m */,
+   042B3994192EAEEA0066B270 /* 
ShareMenuSavePageActivity.h */,
+   042B3995192EAEEA0066B270 /* 
ShareMenuSavePageActivity.m */,
);
path = Bottom;
sourceTree = "";
@@ -1538,6 +1543,7 @@
048A26701905E55B00395F53 /* 
PreviewChoicesMenuView.m in Sources */,
04992BC418B6971F00A6C22B /* SearchThumbUrlsOp.m 
in Sources */,
044BD6B618849AD000FFE4BE /* 
SectionEditorViewController.m in Sources */,
+   042B3996192EAEEA0066B270 /* 
ShareMenuSavePageActivity.m in Sources */,
04D34DAB1863D2D600610A87 /* TFH

[MediaWiki-commits] [Gerrit] Fix for dark cancel button on sharing sheet. - change (apps...wikipedia)

2014-05-23 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Fix for dark cancel button on sharing sheet.
..


Fix for dark cancel button on sharing sheet.

Change-Id: I5f9c1e5e2495c7d096790129925e398095ecf341
---
M wikipedia/AppDelegate.m
1 file changed, 0 insertions(+), 1 deletion(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/wikipedia/AppDelegate.m b/wikipedia/AppDelegate.m
index 9311398..7eb6c42 100644
--- a/wikipedia/AppDelegate.m
+++ b/wikipedia/AppDelegate.m
@@ -97,7 +97,6 @@
 // Make buttons look the same on iOS 6 & 7.
 [[UIButton appearance] setBackgroundImage:[UIImage 
imageNamed:@"clear.png"] forState:UIControlStateNormal];
 [[UIButton appearance] setTitleColor:[UIColor lightGrayColor] 
forState:UIControlStateDisabled];
-[[UIButton appearance] setTitleColor:[UIColor blackColor] 
forState:UIControlStateNormal];
 }
 
 - (void)applicationWillResignActive:(UIApplication *)application

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5f9c1e5e2495c7d096790129925e398095ecf341
Gerrit-PatchSet: 1
Gerrit-Project: apps/ios/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Mhurd 
Gerrit-Reviewer: Brion VIBBER 

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


[MediaWiki-commits] [Gerrit] RTL styling fix for language button - change (apps...wikipedia)

2014-05-23 Thread Brion VIBBER (Code Review)
Brion VIBBER has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/135104

Change subject: RTL styling fix for language button
..

RTL styling fix for language button

* fix styles so padding/border are correct when in RTL
* check the UI language to set proper 'dir' on the button

Change-Id: If5271d59a7d9fd36fefeda904721fe509c5a8b87
---
M wikipedia/View Controllers/WebView/WebViewController.m
M wikipedia/assets/styles.css
M www/less/langbutton.less
3 files changed, 51 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia 
refs/changes/04/135104/1

diff --git a/wikipedia/View Controllers/WebView/WebViewController.m 
b/wikipedia/View Controllers/WebView/WebViewController.m
index d4c6340..fe16032 100644
--- a/wikipedia/View Controllers/WebView/WebViewController.m
+++ b/wikipedia/View Controllers/WebView/WebViewController.m
@@ -1342,11 +1342,15 @@
 -(NSString *)renderLanguageButtonForCount:(NSInteger)count
 {
 if (count > 0) {
+NSString *langCode = [[NSLocale preferredLanguages] objectAtIndex:0];
+MWLanguageInfo *lang = [MWLanguageInfo languageInfoForCode:langCode];
+NSString *dir = lang.dir;
+
 NSString *aa = @"Aあ";
 NSString *countStr = [NSString stringWithFormat:@"%d", (int)count];
 NSString *otherLanguages = [NSString stringWithFormat:@"%@", 
MWLocalizedString(@"language-button-other-languages", nil)];
 
-return [NSString stringWithFormat:@"%@%@%@", aa, countStr, 
otherLanguages];
+return [NSString stringWithFormat:@"%@%@%@", dir, aa, countStr, 
otherLanguages];
 } else {
 return @"";
 }
diff --git a/wikipedia/assets/styles.css b/wikipedia/assets/styles.css
index 67a0dd5..92679ab 100644
--- a/wikipedia/assets/styles.css
+++ b/wikipedia/assets/styles.css
@@ -177,19 +177,37 @@
   height: 24px;
 }
 .mw-language-icon {
-  text-align: right;
   color: white;
-  padding-right: 12px;
-  border-right: solid 1px #aaa;
   white-space: nowrap;
   font-family: "AvenirNextCondensed-Medium";
 }
-.mw-language-count {
-  text-align: center;
+.mw-language-button[dir=ltr] .mw-language-icon {
+  text-align: right;
+  padding-right: 12px;
+  border-right: solid 1px #aaa;
+}
+.mw-language-button[dir=rtl] .mw-language-icon {
+  text-align: left;
+  border-left: solid 1px #aaa;
   padding-left: 12px;
 }
+.mw-language-count {
+  text-align: center;
+}
+.mw-language-button[dir=ltr] .mw-language-count {
+  padding-left: 12px;
+}
+.mw-language-button[dir=rtl] .mw-language-count {
+  padding-right: 12px;
+}
 .mw-language-label {
+  font-size: 10px;
+}
+.mw-language-button[dir=ltr] .mw-language-label {
   text-align: left;
   padding-left: 12px;
-  font-size: 10px;
+}
+.mw-language-button[dir=rtl] .mw-language-label {
+  text-align: right;
+  padding-right: 12px;
 }
diff --git a/www/less/langbutton.less b/www/less/langbutton.less
index bb205f6..5550f0b 100644
--- a/www/less/langbutton.less
+++ b/www/less/langbutton.less
@@ -24,22 +24,39 @@
 }
 
 .mw-language-icon {
-   text-align: right;
color: white;
+   white-space: nowrap;
+   font-family: "AvenirNextCondensed-Medium";
+}
+.mw-language-button[dir=ltr] .mw-language-icon {
+   text-align: right;
padding-right: 12px;
border-right: solid 1px #aaa;
-   white-space: nowrap;
-
-   font-family: "AvenirNextCondensed-Medium";
+}
+.mw-language-button[dir=rtl] .mw-language-icon {
+   text-align: left;
+   border-left: solid 1px #aaa;
+   padding-left: 12px;
 }
 
 .mw-language-count {
text-align: center;
+}
+.mw-language-button[dir=ltr] .mw-language-count {
padding-left: 12px;
+}
+.mw-language-button[dir=rtl] .mw-language-count {
+   padding-right: 12px;
 }
 
 .mw-language-label {
+   font-size: 10px;
+}
+.mw-language-button[dir=ltr] .mw-language-label {
text-align: left;
padding-left: 12px;
-   font-size: 10px;
+}
+.mw-language-button[dir=rtl] .mw-language-label {
+   text-align: right;
+   padding-right: 12px;
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If5271d59a7d9fd36fefeda904721fe509c5a8b87
Gerrit-PatchSet: 1
Gerrit-Project: apps/ios/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Brion VIBBER 

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


[MediaWiki-commits] [Gerrit] Initial 'last modified' marker at bottom of page - change (apps...wikipedia)

2014-05-23 Thread Brion VIBBER (Code Review)
Brion VIBBER has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/135118

Change subject: Initial 'last modified' marker at bottom of page
..

Initial 'last modified' marker at bottom of page

Currently within the web view; we may move this and the language
button to native widgets attached to the end of the web view.

Change-Id: Iad197228d51ceb5e9a41ec3b588b7d37ac6b608f
---
M wikipedia/View Controllers/WebView/WebViewController.m
M wikipedia/assets/styles.css
M wikipedia/en.lproj/Localizable.strings
M wikipedia/mw-utils/WikipediaAppUtils.h
M wikipedia/mw-utils/WikipediaAppUtils.m
M wikipedia/qqq.lproj/Localizable.strings
M www/Gruntfile.js
A www/less/lastmod.less
8 files changed, 76 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia 
refs/changes/18/135118/1

diff --git a/wikipedia/View Controllers/WebView/WebViewController.m 
b/wikipedia/View Controllers/WebView/WebViewController.m
index fe16032..b7d66fc 100644
--- a/wikipedia/View Controllers/WebView/WebViewController.m
+++ b/wikipedia/View Controllers/WebView/WebViewController.m
@@ -1271,6 +1271,8 @@
 MWLanguageInfo *languageInfo = [MWLanguageInfo 
languageInfoForCode:article.domain];
 
 NSNumber *langCount = article.languagecount;
+NSDate *lastModified = article.lastmodified;
+NSString *lastModifiedBy = article.lastmodifiedby;
 
 [self.bottomMenuViewController updateBottomBarButtonsEnabledState];
 
@@ -1313,6 +1315,7 @@
 
 if ((mode != DISPLAY_LEAD_SECTION) && ![[SessionSingleton 
sharedInstance] isCurrentArticleMain]) {
 [sectionTextArray addObject: [self renderLanguageButtonForCount: 
langCount.integerValue]];
+[sectionTextArray addObject: [self renderLastModified:lastModified 
by:lastModifiedBy]];
 }
 
 
@@ -1356,6 +1359,24 @@
 }
 }
 
+-(NSString *)renderLastModified:(NSDate *)date by:(NSString *)username
+{
+NSString *langCode = [[NSLocale preferredLanguages] objectAtIndex:0];
+MWLanguageInfo *lang = [MWLanguageInfo languageInfoForCode:langCode];
+NSString *dir = lang.dir;
+
+NSString *ts = [WikipediaAppUtils relativeTimestamp:date];
+NSString *lm = [MWLocalizedString(@"lastmodified-timestamp", nil) 
stringByReplacingOccurrencesOfString:@"$1" withString:ts];
+NSString *by;
+if (username && ![username isEqualToString:@""]) {
+by = [MWLocalizedString(@"lastmodified-by", nil) 
stringByReplacingOccurrencesOfString:@"$1" withString:username];
+} else {
+by = MWLocalizedString(@"lastmodified-anon", nil);
+}
+
+return [NSString stringWithFormat:@"%@%@", dir, lm, by];
+}
+
 #pragma mark Scroll to last section after rotate
 
 
-(void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
 duration:(NSTimeInterval)duration
diff --git a/wikipedia/assets/styles.css b/wikipedia/assets/styles.css
index 92679ab..180a858 100644
--- a/wikipedia/assets/styles.css
+++ b/wikipedia/assets/styles.css
@@ -211,3 +211,8 @@
   text-align: right;
   padding-right: 12px;
 }
+
+.mw-last-modified {
+  margin-top: 1em;
+  color: #27aa65;
+}
diff --git a/wikipedia/en.lproj/Localizable.strings 
b/wikipedia/en.lproj/Localizable.strings
index ce78ebb..dfc04b3 100644
--- a/wikipedia/en.lproj/Localizable.strings
+++ b/wikipedia/en.lproj/Localizable.strings
@@ -125,3 +125,14 @@
 
 "share-menu-save-page" = "Save Page";
 "share-menu-page-saved" = "Page Saved";
+
+"timestamp-just-now" = "just now";
+"timestamp-minutes" = "%d minutes ago";
+"timestamp-hours" = "%d hours ago";
+"timestamp-days" = "%d days ago";
+"timestamp-months" = "%d months ago";
+"timestamp-years" = "%d years ago";
+
+"lastmodified-timestamp" = "Last Modified $1";
+"lastmodified-by" = "by $1";
+"lastmodified-anon" = "by an anonymous user";
diff --git a/wikipedia/mw-utils/WikipediaAppUtils.h 
b/wikipedia/mw-utils/WikipediaAppUtils.h
index 91a1f72..2cd601f 100644
--- a/wikipedia/mw-utils/WikipediaAppUtils.h
+++ b/wikipedia/mw-utils/WikipediaAppUtils.h
@@ -11,5 +11,6 @@
 +(NSString*) formFactor;
 +(NSString*) versionedUserAgent;
 +(NSString*) localizedStringForKey:(NSString *)key;
++(NSString*) relativeTimestamp:(NSDate *)date;
 
 @end
diff --git a/wikipedia/mw-utils/WikipediaAppUtils.m 
b/wikipedia/mw-utils/WikipediaAppUtils.m
index 3e609d1..7300834 100644
--- a/wikipedia/mw-utils/WikipediaAppUtils.m
+++ b/wikipedia/mw-utils/WikipediaAppUtils.m
@@ -62,4 +62,28 @@
 }
 }
 
++(NSString *) relativeTimestamp:(NSDate *)date
+{
+NSTimeInterval interval = abs([date timeIntervalSinceNow]);
+double minutes = interval / 60.0;
+double hours = minutes / 60.0;
+double days = hours / 24.0;
+double months = days / (365.25 / 12.0);
+double years = months / 12.0;
+
+if (minutes < 2.0) {
+return MWLocalizedString(@"timestamp-just-now", nil);
+} else if (hours < 2.0) {
+return [NSString 
stringWithForma

[MediaWiki-commits] [Gerrit] RTL styling fix for language button - change (apps...wikipedia)

2014-05-23 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: RTL styling fix for language button
..


RTL styling fix for language button

* fix styles so padding/border are correct when in RTL
* check the UI language to set proper 'dir' on the button

Change-Id: If5271d59a7d9fd36fefeda904721fe509c5a8b87
---
M wikipedia/View Controllers/WebView/WebViewController.m
M wikipedia/assets/styles.css
M www/less/langbutton.less
3 files changed, 51 insertions(+), 12 deletions(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/wikipedia/View Controllers/WebView/WebViewController.m 
b/wikipedia/View Controllers/WebView/WebViewController.m
index d4c6340..fe16032 100644
--- a/wikipedia/View Controllers/WebView/WebViewController.m
+++ b/wikipedia/View Controllers/WebView/WebViewController.m
@@ -1342,11 +1342,15 @@
 -(NSString *)renderLanguageButtonForCount:(NSInteger)count
 {
 if (count > 0) {
+NSString *langCode = [[NSLocale preferredLanguages] objectAtIndex:0];
+MWLanguageInfo *lang = [MWLanguageInfo languageInfoForCode:langCode];
+NSString *dir = lang.dir;
+
 NSString *aa = @"Aあ";
 NSString *countStr = [NSString stringWithFormat:@"%d", (int)count];
 NSString *otherLanguages = [NSString stringWithFormat:@"%@", 
MWLocalizedString(@"language-button-other-languages", nil)];
 
-return [NSString stringWithFormat:@"%@%@%@", aa, countStr, 
otherLanguages];
+return [NSString stringWithFormat:@"%@%@%@", dir, aa, countStr, 
otherLanguages];
 } else {
 return @"";
 }
diff --git a/wikipedia/assets/styles.css b/wikipedia/assets/styles.css
index 67a0dd5..92679ab 100644
--- a/wikipedia/assets/styles.css
+++ b/wikipedia/assets/styles.css
@@ -177,19 +177,37 @@
   height: 24px;
 }
 .mw-language-icon {
-  text-align: right;
   color: white;
-  padding-right: 12px;
-  border-right: solid 1px #aaa;
   white-space: nowrap;
   font-family: "AvenirNextCondensed-Medium";
 }
-.mw-language-count {
-  text-align: center;
+.mw-language-button[dir=ltr] .mw-language-icon {
+  text-align: right;
+  padding-right: 12px;
+  border-right: solid 1px #aaa;
+}
+.mw-language-button[dir=rtl] .mw-language-icon {
+  text-align: left;
+  border-left: solid 1px #aaa;
   padding-left: 12px;
 }
+.mw-language-count {
+  text-align: center;
+}
+.mw-language-button[dir=ltr] .mw-language-count {
+  padding-left: 12px;
+}
+.mw-language-button[dir=rtl] .mw-language-count {
+  padding-right: 12px;
+}
 .mw-language-label {
+  font-size: 10px;
+}
+.mw-language-button[dir=ltr] .mw-language-label {
   text-align: left;
   padding-left: 12px;
-  font-size: 10px;
+}
+.mw-language-button[dir=rtl] .mw-language-label {
+  text-align: right;
+  padding-right: 12px;
 }
diff --git a/www/less/langbutton.less b/www/less/langbutton.less
index bb205f6..5550f0b 100644
--- a/www/less/langbutton.less
+++ b/www/less/langbutton.less
@@ -24,22 +24,39 @@
 }
 
 .mw-language-icon {
-   text-align: right;
color: white;
+   white-space: nowrap;
+   font-family: "AvenirNextCondensed-Medium";
+}
+.mw-language-button[dir=ltr] .mw-language-icon {
+   text-align: right;
padding-right: 12px;
border-right: solid 1px #aaa;
-   white-space: nowrap;
-
-   font-family: "AvenirNextCondensed-Medium";
+}
+.mw-language-button[dir=rtl] .mw-language-icon {
+   text-align: left;
+   border-left: solid 1px #aaa;
+   padding-left: 12px;
 }
 
 .mw-language-count {
text-align: center;
+}
+.mw-language-button[dir=ltr] .mw-language-count {
padding-left: 12px;
+}
+.mw-language-button[dir=rtl] .mw-language-count {
+   padding-right: 12px;
 }
 
 .mw-language-label {
+   font-size: 10px;
+}
+.mw-language-button[dir=ltr] .mw-language-label {
text-align: left;
padding-left: 12px;
-   font-size: 10px;
+}
+.mw-language-button[dir=rtl] .mw-language-label {
+   text-align: right;
+   padding-right: 12px;
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If5271d59a7d9fd36fefeda904721fe509c5a8b87
Gerrit-PatchSet: 1
Gerrit-Project: apps/ios/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Brion VIBBER 
Gerrit-Reviewer: Brion VIBBER 

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


[MediaWiki-commits] [Gerrit] Initial 'last modified' marker at bottom of page - change (apps...wikipedia)

2014-05-23 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Initial 'last modified' marker at bottom of page
..


Initial 'last modified' marker at bottom of page

Currently within the web view; we may move this and the language
button to native widgets attached to the end of the web view.

Change-Id: Iad197228d51ceb5e9a41ec3b588b7d37ac6b608f
---
M wikipedia/View Controllers/WebView/WebViewController.m
M wikipedia/assets/styles.css
M wikipedia/en.lproj/Localizable.strings
M wikipedia/mw-utils/WikipediaAppUtils.h
M wikipedia/mw-utils/WikipediaAppUtils.m
M wikipedia/qqq.lproj/Localizable.strings
M www/Gruntfile.js
A www/less/lastmod.less
8 files changed, 76 insertions(+), 3 deletions(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/wikipedia/View Controllers/WebView/WebViewController.m 
b/wikipedia/View Controllers/WebView/WebViewController.m
index fe16032..b7d66fc 100644
--- a/wikipedia/View Controllers/WebView/WebViewController.m
+++ b/wikipedia/View Controllers/WebView/WebViewController.m
@@ -1271,6 +1271,8 @@
 MWLanguageInfo *languageInfo = [MWLanguageInfo 
languageInfoForCode:article.domain];
 
 NSNumber *langCount = article.languagecount;
+NSDate *lastModified = article.lastmodified;
+NSString *lastModifiedBy = article.lastmodifiedby;
 
 [self.bottomMenuViewController updateBottomBarButtonsEnabledState];
 
@@ -1313,6 +1315,7 @@
 
 if ((mode != DISPLAY_LEAD_SECTION) && ![[SessionSingleton 
sharedInstance] isCurrentArticleMain]) {
 [sectionTextArray addObject: [self renderLanguageButtonForCount: 
langCount.integerValue]];
+[sectionTextArray addObject: [self renderLastModified:lastModified 
by:lastModifiedBy]];
 }
 
 
@@ -1356,6 +1359,24 @@
 }
 }
 
+-(NSString *)renderLastModified:(NSDate *)date by:(NSString *)username
+{
+NSString *langCode = [[NSLocale preferredLanguages] objectAtIndex:0];
+MWLanguageInfo *lang = [MWLanguageInfo languageInfoForCode:langCode];
+NSString *dir = lang.dir;
+
+NSString *ts = [WikipediaAppUtils relativeTimestamp:date];
+NSString *lm = [MWLocalizedString(@"lastmodified-timestamp", nil) 
stringByReplacingOccurrencesOfString:@"$1" withString:ts];
+NSString *by;
+if (username && ![username isEqualToString:@""]) {
+by = [MWLocalizedString(@"lastmodified-by", nil) 
stringByReplacingOccurrencesOfString:@"$1" withString:username];
+} else {
+by = MWLocalizedString(@"lastmodified-anon", nil);
+}
+
+return [NSString stringWithFormat:@"%@%@", dir, lm, by];
+}
+
 #pragma mark Scroll to last section after rotate
 
 
-(void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
 duration:(NSTimeInterval)duration
diff --git a/wikipedia/assets/styles.css b/wikipedia/assets/styles.css
index 92679ab..180a858 100644
--- a/wikipedia/assets/styles.css
+++ b/wikipedia/assets/styles.css
@@ -211,3 +211,8 @@
   text-align: right;
   padding-right: 12px;
 }
+
+.mw-last-modified {
+  margin-top: 1em;
+  color: #27aa65;
+}
diff --git a/wikipedia/en.lproj/Localizable.strings 
b/wikipedia/en.lproj/Localizable.strings
index ce78ebb..dfc04b3 100644
--- a/wikipedia/en.lproj/Localizable.strings
+++ b/wikipedia/en.lproj/Localizable.strings
@@ -125,3 +125,14 @@
 
 "share-menu-save-page" = "Save Page";
 "share-menu-page-saved" = "Page Saved";
+
+"timestamp-just-now" = "just now";
+"timestamp-minutes" = "%d minutes ago";
+"timestamp-hours" = "%d hours ago";
+"timestamp-days" = "%d days ago";
+"timestamp-months" = "%d months ago";
+"timestamp-years" = "%d years ago";
+
+"lastmodified-timestamp" = "Last Modified $1";
+"lastmodified-by" = "by $1";
+"lastmodified-anon" = "by an anonymous user";
diff --git a/wikipedia/mw-utils/WikipediaAppUtils.h 
b/wikipedia/mw-utils/WikipediaAppUtils.h
index 91a1f72..2cd601f 100644
--- a/wikipedia/mw-utils/WikipediaAppUtils.h
+++ b/wikipedia/mw-utils/WikipediaAppUtils.h
@@ -11,5 +11,6 @@
 +(NSString*) formFactor;
 +(NSString*) versionedUserAgent;
 +(NSString*) localizedStringForKey:(NSString *)key;
++(NSString*) relativeTimestamp:(NSDate *)date;
 
 @end
diff --git a/wikipedia/mw-utils/WikipediaAppUtils.m 
b/wikipedia/mw-utils/WikipediaAppUtils.m
index 3e609d1..7300834 100644
--- a/wikipedia/mw-utils/WikipediaAppUtils.m
+++ b/wikipedia/mw-utils/WikipediaAppUtils.m
@@ -62,4 +62,28 @@
 }
 }
 
++(NSString *) relativeTimestamp:(NSDate *)date
+{
+NSTimeInterval interval = abs([date timeIntervalSinceNow]);
+double minutes = interval / 60.0;
+double hours = minutes / 60.0;
+double days = hours / 24.0;
+double months = days / (365.25 / 12.0);
+double years = months / 12.0;
+
+if (minutes < 2.0) {
+return MWLocalizedString(@"timestamp-just-now", nil);
+} else if (hours < 2.0) {
+return [NSString 
stringWithFormat:MWLocalizedString(@"timestamp-minutes", nil), 
(int)rou

[MediaWiki-commits] [Gerrit] Article image appears when sharing items via mail, Facebook ... - change (apps...wikipedia)

2014-05-28 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Article image appears when sharing items via mail, Facebook etc.
..


Article image appears when sharing items via mail, Facebook etc.

Re-added "Copy" to share menu choices.

Change-Id: Iac6307f19a79118ea0f9285fb8ced4abe878424a
---
M wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.m
1 file changed, 16 insertions(+), 4 deletions(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/wikipedia/View 
Controllers/Navigation/Bottom/BottomMenuViewController.m b/wikipedia/View 
Controllers/Navigation/Bottom/BottomMenuViewController.m
index 5ad353d..b1e3740 100644
--- a/wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.m
+++ b/wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.m
@@ -16,6 +16,7 @@
 #import "NSString+Extras.h"
 #import "Article+Convenience.h"
 #import "ShareMenuSavePageActivity.h"
+#import "Article+Convenience.h"
 
 typedef NS_ENUM(NSInteger, BottomMenuItemTag) {
 BOTTOM_MENU_BUTTON_UNKNOWN = 0,
@@ -120,6 +121,7 @@
 {
 NSString *title = @"";
 NSURL *desktopURL = nil;
+UIImage *image = nil;
 
 NSManagedObjectID *articleID =
 [articleDataContext_.mainContext getArticleIDForTitle: [SessionSingleton 
sharedInstance].currentArticleTitle
@@ -129,20 +131,30 @@
 if (article) {
 desktopURL = [article desktopURL];
 title = article.title;
+image = [article 
getThumbnailUsingContext:articleDataContext_.mainContext];
 }
 }
 
 if (!desktopURL) {
-NSLog(@"Could not retrieve desktop URL for article.")
+NSLog(@"Could not retrieve desktop URL for article.");
 return;
 }
 
 ShareMenuSavePageActivity *shareMenuSavePageActivity = 
[[ShareMenuSavePageActivity alloc] init];
-
+
+NSMutableArray *activityItemsArray = @[title, desktopURL].mutableCopy;
+if (image) {
+[activityItemsArray addObject:image];
+}
+
 UIActivityViewController *shareActivityVC =
-[[UIActivityViewController alloc] initWithActivityItems: @[title, 
desktopURL]
+[[UIActivityViewController alloc] initWithActivityItems: 
activityItemsArray
   applicationActivities: 
@[shareMenuSavePageActivity]];
-NSMutableArray *exclusions = @[UIActivityTypeCopyToPasteboard].mutableCopy;
+NSMutableArray *exclusions = @[
+UIActivityTypePrint,
+UIActivityTypeAssignToContact,
+UIActivityTypeSaveToCameraRoll
+].mutableCopy;
 
 if (NSFoundationVersionNumber > NSFoundationVersionNumber_iOS_6_1) {
 [exclusions addObject:UIActivityTypeAirDrop];

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iac6307f19a79118ea0f9285fb8ced4abe878424a
Gerrit-PatchSet: 3
Gerrit-Project: apps/ios/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Mhurd 
Gerrit-Reviewer: Brion VIBBER 

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


[MediaWiki-commits] [Gerrit] Update README: converting svgs to pngs - change (apps...wikipedia)

2014-05-28 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Update README: converting svgs to pngs
..


Update README: converting svgs to pngs

Change-Id: I75a6f0fb66f367d5140ba4d207dbf7de632583a7
---
M README.md
1 file changed, 12 insertions(+), 3 deletions(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/README.md b/README.md
index 09c958f..77fdbe8 100644
--- a/README.md
+++ b/README.md
@@ -176,13 +176,22 @@
 various output resolutions via a script. This rasterization is not part of
 the main build process, so needs to be re-run when adding new icons.
 
+=== Setup ===
+Install sh python module:
+* "sudo easy_install sh"
+
 Ensure you have librsvg and the 'rsvg-convert' command:
 
 * On Ubuntu, run "sudo apt-get install librsvg2-bin"
 * On Mac OS X using Homebrew, run "brew install librsvg"
 
-In "wikipedia" project subdirectory, run:
-* "./convertify.bash"
+You also need to have ImageMagick (for flipping of icons):
+* On Mac OS X using Homebrew, run "brew install imagemagick"
 
-Original files from icon-sources/*.svg are rendered and copied into the res/
+=== Convert ===
+
+Run:
+* "python scripts/convert-icons.py"
+
+Original files from icon-svgs/*/*.svg are rendered and copied into the res/
 subdirectories. Note that they are not automatically added to git!

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I75a6f0fb66f367d5140ba4d207dbf7de632583a7
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: BearND 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Dbrant 
Gerrit-Reviewer: Yuvipanda 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Do not override MobileFrontend fonts - change (mediawiki...MobileApp)

2014-05-28 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Do not override MobileFrontend fonts
..


Do not override MobileFrontend fonts

We could experiment with OpenSans later on, but for now,
the designers want the fonts to be consistent across
Mobile Web and Apps.

Change-Id: I0f58910753029d9c89f5cf814177afc967237ce7
---
M less/overrides.less
1 file changed, 0 insertions(+), 1 deletion(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/less/overrides.less b/less/overrides.less
index 8848e10..c1e3de8 100644
--- a/less/overrides.less
+++ b/less/overrides.less
@@ -1,5 +1,4 @@
 body {
-   font-family: "Open Sans", sans-serif;
padding-top: 48px;
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0f58910753029d9c89f5cf814177afc967237ce7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileApp
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Brion VIBBER 

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


[MediaWiki-commits] [Gerrit] Re-use Link styles from MobileFrontend - change (mediawiki...MobileApp)

2014-05-28 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Re-use Link styles from MobileFrontend
..


Re-use Link styles from MobileFrontend

Change-Id: I929028190d3b445dff5d94858254914193c60109
---
M MobileApp.php
A less/links.less
M less/overrides.less
3 files changed, 30 insertions(+), 6 deletions(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/MobileApp.php b/MobileApp.php
index d0bc7ee..eb6e9b6 100644
--- a/MobileApp.php
+++ b/MobileApp.php
@@ -39,7 +39,8 @@
'../MobileFrontend/less/common/reset.less',
'../MobileFrontend/less/content/main.less',
'../MobileFrontend/less/content/hacks.less',
-   'less/overrides.less'
+   'less/overrides.less',
+   'less/links.less'
 );
 
 $wgResourceModules['mobile.app.pagestyle'] = array(
diff --git a/less/links.less b/less/links.less
new file mode 100644
index 000..98c4069
--- /dev/null
+++ b/less/links.less
@@ -0,0 +1,28 @@
+/* Copied over from MobileFrontend.
+   FIXME: Remove when MobileFrontend CSS is componentized */
+@import "mediawiki.mixins.less";
+@import "minerva.variables.less";
+@import "minerva.mixins.less";
+
+a {
+   text-decoration: none;
+   color: #002bb8;
+}
+
+a:visited {
+   color: #5a3696;
+}
+
+a:active {
+   color: #faa700;
+}
+
+a:hover {
+   text-decoration: underline;
+}
+
+a.new,
+a.new:visited,
+a.new:hover {
+   color: @redBase;
+}
diff --git a/less/overrides.less b/less/overrides.less
index c1e3de8..3799435 100644
--- a/less/overrides.less
+++ b/less/overrides.less
@@ -1,8 +1,3 @@
 body {
padding-top: 48px;
 }
-
-a {
-   color: #347BFF;
-   text-decoration: none;
-}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I929028190d3b445dff5d94858254914193c60109
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileApp
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Brion VIBBER 

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


[MediaWiki-commits] [Gerrit] Workaround for breakage on 'Great Eastern Highway' featured ... - change (apps...wikipedia)

2014-06-16 Thread Brion VIBBER (Code Review)
Brion VIBBER has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/139884

Change subject: Workaround for breakage on 'Great Eastern Highway' featured 
article with video thumb
..

Workaround for breakage on 'Great Eastern Highway' featured article with video 
thumb

Change-Id: I6bcee0eb9e73ec53d22fedec998ac3520af5fc22
---
M WikipediaMetro/WikipediaMetroTest/js/default.js
1 file changed, 6 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/win8/wikipedia 
refs/changes/84/139884/1

diff --git a/WikipediaMetro/WikipediaMetroTest/js/default.js 
b/WikipediaMetro/WikipediaMetroTest/js/default.js
index 284b89c..c746d83 100644
--- a/WikipediaMetro/WikipediaMetroTest/js/default.js
+++ b/WikipediaMetro/WikipediaMetroTest/js/default.js
@@ -1045,7 +1045,12 @@
 // Skip a link containing an image
 continue;
 }
-title = extractWikiTitle($link.attr('href'));
+try {
+title = extractWikiTitle($link.attr('href'));
+} catch (e) {
+// Skip weirdly broken links
+continue;
+}
 break;
 }
 if ($imgs.length) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6bcee0eb9e73ec53d22fedec998ac3520af5fc22
Gerrit-PatchSet: 1
Gerrit-Project: apps/win8/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Brion VIBBER 

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


[MediaWiki-commits] [Gerrit] Workaround for breakage on 'Great Eastern Highway' featured ... - change (apps...wikipedia)

2014-06-16 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Workaround for breakage on 'Great Eastern Highway' featured 
article with video thumb
..


Workaround for breakage on 'Great Eastern Highway' featured article with video 
thumb

Change-Id: I6bcee0eb9e73ec53d22fedec998ac3520af5fc22
---
M WikipediaMetro/WikipediaMetroTest/js/default.js
1 file changed, 6 insertions(+), 1 deletion(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/WikipediaMetro/WikipediaMetroTest/js/default.js 
b/WikipediaMetro/WikipediaMetroTest/js/default.js
index 284b89c..c746d83 100644
--- a/WikipediaMetro/WikipediaMetroTest/js/default.js
+++ b/WikipediaMetro/WikipediaMetroTest/js/default.js
@@ -1045,7 +1045,12 @@
 // Skip a link containing an image
 continue;
 }
-title = extractWikiTitle($link.attr('href'));
+try {
+title = extractWikiTitle($link.attr('href'));
+} catch (e) {
+// Skip weirdly broken links
+continue;
+}
 break;
 }
 if ($imgs.length) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6bcee0eb9e73ec53d22fedec998ac3520af5fc22
Gerrit-PatchSet: 1
Gerrit-Project: apps/win8/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Brion VIBBER 
Gerrit-Reviewer: Brion VIBBER 

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


[MediaWiki-commits] [Gerrit] Bump internal app version to 1.1.0.36 - change (apps...wikipedia)

2014-06-16 Thread Brion VIBBER (Code Review)
Brion VIBBER has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/139892

Change subject: Bump internal app version to 1.1.0.36
..

Bump internal app version to 1.1.0.36

Change-Id: Ieb415d8efb29599d35890037cde28113be645f62
---
M WikipediaMetro/WikipediaMetroTest/Package.StoreAssociation.xml
M WikipediaMetro/WikipediaMetroTest/package.appxmanifest
2 files changed, 4 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/win8/wikipedia 
refs/changes/92/139892/1

diff --git a/WikipediaMetro/WikipediaMetroTest/Package.StoreAssociation.xml 
b/WikipediaMetro/WikipediaMetroTest/Package.StoreAssociation.xml
index 1f21adc..f98b415 100644
--- a/WikipediaMetro/WikipediaMetroTest/Package.StoreAssociation.xml
+++ b/WikipediaMetro/WikipediaMetroTest/Package.StoreAssociation.xml
@@ -1,7 +1,6 @@
 
 http://schemas.microsoft.com/appx/2010/storeassociation";>
   CN=2180B9A4-DDFD-4BFD-8D7E-EADC9C394EF5
-  WikimediaFoundation
   Wikimedia Foundation
   
http://www.w3.org/2001/04/xmlenc#sha256
   
@@ -367,17 +366,17 @@
   
 6.3.0.0
 Neutral
-1.1.0.34
+1.1.0.35
   
   
 6.3.0.0
 Neutral
-1.1.0.34
+1.1.0.35
   
   
 6.3.0.0
 Neutral
-1.1.0.34
+1.1.0.35
   
 
   
diff --git a/WikipediaMetro/WikipediaMetroTest/package.appxmanifest 
b/WikipediaMetro/WikipediaMetroTest/package.appxmanifest
index 20aba09..ce5f3c4 100644
--- a/WikipediaMetro/WikipediaMetroTest/package.appxmanifest
+++ b/WikipediaMetro/WikipediaMetroTest/package.appxmanifest
@@ -1,6 +1,6 @@
 
 http://schemas.microsoft.com/appx/2010/manifest"; 
xmlns:m2="http://schemas.microsoft.com/appx/2013/manifest";>
-  
+  
   
 Wikipedia
 Wikimedia Foundation

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieb415d8efb29599d35890037cde28113be645f62
Gerrit-PatchSet: 1
Gerrit-Project: apps/win8/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Brion VIBBER 

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


[MediaWiki-commits] [Gerrit] Bump internal app version to 1.1.0.36 - change (apps...wikipedia)

2014-06-16 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Bump internal app version to 1.1.0.36
..


Bump internal app version to 1.1.0.36

Change-Id: Ieb415d8efb29599d35890037cde28113be645f62
---
M WikipediaMetro/WikipediaMetroTest/Package.StoreAssociation.xml
M WikipediaMetro/WikipediaMetroTest/package.appxmanifest
2 files changed, 4 insertions(+), 5 deletions(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/WikipediaMetro/WikipediaMetroTest/Package.StoreAssociation.xml 
b/WikipediaMetro/WikipediaMetroTest/Package.StoreAssociation.xml
index 1f21adc..f98b415 100644
--- a/WikipediaMetro/WikipediaMetroTest/Package.StoreAssociation.xml
+++ b/WikipediaMetro/WikipediaMetroTest/Package.StoreAssociation.xml
@@ -1,7 +1,6 @@
 
 http://schemas.microsoft.com/appx/2010/storeassociation";>
   CN=2180B9A4-DDFD-4BFD-8D7E-EADC9C394EF5
-  WikimediaFoundation
   Wikimedia Foundation
   
http://www.w3.org/2001/04/xmlenc#sha256
   
@@ -367,17 +366,17 @@
   
 6.3.0.0
 Neutral
-1.1.0.34
+1.1.0.35
   
   
 6.3.0.0
 Neutral
-1.1.0.34
+1.1.0.35
   
   
 6.3.0.0
 Neutral
-1.1.0.34
+1.1.0.35
   
 
   
diff --git a/WikipediaMetro/WikipediaMetroTest/package.appxmanifest 
b/WikipediaMetro/WikipediaMetroTest/package.appxmanifest
index 20aba09..ce5f3c4 100644
--- a/WikipediaMetro/WikipediaMetroTest/package.appxmanifest
+++ b/WikipediaMetro/WikipediaMetroTest/package.appxmanifest
@@ -1,6 +1,6 @@
 
 http://schemas.microsoft.com/appx/2010/manifest"; 
xmlns:m2="http://schemas.microsoft.com/appx/2013/manifest";>
-  
+  
   
 Wikipedia
 Wikimedia Foundation

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ieb415d8efb29599d35890037cde28113be645f62
Gerrit-PatchSet: 1
Gerrit-Project: apps/win8/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Brion VIBBER 
Gerrit-Reviewer: Brion VIBBER 

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


[MediaWiki-commits] [Gerrit] Initial 'garbage collection' of unused cached images when cl... - change (apps...wikipedia)

2014-06-17 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Initial 'garbage collection' of unused cached images when 
cleaning history
..


Initial 'garbage collection' of unused cached images when cleaning history

Images linked from sections were saved into the database, but not deleted
automatically when their section was removed because they might be used
in multiple articles.

Adds a convenience method [image deleteIfUnused] to kill out the old images
if still unused after the cascading deletes remove the sections.

Change-Id: I6755ec0490e16d1d46fbb34e61c4d947858989a1
---
M wikipedia/Categories/Image+Convenience.h
M wikipedia/Categories/Image+Convenience.m
M wikipedia/View Controllers/History/HistoryViewController.m
M wikipedia/assets/abusefilter.css
M wikipedia/assets/preview.css
M wikipedia/assets/styles.css
6 files changed, 43 insertions(+), 8 deletions(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/wikipedia/Categories/Image+Convenience.h 
b/wikipedia/Categories/Image+Convenience.h
index 4a40cef..b484dcb 100644
--- a/wikipedia/Categories/Image+Convenience.h
+++ b/wikipedia/Categories/Image+Convenience.h
@@ -8,4 +8,10 @@
 // Retrieves the highest resolution image in the core data store with same 
name as this image.
 -(Image 
*)getHighestResolutionImageWithSameNameUsingContext:(NSManagedObjectContext 
*)context;
 
+/**
+ * Check if this image is still in use, and if not remove it and its backing 
data.
+ * You'll still have to actually save updates on the managed object context!
+ */
+-(void)deleteIfUnused;
+
 @end
diff --git a/wikipedia/Categories/Image+Convenience.m 
b/wikipedia/Categories/Image+Convenience.m
index 48ab314..4109ac4 100644
--- a/wikipedia/Categories/Image+Convenience.m
+++ b/wikipedia/Categories/Image+Convenience.m
@@ -28,4 +28,14 @@
 return (images.count == 1) ? images[0] : self;
 }
 
+-(void)deleteIfUnused
+{
+int count = (int)self.sectionImage.count;
+NSLog(@"section image = %@ is referenced by %d sections", self.fileName, 
count);
+if (count < 1) {
+NSLog(@"deleting unused image %@", self.fileName);
+[self.managedObjectContext deleteObject:self];
+}
+}
+
 @end
diff --git a/wikipedia/View Controllers/History/HistoryViewController.m 
b/wikipedia/View Controllers/History/HistoryViewController.m
index 0aede61..ffdc30f 100644
--- a/wikipedia/View Controllers/History/HistoryViewController.m
+++ b/wikipedia/View Controllers/History/HistoryViewController.m
@@ -18,6 +18,7 @@
 #import "TopMenuContainerView.h"
 #import "TopMenuViewController.h"
 #import "UIViewController+StatusBarHeight.h"
+#import "Image+Convenience.h"
 
 #define HISTORY_THUMBNAIL_WIDTH 110
 #define HISTORY_RESULT_HEIGHT 66
@@ -201,7 +202,6 @@
 history.article.thumbnailImage.fileName
 );
 */
-
 if ([history.dateVisited isToday]) {
 [today addObject:history.objectID];
 }else if ([history.dateVisited isYesterday]) {
@@ -255,6 +255,7 @@
 //NSLog(@"GARBAGE COUNT = %lu", (unsigned long)garbage.count);
 //NSLog(@"GARBAGE = %@", garbage);
 if (garbage.count == 0) return;
+NSMutableArray *imagesToCollect = [[NSMutableArray alloc] init];
 
 [articleDataContext_.mainContext performBlockAndWait:^(){
 for (NSManagedObjectID *historyID in garbage) {
@@ -271,16 +272,34 @@
 
 // Article deletes don't cascade to images (intentionally) so 
delete these manually.
 if (thumb) [articleDataContext_.mainContext deleteObject:thumb];
-
-//TODO: add code for deleting images which were only referenced by this article
+
+if (article) {
+// Section images might be used in multiple articles, so list 
them up
+// and kill them only after we've cleaned up the sections and 
can confirm
+// they are no longer used...
+for (Section *section in article.section) {
+for (SectionImage *sectionImage in section.sectionImage) {
+Image *image = sectionImage.image;
+[imagesToCollect addObject:image];
+}
+}
+}
 
 // Delete the article
 if (article) [articleDataContext_.mainContext 
deleteObject:article];
-
 }
+
 NSError *error = nil;
 [articleDataContext_.mainContext save:&error];
-if (error) NSLog(@"GARBAGE error = %@", error);
+if (error) NSLog(@"GARBAGE pass 1 error = %@", error);
+
+// Now clean up the images that aren't used in remaining pages
+for (Image *image in imagesToCollect) {
+[image deleteIfUnused];
+}
+// and save again...
+[articleDataContext_.mainContext save:&error];
+if (error) NSLog(@"GARBAGE pass 2 error = %@", error);
 
 }];
 }
diff --git a/wikipedia/asset

[MediaWiki-commits] [Gerrit] Fix for "other" placeholder text clipping. - change (apps...wikipedia)

2014-06-19 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Fix for "other" placeholder text clipping.
..


Fix for "other" placeholder text clipping.

Change-Id: I6591b8cc9b6f72598921affc5889d7baed4c57c2
---
M wikipedia/Base.lproj/Main_iPhone.storyboard
M wikipedia/View Controllers/EditSummary/EditSummaryViewController.m
2 files changed, 23 insertions(+), 17 deletions(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/wikipedia/Base.lproj/Main_iPhone.storyboard 
b/wikipedia/Base.lproj/Main_iPhone.storyboard
index 50fe4cb..02f7337 100644
--- a/wikipedia/Base.lproj/Main_iPhone.storyboard
+++ b/wikipedia/Base.lproj/Main_iPhone.storyboard
@@ -1381,6 +1381,13 @@
 
 
 
+
+
+
+
+
+
+
 
 
 
@@ -1392,16 +1399,21 @@
 
 
 
+
+
 
 
 
 
 
+
 
+
 
 
 
 
+
 
 
 
diff --git a/wikipedia/View Controllers/EditSummary/EditSummaryViewController.m 
b/wikipedia/View Controllers/EditSummary/EditSummaryViewController.m
index 11fe53a..2f1bd2b 100644
--- a/wikipedia/View Controllers/EditSummary/EditSummaryViewController.m
+++ b/wikipedia/View Controllers/EditSummary/EditSummaryViewController.m
@@ -16,6 +16,8 @@
 
 @property (weak, nonatomic) IBOutlet NSLayoutConstraint 
*bottomLineHeightConstraint;
 
+@property (weak, nonatomic) IBOutlet UILabel *placeholderLabel;
+
 @end
 
 @implementation EditSummaryViewController
@@ -35,8 +37,7 @@
 [super viewDidLoad];
 // Do any additional setup after loading the view.
 
-self.summaryTextField.attributedPlaceholder =
-[self 
getAttributedPlaceholderForString:MWLocalizedString(@"edit-summary-field-placeholder-text",
 nil)];
+self.placeholderLabel.text = 
MWLocalizedString(@"edit-summary-field-placeholder-text", nil);
 
 self.summaryTextField.textColor = [UIColor darkGrayColor];
 self.summaryTextField.returnKeyType = UIReturnKeyDone;
@@ -59,6 +60,13 @@
 - (void)textFieldDidChange :(NSNotification *)notification
 {
 [self updateDoneButtonState];
+
+[self updatePlaceholderLabelState];
+}
+
+-(void)updatePlaceholderLabelState
+{
+self.placeholderLabel.hidden = ([self.summaryTextField.text length] == 0) 
? NO : YES;
 }
 
 -(void)updateDoneButtonState
@@ -74,21 +82,6 @@
 {
 NSUInteger newLength = [textField.text length] + [string length] - 
range.length;
 return (newLength > MAX_SUMMARY_LENGTH) ? NO : YES;
-}
-
--(NSAttributedString *)getAttributedPlaceholderForString:(NSString *)string
-{
-NSMutableAttributedString *str = [[NSMutableAttributedString alloc] 
initWithString:string];
-
-[str addAttribute:NSFontAttributeName
-value:[UIFont systemFontOfSize:12.0]
-range:NSMakeRange(0, str.length)];
-
-[str addAttribute:NSForegroundColorAttributeName
-value:[UIColor colorWithWhite:0.55 alpha:1.0]
-range:NSMakeRange(0, str.length)];
-
-return str;
 }
 
 -(void)viewDidAppear:(BOOL)animated
@@ -109,6 +102,7 @@
 self.summaryTextField.text = self.summaryText;
 
 [self updateDoneButtonState];
+[self updatePlaceholderLabelState];
 
 [[NSNotificationCenter defaultCenter] addObserver:self 
selector:@selector(textFieldDidChange:) 
name:@"UITextFieldTextDidChangeNotification" object:self.summaryTextField];
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6591b8cc9b6f72598921affc5889d7baed4c57c2
Gerrit-PatchSet: 1
Gerrit-Project: apps/ios/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Mhurd 
Gerrit-Reviewer: Brion VIBBER 

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


[MediaWiki-commits] [Gerrit] Periodically remove old / unused article and associated data. - change (apps...wikipedia)

2014-06-19 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Periodically remove old / unused article and associated data.
..


Periodically remove old / unused article and associated data.

Change-Id: I82711860b0017f95d250e86d7a3a2e0b4b0bc5ac
---
M Wikipedia.xcodeproj/project.pbxproj
M wikipedia/AppDelegate.m
M wikipedia/Categories/Article+Convenience.h
M wikipedia/Categories/Article+Convenience.m
A wikipedia/Housekeeping/CoreDataHousekeeping.h
A wikipedia/Housekeeping/CoreDataHousekeeping.m
M wikipedia/View Controllers/History/HistoryViewController.m
M wikipedia/View Controllers/WebView/WebViewController.m
8 files changed, 201 insertions(+), 25 deletions(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/Wikipedia.xcodeproj/project.pbxproj 
b/Wikipedia.xcodeproj/project.pbxproj
index e1f4ac3..2b503ed 100644
--- a/Wikipedia.xcodeproj/project.pbxproj
+++ b/Wikipedia.xcodeproj/project.pbxproj
@@ -81,6 +81,7 @@
048A26771906268100395F53 /* PaddedLabel.m in Sources */ = {isa 
= PBXBuildFile; fileRef = 048A26761906268100395F53 /* PaddedLabel.m */; };
0493C2D419526A0100EBB973 /* WikiFont-Glyphs.ttf in Resources */ 
= {isa = PBXBuildFile; fileRef = 0493C2D319526A0100EBB973 /* 
WikiFont-Glyphs.ttf */; };
0493C2D619526FFE00EBB973 /* WikiFont-Glyphs-iOS.ttf in 
Resources */ = {isa = PBXBuildFile; fileRef = 0493C2D519526FFE00EBB973 /* 
WikiFont-Glyphs-iOS.ttf */; };
+   0493C2CC1952373100EBB973 /* CoreDataHousekeeping.m in Sources 
*/ = {isa = PBXBuildFile; fileRef = 0493C2CB1952373100EBB973 /* 
CoreDataHousekeeping.m */; };
049566C218F5F4CB0058EA12 /* ZeroConfigState.m in Sources */ = 
{isa = PBXBuildFile; fileRef = 049566C118F5F4CB0058EA12 /* ZeroConfigState.m 
*/; };
04992BC018B687AF00A6C22B /* SearchOp.m in Sources */ = {isa = 
PBXBuildFile; fileRef = 04992BBF18B687AF00A6C22B /* SearchOp.m */; };
04992BC418B6971F00A6C22B /* SearchThumbUrlsOp.m in Sources */ = 
{isa = PBXBuildFile; fileRef = 04992BC318B6971F00A6C22B /* SearchThumbUrlsOp.m 
*/; };
@@ -319,6 +320,8 @@
0493C2D219525F8E00EBB973 /* WikiGlyph_Chars_iOS.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
WikiGlyph_Chars_iOS.h; sourceTree = ""; };
0493C2D319526A0100EBB973 /* WikiFont-Glyphs.ttf */ = {isa = 
PBXFileReference; lastKnownFileType = file; path = "WikiFont-Glyphs.ttf"; 
sourceTree = ""; };
0493C2D519526FFE00EBB973 /* WikiFont-Glyphs-iOS.ttf */ = {isa = 
PBXFileReference; lastKnownFileType = file; path = "WikiFont-Glyphs-iOS.ttf"; 
sourceTree = ""; };
+   0493C2CA1952373100EBB973 /* CoreDataHousekeeping.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
CoreDataHousekeeping.h; sourceTree = ""; };
+   0493C2CB1952373100EBB973 /* CoreDataHousekeeping.m */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path 
= CoreDataHousekeeping.m; sourceTree = ""; };
049566C018F5F4CB0058EA12 /* ZeroConfigState.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
ZeroConfigState.h; sourceTree = ""; };
049566C118F5F4CB0058EA12 /* ZeroConfigState.m */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path 
= ZeroConfigState.m; sourceTree = ""; };
04992BBE18B687AF00A6C22B /* SearchOp.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
SearchOp.h; sourceTree = ""; };
@@ -920,6 +923,15 @@
path = PaddedLabel;
sourceTree = "";
};
+   0493C2C91952373100EBB973 /* Housekeeping */ = {
+   isa = PBXGroup;
+   children = (
+   0493C2CA1952373100EBB973 /* 
CoreDataHousekeeping.h */,
+   0493C2CB1952373100EBB973 /* 
CoreDataHousekeeping.m */,
+   );
+   path = Housekeeping;
+   sourceTree = "";
+   };
049566BF18F5F4CB0058EA12 /* Zero */ = {
isa = PBXGroup;
children = (
@@ -1372,6 +1384,7 @@
D4B0ADFF19365F4600F0AC90 /* EventLogging */,
0442F57C1900718600F55DF9 /* Fonts */,
04D34DA31863D2D600610A87 /* HTML Parsing */,
+   0493C2C91952373100EBB973 /* Housekeeping */,
0466F44C183A30CC00EA1FD7 /* Images */,
0463639518A844380049EE4F /* Keychain */,
04B60509193522650007185A /* MenuButton */

[MediaWiki-commits] [Gerrit] Slight increase to canned edit summary button height. - change (apps...wikipedia)

2014-06-19 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Slight increase to canned edit summary button height.
..


Slight increase to canned edit summary button height.

Deleted cruft font.

Progressive text buttons bold text per Jared.

Change-Id: Id15670a702cda22fb87167ac6305ece206a26d8d
---
D wikipedia/Fonts/WikiFont-iOS.ttf
M wikipedia/MenuButton/MenuButton.h
M wikipedia/MenuButton/MenuButton.m
M wikipedia/MenuLabel/MenuLabel.h
M wikipedia/MenuLabel/MenuLabel.m
M wikipedia/View Controllers/Navigation/Top/TopMenuViewController.m
M wikipedia/View Controllers/Preview/PreviewAndSaveViewController.m
7 files changed, 34 insertions(+), 13 deletions(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/wikipedia/Fonts/WikiFont-iOS.ttf b/wikipedia/Fonts/WikiFont-iOS.ttf
deleted file mode 100644
index 7510ba9..000
--- a/wikipedia/Fonts/WikiFont-iOS.ttf
+++ /dev/null
Binary files differ
diff --git a/wikipedia/MenuButton/MenuButton.h 
b/wikipedia/MenuButton/MenuButton.h
index fff2a59..a75b9b8 100755
--- a/wikipedia/MenuButton/MenuButton.h
+++ b/wikipedia/MenuButton/MenuButton.h
@@ -9,6 +9,7 @@
 
 - (instancetype)initWithText: (NSString *)text
 fontSize: (CGFloat)size
+bold: (BOOL)bold
color: (UIColor *)color
  padding: (UIEdgeInsets)padding
   margin: (UIEdgeInsets)margin;
diff --git a/wikipedia/MenuButton/MenuButton.m 
b/wikipedia/MenuButton/MenuButton.m
index 8ecd1f2..f24e407 100755
--- a/wikipedia/MenuButton/MenuButton.m
+++ b/wikipedia/MenuButton/MenuButton.m
@@ -17,6 +17,8 @@
 
 @property (nonatomic) CGFloat fontSize;
 
+@property (nonatomic) BOOL fontBold;
+
 @property (nonatomic) UIEdgeInsets padding;
 
 @property (nonatomic) UIEdgeInsets margin;
@@ -27,16 +29,17 @@
 
 - (instancetype)initWithCoder:(NSCoder *)coder
 {
-return [self initWithText:@"" fontSize:16 color:[UIColor blackColor] 
padding:UIEdgeInsetsZero margin:UIEdgeInsetsZero];
+return [self initWithText:@"" fontSize:16 bold:NO color:[UIColor 
blackColor] padding:UIEdgeInsetsZero margin:UIEdgeInsetsZero];
 }
 
 - (instancetype)init
 {
-return [self initWithText:@"" fontSize:16 color:[UIColor blackColor] 
padding:UIEdgeInsetsZero margin:UIEdgeInsetsZero];
+return [self initWithText:@"" fontSize:16 bold:NO color:[UIColor 
blackColor] padding:UIEdgeInsetsZero margin:UIEdgeInsetsZero];
 }
 
 - (instancetype)initWithText: (NSString *)text
 fontSize: (CGFloat)size
+bold: (BOOL)bold
color: (UIColor *)color
  padding: (UIEdgeInsets)padding
   margin: (UIEdgeInsets)margin
@@ -49,7 +52,8 @@
 self.text = text;
 self.enabled = NO;
 self.clipsToBounds = YES;
-self.label = [[MenuLabel alloc] initWithText:text fontSize:size 
color:color padding:padding];
+self.fontBold = bold;
+self.label = [[MenuLabel alloc] initWithText:text fontSize:size 
bold:bold color:color padding:padding];
 self.color = color;
 self.oldColor = color;
 [self addSubview:self.label];
diff --git a/wikipedia/MenuLabel/MenuLabel.h b/wikipedia/MenuLabel/MenuLabel.h
index cea051b..072f9ea 100755
--- a/wikipedia/MenuLabel/MenuLabel.h
+++ b/wikipedia/MenuLabel/MenuLabel.h
@@ -7,6 +7,7 @@
 
 - (instancetype)initWithText: (NSString *)text
 fontSize: (CGFloat)size
+bold: (BOOL)bold
color: (UIColor *)color
  padding: (UIEdgeInsets)padding;
 
diff --git a/wikipedia/MenuLabel/MenuLabel.m b/wikipedia/MenuLabel/MenuLabel.m
index 7a4d264..e008d52 100755
--- a/wikipedia/MenuLabel/MenuLabel.m
+++ b/wikipedia/MenuLabel/MenuLabel.m
@@ -11,6 +11,8 @@
 
 @property (nonatomic) CGFloat fontSize;
 
+@property (nonatomic) BOOL fontBold;
+
 @property (nonatomic) UIEdgeInsets padding;
 
 @end
@@ -19,16 +21,17 @@
 
 - (instancetype)init
 {
-return [self initWithText:@"" fontSize:16 color:[UIColor blackColor] 
padding:UIEdgeInsetsZero];
+return [self initWithText:@"" fontSize:16 bold:NO color:[UIColor 
blackColor] padding:UIEdgeInsetsZero];
 }
 
 - (instancetype)initWithCoder:(NSCoder *)coder
 {
-return [self initWithText:@"" fontSize:16 color:[UIColor blackColor] 
padding:UIEdgeInsetsZero];
+return [self initWithText:@"" fontSize:16 bold:NO color:[UIColor 
blackColor] padding:UIEdgeInsetsZero];
 }
 
 - (instancetype)initWithText: (NSString *)text
 fontSize: (CGFloat)size
+bold: (BOOL)bold
color: (UIColor *)color
  padding: (UIEdgeInsets)padding
 {
@@ -36,6 +39,7 @@
 if (self) {
 self.translatesAutoresizingMaskIntoConstraints = NO;
 self.padding = padding;
+self.fontBold = bold;

[MediaWiki-commits] [Gerrit] Made login use back arrow if presented in editing workflow. - change (apps...wikipedia)

2014-06-21 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Made login use back arrow if presented in editing workflow.
..


Made login use back arrow if presented in editing workflow.

Account creation uses back arrow if presented in login
workflow.

Save and login workflows now use new check button styling
from mockups.

Change-Id: I9e404f68c3754926d38cb860ecd2fd7b9a3d3f74
---
M wikipedia/MenuLabel/MenuLabel.m
M wikipedia/View Controllers/AccountCreation/AccountCreationViewController.m
M wikipedia/View Controllers/Login/LoginViewController.m
M wikipedia/View Controllers/Navigation/Top/TopMenuViewController.m
M wikipedia/View Controllers/Preview/PreviewAndSaveViewController.m
M wikipedia/View Controllers/WebView/WebViewController.m
6 files changed, 62 insertions(+), 31 deletions(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/wikipedia/MenuLabel/MenuLabel.m b/wikipedia/MenuLabel/MenuLabel.m
index e008d52..1c41045 100755
--- a/wikipedia/MenuLabel/MenuLabel.m
+++ b/wikipedia/MenuLabel/MenuLabel.m
@@ -2,6 +2,7 @@
 //  Copyright (c) 2013 Wikimedia Foundation. Provided under MIT-style license; 
please copy and modify!
 
 #import "MenuLabel.h"
+#import "WikiGlyph_Chars.h"
 
 @interface MenuLabel ()
 
@@ -64,12 +65,24 @@
 -(void)setText:(NSString *)text
 {
 UIFont *font = (self.fontBold) ? [UIFont 
boldSystemFontOfSize:self.fontSize] : [UIFont systemFontOfSize:self.fontSize];
-NSDictionary *attributes =
+
+NSMutableDictionary *attributes =
 @{
   NSFontAttributeName: font,
   NSForegroundColorAttributeName : self.color
-  };
-
+  }.mutableCopy;
+
+// Quick hack to allow WikiGlyph check character buttons.
+// (Would be nice to have a "isWikiGlyph" function which would determine 
if a
+// single character string was a WikiGlyph rather than using 
isEqualToString.)
+if ([text isEqualToString:WIKIGLYPH_TICK]) {
+self.adjustsFontSizeToFitWidth = NO;
+attributes[NSFontAttributeName] = [UIFont 
fontWithName:@"WikiFont-Glyphs" size:self.fontSize];
+NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle 
alloc] init];
+paragraphStyle.alignment = NSTextAlignmentCenter;
+attributes[NSParagraphStyleAttributeName] = paragraphStyle;
+}
+
 self.attributedText =
 [[NSAttributedString alloc] initWithString: text
 attributes: attributes];
diff --git a/wikipedia/View 
Controllers/AccountCreation/AccountCreationViewController.m b/wikipedia/View 
Controllers/AccountCreation/AccountCreationViewController.m
index 718eb99..6c1dea2 100644
--- a/wikipedia/View Controllers/AccountCreation/AccountCreationViewController.m
+++ b/wikipedia/View Controllers/AccountCreation/AccountCreationViewController.m
@@ -115,10 +115,7 @@
 -(void)highlightCheckButton:(BOOL)highlight
 {
 WikiGlyphButton *checkButton = (WikiGlyphButton 
*)[ROOT.topMenuViewController getNavBarItem:NAVBAR_BUTTON_CHECK];
-
-checkButton.backgroundColor = highlight ? WMF_COLOR_BLUE : [UIColor 
clearColor];
-
-checkButton.color = highlight ? [UIColor whiteColor] : [UIColor 
blackColor];
+checkButton.enabled = highlight;
 }
 
 -(void)prepopulateTextFieldsForDebugging
@@ -137,6 +134,8 @@
 ROOT.topMenuViewController.navBarMode = NAVBAR_MODE_DEFAULT;
 
 [self highlightCheckButton:NO];
+
+[self showAlert:@""];
 
 [super viewWillDisappear:animated];
 }
@@ -251,6 +250,7 @@
 case NAVBAR_BUTTON_CHECK:
 [self save];
 break;
+case NAVBAR_BUTTON_X:
 case NAVBAR_BUTTON_ARROW_LEFT:
 [self hide];
 break;
diff --git a/wikipedia/View Controllers/Login/LoginViewController.m 
b/wikipedia/View Controllers/Login/LoginViewController.m
index b25620a..cc123b9 100644
--- a/wikipedia/View Controllers/Login/LoginViewController.m
+++ b/wikipedia/View Controllers/Login/LoginViewController.m
@@ -79,10 +79,7 @@
 -(void)highlightCheckButton:(BOOL)highlight
 {
 WikiGlyphButton *checkButton = (WikiGlyphButton 
*)[ROOT.topMenuViewController getNavBarItem:NAVBAR_BUTTON_CHECK];
-
-checkButton.backgroundColor = highlight ? WMF_COLOR_GREEN : [UIColor 
clearColor];
-
-checkButton.color = highlight ? [UIColor whiteColor] : [UIColor 
blackColor];
+checkButton.enabled = highlight;
 }
 
 // Handle nav bar taps.
diff --git a/wikipedia/View Controllers/Navigation/Top/TopMenuViewController.m 
b/wikipedia/View Controllers/Navigation/Top/TopMenuViewController.m
index 1fac254..defc03e 100644
--- a/wikipedia/View Controllers/Navigation/Top/TopMenuViewController.m
+++ b/wikipedia/View Controllers/Navigation/Top/TopMenuViewController.m
@@ -36,6 +36,7 @@
 #import "UIViewController+StatusBarHeight.h"
 
 #import "MenuButton.h"
+#import "LoginViewController.h"
 
 @interface TopMenuViewController (){
 
@@ -46,7 +47,6 @@
 @property

[MediaWiki-commits] [Gerrit] Update to CSS - change (apps...wikipedia)

2014-06-21 Thread Brion VIBBER (Code Review)
Brion VIBBER has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/141270

Change subject: Update to CSS
..

Update to CSS

Change-Id: Ie5a6d3e45fae45dc21d34b45d67f669854ab910c
---
M wikipedia/assets/abusefilter.css
M wikipedia/assets/preview.css
M wikipedia/assets/styles.css
3 files changed, 15 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia 
refs/changes/70/141270/1

diff --git a/wikipedia/assets/abusefilter.css b/wikipedia/assets/abusefilter.css
index 89b5850..8ddf0bf 100644
--- a/wikipedia/assets/abusefilter.css
+++ b/wikipedia/assets/abusefilter.css
@@ -94,6 +94,11 @@
   -webkit-box-sizing: border-box;
   box-sizing: border-box;
 }
+div#centralNotice {
+  -moz-box-sizing: content-box;
+  -webkit-box-sizing: content-box;
+  box-sizing: content-box;
+}
 button {
   border: none;
   background-color: transparent;
diff --git a/wikipedia/assets/preview.css b/wikipedia/assets/preview.css
index d792df7..cadde49 100644
--- a/wikipedia/assets/preview.css
+++ b/wikipedia/assets/preview.css
@@ -94,6 +94,11 @@
   -webkit-box-sizing: border-box;
   box-sizing: border-box;
 }
+div#centralNotice {
+  -moz-box-sizing: content-box;
+  -webkit-box-sizing: content-box;
+  box-sizing: content-box;
+}
 button {
   border: none;
   background-color: transparent;
diff --git a/wikipedia/assets/styles.css b/wikipedia/assets/styles.css
index 89b5850..8ddf0bf 100644
--- a/wikipedia/assets/styles.css
+++ b/wikipedia/assets/styles.css
@@ -94,6 +94,11 @@
   -webkit-box-sizing: border-box;
   box-sizing: border-box;
 }
+div#centralNotice {
+  -moz-box-sizing: content-box;
+  -webkit-box-sizing: content-box;
+  box-sizing: content-box;
+}
 button {
   border: none;
   background-color: transparent;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie5a6d3e45fae45dc21d34b45d67f669854ab910c
Gerrit-PatchSet: 1
Gerrit-Project: apps/ios/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Brion VIBBER 

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


[MediaWiki-commits] [Gerrit] Cleanup some integer type conversion warnings - change (apps...wikipedia)

2014-06-21 Thread Brion VIBBER (Code Review)
Brion VIBBER has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/141271

Change subject: Cleanup some integer type conversion warnings
..

Cleanup some integer type conversion warnings

* NSInteger is 'int' on 32-bit and 'long' on 64-bit, so there were
  some fun warnings about usage in formatting strings where %d was
  being used when building for 64-bit device
* Some warnings about enum types

Change-Id: I4bea97dc4b80e44ed63336132100ce4440658e0c
---
M wikipedia/Categories/NSString+Extras.m
M wikipedia/Categories/NSString+FormattedAttributedString.m
M wikipedia/Categories/Section+DisplayHtml.m
M wikipedia/View Controllers/ModalOverlay/ModalContentViewController.m
M wikipedia/View Controllers/Navigation/Secondary/SecondaryMenuViewController.m
M wikipedia/View Controllers/WebView/WebViewController.m
6 files changed, 18 insertions(+), 18 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia 
refs/changes/71/141271/1

diff --git a/wikipedia/Categories/NSString+Extras.m 
b/wikipedia/Categories/NSString+Extras.m
index 74fc208..c1c5ed0 100644
--- a/wikipedia/Categories/NSString+Extras.m
+++ b/wikipedia/Categories/NSString+Extras.m
@@ -23,7 +23,7 @@
 }
 
 uint8_t digest[CC_SHA1_DIGEST_LENGTH];
-CC_SHA1(data.bytes, data.length, digest);
+CC_SHA1(data.bytes, (unsigned int)data.length, digest);
 NSMutableString *output = [NSMutableString 
stringWithCapacity:CC_SHA1_DIGEST_LENGTH * 2];
 
 for (int i = 0; i < CC_SHA1_DIGEST_LENGTH; i++)
diff --git a/wikipedia/Categories/NSString+FormattedAttributedString.m 
b/wikipedia/Categories/NSString+FormattedAttributedString.m
index cc320ea..6093dd6 100644
--- a/wikipedia/Categories/NSString+FormattedAttributedString.m
+++ b/wikipedia/Categories/NSString+FormattedAttributedString.m
@@ -15,7 +15,7 @@
 
 for (NSUInteger i = 0; i < substitutionStrings.count; i++) {
 NSRegularExpression *regex =
-[NSRegularExpression regularExpressionWithPattern: [NSString 
stringWithFormat:@"\\$%d+", i + 1]
+[NSRegularExpression regularExpressionWithPattern: [NSString 
stringWithFormat:@"\\$%lu+", (unsigned long)i + 1]
   options: 0
 error: nil];
 NSArray *matches =
diff --git a/wikipedia/Categories/Section+DisplayHtml.m 
b/wikipedia/Categories/Section+DisplayHtml.m
index 854963a..318b1e7 100644
--- a/wikipedia/Categories/Section+DisplayHtml.m
+++ b/wikipedia/Categories/Section+DisplayHtml.m
@@ -13,16 +13,16 @@
 
 return
 [NSString stringWithFormat:@"\
-\
+\
 %@\
-\
+\
 %@\
 \
 \
  ",
- self.sectionId.integerValue,
+ (long)self.sectionId.integerValue,
  (isMainPage ? @"" : [self getHeaderTag:isMainPage]),
- self.sectionId.integerValue,
+ (long)self.sectionId.integerValue,
  self.html
  ];
 }
@@ -39,17 +39,17 @@
 
 return
 [NSString stringWithFormat:@"\
-\
+\
 %@\
 %@\
-\
+\
 ",
-headingTagSize,
-self.sectionId.integerValue,
+(long)headingTagSize,
+(long)self.sectionId.integerValue,
 self.anchor,
 title,
 pencilAnchor,
-headingTagSize
+(long)headingTagSize
 ];
 }
 
@@ -78,8 +78,8 @@
 -(NSString *)getEditPencilAnchor
 {
 return [NSString stringWithFormat:
-@"",
-self.sectionId.integerValue];
+@"",
+(long)self.sectionId.integerValue];
 }
 
 @end
diff --git a/wikipedia/View 
Controllers/ModalOverlay/ModalContentViewController.m b/wikipedia/View 
Controllers/ModalOverlay/ModalContentViewController.m
index 124c413..9e2862b 100644
--- a/wikipedia/View Controllers/ModalOverlay/ModalContentViewController.m
+++ b/wikipedia/View Controllers/ModalOverlay/ModalContentViewController.m
@@ -64,7 +64,7 @@
 [invocation invoke];
 NSUInteger destNavBarMode;
 [invocation getReturnValue:&destNavBarMode];
-self.navBarMode = destNavBarMode;
+self.navBarMode = (NavBarMode)destNavBarMode;
 }
 
 selector = NSSelectorFromString(@"navBarStyle");
@@ -76,7 +76,7 @@
 [invocation invoke];
 NSUInteger destNavBarStyle;
 [invocation getReturnValue:&destNavBarStyle];
-self.navBarStyle = destNavBarStyle;
+self.navBarStyle = (NavBarStyle)destNavBarStyle;
 }
 }
 
diff --git a/wikipedia/View 
Controllers/Navigation/Secondary/SecondaryMenuViewController.m b/wikipedia/View 
Controllers/Navigation/Secondary/SecondaryMenuViewController.m
index 0e1963f..27b2e56 100644
--- a/wikipedia/View 
Controllers/Navigation/Secondary/SecondaryMenuViewController.m
+++ b/wikipedia/View 
Controllers/Navigation/Secondary/SecondaryMenuViewController.m
@@ -195,7 +195,7 @@
 
 -(SecondaryMenuRowIndex)getIndexOfRow:(NSDictio

[MediaWiki-commits] [Gerrit] Use the updated method for ReadingActionFunnel (alt event lo... - change (apps...wikipedia)

2014-06-21 Thread Brion VIBBER (Code Review)
Brion VIBBER has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/141274

Change subject: Use the updated method for ReadingActionFunnel (alt event 
logging)
..

Use the updated method for ReadingActionFunnel (alt event logging)

Change-Id: I0ec7448ad9d9c6dfcacdb9d9040d4f1195820d0a
---
M wikipedia/Data/Operations/DownloadSectionsOp.m
M wikipedia/EventLogging/ReadingActionFunnel.h
2 files changed, 8 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia 
refs/changes/74/141274/1

diff --git a/wikipedia/Data/Operations/DownloadSectionsOp.m 
b/wikipedia/Data/Operations/DownloadSectionsOp.m
index ff98fde..2d35e3d 100644
--- a/wikipedia/Data/Operations/DownloadSectionsOp.m
+++ b/wikipedia/Data/Operations/DownloadSectionsOp.m
@@ -7,7 +7,7 @@
 #import "NSURLRequest+DictionaryRequest.h"
 #import "NSString+Extras.h"
 #import "NSObject+Extras.h"
-
+#import "ReadingActionFunnel.h"
 
 @implementation DownloadSectionsOp
 
@@ -42,6 +42,9 @@
 //(if there's more than a single section).
 
 params[@"sections"] = @"0";
+
+ReadingActionFunnel *funnel = [[ReadingActionFunnel alloc] init];
+params[@"appInstallID"] = funnel.appInstallID;
 }
 
 self.request = [NSURLRequest getRequestWithURL: [[SessionSingleton 
sharedInstance] urlForDomain:domain]
diff --git a/wikipedia/EventLogging/ReadingActionFunnel.h 
b/wikipedia/EventLogging/ReadingActionFunnel.h
index fea0c76..c0123ad 100644
--- a/wikipedia/EventLogging/ReadingActionFunnel.h
+++ b/wikipedia/EventLogging/ReadingActionFunnel.h
@@ -12,6 +12,10 @@
 
 @property NSString *appInstallID;
 
+/**
+ * Note this method is not actually used; the appInstallID key is instead
+ * sent with the 'action=mobileview' API request on a fresh page read.
+ */
 -(void)logSomethingHappened;
 
 @end

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0ec7448ad9d9c6dfcacdb9d9040d4f1195820d0a
Gerrit-PatchSet: 1
Gerrit-Project: apps/ios/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Brion VIBBER 

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


[MediaWiki-commits] [Gerrit] Update to CSS - change (apps...wikipedia)

2014-06-22 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Update to CSS
..


Update to CSS

Change-Id: Ie5a6d3e45fae45dc21d34b45d67f669854ab910c
---
M wikipedia/assets/abusefilter.css
M wikipedia/assets/preview.css
M wikipedia/assets/styles.css
3 files changed, 15 insertions(+), 0 deletions(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/wikipedia/assets/abusefilter.css b/wikipedia/assets/abusefilter.css
index 89b5850..8ddf0bf 100644
--- a/wikipedia/assets/abusefilter.css
+++ b/wikipedia/assets/abusefilter.css
@@ -94,6 +94,11 @@
   -webkit-box-sizing: border-box;
   box-sizing: border-box;
 }
+div#centralNotice {
+  -moz-box-sizing: content-box;
+  -webkit-box-sizing: content-box;
+  box-sizing: content-box;
+}
 button {
   border: none;
   background-color: transparent;
diff --git a/wikipedia/assets/preview.css b/wikipedia/assets/preview.css
index d792df7..cadde49 100644
--- a/wikipedia/assets/preview.css
+++ b/wikipedia/assets/preview.css
@@ -94,6 +94,11 @@
   -webkit-box-sizing: border-box;
   box-sizing: border-box;
 }
+div#centralNotice {
+  -moz-box-sizing: content-box;
+  -webkit-box-sizing: content-box;
+  box-sizing: content-box;
+}
 button {
   border: none;
   background-color: transparent;
diff --git a/wikipedia/assets/styles.css b/wikipedia/assets/styles.css
index 89b5850..8ddf0bf 100644
--- a/wikipedia/assets/styles.css
+++ b/wikipedia/assets/styles.css
@@ -94,6 +94,11 @@
   -webkit-box-sizing: border-box;
   box-sizing: border-box;
 }
+div#centralNotice {
+  -moz-box-sizing: content-box;
+  -webkit-box-sizing: content-box;
+  box-sizing: content-box;
+}
 button {
   border: none;
   background-color: transparent;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie5a6d3e45fae45dc21d34b45d67f669854ab910c
Gerrit-PatchSet: 1
Gerrit-Project: apps/ios/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Brion VIBBER 
Gerrit-Reviewer: Brion VIBBER 

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


[MediaWiki-commits] [Gerrit] Automatically run "npm install" when building the app - change (apps...wikipedia)

2014-06-22 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Automatically run "npm install" when building the app
..


Automatically run "npm install" when building the app

Otherwise, grunt will exit with a non-helpful error message. After
the first run, npm won't do anything.

Also document that nodejs/npm are required to build.

Change-Id: Ic3f3039856ec6642b8077912be9fad9a61992ddf
---
M README.md
M scripts/run-grunt.sh
2 files changed, 2 insertions(+), 0 deletions(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/README.md b/README.md
index 7d56763..704acd6 100644
--- a/README.md
+++ b/README.md
@@ -24,6 +24,7 @@
 
 Note that due to Apple's restrictions on iOS app installation, to run a custom 
build on a standard iOS device you must pay for a [developer account with 
Apple](https://developer.apple.com/devcenter/ios/index.action) and register the 
device with your account.
 
+You'll also need to install [nodejs](http://nodejs.org/) and npm.
 
 # Running tests
 
diff --git a/scripts/run-grunt.sh b/scripts/run-grunt.sh
index 01f45a2..be5a9ce 100755
--- a/scripts/run-grunt.sh
+++ b/scripts/run-grunt.sh
@@ -3,6 +3,7 @@
 PATH=${PATH}:/usr/local/bin
 
 cd "www/" && {
+npm install
 grunt
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic3f3039856ec6642b8077912be9fad9a61992ddf
Gerrit-PatchSet: 1
Gerrit-Project: apps/ios/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Mhurd 

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


[MediaWiki-commits] [Gerrit] Use the updated method for ReadingActionFunnel (alt event lo... - change (apps...wikipedia)

2014-06-22 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Use the updated method for ReadingActionFunnel (alt event 
logging)
..


Use the updated method for ReadingActionFunnel (alt event logging)

Change-Id: I0ec7448ad9d9c6dfcacdb9d9040d4f1195820d0a
---
M wikipedia/Data/Operations/DownloadSectionsOp.m
M wikipedia/EventLogging/ReadingActionFunnel.h
2 files changed, 8 insertions(+), 1 deletion(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/wikipedia/Data/Operations/DownloadSectionsOp.m 
b/wikipedia/Data/Operations/DownloadSectionsOp.m
index ff98fde..2d35e3d 100644
--- a/wikipedia/Data/Operations/DownloadSectionsOp.m
+++ b/wikipedia/Data/Operations/DownloadSectionsOp.m
@@ -7,7 +7,7 @@
 #import "NSURLRequest+DictionaryRequest.h"
 #import "NSString+Extras.h"
 #import "NSObject+Extras.h"
-
+#import "ReadingActionFunnel.h"
 
 @implementation DownloadSectionsOp
 
@@ -42,6 +42,9 @@
 //(if there's more than a single section).
 
 params[@"sections"] = @"0";
+
+ReadingActionFunnel *funnel = [[ReadingActionFunnel alloc] init];
+params[@"appInstallID"] = funnel.appInstallID;
 }
 
 self.request = [NSURLRequest getRequestWithURL: [[SessionSingleton 
sharedInstance] urlForDomain:domain]
diff --git a/wikipedia/EventLogging/ReadingActionFunnel.h 
b/wikipedia/EventLogging/ReadingActionFunnel.h
index fea0c76..c0123ad 100644
--- a/wikipedia/EventLogging/ReadingActionFunnel.h
+++ b/wikipedia/EventLogging/ReadingActionFunnel.h
@@ -12,6 +12,10 @@
 
 @property NSString *appInstallID;
 
+/**
+ * Note this method is not actually used; the appInstallID key is instead
+ * sent with the 'action=mobileview' API request on a fresh page read.
+ */
 -(void)logSomethingHappened;
 
 @end

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0ec7448ad9d9c6dfcacdb9d9040d4f1195820d0a
Gerrit-PatchSet: 1
Gerrit-Project: apps/ios/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Brion VIBBER 
Gerrit-Reviewer: Brion VIBBER 

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


[MediaWiki-commits] [Gerrit] Cleanup some integer type conversion warnings - change (apps...wikipedia)

2014-06-22 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Cleanup some integer type conversion warnings
..


Cleanup some integer type conversion warnings

* NSInteger is 'int' on 32-bit and 'long' on 64-bit, so there were
  some fun warnings about usage in formatting strings where %d was
  being used when building for 64-bit device
* Some warnings about enum types

Change-Id: I4bea97dc4b80e44ed63336132100ce4440658e0c
---
M wikipedia/Categories/NSString+Extras.m
M wikipedia/Categories/NSString+FormattedAttributedString.m
M wikipedia/Categories/Section+DisplayHtml.m
M wikipedia/View Controllers/ModalOverlay/ModalContentViewController.m
M wikipedia/View Controllers/Navigation/Secondary/SecondaryMenuViewController.m
M wikipedia/View Controllers/WebView/WebViewController.m
6 files changed, 18 insertions(+), 18 deletions(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/wikipedia/Categories/NSString+Extras.m 
b/wikipedia/Categories/NSString+Extras.m
index 74fc208..c1c5ed0 100644
--- a/wikipedia/Categories/NSString+Extras.m
+++ b/wikipedia/Categories/NSString+Extras.m
@@ -23,7 +23,7 @@
 }
 
 uint8_t digest[CC_SHA1_DIGEST_LENGTH];
-CC_SHA1(data.bytes, data.length, digest);
+CC_SHA1(data.bytes, (unsigned int)data.length, digest);
 NSMutableString *output = [NSMutableString 
stringWithCapacity:CC_SHA1_DIGEST_LENGTH * 2];
 
 for (int i = 0; i < CC_SHA1_DIGEST_LENGTH; i++)
diff --git a/wikipedia/Categories/NSString+FormattedAttributedString.m 
b/wikipedia/Categories/NSString+FormattedAttributedString.m
index cc320ea..6093dd6 100644
--- a/wikipedia/Categories/NSString+FormattedAttributedString.m
+++ b/wikipedia/Categories/NSString+FormattedAttributedString.m
@@ -15,7 +15,7 @@
 
 for (NSUInteger i = 0; i < substitutionStrings.count; i++) {
 NSRegularExpression *regex =
-[NSRegularExpression regularExpressionWithPattern: [NSString 
stringWithFormat:@"\\$%d+", i + 1]
+[NSRegularExpression regularExpressionWithPattern: [NSString 
stringWithFormat:@"\\$%lu+", (unsigned long)i + 1]
   options: 0
 error: nil];
 NSArray *matches =
diff --git a/wikipedia/Categories/Section+DisplayHtml.m 
b/wikipedia/Categories/Section+DisplayHtml.m
index 854963a..318b1e7 100644
--- a/wikipedia/Categories/Section+DisplayHtml.m
+++ b/wikipedia/Categories/Section+DisplayHtml.m
@@ -13,16 +13,16 @@
 
 return
 [NSString stringWithFormat:@"\
-\
+\
 %@\
-\
+\
 %@\
 \
 \
  ",
- self.sectionId.integerValue,
+ (long)self.sectionId.integerValue,
  (isMainPage ? @"" : [self getHeaderTag:isMainPage]),
- self.sectionId.integerValue,
+ (long)self.sectionId.integerValue,
  self.html
  ];
 }
@@ -39,17 +39,17 @@
 
 return
 [NSString stringWithFormat:@"\
-\
+\
 %@\
 %@\
-\
+\
 ",
-headingTagSize,
-self.sectionId.integerValue,
+(long)headingTagSize,
+(long)self.sectionId.integerValue,
 self.anchor,
 title,
 pencilAnchor,
-headingTagSize
+(long)headingTagSize
 ];
 }
 
@@ -78,8 +78,8 @@
 -(NSString *)getEditPencilAnchor
 {
 return [NSString stringWithFormat:
-@"",
-self.sectionId.integerValue];
+@"",
+(long)self.sectionId.integerValue];
 }
 
 @end
diff --git a/wikipedia/View 
Controllers/ModalOverlay/ModalContentViewController.m b/wikipedia/View 
Controllers/ModalOverlay/ModalContentViewController.m
index 124c413..9e2862b 100644
--- a/wikipedia/View Controllers/ModalOverlay/ModalContentViewController.m
+++ b/wikipedia/View Controllers/ModalOverlay/ModalContentViewController.m
@@ -64,7 +64,7 @@
 [invocation invoke];
 NSUInteger destNavBarMode;
 [invocation getReturnValue:&destNavBarMode];
-self.navBarMode = destNavBarMode;
+self.navBarMode = (NavBarMode)destNavBarMode;
 }
 
 selector = NSSelectorFromString(@"navBarStyle");
@@ -76,7 +76,7 @@
 [invocation invoke];
 NSUInteger destNavBarStyle;
 [invocation getReturnValue:&destNavBarStyle];
-self.navBarStyle = destNavBarStyle;
+self.navBarStyle = (NavBarStyle)destNavBarStyle;
 }
 }
 
diff --git a/wikipedia/View 
Controllers/Navigation/Secondary/SecondaryMenuViewController.m b/wikipedia/View 
Controllers/Navigation/Secondary/SecondaryMenuViewController.m
index 0e1963f..27b2e56 100644
--- a/wikipedia/View 
Controllers/Navigation/Secondary/SecondaryMenuViewController.m
+++ b/wikipedia/View 
Controllers/Navigation/Secondary/SecondaryMenuViewController.m
@@ -195,7 +195,7 @@
 
 -(SecondaryMenuRowIndex)getIndexOfRow:(NSDictionary *)row
 {
-return ((NSNumber *)row[@"tag"]).integ

[MediaWiki-commits] [Gerrit] Fix for missing revision ID in save event logging - change (apps...wikipedia)

2014-06-22 Thread Brion VIBBER (Code Review)
Brion VIBBER has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/141363

Change subject: Fix for missing revision ID in save event logging
..

Fix for missing revision ID in save event logging

Change-Id: I2fe7c82e1b078dc875d6f33f8e854f02a1868613
---
M wikipedia/Data/Operations/UploadSectionWikiTextOp.h
M wikipedia/Data/Operations/UploadSectionWikiTextOp.m
M wikipedia/View Controllers/Preview/PreviewAndSaveViewController.m
3 files changed, 8 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia 
refs/changes/63/141363/1

diff --git a/wikipedia/Data/Operations/UploadSectionWikiTextOp.h 
b/wikipedia/Data/Operations/UploadSectionWikiTextOp.h
index 332e7da..4a52b96 100644
--- a/wikipedia/Data/Operations/UploadSectionWikiTextOp.h
+++ b/wikipedia/Data/Operations/UploadSectionWikiTextOp.h
@@ -24,7 +24,7 @@
summary: (NSString *)summary
  captchaId: (NSString *)captchaId
captchaWord: (NSString *)captchaWord
-   completionBlock: (void (^)(NSString *))completionBlock
+   completionBlock: (void (^)(NSDictionary *))completionBlock
 cancelledBlock: (void (^)(NSError *))cancelledBlock
 errorBlock: (void (^)(NSError *))errorBlock
 ;
diff --git a/wikipedia/Data/Operations/UploadSectionWikiTextOp.m 
b/wikipedia/Data/Operations/UploadSectionWikiTextOp.m
index 2c1d68a..1d60265 100644
--- a/wikipedia/Data/Operations/UploadSectionWikiTextOp.m
+++ b/wikipedia/Data/Operations/UploadSectionWikiTextOp.m
@@ -16,7 +16,7 @@
summary: (NSString *)summary
  captchaId: (NSString *)captchaId
captchaWord: (NSString *)captchaWord
-   completionBlock: (void (^)(NSString *))completionBlock
+   completionBlock: (void (^)(NSDictionary *))completionBlock
 cancelledBlock: (void (^)(NSError *))cancelledBlock
 errorBlock: (void (^)(NSError *))errorBlock
 {
@@ -73,7 +73,8 @@
 weakSelf.error = [NSError errorWithDomain:@"Upload Wikitext 
Op" code:WIKITEXT_UPLOAD_ERROR_SERVER userInfo:errorDict];
 }
  
-NSString *result = weakSelf.jsonRetrieved[@"edit"][@"result"];
+NSDictionary *resultDict = weakSelf.jsonRetrieved[@"edit"];
+NSString *result = resultDict[@"result"];
 
 if (!weakSelf.error && !result) {
 NSMutableDictionary *errorDict = [@{} mutableCopy];
@@ -142,7 +143,7 @@
 return;
 }
 
-completionBlock(result);
+completionBlock(resultDict);
 };
 }
 return self;
diff --git a/wikipedia/View Controllers/Preview/PreviewAndSaveViewController.m 
b/wikipedia/View Controllers/Preview/PreviewAndSaveViewController.m
index 1dcc846..43bb260 100644
--- a/wikipedia/View Controllers/Preview/PreviewAndSaveViewController.m
+++ b/wikipedia/View Controllers/Preview/PreviewAndSaveViewController.m
@@ -484,11 +484,12 @@
 NSString *title = section.fromTitle ? section.fromTitle : 
section.article.title;
 
 UploadSectionWikiTextOp *uploadWikiTextOp =
-[[UploadSectionWikiTextOp alloc] initForPageTitle:title 
domain:section.article.domain section:section.index wikiText:self.wikiText 
summary:editSummary captchaId:self.captchaId 
captchaWord:self.captchaViewController.captchaTextBox.text  
completionBlock:^(NSString *result){
+[[UploadSectionWikiTextOp alloc] initForPageTitle:title 
domain:section.article.domain section:section.index wikiText:self.wikiText 
summary:editSummary captchaId:self.captchaId 
captchaWord:self.captchaViewController.captchaTextBox.text  
completionBlock:^(NSDictionary *resultDict){
 
+[self.funnel logSavedRevision:[resultDict[@"newrevid"] intValue]];
+
 // Mark article for refreshing and reload it.
 if (articleID) {
-[self.funnel logSavedRevision:0]; // @fixme need revision ID
 [[NSOperationQueue mainQueue] addOperationWithBlock: ^ {
 WebViewController *webVC = [self.navigationController 
searchNavStackForViewControllerOfClass:[WebViewController class]];
 [webVC reloadCurrentArticleInvalidatingCache:YES];

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2fe7c82e1b078dc875d6f33f8e854f02a1868613
Gerrit-PatchSet: 1
Gerrit-Project: apps/ios/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Brion VIBBER 

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


[MediaWiki-commits] [Gerrit] Fix for missing revision ID in save event logging - change (apps...wikipedia)

2014-06-22 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Fix for missing revision ID in save event logging
..


Fix for missing revision ID in save event logging

Change-Id: I2fe7c82e1b078dc875d6f33f8e854f02a1868613
---
M wikipedia/Data/Operations/UploadSectionWikiTextOp.h
M wikipedia/Data/Operations/UploadSectionWikiTextOp.m
M wikipedia/View Controllers/Preview/PreviewAndSaveViewController.m
3 files changed, 8 insertions(+), 6 deletions(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/wikipedia/Data/Operations/UploadSectionWikiTextOp.h 
b/wikipedia/Data/Operations/UploadSectionWikiTextOp.h
index 332e7da..4a52b96 100644
--- a/wikipedia/Data/Operations/UploadSectionWikiTextOp.h
+++ b/wikipedia/Data/Operations/UploadSectionWikiTextOp.h
@@ -24,7 +24,7 @@
summary: (NSString *)summary
  captchaId: (NSString *)captchaId
captchaWord: (NSString *)captchaWord
-   completionBlock: (void (^)(NSString *))completionBlock
+   completionBlock: (void (^)(NSDictionary *))completionBlock
 cancelledBlock: (void (^)(NSError *))cancelledBlock
 errorBlock: (void (^)(NSError *))errorBlock
 ;
diff --git a/wikipedia/Data/Operations/UploadSectionWikiTextOp.m 
b/wikipedia/Data/Operations/UploadSectionWikiTextOp.m
index 2c1d68a..1d60265 100644
--- a/wikipedia/Data/Operations/UploadSectionWikiTextOp.m
+++ b/wikipedia/Data/Operations/UploadSectionWikiTextOp.m
@@ -16,7 +16,7 @@
summary: (NSString *)summary
  captchaId: (NSString *)captchaId
captchaWord: (NSString *)captchaWord
-   completionBlock: (void (^)(NSString *))completionBlock
+   completionBlock: (void (^)(NSDictionary *))completionBlock
 cancelledBlock: (void (^)(NSError *))cancelledBlock
 errorBlock: (void (^)(NSError *))errorBlock
 {
@@ -73,7 +73,8 @@
 weakSelf.error = [NSError errorWithDomain:@"Upload Wikitext 
Op" code:WIKITEXT_UPLOAD_ERROR_SERVER userInfo:errorDict];
 }
  
-NSString *result = weakSelf.jsonRetrieved[@"edit"][@"result"];
+NSDictionary *resultDict = weakSelf.jsonRetrieved[@"edit"];
+NSString *result = resultDict[@"result"];
 
 if (!weakSelf.error && !result) {
 NSMutableDictionary *errorDict = [@{} mutableCopy];
@@ -142,7 +143,7 @@
 return;
 }
 
-completionBlock(result);
+completionBlock(resultDict);
 };
 }
 return self;
diff --git a/wikipedia/View Controllers/Preview/PreviewAndSaveViewController.m 
b/wikipedia/View Controllers/Preview/PreviewAndSaveViewController.m
index 1dcc846..43bb260 100644
--- a/wikipedia/View Controllers/Preview/PreviewAndSaveViewController.m
+++ b/wikipedia/View Controllers/Preview/PreviewAndSaveViewController.m
@@ -484,11 +484,12 @@
 NSString *title = section.fromTitle ? section.fromTitle : 
section.article.title;
 
 UploadSectionWikiTextOp *uploadWikiTextOp =
-[[UploadSectionWikiTextOp alloc] initForPageTitle:title 
domain:section.article.domain section:section.index wikiText:self.wikiText 
summary:editSummary captchaId:self.captchaId 
captchaWord:self.captchaViewController.captchaTextBox.text  
completionBlock:^(NSString *result){
+[[UploadSectionWikiTextOp alloc] initForPageTitle:title 
domain:section.article.domain section:section.index wikiText:self.wikiText 
summary:editSummary captchaId:self.captchaId 
captchaWord:self.captchaViewController.captchaTextBox.text  
completionBlock:^(NSDictionary *resultDict){
 
+[self.funnel logSavedRevision:[resultDict[@"newrevid"] intValue]];
+
 // Mark article for refreshing and reload it.
 if (articleID) {
-[self.funnel logSavedRevision:0]; // @fixme need revision ID
 [[NSOperationQueue mainQueue] addOperationWithBlock: ^ {
 WebViewController *webVC = [self.navigationController 
searchNavStackForViewControllerOfClass:[WebViewController class]];
 [webVC reloadCurrentArticleInvalidatingCache:YES];

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2fe7c82e1b078dc875d6f33f8e854f02a1868613
Gerrit-PatchSet: 1
Gerrit-Project: apps/ios/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Brion VIBBER 
Gerrit-Reviewer: Brion VIBBER 

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


[MediaWiki-commits] [Gerrit] Work in progress: fix for linking to pages with fragments - change (apps...wikipedia)

2014-06-22 Thread Brion VIBBER (Code Review)
Brion VIBBER has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/141365

Change subject: Work in progress: fix for linking to pages with fragments
..

Work in progress: fix for linking to pages with fragments

* updates MWPageTitle class a bit, which wasn't previously used
* sticks it in the middle of link handling briefly to remove the fragment

todo:
* fix some methods to take MWPageTitle instead of string directly
* handle jumping to the fragment-specific section on page load

todo later:
* figure out if/how to handle namespacing

Change-Id: Ib203d62ab2499cceaa72604285751b7f93460afc
---
M wikipedia/View Controllers/WebView/WebViewController.m
M wikipedia/mw-support/MWPageTitle.h
M wikipedia/mw-support/MWPageTitle.m
M wikipedia/mw-support/MWSite.m
4 files changed, 118 insertions(+), 25 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia 
refs/changes/65/141365/1

diff --git a/wikipedia/View Controllers/WebView/WebViewController.m 
b/wikipedia/View Controllers/WebView/WebViewController.m
index 9cbe0f6..af694fa 100644
--- a/wikipedia/View Controllers/WebView/WebViewController.m
+++ b/wikipedia/View Controllers/WebView/WebViewController.m
@@ -18,6 +18,7 @@
 #import "MWLanguageInfo.h"
 #import "CenterNavController.h"
 #import "Defines.h"
+#import "MWPageTitle.h"
 
 #import "UIViewController+SearchChildViewControllers.h"
 #import "NSManagedObjectContext+SimpleFetch.h"
@@ -818,8 +819,9 @@
 
 if ([href hasPrefix:@"/wiki/"]) {
 NSString *title = [href substringWithRange:NSMakeRange(6, 
href.length - 6)];
+MWPageTitle *pageTitle = [MWPageTitle titleWithString:title];
 
-[weakSelf navigateToPage: title
+[weakSelf navigateToPage: pageTitle.prefixedText
   domain: [SessionSingleton 
sharedInstance].currentArticleDomain
  discoveryMethod: DISCOVERY_METHOD_LINK
invalidatingCache: NO];
diff --git a/wikipedia/mw-support/MWPageTitle.h 
b/wikipedia/mw-support/MWPageTitle.h
index 17e7929..2f8747a 100644
--- a/wikipedia/mw-support/MWPageTitle.h
+++ b/wikipedia/mw-support/MWPageTitle.h
@@ -5,12 +5,64 @@
 
 @interface MWPageTitle : NSObject
 
-+(MWPageTitle *)titleFromNamespace:(NSString *)namespace text:(NSString *)text;
+/**
+ * Initialize a new MWPageTitle object from string input
+ */
+-(id)initWithString:(NSString *)str;
 
--(id)initFromNamespace:(NSString *)namespace text:(NSString *)text;
+/**
+ * Create a new MWPageTitle object from string input
+ */
++(MWPageTitle *)titleWithString:(NSString *)str;
 
--(NSString *)namespace;
--(NSString *)text;
--(NSString *)prefixedText;
+/**
+ * Normalize a title string portion to text form
+ */
++(NSString *)normalize:(NSString *)str;
+
+
+/**
+ * Normalized namespace (decoded, no underscores)
+ * Warning: not implemented yet
+ */
+@property (readonly) NSString *namespace;
+
+/**
+ * Normalized title component only (decoded, no underscores)
+ */
+@property (readonly) NSString *text;
+
+/**
+ * Fragment (component after the '#')
+ * Warning: fragment may be nil!
+ */
+@property (readonly) NSString *fragment;
+
+
+/**
+ * Full text-normalized namespace+title
+ * Decoded, with spaces
+ */
+@property (readonly) NSString *prefixedText;
+
+/**
+ * Full DB-normalized namespace+title
+ * Decoded, with underscores
+ */
+@property (readonly) NSString *prefixedDBKey;
+
+/**
+ * Full URL-normalized namespace+title
+ * Encoded, with underscores
+ */
+@property (readonly) NSString *prefixedURL;
+
+/**
+ * URL-normalized fragment, including the # if applicable
+ * Always returns a string, may be empty string.
+ */
+@property (readonly) NSString *fragmentForURL;
+
+
 
 @end
diff --git a/wikipedia/mw-support/MWPageTitle.m 
b/wikipedia/mw-support/MWPageTitle.m
index f92e9f8..deb2aa0 100644
--- a/wikipedia/mw-support/MWPageTitle.m
+++ b/wikipedia/mw-support/MWPageTitle.m
@@ -2,30 +2,50 @@
 //  Copyright (c) 2013 Wikimedia Foundation. Provided under MIT-style license; 
please copy and modify!
 
 #import "MWPageTitle.h"
+#import "NSString+Extras.h"
 
 @implementation MWPageTitle {
-NSString *_namespace;
 NSString *_text;
+NSString *_fragment;
 }
 
-+(MWPageTitle *)titleFromNamespace:(NSString *)namespace text:(NSString *)text
+#pragma mark - Class methods
+
++(MWPageTitle *)titleWithString:(NSString *)str
 {
-return [[MWPageTitle alloc] initFromNamespace:namespace text:text];
+return [[MWPageTitle alloc] initWithString:str];
 }
 
--(id)initFromNamespace:(NSString *)namespace text:(NSString *)text
++(NSString *)normalize:(NSString *)str
+{
+// @todo implement fuller normalization?
+return [str stringByReplacingOccurrencesOfString:@"_" withString:@" "];
+}
+
+#pragma mark - Initializers
+
+-(id)initWithString:(NSString *)str
 {
 self = [self init];
 if (self) {
-_namespace = namespace;
-_text = text;
+N

[MediaWiki-commits] [Gerrit] Manual import of translations from TWN - change (apps...wikipedia)

2014-11-03 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Manual import of translations from TWN
..


Manual import of translations from TWN

Change-Id: Ic407a971c4a83cd578fd4d9a3af131f2343c52aa
---
M wikipedia/da.lproj/Localizable.strings
A wikipedia/km.lproj/InfoPlist.strings
A wikipedia/km.lproj/Localizable.strings
A wikipedia/km.lproj/Main_iPhone.strings
M wikipedia/ko.lproj/Localizable.strings
M wikipedia/nb.lproj/Localizable.strings
M wikipedia/qqq.lproj/Localizable.strings
M wikipedia/sk.lproj/Localizable.strings
M wikipedia/vi.lproj/Localizable.strings
M wikipedia/zh-hans.lproj/Localizable.strings
M wikipedia/zh-hant.lproj/Localizable.strings
11 files changed, 282 insertions(+), 12 deletions(-)

Approvals:
  Brion VIBBER: Looks good to me, approved



diff --git a/wikipedia/da.lproj/Localizable.strings 
b/wikipedia/da.lproj/Localizable.strings
index f3083ad..dbdfbee 100644
--- a/wikipedia/da.lproj/Localizable.strings
+++ b/wikipedia/da.lproj/Localizable.strings
@@ -95,6 +95,7 @@
 "main-menu-send-feedback" = "Send tilbagemelding om app";
 "main-menu-show-page-history" = "Historik over redigeringer af $1";
 "main-menu-credits" = "Krediteringer";
+"main-menu-about" = "Om Wikipedia-appen";
 "main-menu-zero-faq" = "Ofte stillede spørgsmål om Wikipedia Zero";
 "main-menu-privacy-policy" = "Behandling af personlige oplysninger";
 "main-menu-terms-of-use" = "Vilkår for anvendelse";
@@ -142,6 +143,15 @@
 "credits-gerrit-repo" = "App main (Gerrit)";
 "credits-github-mirror" = "App mirror (GitHub)";
 "credits-external-libraries" = "Eksterne arkiver";
+"about-title" = "Om";
+"about-wikipedia" = "Wikipedia";
+"about-contributors" = "bidragsydere";
+"about-translators" = "oversættere";
+"about-translators-details" = "Oversat af frivillige på $1";
+"about-libraries" = "anvendte biblioteker";
+"about-send-feedback" = "Send tilbagemelding om app";
+"about-product-of" = "Et produkt af $1";
+"about-wikimedia-foundation" = "Wikimedia Foundation";
 "share-menu-save-page" = "Gem side";
 "share-menu-page-saved" = "Gemt til læsning offline.";
 "share-menu-page-saved-access" = "Tip: for at få adgang til dine gemte sider, 
tryk på $1 ovenfor eller tryk længe på $2 nedenfor.";
diff --git a/wikipedia/km.lproj/InfoPlist.strings 
b/wikipedia/km.lproj/InfoPlist.strings
new file mode 100644
index 000..adcd3e1
--- /dev/null
+++ b/wikipedia/km.lproj/InfoPlist.strings
@@ -0,0 +1,5 @@
+// Messages for Khmer (ភាសាខ្មែរ)
+// Exported from translatewiki.net
+// Author: គីមស៊្រុន
+
+"CFBundleDisplayName" = "វិគីភីឌា";
diff --git a/wikipedia/km.lproj/Localizable.strings 
b/wikipedia/km.lproj/Localizable.strings
new file mode 100644
index 000..61304e2
--- /dev/null
+++ b/wikipedia/km.lproj/Localizable.strings
@@ -0,0 +1,180 @@
+// Messages for Khmer (ភាសាខ្មែរ)
+// Exported from translatewiki.net
+// Author: គីមស៊្រុន
+
+"article-languages-label" = "ជ្រើសរើសភាសា";
+"article-languages-cancel" = "បោះបង់";
+"article-languages-downloading" = "កំពុងផ្ទុកភាសាអត្ថបទ...";
+"article-languages-filter-placeholder" = "ចម្រោះភាសា";
+"language-button-text" = "អ្នកអាចអានអត្ថបទនេះជាភាសាចំនួន %d ផ្សេងទៀត";
+"history-label" = "ថ្មីៗ";
+"history-section-today" = "ថ្ងៃនេះ";
+"history-section-yesterday" = "ម្សិលមិញ";
+"history-section-lastweek" = "សប្តាហ៍មុន";
+"history-section-lastmonth" = "ខែមុន";
+"history-clear-confirmation-heading" = "លុបរបស់ថ្មីៗទាំងអស់?";
+"history-clear-confirmation-sub-heading" = "សកម្មភាពនេះមិនអាចឈប់ធ្វើវិញបានទេ!";
+"history-clear-cancel" = "បោះបង់";
+"history-clear-delete-all" = "លុបចោលទាំងអស់";
+"zero-webpage-url" = 
"https://wikimediafoundation.org/wiki/Wikipedia_Zero_App_FAQ";;
+"zero-interstitial-title" = "ចាកចេញពីវិគីសូន្យ";
+"zero-interstitial-continue" = "ចាកចេញ";
+"zero-interstitial-cancel" = "មិនចាកចេញ";
+"zero-learn-more-learn-more" = "អានបន្ថែម";
+"zero-learn-more-no-thanks" = "លាក់";
+"zero-wikipedia-zero-heading" = "វិគីភីឌាសូន្យ";
+"zero-warn-when-leaving" = "រំលឹកពេលចង់ចាកចេញពីវិគីសូន្យ";
+"account-creation-captcha-required" = "ត្រូវការផ្ទៀតផ្ទាត់ CAPTCHA";
+"account-creation-captcha-obtaining" = "យក CAPTCHA ថ្មី។";
+"account-creation-logging-in" = "កំពុងកត់ឈ្មោះចូល...";
+"account-creation-passwords-mismatched" = "ពាក្យសម្ងាត់មិនត្រូវគ្នាទេ។";
+"account-creation-saving" = "កំពុង​រក្សា​ទុក...";
+"account-creation-login" = "តើអ្នកមានគណនីមួយរួចហើយឬ? សូមកត់ឈ្មោះចូល។";
+"account-creation-username-placeholder-text" = "អត្តនាម";
+"account-creation-password-placeholder-text" = "ពាក្យ​សម្ងាត់";
+"account-creation-password-confirm-placeholder-text" = "បញ្ជាក់ពាក្យសម្ងាត់";
+"account-creation-email-placeholder-text" = "អ៊ីមែល(ដាក់ក៏បានមិនដាក់ក៏បាន)";
+"login-name-not-found" = "ត្រូវមានអត្តនាមដើម្បីកត់ឈ្មោះចូល។";
+"login-name-illegal" = "អ្នកបានបញ្ចូលអត្តនាមមិនត្រឹមត្រូវ។";
+"login-name-does-not-exist" = "គ្មានអត្តនាមដូចដែលអ្នកបានវាយបញ្ចូលទេ។";
+"login-password-empty" = "ត្រូវមានពាក្យសម្ងាត់ដើម្បីកត់ឈ្មោះចូល។";
+"login-password-wrong" = "

[MediaWiki-commits] [Gerrit] Support colorized zero-rating messaging - change (apps...wikipedia)

2014-11-03 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Support colorized zero-rating messaging
..


Support colorized zero-rating messaging

Allow for a colorized zero-rating "banner" in the Wikipedia
for iOS app. Additionally, make memory warning-based toggle
debugging easier. Previously, only a black-n-white banner.

Change-Id: Ic5bcfe79ab80576316ae31bc09901761a5d377ce
---
M wikipedia/Networking/Fetchers/WikipediaZeroMessageFetcher.m
M wikipedia/View Controllers/WebView/WebViewController.m
2 files changed, 55 insertions(+), 14 deletions(-)

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



diff --git a/wikipedia/Networking/Fetchers/WikipediaZeroMessageFetcher.m 
b/wikipedia/Networking/Fetchers/WikipediaZeroMessageFetcher.m
index 09ebf28..0deb09a 100644
--- a/wikipedia/Networking/Fetchers/WikipediaZeroMessageFetcher.m
+++ b/wikipedia/Networking/Fetchers/WikipediaZeroMessageFetcher.m
@@ -8,6 +8,7 @@
 #import "NSObject+Extras.h"
 #import "Defines.h"
 #import "WikipediaAppUtils.h"
+#import "WMF_Colors.h"
 
 @interface WikipediaZeroMessageFetcher()
 
@@ -42,8 +43,17 @@
 
 [[MWNetworkActivityIndicatorManager sharedManager] pop];
 
-// Fake out an error if non-dictionary response received.
-if(![responseObject isDict]){
+// If we're simulating with memory warnings in WebViewcontroller.m,
+// don't trigger an error for non-dictionary responses, but rather
+// simulate a received message.
+// But if we're not simulating, force an error on non-dictionary 
responses.
+if ([SessionSingleton sharedInstance].zeroConfigState.fakeZeroOn) {
+responseObject = @{
+ @"message": @"Free Wikipedia by Test Operator",
+ @"foreground": @"#00FF00",
+ @"background": @"#ff69b4"
+ };
+} else if (![responseObject isDict]) {
 responseObject = @{@"error": @{@"info": @"Wikipedia Zero message 
not found."}};
 }
 
@@ -59,7 +69,7 @@
 userInfo: errorDict];
 }
 
-NSString *output = @"";
+NSDictionary *output;
 if (!error) {
 output = [self getSanitizedResponse:responseObject];
 }
@@ -88,18 +98,46 @@
  };
 }
 
--(NSString *)getSanitizedResponse:(NSDictionary *)rawResponse
+-(NSDictionary *)getSanitizedResponse:(NSDictionary *)rawResponse
 {
-NSString *zeroRatedMessage = rawResponse.count > 0 ? [rawResponse 
objectForKey:@"message"] : nil;
-
-// For testing Wikipedia Zero visual flourishes.
-// Go to WebViewController.m and uncomment the W0 part,
+// For testing Wikipedia Zero visual flourishes,
+// go to WebViewController.m and uncomment the W0 part,
 // then when running the app in the simulator fire the
 // memory warning to toggle the fake state on or off.
-if ([SessionSingleton sharedInstance].zeroConfigState.fakeZeroOn) {
-zeroRatedMessage = @"Free Wikipedia by Test Operator";
+if (rawResponse.count == 0) {
+return nil;
 }
-return zeroRatedMessage;
+
+NSString *message = rawResponse[@"message"];
+UIColor *foreground = [self 
UIColorFromHexString:rawResponse[@"foreground"]];
+UIColor *background = [self 
UIColorFromHexString:rawResponse[@"background"]];
+
+if (message && foreground && background) {
+return @{
+ @"message": message,
+ @"foreground": foreground,
+ @"background": background
+ };
+}
+return nil;
+}
+
+-(UIColor *)UIColorFromHexString:(NSString*)hexString
+{
+if (hexString && [hexString hasPrefix:@"#"] && hexString.length == 7) {
+@try {
+// Tip from 
https://stackoverflow.com/questions/3010216/how-can-i-convert-rgb-hex-string-into-uicolor-in-objective-c/13648705#13648705
+NSScanner *scanner = [NSScanner scannerWithString:[hexString 
substringWithRange:NSMakeRange(1, 6)]];
+unsigned hex;
+if (![scanner scanHexInt:&hex]) return nil;
+return UIColorFromRGBWithAlpha(hex,1.0);
+}
+
+@catch (NSException *e) {
+return nil;
+}
+}
+return nil;
 }
 
 /*
diff --git a/wikipedia/View Controllers/WebView/WebViewController.m 
b/wikipedia/View Controllers/WebView/WebViewController.m
index 3ef3862..817c85a 100644
--- a/wikipedia/View Controllers/WebView/WebViewController.m
+++ b/wikipedia/View Controllers/WebView/WebViewController.m
@@ -1658,15 +1658,17 @@
 switch (status) {
 case FETCH_FINAL_STATUS_SUCCEEDED:
 {
-NSString *title = (NSString *)userData;
-if (title) {
+NSDictionary *banner = (NSDictionary*)userData;
+if (banner) {
 TopMenuTe

[MediaWiki-commits] [Gerrit] Add The Specialists Guild to the "About the Wikipedia app" page - change (apps...wikipedia)

2014-11-03 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Add The Specialists Guild to the "About the Wikipedia app" page
..


Add The Specialists Guild to the "About the Wikipedia app" page

The Specialists Guild have done some amazing QA work for us, and deserve to be
credited in the About page. This patch does that!

Change-Id: Ib93b8ff363d20a6b4970d6c33d793cb35bbd151d
---
M wikipedia/View Controllers/About/AboutViewController.m
M wikipedia/View Controllers/About/AboutViewController.plist
M wikipedia/assets/about.html
M wikipedia/en.lproj/Localizable.strings
M wikipedia/qqq.lproj/Localizable.strings
M www/about.html
6 files changed, 22 insertions(+), 0 deletions(-)

Approvals:
  Brion VIBBER: Looks good to me, approved



diff --git a/wikipedia/View Controllers/About/AboutViewController.m 
b/wikipedia/View Controllers/About/AboutViewController.m
index d160665..43f7966 100644
--- a/wikipedia/View Controllers/About/AboutViewController.m
+++ b/wikipedia/View Controllers/About/AboutViewController.m
@@ -151,6 +151,7 @@
 setDivHTML(@"contributors_title", MWLocalizedString(@"about-contributors", 
nil));
 setDivHTML(@"contributors_body", self.contributors);
 setDivHTML(@"translators_title", MWLocalizedString(@"about-translators", 
nil));
+setDivHTML(@"testers_title", MWLocalizedString(@"about-testers", nil));
 setDivHTML(@"libraries_title", MWLocalizedString(@"about-libraries", nil));
 setDivHTML(@"libraries_body", self.libraryLinks);
 setDivHTML(@"repositories_title", MWLocalizedString(@"about-repositories", 
nil));
@@ -164,6 +165,13 @@

 withString: translatorsLink];
 setDivHTML(@"translators_body", translatorDetails);
 
+NSString *tsgUrl = self.urls[@"tsg"];
+NSString *tsgLink = [self getLinkHTMLForURL:tsgUrl title:[tsgUrl 
substringFromIndex:7]];
+NSString *tsgDetails =
+[MWLocalizedString(@"about-testers-details", nil) 
stringByReplacingOccurrencesOfString: @"$1"
+   
 withString: tsgLink];
+setDivHTML(@"testers_body", tsgDetails);
+
 NSString *wmfUrl = self.urls[@"wmf"];
 NSString *foundation = [self getLinkHTMLForURL:wmfUrl 
title:MWLocalizedString(@"about-wikimedia-foundation", nil)];
 NSString *footer =
diff --git a/wikipedia/View Controllers/About/AboutViewController.plist 
b/wikipedia/View Controllers/About/AboutViewController.plist
index 24ff96c..813cd82 100644
--- a/wikipedia/View Controllers/About/AboutViewController.plist
+++ b/wikipedia/View Controllers/About/AboutViewController.plist
@@ -4,6 +4,8 @@
 
urls

+   tsg
+   http://specialistsguild.org
feedback

mailto:mobile-ios-wikipe...@wikimedia.org?subject=Feedback:$1
twn
diff --git a/wikipedia/assets/about.html b/wikipedia/assets/about.html
index 4137636..88d8be6 100644
--- a/wikipedia/assets/about.html
+++ b/wikipedia/assets/about.html
@@ -78,6 +78,10 @@
 translators_title
 
 translators_body
+
+testers_title
+
+testers_body
 
 libraries_title
 
diff --git a/wikipedia/en.lproj/Localizable.strings 
b/wikipedia/en.lproj/Localizable.strings
index 8d2212e..7b9ffbe 100644
--- a/wikipedia/en.lproj/Localizable.strings
+++ b/wikipedia/en.lproj/Localizable.strings
@@ -161,6 +161,8 @@
 "about-title" = "About";
 "about-wikipedia" = "Wikipedia";
 "about-contributors" = "contributors";
+"about-testers" = "testers";
+"about-testers-details" = "QA tested by $1";
 "about-translators" = "translators";
 "about-translators-details" = "Translated by volunteers at $1";
 "about-libraries" = "libraries used";
diff --git a/wikipedia/qqq.lproj/Localizable.strings 
b/wikipedia/qqq.lproj/Localizable.strings
index d57da2a..ace335f 100644
--- a/wikipedia/qqq.lproj/Localizable.strings
+++ b/wikipedia/qqq.lproj/Localizable.strings
@@ -154,6 +154,8 @@
 "about-contributors" = "Label text for contributors section of the about 
page\n{{Identical|Contributor}}";
 "about-translators" = "Label text for translators section of the about 
page\n{{Identical|Translator}}";
 "about-translators-details" = "Description of volunteer translation. $1 is 
translatewiki url.";
+"about-testers" = "Label text for testers section of the about page";
+"about-testers-details" = "Description of the QA testers. $1 is 
specialistsguild.org, the website of the testing group.";
 "about-libraries" = "Label text for libraries section of the about page";
 "about-repositories" = "Label text for repositories section of the about 
page\n{{Identical|Repository}}";
 "about-send-feedback" = "Link text for sending app feedback";
diff --git a/www/about.html b/www/about.html
index 4137636..88d8be6 100644
--- a/www/about.html
+++ b/www/about.html
@@ -78,6 +78,

[MediaWiki-commits] [Gerrit] Migrate all app install IDs to be the same as the old readin... - change (apps...wikipedia)

2014-11-03 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Migrate all app install IDs to be the same as the old reading 
action ID.
..


Migrate all app install IDs to be the same as the old reading action ID.

As per the meeting between Product and Analytics, we're migrating all app
install IDs in all app schemas to be the same, so that the tables can be
joined and the overlap in users between features can be found.

This patch changes all app install IDs so that they're the same as the install
ID that was previously used for reading actions. That way, the analysis that's
generated on an ongoing basis by analytics will remain unchanged, whereas the
EventLogging data install IDs will all change, but simply go in to new tables.

Change-Id: I82bdfaa8446e47d1ded37b18119f818a26249a68
---
M wikipedia/EventLogging/SavedPagesFunnel.m
M wikipedia/EventLogging/ToCInteractionFunnel.h
M wikipedia/EventLogging/ToCInteractionFunnel.m
3 files changed, 6 insertions(+), 6 deletions(-)

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



diff --git a/wikipedia/EventLogging/SavedPagesFunnel.m 
b/wikipedia/EventLogging/SavedPagesFunnel.m
index a83cf48..1e5b9af 100644
--- a/wikipedia/EventLogging/SavedPagesFunnel.m
+++ b/wikipedia/EventLogging/SavedPagesFunnel.m
@@ -13,9 +13,9 @@
 -(id)init
 {
 // http://meta.wikimedia.org/wiki/Schema:MobileWikiAppSavedPages
-self = [super initWithSchema:@"MobileWikiAppSavedPages" version:8909354];
+self = [super initWithSchema:@"MobileWikiAppSavedPages" version:10375480];
 if (self) {
-self.appInstallID = [self persistentUUID:@"SavedPages"];
+self.appInstallID = [self persistentUUID:@"ReadingAction"];
 }
 return self;
 }
diff --git a/wikipedia/EventLogging/ToCInteractionFunnel.h 
b/wikipedia/EventLogging/ToCInteractionFunnel.h
index abda3c0..a9fe67e 100644
--- a/wikipedia/EventLogging/ToCInteractionFunnel.h
+++ b/wikipedia/EventLogging/ToCInteractionFunnel.h
@@ -10,7 +10,7 @@
 
 @interface ToCInteractionFunnel : EventLoggingFunnel
 
-@property NSString *tocInteractionToken;
+@property NSString *appInstallID;
 
 -(id)init;
 -(NSDictionary *)preprocessData:(NSDictionary *)eventData;
diff --git a/wikipedia/EventLogging/ToCInteractionFunnel.m 
b/wikipedia/EventLogging/ToCInteractionFunnel.m
index d89bcd3..7a5c72e 100644
--- a/wikipedia/EventLogging/ToCInteractionFunnel.m
+++ b/wikipedia/EventLogging/ToCInteractionFunnel.m
@@ -14,9 +14,9 @@
 {
 // https://meta.wikimedia.org/wiki/Schema:MobileWikiAppToCInteraction
 self = [super initWithSchema:@"MobileWikiAppToCInteraction"
- version:8461467];
+ version:10375484];
 if (self) {
-self.tocInteractionToken = [self persistentUUID:@"ToCInteraction"];
+self.appInstallID = [self persistentUUID:@"ReadingAction"];
 }
 return self;
 }
@@ -24,7 +24,7 @@
 -(NSDictionary *)preprocessData:(NSDictionary *)eventData
 {
 NSMutableDictionary *dict = [eventData mutableCopy];
-dict[@"tocInteractionToken"] = self.tocInteractionToken;
+dict[@"appInstallID"] = self.appInstallID;
 return [NSDictionary dictionaryWithDictionary: dict];
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I82bdfaa8446e47d1ded37b18119f818a26249a68
Gerrit-PatchSet: 2
Gerrit-Project: apps/ios/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Deskana 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Fix for crash when closing recent/saved during edit mode - change (apps...wikipedia)

2014-11-04 Thread Brion VIBBER (Code Review)
Brion VIBBER has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/171157

Change subject: Fix for crash when closing recent/saved during edit mode
..

Fix for crash when closing recent/saved during edit mode

Similar to problem described here:
http://stackoverflow.com/questions/19230446/tableviewcaneditrowatindexpath-crash-when-popping-viewcontroller

Bug: 72991
Change-Id: Ibcbe6c34af7f0c3142c5ea3f66d70d5fd1b63fca
---
M wikipedia/View Controllers/History/HistoryViewController.m
M wikipedia/View Controllers/SavedPages/SavedPagesViewController.m
2 files changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia 
refs/changes/57/171157/1

diff --git a/wikipedia/View Controllers/History/HistoryViewController.m 
b/wikipedia/View Controllers/History/HistoryViewController.m
index 4658c43..1f85272 100644
--- a/wikipedia/View Controllers/History/HistoryViewController.m
+++ b/wikipedia/View Controllers/History/HistoryViewController.m
@@ -103,6 +103,7 @@
 [[NSNotificationCenter defaultCenter] removeObserver: self
 name: @"NavItemTapped"
   object: nil];
+self.tableView.editing = NO;
 }
 
 -(void)viewDidAppear:(BOOL)animated
diff --git a/wikipedia/View Controllers/SavedPages/SavedPagesViewController.m 
b/wikipedia/View Controllers/SavedPages/SavedPagesViewController.m
index bb1f4b4..bb800ad 100644
--- a/wikipedia/View Controllers/SavedPages/SavedPagesViewController.m
+++ b/wikipedia/View Controllers/SavedPages/SavedPagesViewController.m
@@ -102,6 +102,7 @@
 [[NSNotificationCenter defaultCenter] removeObserver: self
 name: @"NavItemTapped"
   object: nil];
+self.tableView.editing = NO;
 }
 
 -(void)viewDidAppear:(BOOL)animated

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibcbe6c34af7f0c3142c5ea3f66d70d5fd1b63fca
Gerrit-PatchSet: 1
Gerrit-Project: apps/ios/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Brion VIBBER 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Expose Content-Range response header for CORS requests on up... - change (operations/puppet)

2014-11-05 Thread Brion VIBBER (Code Review)
Brion VIBBER has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/171502

Change subject: Expose Content-Range response header for CORS requests on 
upload.
..

Expose Content-Range response header for CORS requests on upload.

When a client submits an HTTP request with 'Range' header, the actual
range returned, including the total file size, comes back in the
'Content-Range' response header.

Naturally, this doesn't get automatically exposed in cross-origin requests
and must be explicitly listed in the OPTIONS response. Yay CORS!

Exposing this will let ogv.js eliminate an extra HEAD request to get
the total file size, and allows validation of the ranges to check for
a Safari caching bug 
without adding a cachebuster query string on every request.

Change-Id: I35d51c66814fd23972c8044208b1545b8e20f464
---
M templates/varnish/upload-frontend.inc.vcl.erb
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/02/171502/1

diff --git a/templates/varnish/upload-frontend.inc.vcl.erb 
b/templates/varnish/upload-frontend.inc.vcl.erb
index 62257d9..bbcf905 100644
--- a/templates/varnish/upload-frontend.inc.vcl.erb
+++ b/templates/varnish/upload-frontend.inc.vcl.erb
@@ -117,5 +117,5 @@
}
 
set resp.http.Access-Control-Allow-Origin = "*";
-   set resp.http.Access-Control-Expose-Headers = "Age, Date, 
Content-Length, X-Content-Duration, X-Cache, X-Varnish";
+   set resp.http.Access-Control-Expose-Headers = "Age, Date, 
Content-Length, Content-Range, X-Content-Duration, X-Cache, X-Varnish";
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I35d51c66814fd23972c8044208b1545b8e20f464
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Brion VIBBER 

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


[MediaWiki-commits] [Gerrit] Update README. - change (apps...wikipedia)

2014-10-24 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Update README.
..


Update README.

Removed a few sections of the README that were either out of date or
irrelevant.

Change-Id: I32cc9190558806cefe58421abbe48918c7310779
---
M README.md
1 file changed, 1 insertion(+), 9 deletions(-)

Approvals:
  Brion VIBBER: Looks good to me, approved



diff --git a/README.md b/README.md
index d53fb54..4f50545 100644
--- a/README.md
+++ b/README.md
@@ -2,8 +2,6 @@
 
 Native rewrite of the [Wikipedia reader 
application](https://www.mediawiki.org/wiki/Wikimedia_Apps/Wikipedia) for iOS.
 
-Previous PhoneGap based app source: [WikipediaMobile project on 
GitHub](https://github.com/wikimedia/WikipediaMobile).
-
 * OS target: iOS 6.0 or higher
 * Device target: iPhone, iPod, iPad
 * License: MIT-style
@@ -27,7 +25,7 @@
 You'll also need to install the following (used by build scripts):
 
 * [nodejs](http://nodejs.org/) and npm
-* grunt-cli (run 'npm install -g grunt-cli') 
+* grunt-cli (run 'sudo npm install -g grunt-cli') 
 * [Inkscape](http://www.inkscape.org/en/download/mac-os/)
 
 
@@ -53,12 +51,6 @@
 
 Components of the app will be relatively self-contained, communicating via 
NSNotificationCenter as a messaging bus to avoid over-close coupling of parts 
and to make test-driven development more feasible.
 
-
-# Design
-
-A major complaint about the currently deployed Wikipedia app is its non-iOS-y 
UI appearance and behavior.
-
-We'll be working with the Wikimedia Foundation's Design team on UI design, 
with an eye to coordinating the look & branding with mobile web and Android 
while keeping a nice native iOS 7 feel.
 
 
 # Development team

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I32cc9190558806cefe58421abbe48918c7310779
Gerrit-PatchSet: 2
Gerrit-Project: apps/ios/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Deskana 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Change "Credits" to "About". - change (apps...wikipedia)

2014-10-28 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Change "Credits" to "About".
..


Change "Credits" to "About".

Includes version info and other items from Android version.

Updated doc type index.html to strict.

Updated doc types to not include outdated version info.

Re-added "repositories" section to About page.

Change-Id: I9914dd0c56af25d7ecf9cbeb25245b939540a0a4
---
M Wikipedia.xcodeproj/project.pbxproj
M scripts/icon-svgs-to-pngs.sh
M wikipedia/Base.lproj/Main_iPhone.storyboard
A wikipedia/Categories/UIWebView+LoadAssetsHtml.h
A wikipedia/Categories/UIWebView+LoadAssetsHtml.m
A wikipedia/Images.xcassets/WMFLogo_60.imageset/Contents.json
A wikipedia/Images.xcassets/WMFLogo_60.imageset/wmf_logo.svg
A wikipedia/Images.xcassets/WMFLogo_60.imageset/wmflogo_120.png
A wikipedia/Images.xcassets/WMFLogo_60.imageset/wmflogo_180.png
A wikipedia/Images.xcassets/WMFLogo_60.imageset/wmflogo_60.png
A wikipedia/View Controllers/About/AboutViewController.h
A wikipedia/View Controllers/About/AboutViewController.m
A wikipedia/View Controllers/About/AboutViewController.plist
M wikipedia/View Controllers/Navigation/Secondary/SecondaryMenuViewController.m
A wikipedia/assets/about.html
M wikipedia/assets/abusefilter.html
A wikipedia/assets/images/wmflogo_120.png
A wikipedia/assets/images/wmflogo_180.png
A wikipedia/assets/images/wmflogo_60.png
M wikipedia/assets/index.html
M wikipedia/assets/preview.html
M wikipedia/en.lproj/Localizable.strings
M wikipedia/mw-bridge/CommunicationBridge.m
M wikipedia/qqq.lproj/Localizable.strings
M www/Gruntfile.js
A www/about.html
M www/abusefilter.html
A www/images/wmflogo_120.png
A www/images/wmflogo_180.png
A www/images/wmflogo_60.png
M www/index.html
M www/preview.html
32 files changed, 715 insertions(+), 35 deletions(-)

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



diff --git a/Wikipedia.xcodeproj/project.pbxproj 
b/Wikipedia.xcodeproj/project.pbxproj
index db352b1..ad429ca 100644
--- a/Wikipedia.xcodeproj/project.pbxproj
+++ b/Wikipedia.xcodeproj/project.pbxproj
@@ -46,6 +46,7 @@
042B3996192EAEEA0066B270 /* ShareMenuSavePageActivity.m in 
Sources */ = {isa = PBXBuildFile; fileRef = 042B3995192EAEEA0066B270 /* 
ShareMenuSavePageActivity.m */; };
0433542218A023FE009305F0 /* UIViewController+HideKeyboard.m in 
Sources */ = {isa = PBXBuildFile; fileRef = 0433542118A023FE009305F0 /* 
UIViewController+HideKeyboard.m */; };
0433542618A093C5009305F0 /* UIView+RemoveConstraints.m in 
Sources */ = {isa = PBXBuildFile; fileRef = 0433542518A093C5009305F0 /* 
UIView+RemoveConstraints.m */; };
+   0439317619FB092600386E8F /* UIWebView+LoadAssetsHtml.m in 
Sources */ = {isa = PBXBuildFile; fileRef = 0439317519FB092600386E8F /* 
UIWebView+LoadAssetsHtml.m */; };
043DAC4B1901C3EE001CD17C /* CreditsViewController.m in Sources 
*/ = {isa = PBXBuildFile; fileRef = 043DAC4A1901C3EE001CD17C /* 
CreditsViewController.m */; };
043F18E118D9691D00D8489A /* TopActionSheetLabel.m in Sources */ 
= {isa = PBXBuildFile; fileRef = 043F18DC18D9691D00D8489A /* 
TopActionSheetLabel.m */; };
043F18E518D9691D00D8489A /* 
UINavigationController+TopActionSheet.m in Sources */ = {isa = PBXBuildFile; 
fileRef = 043F18E018D9691D00D8489A /* UINavigationController+TopActionSheet.m 
*/; };
@@ -66,6 +67,7 @@
04530AF81935C07500022512 /* ModalContentViewController.m in 
Sources */ = {isa = PBXBuildFile; fileRef = 04530AF71935C07500022512 /* 
ModalContentViewController.m */; };
04530AFB1935C2B500022512 /* EmptySegue.m in Sources */ = {isa = 
PBXBuildFile; fileRef = 04530AFA1935C2B500022512 /* EmptySegue.m */; };
045A9F0D18F6090E0057EA85 /* assets in Resources */ = {isa = 
PBXBuildFile; fileRef = 045A9F0C18F6090E0057EA85 /* assets */; };
+   045D872119FAD2FA0035C1F9 /* AboutViewController.m in Sources */ 
= {isa = PBXBuildFile; fileRef = 045D872019FAD2FA0035C1F9 /* 
AboutViewController.m */; };
045EFF1A19A25FEB00D0EDBB /* logo-placeholder-search.png in 
Resources */ = {isa = PBXBuildFile; fileRef = 045EFF1819A25FEB00D0EDBB /* 
logo-placeholder-search.png */; };
045EFF1B19A25FEB00D0EDBB /* logo-placeholder-sea...@2x.png in 
Resources */ = {isa = PBXBuildFile; fileRef = 045EFF1919A25FEB00D0EDBB /* 
logo-placeholder-sea...@2x.png */; };
0460F8DC19B0F932001BC59B /* CenteredPathView.m in Sources */ = 
{isa = PBXBuildFile; fileRef = 0460F8DB19B0F932001BC59B /* CenteredPathView.m 
*/; };
@@ -81,6 +83,7 @@
047ED63918C13E4900442BE3 /* PreviewWebView.m in Sources */ = 
{isa = PBXBuildFile; fileRef = 047ED63818C13E4900442BE3 /* PreviewWebView.m */; 
};
047FF5471889078C009DB293 /* Image+Convenience.m in Sources */ = 
{isa = PBXBuildFile; fileRef = 047FF5461889078C009DB293

[MediaWiki-commits] [Gerrit] Fix for scrolling when TOC onscreen. - change (apps...wikipedia)

2014-10-28 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Fix for scrolling when TOC onscreen.
..


Fix for scrolling when TOC onscreen.

Needed because we added doctype so no longer using "quirks" mode.
So we we need to specify "px" for spacer height now.

Change-Id: Iea4422fbdad723daffb0201c95211bede07fb8b8
---
M wikipedia/View Controllers/WebView/WebViewController.m
1 file changed, 4 insertions(+), 1 deletion(-)

Approvals:
  Brion VIBBER: Looks good to me, approved



diff --git a/wikipedia/View Controllers/WebView/WebViewController.m 
b/wikipedia/View Controllers/WebView/WebViewController.m
index ea78b64..3ef3862 100644
--- a/wikipedia/View Controllers/WebView/WebViewController.m
+++ b/wikipedia/View Controllers/WebView/WebViewController.m
@@ -1844,7 +1844,10 @@
 
 // This is important! Ensures bottom of web view article can be 
scrolled closer to the top of
 // the screen. Works in conjunction with "limitScrollUp:" method.
-[sectionTextArray addObject: [NSString stringWithFormat:@"", BOTTOM_SCROLL_LIMIT_HEIGHT]];
+// Note: had to add "px" to the height because we added "" to the top
+// of the index.html - it won't actually give the div height w/o 
this now (no longer
+// using quirks mode now that doctype specified).
+[sectionTextArray addObject: [NSString stringWithFormat:@"", 
BOTTOM_SCROLL_LIMIT_HEIGHT]];
 }
 
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iea4422fbdad723daffb0201c95211bede07fb8b8
Gerrit-PatchSet: 1
Gerrit-Project: apps/ios/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Mhurd 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Cleaned up About page text a bit. - change (apps...wikipedia)

2014-10-29 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Cleaned up About page text a bit.
..


Cleaned up About page text a bit.

Change-Id: I64306bafd293b12d317a379d54f3884a582db531
---
M wikipedia/View Controllers/About/AboutViewController.m
M wikipedia/en.lproj/Localizable.strings
2 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/wikipedia/View Controllers/About/AboutViewController.m 
b/wikipedia/View Controllers/About/AboutViewController.m
index bdee482..d160665 100644
--- a/wikipedia/View Controllers/About/AboutViewController.m
+++ b/wikipedia/View Controllers/About/AboutViewController.m
@@ -158,7 +158,7 @@
 setDivHTML(@"feedback_body", [self getLinkHTMLForURL:self.feedbackURL 
title:MWLocalizedString(@"about-send-feedback", nil)]);
 
 NSString *twnUrl = self.urls[@"twn"];
-NSString *translatorsLink = [self getLinkHTMLForURL:twnUrl title:twnUrl];
+NSString *translatorsLink = [self getLinkHTMLForURL:twnUrl title:[twnUrl 
substringFromIndex:7]];
 NSString *translatorDetails =
 [MWLocalizedString(@"about-translators-details", nil) 
stringByReplacingOccurrencesOfString: @"$1"

 withString: translatorsLink];
diff --git a/wikipedia/en.lproj/Localizable.strings 
b/wikipedia/en.lproj/Localizable.strings
index c9159ee..8d2212e 100644
--- a/wikipedia/en.lproj/Localizable.strings
+++ b/wikipedia/en.lproj/Localizable.strings
@@ -162,7 +162,7 @@
 "about-wikipedia" = "Wikipedia";
 "about-contributors" = "contributors";
 "about-translators" = "translators";
-"about-translators-details" = "This app was translated by the volunteer 
translators at $1";
+"about-translators-details" = "Translated by volunteers at $1";
 "about-libraries" = "libraries used";
 "about-repositories" = "repositories";
 "about-send-feedback" = "Send app feedback";

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I64306bafd293b12d317a379d54f3884a582db531
Gerrit-PatchSet: 1
Gerrit-Project: apps/ios/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Mhurd 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Bump ver to 4.0.5 (really should do this before beta releases!) - change (apps...wikipedia)

2014-10-30 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Bump ver to 4.0.5 (really should do this before beta releases!)
..


Bump ver to 4.0.5 (really should do this before beta releases!)

Change-Id: Ibab2af0fac7d9856348ced6c514aacc3ec4f3490
---
M wikipedia/Wikipedia-Info.plist
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/wikipedia/Wikipedia-Info.plist b/wikipedia/Wikipedia-Info.plist
index abeb8eb..122e901 100644
--- a/wikipedia/Wikipedia-Info.plist
+++ b/wikipedia/Wikipedia-Info.plist
@@ -17,11 +17,11 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
-   4.0.4
+   4.0.5
CFBundleSignature

CFBundleVersion
-   4.0.4.0
+   4.0.5.0
LSRequiresIPhoneOS

NSLocationWhenInUseUsageDescription

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibab2af0fac7d9856348ced6c514aacc3ec4f3490
Gerrit-PatchSet: 1
Gerrit-Project: apps/ios/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Brion VIBBER 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Bump ver to 4.0.5 (really should do this before beta releases!) - change (apps...wikipedia)

2014-10-30 Thread Brion VIBBER (Code Review)
Brion VIBBER has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/170159

Change subject: Bump ver to 4.0.5 (really should do this before beta releases!)
..

Bump ver to 4.0.5 (really should do this before beta releases!)

Change-Id: Ibab2af0fac7d9856348ced6c514aacc3ec4f3490
---
M wikipedia/Wikipedia-Info.plist
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia 
refs/changes/59/170159/1

diff --git a/wikipedia/Wikipedia-Info.plist b/wikipedia/Wikipedia-Info.plist
index abeb8eb..122e901 100644
--- a/wikipedia/Wikipedia-Info.plist
+++ b/wikipedia/Wikipedia-Info.plist
@@ -17,11 +17,11 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
-   4.0.4
+   4.0.5
CFBundleSignature

CFBundleVersion
-   4.0.4.0
+   4.0.5.0
LSRequiresIPhoneOS

NSLocationWhenInUseUsageDescription

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibab2af0fac7d9856348ced6c514aacc3ec4f3490
Gerrit-PatchSet: 1
Gerrit-Project: apps/ios/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Brion VIBBER 

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


[MediaWiki-commits] [Gerrit] Manual import of translations from TWN - change (apps...wikipedia)

2014-10-30 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Manual import of translations from TWN
..


Manual import of translations from TWN

Change-Id: I93f8786f3f8fc4f6ce60c88eb04c92cde1a526eb
---
M wikipedia/de.lproj/Localizable.strings
M wikipedia/es.lproj/Localizable.strings
M wikipedia/fa.lproj/Localizable.strings
M wikipedia/fr.lproj/Localizable.strings
M wikipedia/he.lproj/Localizable.strings
M wikipedia/ja.lproj/Localizable.strings
M wikipedia/mk.lproj/Localizable.strings
M wikipedia/ms.lproj/Localizable.strings
M wikipedia/nl.lproj/Localizable.strings
M wikipedia/nl.lproj/Main_iPhone.strings
M wikipedia/pl.lproj/Localizable.strings
M wikipedia/pt.lproj/Localizable.strings
M wikipedia/qqq.lproj/Localizable.strings
M wikipedia/ro.lproj/Localizable.strings
M wikipedia/ru.lproj/Localizable.strings
M wikipedia/sk.lproj/Localizable.strings
M wikipedia/sv.lproj/Localizable.strings
M wikipedia/zh-hans.lproj/Localizable.strings
18 files changed, 232 insertions(+), 68 deletions(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/wikipedia/de.lproj/Localizable.strings 
b/wikipedia/de.lproj/Localizable.strings
index b45bcae..a365956 100644
--- a/wikipedia/de.lproj/Localizable.strings
+++ b/wikipedia/de.lproj/Localizable.strings
@@ -95,6 +95,7 @@
 "main-menu-send-feedback" = "App-Rückmeldung senden";
 "main-menu-show-page-history" = "Versionsgeschichte der Änderungen an $1";
 "main-menu-credits" = "Danksagungen";
+"main-menu-about" = "Über die Wikipedia-App";
 "main-menu-zero-faq" = "FAQ zu Wikipedia Zero";
 "main-menu-privacy-policy" = "Datenschutzrichtlinie";
 "main-menu-terms-of-use" = "Nutzungsbedingungen";
@@ -142,6 +143,16 @@
 "credits-gerrit-repo" = "App-Hauptrepositorium (Gerrit)";
 "credits-github-mirror" = "App-Mirror (GitHub)";
 "credits-external-libraries" = "Extern";
+"about-title" = "Über";
+"about-wikipedia" = "Wikipedia";
+"about-contributors" = "Autoren";
+"about-translators" = "Übersetzer";
+"about-translators-details" = "Diese App wurde von freiwilligen Übersetzern 
auf $1 übersetzt";
+"about-libraries" = "Verwendete Bibliotheken";
+"about-repositories" = "Repositorien";
+"about-send-feedback" = "App-Rückmeldung senden";
+"about-product-of" = "Ein Produkt der $1";
+"about-wikimedia-foundation" = "Wikimedia Foundation";
 "share-menu-save-page" = "Seite speichern";
 "share-menu-page-saved" = "Seite gespeichert";
 "share-menu-page-saved-access" = "Tipp: Um auf deine gespeicherten Seiten 
zuzugreifen, tippe oben auf $1 oder halte unten $2 gedrückt.";
diff --git a/wikipedia/es.lproj/Localizable.strings 
b/wikipedia/es.lproj/Localizable.strings
index 3f85bf0..01caf44 100644
--- a/wikipedia/es.lproj/Localizable.strings
+++ b/wikipedia/es.lproj/Localizable.strings
@@ -75,7 +75,7 @@
 "open-link-title" = "Abrir enlace";
 "open-link-cancel" = "Cancelar";
 "search-searching" = "Buscando…";
-"search-no-matches" = "No hay coincidencias encontradas para el término de 
búsqueda.";
+"search-no-matches" = "No se encontraron coincidencias para el término de 
búsqueda.";
 "search-field-placeholder-text" = "Buscar en Wikipedia";
 "search-field-placeholder-text-zero" = "Buscar en Wikipedia Zero";
 "search-loading-section-zero" = "Cargando la primera sección del artículo…";
@@ -100,6 +100,7 @@
 "main-menu-send-feedback" = "Enviar comentarios para la aplicación";
 "main-menu-show-page-history" = "Historial de cambios de $1";
 "main-menu-credits" = "Créditos";
+"main-menu-about" = "Acerca de la aplicación de Wikipedia";
 "main-menu-zero-faq" = "P+F de Wikipedia Zero";
 "main-menu-privacy-policy" = "Política de privacidad";
 "main-menu-terms-of-use" = "Términos de uso";
@@ -136,7 +137,7 @@
 "edit-summary-choice-added-missing-info" = "Añadida información faltante";
 "edit-summary-choice-added-clarification" = "Aclaración añadida";
 "edit-summary-choice-other" = "Otro";
-"edit-summary-description" = "Un resumen específico ayuda a los co-editores a 
revisar rápidamente sus ediciones. También puede escoger entre las etiquetas de 
abajo.";
+"edit-summary-description" = "Un resumen específico ayuda a los co-editores a 
revisar rápidamente tus ediciones. También puedes escoger entre las etiquetas 
de abajo.";
 "edit-summary-field-placeholder-text" = "Otras formas en las que mejoraste la 
página";
 "edit-summary-title" = "¿Cómo has mejorado el artículo?";
 "fetching-random-article" = "Obteniendo artículo al azar";
@@ -147,6 +148,16 @@
 "credits-gerrit-repo" = "Rep. principal de aplicación (Gerrit)";
 "credits-github-mirror" = "App espejo (GitHub)";
 "credits-external-libraries" = "Repositorios externos";
+"about-title" = "Acerca de";
+"about-wikipedia" = "Wikipedia";
+"about-contributors" = "colaboradores";
+"about-translators" = "traductores";
+"about-translators-details" = "Esta aplicación fue traducida por los 
traductores voluntarios en $1";
+"about-libraries" = "bibliotecas usadas";
+"about-repositories"

[MediaWiki-commits] [Gerrit] bump build number after updating localizations - change (apps...wikipedia)

2014-10-30 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: bump build number after updating localizations
..


bump build number after updating localizations

Change-Id: I81fb13215d699c567a777df282f4c2d17aff5b34
---
M wikipedia/Wikipedia-Info.plist
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/wikipedia/Wikipedia-Info.plist b/wikipedia/Wikipedia-Info.plist
index 122e901..e167af3 100644
--- a/wikipedia/Wikipedia-Info.plist
+++ b/wikipedia/Wikipedia-Info.plist
@@ -21,7 +21,7 @@
CFBundleSignature

CFBundleVersion
-   4.0.5.0
+   4.0.5.2
LSRequiresIPhoneOS

NSLocationWhenInUseUsageDescription

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I81fb13215d699c567a777df282f4c2d17aff5b34
Gerrit-PatchSet: 1
Gerrit-Project: apps/ios/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Brion VIBBER 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] bump build number after updating localizations - change (apps...wikipedia)

2014-10-30 Thread Brion VIBBER (Code Review)
Brion VIBBER has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/170172

Change subject: bump build number after updating localizations
..

bump build number after updating localizations

Change-Id: I81fb13215d699c567a777df282f4c2d17aff5b34
---
M wikipedia/Wikipedia-Info.plist
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia 
refs/changes/72/170172/1

diff --git a/wikipedia/Wikipedia-Info.plist b/wikipedia/Wikipedia-Info.plist
index 122e901..e167af3 100644
--- a/wikipedia/Wikipedia-Info.plist
+++ b/wikipedia/Wikipedia-Info.plist
@@ -21,7 +21,7 @@
CFBundleSignature

CFBundleVersion
-   4.0.5.0
+   4.0.5.2
LSRequiresIPhoneOS

NSLocationWhenInUseUsageDescription

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I81fb13215d699c567a777df282f4c2d17aff5b34
Gerrit-PatchSet: 1
Gerrit-Project: apps/ios/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Brion VIBBER 

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


<    8   9   10   11   12   13   14   15   16   17   >