From a56c79d4bbbce9420f68dcacccfbcc2f20893094 Mon Sep 17 00:00:00 2001
From: "0w0@0w0.pw" <0w0@0w0.pw>
Date: Sat, 10 Feb 2018 23:02:21 +0800
Subject: [PATCH] Remove some translations Rename Privacy settings
---
.../java/com/hippo/ehviewer/Settings.java | 2 +-
.../hippo/ehviewer/ui/SettingsActivity.java | 4 +-
.../ehviewer/ui/fragment/AboutFragment.java | 17 +------
.../ehviewer/ui/fragment/PrivacyFragment.java | 47 +++++++++++++++++++
.../ehviewer/ui/fragment/SecFragment.java | 30 ------------
app/src/main/res/values-es/strings.xml | 14 +++---
app/src/main/res/values-zh-rCN/strings.xml | 16 +++----
app/src/main/res/values-zh-rHK/strings.xml | 16 +++----
app/src/main/res/values-zh-rTW/strings.xml | 16 +++----
app/src/main/res/values/strings.xml | 16 +++----
app/src/main/res/xml/about_settings.xml | 12 -----
app/src/main/res/xml/privacy_settings.xml | 30 ++++++++++++
app/src/main/res/xml/secure_settings.xml | 18 -------
app/src/main/res/xml/settings_headers.xml | 4 +-
14 files changed, 121 insertions(+), 121 deletions(-)
create mode 100644 app/src/main/java/com/hippo/ehviewer/ui/fragment/PrivacyFragment.java
delete mode 100644 app/src/main/java/com/hippo/ehviewer/ui/fragment/SecFragment.java
create mode 100644 app/src/main/res/xml/privacy_settings.xml
delete mode 100644 app/src/main/res/xml/secure_settings.xml
diff --git a/app/src/main/java/com/hippo/ehviewer/Settings.java b/app/src/main/java/com/hippo/ehviewer/Settings.java
index 77a6bc309..3ac143126 100755
--- a/app/src/main/java/com/hippo/ehviewer/Settings.java
+++ b/app/src/main/java/com/hippo/ehviewer/Settings.java
@@ -578,7 +578,7 @@ public class Settings {
/********************
****** Privacy and Security
********************/
- public static final String KEY_SEC_SECURITY = "enabled_secure";
+ public static final String KEY_SEC_SECURITY = "enable_secure";
public static final boolean VALUE_SEC_SECURITY = false;
public static boolean getEnabledSecurity() {
diff --git a/app/src/main/java/com/hippo/ehviewer/ui/SettingsActivity.java b/app/src/main/java/com/hippo/ehviewer/ui/SettingsActivity.java
index 312b0e6c8..f0001c803 100644
--- a/app/src/main/java/com/hippo/ehviewer/ui/SettingsActivity.java
+++ b/app/src/main/java/com/hippo/ehviewer/ui/SettingsActivity.java
@@ -38,7 +38,7 @@ import com.hippo.ehviewer.ui.fragment.AdvancedFragment;
import com.hippo.ehviewer.ui.fragment.DownloadFragment;
import com.hippo.ehviewer.ui.fragment.EhFragment;
import com.hippo.ehviewer.ui.fragment.ReadFragment;
-import com.hippo.ehviewer.ui.fragment.SecFragment;
+import com.hippo.ehviewer.ui.fragment.PrivacyFragment;
import com.hippo.util.DrawableManager;
import java.lang.reflect.Field;
@@ -54,7 +54,7 @@ public final class SettingsActivity extends EhPreferenceActivity {
DownloadFragment.class.getName(),
AdvancedFragment.class.getName(),
AboutFragment.class.getName(),
- SecFragment.class.getName(),
+ PrivacyFragment.class.getName(),
};
private class FakeLayoutInflater extends LayoutInflater {
diff --git a/app/src/main/java/com/hippo/ehviewer/ui/fragment/AboutFragment.java b/app/src/main/java/com/hippo/ehviewer/ui/fragment/AboutFragment.java
index 04226c2ca..c5f689a6f 100644
--- a/app/src/main/java/com/hippo/ehviewer/ui/fragment/AboutFragment.java
+++ b/app/src/main/java/com/hippo/ehviewer/ui/fragment/AboutFragment.java
@@ -33,8 +33,7 @@ import com.hippo.ehviewer.ui.CommonOperations;
import com.hippo.util.AppHelper;
public class AboutFragment extends PreferenceFragment
- implements Preference.OnPreferenceChangeListener,
- Preference.OnPreferenceClickListener {
+ implements Preference.OnPreferenceClickListener {
private static final String KEY_AUTHOR = "author";
private static final String KEY_DONATE = "donate";
@@ -46,7 +45,6 @@ public class AboutFragment extends PreferenceFragment
addPreferencesFromResource(R.xml.about_settings);
Preference author = findPreference(KEY_AUTHOR);
- Preference enableAnalytics = findPreference(Settings.KEY_ENABLE_ANALYTICS);
Preference donate = findPreference(KEY_DONATE);
Preference checkForUpdate = findPreference(KEY_CHECK_FOR_UPDATES);
@@ -56,21 +54,8 @@ public class AboutFragment extends PreferenceFragment
author.setOnPreferenceClickListener(this);
donate.setOnPreferenceClickListener(this);
checkForUpdate.setOnPreferenceClickListener(this);
-
- enableAnalytics.setOnPreferenceChangeListener(this);
}
- @Override
- public boolean onPreferenceChange(Preference preference, Object newValue) {
- String key = preference.getKey();
- if (Settings.KEY_ENABLE_ANALYTICS.equals(key)) {
- if (newValue instanceof Boolean && (Boolean) newValue) {
- Analytics.start(getActivity());
- }
- return true;
- }
- return true;
- }
@Override
public boolean onPreferenceClick(Preference preference) {
diff --git a/app/src/main/java/com/hippo/ehviewer/ui/fragment/PrivacyFragment.java b/app/src/main/java/com/hippo/ehviewer/ui/fragment/PrivacyFragment.java
new file mode 100644
index 000000000..6757946ad
--- /dev/null
+++ b/app/src/main/java/com/hippo/ehviewer/ui/fragment/PrivacyFragment.java
@@ -0,0 +1,47 @@
+package com.hippo.ehviewer.ui.fragment;
+
+import android.os.Bundle;
+import android.preference.Preference;
+import android.preference.PreferenceFragment;
+import android.text.TextUtils;
+
+import com.hippo.ehviewer.Analytics;
+import com.hippo.ehviewer.R;
+import com.hippo.ehviewer.Settings;
+
+/**
+ * Created by Mo10 on 2018/2/10.
+ */
+
+public class PrivacyFragment extends PreferenceFragment
+ implements Preference.OnPreferenceChangeListener {
+ private static final String KEY_PATTERN_PROTECTION = "pattern_protection";
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ addPreferencesFromResource(R.xml.privacy_settings);
+ Preference enableAnalytics = findPreference(Settings.KEY_ENABLE_ANALYTICS);
+
+ enableAnalytics.setOnPreferenceChangeListener(this);
+ }
+ @Override
+ public void onResume() {
+ super.onResume();
+ Preference patternProtection = findPreference(KEY_PATTERN_PROTECTION);
+ patternProtection.setSummary(TextUtils.isEmpty(Settings.getSecurity()) ?
+ R.string.settings_privacy_pattern_protection_not_set :
+ R.string.settings_privacy_pattern_protection_set);
+ }
+
+ @Override
+ public boolean onPreferenceChange(Preference preference, Object newValue) {
+ String key = preference.getKey();
+ if (Settings.KEY_ENABLE_ANALYTICS.equals(key)) {
+ if (newValue instanceof Boolean && (Boolean) newValue) {
+ Analytics.start(getActivity());
+ }
+ return true;
+ }
+ return true;
+ }
+}
diff --git a/app/src/main/java/com/hippo/ehviewer/ui/fragment/SecFragment.java b/app/src/main/java/com/hippo/ehviewer/ui/fragment/SecFragment.java
deleted file mode 100644
index 5e464e5d2..000000000
--- a/app/src/main/java/com/hippo/ehviewer/ui/fragment/SecFragment.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package com.hippo.ehviewer.ui.fragment;
-
-import android.os.Bundle;
-import android.preference.Preference;
-import android.preference.PreferenceFragment;
-import android.text.TextUtils;
-
-import com.hippo.ehviewer.R;
-import com.hippo.ehviewer.Settings;
-
-/**
- * Created by Mo10 on 2018/2/10.
- */
-
-public class SecFragment extends PreferenceFragment {
- private static final String KEY_PATTERN_PROTECTION = "pattern_protection";
- @Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- addPreferencesFromResource(R.xml.secure_settings);
- }
- @Override
- public void onResume() {
- super.onResume();
- Preference patternProtection = findPreference(KEY_PATTERN_PROTECTION);
- patternProtection.setSummary(TextUtils.isEmpty(Settings.getSecurity()) ?
- R.string.settings_advanced_pattern_protection_not_set :
- R.string.settings_advanced_pattern_protection_set);
- }
-}
diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml
index 0f5e784af..43fb20963 100644
--- a/app/src/main/res/values-es/strings.xml
+++ b/app/src/main/res/values-es/strings.xml
@@ -455,9 +455,9 @@
Borrar caché de memoria
Borrar vistas previas, galerías, información y caché de memoria
Tamaño del caché (archivos temporales)
- Protección por patrón
- No se ha configurado la protección por patrón
- La protección por patrón ha sido configurado
+ Protección por patrón
+ No se ha configurado la protección por patrón
+ La protección por patrón ha sido configurado
Exportar datos
Guardar datos en almacenamiento externo, tales como la lista de descarga, lista de búsqueda rápida, entre otros
Datos exportados en %s
@@ -479,8 +479,8 @@
Alipay: seven332$163.com
Tu donación me ayuda a desarrollar más y mejores aplicaciones.\n\nAlipay: seven332$163.com
Email copiado al portapapeles
- Habilitar analytics
- Acerca de analytics
+ Habilitar analytics
+ Acerca de analytics
Versión de compilación
Verificar actualizaciones
Canal de versiones de prueba
@@ -617,8 +617,6 @@
La contraseña no puede estar vacía
Ocurrió algo malo
H@H Downloader
- Privacidad y seguridad
- Captura de pantalla no permitida
- Si está habilitado, no puede tomar capturas de pantalla de la aplicación, y el sistema no mostrará el contenido de la aplicación en el selector de tareas
+ Privacidad
diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml
index e680c0778..c76e05e3d 100755
--- a/app/src/main/res/values-zh-rCN/strings.xml
+++ b/app/src/main/res/values-zh-rCN/strings.xml
@@ -480,9 +480,9 @@
清理内存缓存
清理缩略图、画廊信息的内存缓存
阅读缓存大小
- 图案保护
- 未设置图案保护
- 已设置图案保护
+ 图案保护
+ 未设置图案保护
+ 已设置图案保护
导出数据
保存数据至外置存储器,例如下载列表,快速搜索列表
已导出数据至 %s
@@ -504,8 +504,8 @@
支付宝:seven332$163.com
你的捐赠能帮助我开发更多更好的应用。\n\n支付宝:seven332$163.com
邮箱地址已复制到剪切板
- 启用数据统计
- 关于数据统计
+ 启用数据统计
+ 关于数据统计
版本号
检查更新
更新测试版
@@ -627,8 +627,8 @@
无法下载压缩包
压缩包
下载压缩包需要 H@H 客户端
- 隐私和安全
- 不允许屏幕抓取
- 启用后,将不能截取该应用的屏幕截图,同时,将不会在系统任务切换器中显示该应用的内容预览\n\n重新启动应用以生效此更改
+ 隐私
+ 不允许屏幕抓取
+ 启用后,将不能截取该应用的屏幕截图,同时,将不会在系统任务切换器中显示该应用的内容预览\n\n重新启动应用以生效此更改
diff --git a/app/src/main/res/values-zh-rHK/strings.xml b/app/src/main/res/values-zh-rHK/strings.xml
index b233e590a..d624587ff 100755
--- a/app/src/main/res/values-zh-rHK/strings.xml
+++ b/app/src/main/res/values-zh-rHK/strings.xml
@@ -480,9 +480,9 @@
清理內存緩存
清理縮略圖、畫廊信息的內存緩存
閲讀緩存大小
- 圖案保護
- 未設置圖案保護
- 已設置圖案保護
+ 圖案保護
+ 未設置圖案保護
+ 已設置圖案保護
導出數據
保存數據至外置存儲器,例如下載列表,快速搜索列表
已導出數據至 %s
@@ -504,8 +504,8 @@
支付寶:seven332$163.com
你的捐贈能幫助我開發更多更好的應用。\n\n支付寶:seven332$163.com
郵箱地址已複製到剪切板
- 啟用數據統計
- 關於數據統計
+ 啟用數據統計
+ 關於數據統計
版本號
檢查更新
更新測試版
@@ -627,8 +627,8 @@
無法下載壓縮包
壓縮包
下載壓縮包需要 H@H 客户端
- 隱私和安全
- 不允許荧幕抓取
- 啟用後,將不能截取該應用的螢幕截圖,同時,將不會在系統任務切換器中顯示該應用的內容預覽\n\n重新啟動應用以生效此更改
+ 隱私和安
+ 不允許荧幕抓取
+ 啟用後,將不能截取該應用的螢幕截圖,同時,將不會在系統任務切換器中顯示該應用的內容預覽\n\n重新啟動應用以生效此更改
diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml
index 9d6028fa8..e686f8771 100755
--- a/app/src/main/res/values-zh-rTW/strings.xml
+++ b/app/src/main/res/values-zh-rTW/strings.xml
@@ -480,9 +480,9 @@
清除記憶體快取
清除縮圖、圖庫詳細資料的記憶體快取
閱讀快取大小
- 繪圖解鎖
- 尚未設定繪圖解鎖
- 已設定繪圖解鎖
+ 繪圖解鎖
+ 尚未設定繪圖解鎖
+ 已設定繪圖解鎖
匯出檔案
儲存資料至外接儲存設備,例如下載列表,快速搜尋列表
已匯出資料至 %s
@@ -504,8 +504,8 @@
支付寶:seven332$163.com
你的贊助能幫助我開發更多更好的軟體。\n\n支付寶:seven332$163.com
已將電子信箱地址複製到剪貼簿
- 啟用資料統計
- 關於資料統計
+ 啟用資料統計
+ 關於資料統計
版本號碼
檢查更新
更新測試版
@@ -627,8 +627,8 @@
下載失敗
壓縮檔
下載壓縮檔需要 H@H 客戶端
- 隱私和安全
- 不允許荧幕抓取
- 啟用後,將不能截取該應用的螢幕截圖,同時,將不會在系統任務切換器中顯示該應用的內容預覽\n\n重新啟動應用以生效此更改
+ 隱私
+ 不允許荧幕抓取
+ 啟用後,將不能截取該應用的螢幕截圖,同時,將不會在系統任務切換器中顯示該應用的內容預覽\n\n重新啟動應用以生效此更改
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index d2715c942..91fab5bd8 100755
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -523,9 +523,9 @@
Clear memory cache
Clear thumb, gallery info memory cache
Read cache size
- Pattern protection
- Pattern protection has not been set
- Pattern protection has been set
+ Pattern protection
+ Pattern protection has not been set
+ Pattern protection has been set
Export data
Save data to external storage, such as download list, quick search list
Exported data to %s
@@ -549,8 +549,8 @@
Alipay: seven332$163.com
Your donation can help me develop more and better applications.\n\nAlipay: seven332$163.com
Email address copied to clipboard
- Enable analytics
- About analytics
+ Enable analytics
+ About analytics
Build version
Check for updates
Beta update channel
@@ -678,8 +678,8 @@
Failed to download archive
Archive
Need H@H client for archive download
- Privacy and Security
- Not Allowed Screen Capture
- If enabled, you cannot take screenshots of the app, and the system will not display app contents in the task switcher\n\nNeed to restart the app for this to take effect
+ Privacy
+ Not Allowed Screen Capture
+ If enabled, you cannot take screenshots of the app, and the system will not display app contents in the task switcher\n\nNeed to restart the app for this to take effect
diff --git a/app/src/main/res/xml/about_settings.xml b/app/src/main/res/xml/about_settings.xml
index fd17ade35..061936603 100644
--- a/app/src/main/res/xml/about_settings.xml
+++ b/app/src/main/res/xml/about_settings.xml
@@ -72,18 +72,6 @@
android:summary="@string/settings_about_beta_update_channel_summary"
android:defaultValue="@bool/beta"/>
-
-
-
-
diff --git a/app/src/main/res/xml/privacy_settings.xml b/app/src/main/res/xml/privacy_settings.xml
new file mode 100644
index 000000000..a06e131fd
--- /dev/null
+++ b/app/src/main/res/xml/privacy_settings.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/xml/secure_settings.xml b/app/src/main/res/xml/secure_settings.xml
deleted file mode 100644
index b256c56ff..000000000
--- a/app/src/main/res/xml/secure_settings.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
-
-
-
diff --git a/app/src/main/res/xml/settings_headers.xml b/app/src/main/res/xml/settings_headers.xml
index d3750e12c..d58f4aac5 100644
--- a/app/src/main/res/xml/settings_headers.xml
+++ b/app/src/main/res/xml/settings_headers.xml
@@ -34,8 +34,8 @@
android:icon="@drawable/v_download_primary_x24"/>