Skip to content

Commit ef803a3

Browse files
committed
put some missing strings in the properties file
1 parent 533102c commit ef803a3

File tree

6 files changed

+30
-40
lines changed

6 files changed

+30
-40
lines changed

mode/languages/mode.properties

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ android_editor.error.cannot_create_sketch_properties = Error While creating sket
7171
android_keystore.warn.cannot_create_folders.title = Folders, folders, folders
7272
android_keystore.warn.cannot_create_folders.body = Could not create the necessary folders to build.\nPerhaps you have some file permissions to sort out?
7373
android_keystore.warn.cannot_find_keystore.title = Well, this is unexpected...
74-
android_keystore.warn.cannot_find_keystore.body = The keystore was succesfully cretated but cannot be found.\nPerhaps was it deleted accidentally?
74+
android_keystore.warn.cannot_find_keystore.body = The keystore was succesfully created but cannot be found.\nPerhaps was it deleted accidentally?
7575
android_keystore.error.cannot_create_keystore = The keystore could not be created, due to the following error:
7676

7777
# ---------------------------------------
@@ -99,7 +99,7 @@ android_mode.status.building_project = Building Android project...
9999
android_mode.status.project_build_failed = Build failed.
100100

101101
# ---------------------------------------
102-
# Android Preprocesor
102+
# Android Preprocessor
103103

104104
android_preprocessor.error.cannot_parse_size = More about the size() command on Android can be\nfound here: http://wiki.processing.org/w/Android
105105
android_preprocessor.error.cannot_parse_size_exception = Could not parse the size() command.
@@ -190,9 +190,27 @@ android_avd.error.cannot_load_avd_title = Could not load the AVD
190190
android_avd.error.cannot_load_avd_body = This could mean that the Android tools need to be updated,<br>or that the Processing AVD should be deleted (it will<br>automatically re-created the next time you run Processing).<br><br>You can use the avdmanager command line tool to create AVDs manually and list the current AVDs.
191191

192192

193-
android_avd.error.sdk_wrong_install_title = The SDK is not properly instaled
193+
android_avd.error.sdk_wrong_install_title = The SDK is not properly installed
194194
android_avd.error.sdk_wrong_install_body = Please re-read the installation instructions for Processing<br>found in <a href=\"%s\">this online tutorial</a>.
195195

196+
# ---------------------------------------
197+
# Devices
198+
199+
android_devices.error.cannot_get_device_list = Received unfamiliar output from \u201Cadb devices\u201D.\nThe device list may have errors.
200+
201+
android_devices.error.no_permissions_title = Found devices with no permissions!
202+
203+
android_devices.error.no_permissions_body = Make sure that the device has USB debugging enabled, and that the required USB drivers are installed on Windows, and that permissions are properly configured on Linux. Also, on Linux, don't set the USB configuration to \"charging\" while debugging.<br><br> Read this guide on <a href=\"%s\">running apps on hardware device</a> for more details.
204+
205+
private static final String DEVICE_PERMISSIONS_URL =
206+
"https://developer.android.com/studio/run/device.html";
207+
208+
private static final String DEVICE_PERMISSIONS_TITLE =
209+
"";
210+
211+
private static final String DEVICE_PERMISSIONS_MESSAGE =
212+
213+
196214

197215
# ---------------------------------------
198216
# Keystore manager

mode/src/processing/mode/android/AndroidEditor.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
package processing.mode.android;
2424

2525
import processing.app.Base;
26-
import processing.app.Language;
2726
import processing.app.Mode;
2827
import processing.app.Platform;
2928
import processing.app.Settings;

mode/src/processing/mode/android/AndroidRunner.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424

2525
import java.io.IOException;
2626
import java.io.PrintStream;
27-
import java.security.PublicKey;
2827
import java.util.Iterator;
2928
import java.util.List;
3029
import java.util.Map;
@@ -49,10 +48,6 @@
4948
public class AndroidRunner implements DeviceListener {
5049
private static final String DEFAULT_PACKAGE_NAME = "processing.android";
5150

52-
private static final String CANCEL_WAITING_FOR_DEVICE = "No, on second thought, I'm giving up on waiting for that device to show up.";
53-
private static final String CANNOT_PARSE_LINE = "Can't parse this exception line:";
54-
private static final String UNKNOWN_EXCEPTION = "Unknown exception";
55-
5651
AndroidBuild build;
5752
RunnerListener listener;
5853

@@ -168,7 +163,8 @@ public VirtualMachine connectVirtualMachine(int port) throws IOException {
168163
private AttachingConnector getConnector() {
169164
// Eclipse gives an error in the following line (org.eclipse cannot be resolved), but just ignore it.
170165
// The mode runs and compiles fine.
171-
VirtualMachineManager vmManager = org.eclipse.jdi.Bootstrap.virtualMachineManager();
166+
// VirtualMachineManager vmManager = org.eclipse.jdi.Bootstrap.virtualMachineManager();
167+
VirtualMachineManager vmManager = com.sun.jdi.Bootstrap.virtualMachineManager();
172168
for (Connector connector : vmManager.attachingConnectors()) {
173169
if ("com.sun.jdi.SocketAttach".equals(connector.name())) {
174170
return (AttachingConnector) connector;

mode/src/processing/mode/android/AndroidSDK.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,6 @@ class AndroidSDK {
8686
private static final String SDK_LICENSE_URL =
8787
"https://developer.android.com/studio/terms.html";
8888

89-
private static final String REMOVING_KEYSTORE_FILE = "Removing expired debug.keystore file.";
90-
private static final String CANNOT_REMOVE_KEYSTORE_FILE = "Could not remove the expired debug.keystore file.";
91-
private static final String REMOVE_FILE_PROMPT = "Please remove the file ";
92-
private static final String INVALID_DATE = "The date '";
93-
private static final String REPORT_BUG_PROMPT = "Please report this as a bug so we can fix it.";
94-
9589
private static final int NO_ERROR = 0;
9690
private static final int SKIP_ENV_SDK = 1;
9791
private static final int MISSING_SDK = 2;

mode/src/processing/mode/android/Commander.java

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,7 @@ public class Commander implements RunnerListener {
5555
static final String targetArg_FRAGMENT = "fragment";
5656
static final String targetArg_WALLPAPER = "wallpaper";
5757
static final String targetArg_WATCHFACE = "watchface";
58-
static final String targetArg_VR = "vr";
59-
static final String targetArg_CARDBOARD = "cardboard";
60-
static final String targetArg_DAYDREAM = "daydream";
58+
static final String targetArg_VR = "vr";
6159
static final String targetArg_AR = "ar";
6260
static final String sketchArg = "--sketch=";
6361
static final String forceArg = "--force";
@@ -136,10 +134,8 @@ private void parseArgs(String[] args) {
136134
appComponent = AndroidBuild.WALLPAPER;
137135
} else if (compStr.equals(targetArg_WATCHFACE)) {
138136
appComponent = AndroidBuild.WATCHFACE;
139-
} else if (compStr.equals(targetArg_VR) || compStr.equals(targetArg_CARDBOARD)) {
140-
appComponent = AndroidBuild.VR_CARDBOARD;
141-
} else if (compStr.equals(targetArg_DAYDREAM)) {
142-
appComponent = AndroidBuild.VR_DAYDREAM;
137+
} else if (compStr.equals(targetArg_VR)) {
138+
appComponent = AndroidBuild.VR;
143139
} else if (compStr.equals(targetArg_AR)) {
144140
appComponent = AndroidBuild.AR;
145141
}

mode/src/processing/mode/android/Devices.java

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -41,23 +41,9 @@
4141
*
4242
*/
4343
class Devices {
44-
private static final String ADB_DEVICES_ERROR =
45-
"Received unfamiliar output from “adb devices”.\n" +
46-
"The device list may have errors.";
47-
4844
private static final String DEVICE_PERMISSIONS_URL =
4945
"https://developer.android.com/studio/run/device.html";
5046

51-
private static final String DEVICE_PERMISSIONS_TITLE =
52-
"Found devices with no permissions!";
53-
54-
private static final String DEVICE_PERMISSIONS_MESSAGE =
55-
"Make sure that the device has USB debugging enabled, and that the required " +
56-
"USB drivers are installed on Windows, and that permissions are properly configured on Linux. " +
57-
"Also, on Linux, don't set the USB configuration to \"charging\" while debugging.<br><br>" +
58-
"Read this guide on <a href=\"" + DEVICE_PERMISSIONS_URL + "\">runnings apps on hardware device</a> " +
59-
"for more details.";
60-
6147
private static final Devices INSTANCE = new Devices();
6248

6349
private static final String BT_DEBUG_PORT = "4444";
@@ -389,8 +375,8 @@ public List<String> list() {
389375
// might read "List of devices attached"
390376
final String stdout = result.getStdout();
391377
if (!(stdout.contains("List of devices") || stdout.trim().length() == 0)) {
392-
System.err.println(ADB_DEVICES_ERROR);
393-
System.err.println("Output was “" + stdout + "”");
378+
System.err.println(AndroidMode.getTextString("android_devices.error.cannot_get_device_list"));
379+
System.err.println(stdout);
394380
return Collections.emptyList();
395381
}
396382

@@ -402,7 +388,8 @@ public List<String> list() {
402388
if (fields[1].equals("device")) {
403389
devices.add(fields[0]);
404390
} else if (fields[1].contains("no permissions") && showPermissionsErrorMessage) {
405-
AndroidUtil.showMessage(DEVICE_PERMISSIONS_TITLE, DEVICE_PERMISSIONS_MESSAGE);
391+
AndroidUtil.showMessage(AndroidMode.getTextString("android_devices.error.no_permissions_title"),
392+
AndroidMode.getTextString("android_devices.error.no_permissions_body", DEVICE_PERMISSIONS_URL));
406393
showPermissionsErrorMessage = false;
407394
}
408395
}

0 commit comments

Comments
 (0)