Add excluded languages

This commit is contained in:
seven332 committed 2016-03-15 14:26:30 +08:00
1 parent bf16b13ca9
commit a3ce06c07f
13 files changed
+782 -6

No files matched your search

+6
View File
@@ -69,6 +69,12 @@
android:configChanges="screenSize|uiMode"
android:theme="@style/AppTheme"/>
<activity
android:name="com.hippo.ehviewer.ui.ExcludedLanguagesActivity"
android:configChanges="screenSize|uiMode"
android:theme="@style/AppTheme.NoActionBar"
android:label="@string/excluded_languages"/>
<activity
android:name="com.hippo.ehviewer.ui.DirPickerActivity"
android:configChanges="screenSize|uiMode"
@@ -53,7 +53,8 @@ public class Settings {
private static EhConfig loadEhConfig() {
EhConfig ehConfig= new EhConfig();
// TODO
ehConfig.excludedLanguages = getExcludedLanguages();
ehConfig.setDirty();
return ehConfig;
}
@@ -211,6 +212,19 @@ public class Settings {
return getBoolean(KEY_SHOW_JPN_TITLE, DEFAULT_SHOW_JPN_TITLE);
}
public static final String KEY_EXCLUDED_LANGUAGES = "excluded_languages";
private static final String DEFAULT_EXCLUDED_LANGUAGES = null;
public static String getExcludedLanguages() {
return getString(KEY_EXCLUDED_LANGUAGES, DEFAULT_EXCLUDED_LANGUAGES);
}
public static void putExcludedLanguages(String value) {
sEhConfig.excludedLanguages = value;
sEhConfig.setDirty();
putString(KEY_EXCLUDED_LANGUAGES, value);
}
/********************
****** Read
********************/
@@ -0,0 +1,402 @@
/*
* Copyright 2016 Hippo Seven
*
* Licensed 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.
*/
package com.hippo.ehviewer.ui;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.hippo.easyrecyclerview.EasyRecyclerView;
import com.hippo.ehviewer.R;
import com.hippo.ehviewer.Settings;
import com.hippo.ehviewer.client.EhConfig;
import com.hippo.rippleold.RippleSalon;
import com.hippo.widget.SensitiveCheckBox;
import com.hippo.yorozuya.ViewUtils;
public class ExcludedLanguagesActivity extends ToolbarActivity
implements View.OnClickListener {
private static final String KEY_SELECTIONS = "selections";
private static final int ROW_COUNT = 17;
private static final int[] LANGUAGE_STR_IDS = {
R.string.language_japanese,
R.string.language_english,
R.string.language_chinese,
R.string.language_dutch,
R.string.language_french,
R.string.language_german,
R.string.language_hungarian,
R.string.language_italian,
R.string.language_korean,
R.string.language_polish,
R.string.language_portuguese,
R.string.language_russian,
R.string.language_spanish,
R.string.language_thai,
R.string.language_vietnamese,
R.string.language_na,
R.string.language_other
};
private static final String[] LANGUAGES = {
EhConfig.JAPANESE_TRANSLATED,
EhConfig.JAPANESE_REWRITE,
EhConfig.ENGLISH_ORIGINAL,
EhConfig.ENGLISH_TRANSLATED,
EhConfig.ENGLISH_REWRITE,
EhConfig.CHINESE_ORIGINAL,
EhConfig.CHINESE_TRANSLATED,
EhConfig.CHINESE_REWRITE,
EhConfig.DUTCH_ORIGINAL,
EhConfig.DUTCH_TRANSLATED,
EhConfig.DUTCH_REWRITE,
EhConfig.FRENCH_ORIGINAL,
EhConfig.FRENCH_TRANSLATED,
EhConfig.FRENCH_REWRITE,
EhConfig.GERMAN_ORIGINAL,
EhConfig.GERMAN_TRANSLATED,
EhConfig.GERMAN_REWRITE,
EhConfig.HUNGARIAN_ORIGINAL,
EhConfig.HUNGARIAN_TRANSLATED,
EhConfig.HUNGARIAN_REWRITE,
EhConfig.ITALIAN_ORIGINAL,
EhConfig.ITALIAN_TRANSLATED,
EhConfig.ITALIAN_REWRITE,
EhConfig.KOREAN_ORIGINAL,
EhConfig.KOREAN_TRANSLATED,
EhConfig.KOREAN_REWRITE,
EhConfig.POLISH_ORIGINAL,
EhConfig.POLISH_TRANSLATED,
EhConfig.POLISH_REWRITE,
EhConfig.PORTUGUESE_ORIGINAL,
EhConfig.PORTUGUESE_TRANSLATED,
EhConfig.PORTUGUESE_REWRITE,
EhConfig.RUSSIAN_ORIGINAL,
EhConfig.RUSSIAN_TRANSLATED,
EhConfig.RUSSIAN_REWRITE,
EhConfig.SPANISH_ORIGINAL,
EhConfig.SPANISH_TRANSLATED,
EhConfig.SPANISH_REWRITE,
EhConfig.THAI_ORIGINAL,
EhConfig.THAI_TRANSLATED,
EhConfig.THAI_REWRITE,
EhConfig.VIETNAMESE_ORIGINAL,
EhConfig.VIETNAMESE_TRANSLATED,
EhConfig.VIETNAMESE_REWRITE,
EhConfig.NA_ORIGINAL,
EhConfig.NA_TRANSLATED,
EhConfig.NA_REWRITE,
EhConfig.OTHER_ORIGINAL,
EhConfig.OTHER_TRANSLATED,
EhConfig.OTHER_REWRITE};
private final boolean[][] mSelections = new boolean[ROW_COUNT][3];
/*---------------
Whole life cycle
---------------*/
@Nullable
private View mCancel;
@Nullable
private View mOk;
@Nullable
private View mSelectAll;
@Nullable
private View mDeselectAll;
@Nullable
private View mInvertSelection;
@Nullable
private EasyRecyclerView mRecyclerView;
@Nullable
private LanguageAdapter mAdapter;
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.scene_excluded_languages);
setNavigationIcon(R.drawable.v_arrow_left_dark_x24);
if (null == savedInstanceState) {
onInit();
} else {
onRestore(savedInstanceState);
}
mCancel = ViewUtils.$$(this, R.id.cancel);
mOk = ViewUtils.$$(this, R.id.ok);
mSelectAll = ViewUtils.$$(this, R.id.select_all);
mDeselectAll = ViewUtils.$$(this, R.id.deselect_all);
mInvertSelection = ViewUtils.$$(this, R.id.invert_selection);
mRecyclerView = (EasyRecyclerView) ViewUtils.$$(this, R.id.recycler_view);
mRecyclerView.setHasFixedSize(true);
mRecyclerView.setClipToPadding(false);
mAdapter = new LanguageAdapter();
mRecyclerView.setAdapter(mAdapter);
mRecyclerView.setLayoutManager(new LinearLayoutManager(this));
mCancel.setOnClickListener(this);
mOk.setOnClickListener(this);
mSelectAll.setOnClickListener(this);
mDeselectAll.setOnClickListener(this);
mInvertSelection.setOnClickListener(this);
RippleSalon.addRipple(mCancel, false);
RippleSalon.addRipple(mOk, false);
RippleSalon.addRipple(mSelectAll, false);
RippleSalon.addRipple(mDeselectAll, false);
RippleSalon.addRipple(mInvertSelection, false);
}
private boolean isDecimal(String str) {
int length = str.length();
// "" is not decimal
if (length <= 0) {
return false;
}
for (int i = 0; i < length; i++) {
char ch = str.charAt(i);
if (ch < '0' || ch > '9') {
return false;
}
}
return true;
}
private void onInit() {
String excludedLanguages = Settings.getExcludedLanguages();
if (null == excludedLanguages) {
return;
}
String[] languages = excludedLanguages.split("x");
int iLength = languages.length;
int jLength = LANGUAGES.length;
for (int i = 0, j = 0; i < iLength; i++) {
String language = languages[i];
if (!isDecimal(language)) {
continue;
}
for (; j < jLength; j++) {
String pattern = LANGUAGES[j];
if (pattern.equals(language)) {
// Get it
int row = (j + 1) / 3;
int column = (j + 1) % 3;
mSelections[row][column] = true;
break;
}
}
}
}
private long saveSelectionsToLong() {
boolean[][] selections = mSelections;
long value = 0;
for (int i = 0; i < ROW_COUNT; i++) {
for (int j = 0; j < 3; j++) {
if (selections[i][j]) {
value |= 1 << (i * 3 + j);
}
}
}
return value;
}
private void restoreSelectionsFromLong(long value) {
boolean[][] selections = mSelections;
for (int i = 0; i < ROW_COUNT; i++) {
for (int j = 0; j < 3; j++) {
selections[i][j] = 0 != ((value >>> (i * 3 + j)) & 1);
}
}
}
private void onRestore(@NonNull Bundle savedInstanceState) {
restoreSelectionsFromLong(savedInstanceState.getLong(KEY_SELECTIONS));
}
@Override
protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
outState.putLong(KEY_SELECTIONS, saveSelectionsToLong());
}
@Override
protected void onDestroy() {
super.onDestroy();
mCancel = null;
mOk = null;
mSelectAll = null;
mDeselectAll = null;
mInvertSelection = null;
mRecyclerView = null;
mAdapter = null;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
finish();
return true;
default:
return super.onOptionsItemSelected(item);
}
}
@Override
public void onClick(View v) {
if (null == mAdapter) {
return;
}
if (v == mCancel) {
finish();
} else if (v == mOk) {
StringBuilder sb = new StringBuilder();
int i = -1;
boolean first = true;
for (boolean[] selections : mSelections) {
for (boolean b : selections) {
i++;
if (i == 0) {
continue;
}
if (b) {
if (!first) {
sb.append("x");
} else {
first = false;
}
sb.append(LANGUAGES[i - 1]);
}
}
}
String excludedLanguages = sb.toString();
Settings.putExcludedLanguages(excludedLanguages);
finish();
} else if (v == mSelectAll) {
for (boolean[] selections : mSelections) {
int length = selections.length;
for (int i = 0; i < length; i++) {
selections[i] = true;
}
}
mAdapter.notifyDataSetChanged();
} else if (v == mDeselectAll) {
for (boolean[] selections : mSelections) {
int length = selections.length;
for (int i = 0; i < length; i++) {
selections[i] = false;
}
}
mAdapter.notifyDataSetChanged();
} else if (v == mInvertSelection) {
for (boolean[] selections : mSelections) {
int length = selections.length;
for (int i = 0; i < length; i++) {
selections[i] = !selections[i];
}
}
mAdapter.notifyDataSetChanged();
}
}
private class LanguageHolder extends RecyclerView.ViewHolder
implements SensitiveCheckBox.OnCheckedChangeListener {
public TextView language;
public SensitiveCheckBox original;
public SensitiveCheckBox translated;
public SensitiveCheckBox rewrite;
public LanguageHolder(View itemView) {
super(itemView);
ViewGroup viewGroup = (ViewGroup) itemView;
language = (TextView) viewGroup.getChildAt(0);
original = (SensitiveCheckBox) viewGroup.getChildAt(1);
translated = (SensitiveCheckBox) viewGroup.getChildAt(2);
rewrite = (SensitiveCheckBox) viewGroup.getChildAt(3);
original.setOnCheckedChangeListener(this);
translated.setOnCheckedChangeListener(this);
rewrite.setOnCheckedChangeListener(this);
}
@Override
public void onCheckedChanged(SensitiveCheckBox view, boolean isChecked, boolean fromUser) {
if (fromUser) {
int row = getAdapterPosition();
if (row < 0) {
return;
}
int column;
if (view == original) {
column = 0;
} else if (view == translated) {
column = 1;
} else {
column = 2;
}
mSelections[row][column] = !mSelections[row][column];
}
}
}
private class LanguageAdapter extends RecyclerView.Adapter<LanguageHolder> {
@Override
public LanguageHolder onCreateViewHolder(ViewGroup parent, int viewType) {
return new LanguageHolder(getLayoutInflater().inflate(R.layout.item_excluded_languages, parent, false));
}
@Override
public void onBindViewHolder(LanguageHolder holder, int position) {
holder.language.setText(LANGUAGE_STR_IDS[position]);
if (position == 0) {
holder.original.setVisibility(View.INVISIBLE);
} else {
holder.original.setVisibility(View.VISIBLE);
}
boolean[] selections = mSelections[position];
holder.original.setChecked(selections[0]);
holder.translated.setChecked(selections[1]);
holder.rewrite.setChecked(selections[2]);
}
@Override
public int getItemCount() {
return ROW_COUNT;
}
}
}
@@ -16,6 +16,7 @@
package com.hippo.ehviewer.ui.fragment;
import android.content.Intent;
import android.os.Bundle;
import android.preference.Preference;
import android.preference.PreferenceFragment;
@@ -23,9 +24,12 @@ import android.preference.PreferenceFragment;
import com.hippo.ehviewer.Constants;
import com.hippo.ehviewer.R;
import com.hippo.ehviewer.Settings;
import com.hippo.ehviewer.ui.ExcludedLanguagesActivity;
import com.hippo.yorozuya.Messenger;
public class EhFragment extends PreferenceFragment implements Preference.OnPreferenceChangeListener {
public class EhFragment extends PreferenceFragment
implements Preference.OnPreferenceChangeListener,
Preference.OnPreferenceClickListener {
@Override
public void onCreate(Bundle savedInstanceState) {
@@ -33,8 +37,11 @@ public class EhFragment extends PreferenceFragment implements Preference.OnPrefe
addPreferencesFromResource(R.xml.eh_settings);
Preference listMode = findPreference(Settings.KEY_LIST_MODE);
Preference excludedLanguages = findPreference(Settings.KEY_EXCLUDED_LANGUAGES);
listMode.setOnPreferenceChangeListener(this);
excludedLanguages.setOnPreferenceClickListener(this);
}
@Override
@@ -46,4 +53,15 @@ public class EhFragment extends PreferenceFragment implements Preference.OnPrefe
}
return true;
}
@Override
public boolean onPreferenceClick(Preference preference) {
String key = preference.getKey();
if (Settings.KEY_EXCLUDED_LANGUAGES.equals(key)) {
Intent intent = new Intent(getActivity(), ExcludedLanguagesActivity.class);
startActivity(intent);
return true;
}
return false;
}
}
@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright 2016 Hippo Seven
~
~ Licensed 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.
-->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textColor="@color/primary_text_light"/>
<com.hippo.widget.SensitiveCheckBox
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"/>
<com.hippo.widget.SensitiveCheckBox
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"/>
<com.hippo.widget.SensitiveCheckBox
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"/>
</LinearLayout>
@@ -0,0 +1,162 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright 2016 Hippo Seven
~
~ Licensed 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.
-->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingLeft="@dimen/keyline_margin"
android:paddingRight="@dimen/keyline_margin"
android:paddingTop="8dp">
<TextView
android:id="@+id/cancel"
style="@style/ButtonInCard.Accent"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="@android:string/cancel"/>
<View
android:layout_width="1dp"
android:layout_height="match_parent"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:background="@color/divider"/>
<TextView
android:id="@+id/ok"
style="@style/ButtonInCard.Accent"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="@android:string/ok"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingLeft="@dimen/keyline_margin"
android:paddingRight="@dimen/keyline_margin"
android:paddingTop="8dp">
<TextView
android:id="@+id/select_all"
style="@style/ButtonInCard"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="@string/select_all"/>
<View
android:layout_width="1dp"
android:layout_height="match_parent"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:background="@color/divider"/>
<TextView
android:id="@+id/deselect_all"
style="@style/ButtonInCard"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="@string/deselect_all"/>
<View
android:layout_width="1dp"
android:layout_height="match_parent"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:background="@color/divider"/>
<TextView
android:id="@+id/invert_selection"
style="@style/ButtonInCard"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="@string/invert_selection"/>
</LinearLayout>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingLeft="@dimen/keyline_margin"
android:paddingRight="@dimen/keyline_margin"
android:paddingTop="8dp"
android:paddingBottom="8dp">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/language"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/original"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/translated"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/rewrite"/>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginLeft="@dimen/keyline_margin"
android:layout_marginRight="@dimen/keyline_margin"
android:background="@color/divider"/>
<com.hippo.easyrecyclerview.EasyRecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:paddingLeft="@dimen/keyline_margin"
android:paddingRight="@dimen/keyline_margin"
android:paddingBottom="8dp"/>
</LinearLayout>
@@ -284,6 +284,8 @@
<string name="settings_eh_list_mode">列表模式</string>
<string name="settings_eh_list_mode_detail">详情</string>
<string name="settings_eh_list_mode_thumb">缩略图</string>
<string name="settings_eh_excluded_languages">排除语言</string>
<string name="settings_eh_excluded_languages_summary">在主页与搜索中隐藏指定语言的画廊</string>
<string name="settings_eh_show_jpn_title">显示日文标题</string>
<string name="settings_eh_show_jpn_title_summary_on">尝试显示日文标题。这会使获取画廊列表花费更多时间</string>
<string name="settings_eh_show_jpn_title_summary_off">显示默认标题。一般是英文标题</string>
@@ -346,6 +348,34 @@
<string name="settings_about_check_for_updates">检查更新</string>
<string name="settings_about_beta_update_channel">更新测试版</string>
<!-- ExcludedLanguagesScene -->
<string name="excluded_languages">排除语言</string>
<string name="select_all">全选</string>
<string name="deselect_all">全取消</string>
<string name="invert_selection">反选</string>
<string name="language">语言</string>
<string name="original">原作</string>
<string name="translated">翻译</string>
<string name="rewrite">改写</string>
<string name="language_japanese">日语</string>
<string name="language_english">英语</string>
<string name="language_chinese">汉语</string>
<string name="language_dutch">荷兰语</string>
<string name="language_french">法语</string>
<string name="language_german">德语</string>
<string name="language_hungarian">匈牙利语</string>
<string name="language_italian">意大利语</string>
<string name="language_korean">韩语</string>
<string name="language_polish">波兰语</string>
<string name="language_portuguese">葡萄牙语</string>
<string name="language_russian">俄语</string>
<string name="language_spanish">西班牙语</string>
<string name="language_thai">泰语</string>
<string name="language_vietnamese">越南语</string>
<string name="language_na">N/A</string>
<string name="language_other">其他</string>
<!-- License -->
<string name="license">开源许可</string>
<!-- Dir Picker-->
@@ -284,6 +284,8 @@
<string name="settings_eh_list_mode">列表模式</string>
<string name="settings_eh_list_mode_detail">詳情</string>
<string name="settings_eh_list_mode_thumb">縮略圖</string>
<string name="settings_eh_excluded_languages">排除語言</string>
<string name="settings_eh_excluded_languages_summary">在主頁與搜索中隱藏指定語言的畫廊</string>
<string name="settings_eh_show_jpn_title">顯示日文標題</string>
<string name="settings_eh_show_jpn_title_summary_on">嘗試顯示日文標題。這會使獲取畫廊列表花費更多時間</string>
<string name="settings_eh_show_jpn_title_summary_off">顯示默認標題。一般是英文標題</string>
@@ -346,6 +348,34 @@
<string name="settings_about_check_for_updates">檢查更新</string>
<string name="settings_about_beta_update_channel">更新測試版</string>
<!-- ExcludedLanguagesScene -->
<string name="excluded_languages">排除語言</string>
<string name="select_all">全選</string>
<string name="deselect_all">全取消</string>
<string name="invert_selection">反選</string>
<string name="language">語言</string>
<string name="original">原作</string>
<string name="translated">翻譯</string>
<string name="rewrite">改寫</string>
<string name="language_japanese">日語</string>
<string name="language_english">英語</string>
<string name="language_chinese">漢語</string>
<string name="language_dutch">荷蘭語</string>
<string name="language_french">法語</string>
<string name="language_german">德語</string>
<string name="language_hungarian">匈牙利語</string>
<string name="language_italian">意大利語</string>
<string name="language_korean">韓語</string>
<string name="language_polish">波蘭語</string>
<string name="language_portuguese">葡萄牙語</string>
<string name="language_russian">俄語</string>
<string name="language_spanish">西班牙語</string>
<string name="language_thai">泰語</string>
<string name="language_vietnamese">越南語</string>
<string name="language_na">N/A</string>
<string name="language_other">其他</string>
<!-- License -->
<string name="license">開源許可</string>
<!-- Dir Picker-->
@@ -284,6 +284,8 @@
<string name="settings_eh_list_mode">列表模式</string>
<string name="settings_eh_list_mode_detail">詳情</string>
<string name="settings_eh_list_mode_thumb">縮圖</string>
<string name="settings_eh_excluded_languages">排除語言</string>
<string name="settings_eh_excluded_languages_summary">在主頁與搜尋中隱藏指定語言的畫廊</string>
<string name="settings_eh_show_jpn_title">顯示日文標題</string>
<string name="settings_eh_show_jpn_title_summary_on">嘗試顯示日文標題。這會使獲取畫廊列表花費更多時間</string>
<string name="settings_eh_show_jpn_title_summary_off">顯示預設標題。一般是英文標題</string>
@@ -346,6 +348,34 @@
<string name="settings_about_check_for_updates">檢查更新</string>
<string name="settings_about_beta_update_channel">更新測試版</string>
<!-- ExcludedLanguagesScene -->
<string name="excluded_languages">排除語言</string>
<string name="select_all">全選</string>
<string name="deselect_all">全取消</string>
<string name="invert_selection">反選</string>
<string name="language">語言</string>
<string name="original">原作</string>
<string name="translated">翻譯</string>
<string name="rewrite">改寫</string>
<string name="language_japanese">日語</string>
<string name="language_english">英語</string>
<string name="language_chinese">漢語</string>
<string name="language_dutch">荷蘭語</string>
<string name="language_french">法語</string>
<string name="language_german">德語</string>
<string name="language_hungarian">匈牙利語</string>
<string name="language_italian">義大利語</string>
<string name="language_korean">韓語</string>
<string name="language_polish">波蘭語</string>
<string name="language_portuguese">葡萄牙語</string>
<string name="language_russian">俄語</string>
<string name="language_spanish">西班牙語</string>
<string name="language_thai">泰語</string>
<string name="language_vietnamese">越南語</string>
<string name="language_na">N/A</string>
<string name="language_other">其他</string>
<!-- License -->
<string name="license">開源許可</string>
<!-- Dir Picker-->
+4 -4
View File
@@ -34,21 +34,21 @@
<item>@string/star_5</item>
</string-array>
<string-array name="multi_thread_download_entries">
<string-array name="multi_thread_download_entries" translatable="false">
<item>1</item>
<item>3</item>
<item>5</item>
<item>7</item>
</string-array>
<string-array name="multi_thread_download_entry_values">
<string-array name="multi_thread_download_entry_values" translatable="false">
<item>1</item>
<item>3</item>
<item>5</item>
<item>7</item>
</string-array>
<string-array name="preload_image_entries">
<string-array name="preload_image_entries" translatable="false">
<item>3</item>
<item>5</item>
<item>7</item>
@@ -57,7 +57,7 @@
<item>17</item>
</string-array>
<string-array name="preload_image_entry_values">
<string-array name="preload_image_entry_values" translatable="false">
<item>3</item>
<item>5</item>
<item>7</item>
+30
View File
@@ -323,6 +323,8 @@
<string name="settings_eh_list_mode">List mode</string>
<string name="settings_eh_list_mode_detail">Detail</string>
<string name="settings_eh_list_mode_thumb">Thumb</string>
<string name="settings_eh_excluded_languages">Excluded languages</string>
<string name="settings_eh_excluded_languages_summary">Hide galleries in certain languages from the gallery list and searches</string>
<string name="settings_eh_show_jpn_title">Show Japanese title</string>
<string name="settings_eh_show_jpn_title_summary_on">Try to show Japanese title. It takes more time to get gallery list</string>
<string name="settings_eh_show_jpn_title_summary_off">Show default title. It is usually English title</string>
@@ -386,6 +388,34 @@
<string name="settings_about_check_for_updates">Check for updates</string>
<string name="settings_about_beta_update_channel">Beta update channel</string>
<!-- ExcludedLanguagesScene -->
<string name="excluded_languages">Excluded languages</string>
<string name="select_all">All</string>
<string name="deselect_all">None</string>
<string name="invert_selection">Invert</string>
<string name="language">Language</string>
<string name="original">Original</string>
<string name="translated">Translated</string>
<string name="rewrite">Rewrite</string>
<string name="language_japanese">Japanese</string>
<string name="language_english">English</string>
<string name="language_chinese">Chinese</string>
<string name="language_dutch">Dutch</string>
<string name="language_french">French</string>
<string name="language_german">German</string>
<string name="language_hungarian">Hungarian</string>
<string name="language_italian">Italian</string>
<string name="language_korean">Korean</string>
<string name="language_polish">Polish</string>
<string name="language_portuguese">Portuguese</string>
<string name="language_russian">Russian</string>
<string name="language_spanish">Spanish</string>
<string name="language_thai">Thai</string>
<string name="language_vietnamese">Vietnamese</string>
<string name="language_na">N/A</string>
<string name="language_other">Other</string>
<!-- License -->
<string name="license">License</string>
<!-- Dir Picker-->
+4
View File
@@ -102,6 +102,10 @@
<item name="android:textColor">?attr/colorPrimary</item>
</style>
<style name="ButtonInCard.Accent">
<item name="android:textColor">?attr/colorAccent</item>
</style>
<style name="Slider">
<item name="thickness">2dp</item>
<item name="radius">6dp</item>
+5
View File
@@ -27,6 +27,11 @@
app:entryValues="@array/list_mode_entry_values"
android:defaultValue="0"/>
<Preference
android:key="excluded_languages"
android:title="@string/settings_eh_excluded_languages"
android:summary="@string/settings_eh_excluded_languages_summary"/>
<com.hippo.preference.SwitchPreference
android:key="show_jpn_title"
android:title="@string/settings_eh_show_jpn_title"