Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'master' of git://github.com/wikimedia/WikipediaMobile

Conflicts:
	AndroidManifest.xml
	assets/www/ios/platform.js
	assets/www/js/chrome.js
	assets/www/js/geo.js
	assets/www/js/main.js
	assets/www/leaflet/leaflet.css
	assets/www/leaflet/leaflet.ie.css
	assets/www/leaflet/leaflet.js
	libs/phonegap-1.3.0.jar
	res/values/strings.xml
	src/org/wikipedia/WikipediaActivity.java
  • Loading branch information...
commit 4c03f6c806d39efc0890d7c5d51572a3a67559fd 2 parents 8f8a2ec + 274e726
@pfhayes pfhayes authored
Showing with 1,196 additions and 295 deletions.
  1. +1 −1  .classpath
  2. +37 −5 CHANGELOG
  3. +10 −0 Wikipedia-iOS.xcodeproj/project.pbxproj
  4. +29 −6 Wikipedia-iOS/Classes/AppDelegate.h
  5. +139 −61 Wikipedia-iOS/Classes/AppDelegate.m
  6. +17 −0 Wikipedia-iOS/Classes/MainViewController.h
  7. +47 −0 Wikipedia-iOS/Classes/MainViewController.m
  8. +118 −0 Wikipedia-iOS/Classes/MainViewController.xib
  9. +30 −0 assets/www/AUTHORS
  10. +1 −51 assets/www/android/{phonegap-1.3.0.js → phonegap-1.4.1.js}
  11. +48 −4 assets/www/android/platform.js
  12. +11 −11 assets/www/app.css
  13. +7 −1 assets/www/index.html
  14. +23 −27 assets/www/ios/{phonegap-1.3.0.js → phonegap-1.4.1.js}
  15. +106 −61 assets/www/ios/platform.js
  16. +17 −0 assets/www/js/2.5.3-crypto-md5.js
  17. +20 −22 assets/www/js/app.js
  18. +3 −18 assets/www/js/chrome.js
  19. +24 −6 assets/www/js/main.js
  20. +1 −1  assets/www/js/platform-stub.js
  21. +13 −7 assets/www/js/savedpages.js
  22. +142 −0 assets/www/js/urlcache.js
  23. +45 −0 assets/www/messages/messages-arc.properties
  24. +14 −3 assets/www/messages/messages-as.properties
  25. +1 −0  assets/www/messages/messages-ast.properties
  26. +1 −0  assets/www/messages/messages-be-tarask.properties
  27. +3 −2 assets/www/messages/messages-br.properties
  28. +1 −0  assets/www/messages/messages-ca.properties
  29. +31 −0 assets/www/messages/messages-ckb.properties
  30. +1 −0  assets/www/messages/messages-da.properties
  31. +1 −0  assets/www/messages/messages-de.properties
  32. +1 −0  assets/www/messages/messages-dsb.properties
  33. +2 −0  assets/www/messages/messages-en.properties
  34. +27 −2 assets/www/messages/messages-es.properties
  35. +1 −0  assets/www/messages/messages-fr.properties
  36. +8 −0 assets/www/messages/messages-fur.properties
  37. +22 −0 assets/www/messages/messages-gd.properties
  38. +1 −0  assets/www/messages/messages-gl.properties
  39. +2 −0  assets/www/messages/messages-gu.properties
  40. +1 −0  assets/www/messages/messages-he.properties
  41. +1 −0  assets/www/messages/messages-hsb.properties
  42. +1 −0  assets/www/messages/messages-ia.properties
  43. +21 −0 assets/www/messages/messages-it.properties
  44. +71 −0 assets/www/messages/messages-km.properties
  45. +1 −0  assets/www/messages/messages-ko.properties
  46. +1 −0  assets/www/messages/messages-lb.properties
  47. +2 −0  assets/www/messages/messages-lv.properties
  48. +20 −0 assets/www/messages/messages-map-bms.properties
  49. +1 −0  assets/www/messages/messages-mk.properties
  50. +1 −0  assets/www/messages/messages-ms.properties
  51. +1 −0  assets/www/messages/messages-nds-nl.properties
  52. +1 −0  assets/www/messages/messages-nl.properties
  53. +1 −2  assets/www/messages/messages-no.properties
  54. +48 −2 assets/www/messages/messages-pa.properties
  55. +3 −1 assets/www/messages/messages-pl.properties
  56. +1 −0  assets/www/messages/messages-pms.properties
  57. +1 −0  assets/www/messages/messages-ro.properties
  58. +1 −0  assets/www/messages/messages-sr-ec.properties
  59. +1 −0  assets/www/messages/messages-sr-el.properties
  60. +2 −0  assets/www/messages/messages-sv.properties
  61. +4 −0 assets/www/messages/messages-tr.properties
  62. +1 −0  assets/www/messages/messages-tt-cyrl.properties
  63. BIN  libs/phonegap-1.3.0.jar
  64. BIN  libs/phonegap-1.4.1.jar
  65. +1 −1  res/values/strings.xml
  66. +3 −0  scripts/generate_authors.sh
View
2  .classpath
@@ -4,6 +4,6 @@
<classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
- <classpathentry kind="lib" path="libs/phonegap-1.3.0.jar"/>
+ <classpathentry kind="lib" path="libs/phonegap-1.4.1.jar"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>
View
42 CHANGELOG
@@ -1,20 +1,42 @@
# CHANGELOG
+## V1.0 ##
+
+- First release .. woot!
+- Save article to read later or offline
+- Search articles nearby
+- Share articles using Android "Share" function
+- Read article in a different language
+- Full screen search
+
+## V1.0.1 ##
+
+- Stop using GPS when user exits NearMe activity
+- Better caching support
+
+## V1.0.2 ##
+
+- Making caching far less aggresive
+
+## V1.0.3 ##
+
+- Updating UserAgent to uniquly identify the app
+
## v1.1alpha1 ##
-- Integration with QuickSearch in Android
+- Integration with Android QuickSearch
- Open Wikipedia links from other apps in the Wikipedia App
-- OSM replaced Google Maps for nearby view
+- OSM replaced Google Maps for Nearby View
- Added Did You Mean? to search results
-- Moved to jQuery off Zepto
-- Touching co-ordinates inside articles shows map overlay
+- Moved from Zepto to jQuery
+- Touching co-ordinates inside article infobox shows map overlay
- Full text search
- Added 'Clear History'
- Added 'Clear Saved Pages'
- Localized a few messages that were missing
- Enable app to be saved to SD card
- Major code-refactor, still needs more love :)
-- Improved tablet experienced
+- Improved tablet experience
- Move to using Hogan.js for templating
## v1.1beta1 ##
@@ -26,3 +48,13 @@
- UI works slightly better in RTL languages. Still slightly buggy
- Menu items initialize faster
- Confusing highlights when scrolling lists removed
+
+## v1.1beta2 ##
+
+- Fixed flickering in Android 4.0
+- Fixed bug causing Nearby Me to not work on some locales
+- About page now credits contributors and used Libraries
+- Show indicator when opening settings dialog
+- Changed default zoom level
+- Upgraded Leaflet and PhoneGap libraries
+
View
10 Wikipedia-iOS.xcodeproj/project.pbxproj
@@ -119,6 +119,8 @@
07220CB114CE0A3400339B1F /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 07220CB014CE0A2A00339B1F /* CFNetwork.framework */; };
07220CBA14CE367B00339B1F /* WMSHKConfigurator.m in Sources */ = {isa = PBXBuildFile; fileRef = 07220CB814CE367B00339B1F /* WMSHKConfigurator.m */; };
07220CBB14CE367B00339B1F /* WMSHKSharers.plist in Resources */ = {isa = PBXBuildFile; fileRef = 07220CB914CE367B00339B1F /* WMSHKSharers.plist */; };
+ 61992AAF14F6DAE1009FE7AC /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 61992AAD14F6DAE1009FE7AC /* MainViewController.m */; };
+ 61992AB014F6DAE1009FE7AC /* MainViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 61992AAE14F6DAE1009FE7AC /* MainViewController.xib */; };
D481B960145DFE5D00D9F872 /* www in Resources */ = {isa = PBXBuildFile; fileRef = D481B95F145DFE5D00D9F872 /* www */; };
D4843A8B147DAC2D007499DC /* Default-Landscape~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = D4843A89147DAC2D007499DC /* Default-Landscape~ipad.png */; };
D4843A8C147DAC2D007499DC /* Default-Portrait~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = D4843A8A147DAC2D007499DC /* Default-Portrait~ipad.png */; };
@@ -385,6 +387,9 @@
07220CB714CE367B00339B1F /* WMSHKConfigurator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WMSHKConfigurator.h; sourceTree = "<group>"; };
07220CB814CE367B00339B1F /* WMSHKConfigurator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WMSHKConfigurator.m; sourceTree = "<group>"; };
07220CB914CE367B00339B1F /* WMSHKSharers.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = WMSHKSharers.plist; sourceTree = "<group>"; };
+ 61992AAC14F6DAE1009FE7AC /* MainViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MainViewController.h; path = Classes/MainViewController.h; sourceTree = "<group>"; };
+ 61992AAD14F6DAE1009FE7AC /* MainViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MainViewController.m; path = Classes/MainViewController.m; sourceTree = "<group>"; };
+ 61992AAE14F6DAE1009FE7AC /* MainViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = MainViewController.xib; path = Classes/MainViewController.xib; sourceTree = "<group>"; };
D424DED914C0FAC40086FF61 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.md; sourceTree = "<group>"; };
D481B95F145DFE5D00D9F872 /* www */ = {isa = PBXFileReference; lastKnownFileType = folder; name = www; path = assets/www; sourceTree = "<group>"; };
D4843A89147DAC2D007499DC /* Default-Landscape~ipad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default-Landscape~ipad.png"; path = "Resources/splash/Default-Landscape~ipad.png"; sourceTree = "<group>"; };
@@ -1207,6 +1212,9 @@
D4BE963C145DFD2D0025EC00 /* Classes */ = {
isa = PBXGroup;
children = (
+ 61992AAC14F6DAE1009FE7AC /* MainViewController.h */,
+ 61992AAD14F6DAE1009FE7AC /* MainViewController.m */,
+ 61992AAE14F6DAE1009FE7AC /* MainViewController.xib */,
D4BE963D145DFD2D0025EC00 /* AppDelegate.h */,
D4BE963E145DFD2D0025EC00 /* AppDelegate.m */,
);
@@ -1297,6 +1305,7 @@
07220C7D14CDFFE500339B1F /* FBDialog.bundle in Resources */,
07220CAC14CDFFE500339B1F /* ShareKit.bundle in Resources */,
07220CBB14CE367B00339B1F /* WMSHKSharers.plist in Resources */,
+ 61992AB014F6DAE1009FE7AC /* MainViewController.xib in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -1431,6 +1440,7 @@
07220CA914CDFFE500339B1F /* SHKViewControllerWrapper.m in Sources */,
07220CAE14CE057000339B1F /* SHKVkontakteOAuthView.m in Sources */,
07220CBA14CE367B00339B1F /* WMSHKConfigurator.m in Sources */,
+ 61992AAF14F6DAE1009FE7AC /* MainViewController.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
View
35 Wikipedia-iOS/Classes/AppDelegate.h
@@ -1,19 +1,40 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+
//
// AppDelegate.h
// Wikipedia-iOS
//
-// Created by Brion Vibber on 10/30/11.
-// Copyright nobody -- this is stub template code!
+// Created by Yuvi Panda on 24/02/12.
+// Copyright yuvipanda@gmail.com 2012. All rights reserved.
//
#import <UIKit/UIKit.h>
+
#ifdef PHONEGAP_FRAMEWORK
- #import <PhoneGap/PhoneGapDelegate.h>
+ #import <PhoneGap/PGViewController.h>
#else
- #import "PhoneGapDelegate.h"
+ #import "PGViewController.h"
#endif
-@interface AppDelegate : PhoneGapDelegate {
+
+@interface AppDelegate : NSObject < UIApplicationDelegate, UIWebViewDelegate, PGCommandDelegate > {
NSString* invokeString;
}
@@ -23,7 +44,9 @@
// a simple tutorial can be found here :
// http://iphonedevelopertips.com/cocoa/launching-your-own-application-via-a-custom-url-scheme.html
-@property (copy) NSString* invokeString;
+@property (nonatomic, copy) NSString* invokeString;
+@property (nonatomic, retain) IBOutlet UIWindow* window;
+@property (nonatomic, retain) IBOutlet PGViewController* viewController;
@end
View
200 Wikipedia-iOS/Classes/AppDelegate.m
@@ -1,16 +1,39 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+
//
// AppDelegate.m
// Wikipedia-iOS
//
-// Created by Brion Vibber on 10/30/11.
-// Copyright nobody -- this is stub template code!
+// Created by Yuvi Panda on 24/02/12.
+// Copyright yuvipanda@gmail.com 2012. All rights reserved.
//
#import "AppDelegate.h"
+#import "MainViewController.h"
+
#ifdef PHONEGAP_FRAMEWORK
- #import <PhoneGap/PhoneGapViewController.h>
+#import <PhoneGap/PGPlugin.h>
+#import <PhoneGap/PGURLProtocol.h>
#else
- #import "PhoneGapViewController.h"
+#import "PGPlugin.h"
+#import "PGURLProtocol.h"
#endif
#import "SHK.h"
@@ -19,102 +42,157 @@
@implementation AppDelegate
-@synthesize invokeString;
+@synthesize invokeString, window, viewController;
- (id) init
{
/** If you need to do any extra app-specific initialization, you can do it here
* -jm
**/
+ NSHTTPCookieStorage *cookieStorage = [NSHTTPCookieStorage sharedHTTPCookieStorage];
+ [cookieStorage setCookieAcceptPolicy:NSHTTPCookieAcceptPolicyAlways];
+
+ [PGURLProtocol registerPGHttpURLProtocol];
+
return [super init];
}
+#pragma UIApplicationDelegate implementation
+
/**
* This is main kick off after the app inits, the views and Settings are setup here. (preferred - iOS4 and up)
*/
-- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
-{
-
- NSArray *keyArray = [launchOptions allKeys];
- if ([launchOptions objectForKey:[keyArray objectAtIndex:0]]!=nil)
- {
- NSURL *url = [launchOptions objectForKey:[keyArray objectAtIndex:0]];
- self.invokeString = [url absoluteString];
- NSLog(@"Wikipedia-iOS launchOptions = %@",url);
- }
-
- /* Setup ShareKit */
- DefaultSHKConfigurator *configurator = [[WMSHKConfigurator alloc] init];
- [SHKConfiguration sharedInstanceWithConfigurator:configurator];
-
- return [super application:application didFinishLaunchingWithOptions:launchOptions];
+- (BOOL) application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions
+{
+ // Initialize ShareKit
+ DefaultSHKConfigurator *configurator = [[WMSHKConfigurator alloc] init];
+ [SHKConfiguration sharedInstanceWithConfigurator:configurator];
+
+ NSURL* url = [launchOptions objectForKey:UIApplicationLaunchOptionsURLKey];
+ if (url && [url isKindOfClass:[NSURL class]]) {
+ self.invokeString = [url absoluteString];
+ NSLog(@"TEst launchOptions = %@", url);
+ }
+
+ CGRect screenBounds = [[UIScreen mainScreen] bounds];
+ self.window = [[[UIWindow alloc] initWithFrame:screenBounds] autorelease];
+ self.window.autoresizesSubviews = YES;
+
+ CGRect viewBounds = [[UIScreen mainScreen] applicationFrame];
+
+ self.viewController = [[[MainViewController alloc] init] autorelease];
+ self.viewController.useSplashScreen = YES;
+ self.viewController.wwwFolderName = @"www";
+ self.viewController.startPage = @"index.html";
+ self.viewController.view.frame = viewBounds;
+
+ // over-ride delegates
+ self.viewController.webView.delegate = self;
+ self.viewController.commandDelegate = self;
+
+ // check whether the current orientation is supported: if it is, keep it, rather than forcing a rotation
+ BOOL forceStartupRotation = YES;
+ UIDeviceOrientation curDevOrientation = [[UIDevice currentDevice] orientation];
+
+ if (UIDeviceOrientationUnknown == curDevOrientation) {
+ // UIDevice isn't firing orientation notifications yet… go look at the status bar
+ curDevOrientation = (UIDeviceOrientation)[[UIApplication sharedApplication] statusBarOrientation];
+ }
+
+ if (UIDeviceOrientationIsValidInterfaceOrientation(curDevOrientation)) {
+ for (NSNumber *orient in self.viewController.supportedOrientations) {
+ if ([orient intValue] == curDevOrientation) {
+ forceStartupRotation = NO;
+ break;
+ }
+ }
+ }
+
+ if (forceStartupRotation) {
+ NSLog(@"supportedOrientations: %@", self.viewController.supportedOrientations);
+ // The first item in the supportedOrientations array is the start orientation (guaranteed to be at least Portrait)
+ UIInterfaceOrientation newOrient = [[self.viewController.supportedOrientations objectAtIndex:0] intValue];
+ NSLog(@"AppDelegate forcing status bar to: %d from: %d", newOrient, curDevOrientation);
+ [[UIApplication sharedApplication] setStatusBarOrientation:newOrient];
+ }
+
+ [self.window addSubview:self.viewController.view];
+ [self.window makeKeyAndVisible];
+
+ return YES;
}
// this happens while we are running ( in the background, or from within our own app )
-// only valid if Wikipedia-iOS.plist specifies a protocol to handle
-- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url
+// only valid if FooBar.plist specifies a protocol to handle
+- (BOOL) application:(UIApplication*)application handleOpenURL:(NSURL*)url
{
- // must call super so all plugins will get the notification, and their handlers will be called
- // super also calls into javascript global function 'handleOpenURL'
- return [super application:application handleOpenURL:url];
+ if (!url) {
+ return NO;
+ }
+
+ // calls into javascript global function 'handleOpenURL'
+ NSString* jsString = [NSString stringWithFormat:@"handleOpenURL(\"%@\");", url];
+ [self.viewController.webView stringByEvaluatingJavaScriptFromString:jsString];
+
+ // all plugins will get the notification, and their handlers will be called
+ [[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:PGPluginHandleOpenURLNotification object:url]];
+
+ return YES;
}
--(id) getCommandInstance:(NSString*)className
+#pragma PGCommandDelegate implementation
+
+- (id) getCommandInstance:(NSString*)className
{
- /** You can catch your own commands here, if you wanted to extend the gap: protocol, or add your
- * own app specific protocol to it. -jm
- **/
- return [super getCommandInstance:className];
+ return [self.viewController getCommandInstance:className];
}
-/**
- Called when the webview finishes loading. This stops the activity view and closes the imageview
- */
-- (void)webViewDidFinishLoad:(UIWebView *)theWebView
+- (BOOL) execute:(InvokedUrlCommand*)command
+{
+ return [self.viewController execute:command];
+}
+
+- (NSString*) pathForResource:(NSString*)resourcepath;
+{
+ return [self.viewController pathForResource:resourcepath];
+}
+
+#pragma UIWebDelegate implementation
+
+- (void) webViewDidFinishLoad:(UIWebView*) theWebView
{
- // only valid if Wikipedia-iOS.plist specifies a protocol to handle
- if(self.invokeString)
+ // only valid if FooBar.plist specifies a protocol to handle
+ if (self.invokeString)
{
// this is passed before the deviceready event is fired, so you can access it in js when you receive deviceready
NSString* jsString = [NSString stringWithFormat:@"var invokeString = \"%@\";", self.invokeString];
[theWebView stringByEvaluatingJavaScriptFromString:jsString];
}
- return [ super webViewDidFinishLoad:theWebView ];
-}
-
-- (void)webViewDidStartLoad:(UIWebView *)theWebView
-{
- return [ super webViewDidStartLoad:theWebView ];
+
+ // Black base color for background matches the native apps
+ theWebView.backgroundColor = [UIColor blackColor];
+
+ return [self.viewController webViewDidFinishLoad:theWebView];
}
-/**
- * Fail Loading With Error
- * Error - If the webpage failed to load display an error with the reason.
- */
-- (void)webView:(UIWebView *)theWebView didFailLoadWithError:(NSError *)error
+- (void) webViewDidStartLoad:(UIWebView*)theWebView
{
- return [ super webView:theWebView didFailLoadWithError:error ];
+ return [self.viewController webViewDidStartLoad:theWebView];
}
-/**
- * Start Loading Request
- * This is where most of the magic happens... We take the request(s) and process the response.
- * From here we can re direct links and other protocalls to different internal methods.
- */
-- (BOOL)webView:(UIWebView *)theWebView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType
+- (void) webView:(UIWebView*)theWebView didFailLoadWithError:(NSError*)error
{
- return [ super webView:theWebView shouldStartLoadWithRequest:request navigationType:navigationType ];
+ return [self.viewController webView:theWebView didFailLoadWithError:error];
}
-
-- (BOOL) execute:(InvokedUrlCommand*)command
+- (BOOL) webView:(UIWebView*)theWebView shouldStartLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType
{
- return [ super execute:command];
+ return [self.viewController webView:theWebView shouldStartLoadWithRequest:request navigationType:navigationType];
}
-- (void)dealloc
+- (void) dealloc
{
- [ super dealloc ];
+ [super dealloc];
}
@end
View
17 Wikipedia-iOS/Classes/MainViewController.h
@@ -0,0 +1,17 @@
+//
+// MainViewController.h
+// FooBar
+//
+// Created by Shazron Abdullah on 12-01-26.
+// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
+//
+
+#ifdef PHONEGAP_FRAMEWORK
+ #import <PhoneGap/PGViewController.h>
+#else
+ #import "PGViewController.h"
+#endif
+
+@interface MainViewController : PGViewController
+
+@end
View
47 Wikipedia-iOS/Classes/MainViewController.m
@@ -0,0 +1,47 @@
+//
+// MainViewController.m
+// TEst
+//
+#import "MainViewController.h"
+
+@implementation MainViewController
+
+- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
+{
+ self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
+ if (self) {
+ // Custom initialization
+ }
+ return self;
+}
+
+- (void)didReceiveMemoryWarning
+{
+ // Releases the view if it doesn't have a superview.
+ [super didReceiveMemoryWarning];
+
+ // Release any cached data, images, etc that aren't in use.
+}
+
+#pragma mark - View lifecycle
+
+- (void)viewDidLoad
+{
+ [super viewDidLoad];
+ // Do any additional setup after loading the view from its nib.
+}
+
+- (void)viewDidUnload
+{
+ [super viewDidUnload];
+ // Release any retained subviews of the main view.
+ // e.g. self.myOutlet = nil;
+}
+
+- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
+{
+ // Return YES for supported orientations
+ return [super shouldAutorotateToInterfaceOrientation:interfaceOrientation];
+}
+
+@end
View
118 Wikipedia-iOS/Classes/MainViewController.xib
@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00">
+ <data>
+ <int key="IBDocument.SystemTarget">1280</int>
+ <string key="IBDocument.SystemVersion">11C25</string>
+ <string key="IBDocument.InterfaceBuilderVersion">1919</string>
+ <string key="IBDocument.AppKitVersion">1138.11</string>
+ <string key="IBDocument.HIToolboxVersion">566.00</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="NS.object.0">916</string>
+ </object>
+ <array key="IBDocument.IntegratedClassDependencies">
+ <string>IBProxyObject</string>
+ <string>IBUIView</string>
+ </array>
+ <array key="IBDocument.PluginDependencies">
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </array>
+ <object class="NSMutableDictionary" key="IBDocument.Metadata">
+ <string key="NS.key.0">PluginDependencyRecalculationVersion</string>
+ <integer value="1" key="NS.object.0"/>
+ </object>
+ <array class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
+ <object class="IBProxyObject" id="372490531">
+ <string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBProxyObject" id="975951072">
+ <string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBUIView" id="191373211">
+ <reference key="NSNextResponder"/>
+ <int key="NSvFlags">274</int>
+ <string key="NSFrame">{{0, 20}, {320, 460}}</string>
+ <reference key="NSSuperview"/>
+ <reference key="NSWindow"/>
+ <object class="NSColor" key="IBUIBackgroundColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MQA</bytes>
+ <object class="NSColorSpace" key="NSCustomColorSpace">
+ <int key="NSID">2</int>
+ </object>
+ </object>
+ <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ </array>
+ <object class="IBObjectContainer" key="IBDocument.Objects">
+ <array class="NSMutableArray" key="connectionRecords">
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">view</string>
+ <reference key="source" ref="372490531"/>
+ <reference key="destination" ref="191373211"/>
+ </object>
+ <int key="connectionID">3</int>
+ </object>
+ </array>
+ <object class="IBMutableOrderedSet" key="objectRecords">
+ <array key="orderedObjects">
+ <object class="IBObjectRecord">
+ <int key="objectID">0</int>
+ <array key="object" id="0"/>
+ <reference key="children" ref="1000"/>
+ <nil key="parent"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">1</int>
+ <reference key="object" ref="191373211"/>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-1</int>
+ <reference key="object" ref="372490531"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">File's Owner</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-2</int>
+ <reference key="object" ref="975951072"/>
+ <reference key="parent" ref="0"/>
+ </object>
+ </array>
+ </object>
+ <dictionary class="NSMutableDictionary" key="flattenedProperties">
+ <string key="-1.CustomClassName">MainViewController</string>
+ <string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="-2.CustomClassName">UIResponder</string>
+ <string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </dictionary>
+ <dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
+ <nil key="activeLocalization"/>
+ <dictionary class="NSMutableDictionary" key="localizations"/>
+ <nil key="sourceID"/>
+ <int key="maxID">3</int>
+ </object>
+ <object class="IBClassDescriber" key="IBDocument.Classes">
+ <array class="NSMutableArray" key="referencedPartialClassDescriptions">
+ <object class="IBPartialClassDescription">
+ <string key="className">MainViewController</string>
+ <string key="superclassName">UIViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">./Classes/MainViewController.h</string>
+ </object>
+ </object>
+ </array>
+ </object>
+ <int key="IBDocument.localizationMode">0</int>
+ <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
+ <int key="IBDocument.defaultPropertyAccessControl">3</int>
+ <string key="IBCocoaTouchPluginVersion">916</string>
+ </data>
+</archive>
View
30 assets/www/AUTHORS
@@ -0,0 +1,30 @@
+4ndreaSt4gi
+Anis Kadri
+Antoine Musso
+Arthur Richards
+awjrichards
+Brion Vibber
+Chris McKee
+Dante-101
+Dave Johnson
+Derk-Jan Hartman
+Gaurav
+Herm Wong
+Jeroen De Dauw
+Joe Bowser
+jsoby
+Manfred Hund
+Niklas Laxström
+Patrick Hayes
+Patrick Reilly
+Sam Reed
+Shravan Aras
+Soumya Deb
+Suyash Joshi
+Thomas PT
+Tim Kim
+Tomasz Finc
+Yohei Shimomae
+yoheishimomae
+Yuvi Panda
+YuviPanda
View
52 assets/www/android/phonegap-1.3.0.js → assets/www/android/phonegap-1.4.1.js 100644 → 100755
@@ -997,39 +997,6 @@ Device.prototype.getInfo = function(successCallback, errorCallback) {
PhoneGap.exec(successCallback, errorCallback, "Device", "getDeviceInfo", []);
};
-/*
- * DEPRECATED
- * This is only for Android.
- *
- * You must explicitly override the back button.
- */
-Device.prototype.overrideBackButton = function() {
- console.log("Device.overrideBackButton() is deprecated. Use App.overrideBackbutton(true).");
- navigator.app.overrideBackbutton(true);
-};
-
-/*
- * DEPRECATED
- * This is only for Android.
- *
- * This resets the back button to the default behaviour
- */
-Device.prototype.resetBackButton = function() {
- console.log("Device.resetBackButton() is deprecated. Use App.overrideBackbutton(false).");
- navigator.app.overrideBackbutton(false);
-};
-
-/*
- * DEPRECATED
- * This is only for Android.
- *
- * This terminates the activity!
- */
-Device.prototype.exitApp = function() {
- console.log("Device.exitApp() is deprecated. Use App.exitApp().");
- navigator.app.exitApp();
-};
-
PhoneGap.addConstructor(function() {
if (typeof navigator.device === "undefined") {
navigator.device = window.device = new Device();
@@ -1251,19 +1218,6 @@ App.prototype.backHistory = function() {
};
/**
- * Override the default behavior of the Android back button.
- * If overridden, when the back button is pressed, the "backKeyDown" JavaScript event will be fired.
- *
- * Note: The user should not have to call this method. Instead, when the user
- * registers for the "backbutton" event, this is automatically done.
- *
- * @param override T=override, F=cancel override
- */
-App.prototype.overrideBackbutton = function(override) {
- PhoneGap.exec(null, null, "App", "overrideBackbutton", [override]);
-};
-
-/**
* Exit and terminate the application.
*/
App.prototype.exitApp = function() {
@@ -1538,7 +1492,7 @@ Camera.prototype.getPicture = function(successCallback, errorCallback, options)
options.maxResolution = 0;
}
if (options.destinationType === null || typeof options.destinationType === "undefined") {
- options.destinationType = Camera.DestinationType.DATA_URL;
+ options.destinationType = Camera.DestinationType.FILE_URI;
}
if (options.sourceType === null || typeof options.sourceType === "undefined") {
options.sourceType = Camera.PictureSourceType.CAMERA;
@@ -3234,11 +3188,9 @@ LocalFileSystem.prototype._castFS = function(pluginResult) {
LocalFileSystem.prototype._castEntry = function(pluginResult) {
var entry = null;
if (pluginResult.message.isDirectory) {
- console.log("This is a dir");
entry = new DirectoryEntry();
}
else if (pluginResult.message.isFile) {
- console.log("This is a file");
entry = new FileEntry();
}
entry.isDirectory = pluginResult.message.isDirectory;
@@ -3262,11 +3214,9 @@ LocalFileSystem.prototype._castEntries = function(pluginResult) {
LocalFileSystem.prototype._createEntry = function(castMe) {
var entry = null;
if (castMe.isDirectory) {
- console.log("This is a dir");
entry = new DirectoryEntry();
}
else if (castMe.isFile) {
- console.log("This is a file");
entry = new FileEntry();
}
entry.isDirectory = castMe.isDirectory;
View
52 assets/www/android/platform.js
@@ -19,6 +19,32 @@ l10n.navigatorLang = function(success) {
});
}
+function setMenuItemState(action, state, noUpdate) {
+ if(state) {
+ $("command[action='" + action + "']").removeAttr("disabled");
+ } else {
+ $("command[action='" + action + "']").attr("disabled", "disabled");
+ }
+ if(!noUpdate) {
+ updateMenuState();
+ }
+}
+
+function setPageActionsState(state) {
+ setMenuItemState("read-in", state, false);
+ setMenuItemState("save-page", state, false);
+ setMenuItemState("share-page", state, false);
+ updateMenuState();
+}
+
+window.CREDITS = [
+ "<a href='http://phonegap.com'>PhoneGap</a>, Apache License 2.0",
+ "<a href='http://jquery.com'>jQuery</a>, MIT License",
+ "<a href='http://leaflet.cloudmade.com/'>Leaflet.js</a>, 2-Clause BSD License",
+ "<a href='http://zeptojs.com'>Zepto</a>, MIT License",
+ "<a href='http://cubiq.org/iscroll-4'>iScroll</a>, MIT License",
+ "<a href='http://twitter.github.com/hogan.js/'>Hogan.js</a>, Apache License 2.0"
+ ];
chrome.addPlatformInitializer(function() {
$('html').addClass('android');
@@ -49,7 +75,6 @@ chrome.addPlatformInitializer(function() {
}
-
});
chrome.addPlatformInitializer(function() {
@@ -103,7 +128,19 @@ chrome.showNotification = function(text) {
window.plugins.ToastPlugin.show_short(text);
}
-function updateMenuState(menu_handlers) {
+function updateMenuState() {
+ var d = $.Deferred();
+
+ var menu_handlers = {
+ 'read-in': function() { languageLinks.showAvailableLanguages(); },
+ 'view-history': function() { appHistory.showHistory(); } ,
+ 'save-page': function() { savedPages.saveCurrentPage() },
+ 'view-saved-pages': function() { savedPages.showSavedPages(); },
+ 'share-page': function() { sharePage(); },
+ 'go-forward': function() { chrome.goForward(); },
+ 'select-text': function() { selectText(); },
+ 'view-settings': function() { appSettings.showSettings(); },
+ };
$('#appMenu command').each(function() {
var $command = $(this),
id = $command.attr('id'),
@@ -114,8 +151,15 @@ function updateMenuState(menu_handlers) {
window.plugins.SimpleMenu.loadMenu($('#appMenu')[0],
menu_handlers,
- function(success) {console.log(success);},
- function(error) {console.log(error);});
+ function(success) {
+ console.log(success);
+ d.resolve(success);
+ },
+ function(error) {
+ console.log(error);
+ d.reject(error);
+ });
+ return d;
};
network.isConnected = function() {
View
22 assets/www/app.css
@@ -466,32 +466,29 @@ header
background-image: -webkit-gradient(radial, center center, 8, center center, 24, from(white), to(rgba(255,255,255,0)));
}
-#menu-back span {
+/* iOS bottombar iCons */
+
+#go-back span {
background: url(image/ios/toolbar-back.png);
}
-#menu-forward span {
+#go-forward span {
background: url(image/ios/toolbar-forward.png);
}
-/* Add this style to the markup to Dim the menu forward and backward icon image */
-#menu-forward-backward-dim {
- opacity : .4;
-}
-
-#menu-language span {
+#read-in span {
background: url(image/ios/toolbar-language.png);
}
-#menu-output span {
+#page-actions span {
background-image: url(image/ios/toolbar-output.png);
}
-#menu-sources span {
+#list-actions span {
background: url(image/ios/toolbar-sources.png);
}
-#menu-settings span {
+#view-settings span {
background: url(image/ios/toolbar-settings.png);
}
@@ -577,3 +574,6 @@ header
}
}
+.disabled {
+ opacity: 0.1;
+}
View
8 assets/www/index.html
@@ -14,6 +14,8 @@
<script type="text/javascript" charset="utf-8" src="js/zepto.min.js"></script>
<script type="text/javascript" charset="utf-8" src="js/hogan.min.js"></script>
<script type="text/javascript" charset="utf-8" src="js/mediawiki.js"></script>
+ <script type="text/javascript" charset="utf-8" src="js/2.5.3-crypto-md5.js"></script>
+ <script type="text/javascript" charset="utf-8" src="js/urlcache.js"></script>
<script type="text/javascript" charset="utf-8" src="js/jquery.localize.js"></script>
<script type="text/javascript" charset="utf-8" src="js/iscroll.js"></script>
@@ -175,9 +177,13 @@
<div class="scroller">
<div id="about-page-content">
<img src="image/logo.png" />
- <p id="about-version"><msg key="about-version"></msg> 1.1-beta1</p>
+ <p id="about-version"><msg key="about-version"></msg> 1.1-beta2</p>
<a id="about-wmf-logo" href="http://wikimediafoundation.org/"><img src="image/wmf.png" /></a>
<p id="about-copyright"><msg key="about-copyright"></msg></p>
+ <p id="about-contributors-header"><msg key="about-contributors"></msg></p>
+ <p id="about-contributors"></p>
+ <p id="about-credits-header"><msg key="about-credits"></msg></p>
+ <p id="about-credits"></p>
<p id="about-license"><msg key="about-license"></msg></p>
</div>
</div>
View
50 assets/www/ios/phonegap-1.3.0.js → assets/www/ios/phonegap-1.4.1.js
@@ -1,12 +1,27 @@
+/* PhoneGap v1.4.1 */
/*
- * PhoneGap v1.3.0 is available under *either* the terms of the modified BSD license *or* the
- * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
- *
- * Copyright (c) 2005-2010, Nitobi Software Inc.
- * Copyright (c) 2010-2011, IBM Corporation
- * Copyright (c) 2011, Codevise Solutions Ltd.
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+*/
+
+
+/*
+ * Some base contributions
* Copyright (c) 2011, Proyectos Equis Ka, S.L.
- *
*/
if (typeof PhoneGap === "undefined") {
@@ -989,14 +1004,7 @@ Accelerometer.installDeviceMotionHandler = function()
PhoneGap.addConstructor(Accelerometer.install);
PhoneGap.addConstructor(Accelerometer.installDeviceMotionHandler);
-};/*
- * PhoneGap is available under *either* the terms of the modified BSD license *or* the
- * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
- *
- * Copyright (c) 2005-2010, Nitobi Software Inc.
- * Copyright (c) 2010-2011, IBM Corporation
- */
-
+};
if (!PhoneGap.hasResource("battery")) {
PhoneGap.addResource("battery");
@@ -3045,10 +3053,6 @@ PhoneGap.addConstructor(function() {
/*
- * PhoneGap is available under *either* the terms of the modified BSD license *or* the
- * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
- *
- * Copyright (c) 2005-2011, Nitobi Software Inc.
* Copyright (c) 2011, Matt Kane
*/
@@ -3611,14 +3615,6 @@ PhoneGap.addConstructor(function()
if (!PhoneGap.hasResource("media")) {
PhoneGap.addResource("media");
-/*
- * PhoneGap is available under *either* the terms of the modified BSD license *or* the
- * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
- *
- * Copyright (c) 2005-2010, Nitobi Software Inc.
- * Copyright (c) 2010,2011 IBM Corporation
- */
-
/**
* List of media objects.
* PRIVATE
View
167 assets/www/ios/platform.js
@@ -1,81 +1,126 @@
// iOS+PhoneGap-specific setup
-function updateMenuState() {
- var items = [
- {
- id: 'menu-back',
- action: chrome.goBack
- },
- {
- id: 'menu-forward',
- action: chrome.goForward
- },
- {
- id: 'menu-language',
- action: languageLinks.showAvailableLanguages
- },
- {
- id: 'menu-output',
- action: function() {
- popupMenu([
- mw.msg('menu-savePage'),
- mw.msg('menu-sharePage'),
- mw.msg('menu-cancel')
- ], function(value, index) {
- if (index == 0) {
- savedPages.saveCurrentPage();
- } else if (index == 1) {
- sharePage();
- }
- }, {
- cancelButtonIndex: 2,
- origin: this
- });
- }
- },
- {
- id: 'menu-sources',
- action: function() {
- popupMenu([
- mw.msg('menu-savedPages'),
- mw.msg('menu-history'),
- mw.msg('menu-cancel')
- ], function(val, index) {
- if (index == 0) {
- savedPages.showSavedPages();
- } else if (index == 1) {
- appHistory.showHistory();
- }
- }, {
- cancelButtonIndex: 2,
- origin: this
- });
- }
- },
- {
- id: 'menu-settings',
- action: appSettings.showSettings
+function setMenuItemState(action, state) {
+ // Stupid iterator
+ $.each(menu_items, function(i, item) {
+ if(item.id == action) {
+ item.disabled = !state;
}
- ];
+ });
+ updateMenuState();
+}
+
+function setPageActionsState(state) {
+ setMenuItemState("page-actions", state);
+}
+
+var menu_items = [
+ {
+ id: 'go-back',
+ action: chrome.goBack
+ },
+ {
+ id: 'go-forward',
+ action: chrome.goForward,
+ disabled: true
+ },
+ {
+ id: 'read-in',
+ action: languageLinks.showAvailableLanguages
+ },
+ {
+ id: 'page-actions',
+ action: function() {
+ popupMenu([
+ mw.msg('menu-savePage'),
+ mw.msg('menu-sharePage'),
+ mw.msg('menu-cancel')
+ ], function(value, index) {
+ if (index == 0) {
+ savedPages.saveCurrentPage();
+ } else if (index == 1) {
+ sharePage();
+ }
+ }, {
+ cancelButtonIndex: 2,
+ origin: this
+ });
+ }
+ },
+ {
+ id: 'list-actions',
+ action: function() {
+ popupMenu([
+ mw.msg('menu-savedPages'),
+ mw.msg('menu-history'),
+ mw.msg('menu-cancel')
+ ], function(val, index) {
+ if (index == 0) {
+ savedPages.showSavedPages();
+ } else if (index == 1) {
+ appHistory.showHistory();
+ }
+ }, {
+ cancelButtonIndex: 2,
+ origin: this
+ });
+ }
+ },
+ {
+ id: 'view-settings',
+ action: appSettings.showSettings
+ }
+];
+
+function updateMenuState() {
$('#menu').remove();
var $menu = $('<div>');
$menu
.attr('id', 'menu')
.appendTo('body');
- $.each(items, function(i, item) {
+ $.each(menu_items, function(i, item) {
var $button = $('<button>');
$button
.attr('id', item.id)
- .attr('title', mw.msg(item.id))
- .click(function() {
+ .attr('title', mw.msg(item.id));
+ if(item.disabled) {
+ $button.addClass("disabled");
+ } else {
+ $button.click(function() {
item.action.apply(this);
- })
- .append('<span>')
+ });
+ }
+ $button.append('<span>')
.appendTo($menu);
});
};
+// Save page supporting code
+app.loadCachedPage = function (url) {
+ return urlCache.getCachedData(url).then(function(data) {
+ chrome.renderHtml(data, url);
+ chrome.onPageLoaded();
+ }).fail(function(error) {
+ console.log('Error: ' + error);
+ chrome.hideSpinner();
+ });
+}
+
+savedPages.doSave = function(url, title) {
+
+ // Get the entire HTML again
+ // Hopefully this is in cache
+ // What we *really* should be doing is putting all this in an SQLite DataBase. FIXME
+ $.get(url,
+ function(data) {
+ urlCache.saveCompleteHtml(url, data).then(function() {;
+ chrome.showNotification(mw.message('page-saved', title).plain());
+ });
+ }
+ );
+}
+
// @Override
function popupMenu(items, callback, options) {
if (options.origin) {
View
17 assets/www/js/2.5.3-crypto-md5.js
@@ -0,0 +1,17 @@
+/*
+ * Crypto-JS v2.5.3
+ * http://code.google.com/p/crypto-js/
+ * (c) 2009-2012 by Jeff Mott. All rights reserved.
+ * http://code.google.com/p/crypto-js/wiki/License
+ */
+(typeof Crypto=="undefined"||!Crypto.util)&&function(){var m=window.Crypto={},o=m.util={rotl:function(h,g){return h<<g|h>>>32-g},rotr:function(h,g){return h<<32-g|h>>>g},endian:function(h){if(h.constructor==Number)return o.rotl(h,8)&16711935|o.rotl(h,24)&4278255360;for(var g=0;g<h.length;g++)h[g]=o.endian(h[g]);return h},randomBytes:function(h){for(var g=[];h>0;h--)g.push(Math.floor(Math.random()*256));return g},bytesToWords:function(h){for(var g=[],i=0,a=0;i<h.length;i++,a+=8)g[a>>>5]|=(h[i]&255)<<
+24-a%32;return g},wordsToBytes:function(h){for(var g=[],i=0;i<h.length*32;i+=8)g.push(h[i>>>5]>>>24-i%32&255);return g},bytesToHex:function(h){for(var g=[],i=0;i<h.length;i++)g.push((h[i]>>>4).toString(16)),g.push((h[i]&15).toString(16));return g.join("")},hexToBytes:function(h){for(var g=[],i=0;i<h.length;i+=2)g.push(parseInt(h.substr(i,2),16));return g},bytesToBase64:function(h){if(typeof btoa=="function")return btoa(n.bytesToString(h));for(var g=[],i=0;i<h.length;i+=3)for(var a=h[i]<<16|h[i+1]<<
+8|h[i+2],b=0;b<4;b++)i*8+b*6<=h.length*8?g.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(a>>>6*(3-b)&63)):g.push("=");return g.join("")},base64ToBytes:function(h){if(typeof atob=="function")return n.stringToBytes(atob(h));for(var h=h.replace(/[^A-Z0-9+\/]/ig,""),g=[],i=0,a=0;i<h.length;a=++i%4)a!=0&&g.push(("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(h.charAt(i-1))&Math.pow(2,-2*a+8)-1)<<a*2|"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(h.charAt(i))>>>
+6-a*2);return g}},m=m.charenc={};m.UTF8={stringToBytes:function(h){return n.stringToBytes(unescape(encodeURIComponent(h)))},bytesToString:function(h){return decodeURIComponent(escape(n.bytesToString(h)))}};var n=m.Binary={stringToBytes:function(h){for(var g=[],i=0;i<h.length;i++)g.push(h.charCodeAt(i)&255);return g},bytesToString:function(h){for(var g=[],i=0;i<h.length;i++)g.push(String.fromCharCode(h[i]));return g.join("")}}}();
+(function(){var m=Crypto,o=m.util,n=m.charenc,h=n.UTF8,g=n.Binary,i=m.MD5=function(a,b){var h=o.wordsToBytes(i._md5(a));return b&&b.asBytes?h:b&&b.asString?g.bytesToString(h):o.bytesToHex(h)};i._md5=function(a){a.constructor==String&&(a=h.stringToBytes(a));for(var b=o.bytesToWords(a),g=a.length*8,a=1732584193,d=-271733879,e=-1732584194,c=271733878,f=0;f<b.length;f++)b[f]=(b[f]<<8|b[f]>>>24)&16711935|(b[f]<<24|b[f]>>>8)&4278255360;b[g>>>5]|=128<<g%32;b[(g+64>>>9<<4)+14]=g;for(var g=i._ff,j=i._gg,k=
+i._hh,l=i._ii,f=0;f<b.length;f+=16)var m=a,n=d,p=e,q=c,a=g(a,d,e,c,b[f+0],7,-680876936),c=g(c,a,d,e,b[f+1],12,-389564586),e=g(e,c,a,d,b[f+2],17,606105819),d=g(d,e,c,a,b[f+3],22,-1044525330),a=g(a,d,e,c,b[f+4],7,-176418897),c=g(c,a,d,e,b[f+5],12,1200080426),e=g(e,c,a,d,b[f+6],17,-1473231341),d=g(d,e,c,a,b[f+7],22,-45705983),a=g(a,d,e,c,b[f+8],7,1770035416),c=g(c,a,d,e,b[f+9],12,-1958414417),e=g(e,c,a,d,b[f+10],17,-42063),d=g(d,e,c,a,b[f+11],22,-1990404162),a=g(a,d,e,c,b[f+12],7,1804603682),c=g(c,a,
+d,e,b[f+13],12,-40341101),e=g(e,c,a,d,b[f+14],17,-1502002290),d=g(d,e,c,a,b[f+15],22,1236535329),a=j(a,d,e,c,b[f+1],5,-165796510),c=j(c,a,d,e,b[f+6],9,-1069501632),e=j(e,c,a,d,b[f+11],14,643717713),d=j(d,e,c,a,b[f+0],20,-373897302),a=j(a,d,e,c,b[f+5],5,-701558691),c=j(c,a,d,e,b[f+10],9,38016083),e=j(e,c,a,d,b[f+15],14,-660478335),d=j(d,e,c,a,b[f+4],20,-405537848),a=j(a,d,e,c,b[f+9],5,568446438),c=j(c,a,d,e,b[f+14],9,-1019803690),e=j(e,c,a,d,b[f+3],14,-187363961),d=j(d,e,c,a,b[f+8],20,1163531501),
+a=j(a,d,e,c,b[f+13],5,-1444681467),c=j(c,a,d,e,b[f+2],9,-51403784),e=j(e,c,a,d,b[f+7],14,1735328473),d=j(d,e,c,a,b[f+12],20,-1926607734),a=k(a,d,e,c,b[f+5],4,-378558),c=k(c,a,d,e,b[f+8],11,-2022574463),e=k(e,c,a,d,b[f+11],16,1839030562),d=k(d,e,c,a,b[f+14],23,-35309556),a=k(a,d,e,c,b[f+1],4,-1530992060),c=k(c,a,d,e,b[f+4],11,1272893353),e=k(e,c,a,d,b[f+7],16,-155497632),d=k(d,e,c,a,b[f+10],23,-1094730640),a=k(a,d,e,c,b[f+13],4,681279174),c=k(c,a,d,e,b[f+0],11,-358537222),e=k(e,c,a,d,b[f+3],16,-722521979),
+d=k(d,e,c,a,b[f+6],23,76029189),a=k(a,d,e,c,b[f+9],4,-640364487),c=k(c,a,d,e,b[f+12],11,-421815835),e=k(e,c,a,d,b[f+15],16,530742520),d=k(d,e,c,a,b[f+2],23,-995338651),a=l(a,d,e,c,b[f+0],6,-198630844),c=l(c,a,d,e,b[f+7],10,1126891415),e=l(e,c,a,d,b[f+14],15,-1416354905),d=l(d,e,c,a,b[f+5],21,-57434055),a=l(a,d,e,c,b[f+12],6,1700485571),c=l(c,a,d,e,b[f+3],10,-1894986606),e=l(e,c,a,d,b[f+10],15,-1051523),d=l(d,e,c,a,b[f+1],21,-2054922799),a=l(a,d,e,c,b[f+8],6,1873313359),c=l(c,a,d,e,b[f+15],10,-30611744),
+e=l(e,c,a,d,b[f+6],15,-1560198380),d=l(d,e,c,a,b[f+13],21,1309151649),a=l(a,d,e,c,b[f+4],6,-145523070),c=l(c,a,d,e,b[f+11],10,-1120210379),e=l(e,c,a,d,b[f+2],15,718787259),d=l(d,e,c,a,b[f+9],21,-343485551),a=a+m>>>0,d=d+n>>>0,e=e+p>>>0,c=c+q>>>0;return o.endian([a,d,e,c])};i._ff=function(a,b,g,d,e,c,f){a=a+(b&g|~b&d)+(e>>>0)+f;return(a<<c|a>>>32-c)+b};i._gg=function(a,b,g,d,e,c,f){a=a+(b&d|g&~d)+(e>>>0)+f;return(a<<c|a>>>32-c)+b};i._hh=function(a,b,g,d,e,c,f){a=a+(b^g^d)+(e>>>0)+f;return(a<<c|a>>>
+32-c)+b};i._ii=function(a,b,g,d,e,c,f){a=a+(g^(b|~d))+(e>>>0)+f;return(a<<c|a>>>32-c)+b};i._blocksize=16;i._digestsize=16})();
View
42 assets/www/js/app.js
@@ -1,9 +1,7 @@
window.app = function() {
+
function loadCachedPage (url) {
var d = $.Deferred();
- // Hide the iframe until the stylesheets are loaded,
- // to avoid flash of unstyled text.
- // Instead we're hidden, which also sucks.
var replaceRes = function() {
// images
@@ -25,8 +23,6 @@ window.app = function() {
var gotError = function(error) {
console.log('Error: ' + error);
chrome.hideSpinner();
- // chrome.showNoConnectionMessage();
- // navigator.app.exitApp();
}
window.plugins.urlCache.getCachedPathForURI(url, gotPath, gotError);
return d;
@@ -52,9 +48,8 @@ window.app = function() {
loadLocalPage('error.html');
}
languageLinks.clearLanguages();
- $('#savePageCmd').attr('disabled', 'disabled');
- console.log('disabling language');
- $('#languageCmd').attr('disabled', 'disabled');
+ setMenuItemState('read-in', false);
+ setPageActionsState(false);
}
});
};
@@ -73,7 +68,7 @@ window.app = function() {
function loadLocalPage(page) {
var d = $.Deferred();
- $('base').attr('href', 'file:///android_asset/www/');
+ $('base').attr('href', ROOT_URL);
$('#main').load(page, function() {
$('#main').localize();
chrome.onPageLoaded();
@@ -113,22 +108,23 @@ window.app = function() {
$('#searchParam').val('');
chrome.showSpinner();
- if (options.cache) {
- d = loadCachedPage(url);
- } else {
- d = loadPage(url);
- }
if (options.updateHistory) {
currentHistoryIndex += 1;
pageHistory[currentHistoryIndex] = url;
- // We're adding an entry to the 'forward/backwards' chain.
- // So disable forward.
}
- console.log("navigating to " + url);
- // Enable change language - might've been disabled in a prior error page
- console.log('enabling language');
- $('#languageCmd').removeAttr('disabled');
- chrome.showContent();
+ if (options.cache) {
+ d = app.loadCachedPage(url);
+ } else {
+ d = app.loadPage(url);
+ }
+ d.done(function() {
+ console.log("navigating to " + url);
+ // Enable change language - might've been disabled in a prior error page
+ console.log('enabling language');
+ setPageActionsState(true);;
+ setMenuItemState('read-in', true);
+ chrome.showContent();
+ });
return d;
}
@@ -152,7 +148,9 @@ window.app = function() {
getCurrentTitle: getCurrentTitle,
urlForTitle: urlForTitle,
baseUrlForLanguage: baseUrlForLanguage,
- setCaching: setCaching
+ setCaching: setCaching,
+ loadPage: loadPage,
+ loadCachedPage: loadCachedPage
};
return exports;
View
21 assets/www/js/chrome.js
@@ -1,16 +1,4 @@
window.chrome = function() {
- var menu_handlers = {
- 'read-in': function() { languageLinks.showAvailableLanguages(); },
- 'view-history': function() { appHistory.showHistory(); } ,
- 'save-page': function() { savedPages.saveCurrentPage() },
- 'view-saved-pages': function() { savedPages.showSavedPages(); },
- 'share-page': function() { sharePage(); },
- 'go-forward': function() { goForward(); },
- 'select-text': function() { selectText(); },
- 'view-settings': function() { appSettings.showSettings(); },
- 'word-of-the-day': function() { loadFirstPage(true); },
- 'listen-sound': function() { playSound(); }
- };
// List of functions to be called on a per-platform basis before initialize
var platform_initializers = [];
@@ -108,7 +96,7 @@ window.chrome = function() {
});
l10n.initLanguages();
- updateMenuState(menu_handlers);
+ updateMenuState();
$(".titlebarIcon").bind('touchstart', function() {
homePage();
@@ -222,9 +210,9 @@ window.chrome = function() {
function toggleForward() {
// Length starts from 1, indexes don't.
if (currentHistoryIndex < (pageHistory.length - 1)) {
- $('#forwardCmd').removeAttr('disabled');
+ setMenuItemState('go-forward', true);
} else {
- $('#forwardCmd').attr('disabled', 'disabled');
+ setMenuItemState('go-forward', false);
}
}
@@ -264,7 +252,6 @@ window.chrome = function() {
} else {
chrome.hideSpinner();
toggleForward();
- updateMenuState(menu_handlers);
}
}
@@ -352,8 +339,6 @@ window.chrome = function() {
window.scroll(0,0);
appHistory.addCurrentPage();
toggleForward();
- updateMenuState(menu_handlers);
- $('#search').removeClass('inProgress');
chrome.hideSpinner();
audioPlayer.getMediaList();
console.log('currentHistoryIndex '+currentHistoryIndex + ' history length '+pageHistory.length);
View
30 assets/www/js/main.js
@@ -3,6 +3,18 @@ var currentHistoryIndex = -1;
var pageHistory = [];
window.PROJECTNAME = 'wiktionary';
+(function() {
+ var url_parts = location.href.split('/');
+ delete url_parts[url_parts.length - 1];
+ window.ROOT_URL = url_parts.join('/');
+})()
+window.CREDITS = [
+ "<a href='http://jquery.com'>jQuery</a>, MIT License",
+ "<a href='http://leaflet.cloudmade.com/'>Leaflet.js</a>, 2-Clause BSD License",
+ "<a href='http://zeptojs.com'>Zepto</a>, MIT License",
+ "<a href='http://cubiq.org/iscroll-4'>iScroll</a>, MIT License",
+ "<a href='http://twitter.github.com/hogan.js/'>Hogan.js</a>, Apache License 2.0"
+ ];
function init() {
document.addEventListener("deviceready", function() {chrome.initialize(); }, true);
@@ -14,11 +26,17 @@ function homePage() {
function aboutPage() {
chrome.hideOverlays();
- $("#about-page-overlay").localize().show();
- $("#aboutclose").unbind('click');
- $("#aboutclose").bind('click', function(){
- $("#about-page-overlay").hide();
- appSettings.showSettings();
+ $.get(ROOT_URL + 'AUTHORS').then(function(authors) {
+ $("#about-contributors").text($.trim(authors).split('\n').join(', '));
+ $("#about-credits").html(window.CREDITS.join('<br />'));
+ chrome.hideOverlays();
+ chrome.hideContent();
+ $("#about-page-overlay").localize().show();
+ $("#aboutclose").unbind('click');
+ $("#aboutclose").bind('click', function(){
+ $("#about-page-overlay").hide();
+ appSettings.showSettings();
+ });
+ chrome.doFocusHack();
});
- chrome.doFocusHack();
}
View
2  assets/www/js/platform-stub.js
@@ -20,7 +20,7 @@ if (platform == 'unknown') {
// Assume we're a generic web browser.
platform = 'web';
} else {
- includes.push('phonegap-1.3.0.js');
+ includes.push('phonegap-1.4.1.js');
var plugins = {
android: [
'menu/menu.android.js',
View
20 assets/www/js/savedpages.js
@@ -1,11 +1,21 @@
window.savedPages = function() {
+ function doSave(url, title) {
+ app.navigateToPage(url, {
+ cache: true,
+ updateHistory: false
+ }).then(function() {
+ chrome.showNotification(mw.message('page-saved', title).plain());
+ });
+ }
+
function saveCurrentPage() {
var MAX_LIMIT = 50;
var title = app.getCurrentTitle();
var url = app.getCurrentUrl();
+ console.log("url is " + url);
var savedPagesDB = new Lawnchair({name:"savedPagesDB"}, function() {
this.keys(function(records) {
if (records != null) {
@@ -15,12 +25,7 @@ window.savedPages = function() {
alert(mw.message("saved-pages-max-warning").plain());
}else{
savedPagesDB.save({key: url, title: title});
- app.navigateToPage(url, {
- cache: true,
- updateHistory: false
- }).then(function() {
- chrome.showNotification(mw.message('page-saved', title).plain());
- });
+ savedPages.doSave(url, title);
}
}
});
@@ -85,6 +90,7 @@ window.savedPages = function() {
return {
showSavedPages: showSavedPages,
- saveCurrentPage: saveCurrentPage
+ saveCurrentPage: saveCurrentPage,
+ doSave: doSave
};
}();
View
142 assets/www/js/urlcache.js
@@ -0,0 +1,142 @@
+window.urlCache = function() {
+ function error(e) {
+ console.log("ERROR!" + JSON.stringify(e));
+ }
+
+ function dataUrlForImage(img) {
+ var d = $.Deferred();
+ console.log("Starting canvas!");
+ // Create an empty canvas element
+ var canvas = document.createElement("canvas");
+ canvas.width = img.width;
+ canvas.height = img.height;
+
+ // Copy the image contents to the canvas
+ var ctx = canvas.getContext("2d");
+ ctx.drawImage(img, 0, 0);
+
+ var dataURL = canvas.toDataURL("image/png");
+ d.resolve(dataURL);
+ //return d;
+ return dataURL;
+ //return dataURL.replace(/^data:image\/(png|jpg);base64,/, "");
+ }
+
+ function getCachedPathForUrl(url) {
+ var d = $.Deferred();
+
+ var fileName = Crypto.MD5(url);
+ var filePath = fileName;
+
+ function cacheUrl() {
+ function saveFile(fileEntry) {
+ $.get(url, function(data) {
+ fileEntry.createWriter(function(writer) {
+ writer.write(data);
+ console.log("Writing stuff to " + fileEntry.fullPath);
+ writer.onwriteend = function() {
+ console.log("written stuff!");
+ d.resolve(fileEntry.fullPath);
+ };
+ });
+ });
+ }
+ window.requestFileSystem(LocalFileSystem.PERSISTENT, 0,
+ function(fs){
+ fs.root.getFile(filePath, {create: true}, saveFile, error);
+ });
+ return d;
+ }
+
+ console.log("Trying to open " + filePath);
+ window.resolveLocalFileSystemURI(filePath,
+ function(fileEntry) {
+ console.log("Found!");
+ d.resolve(fileEntry.fullPath);
+ }, function(error) {
+ console.log("Not found!");
+ cacheUrl();
+ }
+ );
+ return d;
+ }
+
+ function saveCompleteHtml(url, html) {
+ // Converts images to Data URIs
+ var d = $.Deferred();
+
+ var fileName = Crypto.MD5(url);
+ var filePath = fileName;
+
+ console.log("Starting to save");
+ var element = $(html);
+ var replacements = {};
+ console.log("HTML Parsed");
+ function saveFile(fileEntry) {
+ fileEntry.createWriter(function(writer) {
+ writer.write(html);
+ console.log('html is ' + html);
+ console.log("Writing stuff to " + fileEntry.fullPath);
+ writer.onwriteend = function() {
+ console.log("written stuff!");
+ d.resolve(fileEntry.fullPath);
+ };
+ });
+ }
+ console.log("About to map stuff");
+
+ // Incredibly wasteful hack going to happen. I'm sorry
+ // I am parsing the entire HTML again, *and* doing string replacement
+ // FIXME: Do only one stupid thing, not two
+ // TODO: Check if Images are actually loaded
+ element.find("img").each(function(i, img) {
+ replacements[$(img).attr("src")] = urlCache.dataUrlForImage(img);
+ });
+
+ $.each(replacements, function(href, data) {
+ html = html.replace(href, data);
+ });
+
+ console.log("Done mapping stuff");
+ console.log("Inside the when");
+ window.requestFileSystem(LocalFileSystem.PERSISTENT, 0,
+ function(fs){
+ console.log(filePath);
+ console.log(JSON.stringify(fs));
+ fs.root.getFile(filePath, {create: true}, saveFile, error);
+ });
+ console.log("Technically done");
+ return d;
+ }
+
+ function getCachedData(url) {
+ var d = $.Deferred();
+
+ var fileName = Crypto.MD5(url);
+ var filePath = fileName;
+
+
+ function readFile(fileEntry) {
+ var reader = new FileReader();
+ reader.onloadend = function(evt) {
+ console.log(JSON.stringify(evt));
+ d.resolve(evt.target.result);
+ };
+ console.log('file path is ' + JSON.stringify(fileEntry));
+ fileEntry.file(function(file) {reader.readAsText(file); });
+ }
+ window.requestFileSystem(LocalFileSystem.PERSISTENT, 0,
+ function(fs){
+ fs.root.getFile(filePath, {create: false}, readFile, error);
+ });
+
+ return d;
+ }
+
+ return {
+ getCachedPathForUrl: getCachedPathForUrl,
+ getCachedData: getCachedData,
+ saveCompleteHtml: saveCompleteHtml,
+ dataUrlForImage: dataUrlForImage
+ };
+}();
View
45 assets/www/messages/messages-arc.properties
@@ -6,16 +6,61 @@
sitename=ܘܝܩܝܦܕܝܐ
spinner-loading=ܡܛܥܘܢܐ...
spinner-retrieving=ܡܩܠܘܒ̈ܐ ܚܒܫܝܬܐ ܡܢ $1...
+saved-pages-clear-all=ܫܘܦ ܠܟܠ ܦܬܘܬ̈ܐ ܚܡܝ̈ܐ
+saved-pages-close=ܨܘܕ ܟܘܐ ܕܦܬܘܬܐ ܚܡܝ̈ܐ
+saved-pages-max-warning=ܐܢܬ ܡܛܝܬ ܠܬܚܘܡܐ ܥܠܝܐ ܠܡܢܝܢܐ ܕܦܬܘܬ̈ܐ ܚܡܝ̈ܐ.
+page-saved=ܚܡܝܬܐ ܓܡܪ $1.
+page-already-saved=$1 ܠܒܟܬܐ ܒܕܥܒܪ.
+saved-page-remove-prompt=ܫܘܦ $1 ܡܢ ܦܬܘܬܐ ܚܡܝ̈ܐ؟
+clear-all-history-prompt=ܫܝܦܢ ܠܬܫܥܝܬܐ؟
+clear-all-saved-pages-prompt=ܫܘܦ ܠܟܠ ܦܬܘܬ̈ܐ ܚܡܝ̈ܐ؟
+saved-page-removed=ܦܐܬܐ $1 ܗܐ ܐܬܫܝܦܬ.
+saved-pages-title=ܕܦ̈ܐ ܢܛܝܪ̈ܐ
+menu-home=ܦܐܬܐ ܕܘܝܩܝܦܕܝܐ ܪܝܫܝܬܐ
+menu-language=ܩܪܝ ܒ...
+menu-savePage=ܠܒܘܟ ܕܦܐ
+menu-savedPages=ܕܦ̈ܐ ܢܛܝܪ̈ܐ
menu-history=ܬܫܥܝܬܐ
+menu-back=ܗܦܟܐ
menu-forward=ܠܩܕܡܐ
menu-nearby=ܩܘܪܒܐ ܠ
menu-settings=ܛܘܝܒ̈ܐ
menu-selectText=ܓܒܝ ܟܬܒܬܐ
menu-sharePage=ܫܘܬܦ ܦܐܬܐ
menu-about=ܡܢܘ
+menu-cancel=ܒܛܘܠ
+menu-sources=ܡܒܘܥ̈ܐ
+settings-close=ܨܘܕ ܠܟܘܐ ܕܛܘܝܒ̈ܐ
settings-title=ܛܘܝܒ̈ܐ
settings-app-version-label=ܨܚܚܐ ܕܬܚܪ̈ܙܝܬܐ:
settings-android-version-label=ܡܦܩܢܘܬܐ ܕܐܢܕܪܘܝܕ:
settings-phonegap-version-label=ܡܦܩܢܘܬܐ ܕܦܘܢܓܐܦ:
settings-language-label=ܠܫܢܐ:
settings-language-desc=ܓܒܝ ܠܫܢܐ ܕܘܝܩܝܦܕܝܐ ܥܠ $1
+settings-font-size-label=ܓܘܫܡܐ ܕܣܪܛܐ
+settings-font-size-desc=ܥܘܝܢܐ ܓܘܫܡܐ ܕܣܪܛܐ ܒܓܘ ܦܐܬܐ
+settings-font-size-smaller=ܙܥܘܪܐ
+settings-font-size-normal=ܟܝܢܝܐ
+settings-font-size-larger=ܪܒܐ
+langlinks-close=ܨܘܕ ܠܟܘܐ ܕܩܪܝ ܒܠܫܢ̈ܐ ܐܚܪܝܢܐ
+langlinks-title=ܩܪܝ ܠܦܐܬܐ ܒ...
+error-not-available=ܡܦܚܠܬܐ، ܗܢܐ ܦܐܬܐ ܠܝܬ.
+error-offline=ܐܢܬ ܠܐ ܝܨܝܪܐ ܒܐܢܛܪܢܛ ܘܦܐܬܐ ܠܐ ܐܬܚܡܝܬ ܒܠܘܩܕܡ.
+error-not-found=ܡܦܚܠܬܐ، ܠܝܬ ܦܐܬܐ ܒܗܘ ܫܡܐ ܛܠܝܒܐ.
+error-search-again=ܒܨܝ ܥܠ ܚܕ ܦܬܓܡܐ ܐܚܪܝܢܐ.
+about-page-label=ܡܢܘ ܚܢܢ
+history-clear-all=ܫܘܦ ܠܬܫܥܝܬܐ
+history-close=ܨܘܕ ܟܘܐ ܕܬܫܥܝܬܐ
+history-title=ܬܫܥܝܬܐ
+about-close=ܨܘܕ ܟܘܐ ܕܡܢܘ
+about-page-title=ܡܢܘ
+about-version=ܨܚܚܐ
+about-copyright=ܙܕܩ̈ܐ ܕܦܪܣܬܐ ܗܢܐ ܐܦܠܝܟܐܝܫܘܢ ܢܛܝܪ̈ܐ (C) ܠܫܘܬܐܣܐ ܕܘܝܩܝܦܕܝܐ ܘܡܛܘܪ̈ܢܐ ܡܫܘܬܦܢ̈ܐ.
+nearby-close=ܨܘܕ ܟܘܐ ܕܦܬܘܬܐ ܩܪܝܒ̈ܐ
+nearby-title=ܦܬܘܬܐ ܩܪܝܒ̈ܐ
+search-results-did-you-mean-label=ܐܪܐ ܡܥܢܐ ܕܝܠܘܟ:
+search-results-no-results=ܠܝܬ ܦܠܛ̈ܐ
+search-results-close=ܨܘܕ ܦܠܛ̈ܐ ܕܒܘܨܝܐ
+search-button=ܒܨܝ ܒܓܘ ܘܝܩܝܦܕܝܐ ܥܠ ܗܢܐ ܟܬܒܬܐ
+search-placeholder=ܒܨܝ
+do-fulltext-search=ܚܘܝ ܝܬܝܪ ܦܠܛ̈ܐ...
View
17 assets/www/messages/messages-as.properties
@@ -1,23 +1,34 @@
# This file is distributed under the same license as the Wikipedia Mobile package.
#
# Author: Ansumang
+# Author: Chaipau
+# Author: Gitartha.bordoloi
# Author: Nilamdyuti
sitename=ৱিকিপিডিয়া
spinner-loading=ল'ড কৰা হৈছে...
spinner-retrieving=$1 -ৰ পৰা সমল উদ্ধাৰ কৰা হৈছে ...
+saved-pages-clear-all=সকলো সাঁচি থোৱা পৃষ্ঠা মচি পেলাওক।
+saved-pages-close=সাঁচি থোৱা পৃষ্ঠাৰ পৰ্দা বন্ধ কৰক।
+saved-pages-max-warning=আপুনি সৰ্বোচ্চ সংখ্যক পৃষ্ঠা সংৰক্ষণ কৰিছে।
+page-saved=$1 সাঁচি থোৱা হ'ল।
+page-already-saved=$1 ইতিমধ্যে সাঁচি থোৱা হ'ল।
+clear-all-history-prompt=ইতিহাস মচি পেলাওক?
+menu-home=ৱিকিপিডিয়া বেটুপাত
menu-history=ইতিহাস
+menu-back=ঘূৰি যাওক
menu-forward=আগলৈ যাওক
menu-nearby=কাষৰীয়া
menu-settings=সংহতিসমূহ
-menu-selectText=লিখনী নিৰ্বাচন কৰক
+menu-selectText=পাঠ নিৰ্বাচন কৰক
menu-sharePage=পৃষ্ঠা অংশীদাৰী কৰক
menu-about=বিষয়ে
+menu-cancel=বাতিল কৰক
+menu-sources=উৎস
settings-title=সংহতিসমূহ
settings-app-version-label=এপ্লিকেচন সংস্কৰণ:
settings-android-version-label=Android সংস্কৰণ:
settings-phonegap-version-label=PhoneGap সংস্কৰণ:
settings-language-label=ভাষা:
-# Fuzzy
-settings-language-desc=আপোনাৰ ৱিকিপিডিয়া ভাষা সংহতি কৰক
+settings-language-desc=$1ত ভাষা নিৰ্ণয় কৰক
history-title=খতিয়ান
View
1  assets/www/messages/messages-ast.properties
@@ -69,3 +69,4 @@ search-results-no-results=Nun s'alcontraron resultaos
search-results-close=Zarrar resultaos de la gueta
search-button=Guetar esti testu na Uiquipedia
search-placeholder=Guetar
+do-fulltext-search=Ver más resultaos...
View
1  assets/www/messages/messages-be-tarask.properties
@@ -72,3 +72,4 @@ search-results-no-results=Нічога ня знойдзена
search-results-close=Закрыць вынікі пошуку
search-button=Шукаць гэты тэкст у Вікіпэдыі
search-placeholder=Пошук
+do-fulltext-search=Паказаць болей вынікаў…
View
5 assets/www/messages/messages-br.properties
@@ -11,7 +11,7 @@ saved-pages-close=Serriñ holl skrammoù ar pajennoù enrollet
saved-pages-max-warning=Tizhet ganeoc'h an niver brasañ a bajennoù enrollet.
page-saved=$1 enrollet.
page-already-saved=$1 a zo bet enrollet c'hoazh.
-saved-page-remove-prompt=Dilemmel $1 deus ar pajennoù enrollet ?
+saved-page-remove-prompt=Dilemel $1 eus ar pajennoù enrollet ?
clear-all-history-prompt=Diverkañ an Istor ?
clear-all-saved-pages-prompt=Diverkañ an holl bajennoù enrollet ?
saved-page-removed=Lamet eo bet $1.
@@ -67,5 +67,6 @@ app-description=Arolad ofisiel Wikipedia evit Android. An holloueziadur frank a
search-results-did-you-mean-label=N'hoc'h eus ket soñjet kentoc'h e :
search-results-no-results=N'eus bet kavet disoc'h ebet
search-results-close=Serriñ disoc'hoù ar c'hlask
-search-button=Klask an destenn-mañ e wikipedia
+search-button=Klask an destenn-mañ e Wikipedia
search-placeholder=Klask
+do-fulltext-search=Diskouez disoc'hoù ouzhpenn...
View
1  assets/www/messages/messages-ca.properties
@@ -69,3 +69,4 @@ search-results-no-results=Cap resultat
search-results-close=Tanca els resultats de cerca
search-button=Cerca a la Viquipèdia aquest text
search-placeholder=Cerca
+do-fulltext-search=Mostra més resultats...
View
31 assets/www/messages/messages-ckb.properties
@@ -0,0 +1,31 @@
+# This file is distributed under the same license as the Wikipedia Mobile package.
+#
+# Author: Asoxor
+
+sitename=ویکیپیدیا
+spinner-loading=بارکردن...
+saved-pages-clear-all=گشت پەڕە پاشەکەوتکراوەکان بسڕەوە
+page-saved=$1 پاشەکەوت کرا.
+page-already-saved=$1 پێشتر پاشەکەوت کراوە.
+menu-home=پەڕەی دەستپێکی ویکیپیدیا
+menu-savePage=پەڕەکە پاشەکەوت بکە
+menu-savedPages=پەڕە پاشەکەوتکراوەکان
+menu-history=مێژوو
+menu-back=بۆ دواوە
+menu-forward=بۆ بەرەوە
+menu-selectText=ھەڵبژاردنی دەق
+menu-about=سه‌باره‌ت
+menu-cancel=ھەڵیوەشێنەوە
+settings-language-label=زمان:
+settings-font-size-label=قەبارەی فۆنت
+settings-font-size-smaller=ورد
+settings-font-size-normal=ئاسایی
+settings-font-size-larger=گەورە
+about-page-label=سەبارەت بە ئێمە
+history-clear-all=مێژوو بسڕەوە
+history-title=مێژوو
+about-page-title=سه‌باره‌ت
+about-version=وەشان
+search-results-did-you-mean-label=مەبەستت ئەمە بوو:
+search-results-no-results=ھیچ ئەنجامێک نەدۆزرایەوە
+search-placeholder=بگەڕێ
View
1  assets/www/messages/messages-da.properties
@@ -68,3 +68,4 @@ search-results-no-results=Ingen resultater fundet
search-results-close=Luk søgeresultater
search-button=Søg Wikipedia efter denne tekst
search-placeholder=Søg
+do-fulltext-search=Vis flere resultater...
View
1  assets/www/messages/messages-de.properties
@@ -71,3 +71,4 @@ search-results-no-results=Es wurde keine Ergebnisse gefunden.
search-results-close=Bildschirm mit den Suchergebnissen schließen
search-button=In der Wikipedia nach diesem Text suchen
search-placeholder=Suche
+do-fulltext-search=Weitere Ergebnisse anzeigen …
View
1  assets/www/messages/messages-dsb.properties
@@ -69,3 +69,4 @@ search-results-no-results=Žedne wuslědki namakane
search-results-close=Pytańske wuslědki zacyniś
search-button=Wikipediju za toś tym tekstom pśepytaś
search-placeholder=Pytaś
+do-fulltext-search=Dalšne wuslědki pokazaś...
View
2  assets/www/messages/messages-en.properties
@@ -61,6 +61,8 @@ about-page-title = About
about-version = Version
about-copyright = This application is copyright (C) Wikimedia Foundation and contributing developers
about-license = This application is free software under the GNU General Public License. You are welcome to distribute and modify it under certain conditions. See http://www.gnu.org/licenses/old-licenses/gpl-2.0.html for details. The source code is available at https://github.com/Wikimedia/WikipediaMobile
+about-contributors = We would like to recognize the following names for their contributions to the product:
+about-credits = Wikipedia Mobile builds upon many Open Source works, including:
nearby-close = Close nearby pages screen
nearby-title = Nearby pages
app-description = Official Wikipedia App for Android. Wikipedia is the free encyclopedia containing more than 20 million articles in 280 languages, and is the most comprehensive and widely used reference work humans have ever compiled.\n\nFeatures: Save article to read later or offline, Search articles nearby, Share articles using Android "Share" function, Read article in a different language, Full screen search\n\nSend us your feedback on Twitter @WikimediaMobile.
View
29 assets/www/messages/messages-es.properties
@@ -1,5 +1,6 @@
# This file is distributed under the same license as the Wikipedia Mobile package.
#
+# Author: Armando-Martin
# Author: Bernardom
# Author: Fitoschido
# Author: Platonides
@@ -8,10 +9,14 @@
sitename=Wikipedia
spinner-loading=Cargando…
spinner-retrieving=Recuperando los contenidos desde $1...
+saved-pages-clear-all=Borrar todas las páginas guardadas
+saved-pages-close=Cerrar la pantalla de páginas guardadas
saved-pages-max-warning=Ha alcanzado el número máximo de páginas que podían almacenarse
page-saved=Almacenado $1
page-already-saved=$1 ya está almacenado
saved-page-remove-prompt=¿Sacar $1 de las páginas almacenadas?
+clear-all-history-prompt=¿Borrar historial?
+clear-all-saved-pages-prompt=¿Borrar todas las páginas guardadas?
saved-page-removed=$1 ha sido retirada
saved-pages-title=Páginas almacenadas
menu-home=Página principal de Wikipedia
@@ -19,6 +24,7 @@ menu-language=Leer en…
menu-savePage=Almacenar página
menu-savedPages=Páginas almacenadas
menu-history=Historial
+menu-back=Volver
menu-forward=Siguiente
menu-nearby=Cercano
menu-settings=Ajustes
@@ -26,6 +32,9 @@ menu-selectText=Seleccionar texto
menu-sharePage=Compartir la página
menu-about=Acerca de
menu-cancel=Cancelar
+menu-output=Salida
+menu-sources=Fuentes
+settings-close=Cerrar la pantalla de configuración
settings-title=Ajustes
settings-app-version-label=Versión de la aplicación:
settings-android-version-label=Versión de Android:
@@ -37,14 +46,30 @@ settings-font-size-desc=Establecer el tamaño de letra del artículo
settings-font-size-smaller=Pequeño
settings-font-size-normal=Normal
settings-font-size-larger=Grande
+langlinks-close=Cerrar la pantalla de lectura en otros idiomas
langlinks-title=Leer el artículo en…
error-not-available=Lo sentimos, esta página no está disponible
error-offline=La página no está almacenada y no se encuentra conectado
+error-offline-prompt=Vuelva a intentarlo cuando está conectado a una red.
error-saved-or-online=Puede abrir una página almacenada o conectarse y buscar
error-not-found=No existe ningún artículo con ese título.
error-not-found-reason=El artículo no existe o el título está mal escrito
error-search-again=Por favor, busque otro término.
+about-page-label=¿Quiénes somos?
+history-clear-all=Limpiar historial
+history-close=Cerrar la pantalla del historial
history-title=Historial
+about-close=Cerrar la pantalla
+about-page-title=Acerca de
about-version=Versión
-# Fuzzy
-app-description=Aplicación oficial de Wikipedia para Android. Wikipedia es la enciclopedia libre con más de 20 millones de artículos en 280 idiomas y es la obra de referencia más exhaustiva y ampliamente usada jamás recopilada por la humanidad.\n\nCaracterísticas: Guardar artículos para leerlos más tarde o sin conexión, Buscar artículos cercanos, Compartir artículos usando la función "Compartir" de Android, Leer artículo en otro idioma, Búsqueda a pantalla completa.
+about-copyright=Esta aplicación está bajo el copyright (C) de Fundación Wikimedia y los programadores que contribuyen a ella.
+about-license=Esta aplicación es software libre bajo la licencia pública General de GNU. Le invitamos a distribuirla y modificarla bajo ciertas condiciones. Consulte http://www.gnu.org/licenses/old-licenses/gpl-2.0.html para obtener más detalles. El código fuente está disponible en https://github.com/Wikimedia/WikipediaMobile
+nearby-close=Cerrar la pantalla de páginas vecinas
+nearby-title=Páginas vecinas
+app-description=Aplicación oficial de Wikipedia para Android. Wikipedia es la enciclopedia libre que contiene más de 20 millones de artículos en 280 idiomas y es la obra de referencia más exhaustiva y ampliamente usada jamás recopilada por la humanidad.\n\nCaracterísticas: Guardar artículos para leerlos más tarde o sin conexión, Buscar artículos cercanos, Compartir artículos usando la función "Compartir" de Android, Leer artículo en otro idioma, Búsqueda a pantalla completa.\n\nEnvíenos sus comentarios a Twitter en @WikimediaMobile.
+search-results-did-you-mean-label=Quizás quiso decir:
+search-results-no-results=No se encontraron resultados
+search-results-close=Limpiar los resultados de la búsqueda
+search-button=Buscar este texto en Wikipedia
+search-placeholder=Buscar
+do-fulltext-search=Mostrar más resultados...
View
1  assets/www/messages/messages-fr.properties
@@ -73,3 +73,4 @@ search-results-no-results=Aucun résultat trouvé
search-results-close=Fermer les résultats de recherche
search-button=Rechercher ce texte dans Wikipédia
search-placeholder=Rechercher
+do-fulltext-search=Afficher plus de résultats...
View
8 assets/www/messages/messages-fur.properties
@@ -15,12 +15,14 @@ menu-language=Cambie la lenghe
menu-savePage=Salve la pagjine
menu-savedPages=Pagjinis salvadis
menu-history=Storic
+menu-back=Indaûr
menu-forward=Indevant
menu-nearby=Dongje
menu-settings=Impuestazions
menu-selectText=Selezione il test
menu-sharePage=Condivît la pagjine
menu-about=Informazions
+menu-cancel=Scancele
settings-title=Impuestazions
settings-app-version-label=Version de aplicazion:
settings-android-version-label=Version di Android:
@@ -40,6 +42,12 @@ error-not-found=Nus displâs, no esist une pagjine cun chest non.
error-not-found-reason=Tu puedis vê sbaliât di scrivi il titul o la pagjine podarès no jessi stade creade.
error-search-again=Cîr un altri tiermin.
history-title=Storic
+about-page-title=Informazions
about-version=Version
about-copyright=Cheste aplicazion e je copyright (C) Wikimedia Foundation e i disvilupadôrs che a àn contribuît
about-license=Cheste aplicazion al è software libar sot de GNU General Public License. Ti invidìn a distribuî e modificâle sot di ciertis condizions. Cjale http://www.gnu.org/licenses/old-licenses/gpl-2.0.html pai detais. Il codiç sorzint al è disponibil lì di https://github.com/Wikimedia/WikipediaMobile
+search-results-did-you-mean-label=Forsit tu cirivis:
+search-results-no-results=Nissun risultât
+search-button=Cîr chest test te Vichipedie
+search-placeholder=Cîr
+do-fulltext-search=Mostre altris risultâts...
View
22 assets/www/messages/messages-gd.properties
@@ -11,8 +11,11 @@ saved-pages-max-warning=Shàbhail thu na tha ceadaichte dhut de dhuilleagan.
page-saved=Chaidh $1 a shàbhaladh.
page-already-saved=Chaidh $1 a shàbhaladh mu thràth.
saved-page-remove-prompt=A bheil thu airson $1 a thoirt air falbh o na shàbhail thu de dhuilleagan?
+clear-all-history-prompt=Am bu toigh leat an eachdraidh fhalamhadh?
+clear-all-saved-pages-prompt=A bheil thu airson gach duilleag a chaidh a shàbhaladh fhalamhachadh?
saved-page-removed=Chaidh $1 a thoirt air falbh.
saved-pages-title=Duilleagan a shàbhail thu
+menu-home=Duilleag mhòr na h-Uicipeid
menu-language=Leugh ann an...
menu-savePage=Sàbhail an duilleag
menu-savedPages=Duilleagan a shàbhail thu
@@ -25,6 +28,9 @@ menu-selectText=Tagh teacsa
menu-sharePage=Co-roinn an duilleag
menu-about=Mu
menu-cancel=Sguir dheth
+menu-output=Às-chur
+menu-sources=Tùsan
+settings-close=Dùin sgrìn nan roghainnean
settings-title=Roghainnean
settings-app-version-label=Tionndadh na h-aplacaid:
settings-android-version-label=An tionndadh de Android:
@@ -36,14 +42,30 @@ settings-font-size-desc=Suidhich meud a' chruth-chlò air an duilleag
settings-font-size-smaller=Beag
settings-font-size-normal=Àbhaisteach
settings-font-size-larger=Mòr
+langlinks-close=Dùin sgrìn na feadhainn a chaidh a leughadh ann an cànain eile
langlinks-title=Leugh an duilleag ann an...
error-not-available=Duilich, chan eil an duilleag seo ri fhaighinn.
error-offline=Tha thu far loidhne 's cha deach an duilleag seo a shàbhaladh roimhe.
+error-offline-prompt=Feuch ris a-rithist nuair a bhios ceangal agad ri lìonra.
error-saved-or-online='S urrainn dhut duilleag a shàbhail thu fhosgladh no a dhol air loidhne 's lorg a dhèanamh.
error-not-found=Duilich, chan eil duilleag ann air a bheil an t-ainm sin.
error-not-found-reason=Saoil na sgrìobh thu cearr an t-ainm no 's mathaid nach deach an duilleag a chruthachadh fhathast.
error-search-again=Nach lorg thu rud eile?
+about-page-label=Mu ar deidhinn
+history-clear-all=Falamhaich an eachdraidh
+history-close=Dùin sgrìn na h-eachdraidh
history-title=Eachdraidh
+about-close=Dùin an sgrìn a tha mu ar deidhinn
+about-page-title=Mu dheidhinn
about-version=Tionndadh
about-copyright='S ann aig (C) Fonndas Wikimedia 's na com-pàirtichean leasachaidh a tha còraichean air an aplacaid seo
about-license=Tha an aplacaid seo 'na bhathar-bog saor fo GNU General Public License. Tha fàilte romhad a sgaoileadh 's atharrachadh fo chumhaichean àraid. Faic http://www.gnu.org/licenses/old-licenses/gpl-2.0.html airson mion-fhiosrachadh. Gheibhear an còd tùsail aig https://github.com/Wikimedia/WikipediaMobile
+nearby-close=Dùin sgrìn nan duilleagan a tha am fagas
+nearby-title=Duilleagan a tha am fagas
+app-description=An aplacaid oifigeach airson Android. Tha an Uicipeid 'na leabhar-eòlais saor sa bheil barrachd air 20 millean artaigil ann an 280 cànan agus 's e an Uicipeid an tùs-fiosrachaidh as motha agus as cleachdte a chruthaich mac an duine a-riamh.\n\nFeartan: Gabhaidh artaigilean a shàbhaladh 's gus an leughadh uaireigin eile no far loidhne, faodaidh tu artaigilean a tha am fagas a leughadh, iad a cho-roinneadh leis an fheart "Co-roinn" aig Android, rudan a leughadh ann an diofar cànan agus lorg làn-sgrìn a dhèanamh\n\nInnis dhuinn dè do bheachd mu dheidhainn air Twitter @WikimediaMobile.
+search-results-did-you-mean-label=An e na leanas a bha fa-near dhut:
+search-results-no-results=Cha deach toradh a lorg
+search-results-close=Dùin toraidhean an luirg
+search-button=Lorg an teacsa seo air an Uicipeid
+search-placeholder=Lorg
+do-fulltext-search=Seall barrachd thoraidhean...
View
1  assets/www/messages/messages-gl.properties
@@ -68,3 +68,4 @@ search-results-no-results=Non se atopou ningún resultado
search-results-close=Pechar os resultados da procura
search-button=Procurar este texto na Wikipedia
search-placeholder=Procurar
+do-fulltext-search=Mostrar máis resultados...
View
2  assets/www/messages/messages-gu.properties
@@ -1,5 +1,6 @@
# This file is distributed under the same license as the Wikipedia Mobile package.
#
+# Author: Ankit
# Author: Rangilo Gujarati
sitename=વિકિપીડિયા
@@ -68,3 +69,4 @@ search-results-no-results=કોઈ પરિણામ નથી મળેલ.
search-results-close=શોધ પરિણામો બંધ કરો
search-button=આ ટેક્સ્ટ માટે વિકિપિડિયામાં શોધો
search-placeholder=શોધો
+do-fulltext-search=વધુ પરિણામો બતાવો...
View
1  assets/www/messages/messages-he.properties
@@ -70,3 +70,4 @@ search-results-no-results=לא נמצאו תוצאות
search-results-close=סגירת תוצאות חיפוש
search-button=חיפוש טקסט זה בוויקיפדיה
search-placeholder=חיפוש
+do-fulltext-search=הצגת תוצאות נוספות...
View
1  assets/www/messages/messages-hsb.properties