mirror of
https://github.com/gsantner/dandelion
synced 2024-11-25 13:52:08 +01:00
Fix #151; URL handling; language; dia.so
* Language switcher in settings (#151) * Handle dia.so links * Improve security at internal browser decision
This commit is contained in:
parent
47184fe878
commit
ac2327d2f2
17 changed files with 208 additions and 69 deletions
|
@ -6,12 +6,8 @@ android {
|
||||||
buildToolsVersion "24.0.3"
|
buildToolsVersion "24.0.3"
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.github.dfa.diaspora_android"
|
|
||||||
minSdkVersion 17
|
minSdkVersion 17
|
||||||
targetSdkVersion 24
|
targetSdkVersion 24
|
||||||
versionCode 13
|
|
||||||
versionName "0.2.3"
|
|
||||||
setProperty("archivesBaseName", "dandelion__${versionName}__")
|
|
||||||
|
|
||||||
vectorDrawables.useSupportLibrary = true
|
vectorDrawables.useSupportLibrary = true
|
||||||
}
|
}
|
||||||
|
@ -26,6 +22,9 @@ android {
|
||||||
flavorDandelion {
|
flavorDandelion {
|
||||||
applicationId "com.github.dfa.diaspora_android"
|
applicationId "com.github.dfa.diaspora_android"
|
||||||
manifestPlaceholders = [appName: "dandelion*"]
|
manifestPlaceholders = [appName: "dandelion*"]
|
||||||
|
versionCode 13
|
||||||
|
versionName "0.2.3"
|
||||||
|
setProperty("archivesBaseName", "dandelion__${versionName}__")
|
||||||
}
|
}
|
||||||
|
|
||||||
flavorSecondlion {
|
flavorSecondlion {
|
||||||
|
|
|
@ -28,20 +28,21 @@
|
||||||
<activity
|
<activity
|
||||||
android:name="com.github.dfa.diaspora_android.activity.SettingsActivity"
|
android:name="com.github.dfa.diaspora_android.activity.SettingsActivity"
|
||||||
android:launchMode="singleInstance"
|
android:launchMode="singleInstance"
|
||||||
android:configChanges="keyboardHidden|orientation|screenSize"
|
android:configChanges="keyboardHidden|locale|orientation|screenSize"
|
||||||
android:theme="@style/DiasporaLight.NoActionBar"
|
android:theme="@style/DiasporaLight.NoActionBar"
|
||||||
android:label="@string/settings" />
|
android:label="@string/settings" />
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name="com.github.dfa.diaspora_android.activity.AboutActivity"
|
android:name="com.github.dfa.diaspora_android.activity.AboutActivity"
|
||||||
android:label="@string/about_activity__title_about_app"
|
android:label="@string/about_activity__title_about_app"
|
||||||
|
android:configChanges="locale"
|
||||||
android:theme="@style/DiasporaLight.NoActionBar"/>
|
android:theme="@style/DiasporaLight.NoActionBar"/>
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name="com.github.dfa.diaspora_android.activity.MainActivity"
|
android:name="com.github.dfa.diaspora_android.activity.MainActivity"
|
||||||
android:launchMode="singleTop"
|
android:launchMode="singleTop"
|
||||||
android:windowSoftInputMode="adjustResize"
|
android:windowSoftInputMode="adjustResize"
|
||||||
android:configChanges="keyboardHidden|orientation|screenSize"
|
android:configChanges="keyboardHidden|locale|orientation|screenSize"
|
||||||
android:theme="@style/DiasporaLight.NoActionBar"
|
android:theme="@style/DiasporaLight.NoActionBar"
|
||||||
android:label="${appName}">
|
android:label="${appName}">
|
||||||
|
|
||||||
|
@ -69,6 +70,10 @@
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
<category android:name="android.intent.category.BROWSABLE" />
|
<category android:name="android.intent.category.BROWSABLE" />
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Additional allowed services -->
|
||||||
|
<data android:host="dia.so" android:scheme="https" />
|
||||||
|
|
||||||
<!--@@@ PODLIST START-->
|
<!--@@@ PODLIST START-->
|
||||||
<data android:host="joindiaspora.com" android:scheme="https" />
|
<data android:host="joindiaspora.com" android:scheme="https" />
|
||||||
<data android:host="diasporaaqmjixh5.onion" android:scheme="http" />
|
<data android:host="diasporaaqmjixh5.onion" android:scheme="http" />
|
||||||
|
|
|
@ -152,8 +152,8 @@ public class SettingsActivity extends ThemedActivity implements SharedPreference
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String s) {
|
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {
|
||||||
if (s.equals(getString(R.string.pref_key__screen_rotation))) {
|
if (key.equals(getString(R.string.pref_key__screen_rotation))) {
|
||||||
this.updateScreenRotation();
|
this.updateScreenRotation();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,6 +21,7 @@ package com.github.dfa.diaspora_android.ui.theme;
|
||||||
import android.annotation.TargetApi;
|
import android.annotation.TargetApi;
|
||||||
import android.app.ActivityManager;
|
import android.app.ActivityManager;
|
||||||
import android.content.pm.ActivityInfo;
|
import android.content.pm.ActivityInfo;
|
||||||
|
import android.content.res.Configuration;
|
||||||
import android.graphics.drawable.BitmapDrawable;
|
import android.graphics.drawable.BitmapDrawable;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.support.v7.app.AppCompatActivity;
|
import android.support.v7.app.AppCompatActivity;
|
||||||
|
@ -28,6 +29,9 @@ import android.support.v7.app.AppCompatActivity;
|
||||||
import com.github.dfa.diaspora_android.App;
|
import com.github.dfa.diaspora_android.App;
|
||||||
import com.github.dfa.diaspora_android.R;
|
import com.github.dfa.diaspora_android.R;
|
||||||
import com.github.dfa.diaspora_android.util.AppSettings;
|
import com.github.dfa.diaspora_android.util.AppSettings;
|
||||||
|
import com.github.dfa.diaspora_android.util.Helpers;
|
||||||
|
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Activity that supports color schemes
|
* Activity that supports color schemes
|
||||||
|
@ -44,6 +48,7 @@ public abstract class ThemedActivity extends AppCompatActivity {
|
||||||
protected void onResume() {
|
protected void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
ThemeHelper.getInstance(getAppSettings());
|
ThemeHelper.getInstance(getAppSettings());
|
||||||
|
updateLanguage();
|
||||||
updateStatusBarColor();
|
updateStatusBarColor();
|
||||||
updateRecentAppColor();
|
updateRecentAppColor();
|
||||||
applyColorToViews();
|
applyColorToViews();
|
||||||
|
@ -91,4 +96,12 @@ public abstract class ThemedActivity extends AppCompatActivity {
|
||||||
}
|
}
|
||||||
setRequestedOrientation(rotation);
|
setRequestedOrientation(rotation);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void updateLanguage() {
|
||||||
|
AppSettings appSettings = getAppSettings();
|
||||||
|
Locale locale = Helpers.getLocaleByAndroidCode(appSettings.getLanguage());
|
||||||
|
Configuration config = appSettings.getApplicationContext().getResources().getConfiguration();
|
||||||
|
config.locale = locale != null ? locale : Locale.getDefault();
|
||||||
|
appSettings.getApplicationContext().getResources().updateConfiguration(config, null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -430,6 +430,14 @@ public class AppSettings {
|
||||||
setLong(prefPod, R.string.pref_key__podprofile_last_stream_position, timestamp);
|
setLong(prefPod, R.string.pref_key__podprofile_last_stream_position, timestamp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setLanguage(String value){
|
||||||
|
setString(prefApp, R.string.pref_key__language, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLanguage(){
|
||||||
|
return getString(prefApp, R.string.pref_key__language, "");
|
||||||
|
}
|
||||||
|
|
||||||
public void setPrimaryColorSettings(int base, int shade) {
|
public void setPrimaryColorSettings(int base, int shade) {
|
||||||
setInt(prefApp, R.string.pref_key__primary_color_base, base);
|
setInt(prefApp, R.string.pref_key__primary_color_base, base);
|
||||||
setInt(prefApp, R.string.pref_key__primary_color_shade, shade);
|
setInt(prefApp, R.string.pref_key__primary_color_shade, shade);
|
||||||
|
|
|
@ -27,8 +27,10 @@ import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Environment;
|
import android.os.Environment;
|
||||||
import android.support.design.widget.Snackbar;
|
import android.support.design.widget.Snackbar;
|
||||||
|
import android.text.TextUtils;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
|
||||||
|
import com.github.dfa.diaspora_android.App;
|
||||||
import com.github.dfa.diaspora_android.R;
|
import com.github.dfa.diaspora_android.R;
|
||||||
import com.github.dfa.diaspora_android.web.WebHelper;
|
import com.github.dfa.diaspora_android.web.WebHelper;
|
||||||
|
|
||||||
|
@ -84,6 +86,16 @@ public class Helpers {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Locale getLocaleByAndroidCode(String code) {
|
||||||
|
if (!TextUtils.isEmpty(code)) {
|
||||||
|
return code.contains("-r")
|
||||||
|
? new Locale(code.substring(0, 2), code.substring(4, 6)) // de-rAT
|
||||||
|
: new Locale(code); // de
|
||||||
|
}
|
||||||
|
return Locale.getDefault();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public static String readTextfileFromRawRessource(Context context, int rawRessourceId, String linePrefix, String linePostfix) {
|
public static String readTextfileFromRawRessource(Context context, int rawRessourceId, String linePrefix, String linePostfix) {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
String line;
|
String line;
|
||||||
|
|
|
@ -26,10 +26,11 @@ import android.webkit.WebViewClient;
|
||||||
|
|
||||||
import com.github.dfa.diaspora_android.App;
|
import com.github.dfa.diaspora_android.App;
|
||||||
import com.github.dfa.diaspora_android.activity.MainActivity;
|
import com.github.dfa.diaspora_android.activity.MainActivity;
|
||||||
|
import com.github.dfa.diaspora_android.data.DiasporaPodList;
|
||||||
|
|
||||||
public class CustomWebViewClient extends WebViewClient {
|
public class CustomWebViewClient extends WebViewClient {
|
||||||
private final App app;
|
private final App app;
|
||||||
private String lastLoadUrl ="";
|
private String lastLoadUrl = "";
|
||||||
|
|
||||||
public CustomWebViewClient(App app, WebView webView) {
|
public CustomWebViewClient(App app, WebView webView) {
|
||||||
this.app = app;
|
this.app = app;
|
||||||
|
@ -37,13 +38,18 @@ public class CustomWebViewClient extends WebViewClient {
|
||||||
|
|
||||||
//Open non-diaspora links in customtab/external browser
|
//Open non-diaspora links in customtab/external browser
|
||||||
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
||||||
if (!url.contains(app.getSettings().getPod().getPodUrl().getHost())) {
|
String host = app.getSettings().getPod().getPodUrl().getHost();
|
||||||
|
|
||||||
|
if (url.startsWith("https://" + host)
|
||||||
|
|| url.startsWith("http://" + host)
|
||||||
|
|| url.startsWith("https://dia.so/")) {
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
Intent i = new Intent(MainActivity.ACTION_OPEN_EXTERNAL_URL);
|
Intent i = new Intent(MainActivity.ACTION_OPEN_EXTERNAL_URL);
|
||||||
i.putExtra(MainActivity.EXTRA_URL, url);
|
i.putExtra(MainActivity.EXTRA_URL, url);
|
||||||
LocalBroadcastManager.getInstance(app.getApplicationContext()).sendBroadcast(i);
|
LocalBroadcastManager.getInstance(app.getApplicationContext()).sendBroadcast(i);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onPageFinished(WebView view, String url) {
|
public void onPageFinished(WebView view, String url) {
|
||||||
|
@ -51,14 +57,17 @@ public class CustomWebViewClient extends WebViewClient {
|
||||||
|
|
||||||
final CookieManager cookieManager = app.getCookieManager();
|
final CookieManager cookieManager = app.getCookieManager();
|
||||||
String cookies = cookieManager.getCookie(url);
|
String cookies = cookieManager.getCookie(url);
|
||||||
//Log.d(this, "All the cookies in a string:" + cookies);
|
DiasporaPodList.DiasporaPod pod = app.getSettings().getPod();
|
||||||
|
|
||||||
if (cookies != null) {
|
if (cookies != null) {
|
||||||
cookieManager.setCookie(url, cookies);
|
cookieManager.setCookie(url, cookies);
|
||||||
cookieManager.setCookie(app.getSettings().getPod().getPodUrl().getBaseUrl(), cookies);
|
if (pod != null && pod.getPodUrl() != null) {
|
||||||
//for (String c : cookies.split(";")) {
|
cookieManager.setCookie(pod.getPodUrl().getBaseUrl(), cookies);
|
||||||
|
cookieManager.setCookie(".dia.so", "pod=" + pod.getPodUrl().getHost());
|
||||||
|
}
|
||||||
|
for (String c : cookies.split(";")) {
|
||||||
//AppLog.d(this, "Cookie: " + c.split("=")[0] + " Value:" + c.split("=")[1]);
|
//AppLog.d(this, "Cookie: " + c.split("=")[0] + " Value:" + c.split("=")[1]);
|
||||||
//}
|
}
|
||||||
//new ProfileFetchTask(app).execute();
|
//new ProfileFetchTask(app).execute();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
4
app/src/main/res/drawable/ic_language_black_48px.xml
Normal file
4
app/src/main/res/drawable/ic_language_black_48px.xml
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
<vector android:height="24dp" android:viewportHeight="24.0"
|
||||||
|
android:viewportWidth="24.0" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<path android:fillColor="#000000" android:pathData="M11.99,2C6.47,2 2,6.48 2,12s4.47,10 9.99,10C17.52,22 22,17.52 22,12S17.52,2 11.99,2zM18.92,8h-2.95c-0.32,-1.25 -0.78,-2.45 -1.38,-3.56 1.84,0.63 3.37,1.91 4.33,3.56zM12,4.04c0.83,1.2 1.48,2.53 1.91,3.96h-3.82c0.43,-1.43 1.08,-2.76 1.91,-3.96zM4.26,14C4.1,13.36 4,12.69 4,12s0.1,-1.36 0.26,-2h3.38c-0.08,0.66 -0.14,1.32 -0.14,2 0,0.68 0.06,1.34 0.14,2L4.26,14zM5.08,16h2.95c0.32,1.25 0.78,2.45 1.38,3.56 -1.84,-0.63 -3.37,-1.9 -4.33,-3.56zM8.03,8L5.08,8c0.96,-1.66 2.49,-2.93 4.33,-3.56C8.81,5.55 8.35,6.75 8.03,8zM12,19.96c-0.83,-1.2 -1.48,-2.53 -1.91,-3.96h3.82c-0.43,1.43 -1.08,2.76 -1.91,3.96zM14.34,14L9.66,14c-0.09,-0.66 -0.16,-1.32 -0.16,-2 0,-0.68 0.07,-1.35 0.16,-2h4.68c0.09,0.65 0.16,1.32 0.16,2 0,0.68 -0.07,1.34 -0.16,2zM14.59,19.56c0.6,-1.11 1.06,-2.31 1.38,-3.56h2.95c-0.96,1.65 -2.49,2.93 -4.33,3.56zM16.36,14c0.08,-0.66 0.14,-1.32 0.14,-2 0,-0.68 -0.06,-1.34 -0.14,-2h3.38c0.16,0.64 0.26,1.31 0.26,2s-0.1,1.36 -0.26,2h-3.38z"/>
|
||||||
|
</vector>
|
5
app/src/main/res/values-da/strings-about.xml
Normal file
5
app/src/main/res/values-da/strings-about.xml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--Generated by crowdin.com-->
|
||||||
|
<resources>
|
||||||
|
<!-- License & help (large amount of text) -->
|
||||||
|
</resources>
|
25
app/src/main/res/values-da/strings-preferences.xml
Normal file
25
app/src/main/res/values-da/strings-preferences.xml
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--Generated by crowdin.com-->
|
||||||
|
<resources>
|
||||||
|
<!-- Key Names (Untranslatable) -->
|
||||||
|
<!-- Themes -->
|
||||||
|
<!-- Operability -->
|
||||||
|
<!-- Navigiation Slider -->
|
||||||
|
<!-- PodProfile -->
|
||||||
|
<!-- More -->
|
||||||
|
<!-- Category Titles -->
|
||||||
|
<!-- Visuals -->
|
||||||
|
<!-- Navigiation Slider -->
|
||||||
|
<!-- Themes -->
|
||||||
|
<!-- Notifications dropdown -->
|
||||||
|
<!-- Font size -->
|
||||||
|
<!-- prefix 's' is needed to make this a string array. Otherwise ListPreference would crash -->
|
||||||
|
<!-- Load images -->
|
||||||
|
<!-- Screen rotation -->
|
||||||
|
<!-- Proxy -->
|
||||||
|
<!-- Chrome custom tabs -->
|
||||||
|
<!-- Diaspora Settings -->
|
||||||
|
<!-- More -->
|
||||||
|
<!-- Recently added - Please move to right section-->
|
||||||
|
<!-- Sorry -->
|
||||||
|
</resources>
|
12
app/src/main/res/values-da/strings.xml
Normal file
12
app/src/main/res/values-da/strings.xml
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--Generated by crowdin.com-->
|
||||||
|
<resources>
|
||||||
|
<!-- App - AppName specific -->
|
||||||
|
<!-- Application -->
|
||||||
|
<!-- Common Words -->
|
||||||
|
<!-- Notifications dropdown menu -->
|
||||||
|
<!-- Pod Activity -->
|
||||||
|
<!-- Drawer, Menu, Toolbar, ContextMenu -->
|
||||||
|
<!-- More from MainActivity -->
|
||||||
|
<!-- Permissions -->
|
||||||
|
</resources>
|
|
@ -18,8 +18,8 @@
|
||||||
<!-- Navigiation Slider -->
|
<!-- Navigiation Slider -->
|
||||||
<string name="pref_title__sub_nav_slider">Navigations Slider</string>
|
<string name="pref_title__sub_nav_slider">Navigations Slider</string>
|
||||||
<string name="pref_desc__sub_nav_slider">Konfiguration der Sichtbarkeit von Einträgen im Navigation-Slider</string>
|
<string name="pref_desc__sub_nav_slider">Konfiguration der Sichtbarkeit von Einträgen im Navigation-Slider</string>
|
||||||
<string name="pref_cat__visibility_nav_items__user">Nutzer</string>
|
<string name="pref_cat__visibility_nav_items__user">Benutzer</string>
|
||||||
<string name="pref_cat__visibility_nav_items__general">Generelles</string>
|
<string name="pref_cat__visibility_nav_items__general">Allgemeines</string>
|
||||||
<string name="pref_cat__visibility_nav_items__admin">Administrator</string>
|
<string name="pref_cat__visibility_nav_items__admin">Administrator</string>
|
||||||
<!-- Themes -->
|
<!-- Themes -->
|
||||||
<string name="pref_title__themes">Farbschema</string>
|
<string name="pref_title__themes">Farbschema</string>
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
<string name="share__take_screenshot">Bildschirmfoto speichern</string>
|
<string name="share__take_screenshot">Bildschirmfoto speichern</string>
|
||||||
<string name="share__toast_saved_image_to_location">Speichere Bild als</string>
|
<string name="share__toast_saved_image_to_location">Speichere Bild als</string>
|
||||||
<string name="share__toast_screenshot">Bildschirmfoto wird gespeichert unter:</string>
|
<string name="share__toast_screenshot">Bildschirmfoto wird gespeichert unter:</string>
|
||||||
<string name="share__toast_link_address_copied">Linkadresse kopiert …</string>
|
<string name="share__toast_link_address_copied">Link-Adresse kopiert …</string>
|
||||||
<string name="new_post">Neuer Beitrag</string>
|
<string name="new_post">Neuer Beitrag</string>
|
||||||
<string name="action_go_to_top">Nach oben scrollen</string>
|
<string name="action_go_to_top">Nach oben scrollen</string>
|
||||||
<string name="action_search_by_tags_or_persons">Suche nach Tags oder Personen…</string>
|
<string name="action_search_by_tags_or_persons">Suche nach Tags oder Personen…</string>
|
||||||
|
@ -52,12 +52,12 @@
|
||||||
<string name="search_alert_tag">nach Tags</string>
|
<string name="search_alert_tag">nach Tags</string>
|
||||||
<string name="search_alert_people">nach Personen</string>
|
<string name="search_alert_people">nach Personen</string>
|
||||||
<string name="search_alert_bypeople_validate_needsomedata">Füge einen Namen ein.</string>
|
<string name="search_alert_bypeople_validate_needsomedata">Füge einen Namen ein.</string>
|
||||||
<string name="context_menu_share_link">Linkadresse teilen</string>
|
<string name="context_menu_share_link">Link-Adresse teilen</string>
|
||||||
<string name="context_menu_save_image">Bild speichern</string>
|
<string name="context_menu_save_image">Bild speichern</string>
|
||||||
<string name="context_menu_share_image">Bild teilen</string>
|
<string name="context_menu_share_image">Bild teilen</string>
|
||||||
<string name="context_menu_open_external_browser">In externem Browser öffnen…</string>
|
<string name="context_menu_open_external_browser">In externem Browser öffnen…</string>
|
||||||
<string name="context_menu_copy_link">Linkadresse kopieren</string>
|
<string name="context_menu_copy_link">Link-Adresse kopieren</string>
|
||||||
<string name="context_menu_copy_image_link">Bildadresse in die Zwischenablage kopieren</string>
|
<string name="context_menu_copy_image_link">Bild-Adresse kopieren</string>
|
||||||
<!-- More from MainActivity -->
|
<!-- More from MainActivity -->
|
||||||
<string name="unable_to_load_image">Konnte Bild nicht laden…</string>
|
<string name="unable_to_load_image">Konnte Bild nicht laden…</string>
|
||||||
<!-- Permissions -->
|
<!-- Permissions -->
|
||||||
|
|
|
@ -1,4 +1,34 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
|
<string-array name="pref_arrkeys__language">
|
||||||
|
<item/>
|
||||||
|
<item>en</item>
|
||||||
|
<item>de</item>
|
||||||
|
<item>es</item>
|
||||||
|
<item>fr</item>
|
||||||
|
<item>ru</item>
|
||||||
|
<item>it</item>
|
||||||
|
<item>ja</item>
|
||||||
|
<item>pl</item>
|
||||||
|
<item>nl</item>
|
||||||
|
<item>hu</item>
|
||||||
|
<item>cs</item>
|
||||||
|
<item>sv</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
|
<string-array name="pref_arrdisp__language">
|
||||||
|
<item>@string/language_system</item>
|
||||||
|
<item>English</item>
|
||||||
|
<item>German (Deutsch)</item>
|
||||||
|
<item>Spanish (Español)</item>
|
||||||
|
<item>French (Français)</item>
|
||||||
|
<item>Russian (Русский)</item>
|
||||||
|
<item>Italian (Italiano) </item>
|
||||||
|
<item>Japanese (Nihongo)</item>
|
||||||
|
<item>Polish (Polski)</item>
|
||||||
|
<item>Dutch (Nederlands)</item>
|
||||||
|
<item>Hungarian (Magyar)</item>
|
||||||
|
<item>Czech (Čeština)</item>
|
||||||
|
<item>Swedish (Svenska)</item>
|
||||||
|
</string-array>
|
||||||
</resources>
|
</resources>
|
|
@ -3,6 +3,7 @@
|
||||||
<!-- Key Names (Untranslatable) -->
|
<!-- Key Names (Untranslatable) -->
|
||||||
<string name="pref_key__current_pod_0" translatable="false">pref_key__current_pod_0</string>
|
<string name="pref_key__current_pod_0" translatable="false">pref_key__current_pod_0</string>
|
||||||
<string name="pref_key__font_size" translatable="false">pref_key_font_size</string>
|
<string name="pref_key__font_size" translatable="false">pref_key_font_size</string>
|
||||||
|
<string name="pref_key__language" translatable="false">pref_key__language</string>
|
||||||
<string name="pref_key__intellihide_toolbars" translatable="false">pref_key_intellihide_toolbars</string>
|
<string name="pref_key__intellihide_toolbars" translatable="false">pref_key_intellihide_toolbars</string>
|
||||||
<string name="pref_key__personal_settings" translatable="false">pref_key_personal_settings</string>
|
<string name="pref_key__personal_settings" translatable="false">pref_key_personal_settings</string>
|
||||||
<string name="pref_key__manage_tags" translatable="false">pref_key_manage_tags</string>
|
<string name="pref_key__manage_tags" translatable="false">pref_key_manage_tags</string>
|
||||||
|
@ -93,7 +94,12 @@
|
||||||
<string name="pref_title__extended_notifications">Extended Notifications</string>
|
<string name="pref_title__extended_notifications">Extended Notifications</string>
|
||||||
<string name="pref_desc__extended_notifications">Extend the notifications bell with a dropdown menu that shows notification categories</string>
|
<string name="pref_desc__extended_notifications">Extend the notifications bell with a dropdown menu that shows notification categories</string>
|
||||||
|
|
||||||
|
<string name="pref_desc__language">Change language of this app. Restart app for changes to take affect</string>
|
||||||
|
<string name="pref_title__language">Language</string>
|
||||||
|
<string name="language_system">System language</string>
|
||||||
|
|
||||||
<!-- Font size -->
|
<!-- Font size -->
|
||||||
|
<string name="pref_desc__font_size">Control text size of the WebView</string>
|
||||||
<string name="pref_title__font_size">Font size</string>
|
<string name="pref_title__font_size">Font size</string>
|
||||||
<array name="pref_entries__font_size" translatable="false">
|
<array name="pref_entries__font_size" translatable="false">
|
||||||
<item>@string/font_size_normal</item>
|
<item>@string/font_size_normal</item>
|
||||||
|
@ -179,7 +185,7 @@
|
||||||
<string name="pref_title__intellihide_toolbars">Intellihide Toolbars</string>
|
<string name="pref_title__intellihide_toolbars">Intellihide Toolbars</string>
|
||||||
|
|
||||||
<string name="pref_title__append_shared_via_app">Append shared-by-notice</string>
|
<string name="pref_title__append_shared_via_app">Append shared-by-notice</string>
|
||||||
<string name="pref_desc__append_shared_via_app">Append a reference to this app ("shared by…") to shared texts</string>
|
<string name="pref_desc__append_shared_via_app">Append a reference to this app to shared texts: [via #dandelion]</string>
|
||||||
|
|
||||||
<!-- More -->
|
<!-- More -->
|
||||||
<string name="pref_title__sub_logging" translatable="false">@string/about_activity__title_debug_info</string>
|
<string name="pref_title__sub_logging" translatable="false">@string/about_activity__title_debug_info</string>
|
||||||
|
|
|
@ -6,32 +6,35 @@
|
||||||
android:title="@string/pref_cat__visuals">
|
android:title="@string/pref_cat__visuals">
|
||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
|
android:icon="@drawable/ic_color_lens_black_24px"
|
||||||
android:key="@string/pref_key__cat_themes"
|
android:key="@string/pref_key__cat_themes"
|
||||||
android:title="@string/pref_title__themes"
|
|
||||||
android:summary="@string/pref_desc__themes"
|
android:summary="@string/pref_desc__themes"
|
||||||
android:icon="@drawable/ic_color_lens_black_24px"/>
|
android:title="@string/pref_title__themes"/>
|
||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
|
android:icon="@drawable/ic_visibility_on_black_24px"
|
||||||
android:key="@string/pref_key__cat_nav_slider"
|
android:key="@string/pref_key__cat_nav_slider"
|
||||||
android:summary="@string/pref_desc__sub_nav_slider"
|
android:summary="@string/pref_desc__sub_nav_slider"
|
||||||
android:title="@string/pref_title__sub_nav_slider"
|
android:title="@string/pref_title__sub_nav_slider"/>
|
||||||
android:icon="@drawable/ic_visibility_on_black_24px"/>
|
|
||||||
|
<ListPreference
|
||||||
|
android:defaultValue=""
|
||||||
|
android:entries="@array/pref_arrdisp__language"
|
||||||
|
android:entryValues="@array/pref_arrkeys__language"
|
||||||
|
android:icon="@drawable/ic_language_black_48px"
|
||||||
|
android:key="@string/pref_key__language"
|
||||||
|
android:summary="@string/pref_desc__language"
|
||||||
|
android:title="@string/pref_title__language"/>
|
||||||
|
|
||||||
|
|
||||||
<ListPreference
|
<ListPreference
|
||||||
android:dialogTitle="@string/pref_title__font_size"
|
android:dialogTitle="@string/pref_title__font_size"
|
||||||
android:entries="@array/pref_entries__font_size"
|
android:entries="@array/pref_entries__font_size"
|
||||||
android:entryValues="@array/pref_entries_values__font_size"
|
android:entryValues="@array/pref_entries_values__font_size"
|
||||||
|
android:icon="@drawable/ic_format_size_black_24px"
|
||||||
android:key="@string/pref_key__font_size"
|
android:key="@string/pref_key__font_size"
|
||||||
android:summary="%s"
|
android:summary="@string/pref_desc__font_size"
|
||||||
android:title="@string/pref_title__font_size"
|
android:title="@string/pref_title__font_size"/>
|
||||||
android:icon="@drawable/ic_format_size_black_24px"/>
|
|
||||||
|
|
||||||
<com.github.dfa.diaspora_android.ui.theme.ThemedCheckBoxPreference
|
|
||||||
android:defaultValue="true"
|
|
||||||
android:key="@string/pref_key__intellihide_toolbars"
|
|
||||||
android:summary="@string/pref_desc__intellihide_toolbars"
|
|
||||||
android:title="@string/pref_title__intellihide_toolbars"
|
|
||||||
android:icon="@drawable/ic_zoom_out_map_black_24px"/>
|
|
||||||
|
|
||||||
</com.github.dfa.diaspora_android.ui.theme.ThemedPreferenceCategory>
|
</com.github.dfa.diaspora_android.ui.theme.ThemedPreferenceCategory>
|
||||||
|
|
||||||
|
@ -39,42 +42,49 @@
|
||||||
<com.github.dfa.diaspora_android.ui.theme.ThemedPreferenceCategory
|
<com.github.dfa.diaspora_android.ui.theme.ThemedPreferenceCategory
|
||||||
android:title="@string/pref_cat__operability">
|
android:title="@string/pref_cat__operability">
|
||||||
|
|
||||||
|
<com.github.dfa.diaspora_android.ui.theme.ThemedCheckBoxPreference
|
||||||
|
android:defaultValue="true"
|
||||||
|
android:icon="@drawable/ic_zoom_out_map_black_24px"
|
||||||
|
android:key="@string/pref_key__intellihide_toolbars"
|
||||||
|
android:summary="@string/pref_desc__intellihide_toolbars"
|
||||||
|
android:title="@string/pref_title__intellihide_toolbars"/>
|
||||||
|
|
||||||
<com.github.dfa.diaspora_android.ui.theme.ThemedCheckBoxPreference
|
<com.github.dfa.diaspora_android.ui.theme.ThemedCheckBoxPreference
|
||||||
android:defaultValue="false"
|
android:defaultValue="false"
|
||||||
|
android:icon="@drawable/ic_notifications_black_24px"
|
||||||
android:key="@string/pref_key__extended_notifications"
|
android:key="@string/pref_key__extended_notifications"
|
||||||
android:summary="@string/pref_desc__extended_notifications"
|
android:summary="@string/pref_desc__extended_notifications"
|
||||||
android:title="@string/pref_title__extended_notifications"
|
android:title="@string/pref_title__extended_notifications"/>
|
||||||
android:icon="@drawable/ic_notifications_black_24px"/>
|
|
||||||
|
|
||||||
<com.github.dfa.diaspora_android.ui.theme.ThemedCheckBoxPreference
|
<com.github.dfa.diaspora_android.ui.theme.ThemedCheckBoxPreference
|
||||||
android:defaultValue="true"
|
android:defaultValue="true"
|
||||||
|
android:icon="@drawable/ic_thumb_up_black_24px"
|
||||||
android:key="@string/pref_key__append_shared_via_app"
|
android:key="@string/pref_key__append_shared_via_app"
|
||||||
android:summary="@string/pref_desc__append_shared_via_app"
|
android:summary="@string/pref_desc__append_shared_via_app"
|
||||||
android:title="@string/pref_title__append_shared_via_app"
|
android:title="@string/pref_title__append_shared_via_app"/>
|
||||||
android:icon="@drawable/ic_thumb_up_black_24px"/>
|
|
||||||
|
|
||||||
<com.github.dfa.diaspora_android.ui.theme.ThemedCheckBoxPreference
|
<com.github.dfa.diaspora_android.ui.theme.ThemedCheckBoxPreference
|
||||||
android:defaultValue="true"
|
android:defaultValue="true"
|
||||||
|
android:icon="@drawable/ic_open_in_new_black_24px"
|
||||||
android:key="@string/pref_key__chrome_custom_tabs_enabled"
|
android:key="@string/pref_key__chrome_custom_tabs_enabled"
|
||||||
android:summary="@string/pref_desc__chrome_custom_tabs_enabled"
|
android:summary="@string/pref_desc__chrome_custom_tabs_enabled"
|
||||||
android:title="@string/pref_title__chrome_custom_tabs_enabled"
|
android:title="@string/pref_title__chrome_custom_tabs_enabled"/>
|
||||||
android:icon="@drawable/ic_open_in_new_black_24px"/>
|
|
||||||
|
|
||||||
<com.github.dfa.diaspora_android.ui.theme.ThemedCheckBoxPreference
|
<com.github.dfa.diaspora_android.ui.theme.ThemedCheckBoxPreference
|
||||||
android:defaultValue="false"
|
android:defaultValue="false"
|
||||||
|
android:icon="@drawable/ic_touch_app_black_24px"
|
||||||
android:key="@string/pref_key__topbar_stream_shortcut"
|
android:key="@string/pref_key__topbar_stream_shortcut"
|
||||||
android:summary="@string/pref_desc__topbar_stream_shortcut"
|
android:summary="@string/pref_desc__topbar_stream_shortcut"
|
||||||
android:title="@string/pref_title__topbar_stream_shortcut"
|
android:title="@string/pref_title__topbar_stream_shortcut"/>
|
||||||
android:icon="@drawable/ic_touch_app_black_24px"/>
|
|
||||||
|
|
||||||
<ListPreference
|
<ListPreference
|
||||||
android:defaultValue="@string/rotation_val_system"
|
android:defaultValue="@string/rotation_val_system"
|
||||||
android:key="@string/pref_key__screen_rotation"
|
|
||||||
android:title="@string/pref_title__screen_rotation"
|
|
||||||
android:summary="@string/pref_desc__screen_rotation"
|
|
||||||
android:entries="@array/pref_entries__screen_rotation"
|
android:entries="@array/pref_entries__screen_rotation"
|
||||||
android:entryValues="@array/pref_entries_values__screen_rotation"
|
android:entryValues="@array/pref_entries_values__screen_rotation"
|
||||||
android:icon="@drawable/ic_screen_rotation_black_24px"/>
|
android:icon="@drawable/ic_screen_rotation_black_24px"
|
||||||
|
android:key="@string/pref_key__screen_rotation"
|
||||||
|
android:summary="@string/pref_desc__screen_rotation"
|
||||||
|
android:title="@string/pref_title__screen_rotation"/>
|
||||||
|
|
||||||
</com.github.dfa.diaspora_android.ui.theme.ThemedPreferenceCategory>
|
</com.github.dfa.diaspora_android.ui.theme.ThemedPreferenceCategory>
|
||||||
|
|
||||||
|
@ -83,28 +93,28 @@
|
||||||
android:key="@string/pref_key__title__pod_settings"
|
android:key="@string/pref_key__title__pod_settings"
|
||||||
android:title="@string/pref_cat__pod_settings">
|
android:title="@string/pref_cat__pod_settings">
|
||||||
<Preference
|
<Preference
|
||||||
|
android:icon="@drawable/ic_person_black_24px"
|
||||||
android:key="@string/pref_key__personal_settings"
|
android:key="@string/pref_key__personal_settings"
|
||||||
android:summary="@string/pref_desc__personal_settings"
|
android:summary="@string/pref_desc__personal_settings"
|
||||||
android:title="@string/pref_title__personal_settings"
|
android:title="@string/pref_title__personal_settings"/>
|
||||||
android:icon="@drawable/ic_person_black_24px"/>
|
|
||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
|
android:icon="@drawable/ic_people_black_24px"
|
||||||
android:key="@string/pref_key__manage_contacts"
|
android:key="@string/pref_key__manage_contacts"
|
||||||
android:summary="@string/pref_desc__manage_contacts"
|
android:summary="@string/pref_desc__manage_contacts"
|
||||||
android:title="@string/pref_title__manage_contacts"
|
android:title="@string/pref_title__manage_contacts"/>
|
||||||
android:icon="@drawable/ic_people_black_24px"/>
|
|
||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
|
android:icon="@drawable/ic_format_list_bulleted_black_24px"
|
||||||
android:key="@string/pref_key__manage_tags"
|
android:key="@string/pref_key__manage_tags"
|
||||||
android:summary="@string/pref_desc__manage_tags"
|
android:summary="@string/pref_desc__manage_tags"
|
||||||
android:title="@string/pref_title__manage_tags"
|
android:title="@string/pref_title__manage_tags"/>
|
||||||
android:icon="@drawable/ic_format_list_bulleted_black_24px"/>
|
|
||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
|
android:icon="@drawable/ic_arrow_back_black_24px"
|
||||||
android:key="@string/pref_key__change_account"
|
android:key="@string/pref_key__change_account"
|
||||||
android:summary="@string/pref_desc__change_account"
|
android:summary="@string/pref_desc__change_account"
|
||||||
android:title="@string/pref_title__change_account"
|
android:title="@string/pref_title__change_account"/>
|
||||||
android:icon="@drawable/ic_arrow_back_black_24px"/>
|
|
||||||
</com.github.dfa.diaspora_android.ui.theme.ThemedPreferenceCategory>
|
</com.github.dfa.diaspora_android.ui.theme.ThemedPreferenceCategory>
|
||||||
|
|
||||||
<!-- Networking -->
|
<!-- Networking -->
|
||||||
|
@ -113,22 +123,22 @@
|
||||||
android:title="@string/pref_cat__network">
|
android:title="@string/pref_cat__network">
|
||||||
<com.github.dfa.diaspora_android.ui.theme.ThemedCheckBoxPreference
|
<com.github.dfa.diaspora_android.ui.theme.ThemedCheckBoxPreference
|
||||||
android:defaultValue="true"
|
android:defaultValue="true"
|
||||||
|
android:icon="@drawable/ic_file_download_black_24px"
|
||||||
android:key="@string/pref_key__load_images"
|
android:key="@string/pref_key__load_images"
|
||||||
android:summary="@string/pref_desc__load_images"
|
android:summary="@string/pref_desc__load_images"
|
||||||
android:title="@string/pref_title__load_images"
|
android:title="@string/pref_title__load_images"/>
|
||||||
android:icon="@drawable/ic_file_download_black_24px"/>
|
|
||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
|
android:icon="@drawable/ic_clear_black_24px"
|
||||||
android:key="@string/pref_key__clear_cache"
|
android:key="@string/pref_key__clear_cache"
|
||||||
android:summary="@string/pref_desc__clear_cache"
|
android:summary="@string/pref_desc__clear_cache"
|
||||||
android:title="@string/pref_title__clear_cache"
|
android:title="@string/pref_title__clear_cache"/>
|
||||||
android:icon="@drawable/ic_clear_black_24px"/>
|
|
||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
|
android:icon="@drawable/ic_vpn_lock_black_24px"
|
||||||
android:key="@string/pref_key__cat_proxy"
|
android:key="@string/pref_key__cat_proxy"
|
||||||
android:summary="@string/pref_desc__sub_proxy"
|
android:summary="@string/pref_desc__sub_proxy"
|
||||||
android:title="@string/pref_title__sub_proxy"
|
android:title="@string/pref_title__sub_proxy"/>
|
||||||
android:icon="@drawable/ic_vpn_lock_black_24px"/>
|
|
||||||
|
|
||||||
</com.github.dfa.diaspora_android.ui.theme.ThemedPreferenceCategory>
|
</com.github.dfa.diaspora_android.ui.theme.ThemedPreferenceCategory>
|
||||||
|
|
||||||
|
@ -138,10 +148,10 @@
|
||||||
android:title="@string/pref_cat__more">
|
android:title="@string/pref_cat__more">
|
||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
|
android:icon="@drawable/ic_bug_report_black_24px"
|
||||||
android:key="@string/pref_key__cat_debugging"
|
android:key="@string/pref_key__cat_debugging"
|
||||||
android:summary="@string/pref_desc__sub_logging"
|
android:summary="@string/pref_desc__sub_logging"
|
||||||
android:title="@string/pref_title__sub_logging"
|
android:title="@string/pref_title__sub_logging"/>
|
||||||
android:icon="@drawable/ic_bug_report_black_24px"/>
|
|
||||||
|
|
||||||
</com.github.dfa.diaspora_android.ui.theme.ThemedPreferenceCategory>
|
</com.github.dfa.diaspora_android.ui.theme.ThemedPreferenceCategory>
|
||||||
</PreferenceScreen>
|
</PreferenceScreen>
|
|
@ -13,6 +13,7 @@ files:
|
||||||
ja: ja # Japanese
|
ja: ja # Japanese
|
||||||
it: it # Italian
|
it: it # Italian
|
||||||
fr: fr # French
|
fr: fr # French
|
||||||
|
da: da # Danish
|
||||||
kn: kn # Kannada (Asian)
|
kn: kn # Kannada (Asian)
|
||||||
nl: nl # Dutch
|
nl: nl # Dutch
|
||||||
hu: hu # Hungarian
|
hu: hu # Hungarian
|
||||||
|
|
Loading…
Reference in a new issue