From dea1e0dcb9652dbaddcd1f1de68d8a5d340426a2 Mon Sep 17 00:00:00 2001 From: bopol Date: Sat, 4 Jan 2020 21:38:27 +0100 Subject: [PATCH 01/75] Update localizations settings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1) now, on « content language » change, it will also change the app language 2) added Esperanto to the list of language in content language --- app/src/main/java/org/schabi/newpipe/MainActivity.java | 5 +++++ .../java/org/schabi/newpipe/util/Localization.java | 10 ++++++++++ app/src/main/res/values/settings_keys.xml | 2 ++ 3 files changed, 17 insertions(+) diff --git a/app/src/main/java/org/schabi/newpipe/MainActivity.java b/app/src/main/java/org/schabi/newpipe/MainActivity.java index 90d299c7f..cac814085 100644 --- a/app/src/main/java/org/schabi/newpipe/MainActivity.java +++ b/app/src/main/java/org/schabi/newpipe/MainActivity.java @@ -67,6 +67,7 @@ import org.schabi.newpipe.fragments.list.search.SearchFragment; import org.schabi.newpipe.report.ErrorActivity; import org.schabi.newpipe.util.Constants; import org.schabi.newpipe.util.KioskTranslator; +import org.schabi.newpipe.util.Localization; import org.schabi.newpipe.util.NavigationHelper; import org.schabi.newpipe.util.PeertubeHelper; import org.schabi.newpipe.util.PermissionHelper; @@ -78,6 +79,8 @@ import org.schabi.newpipe.util.ThemeHelper; import java.util.ArrayList; import java.util.List; +import static org.schabi.newpipe.util.Localization.changeAppLanguage; + public class MainActivity extends AppCompatActivity { private static final String TAG = "MainActivity"; public static final boolean DEBUG = !BuildConfig.BUILD_TYPE.equals("release"); @@ -116,6 +119,8 @@ public class MainActivity extends AppCompatActivity { ThemeHelper.setTheme(this, ServiceHelper.getSelectedServiceId(this)); + changeAppLanguage(Localization.getPreferredLocale(getApplicationContext()), getResources()); + super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); diff --git a/app/src/main/java/org/schabi/newpipe/util/Localization.java b/app/src/main/java/org/schabi/newpipe/util/Localization.java index 9274df848..6b0b4cd0c 100644 --- a/app/src/main/java/org/schabi/newpipe/util/Localization.java +++ b/app/src/main/java/org/schabi/newpipe/util/Localization.java @@ -2,8 +2,11 @@ package org.schabi.newpipe.util; import android.content.Context; import android.content.SharedPreferences; +import android.content.res.Configuration; +import android.content.res.Resources; import android.preference.PreferenceManager; import android.text.TextUtils; +import android.util.DisplayMetrics; import org.ocpsoft.prettytime.PrettyTime; import org.ocpsoft.prettytime.units.Decade; @@ -216,4 +219,11 @@ public class Localization { public static String relativeTime(Calendar calendarTime) { return getPrettyTime().formatUnrounded(calendarTime); } + + public static void changeAppLanguage(Locale loc, Resources res) { + DisplayMetrics dm = res.getDisplayMetrics(); + Configuration conf = res.getConfiguration(); + conf.setLocale(loc); + res.updateConfiguration(conf, dm); + } } diff --git a/app/src/main/res/values/settings_keys.xml b/app/src/main/res/values/settings_keys.xml index 6aaaa0630..3f361226d 100644 --- a/app/src/main/res/values/settings_keys.xml +++ b/app/src/main/res/values/settings_keys.xml @@ -272,6 +272,7 @@ cs da de + eo et en-GB en @@ -351,6 +352,7 @@ Čeština Dansk Deutsch + Esperanto Eesti English (UK) English (US) From 3ad0e313caee037d42ea9a4ef89e80fbd04d9a2f Mon Sep 17 00:00:00 2001 From: bopol Date: Thu, 9 Jan 2020 09:40:05 +0100 Subject: [PATCH 02/75] =?UTF-8?q?changed=20the=20way=20to=20change=20langu?= =?UTF-8?q?age,=20now=20is=20=C2=ABNewPipe's=20language=C2=BB=20selector?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/org/schabi/newpipe/MainActivity.java | 8 +- .../schabi/newpipe/about/AboutActivity.java | 6 + .../newpipe/download/DownloadActivity.java | 6 + .../settings/ContentSettingsFragment.java | 5 +- .../newpipe/settings/SettingsActivity.java | 7 +- .../org/schabi/newpipe/util/Localization.java | 26 ++- app/src/main/res/values-ur/strings.xml | 10 +- app/src/main/res/values/settings_keys.xml | 159 ++++++++++++++++-- app/src/main/res/values/strings.xml | 1 + app/src/main/res/xml/content_settings.xml | 10 ++ 10 files changed, 209 insertions(+), 29 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/MainActivity.java b/app/src/main/java/org/schabi/newpipe/MainActivity.java index cac814085..05e224013 100644 --- a/app/src/main/java/org/schabi/newpipe/MainActivity.java +++ b/app/src/main/java/org/schabi/newpipe/MainActivity.java @@ -56,7 +56,6 @@ import androidx.fragment.app.FragmentManager; import com.google.android.material.navigation.NavigationView; import org.schabi.newpipe.extractor.NewPipe; -import org.schabi.newpipe.extractor.ServiceList; import org.schabi.newpipe.extractor.StreamingService; import org.schabi.newpipe.extractor.exceptions.ExtractionException; import org.schabi.newpipe.extractor.services.peertube.PeertubeInstance; @@ -67,7 +66,6 @@ import org.schabi.newpipe.fragments.list.search.SearchFragment; import org.schabi.newpipe.report.ErrorActivity; import org.schabi.newpipe.util.Constants; import org.schabi.newpipe.util.KioskTranslator; -import org.schabi.newpipe.util.Localization; import org.schabi.newpipe.util.NavigationHelper; import org.schabi.newpipe.util.PeertubeHelper; import org.schabi.newpipe.util.PermissionHelper; @@ -78,8 +76,10 @@ import org.schabi.newpipe.util.ThemeHelper; import java.util.ArrayList; import java.util.List; +import java.util.Locale; import static org.schabi.newpipe.util.Localization.changeAppLanguage; +import static org.schabi.newpipe.util.Localization.getAppLanguage; public class MainActivity extends AppCompatActivity { private static final String TAG = "MainActivity"; @@ -116,10 +116,9 @@ public class MainActivity extends AppCompatActivity { if (Build.VERSION.SDK_INT == Build.VERSION_CODES.KITKAT) { TLSSocketFactoryCompat.setAsDefault(); } - ThemeHelper.setTheme(this, ServiceHelper.getSelectedServiceId(this)); - changeAppLanguage(Localization.getPreferredLocale(getApplicationContext()), getResources()); + changeAppLanguage(getAppLanguage(getApplicationContext()), getResources()); super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); @@ -424,6 +423,7 @@ public class MainActivity extends AppCompatActivity { @Override protected void onResume() { + changeAppLanguage(getAppLanguage(getApplicationContext()), getResources()); super.onResume(); // close drawer on return, and don't show animation, so its looks like the drawer isn't open diff --git a/app/src/main/java/org/schabi/newpipe/about/AboutActivity.java b/app/src/main/java/org/schabi/newpipe/about/AboutActivity.java index 2326e795e..4da1611d3 100644 --- a/app/src/main/java/org/schabi/newpipe/about/AboutActivity.java +++ b/app/src/main/java/org/schabi/newpipe/about/AboutActivity.java @@ -25,6 +25,11 @@ import org.schabi.newpipe.R; import org.schabi.newpipe.util.NavigationHelper; import org.schabi.newpipe.util.ThemeHelper; +import java.util.Locale; + +import static org.schabi.newpipe.util.Localization.changeAppLanguage; +import static org.schabi.newpipe.util.Localization.getAppLanguage; + public class AboutActivity extends AppCompatActivity { /** @@ -62,6 +67,7 @@ public class AboutActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { + changeAppLanguage(getAppLanguage(getApplicationContext()), getResources()); super.onCreate(savedInstanceState); ThemeHelper.setTheme(this); diff --git a/app/src/main/java/org/schabi/newpipe/download/DownloadActivity.java b/app/src/main/java/org/schabi/newpipe/download/DownloadActivity.java index 449a790e8..b8bfcf480 100644 --- a/app/src/main/java/org/schabi/newpipe/download/DownloadActivity.java +++ b/app/src/main/java/org/schabi/newpipe/download/DownloadActivity.java @@ -15,9 +15,14 @@ import org.schabi.newpipe.R; import org.schabi.newpipe.settings.SettingsActivity; import org.schabi.newpipe.util.ThemeHelper; +import java.util.Locale; + import us.shandian.giga.service.DownloadManagerService; import us.shandian.giga.ui.fragment.MissionsFragment; +import static org.schabi.newpipe.util.Localization.changeAppLanguage; +import static org.schabi.newpipe.util.Localization.getAppLanguage; + public class DownloadActivity extends AppCompatActivity { private static final String MISSIONS_FRAGMENT_TAG = "fragment_tag"; @@ -29,6 +34,7 @@ public class DownloadActivity extends AppCompatActivity { i.setClass(this, DownloadManagerService.class); startService(i); + changeAppLanguage(getAppLanguage(getApplicationContext()), getResources()); ThemeHelper.setTheme(this); super.onCreate(savedInstanceState); setContentView(R.layout.activity_downloader); diff --git a/app/src/main/java/org/schabi/newpipe/settings/ContentSettingsFragment.java b/app/src/main/java/org/schabi/newpipe/settings/ContentSettingsFragment.java index 0c7a4b46e..88c700582 100644 --- a/app/src/main/java/org/schabi/newpipe/settings/ContentSettingsFragment.java +++ b/app/src/main/java/org/schabi/newpipe/settings/ContentSettingsFragment.java @@ -56,6 +56,7 @@ public class ContentSettingsFragment extends BasePreferenceFragment { private Localization initialSelectedLocalization; private ContentCountry initialSelectedContentCountry; + private String initialLanguage; @Override public void onCreate(@Nullable Bundle savedInstanceState) { @@ -64,6 +65,7 @@ public class ContentSettingsFragment extends BasePreferenceFragment { initialSelectedLocalization = org.schabi.newpipe.util.Localization.getPreferredLocalization(requireContext()); initialSelectedContentCountry = org.schabi.newpipe.util.Localization.getPreferredContentCountry(requireContext()); + initialLanguage = androidx.preference.PreferenceManager.getDefaultSharedPreferences(getContext()).getString("newpipes_language_key", "en"); } @Override @@ -125,9 +127,10 @@ public class ContentSettingsFragment extends BasePreferenceFragment { .getPreferredLocalization(requireContext()); final ContentCountry selectedContentCountry = org.schabi.newpipe.util.Localization .getPreferredContentCountry(requireContext()); + final String selectedLanguage = androidx.preference.PreferenceManager.getDefaultSharedPreferences(getContext()).getString("newpipes_language_key", "en"); if (!selectedLocalization.equals(initialSelectedLocalization) - || !selectedContentCountry.equals(initialSelectedContentCountry)) { + || !selectedContentCountry.equals(initialSelectedContentCountry) || !selectedLanguage.equals(initialLanguage)) { Toast.makeText(requireContext(), R.string.localization_changes_requires_app_restart, Toast.LENGTH_LONG).show(); NewPipe.setupLocalization(selectedLocalization, selectedContentCountry); diff --git a/app/src/main/java/org/schabi/newpipe/settings/SettingsActivity.java b/app/src/main/java/org/schabi/newpipe/settings/SettingsActivity.java index a3f218074..40af9f460 100644 --- a/app/src/main/java/org/schabi/newpipe/settings/SettingsActivity.java +++ b/app/src/main/java/org/schabi/newpipe/settings/SettingsActivity.java @@ -14,6 +14,11 @@ import android.view.MenuItem; import org.schabi.newpipe.R; import org.schabi.newpipe.util.ThemeHelper; +import java.util.Locale; + +import static org.schabi.newpipe.util.Localization.changeAppLanguage; +import static org.schabi.newpipe.util.Localization.getAppLanguage; + /* * Created by Christian Schabesberger on 31.08.15. @@ -44,7 +49,7 @@ public class SettingsActivity extends AppCompatActivity implements BasePreferenc @Override protected void onCreate(Bundle savedInstanceBundle) { setTheme(ThemeHelper.getSettingsThemeStyle(this)); - + changeAppLanguage(getAppLanguage(getApplicationContext()), getResources()); super.onCreate(savedInstanceBundle); setContentView(R.layout.settings_layout); diff --git a/app/src/main/java/org/schabi/newpipe/util/Localization.java b/app/src/main/java/org/schabi/newpipe/util/Localization.java index 6b0b4cd0c..7d742b04a 100644 --- a/app/src/main/java/org/schabi/newpipe/util/Localization.java +++ b/app/src/main/java/org/schabi/newpipe/util/Localization.java @@ -7,6 +7,11 @@ import android.content.res.Resources; import android.preference.PreferenceManager; import android.text.TextUtils; import android.util.DisplayMetrics; +import android.widget.Toast; + +import androidx.annotation.NonNull; +import androidx.annotation.PluralsRes; +import androidx.annotation.StringRes; import org.ocpsoft.prettytime.PrettyTime; import org.ocpsoft.prettytime.units.Decade; @@ -21,10 +26,6 @@ import java.util.Date; import java.util.List; import java.util.Locale; -import androidx.annotation.NonNull; -import androidx.annotation.PluralsRes; -import androidx.annotation.StringRes; - /* * Created by chschtsch on 12/29/15. * @@ -226,4 +227,21 @@ public class Localization { conf.setLocale(loc); res.updateConfiguration(conf, dm); } + + public static Locale getAppLanguage(Context context) { + SharedPreferences prefs = androidx.preference.PreferenceManager.getDefaultSharedPreferences(context); + String lang = prefs.getString("newpipes_language_key", "en"); + Locale loc; + if (lang.equals("system")) { + loc = Locale.getDefault(); + } else if (lang.matches(".*-.*")) { + String[] localisation = lang.split("-"); + lang = localisation[0]; + String country = localisation[1]; + loc = new Locale(lang, country); + } else { + loc = new Locale(lang); + } + return loc; + } } diff --git a/app/src/main/res/values-ur/strings.xml b/app/src/main/res/values-ur/strings.xml index 089b793c8..ce6f3f651 100644 --- a/app/src/main/res/values-ur/strings.xml +++ b/app/src/main/res/values-ur/strings.xml @@ -193,13 +193,13 @@ بی کوئی صارفین نہیں - % s صارف - % s صارفین + %s صارف + %s صارفین کوئی مناظر نہیں - % s منظر - % s مناظر + %s منظر + %s مناظر ویڈیوز دستیاب نہیں @@ -388,7 +388,7 @@ کوئی حد نہیں موبائل ڈیٹا کا استعمال کرتے وقت ریذولوشن کو محدود کریں ایپ سوئچ کو کم سے کم کریں - اہم ویڈیو پلیئر سے دوسرے ایپ میں سوئچنگ کرتے وقت کارروائی-% s + اہم ویڈیو پلیئر سے دوسرے ایپ میں سوئچنگ کرتے وقت کارروائی-s% کوئی نہیں پس منظری پلیر میں کم کریں پاپ اپ پلیر میں کم کریں diff --git a/app/src/main/res/values/settings_keys.xml b/app/src/main/res/values/settings_keys.xml index 3f361226d..299803a43 100644 --- a/app/src/main/res/values/settings_keys.xml +++ b/app/src/main/res/values/settings_keys.xml @@ -31,20 +31,20 @@ seek_duration 10000 - 5 seconds - 10 seconds - 15 seconds - 20 seconds - 25 seconds - 30 seconds + 5 seconds + 10 seconds + 15 seconds + 20 seconds + 25 seconds + 30 seconds - 5000 - 10000 - 15000 - 20000 - 25000 - 30000 + 5000 + 10000 + 15000 + 20000 + 25000 + 30000 minimize_on_exit_key @@ -175,6 +175,7 @@ main_page_content enable_playback_resume enable_playback_state_lists + newpipes_language_key import_data export_data @@ -272,7 +273,6 @@ cs da de - eo et en-GB en @@ -352,7 +352,6 @@ Čeština Dansk Deutsch - Esperanto Eesti English (UK) English (US) @@ -925,6 +924,137 @@ ZW + + + system + ar + az + ast + be + bg-bd + bn + ca + cs + da + de + el + en + eo + es + et + eu + fa + fi + fil + fr + gl + he + hi + hr + hu + hy + ia + ind + it + ja + ko + ku + lt + mk + ms + nb-no + ne + nl + nl-be + pa + pl + pr + pt + pt-br + ro + ru + sk + sl + sq + sr + sv + ta + te + th + tr + uk + ur + vi + zh + zh-hans + zh-tw + + + @string/system + العربية + Azərbaycan dili + Asturianu + Беларуская + български език + বাংলা + Català + Čeština + Dansk + Deutsch + Ελληνικά + English + Esperanto + Español + Eesti keel + Euskara + فارسی + Suomen kieli + Wikang Filipino + Français + Galego + עברית + हिन्दी + Hrvatski + magyar + Հայերեն + Interlingua + Bahasa Indonesia + Italiano + 日本語 + 한국어 + کوردی + Lietuvių kalba + македонски јазик + Bahasa Melayu + Norsk bokmål + Nनेपाली + Nederlands (NL) + Nederlands (BE) + ਪੰਜਾਬੀ + Polski + Pirate Language + Português (PT) + Português (BR) + Română + русский язык + Slovenčina + Slovenščina + Shqip + Српски + Svenska + தமிழ் + తెలుగు + ไทย + Türkçe + українська мова + اردو + Tiếng Việt + 官话 + 简化字 + 臺灣華語 + + + limit_mobile_data_usage limit_data_usage_none @@ -943,6 +1073,7 @@ list_view_mode auto + System auto diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 6021df15e..12a96fe74 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -585,5 +585,6 @@ Use SAF The Storage Access Framework allows downloads to an external SD card.\nNote: some devices are not compatible Choose an instance + NewPipe\'s language diff --git a/app/src/main/res/xml/content_settings.xml b/app/src/main/res/xml/content_settings.xml index 4044e92d8..ab9896cde 100644 --- a/app/src/main/res/xml/content_settings.xml +++ b/app/src/main/res/xml/content_settings.xml @@ -3,6 +3,16 @@ xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:title="@string/content"> + + + Date: Thu, 9 Jan 2020 12:15:01 +0100 Subject: [PATCH 03/75] removed unused imports --- app/src/main/java/org/schabi/newpipe/MainActivity.java | 1 - app/src/main/java/org/schabi/newpipe/about/AboutActivity.java | 2 -- .../main/java/org/schabi/newpipe/download/DownloadActivity.java | 2 -- .../main/java/org/schabi/newpipe/settings/SettingsActivity.java | 2 -- 4 files changed, 7 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/MainActivity.java b/app/src/main/java/org/schabi/newpipe/MainActivity.java index 05e224013..eb5f11987 100644 --- a/app/src/main/java/org/schabi/newpipe/MainActivity.java +++ b/app/src/main/java/org/schabi/newpipe/MainActivity.java @@ -76,7 +76,6 @@ import org.schabi.newpipe.util.ThemeHelper; import java.util.ArrayList; import java.util.List; -import java.util.Locale; import static org.schabi.newpipe.util.Localization.changeAppLanguage; import static org.schabi.newpipe.util.Localization.getAppLanguage; diff --git a/app/src/main/java/org/schabi/newpipe/about/AboutActivity.java b/app/src/main/java/org/schabi/newpipe/about/AboutActivity.java index 4da1611d3..3555ecefe 100644 --- a/app/src/main/java/org/schabi/newpipe/about/AboutActivity.java +++ b/app/src/main/java/org/schabi/newpipe/about/AboutActivity.java @@ -25,8 +25,6 @@ import org.schabi.newpipe.R; import org.schabi.newpipe.util.NavigationHelper; import org.schabi.newpipe.util.ThemeHelper; -import java.util.Locale; - import static org.schabi.newpipe.util.Localization.changeAppLanguage; import static org.schabi.newpipe.util.Localization.getAppLanguage; diff --git a/app/src/main/java/org/schabi/newpipe/download/DownloadActivity.java b/app/src/main/java/org/schabi/newpipe/download/DownloadActivity.java index b8bfcf480..bf546bf85 100644 --- a/app/src/main/java/org/schabi/newpipe/download/DownloadActivity.java +++ b/app/src/main/java/org/schabi/newpipe/download/DownloadActivity.java @@ -15,8 +15,6 @@ import org.schabi.newpipe.R; import org.schabi.newpipe.settings.SettingsActivity; import org.schabi.newpipe.util.ThemeHelper; -import java.util.Locale; - import us.shandian.giga.service.DownloadManagerService; import us.shandian.giga.ui.fragment.MissionsFragment; diff --git a/app/src/main/java/org/schabi/newpipe/settings/SettingsActivity.java b/app/src/main/java/org/schabi/newpipe/settings/SettingsActivity.java index 40af9f460..781c033b8 100644 --- a/app/src/main/java/org/schabi/newpipe/settings/SettingsActivity.java +++ b/app/src/main/java/org/schabi/newpipe/settings/SettingsActivity.java @@ -14,8 +14,6 @@ import android.view.MenuItem; import org.schabi.newpipe.R; import org.schabi.newpipe.util.ThemeHelper; -import java.util.Locale; - import static org.schabi.newpipe.util.Localization.changeAppLanguage; import static org.schabi.newpipe.util.Localization.getAppLanguage; From b32935a1b087bbc6d19fb7e50493273796d2ffb4 Mon Sep 17 00:00:00 2001 From: bopol Date: Thu, 9 Jan 2020 15:51:41 +0100 Subject: [PATCH 04/75] app language now changes time formatting (3hrs ago), was system language b4 --- app/src/main/java/org/schabi/newpipe/App.java | 2 +- .../java/org/schabi/newpipe/MainActivity.java | 8 +++++--- .../org/schabi/newpipe/about/AboutActivity.java | 4 ++-- .../newpipe/download/DownloadActivity.java | 4 ++-- .../newpipe/settings/SettingsActivity.java | 4 ++-- .../org/schabi/newpipe/util/Localization.java | 17 ++++++++--------- 6 files changed, 20 insertions(+), 19 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/App.java b/app/src/main/java/org/schabi/newpipe/App.java index 7f050e6c7..dae143b6c 100644 --- a/app/src/main/java/org/schabi/newpipe/App.java +++ b/app/src/main/java/org/schabi/newpipe/App.java @@ -99,7 +99,7 @@ public class App extends Application { NewPipe.init(getDownloader(), Localization.getPreferredLocalization(this), Localization.getPreferredContentCountry(this)); - Localization.init(); + Localization.init(getApplicationContext()); StateSaver.init(this); initNotificationChannel(); diff --git a/app/src/main/java/org/schabi/newpipe/MainActivity.java b/app/src/main/java/org/schabi/newpipe/MainActivity.java index eb5f11987..d48db1035 100644 --- a/app/src/main/java/org/schabi/newpipe/MainActivity.java +++ b/app/src/main/java/org/schabi/newpipe/MainActivity.java @@ -66,6 +66,7 @@ import org.schabi.newpipe.fragments.list.search.SearchFragment; import org.schabi.newpipe.report.ErrorActivity; import org.schabi.newpipe.util.Constants; import org.schabi.newpipe.util.KioskTranslator; +import org.schabi.newpipe.util.Localization; import org.schabi.newpipe.util.NavigationHelper; import org.schabi.newpipe.util.PeertubeHelper; import org.schabi.newpipe.util.PermissionHelper; @@ -78,7 +79,7 @@ import java.util.ArrayList; import java.util.List; import static org.schabi.newpipe.util.Localization.changeAppLanguage; -import static org.schabi.newpipe.util.Localization.getAppLanguage; +import static org.schabi.newpipe.util.Localization.getAppLocale; public class MainActivity extends AppCompatActivity { private static final String TAG = "MainActivity"; @@ -117,7 +118,7 @@ public class MainActivity extends AppCompatActivity { } ThemeHelper.setTheme(this, ServiceHelper.getSelectedServiceId(this)); - changeAppLanguage(getAppLanguage(getApplicationContext()), getResources()); + changeAppLanguage(getAppLocale(getApplicationContext()), getResources()); super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); @@ -422,7 +423,8 @@ public class MainActivity extends AppCompatActivity { @Override protected void onResume() { - changeAppLanguage(getAppLanguage(getApplicationContext()), getResources()); + changeAppLanguage(getAppLocale(getApplicationContext()), getResources()); + Localization.init(getApplicationContext()); //change the date format to match the selected language on resume super.onResume(); // close drawer on return, and don't show animation, so its looks like the drawer isn't open diff --git a/app/src/main/java/org/schabi/newpipe/about/AboutActivity.java b/app/src/main/java/org/schabi/newpipe/about/AboutActivity.java index 3555ecefe..795feceb0 100644 --- a/app/src/main/java/org/schabi/newpipe/about/AboutActivity.java +++ b/app/src/main/java/org/schabi/newpipe/about/AboutActivity.java @@ -26,7 +26,7 @@ import org.schabi.newpipe.util.NavigationHelper; import org.schabi.newpipe.util.ThemeHelper; import static org.schabi.newpipe.util.Localization.changeAppLanguage; -import static org.schabi.newpipe.util.Localization.getAppLanguage; +import static org.schabi.newpipe.util.Localization.getAppLocale; public class AboutActivity extends AppCompatActivity { @@ -65,7 +65,7 @@ public class AboutActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { - changeAppLanguage(getAppLanguage(getApplicationContext()), getResources()); + changeAppLanguage(getAppLocale(getApplicationContext()), getResources()); super.onCreate(savedInstanceState); ThemeHelper.setTheme(this); diff --git a/app/src/main/java/org/schabi/newpipe/download/DownloadActivity.java b/app/src/main/java/org/schabi/newpipe/download/DownloadActivity.java index bf546bf85..fd0d28a0e 100644 --- a/app/src/main/java/org/schabi/newpipe/download/DownloadActivity.java +++ b/app/src/main/java/org/schabi/newpipe/download/DownloadActivity.java @@ -19,7 +19,7 @@ import us.shandian.giga.service.DownloadManagerService; import us.shandian.giga.ui.fragment.MissionsFragment; import static org.schabi.newpipe.util.Localization.changeAppLanguage; -import static org.schabi.newpipe.util.Localization.getAppLanguage; +import static org.schabi.newpipe.util.Localization.getAppLocale; public class DownloadActivity extends AppCompatActivity { @@ -32,7 +32,7 @@ public class DownloadActivity extends AppCompatActivity { i.setClass(this, DownloadManagerService.class); startService(i); - changeAppLanguage(getAppLanguage(getApplicationContext()), getResources()); + changeAppLanguage(getAppLocale(getApplicationContext()), getResources()); ThemeHelper.setTheme(this); super.onCreate(savedInstanceState); setContentView(R.layout.activity_downloader); diff --git a/app/src/main/java/org/schabi/newpipe/settings/SettingsActivity.java b/app/src/main/java/org/schabi/newpipe/settings/SettingsActivity.java index 781c033b8..6804f9831 100644 --- a/app/src/main/java/org/schabi/newpipe/settings/SettingsActivity.java +++ b/app/src/main/java/org/schabi/newpipe/settings/SettingsActivity.java @@ -15,7 +15,7 @@ import org.schabi.newpipe.R; import org.schabi.newpipe.util.ThemeHelper; import static org.schabi.newpipe.util.Localization.changeAppLanguage; -import static org.schabi.newpipe.util.Localization.getAppLanguage; +import static org.schabi.newpipe.util.Localization.getAppLocale; /* @@ -47,7 +47,7 @@ public class SettingsActivity extends AppCompatActivity implements BasePreferenc @Override protected void onCreate(Bundle savedInstanceBundle) { setTheme(ThemeHelper.getSettingsThemeStyle(this)); - changeAppLanguage(getAppLanguage(getApplicationContext()), getResources()); + changeAppLanguage(getAppLocale(getApplicationContext()), getResources()); super.onCreate(savedInstanceBundle); setContentView(R.layout.settings_layout); diff --git a/app/src/main/java/org/schabi/newpipe/util/Localization.java b/app/src/main/java/org/schabi/newpipe/util/Localization.java index 7d742b04a..695a73295 100644 --- a/app/src/main/java/org/schabi/newpipe/util/Localization.java +++ b/app/src/main/java/org/schabi/newpipe/util/Localization.java @@ -7,7 +7,6 @@ import android.content.res.Resources; import android.preference.PreferenceManager; import android.text.TextUtils; import android.util.DisplayMetrics; -import android.widget.Toast; import androidx.annotation.NonNull; import androidx.annotation.PluralsRes; @@ -54,8 +53,8 @@ public class Localization { private Localization() { } - public static void init() { - initPrettyTime(); + public static void init(Context context) { + initPrettyTime(context); } @NonNull @@ -203,17 +202,17 @@ public class Localization { // Pretty Time //////////////////////////////////////////////////////////////////////////*/ - private static void initPrettyTime() { - prettyTime = new PrettyTime(Locale.getDefault()); + private static void initPrettyTime(Context context) { + prettyTime = new PrettyTime(getAppLocale(context)); // Do not use decades as YouTube doesn't either. prettyTime.removeUnit(Decade.class); } private static PrettyTime getPrettyTime() { // If pretty time's Locale is different, init again with the new one. - if (!prettyTime.getLocale().equals(Locale.getDefault())) { - initPrettyTime(); - } +// if (!prettyTime.getLocale().equals(Locale.getDefault())) { +// initPrettyTime(); +// } return prettyTime; } @@ -228,7 +227,7 @@ public class Localization { res.updateConfiguration(conf, dm); } - public static Locale getAppLanguage(Context context) { + public static Locale getAppLocale(Context context) { SharedPreferences prefs = androidx.preference.PreferenceManager.getDefaultSharedPreferences(context); String lang = prefs.getString("newpipes_language_key", "en"); Locale loc; From 8f46432391578b6602cea69ef344817857f75a7e Mon Sep 17 00:00:00 2001 From: bopol Date: Fri, 10 Jan 2020 15:50:15 +0100 Subject: [PATCH 05/75] fixed some activities where the wrong languages would be set --- app/src/main/java/org/schabi/newpipe/MainActivity.java | 1 - .../java/org/schabi/newpipe/about/AboutActivity.java | 1 + .../java/org/schabi/newpipe/player/BackgroundPlayer.java | 4 +++- .../java/org/schabi/newpipe/player/MainVideoPlayer.java | 9 +++++++-- .../java/org/schabi/newpipe/player/PopupVideoPlayer.java | 3 +++ .../org/schabi/newpipe/player/ServicePlayerActivity.java | 3 +++ .../java/org/schabi/newpipe/report/ErrorActivity.java | 4 ++++ .../main/java/org/schabi/newpipe/util/Localization.java | 4 ---- 8 files changed, 21 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/MainActivity.java b/app/src/main/java/org/schabi/newpipe/MainActivity.java index d48db1035..c5aedb85b 100644 --- a/app/src/main/java/org/schabi/newpipe/MainActivity.java +++ b/app/src/main/java/org/schabi/newpipe/MainActivity.java @@ -119,7 +119,6 @@ public class MainActivity extends AppCompatActivity { ThemeHelper.setTheme(this, ServiceHelper.getSelectedServiceId(this)); changeAppLanguage(getAppLocale(getApplicationContext()), getResources()); - super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); diff --git a/app/src/main/java/org/schabi/newpipe/about/AboutActivity.java b/app/src/main/java/org/schabi/newpipe/about/AboutActivity.java index 795feceb0..c8c62bbe7 100644 --- a/app/src/main/java/org/schabi/newpipe/about/AboutActivity.java +++ b/app/src/main/java/org/schabi/newpipe/about/AboutActivity.java @@ -68,6 +68,7 @@ public class AboutActivity extends AppCompatActivity { changeAppLanguage(getAppLocale(getApplicationContext()), getResources()); super.onCreate(savedInstanceState); ThemeHelper.setTheme(this); + this.setTitle(getString(R.string.title_activity_about)); setContentView(R.layout.activity_about); diff --git a/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java b/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java index 76da7da36..c74882161 100644 --- a/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java @@ -58,6 +58,8 @@ import org.schabi.newpipe.util.NavigationHelper; import org.schabi.newpipe.util.ThemeHelper; import static org.schabi.newpipe.player.helper.PlayerHelper.getTimeString; +import static org.schabi.newpipe.util.Localization.changeAppLanguage; +import static org.schabi.newpipe.util.Localization.getAppLocale; /** @@ -115,7 +117,7 @@ public final class BackgroundPlayer extends Service { notificationManager = ((NotificationManager) getSystemService(NOTIFICATION_SERVICE)); lockManager = new LockManager(this); sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext()); - + changeAppLanguage(getAppLocale(getApplicationContext()), getResources()); ThemeHelper.setTheme(this); basePlayerImpl = new BasePlayerImpl(this); basePlayerImpl.setup(); diff --git a/app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java b/app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java index 7a3e60c66..284d10b42 100644 --- a/app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java @@ -93,6 +93,8 @@ import static org.schabi.newpipe.util.AnimationUtils.Type.SCALE_AND_ALPHA; import static org.schabi.newpipe.util.AnimationUtils.Type.SLIDE_AND_ALPHA; import static org.schabi.newpipe.util.AnimationUtils.animateRotation; import static org.schabi.newpipe.util.AnimationUtils.animateView; +import static org.schabi.newpipe.util.Localization.changeAppLanguage; +import static org.schabi.newpipe.util.Localization.getAppLocale; import static org.schabi.newpipe.util.StateSaver.KEY_SAVED_STATE; /** @@ -123,6 +125,7 @@ public final class MainVideoPlayer extends AppCompatActivity @Override protected void onCreate(@Nullable Bundle savedInstanceState) { + changeAppLanguage(getAppLocale(getApplicationContext()), getResources()); super.onCreate(savedInstanceState); if (DEBUG) Log.d(TAG, "onCreate() called with: savedInstanceState = [" + savedInstanceState + "]"); defaultPreferences = PreferenceManager.getDefaultSharedPreferences(this); @@ -190,6 +193,7 @@ public final class MainVideoPlayer extends AppCompatActivity @Override protected void onResume() { if (DEBUG) Log.d(TAG, "onResume() called"); + changeAppLanguage(getAppLocale(getApplicationContext()), getResources()); super.onResume(); if (globalScreenOrientationLocked()) { @@ -220,6 +224,7 @@ public final class MainVideoPlayer extends AppCompatActivity @Override public void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); + changeAppLanguage(getAppLocale(getApplicationContext()), getResources()); if (playerImpl.isSomePopupMenuVisible()) { playerImpl.getQualityPopupMenu().dismiss(); @@ -364,8 +369,8 @@ public final class MainVideoPlayer extends AppCompatActivity } private boolean globalScreenOrientationLocked() { - // 1: Screen orientation changes using acelerometer - // 0: Screen orientatino is locked + // 1: Screen orientation changes using accelerometer + // 0: Screen orientation is locked return !(android.provider.Settings.System.getInt(getContentResolver(), Settings.System.ACCELEROMETER_ROTATION, 0) == 1); } diff --git a/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java b/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java index 969c47990..b173448d0 100644 --- a/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java @@ -80,6 +80,8 @@ import static org.schabi.newpipe.player.BasePlayer.STATE_PLAYING; import static org.schabi.newpipe.player.VideoPlayer.DEFAULT_CONTROLS_DURATION; import static org.schabi.newpipe.player.VideoPlayer.DEFAULT_CONTROLS_HIDE_TIME; import static org.schabi.newpipe.util.AnimationUtils.animateView; +import static org.schabi.newpipe.util.Localization.changeAppLanguage; +import static org.schabi.newpipe.util.Localization.getAppLocale; /** * Service Popup Player implementing VideoPlayer @@ -142,6 +144,7 @@ public final class PopupVideoPlayer extends Service { @Override public void onCreate() { + changeAppLanguage(getAppLocale(getApplicationContext()), getResources()); windowManager = (WindowManager) getSystemService(WINDOW_SERVICE); notificationManager = ((NotificationManager) getSystemService(NOTIFICATION_SERVICE)); diff --git a/app/src/main/java/org/schabi/newpipe/player/ServicePlayerActivity.java b/app/src/main/java/org/schabi/newpipe/player/ServicePlayerActivity.java index 2207808ac..d5ee59a7e 100644 --- a/app/src/main/java/org/schabi/newpipe/player/ServicePlayerActivity.java +++ b/app/src/main/java/org/schabi/newpipe/player/ServicePlayerActivity.java @@ -46,6 +46,8 @@ import java.util.List; import static org.schabi.newpipe.player.helper.PlayerHelper.formatPitch; import static org.schabi.newpipe.player.helper.PlayerHelper.formatSpeed; +import static org.schabi.newpipe.util.Localization.changeAppLanguage; +import static org.schabi.newpipe.util.Localization.getAppLocale; public abstract class ServicePlayerActivity extends AppCompatActivity implements PlayerEventListener, SeekBar.OnSeekBarChangeListener, @@ -116,6 +118,7 @@ public abstract class ServicePlayerActivity extends AppCompatActivity @Override protected void onCreate(Bundle savedInstanceState) { + changeAppLanguage(getAppLocale(getApplicationContext()), getResources()); super.onCreate(savedInstanceState); ThemeHelper.setTheme(this); setContentView(R.layout.activity_player_queue_control); diff --git a/app/src/main/java/org/schabi/newpipe/report/ErrorActivity.java b/app/src/main/java/org/schabi/newpipe/report/ErrorActivity.java index e7a6319e3..05dfe33ca 100644 --- a/app/src/main/java/org/schabi/newpipe/report/ErrorActivity.java +++ b/app/src/main/java/org/schabi/newpipe/report/ErrorActivity.java @@ -46,6 +46,9 @@ import java.util.List; import java.util.TimeZone; import java.util.Vector; +import static org.schabi.newpipe.util.Localization.changeAppLanguage; +import static org.schabi.newpipe.util.Localization.getAppLocale; + /* * Created by Christian Schabesberger on 24.10.15. * @@ -171,6 +174,7 @@ public class ErrorActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { + changeAppLanguage(getAppLocale(getApplicationContext()), getResources()); super.onCreate(savedInstanceState); ThemeHelper.setTheme(this); setContentView(R.layout.activity_error); diff --git a/app/src/main/java/org/schabi/newpipe/util/Localization.java b/app/src/main/java/org/schabi/newpipe/util/Localization.java index 695a73295..3f555fcfd 100644 --- a/app/src/main/java/org/schabi/newpipe/util/Localization.java +++ b/app/src/main/java/org/schabi/newpipe/util/Localization.java @@ -209,10 +209,6 @@ public class Localization { } private static PrettyTime getPrettyTime() { - // If pretty time's Locale is different, init again with the new one. -// if (!prettyTime.getLocale().equals(Locale.getDefault())) { -// initPrettyTime(); -// } return prettyTime; } From 11d06dc86d8e1f0e2614251a1359e36dd537a81c Mon Sep 17 00:00:00 2001 From: bopol Date: Fri, 10 Jan 2020 16:03:24 +0100 Subject: [PATCH 06/75] remove todo as it's already done --- app/src/main/res/values/settings_keys.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/app/src/main/res/values/settings_keys.xml b/app/src/main/res/values/settings_keys.xml index 4bb66bf62..18f42fe46 100644 --- a/app/src/main/res/values/settings_keys.xml +++ b/app/src/main/res/values/settings_keys.xml @@ -1054,7 +1054,6 @@ 官话 简化字 臺灣華語 - From f8a7aac40d0e7e1a6558753e012dabd6f97d7df7 Mon Sep 17 00:00:00 2001 From: bopol Date: Tue, 14 Jan 2020 14:15:42 +0100 Subject: [PATCH 07/75] fixed indonesian, see https://stackoverflow.com/questions/13291578/how-to-localize-an-android-app-in-indonesian-language --- app/src/main/res/{values-id => values-in}/strings.xml | 0 app/src/main/res/values/settings_keys.xml | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename app/src/main/res/{values-id => values-in}/strings.xml (100%) diff --git a/app/src/main/res/values-id/strings.xml b/app/src/main/res/values-in/strings.xml similarity index 100% rename from app/src/main/res/values-id/strings.xml rename to app/src/main/res/values-in/strings.xml diff --git a/app/src/main/res/values/settings_keys.xml b/app/src/main/res/values/settings_keys.xml index 18f42fe46..88da3afe5 100644 --- a/app/src/main/res/values/settings_keys.xml +++ b/app/src/main/res/values/settings_keys.xml @@ -956,7 +956,7 @@ hu hy ia - ind + in it ja ko From 055365a44931b65e9fffd0d5d57595fe3be40abb Mon Sep 17 00:00:00 2001 From: bopol Date: Tue, 14 Jan 2020 14:26:53 +0100 Subject: [PATCH 08/75] added Occitan to the selector --- app/src/main/res/values/settings_keys.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/res/values/settings_keys.xml b/app/src/main/res/values/settings_keys.xml index 88da3afe5..08b18f49b 100644 --- a/app/src/main/res/values/settings_keys.xml +++ b/app/src/main/res/values/settings_keys.xml @@ -968,6 +968,7 @@ ne nl nl-be + oc pa pl pr @@ -1032,6 +1033,7 @@ Nनेपाली Nederlands (NL) Nederlands (BE) + Occitan ਪੰਜਾਬੀ Polski Pirate Language From 105981b2eb426b598f81694442621e8b695a642e Mon Sep 17 00:00:00 2001 From: bopol Date: Tue, 14 Jan 2020 19:11:46 +0100 Subject: [PATCH 09/75] made system translatable + renamed it to system's language --- app/src/main/res/values/settings_keys.xml | 3 +-- app/src/main/res/values/strings.xml | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/values/settings_keys.xml b/app/src/main/res/values/settings_keys.xml index 08b18f49b..ed3c454b8 100644 --- a/app/src/main/res/values/settings_keys.xml +++ b/app/src/main/res/values/settings_keys.xml @@ -993,7 +993,7 @@ zh-tw - @string/system + @string/systems_language العربية Azərbaycan dili Asturianu @@ -1076,7 +1076,6 @@ list_view_mode auto - System auto diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 8a44fdc64..c5a59abe7 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -590,4 +590,5 @@ The Storage Access Framework allows downloads to an external SD card.\nNote: some devices are not compatible Choose an instance NewPipe\'s language + System\'s language From 9d8fcbbffe7ade9e662ab94e1a5a539a7e4e7d04 Mon Sep 17 00:00:00 2001 From: B0pol Date: Wed, 15 Jan 2020 08:33:57 +0100 Subject: [PATCH 10/75] fix: wrong language shown when rotating screen in popup player --- .../main/java/org/schabi/newpipe/player/PopupVideoPlayer.java | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java b/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java index b173448d0..c0ac95445 100644 --- a/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java @@ -172,6 +172,7 @@ public final class PopupVideoPlayer extends Service { @Override public void onConfigurationChanged(Configuration newConfig) { + changeAppLanguage(getAppLocale(getApplicationContext()), getResources()); if (DEBUG) Log.d(TAG, "onConfigurationChanged() called with: newConfig = [" + newConfig + "]"); updateScreenSize(); updatePopupSize(popupLayoutParams.width, -1); From b155f23d276ebc48ffe5fe86759320b6751ac512 Mon Sep 17 00:00:00 2001 From: bopol Date: Sat, 18 Jan 2020 09:46:38 +0100 Subject: [PATCH 11/75] fix: wrong language shown in playback parameters dialog MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is a hardly reproduceable bug that I hopefully fixed. After a long time of watching videos, you could have your system language shown in playback parameters dialog. Calling changeAppLanguage(getAppLocale(…),…) onCreate will most certainly fix this bug --- .../schabi/newpipe/player/helper/PlaybackParameterDialog.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/java/org/schabi/newpipe/player/helper/PlaybackParameterDialog.java b/app/src/main/java/org/schabi/newpipe/player/helper/PlaybackParameterDialog.java index 4feed74fe..2aefa675e 100644 --- a/app/src/main/java/org/schabi/newpipe/player/helper/PlaybackParameterDialog.java +++ b/app/src/main/java/org/schabi/newpipe/player/helper/PlaybackParameterDialog.java @@ -17,6 +17,8 @@ import org.schabi.newpipe.R; import org.schabi.newpipe.util.SliderStrategy; import static org.schabi.newpipe.player.BasePlayer.DEBUG; +import static org.schabi.newpipe.util.Localization.changeAppLanguage; +import static org.schabi.newpipe.util.Localization.getAppLocale; public class PlaybackParameterDialog extends DialogFragment { @NonNull private static final String TAG = "PlaybackParameterDialog"; @@ -108,6 +110,7 @@ public class PlaybackParameterDialog extends DialogFragment { @Override public void onCreate(@Nullable Bundle savedInstanceState) { + changeAppLanguage(getAppLocale(getContext()), getResources()); super.onCreate(savedInstanceState); if (savedInstanceState != null) { initialTempo = savedInstanceState.getDouble(INITIAL_TEMPO_KEY, DEFAULT_TEMPO); @@ -137,6 +140,7 @@ public class PlaybackParameterDialog extends DialogFragment { @NonNull @Override public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) { + changeAppLanguage(getAppLocale(getContext()), getResources()); final View view = View.inflate(getContext(), R.layout.dialog_playback_parameter, null); setupControlViews(view); From e08e7245738ca8ee5dab4dc5801dc6d35399873a Mon Sep 17 00:00:00 2001 From: bopol Date: Sat, 18 Jan 2020 10:46:53 +0100 Subject: [PATCH 12/75] upload date in description now matches newpipe's language --- .../main/java/org/schabi/newpipe/util/Localization.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/util/Localization.java b/app/src/main/java/org/schabi/newpipe/util/Localization.java index 3f555fcfd..d2fbd3a65 100644 --- a/app/src/main/java/org/schabi/newpipe/util/Localization.java +++ b/app/src/main/java/org/schabi/newpipe/util/Localization.java @@ -1,5 +1,6 @@ package org.schabi.newpipe.util; +import android.annotation.SuppressLint; import android.content.Context; import android.content.SharedPreferences; import android.content.res.Configuration; @@ -118,12 +119,13 @@ public class Localization { return nf.format(number); } - public static String formatDate(Date date) { - return DateFormat.getDateInstance(DateFormat.MEDIUM, Locale.getDefault()).format(date); + public static String formatDate(Date date, Context context) { + return DateFormat.getDateInstance(DateFormat.MEDIUM, getAppLocale(context)).format(date); } + @SuppressLint("StringFormatInvalid") public static String localizeUploadDate(Context context, Date date) { - return context.getString(R.string.upload_date_text, formatDate(date)); + return context.getString(R.string.upload_date_text, formatDate(date, context)); } public static String localizeViewCount(Context context, long viewCount) { From 77aa12dd8195dae7a2f782f97d3439e4e39fd1a1 Mon Sep 17 00:00:00 2001 From: Xiang Rong Lin <41164160+XiangRongLin@users.noreply.github.com> Date: Mon, 13 Jan 2020 20:24:24 +0100 Subject: [PATCH 13/75] Rename local playlist by long-clicking in BookmarkFragment. After long clicking on a local playlist, show a dialog with 2 options for "rename" and "delete" Rename shows another dialog to let the user rename the playlist. Delete lets the user delete a playlist like before. --- .../local/bookmark/BookmarkFragment.java | 67 ++++++++++++++++++- 1 file changed, 66 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/schabi/newpipe/local/bookmark/BookmarkFragment.java b/app/src/main/java/org/schabi/newpipe/local/bookmark/BookmarkFragment.java index 8f67367aa..6a7f16025 100644 --- a/app/src/main/java/org/schabi/newpipe/local/bookmark/BookmarkFragment.java +++ b/app/src/main/java/org/schabi/newpipe/local/bookmark/BookmarkFragment.java @@ -1,8 +1,13 @@ package org.schabi.newpipe.local.bookmark; import android.app.AlertDialog; +import android.content.DialogInterface; +import android.content.res.Resources; import android.os.Bundle; import android.os.Parcelable; +import android.util.Log; +import android.widget.EditText; +import android.widget.TextView; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.fragment.app.FragmentManager; @@ -10,6 +15,7 @@ import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; +import io.reactivex.disposables.Disposable; import org.reactivestreams.Subscriber; import org.reactivestreams.Subscription; import org.schabi.newpipe.NewPipeDatabase; @@ -118,7 +124,33 @@ public final class BookmarkFragment @Override public void held(LocalItem selectedItem) { if (selectedItem instanceof PlaylistMetadataEntry) { - showLocalDeleteDialog((PlaylistMetadataEntry) selectedItem); + final Resources resources = getContext().getResources(); + String[] commands = new String[]{ + resources.getString(R.string.rename_playlist), + resources.getString(R.string.delete_playlist) + }; + + final DialogInterface.OnClickListener actions = (dialogInterface, i) -> { + switch (i) { + case 0: + showLocalRenameDialog((PlaylistMetadataEntry) selectedItem); + break; + case 1: + showLocalDeleteDialog((PlaylistMetadataEntry) selectedItem); + break; + } + }; + + final View bannerView = View.inflate(activity, R.layout.dialog_title, null); + bannerView.setSelected(true); + TextView titleView = bannerView.findViewById(R.id.itemTitleView); + titleView.setText(((PlaylistMetadataEntry) selectedItem).name); + + new AlertDialog.Builder(getActivity()) + .setCustomTitle(bannerView) + .setItems(commands, actions) + .create() + .show(); } else if (selectedItem instanceof PlaylistRemoteEntity) { showRemoteDeleteDialog((PlaylistRemoteEntity) selectedItem); @@ -271,6 +303,39 @@ public final class BookmarkFragment .show(); } + private void showLocalRenameDialog(PlaylistMetadataEntry selectedItem) { + final View dialogView = View.inflate(getContext(), R.layout.dialog_playlist_name, null); + EditText nameEdit = dialogView.findViewById(R.id.playlist_name); + nameEdit.setText(selectedItem.name); + nameEdit.setSelection(nameEdit.getText().length()); + + final AlertDialog.Builder dialogBuilder = new AlertDialog.Builder( + getContext()) + .setTitle(R.string.rename_playlist) + .setView(dialogView) + .setCancelable(true) + .setNegativeButton(R.string.cancel, null) + .setPositiveButton(R.string.rename, (dialogInterface, i) -> { + changeLocalPlaylistName(selectedItem.uid, nameEdit.getText().toString()); + }); + dialogBuilder.show(); + } + + private void changeLocalPlaylistName(long id, String name) { + if (localPlaylistManager == null) { + return; + } + + Log.d(TAG, "Updating playlist id=[" + id + + "] with new name=[" + name + "] items"); + + localPlaylistManager.renamePlaylist(id, name); + final Disposable disposable = localPlaylistManager.renamePlaylist(id, name) + .observeOn(AndroidSchedulers.mainThread()) + .subscribe(longs -> {/*Do nothing on success*/}, this::onError); + disposables.add(disposable); + } + private static List merge(final List localPlaylists, final List remotePlaylists) { List items = new ArrayList<>( From 9d5612d1046b08ae9c03d75e561868ce73c66604 Mon Sep 17 00:00:00 2001 From: B0pol Date: Sat, 18 Jan 2020 19:34:22 +0000 Subject: [PATCH 14/75] Translated using Weblate (German) Currently translated at 100.0% (527 of 527 strings) --- app/src/main/res/values-de/strings.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 53b9a52eb..9a2482814 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -155,7 +155,7 @@ Über Freies und schlankes Streaming für Android. NewPipes Lizenz - Ob Ideen, Übersetzungen, Design-Änderungen, Code-Aufräumung oder richtig große Code-Änderungen – Hilfe ist immer willkommen. Je mehr geholfen wird, desto besser wird NewPipe! + Ob Ideen, Übersetzungen, Design-Änderungen, Code-Aufräumung oder richtig große Code-Änderungen — Hilfe ist immer willkommen. Je mehr geholfen wird, desto besser wird NewPipe! Drittanbieter-Lizenzen Auf GitHub ansehen Beitragen @@ -366,7 +366,7 @@ yourID, soundcloud.com/yourid Keine Streams zum Download verfügbar Bevorzugte \"Öffnen\" Aktion - Standardaktion beim Öffnen von Inhalten - %s + Standardaktion beim Öffnen von Inhalten — %s Untertitel Textgröße und Hintergrund der Untertitel im Player anpassen. Wird erst nach Neustart der App wirksam. Keine App zum Abspielen dieser Datei installiert @@ -392,7 +392,7 @@ Unbegrenzt Auflösung bei Verwendung mobiler Daten begrenzen Minimieren beim Appwechsel - Aktion beim Umschalten auf eine andere App vom Haupt-Videoplayer - %s + Aktion beim Umschalten auf eine andere App vom Haupt-Videoplayer — %s Keine Zum Hintergrund-Player minimieren Zum Popup-Player minimieren From 6b7043fb9d7aa50ecf47b691f908ee70e8c56572 Mon Sep 17 00:00:00 2001 From: B0pol Date: Fri, 17 Jan 2020 08:52:56 +0000 Subject: [PATCH 15/75] Translated using Weblate (French) Currently translated at 100.0% (527 of 527 strings) --- app/src/main/res/values-fr/strings.xml | 31 ++++++++++++++------------ 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 444310aef..7695fe31c 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -19,14 +19,14 @@ Partager Partager avec Affiche une option pour lire une vidéo via Kodi - Afficher l’option « Lire avec Kodi » + Afficher l’option « Lire avec Kodi » Publiée le %1$s %1$s vues Audio Format audio par défaut Télécharger Suivant - Afficher les vidéos « Suivantes » et « Similaires » + Afficher les vidéos « Suivantes » et « Similaires » URL non pris en charge Vidéo et audio Autre @@ -50,8 +50,8 @@ Dossier de téléchargement audio Les fichiers audio téléchargés sont stockés ici Choisissez le dossier de téléchargement des fichiers audio - Impossible de créer le répertoire de téléchargement « %1$s » - Répertoire de téléchargement « %1$s » créé + Impossible de créer le répertoire de téléchargement « %1$s » + Répertoire de téléchargement « %1$s » créé Erreur Impossible d’analyser le site web Contenu indisponible @@ -231,8 +231,8 @@ Retirer Détails Paramètres audios - Afficher l’astuce « Maintenir pour ajouter » - Affiche l’astuce lors de l’appui du bouton « Arrière-plan » ou « Mode flottant » sur la page de détails d’une vidéo + Afficher l’astuce « Maintenir pour ajouter » + Affiche l’astuce lors de l’appui du bouton « Arrière-plan » ou « Mode flottant » sur la page de détails d’une vidéo [Inconnu] Récupération depuis l’erreur du lecteur Kiosque @@ -348,11 +348,11 @@ \n1. Suivez ce lien : %1$s. \n2. Connectez-vous à votre compte. \n3. Un téléchargement va démarrer (celui du fichier d’exportation). - Veuillez importer un profil SoundCloud en saisissant l’URL de votre profil ou votre identifiant. -\n -\n1. Activez le « mode bureau » dans votre navigateur web (le site n’est pas disponible pour les appareils mobiles). -\n2. Suivez cette URL : %1$s. -\n3. Connectez-vous à votre compte. + Veuillez importer un profil SoundCloud en saisissant l’URL de votre profil ou votre identifiant. +\n +\n1. Activez le « mode bureau » dans votre navigateur web (le site n’est pas disponible pour les appareils mobiles). +\n2. Suivez cette URL : %1$s. +\n3. Connectez-vous à votre compte. \n4. Copiez l’URL du profil vers lequel vous venez d’être redirigé. votre identifiant, soundcloud.com/votreidentifiant Cette opération peut charger énormément la connexion réseau. @@ -484,7 +484,7 @@ NewPipe a été fermé alors qu’il travaillait sur le fichier Aucun espace disponible sur le périphérique Progression perdue, car le fichier a été effacé - Êtes-vous sûr \? + Voulez-vous effacer l\'historique de téléchargement ou supprimer tous les fichiers téléchargés \? Limiter la file d’attente de téléchargement Un téléchargement s’exécutera en même temps Démarrer les téléchargements @@ -508,8 +508,8 @@ Kiosque par défaut Personne ne regarde - %s regarde - %s regardent + %s spectateur + %s spectateurs Personne n\'écoute @@ -535,4 +535,7 @@ Généré automatiquement (pas de téléverseur trouvé) Activer la vidéo miniaturisée sur l\'écran de verrouillage En utilisant le lecteur audio, la miniature de la vidéo sera affichée sur l\'écran de verrouillage + Effacer l\'historique de téléchargement + Supprimer les fichiers téléchargés + %1$s téléchargements supprimés \ No newline at end of file From 2873f723e88c4c9b41928082e1969df101b19e04 Mon Sep 17 00:00:00 2001 From: Igor Nedoboy Date: Thu, 16 Jan 2020 20:12:21 +0000 Subject: [PATCH 16/75] Translated using Weblate (Russian) Currently translated at 100.0% (527 of 527 strings) --- app/src/main/res/values-ru/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 1da98cc74..975a9479b 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -330,7 +330,7 @@ Подогнать Заполнить Приблизить - Созданы автоматически + Создано автоматически Включить LeakCanary Мониторинг утечки памяти может привести к зависанию приложения Сообщать об ошибках жизненного цикла From 5dbab85505a1f20255dcc8cd566057f2fb12221d Mon Sep 17 00:00:00 2001 From: pjammo Date: Thu, 16 Jan 2020 16:07:08 +0000 Subject: [PATCH 17/75] Translated using Weblate (Italian) Currently translated at 100.0% (527 of 527 strings) --- app/src/main/res/values-it/strings.xml | 87 ++++++++++++++------------ 1 file changed, 46 insertions(+), 41 deletions(-) diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 4942f4720..9d9241045 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -30,9 +30,9 @@ URL non supportato Lingua Predefinita per Contenuti Video e Audio - Miniatura anteprima video + Copertina di anteprima video Riproduci video, durata: - Miniatura dell\'immagine di profilo dell\'utente + Immagine di profilo dell\'utente Non mi piace Mi piace Impossibile creare la cartella di download \'%1$s\' @@ -51,7 +51,7 @@ Riproduci Errore Errore di connessione - Impossibile caricare tutte le miniature + Impossibile caricare tutte le copertine Impossibile decriptare la firma dell\'URL del video Contenuto non disponibile Usa Tor @@ -117,19 +117,19 @@ È richiesta la risoluzione del reCAPTCHA Più tardi - Apri in modalità popup - Modalità popup di NewPipe - Riproduzione in Modalità Popup + Apri in modalità Popup + Modalità Popup di NewPipe + Riproduzione in modalità Popup Disattivato L\'audio potrebbe non essere disponibile per ALCUNE risoluzioni - In sottofondo + In Sottofondo Popup Risoluzione Predefinita Popup Mostra Altre Risoluzioni Solo alcuni dispositivi supportano la riproduzione video in 2K e 4K Formato Video Predefinito Ricorda Dimensione e Posizione Popup - Ricorda l\'ultima dimensione e posizione della finestra popup + Ricorda dimensione e posizione della finestra Popup Controllo Movimenti Lettore Multimediale Usa i movimenti per controllare luminosità e volume del lettore multimediale Suggerimenti Ricerca @@ -140,8 +140,8 @@ Cancella Ridimensionamento Risoluzione migliore - Questo permesso è necessario -\nper riprodurre in modalità popup + Questo permesso è necessario +\nper utilizzare il lettore Popup Impostazioni Informazioni Licenze di Terze Parti @@ -191,7 +191,7 @@ Playlist Annulla Notifiche NewPipe - Notifiche per NewPipe in background e per il lettore a comparsa + Notifiche per lettore in Sottofondo e Popup Nessun risultato Nessun iscritto @@ -225,25 +225,25 @@ Top 50 New & hot Mostra Suggerimento \"Tieni Premuto per Accocodare\" - Mostra suggerimento quando il pulsante per la riproduzione \"popup\" o \"in sottofondo\" viene premuto nella pagina dei dettagli del video - In Coda in Sottofondo - In Coda in Modalità Popup + Nella pagina dei dettagli del video, mostra un suggerimento alla pressione dei pulsanti per la riproduzione Popup o in Sottofondo + Accoda in Sottofondo + Accodato in Popup Riproduci tutto Impossibile riprodurre questo flusso Si è verificato un errore irreversibile Ripristino dell\'errore del lettore multimediale - Riproduzione in sottofondo - Riproduzione in modalità a comparsa + Riproduzione in Sottofondo + Lettore Popup Rimuovi Dettagli - Impostazioni audio - Tenere premuto per aggiungere alla coda + Impostazioni Audio + Tenere premuto per accodare [Sconosciuto] - In coda in sottofondo - In coda nel riproduttore a comparsa + Accoda in Sottofondo + Accoda in Popup Inizia la riproduzione qui Avvia riproduzione in sottofondo - Avvia riproduzione a comparsa + Avvia subito in Popup Dona Sito Visita il sito di NewPipe per informazioni e novità. @@ -251,9 +251,9 @@ Restituisci Paese Predefinito per Contenuti Cambia orientamento - Passa alla riproduzione in background + Passa in Sottofondo Passa a Popup - Passa alla produzione predefinita + Passa a Principale Servizio Apri il menu Chiudi il menu @@ -265,8 +265,8 @@ Nessun flusso video trovato Nessun flusso audio trovato Lettore video - Riproduzione in sottofondo - Riproduzione in modalità popup + Riproduzione in Sottofondo + Lettore Popup Raccogliendo informazioni… Caricamento del contenuto richiesto Importa database @@ -298,13 +298,13 @@ Rinomina Nome Aggiunti alla playlist - Imposta come miniatura della playlist + Imposta come Copertina della Playlist Segnalibri playlist Rimuovi segnalibro Eliminare la playlist\? Playlist creata Aggiunto alla Playlist - Miniatura della Playlist cambiata. + Copertina playlist cambiata. Impossibile eliminare la Playlist. Nessun Sottotitolo Rientrato @@ -352,7 +352,7 @@ Tieni presente che questa operazione può consumare una grande quantità di traffico dati. \n \nVuoi continuare? - Carica Anteprime + Carica Copertine Disabilita per prevenire il caricamento delle anteprime, risparmiando dati e memoria. La modifica di questa opzione cancellerà la cache delle immagini in memoria e sul disco. Cache immagini svuotata Pulisci Cache Metadati @@ -393,11 +393,11 @@ Avanzamento veloce durante il silenzio Step Reset - Minimizza al cambio dell\'applicazione - Azione quando si passa ad un\'altra app dal lettore video principale — %s - Nessuna - Minimizza al lettore in sottofondo - Minimizza al lettore popup + Riduci Cambiando App + Azione da eseguire cambiando app dal lettore video principale — %s + Niente + Riduci in Sottofondo + Riduci a Popup Canali Playlist Tracce @@ -423,7 +423,7 @@ Selezione Aggiornamenti Mostra una notifica per suggerire l\'aggiornamento dell\'app se una nuova versione è disponibile - Visualizzazione a lista + Modalità Visualizzazione Lista Lista Griglia Automatica @@ -433,14 +433,14 @@ Finito In attesa in pausa - in coda + accodato post-processo Accoda Azione negata dal sistema Download fallito Download terminato %s download terminati - Genera un nome unico + Genera Nome Univoco Sovrascrivi Esiste già un file scaricato con lo stesso nome C\'è un download in corso con questo nome @@ -484,11 +484,11 @@ File spostato o cancellato Esiste già un file con questo nome impossibile sovrascrivere il file - C\'è un download in corso con questo nome + C\'è un download in attesa con questo nome NewPipe è stato chiuso mentre lavorava sul file Spazio insufficiente sul dispositivo Progresso perso poiché il file è stato eliminato - Sei sicuro\? + Pulire la cronologia dei download o eliminare tutti i file scaricati\? Sarà avviato un solo dowload per volta Avvia downloads Metti in pausa i downloads @@ -519,10 +519,10 @@ Contenuti in Evidenza Predefiniti Durata Avanzamento e Riavvolgimento Rapidi Istanze PeerTube - Imposta le tue istanze PeerTube preferite - Trova le istanze più adatte a te su https://joinpeertube.org/instances#instances-list + Seleziona le istanze PeerTube preferite + Trova le istanze più adatte a te su %s Aggiungi Istanza - Inserisci URL Istanza + Inserisci URL istanza Impossibile convalidare l\'istanza Sono supportati solo gli URL HTTPS L\'istanza esiste già @@ -533,4 +533,9 @@ recupero Impossibile recuperare questo download Scegli un\'Istanza + Abilita Copertine sulla Schermata di Blocco + Durante la riproduzione in sottofondo, verrà mostrata la copertina del video sulla schermata di blocco + Svuota Cronologia Download + Elimina File Scaricati + %1$s download eliminati \ No newline at end of file From 1c53b22239b1ef4595a68a7f19390b86b206947a Mon Sep 17 00:00:00 2001 From: ssantos Date: Wed, 15 Jan 2020 20:13:19 +0000 Subject: [PATCH 18/75] Translated using Weblate (Portuguese) Currently translated at 100.0% (527 of 527 strings) --- app/src/main/res/values-pt/strings.xml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index 98b85bcab..7d3fb68e3 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -487,7 +487,7 @@ Não há espaço disponível no dispositivo Progresso perdido, porque o ficheiro foi eliminado Tempo limite de conexão - Tem a certeza\? + Quer limpar o seu histórico de descarregamentos ou apagar todos os ficheiros descarregados\? Limitar a fila de transferências Uma transferências será executada ao mesmo tempo Iniciar transferências @@ -534,4 +534,7 @@ Escolha uma instância Ativar miniatura do vídeo no ecrã de bloqueio Ao usar o reprodutor de fundo, uma miniatura de vídeo será exibida no ecrã de bloqueio + Limpar histórico de descarregamentos + Apagar ficheiros descarregados + %1$s descarregamentos apagados \ No newline at end of file From 9c9a432ea0240d33d43a9733ec08251c1c824b91 Mon Sep 17 00:00:00 2001 From: Osoitz Date: Sat, 18 Jan 2020 11:53:19 +0000 Subject: [PATCH 19/75] Translated using Weblate (Basque) Currently translated at 100.0% (527 of 527 strings) --- app/src/main/res/values-eu/strings.xml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/values-eu/strings.xml b/app/src/main/res/values-eu/strings.xml index b376f1f6d..7563e1be5 100644 --- a/app/src/main/res/values-eu/strings.xml +++ b/app/src/main/res/values-eu/strings.xml @@ -488,7 +488,7 @@ NewPipe itxi egin da fitxategian lanean zegoela Ez dago lekurik gailuan Progresioa galdu da, fitxategia ezabatu delako - Ziur al zaude\? + Zure deskargen historiala garbitu nahi duzu ala deskargatutako fitxategi guztiak ezabatu\? Mugatu deskargen ilara Deskarga bakarra aldi berean Hasi deskargak @@ -533,4 +533,9 @@ berreskuratzen Ezin da deskarga hau berreskuratu Aukeratu instantzia + Gaitu bideoaren iruditxoa blokeo pantailan + Bigarren planoko erreproduzigailua erabiltzean bideoaren iruditxo bat bistaratuko da blokeo pantailan + Garbitu deskargen historiala + Ezabatu deskargatutako fitxategiak + %1$s deskarga ezabatuta \ No newline at end of file From 36c4063db681c8769ed31d75a9d42f796badec88 Mon Sep 17 00:00:00 2001 From: B0pol Date: Fri, 17 Jan 2020 08:55:28 +0000 Subject: [PATCH 20/75] Translated using Weblate (Esperanto) Currently translated at 100.0% (527 of 527 strings) --- app/src/main/res/values-eo/strings.xml | 63 ++++++++++++++------------ 1 file changed, 33 insertions(+), 30 deletions(-) diff --git a/app/src/main/res/values-eo/strings.xml b/app/src/main/res/values-eo/strings.xml index 224e8837e..c6ce250e6 100644 --- a/app/src/main/res/values-eo/strings.xml +++ b/app/src/main/res/values-eo/strings.xml @@ -4,14 +4,14 @@ Eldonita je %1$s Instali Nuligi - Malfermi per krozilo + Malfermi en retumilo Konigi Elŝuti Serĉi Agordoj Ĉu vi signifis: %1$s\? Konigi kun - Elekti krozilon + Elekti retumilon turno Uzi eksteran filmetoludilon Uzi eksteran sonludilon @@ -66,7 +66,7 @@ Signali eraron Filmeto Reprovi - Premu serĉo por komenci + Premi serĉon por komenci Neniu elsendlflua ludilo trovita (instalu VLC por ludi ĝin). Malfermi en ŝprucfenestron modon Forigas aŭdon ĉe KELKAJ rezolucioj @@ -144,7 +144,7 @@ Konservi la historio de serĉo lokale Rigardu historion Spuri la viditajn filmetojn - Newpipe Sciifo + NewPipe Sciigo Sciigoj por NewPipe fono kaj ŝprucfenestroj ludiloj Ludilo Konduto @@ -159,7 +159,7 @@ Montri indikon kiam la fono aŭ ŝprucfenestro butono estas premita en la retpaĝo de dalatadoj de la filmeto Viciĝita en la ludilo en fono Viciĝita en ŝprucfenestro ludilo - Ludi ĉiuj + Ludi ĉiujn Ne povis ludi tion torenton Neatendebla eraro de ludilo okazis Reakiri el eraro de la ludilo @@ -180,7 +180,7 @@ Ŝangi al Ĉefa Servo Ĉiam - Nur unfoje + Nur unufoje Nevalida ligilo Neniuj filmeta torentoj trovitaj Neniuj sonaj torentoj trovis @@ -191,18 +191,18 @@ Eksporti historion, abonojn kaj ludlistoj Ĉiam peti Nova ludlisto - Forigi + Forviŝi Alinomi Nomo Aldoni al la ludlisto Meti kiel bildeto de ludlisto Legosigno Ludlisto - Forigi Legosignon - Ĉu forigi ĉi tiun ludliston \? + Forviŝi Legosignon + Ĉu forviŝi ĉi tiun ludliston \? Ludlisto kreita Ludlistita Bildeto de ludlisto ŝanĝiĝita. - Ne povis forigi ludlisto. + Ne povis forviŝi ludliston. Malcimigi Auto-vico sekva fluo Aŭto-aldoni rilatan enhavon kiam ludanta la lasta enhavo en malrepetita atendovico @@ -218,7 +218,7 @@ \n3. Elŝuto devus komenci (ĝi estas la dosiero de eksporto) Importu Soundcloud-n profilon tajpante ĉu la ligilon, ĉu vian ID : \n -\n1. Ebligu komputilon modon en krozilo (la retejo malhaveblas por poŝtelefonoj) +\n1. Ebligu komputilon modon en retumilon (la retejo malhaveblas por poŝtelefonoj) \n2. Iru tien: %1$s \n3. Ensalutu kiam oni petas vin \n4. Kopiu la ligilon de profilo ke oni kondikis vin. @@ -252,7 +252,7 @@ Ĝisdatigoj Dosiero forviŝita Sciigo por ĝisdatigi apon - Sciigo por nova versio de Newpipe + Sciigo por nova versio de NewPipe Ekstera konservejo malhavebla Elŝuti al ekstera SD-karto ne eblas. Ĉu vi volas restarigi la elŝutan dosierujon \? viciĝita @@ -281,7 +281,7 @@ Ludaj pozicioj forviŝitaj. Dosiero movita aŭ forviŝita ne povas dispremi la dosieron - Ĉu vi certas\? + Ĉu vi volas forviŝi vian historion de elŝutoj aŭ forviŝi la tutajn elŝutitajn dosierojn\? Limigi la elŝutan atendovicon Unu elŝuto ruliĝos en la sama tempo Komenci elŝutojn @@ -307,7 +307,7 @@ Komenci Paŭzigi Ludi - Forigi + Forviŝi Kontrolsumo Nova misio Bone @@ -341,7 +341,7 @@ Permesiloj Rigardu ĉe GitHub Permesilo de NewPipe - Ĉu vi havas ideojn pri; traduko, desegnaĵoj ŝanĝoj, purigado de kodo, aŭ realaj masivaj ŝanĝoj—helpo estas ĉiam bonvena. Ju pli oni faras, des pli bonas! + Ĉu vi havas ideojn pri; traduko, desegnaĵoj ŝanĝoj, purigado de kodo, aŭ realaj masivaj ŝanĝoj—helpo ĉiam estas bonvena. Ju pli oni faras, des pli bonas! Legi permesilon Kontribui Permesitaj karakteroj en dosiernomoj @@ -353,7 +353,7 @@ La historio estas malŝatita Historio La historio estas malplena - Historio vakigita + Historio forviŝita Neniuj rezultoj Neniu enhavo Neniuj abonantoj @@ -377,10 +377,10 @@ Komenci ludi ĉi tie Komenci ludi fone Donaci - NewPipe estas programada par volontuoj, elspezante tempo por alporti vin la plej bona sperto. Redonu por helpi programistojn plibonigi NewPipe dum ĝuante tason da kafo. + NewPipe estas programadita par volontuoj, elspezante tempo por alporti vin la plej bona sperto. Redoni por helpi programistojn plibonigi NewPipe dum ĝuante tason da kafo. Redoni Retejo - Vizitu la retejon de NewPipe por pli da informoj kaj novaĵoj. + Viziti la retejon de NewPipe por pli da informoj kaj novaĵoj. Malfermi la tirkeston Fermi la tirtekston Ekstaraj ludantoj ne suportas tiajn ligilojn @@ -395,8 +395,8 @@ Ĉi tio nuligos vian nunan aranĝon. Trenu por reorgidi Krei - Forigi Unu - Forigi ĉiujn + Forviŝi Unu + Forviŝi ĉiujn Rezigni Alinomi Ĉu vi volas forviŝi tion eron el la spekta historio \? @@ -440,11 +440,11 @@ NewPipe estas programaro sub rajtoceda permesilo: Vi povas uzi, studi, komuniki kaj plibonigi ĝin kiel vi volas. Precize, vi povas redistribui kaj/aŭ modifi ĝin sub la kondiĉoj de la Ĝenerala Publika Permesilo de GNU, kiel publikigita per la Free Software Foundation, ĉu en la versio 3, ĉu (se vi volas) ajna posta versio. Ĉu vi volas ankaŭ importi agordojn\? Privateca politiko de NewPipe - La NewPipe projekto serioze respektas vian privatecon. Konsekvence, la apo ne kolektas ajnan datumo sen via konsento. -\nLa privateco politiko de Newpipe detale eksplikas kion datumon estas sendita kaj stokita kiam vi sendas falegosignalon. + La NewPipe projekto serioze respektas vian privatecon. Konsekvence, la apo ne kolektas ajnan datumon sen via konsento. +\nLa privateco politiko de NewPipe detale eksplikas kion datumon estas sendita kaj stokita kiam vi sendas falegosignalon. Legi la privatecan politikon Por konformiĝi al la Ĝenerala Datum-Protekta Regularon (GDPR), ni allogas vian atenton al la privateca politiko de NewPipe. Bonvolu atentive legi ĝin. -\nVi devas akcepti ĝin por sendi nin la cimsignalo. +\nVi devas akcepti ĝin por sendi la cimsignalon al ni. Akcepti Rifuzi Neniu limo @@ -468,8 +468,8 @@ Krado Aŭto Ŝanĝi vidon - Ĝisdatigo de NewPipe havebla ! - Premu por elŝuti + Ĝisdatigo de NewPipe havebla! + Premi por elŝuti Finita Pritraktata Paŭzigita @@ -507,8 +507,8 @@ Defaŭlta Kiosko Neniu spektas - %s spektanta - %s spektanta + %s spektanto + %s spektantoj Neniu aŭskultas @@ -525,13 +525,16 @@ Ne povis validigi instanco Nur HTTPS ligiloj estas subtenitaj La instanco jam ekzistas - Loka - Freŝdate ĝisdatigita - La plej ŝatitatj + Lokaj + Freŝe aldonitaj + La plej ŝatitaj Aŭtomate generita (neniu alŝutilo trovita) Reakiranta Ne povas reakiri tion elŝuton Elektu instancon Enablu bildeta filmeton ĉe ŝlosita ekrano Uzante la fona ludilo, bildeta filmeto vidiĝos ĉe ŝlosita ekrano + Forviŝi la historion de elŝutoj + Forviŝi elŝutitajn dosierojn + %1$s elŝutoj forviŝitaj \ No newline at end of file From 84dd1a688eb5d7329289384b00bc2460e84c6aea Mon Sep 17 00:00:00 2001 From: zeritti Date: Fri, 17 Jan 2020 21:40:15 +0000 Subject: [PATCH 21/75] Translated using Weblate (Czech) Currently translated at 100.0% (527 of 527 strings) --- app/src/main/res/values-cs/strings.xml | 35 ++++++++++++++++++++------ 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml index 66c952a26..548358473 100644 --- a/app/src/main/res/values-cs/strings.xml +++ b/app/src/main/res/values-cs/strings.xml @@ -143,7 +143,7 @@ otevření ve vyskakovacím okně Zobrazovat návrhy při vyhledávání Historie vyhledávání Hledané výrazy lokálně uchovávat - Historie zhlédnutí + Historie sledování Evidovat zhlédnutá videa Přehrávat po přechodu do popředí Pokračovat v přehrávání po přerušení (např. hovor) @@ -319,7 +319,7 @@ otevření ve vyskakovacím okně Povolit službu LeakCanary Monitoring úniku paměti může způsobit nereagování aplikace při heap dumpingu Nahlásit mimo-cyklické chyby - Vynutit vykazování výjimek Rx mimo fragment nebo životnost cyklu po odstranění + Vynutit hlášení nedoručitelných výjimek Rx mimo fragment nebo trvání činnosti po odstranění Použít rychlé nepřesné hledání Nepřesné hledání umožní přehrávači posouvat se rychleji, ale se sníženou přesností Načítat náhledy @@ -365,7 +365,7 @@ otevření ve vyskakovacím okně \n \nChcete pokračovat? Ovládání rychlosti přehrávání - Rychlost + Tempo Výška tónu Rozpojit (může způsobit zkreslení) Výchozí nastavení @@ -483,8 +483,8 @@ otevření ve vyskakovacím okně Zavřít Stahování na externí SD kartu není možné. Resetovat umístění složky pro stahování\? Pokračovat v přehrávání - Obnovit poslední přehrávanou pozici - Pořadí v seznamech + Obnovit poslední pozici přehrávání + Pozice v seznamech Vymazat data Soubor přemístěn nebo smazán soubor nelze přepsat @@ -492,7 +492,7 @@ otevření ve vyskakovacím okně NewPipe byl ukončen v průběhu zpracovávání souboru V zařízení nezbývá žádné místo Postup ztracen, protože soubor byl smazán - Jste si jisti\? + Jste si jisti smazáním své historie stahování nebo smazáním všech stažených souborů\? Omezit frontu stahování Najednou se bude stahovat pouze jeden soubor Začít stahování @@ -504,7 +504,7 @@ otevření ve vyskakovacím okně Použít SAF Storage Access Framework umožňuje stahovat na externí SD kartu. \nUpozornění: některá zařízení jsou nekompatibilní - Ukázat poziční indikátory playbacku v seznamech + Zobrazit pozici přehrávání v seznamech Pozice playbacku smazány. Timeout spojení Smazat pozice playbacku @@ -526,4 +526,25 @@ otevření ve vyskakovacím okně Ke změně jazyka dojde po restartu aplikace. Výchozí kiosek + Délka přetočení vpřed/zpět + Instance PeerTube + Vybrat oblíbené instance PeerTube + Vyhledat nejvhodnější instance na %s + Přidat instanci + Zadat URL instance + Instanci nebylo možno potvrdit + Podporujeme pouze URL s HTTPS + Instance již existuje + Místní + Přidány nedávno + Nejoblíbenější + Autogenerovány (uploader nenalezen) + obnovuji + Toto stahování nelze obnovit + Vyberte instanci + Zapnout náhled videa na zamknuté obrazovce + Hraje-li video na pozadí, náhled videa se ukáže na zamknuté obrazovce + Smazat historii stahování + Smazat stažené soubory + Smazat %1$s stahování \ No newline at end of file From de1a92539a658e77bbbc59716c40be4a38c48d22 Mon Sep 17 00:00:00 2001 From: thami simo Date: Thu, 16 Jan 2020 04:11:00 +0000 Subject: [PATCH 22/75] Translated using Weblate (Arabic) Currently translated at 100.0% (527 of 527 strings) --- app/src/main/res/values-ar/strings.xml | 62 ++++++++++++++------------ 1 file changed, 34 insertions(+), 28 deletions(-) diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml index b1dad5672..02f79c8ab 100644 --- a/app/src/main/res/values-ar/strings.xml +++ b/app/src/main/res/values-ar/strings.xml @@ -20,7 +20,7 @@ يتم تخزين ملفات الفيديو التي تم تنزيلها هنا مجلد تحميل الفيديو "لا يمكن إنشاء مجلد للتنزيلات في '%1$s'" - دليل التنزيل الذي تم إنشاؤه \'%1$s\' + إنشاء دليل التحميل \'%1$s\' تثبيت تطبيق Kore غير موجود. هل تريد تثبيته ؟ مضيء @@ -42,7 +42,7 @@ مشاركة مشاركة بواسطة عرض مقاطع الفيديو \"التالية\" و \"المشابهة\" - عرض خيارات تشغيل الفيديو من خلال مركز كودي ميديا + اعرض خيار لتشغيل الفيديو عبر مركز وسائط Kodi عرض خيار التشغيل بواسطة كودي السمة تم النشر يوم %1$s @@ -57,7 +57,7 @@ خطأ تعذرت عملية تحليل الموقع تعذر فك تشفير توقيع رابط الفيديو - اضغط بحث للبدء + انقر فوق بحث لتبدأ اشتراك مشترك الرئيسية @@ -69,8 +69,8 @@ مراقبة السجل التاريخ و ذاكرة التخزين المؤقت محتوى - الملفات المحملة - الملفات المحملة + التحميلات + التحميلات الجميع القناة الفيديو @@ -80,7 +80,7 @@ التاريخ التاريخ فتح في وضع منبثق - إزالة الصوت في بعض مستوى الدقة + يزيل الصوت في بعض القرارات وضع النوافذ المنبثقة NewPipe تم إلغاء الاشتراك في القناة تعذر تغيير حالة الاشتراك @@ -113,7 +113,7 @@ محتوى مقيد بحسب العمر "إظهار الفيديو المقيد بحسب العمر. يمكن السماح باستخدام هذه المواد من \"الإعدادات\"." بث مباشر - تقرير عن مشكلة + تقرير خطأ قائمة التشغيل نعم لاحقاً @@ -155,15 +155,15 @@ تم رفض إذن الوصول إلى التخزين ألف مليون - G + B ليس هناك مشترِكون - %s لا يوجد مشاركين + %s لا يوجد مشترك %s مشترك - %s مشاريكان - %s اشتراكات - %s مشاركون - %s اشتراك + %s المشتركين + %s المشتركين + %s المشتركين + %s المشتركين دون مشاهدات لاتوجد فيديوهات @@ -200,7 +200,7 @@ فتح الموقع المساهمون التراخيص - تطبيق مجاني خفيف الوزن وبث حي على نظام أندرويد. + تطبيق مجاني خفيف البث على أندرويد. ساهم إذا كانت لديك أفكار؛ أو ترجمة، أو تغييرات تخص التصميم، أو تنظيف و تحسين الشفرة البرمجية ، أو تعديلات عميقة عليها، فتذكر أنّ مساعدتك دائما موضع ترحيب. وكلما أتممنا شيئا كلما كان ذلك أفضل ! عرض على GitHub @@ -238,12 +238,12 @@ تحدي الكابتشا ضغط مطول للإدراج الى قائمة الانتظار - %s بدون مشهد - %s شاهد - %s مشاهدتان - %s مشاهدات - %s مشاهدون - %s شاهدو + %s بدون مشهادة + %s مشاهدة + %s مشاهدة + %s مشاهدة + %s مشاهدة + %s مشاهدة فيديوهات @@ -425,7 +425,7 @@ تتبيه تحديث التطبيق إيماءة التحكم بالصوت الأحداث - إخطارات لنسخة NewPipe الجديدة + الإخطارات لإصدار NewPipe الجديد وحدة التخزين الخارجية غير متوفرة "التنزيل على بطاقة SD الخارجية غير ممكن. إعادة تعيين موقع مجلد التحميل؟" باستخدام علامات التبويب الافتراضية ، خطأ أثناء قراءة علامات التبويب المحفوظة @@ -449,7 +449,7 @@ متوقف في قائمة الانتظار قيد المعالجة - قائمه انتظار + طابور تم رفضها من قبل النظام فشل التنزيل تم الانتهاء من التحميل @@ -504,7 +504,7 @@ لم يتبقى مساحة في الجهاز تم فقد التقدم بسبب حذف الملف انتهى وقت الاتصال - هل أنت واثق؟ + هل تريد محو سجل التنزيل أو حذف جميع الملفات التي تم تنزيلها؟ حد قائمة انتظار التنزيل سيتم تشغيل تنزيل واحد في نفس الوقت بدء التنزيلات @@ -542,11 +542,11 @@ تسريع إلى الأمام/-ترجيع وقت البحث مثيلات خوادم پيرتيوب - عيّن مثيلات خوادم پيرتيوب التي تُفضّلها + حدد مثيلات PeerTube المفضلة لديك إضافة نموذج - أدخل رابط مثيل الخادم - فشل في التحقق من مثيل الخادم - فقط عناوين https المدعومة + أدخل عنوان URL للمثيل + لا يمكن التحقق من صحة المثال + يتم دعم عناوين URL HTTPS فقط مثيل الخادم موجود بالفعل محلي أضيف مؤخرا @@ -554,5 +554,11 @@ تم إنشاؤه-تلقائيًا (لم يتم العثور على برنامج تحميل) استرد لا يمكن استرداد هذا التنزيل - اختيار مثيل خادم + اختيار مثيل + ابحث عن الحالات التي تناسبك على %s + تمكين صور مصغرة قفل شاشة فيديو + عند استخدام مشغل الخلفية ، سيتم عرض صورة مصغرة للفيديو على شاشة القفل + تنظيف تاريخ التحميل + حذف الملفات التي تم تنزيلها + التنزيلات %1$s المحذوفة \ No newline at end of file From 7e9345680578174a24043e89fb47eebb03600fd2 Mon Sep 17 00:00:00 2001 From: zmni Date: Fri, 17 Jan 2020 16:25:26 +0000 Subject: [PATCH 23/75] Translated using Weblate (Indonesian) Currently translated at 99.8% (526 of 527 strings) --- app/src/main/res/values-id/strings.xml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/values-id/strings.xml b/app/src/main/res/values-id/strings.xml index 8677df678..dd8413be8 100644 --- a/app/src/main/res/values-id/strings.xml +++ b/app/src/main/res/values-id/strings.xml @@ -480,7 +480,7 @@ NewPipe telah ditutup saat sedang memproses berkas Tidak ada ruang kosong tersisa pada perangkat Kehilangan laju, karena berkas telah dihapus - Apakah anda yakin\? + Apakah anda yakin ingin menghapus semua riwayat unduhan dan berkas yang telah diunduh\? Batasi antrean unduhan Satu unduhan akan berjalan pada waktu yang bersamaan Mulai unduh @@ -527,4 +527,8 @@ Pilih situs Aktifkan kunci layar thumbnail video Ketika menggunakan pemutar latar belakang, thumbnail video akan ditampilkan di tampilan kunci layar + Kiosk Default + Hapus riwayat unduhan + Hapus berkas yang diunduh + %1$s unduhan dihapus \ No newline at end of file From 366c55c8f49b9578b5ef6fcfe9ff1d2aa01bfc6a Mon Sep 17 00:00:00 2001 From: B0pol Date: Fri, 17 Jan 2020 09:02:16 +0000 Subject: [PATCH 24/75] Translated using Weblate (Polish) Currently translated at 100.0% (527 of 527 strings) --- app/src/main/res/values-pl/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index 0da89ad48..4d2b38b5f 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -543,5 +543,5 @@ Podczas korzystania z odtwarzacza w tle na ekranie blokady zostanie wyświetlona miniatura filmu Wyczyść historię pobierania Usuń pobrane pliki - Usunięte% 1$s pobrania + Usunięte %1$s pobrania \ No newline at end of file From 4797cd91840a51e26728a97d111af002282da97c Mon Sep 17 00:00:00 2001 From: Matsuri Date: Sat, 18 Jan 2020 03:50:06 +0000 Subject: [PATCH 25/75] Translated using Weblate (Chinese (Simplified)) Currently translated at 98.5% (519 of 527 strings) --- .../main/res/values-b+zh+HANS+CN/strings.xml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/app/src/main/res/values-b+zh+HANS+CN/strings.xml b/app/src/main/res/values-b+zh+HANS+CN/strings.xml index 078379683..4538fc184 100644 --- a/app/src/main/res/values-b+zh+HANS+CN/strings.xml +++ b/app/src/main/res/values-b+zh+HANS+CN/strings.xml @@ -130,8 +130,8 @@ 没有结果 没有订阅者 - %s个订阅者 - + %s 位订阅者 + 没有视频 拖动以重新排序 @@ -410,8 +410,8 @@ NewPipe 项目非常重视您的隐私。因此,未经您的同意,应用程序不会收集任何数据。 \nNewPipe 的隐私政策详细解释了在发送崩溃报告时发送和存储的数据。 阅读隐私政策 - 为了遵守欧洲一般数据保护条例 (GDPR),我们提请您注意 NewPipe 的隐私政策。请仔细阅读。 -\n您必须接受它才能向我们发送错误报告。 + 为了遵守欧盟的《通用数据保护条例》(GDPR),我们特此提醒您注意 NewPipe 的隐私政策。请您仔细阅读。 +\n您必须在同意以后才能向我们发送错误报告。 接受 拒绝 无限制 @@ -504,15 +504,15 @@ 删除所有播放位置记录? 更改下载目录让内容生效 『时下流行』页-默认 - 无人在线观看 + 没有人在观看 %s 人在观看 - 没人在听 + 没有人在听 %s 人在听 - + 重新启动应用后,语言将更改。 PeerTube 服务器 @@ -531,8 +531,8 @@ 无法恢复此下载 选择一个服务器 快进 / 快退的单位时间 - 在锁屏界面显示视频缩略图 - 在后台播放时,锁屏界面将会显示视频的缩略图 + 在锁屏上显示视频缩略图 + 在后台播放时,锁屏上将会显示视频的缩略图 清除下载历史记录 删除下载了的文件 已删除 %1$s 下载 From 62906fb84a294fd847274b0f7e9ed10136915bfe Mon Sep 17 00:00:00 2001 From: Jeff Huang Date: Fri, 17 Jan 2020 03:52:10 +0000 Subject: [PATCH 26/75] Translated using Weblate (Chinese (Traditional)) Currently translated at 100.0% (527 of 527 strings) --- app/src/main/res/values-zh-rTW/strings.xml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index 6cb16623f..b82736f90 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -480,7 +480,7 @@ NewPipe 在處理檔案時被關閉 裝置上沒有剩餘的空間 進度遺失,因為檔案已被刪除 - 您確定? + 您想要清除您的下載歷史紀錄或刪除所有已下載的檔案嗎? 限制下載佇列 一次執行一個下載 開始下載 @@ -531,4 +531,7 @@ 選擇一個站臺 啟用鎖定畫面影片縮圖 使用背景播放器時,鎖定畫面上將會顯示影片縮圖 + 清除下載歷史紀錄 + 刪除已下載的檔案 + 已刪除 %1$s 個下載 \ No newline at end of file From b6028cef5bf2df810774396cd1e19ef316a18785 Mon Sep 17 00:00:00 2001 From: MohammedSR Vevo Date: Fri, 17 Jan 2020 16:14:04 +0000 Subject: [PATCH 27/75] Translated using Weblate (Kurdish) Currently translated at 100.0% (527 of 527 strings) --- app/src/main/res/values-ku/strings.xml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/values-ku/strings.xml b/app/src/main/res/values-ku/strings.xml index 50350e1b3..b6d8bb877 100644 --- a/app/src/main/res/values-ku/strings.xml +++ b/app/src/main/res/values-ku/strings.xml @@ -517,7 +517,7 @@ بیرگەی ناوەکیت پڕبووە کردارەکە شکستی هێنا, چونکە ئەو فایلە سڕاوەتەوە هێڵی ئینتەرنێت نەما - ئایا دڵنیای؟ + ئایا دەتەوێ مێژووی داگرتنەکانت بسڕدرێنەوە یان هەموو فایلە داگیراوەکان بسڕدرێنەوە؟ سنوری ڕیزبوونی داگرتنەکان تەنها یەک داگرتن کاردەکات لەیەک کاتدا دەستپێکردنەوەی داگرتنەکان @@ -538,4 +538,7 @@ دۆخێک هەڵبژێرە چالاککردنی وێنۆچکەی ڤیدیۆی داخستنی ڕوونما کاتێ کارپێکەری پاشبنەما کاردەکات ئەوا وێنۆچکەی ڤیدیۆکە لە ڕوونما داخراوەکەدا نیشاندەدرێت + سڕینەوەی مێژووی داگرتن + سڕینەوەی فایلە داگیراوەکان + %1$ لە داگرتنەکان سڕانەوە \ No newline at end of file From 0e39071b5e19df627b416cdf1aae143f125bb99c Mon Sep 17 00:00:00 2001 From: B0pol Date: Fri, 17 Jan 2020 23:18:47 +0000 Subject: [PATCH 28/75] Translated using Weblate (Urdu) Currently translated at 94.3% (497 of 527 strings) --- app/src/main/res/values-ur/strings.xml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/src/main/res/values-ur/strings.xml b/app/src/main/res/values-ur/strings.xml index 724c9c3ed..d885cb915 100644 --- a/app/src/main/res/values-ur/strings.xml +++ b/app/src/main/res/values-ur/strings.xml @@ -1,7 +1,7 @@ شروع کرنے کے لیے تلاش پر ٹیپ کریں - ملاحظات + ملاحظات s$1% کوشائع ہوا انسٹال منسوخ کریں @@ -193,13 +193,13 @@ بی کوئی صارفین نہیں - s% صارف - s% صارفین + %s صارف + %s صارفین کوئی مناظر نہیں - s% منظر - s% مناظر + %s منظر + %s مناظر ویڈیوز دستیاب نہیں @@ -306,7 +306,7 @@ دراز بند کریں یہاں جلد ہی کچھ نظر آئے گا D D ترجیح \' کھلی \' عمل - مواد کھولنے پر ڈیفالٹ کارروائی — s% + مواد کھولنے پر ڈیفالٹ کارروائی — %s ویڈیو پلیئر پس منظر پلیئر پوپ اپ پلیئر @@ -437,7 +437,7 @@ سسٹم نےکارروائی سے انکار کیا گیا ڈاؤن لوڈ ناکام ڈاؤن لوڈ تکمیل - s% ڈاؤن لوڈ مکمل ہوگئے + %s ڈاؤن لوڈ مکمل ہوگئے منفرد نام بنائیں برتحریر اس نام کے ساتھ ایک ڈاؤن لوڈ جاری ہے From cf60033424888963c07a3327913d8371a0dafe95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Allan=20Nordh=C3=B8y?= Date: Thu, 16 Jan 2020 05:28:38 +0000 Subject: [PATCH 29/75] =?UTF-8?q?Translated=20using=20Weblate=20(Norwegian?= =?UTF-8?q?=20Bokm=C3=A5l)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently translated at 96.4% (508 of 527 strings) --- app/src/main/res/values-nb-rNO/strings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/values-nb-rNO/strings.xml b/app/src/main/res/values-nb-rNO/strings.xml index d01647f5d..0c4ee8dde 100644 --- a/app/src/main/res/values-nb-rNO/strings.xml +++ b/app/src/main/res/values-nb-rNO/strings.xml @@ -524,6 +524,6 @@ Tøm nedlastingshistorikk Slett nedlastede filer Slettet %1$s nedlastninger - Aktiver videominiatyrbilde med låseskjerm - Når du bruker bakgrunnsspilleren, vises en videominiaturbilde på låseskjermen + Aktiver videominiatyrbilde på låseskjerm + Når du bruker bakgrunnsspilleren, vises ent videominiatyrbilde på låseskjermen \ No newline at end of file From 0ed3354cee6e4e3021263ecdd1b2253dfe144838 Mon Sep 17 00:00:00 2001 From: Xiang Rong Lin <41164160+XiangRongLin@users.noreply.github.com> Date: Tue, 21 Jan 2020 20:56:06 +0100 Subject: [PATCH 30/75] Use custom dialog to edit and delete local playlists at once --- .../local/bookmark/BookmarkFragment.java | 73 +++++-------------- .../newpipe/local/dialog/BookmarkDialog.kt | 47 ++++++++++++ app/src/main/res/layout/dialog_bookmark.xml | 51 +++++++++++++ app/src/main/res/values/strings.xml | 1 + 4 files changed, 118 insertions(+), 54 deletions(-) create mode 100644 app/src/main/java/org/schabi/newpipe/local/dialog/BookmarkDialog.kt create mode 100644 app/src/main/res/layout/dialog_bookmark.xml diff --git a/app/src/main/java/org/schabi/newpipe/local/bookmark/BookmarkFragment.java b/app/src/main/java/org/schabi/newpipe/local/bookmark/BookmarkFragment.java index 6a7f16025..bfd90acda 100644 --- a/app/src/main/java/org/schabi/newpipe/local/bookmark/BookmarkFragment.java +++ b/app/src/main/java/org/schabi/newpipe/local/bookmark/BookmarkFragment.java @@ -1,13 +1,9 @@ package org.schabi.newpipe.local.bookmark; import android.app.AlertDialog; -import android.content.DialogInterface; -import android.content.res.Resources; import android.os.Bundle; import android.os.Parcelable; import android.util.Log; -import android.widget.EditText; -import android.widget.TextView; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.fragment.app.FragmentManager; @@ -26,6 +22,7 @@ import org.schabi.newpipe.database.playlist.PlaylistLocalItem; import org.schabi.newpipe.database.playlist.PlaylistMetadataEntry; import org.schabi.newpipe.database.playlist.model.PlaylistRemoteEntity; import org.schabi.newpipe.local.BaseLocalListFragment; +import org.schabi.newpipe.local.dialog.BookmarkDialog; import org.schabi.newpipe.local.playlist.LocalPlaylistManager; import org.schabi.newpipe.local.playlist.RemotePlaylistManager; import org.schabi.newpipe.report.UserAction; @@ -124,34 +121,7 @@ public final class BookmarkFragment @Override public void held(LocalItem selectedItem) { if (selectedItem instanceof PlaylistMetadataEntry) { - final Resources resources = getContext().getResources(); - String[] commands = new String[]{ - resources.getString(R.string.rename_playlist), - resources.getString(R.string.delete_playlist) - }; - - final DialogInterface.OnClickListener actions = (dialogInterface, i) -> { - switch (i) { - case 0: - showLocalRenameDialog((PlaylistMetadataEntry) selectedItem); - break; - case 1: - showLocalDeleteDialog((PlaylistMetadataEntry) selectedItem); - break; - } - }; - - final View bannerView = View.inflate(activity, R.layout.dialog_title, null); - bannerView.setSelected(true); - TextView titleView = bannerView.findViewById(R.id.itemTitleView); - titleView.setText(((PlaylistMetadataEntry) selectedItem).name); - - new AlertDialog.Builder(getActivity()) - .setCustomTitle(bannerView) - .setItems(commands, actions) - .create() - .show(); - + showLocalDialog((PlaylistMetadataEntry) selectedItem); } else if (selectedItem instanceof PlaylistRemoteEntity) { showRemoteDeleteDialog((PlaylistRemoteEntity) selectedItem); } @@ -279,14 +249,27 @@ public final class BookmarkFragment // Utils /////////////////////////////////////////////////////////////////////////// - private void showLocalDeleteDialog(final PlaylistMetadataEntry item) { - showDeleteDialog(item.name, localPlaylistManager.deletePlaylist(item.uid)); - } - private void showRemoteDeleteDialog(final PlaylistRemoteEntity item) { showDeleteDialog(item.getName(), remotePlaylistManager.deletePlaylist(item.getUid())); } + private void showLocalDialog(PlaylistMetadataEntry selectedItem) { + BookmarkDialog dialog = new BookmarkDialog(getContext(), + selectedItem.name, new BookmarkDialog.OnClickListener() { + @Override + public void onDeleteClicked() { + showDeleteDialog(selectedItem.name, + localPlaylistManager.deletePlaylist(selectedItem.uid)); + } + + @Override + public void onSaveClicked(@NonNull String name) { + changeLocalPlaylistName(selectedItem.uid, name); + } + }); + dialog.show(); + } + private void showDeleteDialog(final String name, final Single deleteReactor) { if (activity == null || disposables == null) return; @@ -303,24 +286,6 @@ public final class BookmarkFragment .show(); } - private void showLocalRenameDialog(PlaylistMetadataEntry selectedItem) { - final View dialogView = View.inflate(getContext(), R.layout.dialog_playlist_name, null); - EditText nameEdit = dialogView.findViewById(R.id.playlist_name); - nameEdit.setText(selectedItem.name); - nameEdit.setSelection(nameEdit.getText().length()); - - final AlertDialog.Builder dialogBuilder = new AlertDialog.Builder( - getContext()) - .setTitle(R.string.rename_playlist) - .setView(dialogView) - .setCancelable(true) - .setNegativeButton(R.string.cancel, null) - .setPositiveButton(R.string.rename, (dialogInterface, i) -> { - changeLocalPlaylistName(selectedItem.uid, nameEdit.getText().toString()); - }); - dialogBuilder.show(); - } - private void changeLocalPlaylistName(long id, String name) { if (localPlaylistManager == null) { return; diff --git a/app/src/main/java/org/schabi/newpipe/local/dialog/BookmarkDialog.kt b/app/src/main/java/org/schabi/newpipe/local/dialog/BookmarkDialog.kt new file mode 100644 index 000000000..dd20e88a0 --- /dev/null +++ b/app/src/main/java/org/schabi/newpipe/local/dialog/BookmarkDialog.kt @@ -0,0 +1,47 @@ +package org.schabi.newpipe.local.dialog + +import android.app.Dialog +import android.content.Context +import android.os.Bundle +import android.view.Window +import android.widget.Button +import android.widget.EditText +import org.schabi.newpipe.R + +class BookmarkDialog( + context: Context, + private val playlistName: String, + val listener: OnClickListener) + : Dialog(context) { + + private lateinit var editText: EditText + + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + requestWindowFeature(Window.FEATURE_NO_TITLE) + setContentView(R.layout.dialog_bookmark) + initListeners() + } + + private fun initListeners() { + editText = findViewById(R.id.playlist_name_edit_text); + editText.setText(playlistName) + + findViewById