[MediaWiki-commits] [Gerrit] distinguish between token types when caching - change (mediawiki...MobileFrontend[master])

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

Change subject: distinguish between token types when caching
..


distinguish between token types when caching

currently the watchlist icon shows when not logged in as the edit token
query is cached as the result of the watchlist token query

Change-Id: Ief92d9484227e6273a2e70ee4ecf6a00326a7801
---
M javascripts/common/mf-application.js
1 file changed, 4 insertions(+), 4 deletions(-)

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


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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ief92d9484227e6273a2e70ee4ecf6a00326a7801
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
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] don't show edit button for anons - change (mediawiki...MobileFrontend[master])

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

Change subject: don't show edit button for anons
..


don't show edit button for anons

whilst this is in experimental mode it was requested that edit button
only shows to logged in users. Edit token is +\\ for anon users

Change-Id: I7a386482410e6983fddb2f54f3ab1596b0ab0940
---
M javascripts/common/mf-navigation.js
1 file changed, 2 insertions(+), 1 deletion(-)

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


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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7a386482410e6983fddb2f54f3ab1596b0ab0940
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
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] reveal simple wikipedia language link again (bug 41458) - change (mediawiki...MobileFrontend[master])

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

Change subject: reveal simple wikipedia language link again (bug 41458)
..


reveal simple wikipedia language link again (bug 41458)

Change-Id: Ieed3ac1d3beac2adfae13610f6bb8485f46278f6
---
M includes/skins/SkinMobile.php
1 file changed, 3 insertions(+), 5 deletions(-)

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


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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ieed3ac1d3beac2adfae13610f6bb8485f46278f6
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Split off en.wp specific stuff into a separate file. - change (mediawiki...MobileFrontend[master])

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

Change subject: Split off en.wp specific stuff into a separate file.
..


Split off en.wp specific stuff into a separate file.

We can move this into MediaWiki:Mobile.css, but if we remove it too
soon, it might break wikipedia's which have not configured their
Mobile.css yet.

Change-Id: Ibba4b13614f7880e5c1741b9e84599a56a4e9fcd
---
M Makefile
M MobileFrontend.php
M stylesheets/common/mf-common.css
A stylesheets/common/mf-enwp.css
M stylesheets/common/mf-hacks.css
M stylesheets/less/common/mf-common.less
A stylesheets/less/common/mf-enwp.less
M stylesheets/less/common/mf-hacks.less
8 files changed, 241 insertions(+), 231 deletions(-)

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


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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibba4b13614f7880e5c1741b9e84599a56a4e9fcd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: TheDJ 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Don't fail on incomplete row info when exporting. - change (mediawiki/core[master])

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

Change subject: Don't fail on incomplete row info when exporting.
..


Don't fail on incomplete row info when exporting.

This allows XmlDumpWriter to output rows that are missing some
information without triggering php warnings.

This fixes warnings caused by the OAI extension when using
XmlDumpWriter::writeRevision without setting the row's
rev_parent_id field.

Generally, it seems convenient to allow optional fields to be unset
instead of skipping them if they are empty, but requiering them to be
set.

Change-Id: I246ba3a899bd9e833232444a11ac63e1b0225ab6
---
M includes/Export.php
1 file changed, 6 insertions(+), 6 deletions(-)

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


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

Gerrit-MessageType: merged
Gerrit-Change-Id: I246ba3a899bd9e833232444a11ac63e1b0225ab6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Daniel Kinzler 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Daniel Kinzler 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Platonides 
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 basic tests for mf-edit.js module - change (mediawiki...MobileFrontend[master])

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

Change subject: add basic tests for mf-edit.js module
..


add basic tests for mf-edit.js module

* refactor mf-edit.js to allow for testing
* show that tests currently fail

Change-Id: I1f34f3a180243b817a3627aa0cb770c33556afdc
---
M includes/MobileFrontend.body.php
M javascripts/actions/mf-edit.js
M tests/js/fixtures.js
A tests/js/test_mf-edit.js
4 files changed, 75 insertions(+), 28 deletions(-)

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


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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1f34f3a180243b817a3627aa0cb770c33556afdc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
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 broken experimental editing - change (mediawiki...MobileFrontend[master])

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

Change subject: fix broken experimental editing
..


fix broken experimental editing

there were various problems in the old code, surfaced by the tests
in previous commit, now fixed.

Change-Id: I64988895ee0e4078ff160b72c8c038a8890cde3a
---
M javascripts/actions/mf-edit.js
1 file changed, 16 insertions(+), 5 deletions(-)

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


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

Gerrit-MessageType: merged
Gerrit-Change-Id: I64988895ee0e4078ff160b72c8c038a8890cde3a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
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] Partial revert of change Change I1f5fab58 (bug 41141), add c... - change (mediawiki...MobileFrontend[master])

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

Change subject: Partial revert of change Change I1f5fab58 (bug 41141), add 
config setting for previous behavior.
..

Partial revert of change Change I1f5fab58 (bug 41141), add config setting for 
previous behavior.

Combined with setting $wgMFTrademarkSitename = true this will restore the 
previous behavior, while changing the default to not add TM/(R) on the sitename 
as a better default for third-party sites.

Change-Id: If167ceb4f026de6562f7b5367d25ac23fe5527f7
---
M MobileFrontend.php
M includes/skins/SkinMobile.php
2 files changed, 23 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/39/31039/1
--
To view, visit https://gerrit.wikimedia.org/r/31039
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If167ceb4f026de6562f7b5367d25ac23fe5527f7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
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] Set $wgMFTrademarkSitename = true to restore previous TM/(R)... - change (operations/mediawiki-config[master])

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

Change subject: Set $wgMFTrademarkSitename = true to restore previous TM/(R) in 
footer on live sites (default has changed to disable them)
..

Set $wgMFTrademarkSitename = true to restore previous TM/(R) in footer on live 
sites (default has changed to disable them)

Change-Id: I7ee77194f936dc931357c5c6edd21dbf9efbeb20
---
M wmf-config/mobile.php
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config 
refs/changes/44/31044/1
--
To view, visit https://gerrit.wikimedia.org/r/31044
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7ee77194f936dc931357c5c6edd21dbf9efbeb20
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
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] turn all special pages into 'overlays' - change (mediawiki...MobileFrontend[master])

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

Change subject: turn all special pages into 'overlays'
..


turn all special pages into 'overlays'

(https://mingle.corp.wikimedia.org/projects/mobile/cards/235)
* only style list and list elements in overlays if the the ul has class content
* style div.content with same margins as article
* add content_wrapper id to content in an overlay to distinguish it differently
from overlays opened via javascript

Change-Id: I59216dcfc00287e80306c8fc181e250f0516779e
---
M includes/skins/SkinMobile.php
M stylesheets/common/mf-navigation.css
M stylesheets/less/common/mf-navigation.less
M stylesheets/less/common/mf-typography.less
4 files changed, 20 insertions(+), 11 deletions(-)

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


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

Gerrit-MessageType: merged
Gerrit-Change-Id: I59216dcfc00287e80306c8fc181e250f0516779e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
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] Document 'variant' as a parameter to action=mobileview - change (mediawiki...MobileFrontend[master])

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

Change subject: Document 'variant' as a parameter to action=mobileview
..

Document 'variant' as a parameter to action=mobileview

For bug 38101, bug 32906, etc (variant switching on mobile).
Not actually required for the functionality, but makes me happier!
Processing of the 'variant' URL parameter is actually handled by
LanguageConverter secretly without our knowledge or consent. :P

Change-Id: I0e9a4b73a778602c6142aae473a9fd2b87b4e893
---
M includes/api/ApiMobileView.php
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/18/32718/1
--
To view, visit https://gerrit.wikimedia.org/r/32718
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0e9a4b73a778602c6142aae473a9fd2b87b4e893
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
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] Enable mobilefrontend for wikivoyage -- need to test it befo... - change (operations/mediawiki-config[master])

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

Change subject: Enable mobilefrontend for wikivoyage -- need to test it before 
letting the mobile redirector go wild
..

Enable mobilefrontend for wikivoyage -- need to test it before letting the 
mobile redirector go wild

Change-Id: I78290a3ce932fcab4c4db65ab9a0718abbbf7f9a
---
M wmf-config/InitialiseSettings.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config 
refs/changes/20/34220/1
--
To view, visit https://gerrit.wikimedia.org/r/34220
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I78290a3ce932fcab4c4db65ab9a0718abbbf7f9a
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
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] Allow disabling the parser function to prevent fatals during... - change (mediawiki...GeoData[master])

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

Change subject: Allow disabling the parser function to prevent fatals during 
WMF deployment
..


Allow disabling the parser function to prevent fatals during WMF deployment

Change-Id: I07aebbb5488d8a76451ba7dd9e82fd65ee55dc35
---
M GeoData.php
M GeoDataHooks.php
2 files changed, 15 insertions(+), 4 deletions(-)

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


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

Gerrit-MessageType: merged
Gerrit-Change-Id: I07aebbb5488d8a76451ba7dd9e82fd65ee55dc35
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/GeoData
Gerrit-Branch: master
Gerrit-Owner: MaxSem 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: Oren 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: awjrichards 
Gerrit-Reviewer: preilly 

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


[MediaWiki-commits] [Gerrit] Solr backend for spatial searches - change (mediawiki...GeoData[master])

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

Change subject: Solr backend for spatial searches
..


Solr backend for spatial searches

Change-Id: Ic8a634125b78e421ba937a70816934438268754f
---
M CoordinatesParserFunction.php
M GeoData.body.php
M GeoData.php
M GeoDataHooks.php
M api/ApiQueryGeoSearch.php
A api/ApiQueryGeoSearchDB.php
A api/ApiQueryGeoSearchSolr.php
A api/ApiQueryGeoSearchSphinx.php
A solr/SolrGeoData.php
A solr/schema.xml
A solrupdate.php
R sphinx/sphinx.conf.db.sample
R sphinx/sphinx.conf.xmlpipe.sample
R sphinx/sphinxapi.php
R sql/externally-backed.sql
15 files changed, 883 insertions(+), 212 deletions(-)

Approvals:
  Nikerabbit: Looks good to me, but someone else must approve
  Brion VIBBER: Verified; Looks good to me, approved


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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic8a634125b78e421ba937a70816934438268754f
Gerrit-PatchSet: 7
Gerrit-Project: mediawiki/extensions/GeoData
Gerrit-Branch: master
Gerrit-Owner: MaxSem 
Gerrit-Reviewer: Asher 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: awjrichards 

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


[MediaWiki-commits] [Gerrit] Support multiple Sphinx servers - change (mediawiki...GeoData[master])

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

Change subject: Support multiple Sphinx servers
..


Support multiple Sphinx servers

Change-Id: I869c1fb10747e21a50ce71f7f074de2d8dd075c9
---
M GeoData.php
M api/ApiQueryGeoSearch.php
2 files changed, 40 insertions(+), 4 deletions(-)

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


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

Gerrit-MessageType: merged
Gerrit-Change-Id: I869c1fb10747e21a50ce71f7f074de2d8dd075c9
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/GeoData
Gerrit-Branch: master
Gerrit-Owner: MaxSem 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: Oren 
Gerrit-Reviewer: awjrichards 

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


[MediaWiki-commits] [Gerrit] Delta updates support in sphinx.conf - change (mediawiki...GeoData[master])

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

Change subject: Delta updates support in sphinx.conf
..


Delta updates support in sphinx.conf

Change-Id: I2d4ed5dd9fe134a61d2ab22e63745053db146a77
---
M GeoData.php
M sphinx.conf.sample
2 files changed, 74 insertions(+), 47 deletions(-)

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


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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2d4ed5dd9fe134a61d2ab22e63745053db146a77
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/GeoData
Gerrit-Branch: master
Gerrit-Owner: MaxSem 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: Oren 
Gerrit-Reviewer: awjrichards 

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


[MediaWiki-commits] [Gerrit] Support for xmlpipe2 updates, killist -> killlist - change (mediawiki...GeoData[master])

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

Change subject: Support for xmlpipe2 updates, killist -> killlist
..


Support for xmlpipe2 updates, killist -> killlist

Change-Id: Iead80994d2a994ad621cbb3748681ae0dd6e6229
---
M GeoData.php
M GeoDataHooks.php
R sphinx.conf.db.sample
A sphinx.conf.xmlpipe.sample
M sql/sphinx-backed.sql
A xmlpipe.php
6 files changed, 241 insertions(+), 6 deletions(-)

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


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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iead80994d2a994ad621cbb3748681ae0dd6e6229
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/GeoData
Gerrit-Branch: master
Gerrit-Owner: MaxSem 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: Oren 
Gerrit-Reviewer: awjrichards 

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


[MediaWiki-commits] [Gerrit] Correct target context for mobile.desktop resource - change (mediawiki...MobileFrontend[master])

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

Change subject: Correct target context for mobile.desktop resource
..


Correct target context for mobile.desktop resource

The mobile.desktop resource should only ever get loaded on the
desktop version of the site; I suspect that having the incorrect
target defined is what was causing bug #42480.

Change-Id: I4ba9f11e140a466315c6ee2f04a270951bde9eca
---
M MobileFrontend.php
1 file changed, 1 insertion(+), 1 deletion(-)

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


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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4ba9f11e140a466315c6ee2f04a270951bde9eca
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: awjrichards 
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] Mobile replacement for Special:Watchlist, initial version. - change (mediawiki...MobileFrontend[master])

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

Change subject: Mobile replacement for Special:Watchlist, initial version.
..


Mobile replacement for Special:Watchlist, initial version.

So far includes a simplified overview display, bnd an initial drilldown into 
individual changes which is meant to be shared with history view etc.

A basic filter is available to select between 'all' pages, article pages, 
article talk pages, and other pages -- this needs further work as well.

May need to consider more issues of tagging/marking.

Note that some of SpecialMobileWatchlist's code is copied from core 
SpecialWatchlist, with the intention that it will be refactored further into a 
base that works with both desktop and mobile.

Change-Id: Iee1a4bfde4369df0f1f0b1dba3a65d45219e8efa
---
M Makefile
M MobileFrontend.i18n.php
M MobileFrontend.php
M includes/MobileFrontend.body.php
M includes/skins/SkinMobile.php
M includes/skins/SkinMobileBase.php
A includes/specials/SpecialMobileDiff.php
A includes/specials/SpecialMobileWatchlist.php
A stylesheets/common/images/menu/watchlist.png
M stylesheets/common/mf-navigation.css
M stylesheets/less/common/mf-navigation.less
A stylesheets/less/specials/watchlist.less
A stylesheets/specials/images/drilldown.png
A stylesheets/specials/watchlist.css
14 files changed, 675 insertions(+), 0 deletions(-)

Approvals:
  Brion VIBBER: Looks good to me, approved
  Jdlrobson: Looks good to me, but someone else must approve
  jenkins-bot: Verified


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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iee1a4bfde4369df0f1f0b1dba3a65d45219e8efa
Gerrit-PatchSet: 9
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Brion VIBBER 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: awjrichards 
Gerrit-Reviewer: jenkins-bot
Gerrit-Reviewer: preilly 

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


[MediaWiki-commits] [Gerrit] photo uploads for articles without images in the summary sec... - change (mediawiki...MobileFrontend[master])

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

Change subject: photo uploads for articles without images in the summary section
..


photo uploads for articles without images in the summary section

first version - result of hackathon in Bangalore written by
@imdadahmed, @kaoskeya @darkyen, @swaroopsm and @jdlrobson

__for webkit only to reduce scope and test feature__

* Note some cleanup templates include a small img - we should not
count these - so we look for .thumb img
* duplicate image upload handling
* use cors to upload between projects (e.g. en.wiki to commons)
* use cc-by-sa-3.0 license by default and warn user
** license opens in a new window

other changes:
* expose isLoggedIn from mf-application.js
* add .cancel and .confirm versions of buttons
* $wgMFPhotoUploadEndpoint allows uploading to other domains
* show error message returned by API if present
Change-Id: Ic790f9d079cae83a36e8e2b0e572c9c4a36c9753
---
M Makefile
M MobileFrontend.i18n.php
M MobileFrontend.php
M includes/skins/SkinMobile.php
M javascripts/common/mf-application.js
A javascripts/modules/mf-photo.js
M stylesheets/common/mf-navigation.css
M stylesheets/less/common/mf-buttons.less
M stylesheets/less/mf-variables.less
A stylesheets/less/modules/mf-photo.less
A stylesheets/modules/images/5-content-new-picture.png
A stylesheets/modules/mf-photo.css
12 files changed, 558 insertions(+), 6 deletions(-)

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


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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic790f9d079cae83a36e8e2b0e572c9c4a36c9753
Gerrit-PatchSet: 16
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: JGonera 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: awjrichards 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] don't attempt to load the edit page dynamically - change (mediawiki...MobileFrontend[master])

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

Change subject: don't attempt to load the edit page dynamically
..


don't attempt to load the edit page dynamically

On an edit page the h1 as the text "Editing Article title"
however this is not a valid page.

improve the error handling for loadPage that was causing the infinite
redirect loop

Change-Id: I37b6de35c0b724fc960858988f80bcaf1cd14fd7
---
M javascripts/common/mf-history.js
M javascripts/modules/mf-toggle-dynamic.js
2 files changed, 4 insertions(+), 2 deletions(-)

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


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

Gerrit-MessageType: merged
Gerrit-Change-Id: I37b6de35c0b724fc960858988f80bcaf1cd14fd7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: awjrichards 
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 class name clash with Extension:GeoMath - change (mediawiki...GeoData[master])

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

Change subject: Fix class name clash with Extension:GeoMath
..


Fix class name clash with Extension:GeoMath

Change-Id: Ic432b90426a4144ffe0ed9bdc0789bea9e53d150
---
M GeoData.body.php
M GeoData.php
M GeoDataHooks.php
R GeoDataMath.php
M api/ApiQueryGeoSearchDB.php
M api/ApiQueryGeoSearchSolr.php
M api/ApiQueryGeoSearchSphinx.php
M solr/SolrGeoData.php
R tests/GeoDataMathTest.php
9 files changed, 15 insertions(+), 15 deletions(-)

Approvals:
  Brion VIBBER: Looks good to me, approved
  jenkins-bot: Verified; Looks good to me, but someone else must approve


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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic432b90426a4144ffe0ed9bdc0789bea9e53d150
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/GeoData
Gerrit-Branch: master
Gerrit-Owner: MaxSem 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: awjrichards 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Quick fix for mobile watchlist view failing on log entries. - change (mediawiki...MobileFrontend[master])

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

Change subject: Quick fix for mobile watchlist view failing on log entries.
..

Quick fix for mobile watchlist view failing on log entries.

If there's no rc_this_oldid specified (as for log entries), then just link to 
the page
rather than linking to Special:MobileDiff/0 which fails.

Change-Id: Ie085ba22f71297c3accbae267aae9e5017d104ba
---
M includes/specials/SpecialMobileWatchlist.php
1 file changed, 7 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/44/37044/1
--
To view, visit https://gerrit.wikimedia.org/r/37044
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie085ba22f71297c3accbae267aae9e5017d104ba
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
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 broken section toggling on tier 2 phones (bug 42749) - change (mediawiki...MobileFrontend[master])

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

Change subject: fix broken section toggling on tier 2 phones (bug 42749)
..


fix broken section toggling on tier 2 phones (bug 42749)

tier 2 phones being the one's we serve javascript but no jQuery
to test use DeviceDetection to force nokia as the device name

Change-Id: I8936897e54bf59729aa07db1aa663eb4045c4b6e
---
M javascripts/common/mf-application.js
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved
  JGonera: Looks good to me, but someone else must approve
  jenkins-bot: Looks good to me, but someone else must approve


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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8936897e54bf59729aa07db1aa663eb4045c4b6e
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: JGonera 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Mgrover 
Gerrit-Reviewer: awjrichards 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] [FileBackend] Removed obsolete "allowStale" parameter. - change (mediawiki/core[master])

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

Change subject: [FileBackend] Removed obsolete "allowStale" parameter.
..


[FileBackend] Removed obsolete "allowStale" parameter.

* This was obsoleted by doQuickOperations().

Change-Id: I9e1d9c1e1c910e4ce6de4317299424305b31469c
---
M includes/filebackend/FileBackend.php
M includes/filebackend/FileOp.php
M includes/filebackend/FileOpBatch.php
3 files changed, 2 insertions(+), 22 deletions(-)

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


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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9e1d9c1e1c910e4ce6de4317299424305b31469c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Demon 
Gerrit-Reviewer: Tim Starling 
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] Apply percent decoding to titles extracted from URLs - change (apps...wikipedia)

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

Change subject: Apply percent decoding to titles extracted from URLs
..


Apply percent decoding to titles extracted from URLs

Change-Id: If2cd04fff08a394467eb4b770e080fc80fa076da
---
M MediaWikiKit/MediaWikiKit/MWKSite.m
M MediaWikiKit/MediaWikiKitTests/MWKSiteTests.m
2 files changed, 4 insertions(+), 1 deletion(-)

Approvals:
  Brion VIBBER: Looks good to me, approved



diff --git a/MediaWikiKit/MediaWikiKit/MWKSite.m 
b/MediaWikiKit/MediaWikiKit/MWKSite.m
index 069b589..3377879 100644
--- a/MediaWikiKit/MediaWikiKit/MWKSite.m
+++ b/MediaWikiKit/MediaWikiKit/MWKSite.m
@@ -28,7 +28,8 @@
 - (MWKTitle *)titleWithInternalLink:(NSString *)path
 {
 if ([path hasPrefix:localLinkPrefix]) {
-NSString *remainder = [path substringFromIndex:localLinkPrefix.length];
+NSString *remainder = [[path substringFromIndex:localLinkPrefix.length]
+   
stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
 return [self titleWithString:remainder];
 } else {
 @throw [NSException exceptionWithName:@"SiteBadLinkFormatException" 
reason:@"unexpected local link format" userInfo:nil];
diff --git a/MediaWikiKit/MediaWikiKitTests/MWKSiteTests.m 
b/MediaWikiKit/MediaWikiKitTests/MWKSiteTests.m
index a396260..734b4e9 100644
--- a/MediaWikiKit/MediaWikiKitTests/MWKSiteTests.m
+++ b/MediaWikiKit/MediaWikiKitTests/MWKSiteTests.m
@@ -63,6 +63,8 @@
 XCTAssertEqualObjects([site 
titleWithInternalLink:@"/wiki/India"].prefixedText, @"India");
 XCTAssertEqualObjects([site 
titleWithInternalLink:@"/wiki/Talk:India"].prefixedText, @"Talk:India");
 XCTAssertEqualObjects([site 
titleWithInternalLink:@"/wiki/Talk:India#History"].prefixedText, @"Talk:India");
+XCTAssertEqualObjects([site titleWithInternalLink:@"/wiki/2008 ACC Men%27s 
Basketball Tournament"].prefixedText,
+  @"2008 ACC Men's Basketball Tournament");
 //XCTAssertThrows([site titleWithInternalLink:@"/upload/foobar"]);
 }
 

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

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

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


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

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

Change subject: Manual import of iOS string translations from TWN
..


Manual import of iOS string translations from TWN

Change-Id: I945481a03719b294eb15f1f39b1fcc2b44c33b94
---
M wikipedia/br.lproj/Localizable.strings
M wikipedia/es.lproj/Localizable.strings
M wikipedia/fa.lproj/Localizable.strings
M wikipedia/fi.lproj/Localizable.strings
A wikipedia/ka.lproj/Localizable.strings
A wikipedia/lt.lproj/Localizable.strings
M wikipedia/lt.lproj/Main_iPhone.strings
M wikipedia/pt-br.lproj/Localizable.strings
M wikipedia/tr.lproj/Localizable.strings
M wikipedia/zh-hant.lproj/Localizable.strings
10 files changed, 329 insertions(+), 6 deletions(-)

Approvals:
  Brion VIBBER: Looks good to me, approved



diff --git a/wikipedia/br.lproj/Localizable.strings 
b/wikipedia/br.lproj/Localizable.strings
index e411b91..f448f53 100644
--- a/wikipedia/br.lproj/Localizable.strings
+++ b/wikipedia/br.lproj/Localizable.strings
@@ -82,6 +82,11 @@
 "search-titles" = "Titloù";
 "search-within-articles" = "Er pennadoù";
 "search-did-you-mean" = "N'ho poa ket soñjet kentoc'h e : $1";
+"search-recent-title" = "Enklaskoù nevez";
+"search-recent-clear-confirmation-heading" = "Lemel an holl enklaskoù nevez";
+"search-recent-clear-confirmation-sub-heading" = "Ne c'hall ket an ober-mañ 
bezañ nullet !";
+"search-recent-clear-cancel" = "Nullañ";
+"search-recent-clear-delete-all" = "Lemel pep tra";
 "main-menu-title" = "Muioc'h";
 "main-menu-language-title" = "Furchal $1 Wikipedia";
 "main-menu-language-toggle-show" = "Diskouez ar yezhoù";
diff --git a/wikipedia/es.lproj/Localizable.strings 
b/wikipedia/es.lproj/Localizable.strings
index 468f283..5f052f2 100644
--- a/wikipedia/es.lproj/Localizable.strings
+++ b/wikipedia/es.lproj/Localizable.strings
@@ -87,7 +87,7 @@
 "search-did-you-mean" = "¿Quisiste decir $1?";
 "search-recent-title" = "Búsquedas recientes";
 "search-recent-clear-confirmation-heading" = "¿Borrar todas las búsquedas 
recientes?";
-"search-recent-clear-confirmation-sub-heading" = "¡Esta acción no se puede 
deshacer!";
+"search-recent-clear-confirmation-sub-heading" = "Esta acción no se puede 
deshacer.";
 "search-recent-clear-cancel" = "Cancelar";
 "search-recent-clear-delete-all" = "Borrar todas";
 "main-menu-title" = "Más";
diff --git a/wikipedia/fa.lproj/Localizable.strings 
b/wikipedia/fa.lproj/Localizable.strings
index 3d1c66a..ddedcd4 100644
--- a/wikipedia/fa.lproj/Localizable.strings
+++ b/wikipedia/fa.lproj/Localizable.strings
@@ -82,6 +82,14 @@
 "search-loading-section-remaining" = "در حال بارگیری بقیه مقاله...";
 "search-loading-article-loaded" = "مقاله بارگیری شده است.";
 "search-cancel" = "لغو";
+"search-titles" = "عنوان‌ها";
+"search-within-articles" = "در مقالات";
+"search-did-you-mean" = "منظورتان «$1» بود؟";
+"search-recent-title" = "جستجوهای اخیر";
+"search-recent-clear-confirmation-heading" = "حذف همهٔ آخرین جستجوها؟";
+"search-recent-clear-confirmation-sub-heading" = "این عمل نمی‌تواند برگردانده 
شود!";
+"search-recent-clear-cancel" = "لغو";
+"search-recent-clear-delete-all" = "حذف همه";
 "main-menu-title" = "بیشتر";
 "main-menu-language-title" = "جستجوی  $1  زبان ویکی";
 "main-menu-language-toggle-show" = "نمایش زبان‌ها";
@@ -151,6 +159,8 @@
 "about-title" = "درباره";
 "about-wikipedia" = "ویکی‌پدیا";
 "about-contributors" = "مشارکت‌کنندگان";
+"about-testers" = "آزمایشگر";
+"about-testers-details" = "QA توسط $1 آزموده شد";
 "about-translators" = "مترجم‌ها";
 "about-translators-details" = "این برنامه توسط مترجمان داوطلب در $1 ترجمه 
شده‌است";
 "about-libraries" = "کتابخانه‌های استفاده‌شده";
diff --git a/wikipedia/fi.lproj/Localizable.strings 
b/wikipedia/fi.lproj/Localizable.strings
index 12344d3..1a63fd7 100644
--- a/wikipedia/fi.lproj/Localizable.strings
+++ b/wikipedia/fi.lproj/Localizable.strings
@@ -4,6 +4,7 @@
 // Author: Jack Phoenix
 // Author: Nike
 // Author: Stryn
+// Author: SuperPete
 
 "article-languages-label" = "Valitse kieli";
 "article-languages-cancel" = "Peruuta";
@@ -34,6 +35,7 @@
 "zero-warn-when-leaving" = "Varoita poistuttaessa Wikipedia Zerosta";
 "zero-settings-devmode" = "Zeron kehitystila";
 "account-creation-captcha-required" = "CAPTCHA-varmistus vaaditaan.";
+"account-creation-captcha-obtaining" = "Haetaan uutta CAPTCHA-kuvaa.";
 "account-creation-logging-in" = "Kirjaudutaan...";
 "account-creation-passwords-mismatched" = "Salasanat eivät täsmää.";
 "account-creation-saving" = "Tallennetaan...";
@@ -57,6 +59,7 @@
 "wikitext-download-success" = "Sisältö ladattu.";
 "wikitext-preview-changes" = "Haetaan esikatselua tekemistäsi muutoksista...";
 "wikitext-preview-changes-none" = "Ei esikatseltavia muutoksia.";
+"wikitext-upload-result-unknown" = "wikitextin lähetystä ei voida varmistaa.";
 "wikitext-upload-captcha-error" = "Virhe CAPTCHA-varmistuksessa.";
 "wikitext-upload-captcha-needed" = "Vaaditaan CAPTCHA-varmistus.";
 "wikitext-upload-save" = "T

[MediaWiki-commits] [Gerrit] Re-added Wikidata descriptions to search results. - change (apps...wikipedia)

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

Change subject: Re-added Wikidata descriptions to search results.
..


Re-added Wikidata descriptions to search results.

No longer needs separate query to get them! Also now use
index property for ordering.

Note: Will need to route these descriptions to the article
record as soon as dust settles a bit more on the data layer
refactor. Although, just doing a search doesn't create an
article record, so we may not add descriptions to article
records until an article is actually loaded.

Change-Id: I5ebd0be0e2cd1d02f692818a9258fed4762d5f86
---
M wikipedia/Networking/Fetchers/SearchResultFetcher.m
M wikipedia/View Controllers/SearchResults/SearchResultAttributedString.m
M wikipedia/View Controllers/SearchResults/SearchResultsController.m
3 files changed, 43 insertions(+), 124 deletions(-)

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



diff --git a/wikipedia/Networking/Fetchers/SearchResultFetcher.m 
b/wikipedia/Networking/Fetchers/SearchResultFetcher.m
index 2e8ef6f..eb1f4c8 100644
--- a/wikipedia/Networking/Fetchers/SearchResultFetcher.m
+++ b/wikipedia/Networking/Fetchers/SearchResultFetcher.m
@@ -12,8 +12,6 @@
 #import "ArticleCoreDataObjects.h"
 #import "NSManagedObjectContext+SimpleFetch.h"
 
-#define GET_SNIPPET_WITH_IN_ARTICLE_RESULTS YES
-
 @interface SearchResultFetcher()
 
 @property (strong, nonatomic) NSString *domain;
@@ -128,15 +126,11 @@
  @"gpssearch": self.searchTerm,
  @"gpsnamespace": @0,
  @"gpslimit": @(SEARCH_MAX_RESULTS),
- @"prop": @"pageprops|pageimages",
- @"ppprop": @"wikibase_item",
+ @"prop": @"pageterms|pageimages",
  @"piprop": @"thumbnail",
+ @"wbptterms": @"description",
  @"pithumbsize" : @(SEARCH_THUMBNAIL_WIDTH),
  @"pilimit": @(SEARCH_MAX_RESULTS),
- @"list": @"prefixsearch",
- @"pssearch": self.searchTerm,
- @"pslimit": @(SEARCH_MAX_RESULTS),
- @"psnamespace": @0,
  @"format": @"json"
  };
 break;
@@ -144,8 +138,8 @@
 case SEARCH_TYPE_IN_ARTICLES:
 return @{
  @"action": @"query",
- @"prop": @"pageprops|pageimages",
- @"ppprop": @"wikibase_item",
+ @"prop": @"pageterms|pageimages",
+ @"wbptterms": @"description",
  @"generator": @"search",
  @"gsrsearch": self.searchTerm,
  @"gsrnamespace": @0,
@@ -154,14 +148,6 @@
  @"gsrprop": @"redirecttitle",
  @"gsroffset": @0,
  @"gsrlimit": @(SEARCH_MAX_RESULTS),
- @"list": @"search",
- @"srsearch": self.searchTerm,
- @"srnamespace": @0,
- @"srwhat": @"text",
- @"srinfo": @"suggestion",
- @"srprop": (GET_SNIPPET_WITH_IN_ARTICLE_RESULTS ? 
@"snippet" : @""),
- @"sroffset": @0,
- @"srlimit": @(SEARCH_MAX_RESULTS),
  @"piprop": @"thumbnail",
  @"pithumbsize" : @(SEARCH_THUMBNAIL_WIDTH),
  @"pilimit": @(SEARCH_MAX_RESULTS),
@@ -183,65 +169,46 @@
 if (query) {
 
 NSDictionary *pages = (NSDictionary *)query[@"pages"];
+
+NSSortDescriptor *sortByIndex = [NSSortDescriptor 
sortDescriptorWithKey: @"index"
+  
ascending: YES];
+if (!pages) return output;
 
-NSString *searchTypeString = (self.searchType == 
SEARCH_TYPE_TITLES) ? @"prefixsearch" : @"search";
-
-NSArray *pagesOrdered = (NSArray *)query[searchTypeString];
-
-if (pages && pagesOrdered) {
+NSArray *pagesOrdered = [pages.allValues 
sortedArrayUsingDescriptors:@[sortByIndex]];
 
-// Loop through the prefixsearch results (rather than the 
pages results) so we maintain correct order.
-// Based on 
https://gerrit.wikimedia.org/r/#/c/158011/2/javascripts/modules/search/SearchApi.js
-for (NSDictionary *prefixPage in pagesOrdered) {
-
-// "dictionaryWithDictionary" used because it creates a 
deep mutable copy of the __NSCFDictionary.
-NSMutableDictionary *mutablePrefixPage = 
[NSMutableDictionary dictionaryWithDictionary:prefixPage];
-
-// Add thumb placeholder.
-mutablePrefixPage[@"thumbnail"] = @{}.muta

[MediaWiki-commits] [Gerrit] Re-added Wikidata descriptions to Nearby results. - change (apps...wikipedia)

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

Change subject: Re-added Wikidata descriptions to Nearby results.
..


Re-added Wikidata descriptions to Nearby results.

Change-Id: I097919627aa755af21be5ccd676b042498bfc842
---
M wikipedia/Networking/Fetchers/NearbyFetcher.m
M wikipedia/View Controllers/Nearby/NearbyViewController.m
2 files changed, 14 insertions(+), 53 deletions(-)

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



diff --git a/wikipedia/Networking/Fetchers/NearbyFetcher.m 
b/wikipedia/Networking/Fetchers/NearbyFetcher.m
index 2c2cf0d..03f72a0 100644
--- a/wikipedia/Networking/Fetchers/NearbyFetcher.m
+++ b/wikipedia/Networking/Fetchers/NearbyFetcher.m
@@ -8,6 +8,7 @@
 #import "NSObject+Extras.h"
 #import "Defines.h"
 #import "WikipediaAppUtils.h"
+#import "NSString+Extras.h"
 
 @interface NearbyFetcher()
 
@@ -107,11 +108,11 @@
 {
 return @{
  @"action": @"query",
- @"prop": @"coordinates|pageimages|pageprops",
- @"ppprop": @"wikibase_item",
+ @"prop": @"coordinates|pageimages|pageterms",
  @"colimit": @"50",
  @"pithumbsize" : @(SEARCH_THUMBNAIL_WIDTH),
  @"pilimit": @"50",
+ @"wbptterms": @"description",
  @"generator": @"geosearch",
  @"ggscoord": [NSString stringWithFormat:@"%f|%f", self.latitude, 
self.longitude],
  @"ggsradius": @"1",
@@ -143,12 +144,18 @@
 if(pageImage)d[@"pageimage"] = pageImage;
 if(thumbnail)d[@"thumbnail"] = thumbnail;
 if(title)d[@"title"] = title;
-id pageprops = page[@"pageprops"];
-if ([pageprops isKindOfClass:[NSDictionary class]]) {
-if ([pageprops objectForKey:@"wikibase_item"]) {
-d[@"wikibase_item"] = pageprops[@"wikibase_item"];
+
+NSString *description = @"";
+NSDictionary *terms = page[@"terms"];
+if(terms && terms[@"description"]){
+NSArray *descriptions = terms[@"description"];
+if (descriptions && (descriptions.count > 0)) {
+description = descriptions[0];
+description = [description capitalizeFirstLetter];
 }
 }
+d[@"description"] = description;
+
 [nearbyResults addObject:d];
 }
 }
diff --git a/wikipedia/View Controllers/Nearby/NearbyViewController.m 
b/wikipedia/View Controllers/Nearby/NearbyViewController.m
index d9e7383..442ff3b 100644
--- a/wikipedia/View Controllers/Nearby/NearbyViewController.m
+++ b/wikipedia/View Controllers/Nearby/NearbyViewController.m
@@ -16,7 +16,6 @@
 #import "NSString+Extras.h"
 #import 
 #import "Defines.h"
-#import "WikiDataShortDescriptionFetcher.h"
 #import "NSString+Extras.h"
 #import "UITableView+DynamicCellHeight.h"
 
@@ -260,24 +259,6 @@
 self.nearbyDataArray = @[arraySortedByDistance];
 
 [self.tableView reloadData];
-
-// Get WikiData Id's to pass to 
WikiDataShortDescriptionFetcher.
-NSMutableArray *wikiDataIds = @[].mutableCopy;
-NSMutableDictionary *rowsData = (NSMutableDictionary 
*)self.nearbyDataArray[0];
-for (NSDictionary *page in rowsData) {
-id wikiDataId = page[@"wikibase_item"];
-if(wikiDataId && [wikiDataId isKindOfClass:[NSString 
class]]){
-[wikiDataIds addObject:wikiDataId];
-}
-}
-
-// Fetch WikiData short descriptions.
-if ((wikiDataIds.count > 0) && ENABLE_WIKIDATA_DESCRIPTIONS){
-(void)[[WikiDataShortDescriptionFetcher alloc] 
initAndFetchDescriptionsForIds: wikiDataIds
-   
searchType: SEARCH_TYPE_NEARBY
-   
   withManager: [QueuesSingleton sharedInstance].nearbyFetchManager
-   
thenNotifyDelegate: self];
-}
 }
 break;
 case FETCH_FINAL_STATUS_CANCELLED:
@@ -323,33 +304,6 @@
 break;
 case FETCH_FINAL_STATUS_FAILED:
 
-break;
-}
-}else if ([sender isKindOfClass:[WikiDataShortDescriptionFetcher class]]) {
-switch (status) {
-case FETCH_FINAL_STATUS_SUCCEEDED:{
-NSDictionary *wikiDataShortDescriptions = (NSDictionary 
*)fetchedData;
-
-// Add wikidata descriptions to respective search results.
-NSMutableDictiona

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

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

Change subject: Manual import of iOS string translations from TWN
..


Manual import of iOS string translations from TWN

Change-Id: Ibd2d885bdf4667354ff8d0acc079895a8c381887
---
M wikipedia/bn.lproj/InfoPlist.strings
M wikipedia/bn.lproj/Localizable.strings
M wikipedia/bn.lproj/Main_iPhone.strings
A wikipedia/ka.lproj/InfoPlist.strings
M wikipedia/ka.lproj/Localizable.strings
A wikipedia/ka.lproj/Main_iPhone.strings
M wikipedia/ko.lproj/Localizable.strings
M wikipedia/lb.lproj/Localizable.strings
M wikipedia/mk.lproj/Localizable.strings
M wikipedia/ms.lproj/Localizable.strings
10 files changed, 134 insertions(+), 15 deletions(-)

Approvals:
  Brion VIBBER: Looks good to me, approved



diff --git a/wikipedia/bn.lproj/InfoPlist.strings 
b/wikipedia/bn.lproj/InfoPlist.strings
index 17b96a9..d408ff8 100644
--- a/wikipedia/bn.lproj/InfoPlist.strings
+++ b/wikipedia/bn.lproj/InfoPlist.strings
@@ -1,5 +1,6 @@
 // Messages for Bengali (বাংলা)
 // Exported from translatewiki.net
 // Author: Aftab1995
+// Author: Aftabuzzaman
 
 "CFBundleDisplayName" = "উইকিপিডিয়া";
diff --git a/wikipedia/bn.lproj/Localizable.strings 
b/wikipedia/bn.lproj/Localizable.strings
index cc456d1..f8b2292 100644
--- a/wikipedia/bn.lproj/Localizable.strings
+++ b/wikipedia/bn.lproj/Localizable.strings
@@ -1,6 +1,7 @@
 // Messages for Bengali (বাংলা)
 // Exported from translatewiki.net
 // Author: Aftab1995
+// Author: Aftabuzzaman
 // Author: Tauhid16
 
 "article-languages-label" = "ভাষা নির্বাচন করুন";
diff --git a/wikipedia/bn.lproj/Main_iPhone.strings 
b/wikipedia/bn.lproj/Main_iPhone.strings
index b4f9ce3..eda32ba 100644
--- a/wikipedia/bn.lproj/Main_iPhone.strings
+++ b/wikipedia/bn.lproj/Main_iPhone.strings
@@ -1,6 +1,7 @@
 // Messages for Bengali (বাংলা)
 // Exported from translatewiki.net
 // Author: Aftab1995
+// Author: Aftabuzzaman
 
 "21c-U6-yfo.normalTitle" = "আরেকটি ক্যাপচা দেখান";
 "5cT-2Y-0Ie.placeholder" = "ব্যবহারকারী নাম";
diff --git a/wikipedia/ka.lproj/InfoPlist.strings 
b/wikipedia/ka.lproj/InfoPlist.strings
new file mode 100644
index 000..2e01486
--- /dev/null
+++ b/wikipedia/ka.lproj/InfoPlist.strings
@@ -0,0 +1,5 @@
+// Messages for Georgian (ქართული)
+// Exported from translatewiki.net
+// Author: MIKHEIL
+
+"CFBundleDisplayName" = "ვიკიპედია";
diff --git a/wikipedia/ka.lproj/Localizable.strings 
b/wikipedia/ka.lproj/Localizable.strings
index 0d2192b..860f3f1 100644
--- a/wikipedia/ka.lproj/Localizable.strings
+++ b/wikipedia/ka.lproj/Localizable.strings
@@ -7,30 +7,49 @@
 "article-languages-cancel" = "გაუქმება";
 "article-languages-downloading" = "სტატიის ენები იტვირთება...";
 "article-languages-filter-placeholder" = "ენის ფილტრი";
+"language-button-text" = "ამ სტატიის წაკითხვა შეგიძლიათ % სხვა ენებზე";
 "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-charged-verbiage" = "ვიკიპედია ზერო გამორთულია";
+"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-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" = "თქვენ მიერ მითითებული პაროლი არასწორია.";
+"login-throttled" = "მოკლე დროის მანძილზე საკმაოდ ბევრჯერ შეხვედით.";
 "login-user-blocked" = "მომხმარებელი ბლოკირებულია.";
 "login-account-creation" = "არ გაქვს ანგარიში? შეუერთდი ვიკიპედიას.";
 "login-username-placeholder-text" = "მომხმარებლის სახელი";
 "login-password-placeholder-text" 

[MediaWiki-commits] [Gerrit] Moved angle/distance calc into Nearby controller. - change (apps...wikipedia)

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

Change subject: Moved angle/distance calc into Nearby controller.
..


Moved angle/distance calc into Nearby controller.

Also sped things up a bit by dealing with coordinates with
lighter weight struct rather than location object.

Change-Id: I957a72b25205415318d809b4899dc33dd927bb8a
---
M wikipedia/Networking/Fetchers/NearbyFetcher.m
M wikipedia/View Controllers/Nearby/NearbyResultCollectionCell.h
M wikipedia/View Controllers/Nearby/NearbyResultCollectionCell.m
M wikipedia/View Controllers/Nearby/NearbyThumbnailView.h
M wikipedia/View Controllers/Nearby/NearbyThumbnailView.m
M wikipedia/View Controllers/Nearby/NearbyViewController.m
6 files changed, 141 insertions(+), 189 deletions(-)

Approvals:
  Brion VIBBER: Looks good to me, approved



diff --git a/wikipedia/Networking/Fetchers/NearbyFetcher.m 
b/wikipedia/Networking/Fetchers/NearbyFetcher.m
index 03f72a0..f7ecce6 100644
--- a/wikipedia/Networking/Fetchers/NearbyFetcher.m
+++ b/wikipedia/Networking/Fetchers/NearbyFetcher.m
@@ -106,6 +106,8 @@
 
 -(NSDictionary *)getParams
 {
+NSString *coords =
+[NSString stringWithFormat:@"%f|%f", self.latitude, self.longitude];
 return @{
  @"action": @"query",
  @"prop": @"coordinates|pageimages|pageterms",
@@ -114,7 +116,8 @@
  @"pilimit": @"50",
  @"wbptterms": @"description",
  @"generator": @"geosearch",
- @"ggscoord": [NSString stringWithFormat:@"%f|%f", self.latitude, 
self.longitude],
+ @"ggscoord": coords,
+ @"codistancefrompoint": coords,
  @"ggsradius": @"1",
  @"ggslimit": @"50",
  @"format": @"json"
@@ -139,7 +142,16 @@
 NSString *title = page[@"title"];
 
 NSMutableDictionary *d = @{}.mutableCopy;
-if(coords)d[@"coordinates"] = coords;
+
+NSNumber *lat = coords[@"lat"];
+NSNumber *lon = coords[@"lon"];
+if(lat && lon){
+CLLocationCoordinate2D coordinates = 
CLLocationCoordinate2DMake(lat.doubleValue, lon.doubleValue);
+d[@"coordinate"] = [NSValue value:&coordinates 
withObjCType:@encode(CLLocationCoordinate2D)];
+}
+
+NSNumber *dist = coords[@"dist"];
+if(dist)d[@"initialDistance"] = dist;
 if(pageId)d[@"pageid"] = pageId;
 if(pageImage)d[@"pageimage"] = pageImage;
 if(thumbnail)d[@"thumbnail"] = thumbnail;
diff --git a/wikipedia/View Controllers/Nearby/NearbyResultCollectionCell.h 
b/wikipedia/View Controllers/Nearby/NearbyResultCollectionCell.h
index 617eaa4..078fa8d 100644
--- a/wikipedia/View Controllers/Nearby/NearbyResultCollectionCell.h
+++ b/wikipedia/View Controllers/Nearby/NearbyResultCollectionCell.h
@@ -11,11 +11,8 @@
 @property (weak, nonatomic) IBOutlet NearbyThumbnailView *thumbView;
 
 @property (strong, nonatomic) NSNumber *distance;
-@property (nonatomic) CLLocationCoordinate2D location;
-@property (nonatomic) CLLocationCoordinate2D deviceLocation;
 @property (nonatomic) BOOL headingAvailable;
-@property (nonatomic) CLLocationDirection deviceHeading;
-@property (nonatomic) UIInterfaceOrientation interfaceOrientation;
+@property (nonatomic) double angle;
 
 @property (strong, nonatomic) UILongPressGestureRecognizer 
*longPressRecognizer;
 
diff --git a/wikipedia/View Controllers/Nearby/NearbyResultCollectionCell.m 
b/wikipedia/View Controllers/Nearby/NearbyResultCollectionCell.m
index d59130f..5aa4029 100644
--- a/wikipedia/View Controllers/Nearby/NearbyResultCollectionCell.m
+++ b/wikipedia/View Controllers/Nearby/NearbyResultCollectionCell.m
@@ -9,9 +9,6 @@
 #import "NSObject+ConstraintsScale.h"
 #import "UIView+Debugging.h"
 
-#define RADIANS_TO_DEGREES(radians) ((radians) * (180.0f / M_PI))
-#define DEGREES_TO_RADIANS(angle) ((angle) / 180.0f * M_PI)
-
 #define TITLE_FONT [UIFont systemFontOfSize:(17.0f * MENUS_SCALE_MULTIPLIER)]
 #define TITLE_FONT_COLOR [UIColor blackColor]
 
@@ -93,8 +90,8 @@
 if (self) {
 self.longPressRecognizer = nil;
 self.distance = nil;
-self.location = CLLocationCoordinate2DMake(0, 0);
-self.deviceLocation = CLLocationCoordinate2DMake(0, 0);
+self.angle = 0.0;
+self.headingAvailable = NO;
 }
 return self;
 }
@@ -161,95 +158,16 @@
 }
 }
 
--(void)setLocation:(CLLocationCoordinate2D)location
+-(void)setAngle:(double)angle
 {
-_location = location;
-
-[self applyRotationTransform];
+_angle = angle;
+self.thumbView.angle = angle;
 }
 
--(void)setDeviceHeading:(CLLocationDirection)deviceHeading
+-(void)setHeadingAvailable:(BOOL)headingAvailable
 {
-_deviceHeading = deviceHeading;
-
-[self applyRotationTransform];
+_headingAvailable = headingAvail

[MediaWiki-commits] [Gerrit] Made Nearby use UICollectionView. - change (apps...wikipedia)

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

Change subject: Made Nearby use UICollectionView.
..


Made Nearby use UICollectionView.

Change-Id: I8aa5a50aa21c26deba4b0de752a4e83668f749fa
---
M Wikipedia.xcodeproj/project.pbxproj
M wikipedia/Base.lproj/Main_iPhone.storyboard
A wikipedia/Categories/UICollectionViewCell+DynamicCellHeight.h
A wikipedia/Categories/UICollectionViewCell+DynamicCellHeight.m
D wikipedia/View Controllers/Nearby/NearbyResultCell.xib
R wikipedia/View Controllers/Nearby/NearbyResultCollectionCell.h
R wikipedia/View Controllers/Nearby/NearbyResultCollectionCell.m
A wikipedia/View Controllers/Nearby/NearbyResultCollectionCell.xib
M wikipedia/View Controllers/Nearby/NearbyViewController.h
M wikipedia/View Controllers/Nearby/NearbyViewController.m
10 files changed, 252 insertions(+), 183 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 d0b55c8..5857f2f 100644
--- a/Wikipedia.xcodeproj/project.pbxproj
+++ b/Wikipedia.xcodeproj/project.pbxproj
@@ -55,6 +55,9 @@
04414DDB1A140FAF00A41B4E /* SearchDidYouMeanButton.m in Sources 
*/ = {isa = PBXBuildFile; fileRef = 04414DDA1A140FAF00A41B4E /* 
SearchDidYouMeanButton.m */; };
04414DDF1A1420EB00A41B4E /* WikiDataShortDescriptionFetcher.m 
in Sources */ = {isa = PBXBuildFile; fileRef = 04414DDE1A1420EB00A41B4E /* 
WikiDataShortDescriptionFetcher.m */; };
0442F57B19006DCC00F55DF9 /* PageHistoryLabel.m in Sources */ = 
{isa = PBXBuildFile; fileRef = 0442F57A19006DCC00F55DF9 /* PageHistoryLabel.m 
*/; };
+   0443961B1A3C11A30081557D /* NearbyResultCollectionCell.m in 
Sources */ = {isa = PBXBuildFile; fileRef = 0443961A1A3C11A30081557D /* 
NearbyResultCollectionCell.m */; };
+   0443961D1A3C134F0081557D /* NearbyResultCollectionCell.xib in 
Resources */ = {isa = PBXBuildFile; fileRef = 0443961C1A3C134F0081557D /* 
NearbyResultCollectionCell.xib */; };
+   044396231A3D33030081557D /* 
UICollectionViewCell+DynamicCellHeight.m in Sources */ = {isa = PBXBuildFile; 
fileRef = 044396221A3D33030081557D /* UICollectionViewCell+DynamicCellHeight.m 
*/; };
0447862F185145090050563B /* HistoryResultCell.m in Sources */ = 
{isa = PBXBuildFile; fileRef = 04478621185145090050563B /* HistoryResultCell.m 
*/; };
04478631185145090050563B /* HistoryResultPrototypeView.xib in 
Resources */ = {isa = PBXBuildFile; fileRef = 04478622185145090050563B /* 
HistoryResultPrototypeView.xib */; };
04478633185145090050563B /* HistoryViewController.m in Sources 
*/ = {isa = PBXBuildFile; fileRef = 04478624185145090050563B /* 
HistoryViewController.m */; };
@@ -82,14 +85,12 @@
047528B5191465C400F2CDA8 /* Article.m in Sources */ = {isa = 
PBXBuildFile; fileRef = 047528B4191465C400F2CDA8 /* Article.m */; };
047801BE18AE987900DBB747 /* UIButton+ColorMask.m in Sources */ 
= {isa = PBXBuildFile; fileRef = 047801BD18AE987900DBB747 /* 
UIButton+ColorMask.m */; };
047E74141860509000916964 /* SavedPagesResultPrototypeView.xib 
in Resources */ = {isa = PBXBuildFile; fileRef = 047E74131860509000916964 /* 
SavedPagesResultPrototypeView.xib */; };
-   047E95501996DD030046A122 /* NearbyResultCell.m in Sources */ = 
{isa = PBXBuildFile; fileRef = 047E954C1996DD030046A122 /* NearbyResultCell.m 
*/; };
047E95511996DD030046A122 /* NearbyViewController.m in Sources 
*/ = {isa = PBXBuildFile; fileRef = 047E954E1996DD030046A122 /* 
NearbyViewController.m */; };
047ED63918C13E4900442BE3 /* PreviewWebView.m in Sources */ = 
{isa = PBXBuildFile; fileRef = 047ED63818C13E4900442BE3 /* PreviewWebView.m */; 
};
047FF5471889078C009DB293 /* Image+Convenience.m in Sources */ = 
{isa = PBXBuildFile; fileRef = 047FF5461889078C009DB293 /* Image+Convenience.m 
*/; };
04821CD119895EDC007558F6 /* ReferenceGradientView.m in Sources 
*/ = {isa = PBXBuildFile; fileRef = 04821CD019895EDC007558F6 /* 
ReferenceGradientView.m */; };
0484411E19FF15AF00FD26C5 /* AboutViewController.plist in 
Resources */ = {isa = PBXBuildFile; fileRef = 0484411D19FF15AF00FD26C5 /* 
AboutViewController.plist */; };
0484E3DE19D9D19B0085D18D /* UIView+ConstraintsScale.m in 
Sources */ = {isa = PBXBuildFile; fileRef = 0484E3DD19D9D19B0085D18D /* 
UIView+ConstraintsScale.m */; };
-   0485FECF1994D5AE00141361 /* NearbyResultCell.xib in Resources 
*/ = {isa = PBXBuildFile; fileRef = 0485FECD1994D5AE00141361 /* 
NearbyResultCell.xib */; };
0487041419F7683300B7D307 /* Cocoapods Notes.txt in Resources */ 
= {isa = PBXBuildFile; fileRef = 0487041319F7683300B7D307 /* Cocoapods 
Notes.txt */; };
0487045519F824D700B

[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


[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] Tweaks to Recent Searches. - change (apps...wikipedia)

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

Change subject: Tweaks to Recent Searches.
..


Tweaks to Recent Searches.

Also now handles really long search terms. As much as I'm
normally against truncation and "...", this is a good
place for it.

Change-Id: I3a0175d103f8e96d424abee604836603922d2452
---
M wikipedia/View Controllers/RecentSearches/RecentSearchCell.m
M wikipedia/View Controllers/RecentSearches/RecentSearchCell.xib
2 files changed, 62 insertions(+), 8 deletions(-)

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



diff --git a/wikipedia/View Controllers/RecentSearches/RecentSearchCell.m 
b/wikipedia/View Controllers/RecentSearches/RecentSearchCell.m
index 602c348..08eb1be 100644
--- a/wikipedia/View Controllers/RecentSearches/RecentSearchCell.m
+++ b/wikipedia/View Controllers/RecentSearches/RecentSearchCell.m
@@ -5,22 +5,41 @@
 #import "PaddedLabel.h"
 #import "NSObject+ConstraintsScale.h"
 #import "Defines.h"
+#import "WikiGlyph_Chars.h"
 
 #define FONT_SIZE (16.0f * MENUS_SCALE_MULTIPLIER)
-#define FONT_COLOR [UIColor grayColor];
+#define FONT_COLOR [UIColor grayColor]
+#define ICON_SIZE (20.0f * MENUS_SCALE_MULTIPLIER)
+#define ICON_GLYPH WIKIGLYPH_MAGNIFYING_GLASS
+#define BORDER_COLOR [UIColor colorWithWhite:0.9 alpha:1.0]
+#define MAGNIFY_ICON_COLOR [UIColor colorWithWhite:0.8 alpha:1.0]
+
+@interface RecentSearchCell()
+
+@property (weak, nonatomic) IBOutlet NSLayoutConstraint 
*topBorderHeightConstraint;
+@property (weak, nonatomic) IBOutlet UIView *topBorderView;
+@property (strong, nonatomic) NSAttributedString *magnifyIconString;
+@property (weak, nonatomic) IBOutlet PaddedLabel *iconLabel;
+
+@end
 
 @implementation RecentSearchCell
 
-- (void)awakeFromNib {
-// Initialization code
-
+- (void)awakeFromNib
+{
 self.selectionStyle = UITableViewCellSelectionStyleNone;
 
+self.iconLabel.attributedText = [self getAttributedIconString];
+self.topBorderView.backgroundColor = BORDER_COLOR;
+self.topBorderHeightConstraint.constant = 1.0f / [UIScreen 
mainScreen].scale;
 self.label.font = [UIFont systemFontOfSize:FONT_SIZE];
 
+self.label.numberOfLines = 1;
+self.label.lineBreakMode = NSLineBreakByTruncatingTail; // <-- Don't make 
truncating a habit! :) Is bad.
+
 self.label.textColor = FONT_COLOR;
 
-[self adjustConstraintsScaleForViews:@[self.label]];
+[self adjustConstraintsScaleForViews:@[self.label, self.iconLabel]];
 }
 
 - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
@@ -29,4 +48,14 @@
 // Configure the view for the selected state
 }
 
+-(NSAttributedString *)getAttributedIconString
+{
+return [[NSAttributedString alloc] initWithString: ICON_GLYPH
+   attributes: @{
+ NSFontAttributeName: 
[UIFont fontWithName:@"WikiFont-Glyphs" size:ICON_SIZE],
+ 
NSForegroundColorAttributeName : MAGNIFY_ICON_COLOR,
+ 
NSBaselineOffsetAttributeName: @0
+ }];
+}
+
 @end
diff --git a/wikipedia/View Controllers/RecentSearches/RecentSearchCell.xib 
b/wikipedia/View Controllers/RecentSearches/RecentSearchCell.xib
index 990eb32..15c5d5b 100644
--- a/wikipedia/View Controllers/RecentSearches/RecentSearchCell.xib
+++ b/wikipedia/View Controllers/RecentSearches/RecentSearchCell.xib
@@ -15,23 +15,48 @@
 
 
 
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 
 
 
 
 
 
+
 
 
+
 
-
+
+
+
+
+
 
 
 
+
 
+
+
 
-
+
 
 
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3a0175d103f8e96d424abee604836603922d2452
Gerrit-PatchSet: 3
Gerrit-Project: apps/ios/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Mhurd 
Gerrit-Reviewe

[MediaWiki-commits] [Gerrit] Made lang picker define delegate for selection notification. - change (apps...wikipedia)

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

Change subject: Made lang picker define delegate for selection notification.
..


Made lang picker define delegate for selection notification.

Got rid of a weird compiler warning related to "NAV" define.

Fixed scale of "Searching..." message on iPad.

Change-Id: Ie85937244af7f04255d2594144a027b00afcb34a
---
M wikipedia/View Controllers/Languages/LanguagesViewController.h
M wikipedia/View Controllers/Languages/LanguagesViewController.m
M wikipedia/View Controllers/Navigation/Center/CenterNavController.h
M wikipedia/View Controllers/Navigation/Center/CenterNavController.m
M wikipedia/View Controllers/Navigation/Secondary/SecondaryMenuViewController.m
M wikipedia/View Controllers/Navigation/Top/TopMenuViewController.m
M wikipedia/View Controllers/SearchResults/SearchMessageLabel.m
M wikipedia/View Controllers/WebView/WebViewController.m
M wikipedia/Wikipedia-Prefix.pch
9 files changed, 47 insertions(+), 74 deletions(-)

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



diff --git a/wikipedia/View Controllers/Languages/LanguagesViewController.h 
b/wikipedia/View Controllers/Languages/LanguagesViewController.h
index 299ed87..131ad36 100644
--- a/wikipedia/View Controllers/Languages/LanguagesViewController.h
+++ b/wikipedia/View Controllers/Languages/LanguagesViewController.h
@@ -5,6 +5,13 @@
 #import "TopMenuViewController.h"
 #import "FetcherBase.h"
 
+@class LanguagesViewController;
+
+// Protocol for notifying languageSelectionDelegate that selection was made.
+@protocol LanguageSelectionDelegate 
+- (void)languageSelected:(NSDictionary *)langData 
sender:(LanguagesViewController *)sender;
+@end
+
 @interface LanguagesViewController : UIViewController 
 
 @property (nonatomic) BOOL downloadLanguagesForCurrentArticle;
@@ -17,4 +24,7 @@
 
 @property (strong, nonatomic) IBOutlet UITableView *tableView;
 
+// Object to receive "languageSelected:sender:" notifications.
+@property (nonatomic, weak) id  
languageSelectionDelegate;
+
 @end
diff --git a/wikipedia/View Controllers/Languages/LanguagesViewController.m 
b/wikipedia/View Controllers/Languages/LanguagesViewController.m
index 4ef6f17..21075ca 100644
--- a/wikipedia/View Controllers/Languages/LanguagesViewController.m
+++ b/wikipedia/View Controllers/Languages/LanguagesViewController.m
@@ -259,10 +259,7 @@
 - (void)tableView:(UITableView *)tableView 
didSelectRowAtIndexPath:(NSIndexPath *)indexPath
 {
 NSDictionary *selectedLangInfo = self.filteredLanguagesData[indexPath.row];
-
-[[NSNotificationCenter defaultCenter] postNotificationName: 
@"LanguageItemSelected"
-object: self
-  userInfo: 
selectedLangInfo];
+[self.languageSelectionDelegate languageSelected:selectedLangInfo 
sender:self];
 }
 
 #pragma mark - Memory
diff --git a/wikipedia/View Controllers/Navigation/Center/CenterNavController.h 
b/wikipedia/View Controllers/Navigation/Center/CenterNavController.h
index 85d7aa0..5e74975 100644
--- a/wikipedia/View Controllers/Navigation/Center/CenterNavController.h
+++ b/wikipedia/View Controllers/Navigation/Center/CenterNavController.h
@@ -34,6 +34,8 @@
 -(ArticleDiscoveryMethod)getDiscoveryMethodForString:(NSString *)string;
 -(NSString *)getStringForDiscoveryMethod:(ArticleDiscoveryMethod)method;
 
+-(void)switchPreferredLanguageToId:(NSString *)languageId name:(NSString 
*)name;
+
 @property (nonatomic) BOOL isTransitioningBetweenViewControllers;
 
 @end
diff --git a/wikipedia/View Controllers/Navigation/Center/CenterNavController.m 
b/wikipedia/View Controllers/Navigation/Center/CenterNavController.m
index 99f8a02..9df9461 100644
--- a/wikipedia/View Controllers/Navigation/Center/CenterNavController.m
+++ b/wikipedia/View Controllers/Navigation/Center/CenterNavController.m
@@ -209,7 +209,7 @@
domain: [SessionSingleton 
sharedInstance].currentArticleDomain];
 }];
 if (!articleID) {
-[NAV loadTodaysArticle];
+[self loadTodaysArticle];
 }
 }
 
@@ -233,7 +233,7 @@
 NSString *title = (NSString *)userData;
 if (title) {
 MWPageTitle *pageTitle = [MWPageTitle 
titleWithString:title];
-[NAV loadArticleWithTitle: pageTitle
+[self loadArticleWithTitle: pageTitle
domain: [SessionSingleton 
sharedInstance].domain
  animated: YES
   discoveryMethod: DISCOVERY_METHOD_RANDOM
@@ -245,10 +245,28 @@
 case FETCH_FINAL_STATUS_CANCELLED:
 break;
 case FETCH_FINAL_STATUS_FAILED:
-//[NAV showAlert:error.localizedDescription 
type:ALERT_TYPE_TOP duration:-1];
+//[self showAler

[MediaWiki-commits] [Gerrit] Search shows new results without blanking results. - change (apps...wikipedia)

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

Change subject: Search shows new results without blanking results.
..


Search shows new results without blanking results.

Much less jarring visually. Also small style tweaks adding a bit
more padding above and below the search "Titles/In Articles" buttons.

Change-Id: I1896e0139cd0b029f73329b432a4ee4b53212463
---
M wikipedia/Base.lproj/Main_iPhone.storyboard
M wikipedia/View Controllers/SearchResults/SearchResultsController.m
M wikipedia/View Controllers/SearchResults/SearchTypeMenu.m
3 files changed, 72 insertions(+), 11 deletions(-)

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



diff --git a/wikipedia/Base.lproj/Main_iPhone.storyboard 
b/wikipedia/Base.lproj/Main_iPhone.storyboard
index 603b90e..8c24700 100644
--- a/wikipedia/Base.lproj/Main_iPhone.storyboard
+++ b/wikipedia/Base.lproj/Main_iPhone.storyboard
@@ -1056,7 +1056,7 @@
 
 
 
-
+
 
 
 
diff --git a/wikipedia/View Controllers/SearchResults/SearchResultsController.m 
b/wikipedia/View Controllers/SearchResults/SearchResultsController.m
index a112470..42cdbec 100644
--- a/wikipedia/View Controllers/SearchResults/SearchResultsController.m
+++ b/wikipedia/View Controllers/SearchResults/SearchResultsController.m
@@ -48,6 +48,8 @@
 
 @property (nonatomic, weak) IBOutlet UIView *recentSearchesContainer;
 
+@property (nonatomic) BOOL ignoreScrollEvents;
+
 @end
 
 @implementation SearchResultsController
@@ -94,6 +96,7 @@
 {
 [super viewDidLoad];
 
+self.ignoreScrollEvents = NO;
 self.searchString = @"";
 
 self.placeholderImage = [UIImage 
imageNamed:@"logo-placeholder-search.png"];
@@ -235,6 +238,8 @@
 
 - (void)scrollViewDidScroll:(UIScrollView *)scrollView
 {
+if (self.ignoreScrollEvents) return;
+
 // Hide the keyboard if it was visible when the results are scrolled, but 
only if
 // the results have been scrolled in excess of some small distance 
threshold first.
 // This prevents tiny scroll adjustments, which seem to occur occasionally 
for some
@@ -304,7 +309,7 @@
 [self fadeAlert];
 break;
 case FETCH_FINAL_STATUS_FAILED:
-[self.searchMessageLabel 
showWithText:error.localizedDescription];
+//[self.searchMessageLabel 
showWithText:error.localizedDescription];
 //[self showAlert:error.localizedDescription 
type:ALERT_TYPE_MIDDLE duration:-1];
 break;
 }
@@ -380,14 +385,29 @@
 }
 }
 
+-(void)scrollTableToTop
+{
+if ([self.searchResultsTable numberOfRowsInSection:0] > 0) {
+// Ignore scroll event so keyboard doesn't disappear.
+self.ignoreScrollEvents = YES;
+[UIView animateWithDuration:0.15f animations:^{
+[self.searchResultsTable scrollToRowAtIndexPath: [NSIndexPath 
indexPathForRow:0 inSection:0]
+   atScrollPosition: 
UITableViewScrollPositionTop
+   animated: NO];
+} completion:^(BOOL done){
+self.ignoreScrollEvents = NO;
+}];
+}
+}
+
 - (void)searchForTerm:(NSString *)searchTerm
 {
-[self clearSearchResults];
+[self scrollTableToTop];
 
 [self.searchMessageLabel hide];
 
 // Show "Searching..." message.
-[self.searchMessageLabel 
showWithText:MWLocalizedString(@"search-searching", nil)];
+//[self.searchMessageLabel 
showWithText:MWLocalizedString(@"search-searching", nil)];
 
 //[self showAlert:MWLocalizedString(@"search-searching", nil) 
type:ALERT_TYPE_MIDDLE duration:-1];
 
diff --git a/wikipedia/View Controllers/SearchResults/SearchTypeMenu.m 
b/wikipedia/View Controllers/SearchResults/SearchTypeMenu.m
index aa19158..ff2aa7a 100644
--- a/wikipedia/View Controllers/SearchResults/SearchTypeMenu.m
+++ b/wikipedia/View Controllers/SearchResults/SearchTypeMenu.m
@@ -11,10 +11,10 @@
 #define CORNER_RADIUS (2.0f * MENUS_SCALE_MULTIPLIER)
 #define CORNERS_LEFT (UIRectCornerTopLeft|UIRectCornerBottomLeft)
 #define CORNERS_RIGHT (UIRectCornerTopRight|UIRectCornerBottomRight)
-#define BACKGROUND_COLOR SEARCH_BUTTON_BACKGROUND_COLOR
+#define BACKGROUND_COLOR [UIColor whiteColor]
 #define BORDER_WIDTH (1.0f / [UIScreen mainScreen].scale)
 #define BUTTON_PADDING (UIEdgeInsetsMake(6.0f, 6.0f, 6.0f, 6.0f))
-#define BUTTON_MARGIN (UIEdgeInsetsMake(6.0f, 12.0f, 4.0f, 12.0f))
+#define BUTTON_MARGIN (UIEdgeInsetsMake(10.0f, 12.0f, 10.0f, 12.0f))
 
 @interface SearchTypeMenu()
 
@@ -30,17 +30,17 @@
 _searchType = type;
 switch (type) {
 case SEARCH_TYPE_TITLES:
-self.sea

[MediaWiki-commits] [Gerrit] Limit recent search items to 100. - change (apps...wikipedia)

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

Change subject: Limit recent search items to 100.
..


Limit recent search items to 100.

Since these are stored in a flat file we don't want to thrash if a
user did a bazillion searches without clearing their recent items.

Change-Id: Iec0f6585c8db160e3305402b240ed1c2aa3b4219
---
M wikipedia/View Controllers/RecentSearches/RecentSearchesViewController.m
1 file changed, 5 insertions(+), 0 deletions(-)

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



diff --git a/wikipedia/View 
Controllers/RecentSearches/RecentSearchesViewController.m b/wikipedia/View 
Controllers/RecentSearches/RecentSearchesViewController.m
index 7674c96..6ed91e6 100644
--- a/wikipedia/View Controllers/RecentSearches/RecentSearchesViewController.m
+++ b/wikipedia/View Controllers/RecentSearches/RecentSearchesViewController.m
@@ -24,6 +24,7 @@
 #define TRASH_COLOR [UIColor grayColor]
 #define TRASH_DISABLED_COLOR [UIColor lightGrayColor]
 #define PLIST_FILE_NAME @"Recent.plist"
+#define LIMIT 100
 
 @interface RecentSearchesViewController ()
 
@@ -103,6 +104,10 @@
 @"timestamp": [NSDate date],
 @"type": @(searchType)
 } atIndex:0];
+
+if(self.tableDataArray.count > LIMIT){
+self.tableDataArray = [self.tableDataArray 
subarrayWithRange:NSMakeRange(0, LIMIT)].mutableCopy;
+}
 
 [self saveDataArrayToFile];
 [self.table reloadData];

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iec0f6585c8db160e3305402b240ed1c2aa3b4219
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] Enabled "fastest" optimization setting. - change (apps...wikipedia)

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

Change subject: Enabled "fastest" optimization setting.
..


Enabled "fastest" optimization setting.

Change-Id: I59bf62f9e487a0cd902bc02c3569170cfe6f3da2
---
M Wikipedia.xcodeproj/project.pbxproj
1 file changed, 1 insertion(+), 0 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 0ab5181..1971e3b 100644
--- a/Wikipedia.xcodeproj/project.pbxproj
+++ b/Wikipedia.xcodeproj/project.pbxproj
@@ -2603,6 +2603,7 @@
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = 
LaunchImage;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone 
Developer";
+   GCC_OPTIMIZATION_LEVEL = 3;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = 
"wikipedia/Wikipedia-Prefix.pch";
HEADER_SEARCH_PATHS = (

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I59bf62f9e487a0cd902bc02c3569170cfe6f3da2
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] Update AFNetworking to 2.5 - change (apps...wikipedia)

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

Change subject: Update AFNetworking to 2.5
..


Update AFNetworking to 2.5

Change-Id: I993d925de20366b2dda2f396ed5694f4126453ec
---
M Wikipedia.xcodeproj/project.pbxproj
M cocoapods/Podfile
M cocoapods/Podfile.lock
M cocoapods/Pods/AFNetworking/AFNetworking/AFHTTPSessionManager.h
M cocoapods/Pods/AFNetworking/AFNetworking/AFSecurityPolicy.h
M cocoapods/Pods/AFNetworking/AFNetworking/AFSecurityPolicy.m
M cocoapods/Pods/AFNetworking/AFNetworking/AFURLConnectionOperation.m
M cocoapods/Pods/AFNetworking/AFNetworking/AFURLRequestSerialization.h
M cocoapods/Pods/AFNetworking/AFNetworking/AFURLRequestSerialization.m
M cocoapods/Pods/AFNetworking/AFNetworking/AFURLResponseSerialization.h
M cocoapods/Pods/AFNetworking/AFNetworking/AFURLResponseSerialization.m
M cocoapods/Pods/AFNetworking/AFNetworking/AFURLSessionManager.h
M cocoapods/Pods/AFNetworking/AFNetworking/AFURLSessionManager.m
M cocoapods/Pods/AFNetworking/README.md
M cocoapods/Pods/AFNetworking/UIKit+AFNetworking/UIButton+AFNetworking.h
M cocoapods/Pods/AFNetworking/UIKit+AFNetworking/UIButton+AFNetworking.m
M cocoapods/Pods/AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.m
M cocoapods/Pods/Manifest.lock
M cocoapods/Pods/Pods.xcodeproj/project.pbxproj
M wikipedia/assets/abusefilter.css
M wikipedia/assets/preview.css
M wikipedia/assets/styles.css
22 files changed, 2,200 insertions(+), 2,082 deletions(-)

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




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

Gerrit-MessageType: merged
Gerrit-Change-Id: I993d925de20366b2dda2f396ed5694f4126453ec
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] Clear search results if none were returned by the query. - change (apps...wikipedia)

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

Change subject: Clear search results if none were returned by the query.
..


Clear search results if none were returned by the query.

We were too aggressive about not blanking search results :)

Change-Id: I5889e5807e4d6270f4c254f8c27701e9b35b37e5
---
M wikipedia/View Controllers/SearchResults/SearchResultsController.m
1 file changed, 8 insertions(+), 0 deletions(-)

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



diff --git a/wikipedia/View Controllers/SearchResults/SearchResultsController.m 
b/wikipedia/View Controllers/SearchResults/SearchResultsController.m
index 42cdbec..6cc22fb 100644
--- a/wikipedia/View Controllers/SearchResults/SearchResultsController.m
+++ b/wikipedia/View Controllers/SearchResults/SearchResultsController.m
@@ -309,6 +309,12 @@
 [self fadeAlert];
 break;
 case FETCH_FINAL_STATUS_FAILED:
+
+if(error.code == SEARCH_RESULT_ERROR_NO_MATCHES){
+[self clearSearchResults];
+[self.searchMessageLabel 
showWithText:error.localizedDescription];
+}
+
 //[self.searchMessageLabel 
showWithText:error.localizedDescription];
 //[self showAlert:error.localizedDescription 
type:ALERT_TYPE_MIDDLE duration:-1];
 break;
@@ -405,6 +411,8 @@
 [self scrollTableToTop];
 
 [self.searchMessageLabel hide];
+
+[self.didYouMeanButton hide];
 
 // Show "Searching..." message.
 //[self.searchMessageLabel 
showWithText:MWLocalizedString(@"search-searching", nil)];

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5889e5807e4d6270f4c254f8c27701e9b35b37e5
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] Changed fetcher "userData" to "fetchedData". - change (apps...wikipedia)

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

Change subject: Changed fetcher "userData" to "fetchedData".
..


Changed fetcher "userData" to "fetchedData".

Seems to clarify things a bit.

Change-Id: Ibf1631ede3e82de54a33c9cd961f40e78a15b306
---
M wikipedia/Networking/Fetchers/AccountCreationTokenFetcher.m
M wikipedia/Networking/Fetchers/AccountCreator.m
M wikipedia/Networking/Fetchers/AccountLogin.m
M wikipedia/Networking/Fetchers/ArticleFetcher.m
M wikipedia/Networking/Fetchers/BaseFetcher/FetcherBase.h
M wikipedia/Networking/Fetchers/BaseFetcher/FetcherBase.m
M wikipedia/Networking/Fetchers/CaptchaResetter.m
M wikipedia/Networking/Fetchers/EditTokenFetcher.m
M wikipedia/Networking/Fetchers/LanguageLinksFetcher.m
M wikipedia/Networking/Fetchers/LoginTokenFetcher.m
M wikipedia/Networking/Fetchers/NearbyFetcher.m
M wikipedia/Networking/Fetchers/PageHistoryFetcher.m
M wikipedia/Networking/Fetchers/PreviewHtmlFetcher.m
M wikipedia/Networking/Fetchers/RandomArticleFetcher.m
M wikipedia/Networking/Fetchers/SearchResultFetcher.m
M wikipedia/Networking/Fetchers/ThumbnailFetcher.m
M wikipedia/Networking/Fetchers/WikiDataShortDescriptionFetcher.m
M wikipedia/Networking/Fetchers/WikiTextSectionFetcher.m
M wikipedia/Networking/Fetchers/WikiTextSectionUploader.m
M wikipedia/Networking/Fetchers/WikipediaZeroMessageFetcher.m
M wikipedia/View Controllers/AccountCreation/AccountCreationViewController.m
M wikipedia/View Controllers/Languages/LanguagesViewController.m
M wikipedia/View Controllers/Login/LoginViewController.m
M wikipedia/View Controllers/Navigation/Center/CenterNavController.m
M wikipedia/View Controllers/Nearby/NearbyViewController.m
M wikipedia/View Controllers/PageHistory/PageHistoryViewController.m
M wikipedia/View Controllers/Preview/PreviewAndSaveViewController.m
M wikipedia/View Controllers/SearchResults/SearchResultsController.m
M wikipedia/View Controllers/SectionEditor/SectionEditorViewController.m
M wikipedia/View Controllers/WebView/WebViewController.m
30 files changed, 75 insertions(+), 75 deletions(-)

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



diff --git a/wikipedia/Networking/Fetchers/AccountCreationTokenFetcher.m 
b/wikipedia/Networking/Fetchers/AccountCreationTokenFetcher.m
index 35ef39d..1bf462f 100644
--- a/wikipedia/Networking/Fetchers/AccountCreationTokenFetcher.m
+++ b/wikipedia/Networking/Fetchers/AccountCreationTokenFetcher.m
@@ -78,7 +78,7 @@
 self.token = output[@"token"] ? output[@"token"] : @"";
 
 [self finishWithError: error
- userData: output];
+  fetchedData: output];
 
 } failure:^(AFHTTPRequestOperation *operation, NSError *error) {
 
@@ -87,7 +87,7 @@
 [[MWNetworkActivityIndicatorManager sharedManager] pop];
 
 [self finishWithError: error
- userData: nil];
+  fetchedData: nil];
 }];
 }
 
diff --git a/wikipedia/Networking/Fetchers/AccountCreator.m 
b/wikipedia/Networking/Fetchers/AccountCreator.m
index 1f8871a..6b94ec9 100644
--- a/wikipedia/Networking/Fetchers/AccountCreator.m
+++ b/wikipedia/Networking/Fetchers/AccountCreator.m
@@ -105,7 +105,7 @@
 }
 
 [self finishWithError: error
- userData: result];
+  fetchedData: result];
 
 } failure:^(AFHTTPRequestOperation *operation, NSError *error) {
 
@@ -114,7 +114,7 @@
 [[MWNetworkActivityIndicatorManager sharedManager] pop];
 
 [self finishWithError: error
- userData: nil];
+  fetchedData: nil];
 }];
 }
 
diff --git a/wikipedia/Networking/Fetchers/AccountLogin.m 
b/wikipedia/Networking/Fetchers/AccountLogin.m
index 4d2790a..71004f7 100644
--- a/wikipedia/Networking/Fetchers/AccountLogin.m
+++ b/wikipedia/Networking/Fetchers/AccountLogin.m
@@ -83,7 +83,7 @@
 }
 
 [self finishWithError: error
- userData: output];
+  fetchedData: output];
 
 } failure:^(AFHTTPRequestOperation *operation, NSError *error) {
 
@@ -92,7 +92,7 @@
 [[MWNetworkActivityIndicatorManager sharedManager] pop];
 
 [self finishWithError: error
- userData: nil];
+  fetchedData: nil];
 }];
 }
 
diff --git a/wikipedia/Networking/Fetchers/ArticleFetcher.m 
b/wikipedia/Networking/Fetchers/ArticleFetcher.m
index e69f7b4..c13f669 100644
--- a/wikipedia/Networking/Fetchers/ArticleFetcher.m
+++ b/wikipedia/Networking/Fetchers/ArticleFetcher.m
@@ -82,14 +82,14 @@
 [self applyResultsForNonLeadSections:nonLeadSectionsResults];
 
 [self finishWithError: nil
- userData: @(ARTICLE_SECTION_TYPE_NON_LEAD)];
+  fetchedData: @(ARTICLE_SECTION_TYPE_NON_LEAD)];
 
 } failure:^(AFHTTPRequestOperation *operation, NSError *e

[MediaWiki-commits] [Gerrit] Auto switch from prefix to in-article search if no prefix re... - change (apps...wikipedia)

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

Change subject: Auto switch from prefix to in-article search if no prefix 
results.
..


Auto switch from prefix to in-article search if no prefix results.

Change-Id: Ia5508342b921b22b8d697f70d6c12bd47e62c5ff
---
M wikipedia/Defines/Defines.h
M wikipedia/Networking/Fetchers/SearchResultFetcher.h
M wikipedia/Networking/Fetchers/SearchResultFetcher.m
M wikipedia/View Controllers/RecentSearches/RecentSearchesViewController.h
M wikipedia/View Controllers/SearchResults/SearchResultsController.m
M wikipedia/View Controllers/SearchResults/SearchTypeMenu.h
M wikipedia/View Controllers/SearchResults/SearchTypeMenu.m
7 files changed, 73 insertions(+), 23 deletions(-)

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



diff --git a/wikipedia/Defines/Defines.h b/wikipedia/Defines/Defines.h
index 55fe13e..c7425c7 100644
--- a/wikipedia/Defines/Defines.h
+++ b/wikipedia/Defines/Defines.h
@@ -57,11 +57,6 @@
 #define CHROME_OUTLINE_COLOR ALERT_BACKGROUND_COLOR
 #define CHROME_OUTLINE_WIDTH (1.0f / [UIScreen mainScreen].scale)
 
-typedef NS_ENUM(NSInteger, SearchType) {
-SEARCH_TYPE_TITLES,
-SEARCH_TYPE_IN_ARTCILES
-};
-
 #define SEARCH_DELAY_PREFIX 0.4
 #define SEARCH_DELAY_FULL_TEXT 1.0
 
diff --git a/wikipedia/Networking/Fetchers/SearchResultFetcher.h 
b/wikipedia/Networking/Fetchers/SearchResultFetcher.h
index 6475251..ec30158 100644
--- a/wikipedia/Networking/Fetchers/SearchResultFetcher.h
+++ b/wikipedia/Networking/Fetchers/SearchResultFetcher.h
@@ -11,12 +11,27 @@
 SEARCH_RESULT_ERROR_NO_MATCHES = 2
 };
 
+typedef NS_ENUM(NSInteger, SearchType) {
+SEARCH_TYPE_TITLES,
+SEARCH_TYPE_IN_ARTCILES
+};
+
+typedef NS_ENUM(NSInteger, SearchReason) {
+SEARCH_REASON_UNKNOWN = 0,
+SEARCH_REASON_SEARCH_STRING_CHANGED,
+SEARCH_REASON_SEARCH_TYPE_MENU_TAPPED,
+SEARCH_REASON_VIEW_APPEARED,
+SEARCH_REASON_DID_YOU_MEAN_TAPPED,
+SEARCH_REASON_NO_PREFIX_RESULTS
+};
+
 @class AFHTTPRequestOperationManager;
 
 @interface SearchResultFetcher : FetcherBase
 
 @property (nonatomic, strong, readonly) NSString *searchTerm;
 @property (nonatomic, readonly) SearchType searchType;
+@property (nonatomic, readonly) SearchReason searchReason;
 
 @property (nonatomic, strong, readonly) NSArray *searchResults;
 @property (nonatomic, strong, readonly) NSString *searchSuggestion;
@@ -24,6 +39,7 @@
 // Kick-off method. Results are reported to "delegate" via the 
FetchFinishedDelegate protocol method.
 -(instancetype)initAndSearchForTerm: (NSString *)searchTerm
  searchType: (SearchType)searchType
+   searchReason: (SearchReason)searchReason
 withManager: (AFHTTPRequestOperationManager *)manager
  thenNotifyDelegate: (id )delegate;
 @end
diff --git a/wikipedia/Networking/Fetchers/SearchResultFetcher.m 
b/wikipedia/Networking/Fetchers/SearchResultFetcher.m
index f5a2416..950a2fd 100644
--- a/wikipedia/Networking/Fetchers/SearchResultFetcher.m
+++ b/wikipedia/Networking/Fetchers/SearchResultFetcher.m
@@ -17,6 +17,7 @@
 @property (strong, nonatomic) NSString *domain;
 @property (nonatomic, strong) NSString *searchTerm;
 @property (nonatomic) SearchType searchType;
+@property (nonatomic) SearchReason searchReason;
 
 @property (nonatomic, strong) NSArray *searchResults;
 @property (nonatomic, strong) NSString *searchSuggestion;
@@ -27,6 +28,7 @@
 
 -(instancetype)initAndSearchForTerm: (NSString *)searchTerm
  searchType: (SearchType)searchType
+   searchReason: (SearchReason)searchReason
 withManager: (AFHTTPRequestOperationManager *)manager
  thenNotifyDelegate: (id )delegate
 {
@@ -36,6 +38,7 @@
 self.searchSuggestion = nil;
 self.searchTerm = searchTerm ? searchTerm : @"";
 self.searchType = searchType;
+self.searchReason = searchReason;
 self.fetchFinishedDelegate = delegate;
 [self searchWithManager:manager];
 }
diff --git a/wikipedia/View 
Controllers/RecentSearches/RecentSearchesViewController.h b/wikipedia/View 
Controllers/RecentSearches/RecentSearchesViewController.h
index b782f41..358bb59 100644
--- a/wikipedia/View Controllers/RecentSearches/RecentSearchesViewController.h
+++ b/wikipedia/View Controllers/RecentSearches/RecentSearchesViewController.h
@@ -3,6 +3,7 @@
 
 #import 
 #import "Defines.h"
+#import "SearchResultFetcher.h"
 
 @interface RecentSearchesViewController : UIViewController 

 
diff --git a/wikipedia/View Controllers/SearchResults/SearchResultsController.m 
b/wikipedia/View Controllers/SearchResults/SearchResultsController.m
index 47a0bf3..ede5479 100644
--- a/wikipedia/View Controllers/SearchResults/SearchResultsController.m
+++ b/wikipedia/View Controllers/SearchResults/SearchResultsController.m
@@ -150,7 +150,7 @

[MediaWiki-commits] [Gerrit] Added psnamespace parameter to prefix query. - change (apps...wikipedia)

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

Change subject: Added psnamespace parameter to prefix query.
..


Added psnamespace parameter to prefix query.

Change-Id: Id2eb5330a9c8ace6d99d0fc635ec2baf96bd0371
---
M wikipedia/Networking/Fetchers/SearchResultFetcher.m
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/wikipedia/Networking/Fetchers/SearchResultFetcher.m 
b/wikipedia/Networking/Fetchers/SearchResultFetcher.m
index 950a2fd..eddf6db 100644
--- a/wikipedia/Networking/Fetchers/SearchResultFetcher.m
+++ b/wikipedia/Networking/Fetchers/SearchResultFetcher.m
@@ -130,6 +130,7 @@
  @"list": @"prefixsearch",
  @"pssearch": self.searchTerm,
  @"pslimit": @(SEARCH_MAX_RESULTS),
+ @"psnamespace": @0,
  @"format": @"json"
  };
 break;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id2eb5330a9c8ace6d99d0fc635ec2baf96bd0371
Gerrit-PatchSet: 2
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] Manual import of translations from TWN - change (apps...wikipedia)

2014-11-24 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: I4e4fc4731d2140b5237f5ff3c4c570960d080e1c
---
M wikipedia/br.lproj/Localizable.strings
M wikipedia/ca.lproj/Localizable.strings
M wikipedia/ce.lproj/Localizable.strings
M wikipedia/de.lproj/Localizable.strings
M wikipedia/es.lproj/Localizable.strings
M wikipedia/fr.lproj/Localizable.strings
M wikipedia/he.lproj/Localizable.strings
M wikipedia/it.lproj/Localizable.strings
M wikipedia/lb.lproj/Localizable.strings
M wikipedia/mk.lproj/Localizable.strings
M wikipedia/nl.lproj/Localizable.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/sr-ec.lproj/Localizable.strings
M wikipedia/sv.lproj/Localizable.strings
M wikipedia/vi.lproj/Localizable.strings
M wikipedia/zh-hans.lproj/Localizable.strings
M wikipedia/zh-hant.lproj/Localizable.strings
M wikipedia/zh-hant.lproj/Main_iPhone.strings
22 files changed, 88 insertions(+), 20 deletions(-)

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



diff --git a/wikipedia/br.lproj/Localizable.strings 
b/wikipedia/br.lproj/Localizable.strings
index d344f80..e411b91 100644
--- a/wikipedia/br.lproj/Localizable.strings
+++ b/wikipedia/br.lproj/Localizable.strings
@@ -79,6 +79,9 @@
 "search-loading-section-remaining" = "O kargañ ar peurrest eus ar 
rannskrid...";
 "search-loading-article-loaded" = "Pennad karget.";
 "search-cancel" = "Nullañ";
+"search-titles" = "Titloù";
+"search-within-articles" = "Er pennadoù";
+"search-did-you-mean" = "N'ho poa ket soñjet kentoc'h e : $1";
 "main-menu-title" = "Muioc'h";
 "main-menu-language-title" = "Furchal $1 Wikipedia";
 "main-menu-language-toggle-show" = "Diskouez ar yezhoù";
diff --git a/wikipedia/ca.lproj/Localizable.strings 
b/wikipedia/ca.lproj/Localizable.strings
index 2b086f4..f78e204 100644
--- a/wikipedia/ca.lproj/Localizable.strings
+++ b/wikipedia/ca.lproj/Localizable.strings
@@ -81,6 +81,9 @@
 "search-loading-section-remaining" = "S'està carregant la resta de 
l'article...";
 "search-loading-article-loaded" = "S'ha carregat l'article.";
 "search-cancel" = "Cancel·la";
+"search-titles" = "Títols";
+"search-within-articles" = "Dins d'articles";
+"search-did-you-mean" = "Volíeu dir: $1?";
 "main-menu-title" = "Més";
 "main-menu-language-title" = "Cerca la wiki en llengua $1";
 "main-menu-language-toggle-show" = "Mostra idiomes";
@@ -150,6 +153,8 @@
 "about-title" = "Quant a";
 "about-wikipedia" = "Viquipèdia";
 "about-contributors" = "col·laboradors";
+"about-testers" = "provadors";
+"about-testers-details" = "Provat per $1";
 "about-translators" = "traductors";
 "about-translators-details" = "Traduït per voluntaris a $1";
 "about-libraries" = "biblioteques utilitzades";
diff --git a/wikipedia/ce.lproj/Localizable.strings 
b/wikipedia/ce.lproj/Localizable.strings
index 0b4064e..20e7bbd 100644
--- a/wikipedia/ce.lproj/Localizable.strings
+++ b/wikipedia/ce.lproj/Localizable.strings
@@ -33,6 +33,9 @@
 "wikitext-upload-save-license-name" = "CC BY-SA 3.0";
 "open-link-title" = "Хьажорг схьаелла";
 "open-link-cancel" = "Цаоьшу";
+"search-titles" = "Корташ";
+"search-within-articles" = "Яззамашкахь";
+"search-did-you-mean" = "Хила мега ахьа лоьхарг: $1";
 "main-menu-title" = "Кхин";
 "main-menu-language-title" = "$1 вики чухула лахаран мотт";
 "main-menu-account-login" = "ЧугӀо";
@@ -59,6 +62,7 @@
 "navbar-title-mode-edit-wikitext-preview" = "Хьалха муха ю хьажар";
 "credits-wikimedia-repos" = "Викимедиа";
 "credits-external-libraries" = "АгӀонгара";
+"about-testers" = "тестераш";
 "share-menu-save-page" = "Ӏалашъе агӀо";
 "share-menu-page-saved" = "АгӀо Ӏалашйина";
 "timestamp-days" = "%d де хьалха";
diff --git a/wikipedia/de.lproj/Localizable.strings 
b/wikipedia/de.lproj/Localizable.strings
index 03e72fe..d311639 100644
--- a/wikipedia/de.lproj/Localizable.strings
+++ b/wikipedia/de.lproj/Localizable.strings
@@ -77,6 +77,9 @@
 "search-loading-section-remaining" = "Lade den Rest des Artikels …";
 "search-loading-article-loaded" = "Artikel geladen.";
 "search-cancel" = "Abbrechen";
+"search-titles" = "Titel";
+"search-within-articles" = "Innerhalb Artikeln";
+"search-did-you-mean" = "Meintest du $1?";
 "main-menu-title" = "Weitere";
 "main-menu-language-title" = "Sprachwiki $1 durchsuchen";
 "main-menu-language-toggle-show" = "Sprachen anzeigen";
diff --git a/wikipedia/es.lproj/Localizable.strings 
b/wikipedia/es.lproj/Localizable.strings
index bdb52d6..c675119 100644
--- a/wikipedia/es.lproj/Localizable.strings
+++ b/wikipedia/es.lproj/Localizable.strings
@@ -82,6 +82,9 @@
 "search-loading-section-remaining" = "Cargando el resto del artículo…";
 "search-loading-article-loaded" = "Artículo cargado.

[MediaWiki-commits] [Gerrit] quick fix to string (fixed already on twn) - change (apps...wikipedia)

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

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

Change subject: quick fix to string (fixed already on twn)
..

quick fix to string (fixed already on twn)

Change-Id: I30761a6e6b3afcdc2908791748051e46e511a610
---
M wikipedia/vi.lproj/Localizable.strings
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/wikipedia/vi.lproj/Localizable.strings 
b/wikipedia/vi.lproj/Localizable.strings
index 4c39c42..d48084a 100644
--- a/wikipedia/vi.lproj/Localizable.strings
+++ b/wikipedia/vi.lproj/Localizable.strings
@@ -79,7 +79,7 @@
 "search-cancel" = "Hủy bỏ";
 "search-titles" = "Tên trang";
 "search-within-articles" = "Nội dung bài";
-"search-did-you-mean" = "Có phải bạn muốn tìm “%s”?";
+"search-did-you-mean" = "Có phải bạn muốn tìm “$1”?";
 "main-menu-title" = "Khác";
 "main-menu-language-title" = "Tìm kiếm trong phiên bản ngôn ngữ $1";
 "main-menu-language-toggle-show" = "Xem các ngôn ngữ";

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I30761a6e6b3afcdc2908791748051e46e511a610
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] quick fix to string (fixed already on twn) - change (apps...wikipedia)

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

Change subject: quick fix to string (fixed already on twn)
..


quick fix to string (fixed already on twn)

Change-Id: I30761a6e6b3afcdc2908791748051e46e511a610
---
M wikipedia/vi.lproj/Localizable.strings
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/wikipedia/vi.lproj/Localizable.strings 
b/wikipedia/vi.lproj/Localizable.strings
index 4c39c42..d48084a 100644
--- a/wikipedia/vi.lproj/Localizable.strings
+++ b/wikipedia/vi.lproj/Localizable.strings
@@ -79,7 +79,7 @@
 "search-cancel" = "Hủy bỏ";
 "search-titles" = "Tên trang";
 "search-within-articles" = "Nội dung bài";
-"search-did-you-mean" = "Có phải bạn muốn tìm “%s”?";
+"search-did-you-mean" = "Có phải bạn muốn tìm “$1”?";
 "main-menu-title" = "Khác";
 "main-menu-language-title" = "Tìm kiếm trong phiên bản ngôn ngữ $1";
 "main-menu-language-toggle-show" = "Xem các ngôn ngữ";

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I30761a6e6b3afcdc2908791748051e46e511a610
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] Manual import of iOS string translations from TWN - change (apps...wikipedia)

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

Change subject: Manual import of iOS string translations from TWN
..


Manual import of iOS string translations from TWN

Change-Id: I72ad704d3783024b7f601b9ddb04fe95aafe933d
---
M wikipedia/azb.lproj/Localizable.strings
M wikipedia/ca.lproj/Localizable.strings
M wikipedia/ce.lproj/Localizable.strings
M wikipedia/de.lproj/Localizable.strings
M wikipedia/es.lproj/Localizable.strings
M wikipedia/fr.lproj/Localizable.strings
M wikipedia/he.lproj/Localizable.strings
M wikipedia/lb.lproj/Localizable.strings
M wikipedia/mk.lproj/Localizable.strings
M wikipedia/nl.lproj/Localizable.strings
M wikipedia/pl.lproj/Localizable.strings
M wikipedia/pt.lproj/Localizable.strings
M wikipedia/ro.lproj/Localizable.strings
M wikipedia/ru.lproj/Localizable.strings
M wikipedia/sk.lproj/Localizable.strings
M wikipedia/sr-ec.lproj/Localizable.strings
M wikipedia/sv.lproj/Localizable.strings
M wikipedia/uz.lproj/Localizable.strings
M wikipedia/vi.lproj/Localizable.strings
M wikipedia/zh-hans.lproj/Localizable.strings
M wikipedia/zh-hant.lproj/Localizable.strings
21 files changed, 106 insertions(+), 2 deletions(-)

Approvals:
  Brion VIBBER: Looks good to me, approved



diff --git a/wikipedia/azb.lproj/Localizable.strings 
b/wikipedia/azb.lproj/Localizable.strings
index 85e7e3d..7c32707 100644
--- a/wikipedia/azb.lproj/Localizable.strings
+++ b/wikipedia/azb.lproj/Localizable.strings
@@ -9,11 +9,15 @@
 "history-label" = "سون";
 "history-section-today" = "بوگون";
 "history-section-yesterday" = "دونن";
+"history-section-lastweek" = "گئچن هفته";
 "history-section-lastmonth" = "گئچن آی";
 "history-clear-cancel" = "پوْز";
 "history-clear-delete-all" = "هامیسین سیل";
 "zero-interstitial-continue" = "چیخ";
 "zero-interstitial-cancel" = "بوردا قال";
+"zero-learn-more-learn-more" = "آردی‌سی";
+"zero-learn-more-no-thanks" = "باغلا";
+"account-creation-logging-in" = "گیریش ائدیلیر...";
 "account-creation-saving" = "ساخلانیلیر...";
 "account-creation-login" = "اؤنجه‌دن حسابینیز وارمی؟ گیرینیز.";
 "account-creation-username-placeholder-text" = "ایشلدن آدی";
@@ -24,6 +28,7 @@
 "wikitext-upload-save" = "ساخلانیلیر...";
 "wikitext-upload-save-sign-in" = "گیریش";
 "wikitext-upload-save-anonymously" = "آدسیز ساخلا";
+"open-link-title" = "باغلانتی‌نی آچ";
 "open-link-cancel" = "پوْز";
 "search-searching" = "آختاریلیر...";
 "search-field-placeholder-text" = "ویکی‌پئدیادا آختار";
@@ -31,6 +36,9 @@
 "search-loading-section-remaining" = "مقاله‌نین قالانی یوکله‌نیر...";
 "search-loading-article-loaded" = "مقاله یوکلندی.";
 "search-cancel" = "پوْز";
+"search-titles" = "باشلیق‌لار";
+"search-recent-clear-cancel" = "وازگئچ";
+"search-recent-clear-delete-all" = "هامیسین سیل";
 "main-menu-title" = "آرتیق";
 "main-menu-language-title" = "ویکی‌پئدیادا 1$ آختار";
 "main-menu-language-toggle-show" = "دیللری گؤستر";
@@ -44,8 +52,11 @@
 "main-menu-show-history" = "سون";
 "main-menu-show-saved" = "ساخلانیلمیش صحیفه‌لر";
 "main-menu-random" = "تصادوفی";
+"main-menu-feedback-heading" = "دؤنوت";
+"main-menu-send-feedback" = " اویغولاما دؤنوتونو گؤندر";
 "main-menu-privacy-policy" = "گیزلیلیک سیاستی";
 "main-menu-terms-of-use" = "ایشلتمک شرطلری";
+"main-menu-rate-app" = "اویغولامانی دَیرلندیر";
 "main-menu-show-today" = "بوگون";
 "main-menu-nearby" = "یاخیندا";
 "main-menu-more" = "داها...";
@@ -66,6 +77,10 @@
 "edit-summary-choice-added-missing-info" = "آرتیریلمیش ایتگین بیلگیلر";
 "edit-summary-choice-other" = "آیری";
 "article-pull-to-refresh-is-refreshing" = "مقاله تازالانیر";
+"about-title" = "گؤره";
+"about-wikipedia" = "ویکی‌پدیا";
+"about-contributors" = "چالیشقان‌لار";
+"about-translators" = "چئویریجی‌لر";
 "share-menu-save-page" = "صحیفه‌نی ساخلا";
 "timestamp-just-now" = "ایندی";
 "timestamp-minutes" = "d% دقیقه قاباق";
@@ -91,10 +106,12 @@
 "menu-preview-accessibility-label" = "اؤن‌گؤستریش";
 "menu-back-accessibility-label" = "دالی";
 "menu-forward-accessibility-label" = "قاباق";
+"menu-w-accessibility-label" = "منو";
 "menu-toc-accessibility-label" = "ایچینده‌کیلر";
 "menu-search-accessibility-label" = "آختار";
 "menu-cancel-accessibility-label" = "پوْز";
 "menu-share-accessibility-label" = "پایلاش";
+"menu-more-accessibility-label" = "چوخراق تنظیم‌لر";
 "menu-trash-accessibility-label" = "سیل";
 "nearby-title" = "یاخیندا";
 "nearby-distance-label-meters" = "$1 مئتیر";
diff --git a/wikipedia/ca.lproj/Localizable.strings 
b/wikipedia/ca.lproj/Localizable.strings
index f78e204..ae438e0 100644
--- a/wikipedia/ca.lproj/Localizable.strings
+++ b/wikipedia/ca.lproj/Localizable.strings
@@ -84,6 +84,11 @@
 "search-titles" = "Títols";
 "search-within-articles" = "Dins d'articles";
 "search-did-you-mean" = "Volíeu dir: $1?";
+"search-recent-title" = "Cerques recents";
+"search-recent-clear-confirmation-heading" = "Voleu suprimir totes les cerques 
recents?";
+"search-recent-clear-confirmation-sub-heading" = "No es pot desfer l'acció!";
+"sear

[MediaWiki-commits] [Gerrit] Set flags to hide wikidata descriptions and full text search... - change (apps...wikipedia)

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

Change subject: Set flags to hide wikidata descriptions and full text search 
option.
..


Set flags to hide wikidata descriptions and full text search option.

Both of these features await some minor refinements before they
are ready for market. In the mean time, we need to push to market
to fix the javascript bridge freezing bug :)

Change-Id: I8e6916208bd59efedb5155357a5e363b1058b159
---
M wikipedia/Defines/Defines.h
M wikipedia/View Controllers/Nearby/NearbyViewController.m
M wikipedia/View Controllers/SearchResults/SearchResultsController.m
M wikipedia/View Controllers/SearchResults/SearchTypeMenu.m
4 files changed, 24 insertions(+), 2 deletions(-)

Approvals:
  Brion VIBBER: Looks good to me, approved



diff --git a/wikipedia/Defines/Defines.h b/wikipedia/Defines/Defines.h
index df8048e..1157740 100644
--- a/wikipedia/Defines/Defines.h
+++ b/wikipedia/Defines/Defines.h
@@ -69,3 +69,12 @@
 #define SEARCH_DELAY_PREFIX 0.4
 #define SEARCH_DELAY_FULL_TEXT 1.0
 
+// Temporary flags for hiding full text search interface and wikidata
+// descriptions (in search results) until both are production ready.
+// Full text search interface has a couple UX changes brewing and
+// wikidata awaits api "prop=pageterms" going live so we don't have
+// to do separate non-performant request to get descriptions.
+#define ENABLE_FULL_TEXT_SEARCH NO
+#define ENABLE_WIKIDATA_DESCRIPTIONS NO
+
+
diff --git a/wikipedia/View Controllers/Nearby/NearbyViewController.m 
b/wikipedia/View Controllers/Nearby/NearbyViewController.m
index c277bc1..86150c2 100644
--- a/wikipedia/View Controllers/Nearby/NearbyViewController.m
+++ b/wikipedia/View Controllers/Nearby/NearbyViewController.m
@@ -274,7 +274,7 @@
 }
 
 // Fetch WikiData short descriptions.
-if (wikiDataIds.count > 0){
+if ((wikiDataIds.count > 0) && ENABLE_WIKIDATA_DESCRIPTIONS){
 (void)[[WikiDataShortDescriptionFetcher alloc] 
initAndFetchDescriptionsForIds: wikiDataIds

searchType: SEARCH_TYPE_NEARBY

   withManager: [QueuesSingleton sharedInstance].nearbyFetchManager
diff --git a/wikipedia/View Controllers/SearchResults/SearchResultsController.m 
b/wikipedia/View Controllers/SearchResults/SearchResultsController.m
index 2788bb7..9776275 100644
--- a/wikipedia/View Controllers/SearchResults/SearchResultsController.m
+++ b/wikipedia/View Controllers/SearchResults/SearchResultsController.m
@@ -392,7 +392,7 @@
 }
 
 // Fetch WikiData short descriptions.
-if (wikiDataIds.count > 0){
+if ((wikiDataIds.count > 0) && ENABLE_WIKIDATA_DESCRIPTIONS){
 (void)[[WikiDataShortDescriptionFetcher alloc] 
initAndFetchDescriptionsForIds: wikiDataIds

searchType: searchResultFetcher.searchType

   withManager: [QueuesSingleton sharedInstance].searchResultsFetchManager
@@ -418,6 +418,9 @@
&&
(searchResultFetcher.searchReason != 
SEARCH_REASON_SEARCH_TYPE_MENU_TAPPED)
){
+
+if(!ENABLE_FULL_TEXT_SEARCH) return;
+
 // Note: the search button is not switched until 
"performSearch:" is
 // invoked as a result of the 
"searchAfterDelay:reason:" call below.
 // That way the users can see the "No search results" 
message in association
diff --git a/wikipedia/View Controllers/SearchResults/SearchTypeMenu.m 
b/wikipedia/View Controllers/SearchResults/SearchTypeMenu.m
index 045612f..6736242 100644
--- a/wikipedia/View Controllers/SearchResults/SearchTypeMenu.m
+++ b/wikipedia/View Controllers/SearchResults/SearchTypeMenu.m
@@ -74,6 +74,16 @@
 
 -(void)didMoveToSuperview
 {
+if (!ENABLE_FULL_TEXT_SEARCH) {
+//self.backgroundColor = [UIColor clearColor];
+self.searchType = self.searchType;
+[self.superview addConstraints:[NSLayoutConstraint 
constraintsWithVisualFormat: @"V:[self(1)]"
+   
options: 0
+   
metrics: nil
+   
  views: @{@"self": self}]];
+return;
+}
+
 self.backgroundColor = BACKGROUND_COLOR;
 
 self.searchButtonTitles = [[PaddedLabel alloc] init];

-- 
To view, visit https://gerrit.wikimedia.org/r/177087
T

[MediaWiki-commits] [Gerrit] bump version to 4.0.6 / 4.0.6.0 - change (apps...wikipedia)

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

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

Change subject: bump version to 4.0.6 / 4.0.6.0
..

bump version to 4.0.6 / 4.0.6.0

Change-Id: I85a00dee39e39f34f5a75ba56ba7da46966fbb83
---
M wikipedia/Wikipedia-Info.plist
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/wikipedia/Wikipedia-Info.plist b/wikipedia/Wikipedia-Info.plist
index e167af3..e9c2cf5 100644
--- a/wikipedia/Wikipedia-Info.plist
+++ b/wikipedia/Wikipedia-Info.plist
@@ -17,11 +17,11 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
-   4.0.5
+   4.0.6
CFBundleSignature

CFBundleVersion
-   4.0.5.2
+   4.0.6.0
LSRequiresIPhoneOS

NSLocationWhenInUseUsageDescription

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I85a00dee39e39f34f5a75ba56ba7da46966fbb83
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] bump version to 4.0.6 / 4.0.6.0 - change (apps...wikipedia)

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

Change subject: bump version to 4.0.6 / 4.0.6.0
..


bump version to 4.0.6 / 4.0.6.0

Change-Id: I85a00dee39e39f34f5a75ba56ba7da46966fbb83
---
M wikipedia/Wikipedia-Info.plist
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/wikipedia/Wikipedia-Info.plist b/wikipedia/Wikipedia-Info.plist
index e167af3..e9c2cf5 100644
--- a/wikipedia/Wikipedia-Info.plist
+++ b/wikipedia/Wikipedia-Info.plist
@@ -17,11 +17,11 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
-   4.0.5
+   4.0.6
CFBundleSignature

CFBundleVersion
-   4.0.5.2
+   4.0.6.0
LSRequiresIPhoneOS

NSLocationWhenInUseUsageDescription

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I85a00dee39e39f34f5a75ba56ba7da46966fbb83
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] MediaWikiKit static library with new data helper classes - change (apps...wikipedia)

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

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

Change subject: MediaWikiKit static library with new data helper classes
..

MediaWikiKit static library with new data helper classes

Some current issues:
* searching loads articles, but clicking links reloads the current article
* pretty sure thumbnails are not getting cached properly with the URL cache;
  it may be wise to make them explicitly separate
* History entries not saved on navigation properly?
* Saved page entries not saved? (crashes)

Change-Id: I24be3544cc3930702b22aeb8f85ff7a42c924f46
---
A MediaWikiKit/MediaWikiKit.xcodeproj/project.pbxproj
A MediaWikiKit/MediaWikiKit/MWKArticle.h
A MediaWikiKit/MediaWikiKit/MWKArticle.m
A MediaWikiKit/MediaWikiKit/MWKArticleStore.h
A MediaWikiKit/MediaWikiKit/MWKArticleStore.m
A MediaWikiKit/MediaWikiKit/MWKDataObject.h
A MediaWikiKit/MediaWikiKit/MWKDataObject.m
A MediaWikiKit/MediaWikiKit/MWKDataStore.h
A MediaWikiKit/MediaWikiKit/MWKDataStore.m
A MediaWikiKit/MediaWikiKit/MWKHistoryEntry.h
A MediaWikiKit/MediaWikiKit/MWKHistoryEntry.m
A MediaWikiKit/MediaWikiKit/MWKHistoryList.h
A MediaWikiKit/MediaWikiKit/MWKHistoryList.m
A MediaWikiKit/MediaWikiKit/MWKImage.h
A MediaWikiKit/MediaWikiKit/MWKImage.m
A MediaWikiKit/MediaWikiKit/MWKProtectionStatus.h
A MediaWikiKit/MediaWikiKit/MWKProtectionStatus.m
A MediaWikiKit/MediaWikiKit/MWKRecentSearchEntry.h
A MediaWikiKit/MediaWikiKit/MWKRecentSearchEntry.m
A MediaWikiKit/MediaWikiKit/MWKRecentSearchList.h
A MediaWikiKit/MediaWikiKit/MWKRecentSearchList.m
A MediaWikiKit/MediaWikiKit/MWKSavedPageEntry.h
A MediaWikiKit/MediaWikiKit/MWKSavedPageEntry.m
A MediaWikiKit/MediaWikiKit/MWKSavedPageList.h
A MediaWikiKit/MediaWikiKit/MWKSavedPageList.m
A MediaWikiKit/MediaWikiKit/MWKSection.h
A MediaWikiKit/MediaWikiKit/MWKSection.m
A MediaWikiKit/MediaWikiKit/MWKSite.h
A MediaWikiKit/MediaWikiKit/MWKSite.m
A MediaWikiKit/MediaWikiKit/MWKSiteDataObject.h
A MediaWikiKit/MediaWikiKit/MWKSiteDataObject.m
R MediaWikiKit/MediaWikiKit/MWKTitle.h
A MediaWikiKit/MediaWikiKit/MWKTitle.m
A MediaWikiKit/MediaWikiKit/MWKUser.h
A MediaWikiKit/MediaWikiKit/MWKUser.m
A MediaWikiKit/MediaWikiKit/MWKUserDataStore.h
A MediaWikiKit/MediaWikiKit/MWKUserDataStore.m
A MediaWikiKit/MediaWikiKit/MediaWikiKit.h
A MediaWikiKit/MediaWikiKit/MediaWikiKit.m
A MediaWikiKit/MediaWikiKitTests/Info.plist
A MediaWikiKit/MediaWikiKitTests/MWKArticleStoreTestCase.h
A MediaWikiKit/MediaWikiKitTests/MWKArticleStoreTestCase.m
A MediaWikiKit/MediaWikiKitTests/MWKArticleTests.m
A MediaWikiKit/MediaWikiKitTests/MWKDataStorePathTests.m
A MediaWikiKit/MediaWikiKitTests/MWKDataStoreStorageTests.m
A MediaWikiKit/MediaWikiKitTests/MWKHistoryListTests.m
A MediaWikiKit/MediaWikiKitTests/MWKImageStorageTests.m
A MediaWikiKit/MediaWikiKitTests/MWKProtectionStatusTests.m
A MediaWikiKit/MediaWikiKitTests/MWKSiteTests.m
A MediaWikiKit/MediaWikiKitTests/MWKTestCase.h
A MediaWikiKit/MediaWikiKitTests/MWKTestCase.m
A MediaWikiKit/MediaWikiKitTests/MWKTitleTests.m
A MediaWikiKit/MediaWikiKitTests/MWKUserTests.m
A MediaWikiKit/MediaWikiKitTests/TemplateIcon2x.png
A MediaWikiKit/MediaWikiKitTests/golden-gate.jpg
A MediaWikiKit/MediaWikiKitTests/protection-empty.json
A MediaWikiKit/MediaWikiKitTests/protection-obama.json
A MediaWikiKit/MediaWikiKitTests/section0.json
A MediaWikiKit/MediaWikiKitTests/section1-end.json
A MediaWikiKit/MediaWikiKitTests/test-notes.txt
A MediaWikiKit/MediaWikiKitTests/user-anon.json
A MediaWikiKit/MediaWikiKitTests/user-loggedin.json
A MediaWikiKit/README.md
M Wikipedia.xcodeproj/project.pbxproj
M wikipedia/Categories/Alerts/AlertWebView.m
M wikipedia/Categories/Article+Convenience.h
M wikipedia/Categories/Article+Convenience.m
R wikipedia/Categories/MWKSection+DisplayHtml.h
R wikipedia/Categories/MWKSection+DisplayHtml.m
R wikipedia/Categories/MWKSection+ImageRecords.h
R wikipedia/Categories/MWKSection+ImageRecords.m
R wikipedia/Categories/MWKSection+TOC.h
R wikipedia/Categories/MWKSection+TOC.m
M wikipedia/Categories/NSString+Extras.m
D wikipedia/Categories/Section+LeadSection.h
D wikipedia/Categories/Section+LeadSection.m
M wikipedia/EventLogging/EventLoggingFunnel.m
M wikipedia/Networking/Fetchers/AccountCreationTokenFetcher.m
M wikipedia/Networking/Fetchers/AccountCreator.m
M wikipedia/Networking/Fetchers/AccountLogin.m
M wikipedia/Networking/Fetchers/ArticleFetcher.h
M wikipedia/Networking/Fetchers/ArticleFetcher.m
M wikipedia/Networking/Fetchers/CaptchaResetter.m
M wikipedia/Networking/Fetchers/EditTokenFetcher.h
M wikipedia/Networking/Fetchers/EditTokenFetcher.m
M wikipedia/Networking/Fetchers/LanguageLinksFetcher.h
M wikipedia/Networking/Fetchers/LanguageLinksFetcher.m
M wikipedia/Networking/Fetchers/LoginTokenFetcher.m
M wikipedia/Networking/Fetchers/PageHistoryFetcher.h
M wikipedia/Networking/Fetchers/PageHistoryFetcher.m
M wikipedia/Networking/Fetchers/PreviewHtmlFetcher.h
M wikipedia

[MediaWiki-commits] [Gerrit] Fix link navigation regression - change (apps...wikipedia)

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

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

Change subject: Fix link navigation regression
..

Fix link navigation regression

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


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

diff --git a/wikipedia/View Controllers/WebView/WebViewController.m 
b/wikipedia/View Controllers/WebView/WebViewController.m
index 1ef6bd3..4cc43a9 100644
--- a/wikipedia/View Controllers/WebView/WebViewController.m
+++ b/wikipedia/View Controllers/WebView/WebViewController.m
@@ -1428,6 +1428,7 @@
 [self updateHistoryDateVisitedForArticleBeingNavigatedFrom];
 }
 self.currentTitle = title;
+session.title = title;
 
 [self retrieveArticleForPageTitle: title
   discoveryMethod: discoveryMethod];

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icc4bd39812e6dd2236496a08d124cfcef4088f12
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] moar exceptions - change (apps...wikipedia)

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

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

Change subject: moar exceptions
..

moar exceptions

Change-Id: I0294d4e4d8e7efbe64b57c5657cc2b397930bab2
---
M MediaWikiKit/MediaWikiKit/MWKDataStore.m
1 file changed, 5 insertions(+), 0 deletions(-)


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

diff --git a/MediaWikiKit/MediaWikiKit/MWKDataStore.m 
b/MediaWikiKit/MediaWikiKit/MWKDataStore.m
index e422097..d04f467 100644
--- a/MediaWikiKit/MediaWikiKit/MWKDataStore.m
+++ b/MediaWikiKit/MediaWikiKit/MWKDataStore.m
@@ -261,6 +261,11 @@
 NSString *path = [self pathForTitle:title];
 NSString *filePath = [path 
stringByAppendingPathComponent:@"Article.plist"];
 NSDictionary *dict = [NSDictionary dictionaryWithContentsOfFile:filePath];
+if (dict == nil) {
+@throw [NSException exceptionWithName:@"MWKDataStoreException"
+   reason:@"failed to load Article.plist"
+ userInfo:@{filePath: filePath}];
+}
 return [[MWKArticle alloc] initWithTitle:title dict:dict];
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0294d4e4d8e7efbe64b57c5657cc2b397930bab2
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] lastmodifiedby is just missing sometimes :P :) - change (apps...wikipedia)

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

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

Change subject: lastmodifiedby is just missing sometimes :P :)
..

lastmodifiedby is just missing sometimes :P :)

Change-Id: I65161230e68c913697284bd3cb4d8aa75b75ef28
---
M MediaWikiKit/MediaWikiKit/MWKSiteDataObject.m
1 file changed, 3 insertions(+), 0 deletions(-)


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

diff --git a/MediaWikiKit/MediaWikiKit/MWKSiteDataObject.m 
b/MediaWikiKit/MediaWikiKit/MWKSiteDataObject.m
index 78d8748..6b607b5 100644
--- a/MediaWikiKit/MediaWikiKit/MWKSiteDataObject.m
+++ b/MediaWikiKit/MediaWikiKit/MWKSiteDataObject.m
@@ -53,9 +53,12 @@
 {
 MWKUser *user = [self optionalUser:key dict:dict];
 if (user == nil) {
+return [self optionalUser:key dict:@{key: [NSNull null]}];
+/*
 @throw [NSException exceptionWithName:@"MWKDataObjectException"
reason:@"missing required user field"
  userInfo:@{@"key": key}];
+ */
 } else {
 return user;
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I65161230e68c913697284bd3cb4d8aa75b75ef28
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] workaround for unfinished thumbs on history list - change (apps...wikipedia)

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

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

Change subject: workaround for unfinished thumbs on history list
..

workaround for unfinished thumbs on history list

Change-Id: Id052300806e5f3615c7ae87316557ad92db234d1
---
M wikipedia/View Controllers/History/HistoryViewController.m
1 file changed, 4 insertions(+), 1 deletion(-)


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

diff --git a/wikipedia/View Controllers/History/HistoryViewController.m 
b/wikipedia/View Controllers/History/HistoryViewController.m
index 48ced7e..59ef594 100644
--- a/wikipedia/View Controllers/History/HistoryViewController.m
+++ b/wikipedia/View Controllers/History/HistoryViewController.m
@@ -346,7 +346,10 @@
 cell.methodLabel.attributedText = [self 
getIconLabelAttributedStringForDiscoveryMethod:historyEntry.discoveryMethod];
 
 MWKArticleStore *articleStore = [[SessionSingleton 
sharedInstance].dataStore articleStoreWithTitle:historyEntry.title];
-UIImage *thumbImage = [articleStore 
UIImageWithImage:articleStore.thumbnailImage];
+UIImage *thumbImage;
+if (articleStore.thumbnailImage) {
+thumbImage = [articleStore 
UIImageWithImage:articleStore.thumbnailImage];
+}
 if(thumbImage){
 cell.imageView.image = thumbImage;
 cell.useField = YES;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id052300806e5f3615c7ae87316557ad92db234d1
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] hide zee loading indicator on article load fail - change (apps...wikipedia)

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

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

Change subject: hide zee loading indicator on article load fail
..

hide zee loading indicator on article load fail

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


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

diff --git a/wikipedia/View Controllers/WebView/WebViewController.m 
b/wikipedia/View Controllers/WebView/WebViewController.m
index 5e2a406..62401a2 100644
--- a/wikipedia/View Controllers/WebView/WebViewController.m
+++ b/wikipedia/View Controllers/WebView/WebViewController.m
@@ -1525,6 +1525,8 @@
{
NSString *errorMsg = error.localizedDescription;
[self showAlert:errorMsg type:ALERT_TYPE_TOP 
duration:-1];
+
+[self loadingIndicatorHide];

// Remove the article so it doesn't get saved.
//[article.managedObjectContext 
deleteObject:article];

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I75d585c3f0672367ac5ccd8f76ae4cdf538d1dae
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 order of operations on new install - change (apps...wikipedia)

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

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

Change subject: fix order of operations on new install
..

fix order of operations on new install

was loading defaults through the session title in the url cache setup
move that to after the defaults setup

Change-Id: Ibe1f35f67eca6b9f3d572d31b3fe3f0d19b2799e
---
M wikipedia/AppDelegate.m
1 file changed, 9 insertions(+), 9 deletions(-)


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

diff --git a/wikipedia/AppDelegate.m b/wikipedia/AppDelegate.m
index 75c99b6..dc3a01b 100644
--- a/wikipedia/AppDelegate.m
+++ b/wikipedia/AppDelegate.m
@@ -10,19 +10,19 @@
 
 - (BOOL)application:(UIApplication *)application 
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
 {
-// Set the shared url cache to our custom NSURLCache which re-routes 
images to
-// our article cache.
-//TODO: update the app to occasionally check total size of our article cache 
and if its file exceeded some threshold size prune its image entries
-// (probably by Image.lastDateAccessed)
-URLCache *urlCache = [[URLCache alloc] initWithMemoryCapacity: 1024 * 1024 
* 8
- diskCapacity: 1024 * 1024 
* 25
- diskPath: nil];
-[NSURLCache setSharedURLCache:urlCache];
-
 [WikipediaAppUtils copyAssetsFolderToAppDataDocuments];
 [self registerStandardUserDefaults];
 [self systemWideStyleOverrides];
 
+// Set the shared url cache to our custom NSURLCache which re-routes 
images to
+// our article cache.
+//TODO: update the app to occasionally check total size of our article 
cache and if its file exceeded some threshold size prune its image entries
+// (probably by Image.lastDateAccessed)
+URLCache *urlCache = [[URLCache alloc] initWithMemoryCapacity: 1024 * 1024 
* 8
+ diskCapacity: 1024 * 1024 
* 25
+ diskPath: nil];
+[NSURLCache setSharedURLCache:urlCache];
+
 // Enables Alignment Rect highlighting for debugging
 //[[NSUserDefaults standardUserDefaults] setBool:NO 
forKey:@"UIViewShowAlignmentRects"];
 //[[NSUserDefaults standardUserDefaults] synchronize];

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibe1f35f67eca6b9f3d572d31b3fe3f0d19b2799e
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] NSString contains: is new in ios 8 :P - change (apps...wikipedia)

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

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

Change subject: NSString contains: is new in ios 8 :P
..

NSString contains: is new in ios 8 :P

Change-Id: I317d971fe0bd5b950fc69a34376ab2f68e48f536
---
M MediaWikiKit/MediaWikiKit/MWKDataObject.m
1 file changed, 2 insertions(+), 1 deletion(-)


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

diff --git a/MediaWikiKit/MediaWikiKit/MWKDataObject.m 
b/MediaWikiKit/MediaWikiKit/MWKDataObject.m
index 0f24fff..5715f7b 100644
--- a/MediaWikiKit/MediaWikiKit/MWKDataObject.m
+++ b/MediaWikiKit/MediaWikiKit/MWKDataObject.m
@@ -77,7 +77,8 @@
 
 - (NSNumber *)numberWithString:(NSString *)str
 {
-if ([str containsString:@"."] || [str containsString:@"e"]) {
+if ([str rangeOfString:@"."].location != NSNotFound ||
+[str rangeOfString:@"e"].location != NSNotFound) {
 double val = [str doubleValue];
 return [NSNumber numberWithDouble:val];
 } else {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I317d971fe0bd5b950fc69a34376ab2f68e48f536
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] Don't explode in cache when something loads off-upload files - change (apps...wikipedia)

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

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

Change subject: Don't explode in cache when something loads off-upload files
..

Don't explode in cache when something loads off-upload files

Was dying in article image handling when the url cache picked up
an "image" file on bits for EventLogging

Change-Id: Ida437295dac2b4ac5a5d7fdf72e27ab72947c6e9
---
M wikipedia/Web Image Interception/URLCache.m
1 file changed, 12 insertions(+), 0 deletions(-)


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

diff --git a/wikipedia/Web Image Interception/URLCache.m b/wikipedia/Web Image 
Interception/URLCache.m
index b7dcb36..8200dd1 100644
--- a/wikipedia/Web Image Interception/URLCache.m
+++ b/wikipedia/Web Image Interception/URLCache.m
@@ -44,6 +44,11 @@
 return NO;
 }
 
+-(BOOL)isURLRerouted:(NSURL *)url
+{
+return [url.host isEqualToString:@"upload.wikimedia.org"];
+}
+
 - (void)storeCachedResponse:(NSCachedURLResponse *)cachedResponse 
forRequest:(NSURLRequest *)request
 {
 if (![self isMIMETypeRerouted:cachedResponse.response.MIMEType]) {
@@ -58,6 +63,10 @@
 [self processZeroHeaders:cachedResponse.response];
 });
 }
+return;
+}
+if (![self isURLRerouted:request.URL]) {
+// Only cache stuff from upload.wikimedia.org
 return;
 }
 
@@ -117,6 +126,9 @@
 if (![self isMIMETypeRerouted:[request.URL.pathExtension 
getImageMimeTypeForExtension]]) {
 return [super cachedResponseForRequest:request];
 }
+if (![self isURLRerouted:request.URL]) {
+return [super cachedResponseForRequest:request];
+}
 
 /*
  NSData *imgData = UIImagePNGRepresentation([UIImage 
imageNamed:@"logo-onboarding-subtitle.png"]);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ida437295dac2b4ac5a5d7fdf72e27ab72947c6e9
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 saving to saved pages list - change (apps...wikipedia)

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

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

Change subject: Fix saving to saved pages list
..

Fix saving to saved pages list

Change-Id: I642dd43a3b218e73f67df7451134bb20f4af50c9
---
M MediaWikiKit/MediaWikiKit/MWKSavedPageEntry.m
M MediaWikiKit/MediaWikiKit/MWKSavedPageList.m
2 files changed, 12 insertions(+), 4 deletions(-)


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

diff --git a/MediaWikiKit/MediaWikiKit/MWKSavedPageEntry.m 
b/MediaWikiKit/MediaWikiKit/MWKSavedPageEntry.m
index d27e6ec..cc0c09f 100644
--- a/MediaWikiKit/MediaWikiKit/MWKSavedPageEntry.m
+++ b/MediaWikiKit/MediaWikiKit/MWKSavedPageEntry.m
@@ -14,7 +14,8 @@
 {
 self = [self initWithSite:title.site];
 if (self) {
-self.date = [[NSDate alloc] init];
+_title = title;
+_date = [[NSDate alloc] init];
 }
 return self;
 }
diff --git a/MediaWikiKit/MediaWikiKit/MWKSavedPageList.m 
b/MediaWikiKit/MediaWikiKit/MWKSavedPageList.m
index bb9dd56..db4d682 100644
--- a/MediaWikiKit/MediaWikiKit/MWKSavedPageList.m
+++ b/MediaWikiKit/MediaWikiKit/MWKSavedPageList.m
@@ -44,7 +44,7 @@
 
 -(void)addEntry:(MWKSavedPageEntry *)entry
 {
-if ([self entryForTitle:entry.title] != nil) {
+if ([self entryForTitle:entry.title] == nil) {
 // there can be only one
 [entries insertObject:entry atIndex:0];
 entriesByTitle[entry.title] = entry;
@@ -68,13 +68,20 @@
 
 #pragma mark - data i/o methods
 
+-(instancetype)init
+{
+self = [super init];
+if (self) {
+entries = [[NSMutableArray alloc] init];
+entriesByTitle = [[NSMutableDictionary alloc] init];
+}
+return self;
+}
 -(instancetype)initWithDict:(NSDictionary *)dict
 {
 self = [self init];
 if (self) {
 NSArray *array = dict[@"entries"];
-entries = [[NSMutableArray alloc] init];
-entriesByTitle = [[NSMutableDictionary alloc] init];
 for (NSDictionary *entryDict in array) {
 MWKSavedPageEntry *entry = [[MWKSavedPageEntry alloc] 
initWithDict:entryDict];
 [entries addObject:entry];

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I642dd43a3b218e73f67df7451134bb20f4af50c9
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 order of back/forward - change (apps...wikipedia)

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

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

Change subject: fix for order of back/forward
..

fix for order of back/forward

Change-Id: I90c8b0ccd35d7a760c62f3506dbb59e3128eeb70
---
M MediaWikiKit/MediaWikiKit/MWKHistoryList.m
1 file changed, 4 insertions(+), 4 deletions(-)


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

diff --git a/MediaWikiKit/MediaWikiKit/MWKHistoryList.m 
b/MediaWikiKit/MediaWikiKit/MWKHistoryList.m
index 56486a5..272effb 100644
--- a/MediaWikiKit/MediaWikiKit/MWKHistoryList.m
+++ b/MediaWikiKit/MediaWikiKit/MWKHistoryList.m
@@ -38,8 +38,8 @@
 NSUInteger index = [self indexForEntry:entry];
 if (index == NSNotFound) {
 return nil;
-} else if (index + 1 < self.length) {
-return [self entryAtIndex:index + 1];
+} else if (index > 0) {
+return [self entryAtIndex:index - 1];
 } else {
 return nil;
 }
@@ -50,8 +50,8 @@
 NSUInteger index = [self indexForEntry:entry];
 if (index == NSNotFound) {
 return nil;
-} else if (index > 0) {
-return [self entryAtIndex:index - 1];
+} else if (index + 1 < self.length) {
+return [self entryAtIndex:index + 1];
 } else {
 return nil;
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I90c8b0ccd35d7a760c62f3506dbb59e3128eeb70
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] implement fileNameNoSizePrefix - change (apps...wikipedia)

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

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

Change subject: implement fileNameNoSizePrefix
..

implement fileNameNoSizePrefix

Change-Id: I463c8f0f914dd7865438abf145cfd68a4ed08d59
---
M MediaWikiKit/MediaWikiKit/MWKImage.m
1 file changed, 7 insertions(+), 1 deletion(-)


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

diff --git a/MediaWikiKit/MediaWikiKit/MWKImage.m 
b/MediaWikiKit/MediaWikiKit/MWKImage.m
index f56b928..eb3dc78 100644
--- a/MediaWikiKit/MediaWikiKit/MWKImage.m
+++ b/MediaWikiKit/MediaWikiKit/MWKImage.m
@@ -54,7 +54,13 @@
 
 -(NSString *)fileNameNoSizePrefix
 {
-return self.fileName; // @FIXME IMPLEMENT
+NSRegularExpression *re = [NSRegularExpression 
regularExpressionWithPattern:@"^\\d+px-(.*)$" options:0 error:nil];
+NSArray *matches = [re matchesInString:self.fileName options:0 
range:NSMakeRange(0, [self.fileName length])];
+if (matches) {
+return matches[1];
+} else {
+return self.fileName;
+}
 }
 
 -(id)dataExport

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I463c8f0f914dd7865438abf145cfd68a4ed08d59
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] Image caching -- sorta working? :D - change (apps...wikipedia)

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

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

Change subject: Image caching -- sorta working? :D
..

Image caching -- sorta working? :D

- saving stub image info to individual .plist files as well as in a straight 
URL list for the article
-- may want to break the list down to per-section if we want to replicate some 
previous behaviors
- went with shorter filenames (last filename only without path info), may break 
in some rare corner cases but the long ones were breaking frequently
- using the live session articleStore for caching so it actually uses the right 
article!

This doesn't yet handle thumbnails in list pages real well, as global cache 
doesn't know
which article is which.

Change-Id: I923a7f6f2eb58d03edc9d3b7efe68c98595e9acb
---
M MediaWikiKit/MediaWikiKit.xcodeproj/project.pbxproj
M MediaWikiKit/MediaWikiKit/MWKArticleStore.h
M MediaWikiKit/MediaWikiKit/MWKArticleStore.m
M MediaWikiKit/MediaWikiKit/MWKDataStore.m
M MediaWikiKit/MediaWikiKit/MWKImage.h
M MediaWikiKit/MediaWikiKit/MWKImage.m
A MediaWikiKit/MediaWikiKit/MWKImageList.h
A MediaWikiKit/MediaWikiKit/MWKImageList.m
M MediaWikiKit/MediaWikiKit/MediaWikiKit.h
M wikipedia/Networking/Fetchers/ArticleFetcher.m
M wikipedia/Web Image Interception/URLCache.m
11 files changed, 216 insertions(+), 33 deletions(-)


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

diff --git a/MediaWikiKit/MediaWikiKit.xcodeproj/project.pbxproj 
b/MediaWikiKit/MediaWikiKit.xcodeproj/project.pbxproj
index cb1a3ba..af8a4f9 100644
--- a/MediaWikiKit/MediaWikiKit.xcodeproj/project.pbxproj
+++ b/MediaWikiKit/MediaWikiKit.xcodeproj/project.pbxproj
@@ -50,6 +50,8 @@
D49ADCCC1A0031580010F839 /* golden-gate.jpg in Resources */ = 
{isa = PBXBuildFile; fileRef = D49ADCCB1A0031580010F839 /* golden-gate.jpg */; 
};
D49ADCCE1A00346B0010F839 /* MWKArticleStoreTestCase.m in 
Sources */ = {isa = PBXBuildFile; fileRef = D49ADCCD1A00346B0010F839 /* 
MWKArticleStoreTestCase.m */; };
D4B94B1C1A2FB7D2007FC79B /* organization-anon.json in Resources 
*/ = {isa = PBXBuildFile; fileRef = D4B94B1B1A2FB7D2007FC79B /* 
organization-anon.json */; };
+   D4B94B1F1A2FE975007FC79B /* MWKImageList.m in Sources */ = {isa 
= PBXBuildFile; fileRef = D4B94B1E1A2FE975007FC79B /* MWKImageList.m */; };
+   D4B94B201A2FE975007FC79B /* MWKImageList.m in Sources */ = {isa 
= PBXBuildFile; fileRef = D4B94B1E1A2FE975007FC79B /* MWKImageList.m */; };
D4C3FA5519E4783A00EB08CC /* MWKSite.m in Sources */ = {isa = 
PBXBuildFile; fileRef = D4C3FA5419E4783A00EB08CC /* MWKSite.m */; };
D4C3FA5A19E47AA500EB08CC /* MWKSiteTests.m in Sources */ = {isa 
= PBXBuildFile; fileRef = D4C3FA5919E47AA500EB08CC /* MWKSiteTests.m */; };
D4C3FA5B19E47ABE00EB08CC /* MWKSite.m in Sources */ = {isa = 
PBXBuildFile; fileRef = D4C3FA5419E4783A00EB08CC /* MWKSite.m */; };
@@ -130,6 +132,8 @@
D49ADCCD1A00346B0010F839 /* MWKArticleStoreTestCase.m */ = {isa 
= PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; 
path = MWKArticleStoreTestCase.m; sourceTree = ""; };
D49ADCCF1A0041570010F839 /* MWKArticleStoreTestCase.h */ = {isa 
= PBXFileReference; lastKnownFileType = sourcecode.c.h; path = 
MWKArticleStoreTestCase.h; sourceTree = ""; };
D4B94B1B1A2FB7D2007FC79B /* organization-anon.json */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = 
"organization-anon.json"; sourceTree = ""; };
+   D4B94B1D1A2FE975007FC79B /* MWKImageList.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
MWKImageList.h; sourceTree = ""; };
+   D4B94B1E1A2FE975007FC79B /* MWKImageList.m */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path 
= MWKImageList.m; sourceTree = ""; };
D4C3FA5319E4783A00EB08CC /* MWKSite.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
MWKSite.h; sourceTree = ""; };
D4C3FA5419E4783A00EB08CC /* MWKSite.m */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path 
= MWKSite.m; sourceTree = ""; };
D4C3FA5919E47AA500EB08CC /* MWKSiteTests.m */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path 
= MWKSiteTests.m; sourceTree = ""; };
@@ -272,6 +276,8 @@
D44EA7881A1BCD1400631A1D /* 
MWKRecentSearchEntry.m */,
D44EA78B1A1BCD2600631A1D /* 
MWKRecentSearchList.h */,
D44EA78C1A1BCD2600631A1D /* 
MWKRecentSearchList.m */,
+   D4B94B1D1A2FE975007FC79B /* MWKImageList.h */,
+

[MediaWiki-commits] [Gerrit] fix ToC missing top-level entry - change (apps...wikipedia)

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

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

Change subject: fix ToC missing top-level entry
..

fix ToC missing top-level entry

Change-Id: Ife31adfe528a095064a424671669e03b69b7434c
---
M wikipedia/View Controllers/TableOfContents/TOCViewController.m
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/wikipedia/View Controllers/TableOfContents/TOCViewController.m 
b/wikipedia/View Controllers/TableOfContents/TOCViewController.m
index eaa8b2f..50faf42 100644
--- a/wikipedia/View Controllers/TableOfContents/TOCViewController.m
+++ b/wikipedia/View Controllers/TableOfContents/TOCViewController.m
@@ -596,13 +596,13 @@
 for (MWKSection *section in [sections copy]) {
 
 NSString *title = [section tocTitle];
-if (!section.sectionId || !section.level || !title) continue;
+//if (!section.sectionId || !section.level || !title) continue;
 
 NSDictionary *sectionDict =
 @{
   @"id": @(section.sectionId),
   @"isLead": @([section isLeadSection]),
-  @"level": section.level,
+  @"level": section.level ? section.level : @0,
   @"title": title
 };
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ife31adfe528a095064a424671669e03b69b7434c
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] magic happy language name - change (apps...wikipedia)

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

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

Change subject: magic happy language name
..

magic happy language name

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


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

diff --git a/wikipedia/View Controllers/History/HistoryViewController.m 
b/wikipedia/View Controllers/History/HistoryViewController.m
index 59ef594..7c8c082 100644
--- a/wikipedia/View Controllers/History/HistoryViewController.m
+++ b/wikipedia/View Controllers/History/HistoryViewController.m
@@ -324,7 +324,7 @@
 MWKHistoryEntry *historyEntry = array[indexPath.row];
 
 NSString *title = [historyEntry.title prefixedText];
-NSString *language = [NSString stringWithFormat:@"\n%@", 
historyEntry.title.site.language]; // languageName
+NSString *language = [NSString stringWithFormat:@"\n%@", 
[WikipediaAppUtils domainNameForCode:historyEntry.title.site.language]];
 
 NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] 
init];
 paragraphStyle.alignment = [WikipediaAppUtils rtlSafeAlignment];
diff --git a/wikipedia/View Controllers/SavedPages/SavedPagesViewController.m 
b/wikipedia/View Controllers/SavedPages/SavedPagesViewController.m
index eb8c47c..537121d 100644
--- a/wikipedia/View Controllers/SavedPages/SavedPagesViewController.m
+++ b/wikipedia/View Controllers/SavedPages/SavedPagesViewController.m
@@ -172,7 +172,7 @@
 MWKSavedPageEntry *savedEntry = [savedPageList entryAtIndex:indexPath.row];
 
 NSString *title = savedEntry.title.prefixedText;
-NSString *language = [NSString stringWithFormat:@"\n%@", /* @TODO pretty 
language savedEntry.article.domainName*/savedEntry.site.language];
+NSString *language = [NSString stringWithFormat:@"\n%@", 
[WikipediaAppUtils domainNameForCode:savedEntry.site.language]];
 
 NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] 
init];
 paragraphStyle.alignment = [WikipediaAppUtils rtlSafeAlignment];

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifcd53509e46d8e79aa5544c0f9a36bd5f7715c29
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] Split image records into sections and save thumbnail - change (apps...wikipedia)

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

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

Change subject: Split image records into sections and save thumbnail
..

Split image records into sections and save thumbnail

Change-Id: Iee365023b9418c9e853ab97ac5a9f971edb4
---
M MediaWikiKit/MediaWikiKit/MWKArticleStore.h
M MediaWikiKit/MediaWikiKit/MWKArticleStore.m
M MediaWikiKit/MediaWikiKit/MWKImage.m
M MediaWikiKit/MediaWikiKit/MWKImageList.h
M MediaWikiKit/MediaWikiKit/MWKImageList.m
M wikipedia/Categories/MWKSection+ImageRecords.m
M wikipedia/Networking/Fetchers/ArticleFetcher.m
M wikipedia/View Controllers/WebView/WebViewController.m
8 files changed, 63 insertions(+), 36 deletions(-)


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

diff --git a/MediaWikiKit/MediaWikiKit/MWKArticleStore.h 
b/MediaWikiKit/MediaWikiKit/MWKArticleStore.h
index 478507a..0501214 100644
--- a/MediaWikiKit/MediaWikiKit/MWKArticleStore.h
+++ b/MediaWikiKit/MediaWikiKit/MWKArticleStore.h
@@ -35,7 +35,7 @@
 -(NSData *)imageDataWithImage:(MWKImage *)image;
 -(UIImage *)UIImageWithImage:(MWKImage *)image;
 
-@property (readonly) MWKImage *thumbnailImage;
+@property (readwrite) MWKImage *thumbnailImage;
 @property (readonly) UIImage *thumbnailUIImage;
 
 -(void)saveImageList;
@@ -54,7 +54,7 @@
 /**
  * Create a stub record for an image with given URL.
  */
--(MWKImage *)importImageURL:(NSString *)url;
+-(MWKImage *)importImageURL:(NSString *)url sectionId:(int)sectionId;
 
 /**
  * Import downloaded image data into our data store,
diff --git a/MediaWikiKit/MediaWikiKit/MWKArticleStore.m 
b/MediaWikiKit/MediaWikiKit/MWKArticleStore.m
index bc594d9..509836b 100644
--- a/MediaWikiKit/MediaWikiKit/MWKArticleStore.m
+++ b/MediaWikiKit/MediaWikiKit/MWKArticleStore.m
@@ -153,9 +153,9 @@
 return [self.dataStore imageWithURL:url title:self.title];
 }
 
--(MWKImage *)importImageURL:(NSString *)url
+-(MWKImage *)importImageURL:(NSString *)url sectionId:(int)sectionId
 {
-[self.imageList addImageURL:url];
+[self.imageList addImageURL:url sectionId:sectionId];
 MWKImage *image = [[MWKImage alloc] initWithTitle:self.title 
sourceURL:url];;
 [self.dataStore saveImage:image]; // stub
 return image;
@@ -212,4 +212,19 @@
 [[NSFileManager defaultManager] removeItemAtPath:path error:nil];
 }
 
+-(MWKImage *)thumbnailImage
+{
+NSString *url = [self.imageList imageURLAtIndex:0 
sectionId:MWK_SECTIONID_THUMBNAIL];
+if (url) {
+return [self imageWithURL:url];
+} else {
+return nil;
+}
+}
+
+-(void)setThumbnailImage:(MWKImage *)thumbnailImage
+{
+[self.imageList addImageURL:thumbnailImage.sourceURL 
sectionId:MWK_SECTIONID_THUMBNAIL];
+[self saveImageList];
+}
 @end
diff --git a/MediaWikiKit/MediaWikiKit/MWKImage.m 
b/MediaWikiKit/MediaWikiKit/MWKImage.m
index 635a13b..2b0efe8 100644
--- a/MediaWikiKit/MediaWikiKit/MWKImage.m
+++ b/MediaWikiKit/MediaWikiKit/MWKImage.m
@@ -58,7 +58,7 @@
 NSRegularExpression *re = [NSRegularExpression 
regularExpressionWithPattern:@"^\\d+px-(.*)$" options:0 error:nil];
 NSArray *matches = [re matchesInString:fileName options:0 
range:NSMakeRange(0, [fileName length])];
 if ([matches count]) {
-return [fileName substringWithRange:[matches[0] rangeAtIndex:0]];
+return [fileName substringWithRange:[matches[0] rangeAtIndex:1]];
 } else {
 return fileName;
 }
diff --git a/MediaWikiKit/MediaWikiKit/MWKImageList.h 
b/MediaWikiKit/MediaWikiKit/MWKImageList.h
index 9dcda99..280b297 100644
--- a/MediaWikiKit/MediaWikiKit/MWKImageList.h
+++ b/MediaWikiKit/MediaWikiKit/MWKImageList.h
@@ -8,6 +8,9 @@
 
 #import "MWKSiteDataObject.h"
 
+#define MWK_SECTIONID_THUMBNAIL -1
+
+
 @interface MWKImageList : MWKSiteDataObject
 
 @property (readonly) MWKTitle *title;
@@ -16,11 +19,11 @@
 -(instancetype)initWithTitle:(MWKTitle *)title;
 -(instancetype)initWithTitle:(MWKTitle *)title dict:(NSDictionary *)dict;
 
--(void)addImageURL:(NSString *)imageURL;
+-(void)addImageURL:(NSString *)imageURL sectionId:(int)sectionId;
 
--(NSString *)imageURLAtIndex:(NSUInteger)index;
+-(NSString *)imageURLAtIndex:(NSUInteger)index sectionId:(int)sectionId;
 -(BOOL)hasImageURL:(NSString *)imageURL;
--(NSUInteger)indexOfImageURL:(NSString *)url;
 -(NSString *)largestImageVariant:(NSString *)image;
 
+@property (readwrite)NSString *thumbnailURL;
 @end
diff --git a/MediaWikiKit/MediaWikiKit/MWKImageList.m 
b/MediaWikiKit/MediaWikiKit/MWKImageList.m
index 120611e..265775b 100644
--- a/MediaWikiKit/MediaWikiKit/MWKImageList.m
+++ b/MediaWikiKit/MediaWikiKit/MWKImageList.m
@@ -9,13 +9,25 @@
 #import "MediaWikiKit.h"
 
 @implementation MWKImageList {
-NSMutableArray *entries;
+NSMutableDictionary *entriesBySection;
 NSMutableDictionary *entriesByURL;
 NSMutableDictionary *entriesByNameWithoutSize;
 }
 
--(void)addImageURL:(NSString *)

[MediaWiki-commits] [Gerrit] Forgot to implement thumbnailUIImage property; fixes Saved P... - change (apps...wikipedia)

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

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

Change subject: Forgot to implement thumbnailUIImage property; fixes Saved 
Pages thumbnails
..

Forgot to implement thumbnailUIImage property; fixes Saved Pages thumbnails

Change-Id: Ib7dc498dde13a6987b56bec65fc4994650bce090
---
M MediaWikiKit/MediaWikiKit/MWKArticleStore.m
1 file changed, 12 insertions(+), 0 deletions(-)


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

diff --git a/MediaWikiKit/MediaWikiKit/MWKArticleStore.m 
b/MediaWikiKit/MediaWikiKit/MWKArticleStore.m
index c262229..3581d1c 100644
--- a/MediaWikiKit/MediaWikiKit/MWKArticleStore.m
+++ b/MediaWikiKit/MediaWikiKit/MWKArticleStore.m
@@ -231,4 +231,16 @@
 [self.imageList addImageURL:thumbnailImage.sourceURL 
sectionId:MWK_SECTIONID_THUMBNAIL];
 [self saveImageList];
 }
+
+-(UIImage *)thumbnailUIImage
+{
+MWKImage *image = self.thumbnailImage;
+if (image) {
+NSData *data = [self imageDataWithImage:image];
+return [UIImage imageWithData:data];
+} else {
+return nil;
+}
+}
+
 @end

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib7dc498dde13a6987b56bec65fc4994650bce090
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] Thumbnail fallback: if none recorded, use first image in sec... - change (apps...wikipedia)

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

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

Change subject: Thumbnail fallback: if none recorded, use first image in 
section 0
..

Thumbnail fallback: if none recorded, use first image in section 0

Change-Id: Ie8de4bfe6f7279ddafa630339cf6220e4754837d
---
M MediaWikiKit/MediaWikiKit/MWKArticleStore.m
1 file changed, 4 insertions(+), 0 deletions(-)


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

diff --git a/MediaWikiKit/MediaWikiKit/MWKArticleStore.m 
b/MediaWikiKit/MediaWikiKit/MWKArticleStore.m
index 509836b..c262229 100644
--- a/MediaWikiKit/MediaWikiKit/MWKArticleStore.m
+++ b/MediaWikiKit/MediaWikiKit/MWKArticleStore.m
@@ -215,6 +215,10 @@
 -(MWKImage *)thumbnailImage
 {
 NSString *url = [self.imageList imageURLAtIndex:0 
sectionId:MWK_SECTIONID_THUMBNAIL];
+if (url == nil) {
+// No recorded thumbnail? See if there's just a first-section image 
for now.
+url = [self.imageList imageURLAtIndex:0 sectionId:0];
+}
 if (url) {
 return [self imageWithURL:url];
 } else {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie8de4bfe6f7279ddafa630339cf6220e4754837d
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] Add 'entitydescription' prop on MWKArticle - change (apps...wikipedia)

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

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

Change subject: Add 'entitydescription' prop on MWKArticle
..

Add 'entitydescription' prop on MWKArticle

will need to be manually filled in on query since it's
not part of the mobileview API base dataset; once added
just save and it should work.

Change-Id: I3aef07031c3b07543383597e5f7113087e118326
---
M MediaWikiKit/MediaWikiKit/MWKArticle.h
M MediaWikiKit/MediaWikiKit/MWKArticle.m
2 files changed, 10 insertions(+), 0 deletions(-)


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

diff --git a/MediaWikiKit/MediaWikiKit/MWKArticle.h 
b/MediaWikiKit/MediaWikiKit/MWKArticle.h
index ca70ea1..fba2795 100644
--- a/MediaWikiKit/MediaWikiKit/MWKArticle.h
+++ b/MediaWikiKit/MediaWikiKit/MWKArticle.h
@@ -30,6 +30,8 @@
 @property (readonly) MWKProtectionStatus *protection; // required
 @property (readonly) BOOL editable;   // required
 
+@property (readonly) NSString*entitydescription; // optional; 
pulled via wikidata
+
 -(instancetype)initWithTitle:(MWKTitle *)title dict:(NSDictionary *)dict;
 
 @end
diff --git a/MediaWikiKit/MediaWikiKit/MWKArticle.m 
b/MediaWikiKit/MediaWikiKit/MWKArticle.m
index e010a47..72fdc2a 100644
--- a/MediaWikiKit/MediaWikiKit/MWKArticle.m
+++ b/MediaWikiKit/MediaWikiKit/MWKArticle.m
@@ -24,6 +24,9 @@
 _displaytitle   =  [self optionalString:  @"displaytitle"   
dict:dict];
 _protection =  [self requiredProtectionStatus:@"protection" 
dict:dict];
 _editable   = [[self requiredNumber:  @"editable"   
dict:dict] boolValue];
+
+// This doesn't come from mobileview api, queried separately
+_entitydescription = [self optionalString:@"entitydescription" 
dict:dict];
 }
 return self;
 }
@@ -47,6 +50,11 @@
 dict[@"protection"] = [self.protection dataExport];
 dict[@"editable"] = @(self.editable);
 
+if (self.entitydescription) {
+// This doesn't come from mobileview api, queried separately
+dict[@"entitydescription"] = self.entitydescription;
+}
+
 return [NSDictionary dictionaryWithDictionary:dict];
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3aef07031c3b07543383597e5f7113087e118326
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] largestImageWithURL convenience method on MWKArticleStore - change (apps...wikipedia)

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

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

Change subject: largestImageWithURL convenience method on MWKArticleStore
..

largestImageWithURL convenience method on MWKArticleStore

routes the input URL through the image list's largestVariant checker
so if we have a bigger image you can get it by feeding in your small
thumbnail gotten from other APIs

Change-Id: I53b0b423a357d5d4a7a81b4d0bdbb8eb75c1815e
---
M MediaWikiKit/MediaWikiKit/MWKArticleStore.h
M MediaWikiKit/MediaWikiKit/MWKArticleStore.m
M wikipedia/assets/preview.css
3 files changed, 8 insertions(+), 2 deletions(-)


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

diff --git a/MediaWikiKit/MediaWikiKit/MWKArticleStore.h 
b/MediaWikiKit/MediaWikiKit/MWKArticleStore.h
index 335a281..bf97b95 100644
--- a/MediaWikiKit/MediaWikiKit/MWKArticleStore.h
+++ b/MediaWikiKit/MediaWikiKit/MWKArticleStore.h
@@ -32,6 +32,8 @@
 
 @property (readonly) MWKImageList *imageList;
 -(MWKImage *)imageWithURL:(NSString *)url;
+-(MWKImage *)largestImageWithURL:(NSString *)url;
+
 -(NSData *)imageDataWithImage:(MWKImage *)image;
 -(UIImage *)UIImageWithImage:(MWKImage *)image;
 
diff --git a/MediaWikiKit/MediaWikiKit/MWKArticleStore.m 
b/MediaWikiKit/MediaWikiKit/MWKArticleStore.m
index dc3b598..b57b5ae 100644
--- a/MediaWikiKit/MediaWikiKit/MWKArticleStore.m
+++ b/MediaWikiKit/MediaWikiKit/MWKArticleStore.m
@@ -153,6 +153,11 @@
 return [self.dataStore imageWithURL:url title:self.title];
 }
 
+-(MWKImage *)largestImageWithURL:(NSString *)url
+{
+return [self.dataStore imageWithURL:[self.imageList 
largestImageVariant:url] title:self.title];
+}
+
 -(MWKImage *)importImageURL:(NSString *)url sectionId:(int)sectionId
 {
 [self.imageList addImageURL:url sectionId:sectionId];
diff --git a/wikipedia/assets/preview.css b/wikipedia/assets/preview.css
index 9b41fea..62aad36 100644
--- a/wikipedia/assets/preview.css
+++ b/wikipedia/assets/preview.css
@@ -1,2 +1 @@
-html,body,div,span,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,ins,em,img,small,strike,strong,sub,sup,tt,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,input,textarea,button,select,table,caption,tbody,tfoot,thead,tr,th,td,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline;background:none;-moz-box-sizing:border-box;-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}body{line-height:1;-webkit-tap-highlight-color:transparent}input{line-height:normal}ol,ul{list-style:none}table{border-collapse:collapse}html{-webkit-text-size-adjust:none;font-size:100%}body{font-family:"Helvetica
 Neue","Helvetica","Nimbus Sans L","Arial","Liberation 
Sans",sans-serif;line-height:1.4;color:#252525;background:#fff}.content{line-height:1.65;margin:.8em
 16px 0;word-wrap:break-word}@media all and 
(max-width:280px){body{font-size:.8em}.content{margin:0 
12px}}.nomobile{display:none !important}.content .thumb{margin:.6em 0}.content 
.thumb .thumbinner{margin:0 auto;max-width:100%}.content .thumb .thumbinner > 
div{float:none !important;width:auto !important;clear:both !important}.content 
.thumb .noresize{width:100%;overflow-x:auto}.content .thumb .noresize 
img{max-width:none !important}.content .thumbcaption{margin:.5em 0 
0;font-size:.8em;line-height:1.5;padding:0 !important;color:#555;width:auto 
!important}.content .thumbborder{border:1px solid #CCC}.content 
img{vertical-align:middle}.content .floatright{clear:right;float:right;margin:0 
0 .6em .6em}.content .floatleft{clear:left;float:left;margin:0 .6em .6em 
0}.content a > img{max-width:100% !important;height:auto !important}.content 
div.magnify{display:none}ul.gallery{list-style:none;max-width:100%}ul.gallery 
.gallerybox{display:inline-block;vertical-align:top;max-width:100%}ul.gallery 
.gallerybox .thumb img{display:block}ul.gallery .gallerybox > 
div{max-width:100%}ul.gallery .gallerybox > div > 
.thumb{max-width:100%}ul.gallery .gallerybox 
.gallerytext{overflow:hidden;padding:2px 
4px;word-wrap:break-word;font-size:.8em}#section_0{line-height:1.3}.content 
h1,.content h2,.content h3,.content h4,.content h5,.content 
h6{line-height:1.3;font-family:"Linux 
Libertine",Georgia,Times,serif;padding:.5em 0}.pre-content h1,.content 
h1{font-family:"Linux 
Libertine",Georgia,Times,serif;font-size:1.7em}h2{font-size:1.5em}h3{font-size:1.2em;font-weight:bold}h4{font-weight:bold}blockquote{font-family:"Linux
 Libertine",Georgia,Times,serif;font-size:1.1em;quotes:"\201C" 
"\201D";padding:1em 25px 1em 
30px;position:relative;overflow:hidden}blockquote:before{content:open-quote;font-size:3em;position:absolute;left:0;top:0}blockquote:after{content:close-quote;font-size:3em;line-height:1;position:absol

[MediaWiki-commits] [Gerrit] Convenience methods for retrieving all a section's images - change (apps...wikipedia)

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

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

Change subject: Convenience methods for retrieving all a section's images
..

Convenience methods for retrieving all a section's images

Uncomment the showImageToggle to test

Change-Id: Id7194517a13224aca2f5e17e869bf156f601e2ab
---
M MediaWikiKit/MediaWikiKit/MWKArticleStore.h
M MediaWikiKit/MediaWikiKit/MWKArticleStore.m
M MediaWikiKit/MediaWikiKit/MWKImageList.h
M MediaWikiKit/MediaWikiKit/MWKImageList.m
M wikipedia/View Controllers/WebView/WebViewController.m
5 files changed, 45 insertions(+), 15 deletions(-)


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

diff --git a/MediaWikiKit/MediaWikiKit/MWKArticleStore.h 
b/MediaWikiKit/MediaWikiKit/MWKArticleStore.h
index 0501214..335a281 100644
--- a/MediaWikiKit/MediaWikiKit/MWKArticleStore.h
+++ b/MediaWikiKit/MediaWikiKit/MWKArticleStore.h
@@ -38,6 +38,10 @@
 @property (readwrite) MWKImage *thumbnailImage;
 @property (readonly) UIImage *thumbnailUIImage;
 
+-(NSArray *)imageURLsForSectionId:(int)sectionId;
+-(NSArray *)imagesForSectionId:(int)sectionId;
+-(NSArray *)UIImagesForSectionId:(int)sectionId;
+
 -(void)saveImageList;
 
 @property (readwrite) BOOL needsRefresh;
diff --git a/MediaWikiKit/MediaWikiKit/MWKArticleStore.m 
b/MediaWikiKit/MediaWikiKit/MWKArticleStore.m
index 3581d1c..dc3b598 100644
--- a/MediaWikiKit/MediaWikiKit/MWKArticleStore.m
+++ b/MediaWikiKit/MediaWikiKit/MWKArticleStore.m
@@ -243,4 +243,28 @@
 }
 }
 
+-(NSArray *)imageURLsForSectionId:(int)sectionId
+{
+return [self.imageList imageURLsForSectionId:sectionId];
+}
+
+-(NSArray *)imagesForSectionId:(int)sectionId
+{
+NSMutableArray *arr = [[NSMutableArray alloc] init];
+for (NSString *url in [self imageURLsForSectionId:sectionId]) {
+[arr addObject:[self imageWithURL:url]];
+}
+return [NSArray arrayWithArray:arr];
+}
+
+-(NSArray *)UIImagesForSectionId:(int)sectionId
+{
+NSMutableArray *arr = [[NSMutableArray alloc] init];
+for (MWKImage *image in [self imagesForSectionId:sectionId]) {
+[arr addObject:[self UIImageWithImage:image]];
+}
+return [NSArray arrayWithArray:arr];
+}
+
+
 @end
diff --git a/MediaWikiKit/MediaWikiKit/MWKImageList.h 
b/MediaWikiKit/MediaWikiKit/MWKImageList.h
index 280b297..eb8109a 100644
--- a/MediaWikiKit/MediaWikiKit/MWKImageList.h
+++ b/MediaWikiKit/MediaWikiKit/MWKImageList.h
@@ -25,5 +25,7 @@
 -(BOOL)hasImageURL:(NSString *)imageURL;
 -(NSString *)largestImageVariant:(NSString *)image;
 
+-(NSArray *)imageURLsForSectionId:(int)sectionId;
+
 @property (readwrite)NSString *thumbnailURL;
 @end
diff --git a/MediaWikiKit/MediaWikiKit/MWKImageList.m 
b/MediaWikiKit/MediaWikiKit/MWKImageList.m
index 265775b..e1fcfff 100644
--- a/MediaWikiKit/MediaWikiKit/MWKImageList.m
+++ b/MediaWikiKit/MediaWikiKit/MWKImageList.m
@@ -78,6 +78,11 @@
 return biggestURL;
 }
 
+-(NSArray *)imageURLsForSectionId:(int)sectionId
+{
+return [[self entriesBySection:sectionId] copy];
+}
+
 #pragma mark - data i/o
 
 -(instancetype)initWithTitle:(MWKTitle *)title
diff --git a/wikipedia/View Controllers/WebView/WebViewController.m 
b/wikipedia/View Controllers/WebView/WebViewController.m
index b226289..f6201e6 100644
--- a/wikipedia/View Controllers/WebView/WebViewController.m
+++ b/wikipedia/View Controllers/WebView/WebViewController.m
@@ -1333,20 +1333,15 @@
 showImageSheet = !showImageSheet;
 
 if(showImageSheet){
-/*
-NSManagedObjectContext *ctx = articleDataContext_.mainContext;
-[ctx performBlockAndWait:^(){
-NSManagedObjectID *articleID =
-[ctx getArticleIDForTitle: session.currentArticleTitle
-   domain: session.currentArticleDomain];
-Article *article = (Article *)[ctx objectWithID:articleID];
-NSArray *sectionImages = [article 
getSectionImagesUsingContext:ctx];
+MWKArticleStore *articleStore = session.articleStore;
+for (MWKSection *section in articleStore.sections) {
+NSArray *sectionImages = [articleStore 
UIImagesForSectionId:section.sectionId];
 NSMutableArray *views = @[].mutableCopy;
-for (SectionImage *sectionImage in sectionImages) {
-Section *section = sectionImage.section;
-NSString *title = (section.title.length > 0) ? section.title : 
session.currentArticleTitle;
+int index = 0;
+for (UIImage *image in sectionImages) {
+NSString *title = (section.line) ? section.line : 
articleStore.title.prefixedText;
 //NSLog(@"\n\n\nsection image = %@ \n\tsection = %@ \n\tindex 
in section = %@ \n\timage size = %@", sectionImage.image.fileName, 
sectionTitle, sectionImage.index, sectionImage.image.dataSize);
-if(sectionImage.index.integerValue == 0){

[MediaWiki-commits] [Gerrit] Fix regression in toggleImageSheet magic - change (apps...wikipedia)

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

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

Change subject: Fix regression in toggleImageSheet magic
..

Fix regression in toggleImageSheet magic

Change-Id: Iabdc26192edaa0c5683f37d17e55715c2c25fa3a
---
M wikipedia/View Controllers/WebView/WebViewController.m
1 file changed, 3 insertions(+), 2 deletions(-)


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

diff --git a/wikipedia/View Controllers/WebView/WebViewController.m 
b/wikipedia/View Controllers/WebView/WebViewController.m
index f6201e6..4f91518 100644
--- a/wikipedia/View Controllers/WebView/WebViewController.m
+++ b/wikipedia/View Controllers/WebView/WebViewController.m
@@ -1334,9 +1334,9 @@
 
 if(showImageSheet){
 MWKArticleStore *articleStore = session.articleStore;
+NSMutableArray *views = @[].mutableCopy;
 for (MWKSection *section in articleStore.sections) {
 NSArray *sectionImages = [articleStore 
UIImagesForSectionId:section.sectionId];
-NSMutableArray *views = @[].mutableCopy;
 int index = 0;
 for (UIImage *image in sectionImages) {
 NSString *title = (section.line) ? section.line : 
articleStore.title.prefixedText;
@@ -1360,8 +1360,9 @@
 [views addObject:spacerView];
 index++;
 }
-[NAV topActionSheetShowWithViews:views 
orientation:TABULAR_SCROLLVIEW_LAYOUT_HORIZONTAL];
 }
+NSLog(@"%@", views);
+[NAV topActionSheetShowWithViews:views 
orientation:TABULAR_SCROLLVIEW_LAYOUT_HORIZONTAL];
 }else{
 [NAV topActionSheetHide];
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iabdc26192edaa0c5683f37d17e55715c2c25fa3a
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 edit - change (apps...wikipedia)

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

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

Change subject: fix edit
..

fix edit

* was not saving 'index' field correctly for sections
* was not taking into account that lede has no index field

Change-Id: I67c90953a7774f2d96573d6f1278223cf25b5028
---
M MediaWikiKit/MediaWikiKit/MWKSection.m
M wikipedia/Networking/Fetchers/WikiTextSectionFetcher.m
2 files changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/MediaWikiKit/MediaWikiKit/MWKSection.m 
b/MediaWikiKit/MediaWikiKit/MWKSection.m
index 9230ca2..634cd26 100644
--- a/MediaWikiKit/MediaWikiKit/MWKSection.m
+++ b/MediaWikiKit/MediaWikiKit/MWKSection.m
@@ -45,7 +45,7 @@
 dict[@"number"] = self.number;
 }
 if (self.index) {
-dict[@"number"] = self.index;
+dict[@"index"] = self.index;
 }
 if (self.fromtitle) {
 dict[@"fromtitle"] = [self.fromtitle prefixedText];
diff --git a/wikipedia/Networking/Fetchers/WikiTextSectionFetcher.m 
b/wikipedia/Networking/Fetchers/WikiTextSectionFetcher.m
index 8a26ba2..763c336 100644
--- a/wikipedia/Networking/Fetchers/WikiTextSectionFetcher.m
+++ b/wikipedia/Networking/Fetchers/WikiTextSectionFetcher.m
@@ -92,7 +92,7 @@
  @"prop": @"revisions",
  @"rvprop": @"content",
  @"rvlimit": @1,
- @"rvsection": self.section.index,
+ @"rvsection": self.section.index ? self.section.index : @"0",
  @"titles": self.section.fromtitle.prefixedText,
  @"meta": @"userinfo", // we need the local user ID for event 
logging
  @"format": @"json"

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I67c90953a7774f2d96573d6f1278223cf25b5028
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] Work in progress: new data importer - change (apps...wikipedia)

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

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

Change subject: Work in progress: new data importer
..

Work in progress: new data importer

Todo:
* clean up the old files when done
* progress indicator
* convert thumbnails, seem to be missing
* fix or remove broken code for conversion from PhoneGap app

Notes on OldDataSchema:
* need -ObjC link option to not filter out 'unused' classes :P
  this can probably be removed if classes are marked used other ways
* separate OldDataSchemaBundle.bundle used to get the Core Data object 
definition
  into the app, this can be removed if switch to a framework bundle in iOS 
8-only
  future?

Change-Id: I7234f714b7c368da09b8a63295c623394dfbc70a
---
M MediaWikiKit/MediaWikiKit/MWKUserDataStore.h
M MediaWikiKit/MediaWikiKit/MWKUserDataStore.m
M OldDataSchema/Categories/Article+Convenience.h
M OldDataSchema/Data/ArticleDataContextSingleton.m
M OldDataSchema/Data/Model/ArticleCoreDataObjects.h
M OldDataSchema/OldDataSchema.xcodeproj/project.pbxproj
M OldDataSchema/OldDataSchema/OldDataSchema.h
M OldDataSchema/OldDataSchema/OldDataSchema.m
M Wikipedia.xcodeproj/project.pbxproj
M Wikipedia.xcodeproj/xcshareddata/xcschemes/Wikipedia-iOS.xcscheme
R wikipedia/Data/DataMigrator.h
R wikipedia/Data/DataMigrator.m
R wikipedia/Data/SQLiteHelper.h
R wikipedia/Data/SQLiteHelper.m
A wikipedia/Data/SchemaConverter.h
A wikipedia/Data/SchemaConverter.m
M wikipedia/View Controllers/WebView/WebViewController.m
17 files changed, 554 insertions(+), 14 deletions(-)


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

diff --git a/MediaWikiKit/MediaWikiKit/MWKUserDataStore.h 
b/MediaWikiKit/MediaWikiKit/MWKUserDataStore.h
index b245b04..eccae62 100644
--- a/MediaWikiKit/MediaWikiKit/MWKUserDataStore.h
+++ b/MediaWikiKit/MediaWikiKit/MWKUserDataStore.h
@@ -23,6 +23,7 @@
 -(instancetype)initWithDataStore:(MWKDataStore *)dataStore;
 
 -(void)save;
+-(void)reset;
 
 -(void)updateHistory:(MWKTitle *)title 
discoveryMethod:(MWKHistoryDiscoveryMethod)discoveryMethod;
 -(void)savePage:(MWKTitle *)title;
diff --git a/MediaWikiKit/MediaWikiKit/MWKUserDataStore.m 
b/MediaWikiKit/MediaWikiKit/MWKUserDataStore.m
index 7e0e440..85eb80b 100644
--- a/MediaWikiKit/MediaWikiKit/MWKUserDataStore.m
+++ b/MediaWikiKit/MediaWikiKit/MWKUserDataStore.m
@@ -27,6 +27,14 @@
 }
 }
 
+/// Clear out any currently loaded data and force it to be reloaded on next use
+-(void)reset
+{
+_historyList = nil;
+_savedPageList = nil;
+_recentSearchList = nil;
+}
+
 -(instancetype)initWithDataStore:(MWKDataStore *)dataStore
 {
 self = [self init];
diff --git a/OldDataSchema/Categories/Article+Convenience.h 
b/OldDataSchema/Categories/Article+Convenience.h
index 4c6a86f..2f732af 100644
--- a/OldDataSchema/Categories/Article+Convenience.h
+++ b/OldDataSchema/Categories/Article+Convenience.h
@@ -1,6 +1,8 @@
 //  Created by Monte Hurd on 12/23/13.
 //  Copyright (c) 2013 Wikimedia Foundation. Provided under MIT-style license; 
please copy and modify!
 
+#import "UIKit/UIKit.h"
+
 #import "Article.h"
 
 @interface Article (Convenience)
diff --git a/OldDataSchema/Data/ArticleDataContextSingleton.m 
b/OldDataSchema/Data/ArticleDataContextSingleton.m
index de5091d..ca49ef0 100644
--- a/OldDataSchema/Data/ArticleDataContextSingleton.m
+++ b/OldDataSchema/Data/ArticleDataContextSingleton.m
@@ -49,7 +49,9 @@
 // Setup the masterContext and attach the persistant store to it.
 self.masterContext = [[NSManagedObjectContext alloc] 
initWithConcurrencyType:NSPrivateQueueConcurrencyType];
 
-NSManagedObjectModel *managedObjectModel = [NSManagedObjectModel 
mergedModelFromBundles:nil];
+NSString *bundlePath = [[NSBundle mainBundle] 
pathForResource:@"OldDataSchemaBundle" ofType:@"bundle"];
+NSBundle *bundle = [NSBundle bundleWithPath:bundlePath];
+NSManagedObjectModel *managedObjectModel = [NSManagedObjectModel 
mergedModelFromBundles:@[bundle]];
 NSPersistentStoreCoordinator *persistentStoreCoordinator = 
[[NSPersistentStoreCoordinator alloc] 
initWithManagedObjectModel:managedObjectModel];
 
 NSString *articlesDBPath = [[self documentRootPath] 
stringByAppendingString:@"/articleData6.sqlite"];
diff --git a/OldDataSchema/Data/Model/ArticleCoreDataObjects.h 
b/OldDataSchema/Data/Model/ArticleCoreDataObjects.h
index 7ae506b..c7cda9b 100644
--- a/OldDataSchema/Data/Model/ArticleCoreDataObjects.h
+++ b/OldDataSchema/Data/Model/ArticleCoreDataObjects.h
@@ -1,6 +1,6 @@
 #import 
 
-//#import "Article+Convenience.h"
+#import "Article+Convenience.h"
 #import "DiscoveryContext.h"
 #import "Section.h"
 #import "History.h"
diff --git a/OldDataSchema/OldDataSchema.xcodeproj/project.pbxproj 
b/OldDataSchema/OldDataSchema.xcodeproj/project.pbxproj
index a663d97..2562281 100644
--- a/OldDataSchema/OldDataSchema.xcodeproj/project.pbxproj
+++ b/OldDataSchema/

[MediaWiki-commits] [Gerrit] Fix for broken deletion in view history list - change (apps...wikipedia)

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

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

Change subject: Fix for broken deletion in view history list
..

Fix for broken deletion in view history list

Case where whole section was deleted was broken

Change-Id: I8867db88374381ee730a5209aaa260f594c9d0ba
---
M wikipedia/View Controllers/History/HistoryViewController.m
1 file changed, 4 insertions(+), 1 deletion(-)


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

diff --git a/wikipedia/View Controllers/History/HistoryViewController.m 
b/wikipedia/View Controllers/History/HistoryViewController.m
index e3f6b30..176f935 100644
--- a/wikipedia/View Controllers/History/HistoryViewController.m
+++ b/wikipedia/View Controllers/History/HistoryViewController.m
@@ -465,8 +465,11 @@
 
 if (itemsInSection == 1) {
 [self.tableView deleteSections:[NSIndexSet 
indexSetWithIndex:indexPath.section] 
withRowAnimation:UITableViewRowAnimationFade];
+[self.historyDataArray removeObjectAtIndex:indexPath.section];
+} else {
+[self.tableView deleteRowsAtIndexPaths:@[indexPath] 
withRowAnimation:UITableViewRowAnimationFade];
+[self.historyDataArray[indexPath.section][@"data"] 
removeObjectAtIndex:indexPath.row];
 }
-[self.tableView deleteRowsAtIndexPaths:@[indexPath] 
withRowAnimation:UITableViewRowAnimationFade];
 
 [historyList removeEntry:historyEntry];
 [userDataStore save];

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8867db88374381ee730a5209aaa260f594c9d0ba
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 duplicated section/image info on refresh - change (apps...wikipedia)

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

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

Change subject: Fix for duplicated section/image info on refresh
..

Fix for duplicated section/image info on refresh

Was deleting the on-disk storage but not clearing the in-memory objects

Change-Id: Ib77469c7c64abfc864b5a08b5590a22681d6dcad
---
M MediaWikiKit/MediaWikiKit/MWKArticle.m
1 file changed, 3 insertions(+), 0 deletions(-)


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

diff --git a/MediaWikiKit/MediaWikiKit/MWKArticle.m 
b/MediaWikiKit/MediaWikiKit/MWKArticle.m
index 82a2812..5aa4f19 100644
--- a/MediaWikiKit/MediaWikiKit/MWKArticle.m
+++ b/MediaWikiKit/MediaWikiKit/MWKArticle.m
@@ -182,6 +182,9 @@
 {
 NSString *path = [self.dataStore pathForArticle:self];
 [[NSFileManager defaultManager] removeItemAtPath:path error:nil];
+
+_sections = nil;
+_images = nil;
 }
 
 -(MWKSectionList *)sections

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib77469c7c64abfc864b5a08b5590a22681d6dcad
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 selecting 'recent' items not in current day - change (apps...wikipedia)

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

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

Change subject: Fix for selecting 'recent' items not in current day
..

Fix for selecting 'recent' items not in current day

Was using the wrong index offset: had to pull from the split section array,
not the raw list of all entries.

Change-Id: Ibd9e94e470d9c488d7e30627706e10a8df1ce761
---
M wikipedia/View Controllers/History/HistoryViewController.m
1 file changed, 1 insertion(+), 4 deletions(-)


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

diff --git a/wikipedia/View Controllers/History/HistoryViewController.m 
b/wikipedia/View Controllers/History/HistoryViewController.m
index 176f935..4719e31 100644
--- a/wikipedia/View Controllers/History/HistoryViewController.m
+++ b/wikipedia/View Controllers/History/HistoryViewController.m
@@ -373,13 +373,10 @@
 }
 
 - (void)tableView:(UITableView *)tableView 
didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
-NSString *selectedCell = nil;
 NSDictionary *dict = self.historyDataArray[indexPath.section];
 NSArray *array = dict[@"data"];
-selectedCell = array[indexPath.row];
+MWKHistoryEntry *historyEntry = array[indexPath.row];
 
-MWKHistoryEntry *historyEntry = [[SessionSingleton 
sharedInstance].userDataStore.historyList entryAtIndex:indexPath.row];
-
 [NAV loadArticleWithTitle: historyEntry.title
  animated: YES
   discoveryMethod: MWK_DISCOVERY_METHOD_SEARCH

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibd9e94e470d9c488d7e30627706e10a8df1ce761
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] largestImageVariant handling changed to check for caching pr... - change (apps...wikipedia)

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

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

Change subject: largestImageVariant handling changed to check for caching 
presence
..

largestImageVariant handling changed to check for caching presence

Change-Id: I6aaec97e92d441e1a0986a98fcd1e38a7319cde9
---
M MediaWikiKit/MediaWikiKit/MWKImage.h
M MediaWikiKit/MediaWikiKit/MWKImage.m
M MediaWikiKit/MediaWikiKit/MWKImageList.h
M MediaWikiKit/MediaWikiKit/MWKImageList.m
4 files changed, 56 insertions(+), 12 deletions(-)


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

diff --git a/MediaWikiKit/MediaWikiKit/MWKImage.h 
b/MediaWikiKit/MediaWikiKit/MWKImage.h
index cea0394..ffdf2fa 100644
--- a/MediaWikiKit/MediaWikiKit/MWKImage.h
+++ b/MediaWikiKit/MediaWikiKit/MWKImage.h
@@ -32,6 +32,9 @@
 @property (copy) NSNumber *width;
 @property (copy) NSNumber *height;
 
+// Local storage status
+@property (readonly) BOOL isCached;
+
 -(instancetype)initWithArticle:(MWKArticle *)article sourceURL:(NSString *)url;
 -(instancetype)initWithArticle:(MWKArticle *)article dict:(NSDictionary *)dict;
 
diff --git a/MediaWikiKit/MediaWikiKit/MWKImage.m 
b/MediaWikiKit/MediaWikiKit/MWKImage.m
index 4b1dd7c..214ebae 100644
--- a/MediaWikiKit/MediaWikiKit/MWKImage.m
+++ b/MediaWikiKit/MediaWikiKit/MWKImage.m
@@ -151,4 +151,11 @@
 return [self.article imageWithURL:largestURL];
 }
 
+-(BOOL)isCached
+{
+// @fixme maybe make this more efficient
+NSData *data = [self.article.dataStore imageDataWithImage:self];
+return (data != nil);
+}
+
 @end
diff --git a/MediaWikiKit/MediaWikiKit/MWKImageList.h 
b/MediaWikiKit/MediaWikiKit/MWKImageList.h
index c031f8e..3826e48 100644
--- a/MediaWikiKit/MediaWikiKit/MWKImageList.h
+++ b/MediaWikiKit/MediaWikiKit/MWKImageList.h
@@ -24,6 +24,21 @@
 -(void)addImageURL:(NSString *)imageURL;
 
 -(BOOL)hasImageURL:(NSString *)imageURL;
+
+/**
+ * Return an array of known URLs for the same image that a URL has been given 
for,
+ * ordered by pixel size (smallest to largest).
+ *
+ * May be an empty array if none known.
+ */
+-(NSArray *)imageSizeVariants:(NSString *)imageURL;
+
+/**
+ * Return the URL for the largest variant of image that actually has been saved
+ * for the given image URL (may be larger or smaller than requested, or same).
+ *
+ * May be nil if none found.
+ */
 -(NSString *)largestImageVariant:(NSString *)image;
 
 @property (readonly) BOOL dirty;
diff --git a/MediaWikiKit/MediaWikiKit/MWKImageList.m 
b/MediaWikiKit/MediaWikiKit/MWKImageList.m
index 5207b46..ffb96d0 100644
--- a/MediaWikiKit/MediaWikiKit/MWKImageList.m
+++ b/MediaWikiKit/MediaWikiKit/MWKImageList.m
@@ -55,7 +55,7 @@
 return (entriesByURL[imageURL] != nil);
 }
 
--(NSString *)largestImageVariant:(NSString *)imageURL
+-(NSArray *)imageSizeVariants:(NSString *)imageURL
 {
 if (imageURL == nil) {
 return nil;
@@ -63,22 +63,41 @@
 NSString *baseName = [MWKImage fileNameNoSizePrefix:imageURL];
 NSMutableArray *arr = entriesByNameWithoutSize[baseName];
 
-int width = -1, biggestWidth = -1;
-NSString *biggestURL = imageURL;
 if (arr) {
-for (NSString *sourceURL in arr) {
-NSString *fileName = [sourceURL lastPathComponent];
-width = [MWKImage fileSizePrefix:fileName];
-NSLog(@"%@ is %d", fileName, width);
-if (width > biggestWidth) {
-biggestWidth = width;
-biggestURL = sourceURL;
+NSMutableArray *arr2 = [NSMutableArray arrayWithArray:arr];
+[arr2 sortUsingComparator:^NSComparisonResult(NSString *url1, NSString 
*url2) {
+int width1 = [MWKImage fileSizePrefix:[url1 lastPathComponent]];
+int width2 = [MWKImage fileSizePrefix:[url2 lastPathComponent]];
+if (width1 > width2) {
+return NSOrderedDescending;
+} else if (width1 < width2) {
+return NSOrderedAscending;
+} else {
+return NSOrderedSame;
 }
-}
+}];
+return arr2;
 } else {
 NSLog(@"no variants for %@", baseName);
+return @[];
 }
-return biggestURL;
+}
+
+-(NSString *)largestImageVariant:(NSString *)imageURL
+{
+NSArray *arr = [self imageSizeVariants:imageURL];
+for (NSString *variantURL in arr) {
+MWKImage *image = [self.article imageWithURL:variantURL];
+if (image.isCached) {
+return variantURL;
+}
+}
+NSArray *variants = [self imageSizeVariants:imageURL];
+if ([variants count] == 0) {
+return nil;
+} else {
+return variants[[variants count] - 1];
+}
 }
 
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6aaec97e92d441e1a0986a98fcd1e38a7319cde9
Ge

[MediaWiki-commits] [Gerrit] Record thumbnail and lead-image URLs - change (apps...wikipedia)

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

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

Change subject: Record thumbnail and lead-image URLs
..

Record thumbnail and lead-image URLs

Change-Id: I0f49295dfafe31b8202189e14a1837e0ca15e5ef
---
M MediaWikiKit/MediaWikiKit/MWKArticle.m
1 file changed, 7 insertions(+), 0 deletions(-)


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

diff --git a/MediaWikiKit/MediaWikiKit/MWKArticle.m 
b/MediaWikiKit/MediaWikiKit/MWKArticle.m
index 5aa4f19..df3681c 100644
--- a/MediaWikiKit/MediaWikiKit/MWKArticle.m
+++ b/MediaWikiKit/MediaWikiKit/MWKArticle.m
@@ -115,6 +115,13 @@
 }
 // From local storage
 _thumbnailURL = [self optionalString:@"thumbnailURL" dict:dict];
+
+if (self.thumbnailURL) {
+(void)[self importImageURL:self.thumbnailURL 
sectionId:MWK_SECTION_THUMBNAIL];
+}
+if (self.imageURL) {
+(void)[self importImageURL:self.imageURL 
sectionId:MWK_SECTION_THUMBNAIL];
+}
 
 
 // Populate sections

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0f49295dfafe31b8202189e14a1837e0ca15e5ef
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] Return stub image objects when asked for by name - change (apps...wikipedia)

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

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

Change subject: Return stub image objects when asked for by name
..

Return stub image objects when asked for by name

Change-Id: I291851bb5cfb26eccdffc7004cdf421e8574fea4
---
M MediaWikiKit/MediaWikiKit/MWKDataStore.m
1 file changed, 3 insertions(+), 1 deletion(-)


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

diff --git a/MediaWikiKit/MediaWikiKit/MWKDataStore.m 
b/MediaWikiKit/MediaWikiKit/MWKDataStore.m
index 51b78f2..c32c0f4 100644
--- a/MediaWikiKit/MediaWikiKit/MWKDataStore.m
+++ b/MediaWikiKit/MediaWikiKit/MWKDataStore.m
@@ -323,7 +323,9 @@
 if (dict) {
 return [[MWKImage alloc] initWithArticle:article dict:dict];
 } else {
-return nil;
+// Not 100% sure if we should return an object here or not,
+// but it seems useful to do so.
+return [[MWKImage alloc] initWithArticle:article sourceURL:url];
 }
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I291851bb5cfb26eccdffc7004cdf421e8574fea4
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 our navigation time update hack for back/forward - change (apps...wikipedia)

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

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

Change subject: Fix our navigation time update hack for back/forward
..

Fix our navigation time update hack for back/forward

Got broken during the transition to new storage, now fixed.

https://trello.com/c/O7FzUgMY/17-update-history-date-visited-of-article-being-navigated-away-from

Change-Id: I97061d2e49e009eeec0a730ea285394e45dfe519
---
M wikipedia/View Controllers/WebView/WebViewController.m
1 file changed, 15 insertions(+), 20 deletions(-)


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

diff --git a/wikipedia/View Controllers/WebView/WebViewController.m 
b/wikipedia/View Controllers/WebView/WebViewController.m
index cadcd34..0b3b6d9 100644
--- a/wikipedia/View Controllers/WebView/WebViewController.m
+++ b/wikipedia/View Controllers/WebView/WebViewController.m
@@ -1348,27 +1348,22 @@
 
 -(void)updateHistoryDateVisitedForArticleBeingNavigatedFrom
 {
-// @fixme what is this doing? updating history, or updating article?
-/*
-[articleDataContext_.mainContext performBlockAndWait:^(){
-NSManagedObjectID *articleID =
-[articleDataContext_.mainContext getArticleIDForTitle: 
self.currentTitle];
-if (articleID) {
-Article *article = (Article *)[articleDataContext_.mainContext 
objectWithID:articleID];
-if (article) {
-if (article.history.count > 0) { // There should only be a 
single history item.
-History *history = [article.history anyObject];
-history.dateVisited = [NSDate date];
-NSError *error = nil;
-[articleDataContext_.mainContext save:&error];
-if (error) {
-NSLog(@"error = %@", error);
-}
-}
-}
+// This is a quick hack to help with the natural back/forward behavior of 
the case
+// where you go back and forth from some master article to others.
+//
+// Proper fix might be to store more of a 'tree' structure so that we know 
which
+// 'leaf' to hang off of, but this works for now.
+MWKHistoryList *historyList = session.userDataStore.historyList;
+NSLog(@"XXX %d", (int)historyList.length);
+if (historyList.length > 0) {
+// Grab the latest
+MWKHistoryEntry *historyEntry = [historyList 
entryForTitle:session.title];
+if (historyEntry) {
+historyEntry.date = [NSDate date];
+[historyList addEntry:historyEntry];
+[session.userDataStore save];
 }
-}];
- */
+}
 }
 
 #pragma mark Article loading ops

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I97061d2e49e009eeec0a730ea285394e45dfe519
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] Small tweaks per Vibha to lead image styling layout. - change (apps...wikipedia)

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

Change subject: Small tweaks per Vibha to lead image styling layout.
..


Small tweaks per Vibha to lead image styling layout.

Change-Id: I62e79c6c5f621ca3449de6df83afb85709ebd796
---
M wikipedia/View Controllers/LeadImage/LeadImageTitleAttributedString.m
M wikipedia/assets/styleoverrides.css
M www/less/styleoverrides.less
3 files changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/wikipedia/View 
Controllers/LeadImage/LeadImageTitleAttributedString.m b/wikipedia/View 
Controllers/LeadImage/LeadImageTitleAttributedString.m
index d8c2cb8..39c8dec 100644
--- a/wikipedia/View Controllers/LeadImage/LeadImageTitleAttributedString.m
+++ b/wikipedia/View Controllers/LeadImage/LeadImageTitleAttributedString.m
@@ -68,8 +68,8 @@
 multiplier = 1.0f - (linesAfter2Lines * 0.1f);
 }
 
-// Don't shrink below 50%.
-return MAX(multiplier, 0.5f);
+// Don't shrink below 60%.
+return MAX(multiplier, 0.6f);
 }
 
 @end
diff --git a/wikipedia/assets/styleoverrides.css 
b/wikipedia/assets/styleoverrides.css
index eca5843..211531b 100644
--- a/wikipedia/assets/styleoverrides.css
+++ b/wikipedia/assets/styleoverrides.css
@@ -1 +1 @@
-a:hover{text-decoration:none 
!important}.edit_section_button{display:inline-block !important;width:38px 
!important;height:42px !important;background-size:36px 36px 
!important;background-repeat:no-repeat !important;background-position:center 
!important}table,tr,tbody,td,th,div,span{border-width:2px 
!important;border-color:#fff 
!important}td{background-color:#f7f7f7}hr:not(.mw-footer-divider){border-width:0px
 !important;height:2px !important;background-color:#fff 
!important}img{border-width:1px !important;border-color:#fff 
!important}.hatnote{display:none}.content{margin-top:0px}#section_heading_and_content_block_0
 .section_heading .edit_section_button{margin-top:18px}
\ No newline at end of file
+a:hover{text-decoration:none 
!important}.edit_section_button{display:inline-block !important;width:38px 
!important;height:42px !important;background-size:36px 36px 
!important;background-repeat:no-repeat !important;background-position:center 
!important}table,tr,tbody,td,th,div,span{border-width:2px 
!important;border-color:#fff 
!important}td{background-color:#f7f7f7}hr:not(.mw-footer-divider){border-width:0px
 !important;height:2px !important;background-color:#fff 
!important}img{border-width:1px !important;border-color:#fff 
!important}.hatnote{display:none}.content{margin-top:0px}#section_heading_and_content_block_0
 .section_heading .edit_section_button{margin-top:6px}
\ No newline at end of file
diff --git a/www/less/styleoverrides.less b/www/less/styleoverrides.less
index 7813fe8..33cde3f 100644
--- a/www/less/styleoverrides.less
+++ b/www/less/styleoverrides.less
@@ -80,4 +80,4 @@
 .content {margin-top:0px;}
 
 /* Override top padding on first edit pencil so it roughly aligns with first 2 
lines of text. */
-#section_heading_and_content_block_0 .section_heading 
.edit_section_button{margin-top:18px;}
+#section_heading_and_content_block_0 .section_heading 
.edit_section_button{margin-top:6px;}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I62e79c6c5f621ca3449de6df83afb85709ebd796
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] Use more human-readable directory names for articles - change (apps...wikipedia)

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

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

Change subject: Use more human-readable directory names for articles
..

Use more human-readable directory names for articles

Was percent-encoding titles, which made non-ASCII titles into
long illegible dirs. Only actually need to escape the "/" and the
"%" as the rest of chars are legit filesystem chars.

Change-Id: I8e663ab8607352f51e6766bf2d31238299123a39
---
M MediaWikiKit/MediaWikiKit/MWKDataStore.m
M MediaWikiKit/MediaWikiKitTests/MWKDataStorePathTests.m
2 files changed, 4 insertions(+), 7 deletions(-)


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

diff --git a/MediaWikiKit/MediaWikiKit/MWKDataStore.m 
b/MediaWikiKit/MediaWikiKit/MWKDataStore.m
index 86fadf7..1573c36 100644
--- a/MediaWikiKit/MediaWikiKit/MWKDataStore.m
+++ b/MediaWikiKit/MediaWikiKit/MWKDataStore.m
@@ -94,12 +94,9 @@
 
 -(NSString *)safeFilenameWithString:(NSString *)str
 {
-// This handy function does most of the percent-escaping
-NSString *encodedStr = [str 
stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
-
-// But it leaves "/" and "&" intact. Naughty!
+// Escape only % and / with percent style for readability
+NSString *encodedStr = [str stringByReplacingOccurrencesOfString:@"%" 
withString:@"%25"];
 encodedStr = [encodedStr stringByReplacingOccurrencesOfString:@"/" 
withString:@"%2F"];
-encodedStr = [encodedStr stringByReplacingOccurrencesOfString:@"&" 
withString:@"%26"];
 
 return encodedStr;
 }
diff --git a/MediaWikiKit/MediaWikiKitTests/MWKDataStorePathTests.m 
b/MediaWikiKit/MediaWikiKitTests/MWKDataStorePathTests.m
index 69b6561..751e845 100644
--- a/MediaWikiKit/MediaWikiKitTests/MWKDataStorePathTests.m
+++ b/MediaWikiKit/MediaWikiKitTests/MWKDataStorePathTests.m
@@ -69,11 +69,11 @@
 }
 
 - (void)testTitleUnicodePath {
-XCTAssertEqualObjects([dataStore pathForTitle:titleUnicode], [basePath 
stringByAppendingPathComponent:@"sites/wikipedia.org/en/articles/%C3%89clair"]);
+XCTAssertEqualObjects([dataStore pathForTitle:titleUnicode], [basePath 
stringByAppendingPathComponent:@"sites/wikipedia.org/en/articles/Éclair"]);
 }
 
 - (void)testTitleEvilPath {
-XCTAssertEqualObjects([dataStore pathForTitle:titleEvil], [basePath 
stringByAppendingPathComponent:@"sites/wikipedia.org/en/articles/AT%26T%2FSBC_%22merger%22"]);
+XCTAssertEqualObjects([dataStore pathForTitle:titleEvil], [basePath 
stringByAppendingPathComponent:@"sites/wikipedia.org/en/articles/AT&T%2FSBC_\"merger\""]);
 }
 
 - (void)testArticlePath {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8e663ab8607352f51e6766bf2d31238299123a39
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] Fail gracefully instead of crashing when failing to save cac... - change (apps...wikipedia)

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

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

Change subject: Fail gracefully instead of crashing when failing to save cached 
image
..

Fail gracefully instead of crashing when failing to save cached image

Also uses shorter, unencoded filenames for cached images: makes them
more human-readable in cases of non-ASCII characters, and helps keep
non-ASCII filenames short enough to fit in the filesystem!

https://trello.com/c/BEhNodlY/29-crash-in-image-caching

Change-Id: Id9a17c8689eb2e5a8a8436805992003cf9debd8d
---
M MediaWikiKit/MediaWikiKit/MWKDataStore.m
M MediaWikiKit/MediaWikiKitTests/MWKDataStorePathTests.m
M wikipedia/Web Image Interception/URLCache.m
3 files changed, 20 insertions(+), 8 deletions(-)


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

diff --git a/MediaWikiKit/MediaWikiKit/MWKDataStore.m 
b/MediaWikiKit/MediaWikiKit/MWKDataStore.m
index c32c0f4..86fadf7 100644
--- a/MediaWikiKit/MediaWikiKit/MWKDataStore.m
+++ b/MediaWikiKit/MediaWikiKit/MWKDataStore.m
@@ -120,15 +120,21 @@
 NSString *prefix = @"//upload.wikimedia.org/";
 if ([str hasPrefix:prefix]) {
 NSString *suffix = [str substringFromIndex:[prefix length]];
+NSString *fileName = [suffix lastPathComponent];
 
 // Image URLs are already percent-encoded, so don't double-encode em.
-
-// "/" occurs in those nasty paths! but ":" cannot so let's use it
-// just like Mac OS X does ;)
-//NSString *noslashes = [suffix 
stringByReplacingOccurrencesOfString:@"/" withString:@":"];
+// In fact, we want to decode them...
+// If we don't, long Unicode filenames may not fit in the filesystem.
+NSString *decodedFileName = [fileName 
stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
 
-NSString *fileName = [suffix lastPathComponent];
-return fileName;
+// Just to be safe, confirm no path explostions!
+if ([decodedFileName rangeOfString:@"/"].location != NSNotFound) {
+@throw [NSException exceptionWithName:@"MWKDataStoreException"
+   reason:@"Tried to save URL with 
encoded slash"
+ userInfo:@{@"str": str}];
+}
+
+return decodedFileName;
 } else {
 @throw [NSException exceptionWithName:@"MWKDataStoreException"
reason:@"Tried to save 
non-upload.wikimedia.org URL as image"
diff --git a/MediaWikiKit/MediaWikiKitTests/MWKDataStorePathTests.m 
b/MediaWikiKit/MediaWikiKitTests/MWKDataStorePathTests.m
index 36be87a..69b6561 100644
--- a/MediaWikiKit/MediaWikiKitTests/MWKDataStorePathTests.m
+++ b/MediaWikiKit/MediaWikiKitTests/MWKDataStorePathTests.m
@@ -104,7 +104,7 @@
 - (void)testImagePathUnicode {
 NSString *urlForbiddenCityImage = 
@"https://upload.wikimedia.org/wikipedia/commons/thumb/e/e6/%E5%8C%97%E4%BA%AC%E6%95%85%E5%AE%AB12.JPG/440px-%E5%8C%97%E4%BA%AC%E6%95%85%E5%AE%AB12.JPG";;
 
-XCTAssertEqualObjects([dataStore pathForImageURL:urlForbiddenCityImage 
title:titleForbiddenCity], [basePath 
stringByAppendingPathComponent:@"sites/wikipedia.org/en/articles/Forbidden_City/Images/440px-%E5%8C%97%E4%BA%AC%E6%95%85%E5%AE%AB12.JPG"]);
+XCTAssertEqualObjects([dataStore pathForImageURL:urlForbiddenCityImage 
title:titleForbiddenCity], [basePath 
stringByAppendingPathComponent:@"sites/wikipedia.org/en/articles/Forbidden_City/Images/440px-北京故宫12.JPG"]);
 }
 
 @end
diff --git a/wikipedia/Web Image Interception/URLCache.m b/wikipedia/Web Image 
Interception/URLCache.m
index afde536..bac164e 100644
--- a/wikipedia/Web Image Interception/URLCache.m
+++ b/wikipedia/Web Image Interception/URLCache.m
@@ -109,7 +109,13 @@
 // (This one has no thread safety issues.)
 //imageDataToUse = self.debuggingPlaceHolderImageData;
 
-[self.article importImageData:imageDataToUse image:image];
+@try {
+[self.article importImageData:imageDataToUse image:image];
+}
+@catch (NSException *e) {
+NSLog(@"Failure to save cached image data: %@", e);
+return;
+}
 
 // Broadcast the image data so things like the table of contents can update
 // itself as images arrive.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id9a17c8689eb2e5a8a8436805992003cf9debd8d
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] User-friendly prompt to install WebM components for Internet... - change (mediawiki...TimedMediaHandler)

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

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

Change subject: User-friendly prompt to install WebM components for Internet 
Explorer
..

User-friendly prompt to install WebM components for Internet Explorer

Instead of giving a raw-file download prompt, link directly to Google's IE WebM
plugin download page with some brief instructions. After installing, reload the
page and *poof* the video works.

Notes:
* Components are not available for Windows RT (Windows on ARM), so the download 
is
  not offered in this case.
* Components only work with IE 9 and above, but since the player framework 
doesn't
  seem to work on IE 8 and below anyway we don't bother to check versions here.
* These really are WebM only, and do not include support for Ogg audio files.
* In future, ogv.js should cover the audio case and low-resolution video case 
without
  the plugin prompt, but we'll still need WebM for HD video playback.

Bug: 73348
Change-Id: I2ad8257d8752871b67632dc7b7b42d2825f8fc68
---
M MwEmbedModules/EmbedPlayer/EmbedPlayer.php
M MwEmbedModules/EmbedPlayer/i18n/en.json
M MwEmbedModules/EmbedPlayer/i18n/qqq.json
A MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayerIEWebMPrompt.css
A MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayerIEWebMPrompt.js
M MwEmbedModules/EmbedPlayer/resources/mw.EmbedTypes.js
M MwEmbedModules/EmbedPlayer/resources/mw.MediaPlayers.js
7 files changed, 98 insertions(+), 3 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler 
refs/changes/48/172948/1

diff --git a/MwEmbedModules/EmbedPlayer/EmbedPlayer.php 
b/MwEmbedModules/EmbedPlayer/EmbedPlayer.php
index c60d41c..811db67 100644
--- a/MwEmbedModules/EmbedPlayer/EmbedPlayer.php
+++ b/MwEmbedModules/EmbedPlayer/EmbedPlayer.php
@@ -68,6 +68,10 @@
'scripts'=> "resources/mw.EmbedPlayerVLCApp.js",
'dependencies' => array( 'mediawiki.Uri' )
),
+   "mw.EmbedPlayerIEWebMPrompt" => array(
+   'scripts' => 
'resources/mw.EmbedPlayerIEWebMPrompt.js',
+   'styles' => 
'resources/mw.EmbedPlayerIEWebMPrompt.css',
+   ),
"mw.EmbedPlayerImageOverlay" => array( 'scripts'=> 
"resources/mw.EmbedPlayerImageOverlay.js" ),
 
"mw.EmbedPlayerVlc" => array( 'scripts'=> 
"resources/mw.EmbedPlayerVlc.js" ),
diff --git a/MwEmbedModules/EmbedPlayer/i18n/en.json 
b/MwEmbedModules/EmbedPlayer/i18n/en.json
index d3221a2..d0e41bb 100644
--- a/MwEmbedModules/EmbedPlayer/i18n/en.json
+++ b/MwEmbedModules/EmbedPlayer/i18n/en.json
@@ -50,6 +50,7 @@
 "mwe-embedplayer-ogg-player-webmNative": "HTML5 WebM player",
 "mwe-embedplayer-ogg-player-oggPlugin": "Generic Ogg plugin",
 "mwe-embedplayer-ogg-player-vlcAppPlayer": "VLC for iOS app",
+"mwe-embedplayer-ogg-player-IEWebMPrompt": "IE WebM plugin downloader",
 "mwe-embedplayer-ogg-player-quicktime-mozilla": "QuickTime plugin",
 "mwe-embedplayer-ogg-player-quicktime-activex": "QuickTime ActiveX",
 "mwe-embedplayer-ogg-player-cortado": "Java Cortado",
@@ -84,5 +85,8 @@
 "mwe-embedplayer-vlcapp-downloadapp": "Download the VLC app from the App 
Store",
 "mwe-embedplayer-vlcapp-openvideo": "Open this video in the VLC app",
 "mwe-embedplayer-vlcapp-downloadvideo": "Download this video",
-"mwe-embedplayer-vlcapp-vlcapppopup": "To play videos on this site, you 
need the free VLC app. Install now?"
+"mwe-embedplayer-vlcapp-vlcapppopup": "To play videos on this site, you 
need the free VLC app. Install now?",
+"mwe-embedplayer-iewebmprompt-intro": "Oops! One more thing before you can 
play this video...",
+"mwe-embedplayer-iewebmprompt-linktext": "Install WebM media components 
for Microsoft Internet Explorer",
+"mwe-embedplayer-iewebmprompt-outro": "Reload this page after installing."
 }
diff --git a/MwEmbedModules/EmbedPlayer/i18n/qqq.json 
b/MwEmbedModules/EmbedPlayer/i18n/qqq.json
index 0b17710..72de442 100644
--- a/MwEmbedModules/EmbedPlayer/i18n/qqq.json
+++ b/MwEmbedModules/EmbedPlayer/i18n/qqq.json
@@ -35,5 +35,8 @@
"mwe-embedplayer-vlcapp-downloadapp": "First bullet point after the 
mwe-embedplayer-vlcapp-intro. Links to the download page for installing the vlc 
app ( https://itunes.apple.com/us/app/vlc-for-ios/id650377962?mt=8 ).",
"mwe-embedplayer-vlcapp-openvideo": "Second bullet point after the 
mwe-embedplayer-vlcapp-intro. Link will open the video in the VLC app, if the 
app is installed",
"mwe-embedplayer-vlcapp-downloadvideo": "Third bullet point after the 
mwe-embedplayer-vlcapp-intro. Linked directly to the video file",
-   "mwe-embedplayer-vlcapp-vlcapppopup": "Popup dialog box shown to user 
if they do not have the VLC app installed when trying to pl

[MediaWiki-commits] [Gerrit] Improve documentation for main-menu-account-logout message. - change (apps...wikipedia)

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

Change subject: Improve documentation for main-menu-account-logout message.
..


Improve documentation for main-menu-account-logout message.

Clarified the documentation for this string so that translators have more
context.

Bug: 71225
Change-Id: Iaa2ebc94cd92dfb7d3baac62a8c56e626e7e27a0
---
M wikipedia/qqq.lproj/Localizable.strings
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Brion VIBBER: Looks good to me, approved



diff --git a/wikipedia/qqq.lproj/Localizable.strings 
b/wikipedia/qqq.lproj/Localizable.strings
index ace335f..493b810 100644
--- a/wikipedia/qqq.lproj/Localizable.strings
+++ b/wikipedia/qqq.lproj/Localizable.strings
@@ -91,7 +91,7 @@
 "main-menu-account-title-logged-out" = "Header text used when account is not 
logged in.\n{{Identical|Account}}";
 "main-menu-account-title-logged-in" = "Header text used when account is logged 
in";
 "main-menu-account-login" = "Button text for logging in.\n{{Identical|Log 
in}}";
-"main-menu-account-logout" = "Button text for logging out.\n{{Identical|Log 
out}}";
+"main-menu-account-logout" = "Button text for logging out. The username of the 
user who is currently logged in is displayed after the message, e.g. Log out 
ExampleUserName.\n{{Identical|Log out}}";
 "main-menu-show-title" = "Header informing the user that they can be shown 
various things";
 "main-menu-show-history" = "Button text for article history 
interface.\n{{Identical|Recent}}";
 "main-menu-show-saved" = "Button text for saved articles 
interface.\n{{Identical|Saved page}}";

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

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

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


[MediaWiki-commits] [Gerrit] Update search box styling to look same on iOS 6, 7 and 8. - change (apps...wikipedia)

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

Change subject: Update search box styling to look same on iOS 6, 7 and 8.
..


Update search box styling to look same on iOS 6, 7 and 8.

It had looked funky on iOS 6.

Change-Id: Ifc28e07247002c4157327bec1829e17bfb2edfcf
---
M wikipedia/View Controllers/Navigation/Top/TopMenuTextField.m
1 file changed, 5 insertions(+), 2 deletions(-)

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



diff --git a/wikipedia/View Controllers/Navigation/Top/TopMenuTextField.m 
b/wikipedia/View Controllers/Navigation/Top/TopMenuTextField.m
index 8914e05..6bf7081 100644
--- a/wikipedia/View Controllers/Navigation/Top/TopMenuTextField.m
+++ b/wikipedia/View Controllers/Navigation/Top/TopMenuTextField.m
@@ -12,7 +12,10 @@
 {
 self = [super init];
 if (self) {
-self.borderStyle = UITextBorderStyleRoundedRect;
+self.borderStyle = UITextBorderStyleNone;
+self.layer.cornerRadius = 6.0f * MENUS_SCALE_MULTIPLIER;
+self.layer.borderWidth = 1.0f / [UIScreen mainScreen].scale;
+self.layer.borderColor = [UIColor lightGrayColor].CGColor;
 }
 return self;
 }
@@ -21,7 +24,7 @@
 // From: http://stackoverflow.com/a/14357720
 - (CGRect)textRectForBounds:(CGRect)bounds {
 CGRect rect = [super textRectForBounds:bounds];
-return CGRectInset(rect, 2, 0);
+return CGRectInset(rect, 10.0f * MENUS_SCALE_MULTIPLIER, 0);
 }
 
 - (CGRect)editingRectForBounds:(CGRect)bounds {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifc28e07247002c4157327bec1829e17bfb2edfcf
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


<    5   6   7   8   9   10   11   12   13   14   >