Skip to content

Commit 7d051f0

Browse files
author
tiann
committed
improved translation
1 parent 0361454 commit 7d051f0

File tree

2 files changed

+36
-56
lines changed

2 files changed

+36
-56
lines changed

VirtualApp/app/src/main/java/io/virtualapp/utils/Misc.java

+33-53
Original file line numberDiff line numberDiff line change
@@ -18,62 +18,42 @@
1818
*/
1919
public class Misc {
2020
public static void showDonate(Activity context) {
21-
AlertDialog alertDialog = new AlertDialog.Builder(context, R.style.Theme_AppCompat_DayNight_Dialog_Alert)
22-
.setTitle(R.string.donate_dialog_title)
23-
.setMessage(R.string.donate_dialog_content)
24-
.setPositiveButton(R.string.donate_dialog_yes, (dialog, which) -> {
25-
// show chooser dialog
21+
final String alipay = context.getResources().getString(R.string.donate_alipay);
22+
final String[] items = {alipay, "PayPal", "Bitcoin"};
2623

27-
final String alipay = context.getResources().getString(R.string.donate_alipay);
28-
final String[] items = {alipay, "Paypal", "Bitcoin"};
24+
AlertDialog chooseDialog = new AlertDialog.Builder(context, R.style.Theme_AppCompat_DayNight_Dialog_Alert)
25+
.setTitle(R.string.donate_choose_title)
26+
.setItems(items, (dialog1, which1) -> {
27+
dialog1.dismiss();
28+
if (which1 == 0) {
29+
if (!AlipayZeroSdk.hasInstalledAlipayClient(context)) {
30+
Toast.makeText(context, R.string.prompt_alipay_not_found, Toast.LENGTH_SHORT).show();
31+
return;
32+
}
33+
AlipayZeroSdk.startAlipayClient(context, "FKX016770URBZGZSR37U37");
34+
} else if (which1 == 1) {
35+
try {
36+
Intent t = new Intent(Intent.ACTION_VIEW);
37+
t.setData(Uri.parse("https://paypal.me/virtualxposed"));
38+
context.startActivity(t);
39+
} catch (Throwable ignored) {
40+
ignored.printStackTrace();
41+
}
42+
} else if (which1 == 2) {
43+
final String address = "39Wst8oL74pRP2vKPkPihH6RFQF4hWoBqU";
2944

30-
AlertDialog chooseDialog = new AlertDialog.Builder(context, R.style.Theme_AppCompat_DayNight_Dialog_Alert)
31-
.setTitle(R.string.donate_choose_title)
32-
.setItems(items, (dialog1, which1) -> {
33-
dialog1.dismiss();
34-
if (which1 == 0) {
35-
if (!AlipayZeroSdk.hasInstalledAlipayClient(context)) {
36-
Toast.makeText(context, R.string.prompt_alipay_not_found, Toast.LENGTH_SHORT).show();
37-
return;
38-
}
39-
AlipayZeroSdk.startAlipayClient(context, "FKX016770URBZGZSR37U37");
40-
} else if (which1 == 1) {
41-
try {
42-
Intent t = new Intent(Intent.ACTION_VIEW);
43-
t.setData(Uri.parse("https://paypal.me/virtualxposed"));
44-
context.startActivity(t);
45-
} catch (Throwable ignored) {
46-
ignored.printStackTrace();
47-
}
48-
} else if (which1 == 2) {
49-
final String address = "39Wst8oL74pRP2vKPkPihH6RFQF4hWoBqU";
50-
51-
try {
52-
ClipboardManager clipboardManager = (ClipboardManager) context.getSystemService(Context.CLIPBOARD_SERVICE);
53-
if (clipboardManager != null) {
54-
clipboardManager.setPrimaryClip(ClipData.newPlainText(null, address));
55-
}
56-
Toast.makeText(context, context.getResources().getString(R.string.donate_bitconins_tips), Toast.LENGTH_SHORT).show();
57-
} catch (Throwable ignored) {
58-
ignored.printStackTrace();
59-
}
60-
}
61-
})
62-
.create();
63-
chooseDialog.show();
45+
try {
46+
ClipboardManager clipboardManager = (ClipboardManager) context.getSystemService(Context.CLIPBOARD_SERVICE);
47+
if (clipboardManager != null) {
48+
clipboardManager.setPrimaryClip(ClipData.newPlainText(null, address));
49+
}
50+
Toast.makeText(context, context.getResources().getString(R.string.donate_bitconins_tips), Toast.LENGTH_SHORT).show();
51+
} catch (Throwable ignored) {
52+
ignored.printStackTrace();
53+
}
54+
}
6455
})
65-
.setNegativeButton(R.string.donate_dialog_no, ((dialog, which) -> {
66-
Intent intent = new Intent();
67-
intent.setAction(Intent.ACTION_VIEW);
68-
intent.addCategory(Intent.CATEGORY_BROWSABLE);
69-
intent.setData(Uri.parse("https://github.com/android-hacker/VirtualXposed"));
70-
context.startActivity(intent);
71-
}))
7256
.create();
73-
try {
74-
alertDialog.show();
75-
} catch (Throwable ignored) {
76-
// BadTokenException.
77-
}
57+
chooseDialog.show();
7858
}
7959
}

VirtualApp/app/src/main/res/values/strings.xml

+3-3
Original file line numberDiff line numberDiff line change
@@ -166,11 +166,11 @@
166166
<string name="install_file_manager_tips">File Manager is supported by Amaze File Manager, download(about 3M) and install it now?</string>
167167
<string name="settings_permission_manage_text">Permission Manager</string>
168168
<string name="install_permission_manager_tips">Permission Manager is implemented by XPrivacyLua, download(about 1.7M) and install it now?</string>
169-
<string name="exp_tips">reached a milestone. Many users may don\'t know it, let me introduce you today. \n\n
169+
<string name="exp_tips">A long time ago, I revealed the information about EXposed. After a period of feedback and adjustment, EXposed has reached a milestone. Many users may don\'t know it, let me introduce you today. \n\n
170170

171-
Like the VirtualXposed I created earlier, EXposed is also an app that makes you use Xposed module without root, unlock the bootloader. they both have their own advantages, and EXposed will be much better in terms of performance and stability due to running directly in the native system; while VirtualXposed is based on VitualApp, which is more natural. . EXposed was born a month, and its stability has surpassed the development of VirtualXposed for nearly a year. \n\n
171+
Like the VirtualXposed I created earlier, EXposed is also an app that makes you use Xposed module without root, unlock the bootloader. they both have their own advantages, and EXposed will be much better in terms of performance and stability due to running directly in the native system; while VirtualXposed is based on VitualApp, which is like Parallel Space. EXposed was born a month, and its stability has surpassed VirtualXposed which has been developed for nearly a year. \n\n
172172

173-
Currently, EXposed has been put on the app store and renamed to Tai Chi. You can try it out.</string>
173+
Currently, EXposed has been put on the app store and renamed to Tai Chi. You can try it out :)</string>
174174
<string name="advance_settings_enable_launcher_summary">When enabled, You can set VirtualXposed be the Launcher of system</string>
175175
<string name="advance_settings_enable_launcher">Enable Launcher</string>
176176
<string name="exp_introduce_title">An easy way to use Xposed</string>

0 commit comments

Comments
 (0)