From 92f7e04757747bc0c6f7602904bc26adcf2282b5 Mon Sep 17 00:00:00 2001 From: Austin Huang Date: Mon, 2 Nov 2020 17:09:35 -0500 Subject: [PATCH] more general maintenance --- app/build.gradle | 4 ++++ .../java/awais/instagrabber/utils/LocaleUtils.java | 1 + .../webservices/AddCookiesInterceptor.java | 5 +++++ app/src/main/res/values-de/strings.xml | 2 -- app/src/main/res/values-es/strings.xml | 2 -- app/src/main/res/values-fa/strings.xml | 2 -- app/src/main/res/values-fr/strings.xml | 2 -- app/src/main/res/values-hi/strings.xml | 2 -- app/src/main/res/values-in/strings.xml | 2 -- app/src/main/res/values-it/strings.xml | 2 -- app/src/main/res/values-mk/strings.xml | 2 -- app/src/main/res/values-pl/strings.xml | 2 -- app/src/main/res/values-pt/strings.xml | 2 -- app/src/main/res/values-tr/strings.xml | 2 -- app/src/main/res/values-vi/strings.xml | 2 -- app/src/main/res/values-zh/strings.xml | 2 -- app/src/main/res/values/strings.xml | 10 +++++----- gradle/wrapper/gradle-wrapper.properties | 8 +++++--- 18 files changed, 20 insertions(+), 34 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 2d862706..d72cf3c2 100755 --- a/app/build.gradle +++ b/app/build.gradle @@ -82,4 +82,8 @@ dependencies { debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.5' testImplementation 'org.junit.jupiter:junit-jupiter:5.7.0' + + // temporary + implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.4.10' + implementation 'org.jetbrains:annotations:13.0' } diff --git a/app/src/main/java/awais/instagrabber/utils/LocaleUtils.java b/app/src/main/java/awais/instagrabber/utils/LocaleUtils.java index 5ddd7bdc..01b52bd3 100755 --- a/app/src/main/java/awais/instagrabber/utils/LocaleUtils.java +++ b/app/src/main/java/awais/instagrabber/utils/LocaleUtils.java @@ -72,6 +72,7 @@ public final class LocaleUtils { if (appLanguageIndex == 11) return "fa"; if (appLanguageIndex == 12) return "mk"; if (appLanguageIndex == 13) return "vi"; + if (appLanguageIndex == 14) return "hi"; return null; } diff --git a/app/src/main/java/awais/instagrabber/webservices/AddCookiesInterceptor.java b/app/src/main/java/awais/instagrabber/webservices/AddCookiesInterceptor.java index fa9a8a39..70920088 100644 --- a/app/src/main/java/awais/instagrabber/webservices/AddCookiesInterceptor.java +++ b/app/src/main/java/awais/instagrabber/webservices/AddCookiesInterceptor.java @@ -5,6 +5,7 @@ import androidx.annotation.NonNull; import java.io.IOException; import awais.instagrabber.utils.Constants; +import awais.instagrabber.utils.LocaleUtils; import awais.instagrabber.utils.Utils; import okhttp3.Interceptor; import okhttp3.Request; @@ -22,6 +23,10 @@ public class AddCookiesInterceptor implements Interceptor { if (request.header(userAgentHeader) == null) { builder.addHeader(userAgentHeader, Constants.I_USER_AGENT); } + final String languageHeader = "Accept-Language"; + if (request.header(languageHeader) == null) { + builder.addHeader(languageHeader, LocaleUtils.getCurrentLocale().getLanguage() + ",en-US;q=0.8"); + } final Request updatedRequest = builder.build(); return chain.proceed(updatedRequest); } diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 5554af0b..53c5bdf9 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -6,8 +6,6 @@ Herunterladen Benutzernamen suchen… Vergleichen - Like - Likes Fehler beim Kopieren des Textes In die Zwischenablage kopiert! Melden diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index a393a524..7f94f255 100755 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -6,8 +6,6 @@ Descarga Buscar usuario… Comparar - me gusta - me gustas Error al copiar texto ¡Copiar al portapapeles! Reportar diff --git a/app/src/main/res/values-fa/strings.xml b/app/src/main/res/values-fa/strings.xml index a95ae2dd..08ab7054 100644 --- a/app/src/main/res/values-fa/strings.xml +++ b/app/src/main/res/values-fa/strings.xml @@ -6,8 +6,6 @@ دانلود جستجوی نام کاربری… مقایسه - پسندیدن - پسند خطا هنگام کپی متن به کلیپ بورد کپی شد! گزارش diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 5da5c7af..b16978f8 100755 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -6,8 +6,6 @@ Téléchargement Rechercher par nom d\'utilisateur… Comparer - j\'aime - j\'aimes Erreur lors de la copie des éléments Copié dans le presse-papier ! Reporter diff --git a/app/src/main/res/values-hi/strings.xml b/app/src/main/res/values-hi/strings.xml index 7a9af317..bfbfbd07 100644 --- a/app/src/main/res/values-hi/strings.xml +++ b/app/src/main/res/values-hi/strings.xml @@ -6,8 +6,6 @@ डाउनलोड करें ब्यबहारकारीयों के ब्यबहृत नाम ढुंढे... तुलना करें - पसंद करें - पसन्दित लेखा उतारने में त्रुटि क्लिपबोर्ड पर नक़ल किया रिपोर्ट करें diff --git a/app/src/main/res/values-in/strings.xml b/app/src/main/res/values-in/strings.xml index 422e968d..56b4edd1 100644 --- a/app/src/main/res/values-in/strings.xml +++ b/app/src/main/res/values-in/strings.xml @@ -6,8 +6,6 @@ Unduh Cari Pengguna… Bandingkan - suka - suka Galat menyalin tulisan Tersalin! Laporkan diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 17c89650..8a1434a6 100755 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -6,8 +6,6 @@ Scarica Cerca utente… Compara - hai messo un Like - likes Errore durante la copia del testo Copiato negli appunti! Segnala diff --git a/app/src/main/res/values-mk/strings.xml b/app/src/main/res/values-mk/strings.xml index 89368cb0..84df240b 100644 --- a/app/src/main/res/values-mk/strings.xml +++ b/app/src/main/res/values-mk/strings.xml @@ -6,8 +6,6 @@ Превземи Пребарај username… Спореди - лајкни - лајкови Грешка при копрање текст Копрано во clipboard! Пријави diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index 5e4be0fb..b1fb1730 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -6,8 +6,6 @@ Pobierz Szukaj użytkownika… Porównaj - polubienie - polubienia Wystąpił błąd podczas kopiowania tekstu Skopiowano do schowka! Zgłoś diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index 1230a744..41fc6648 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -6,8 +6,6 @@ Baixar Pesquisar nome de usuário… Comparar - like - likes Erro ao copiar texto Copiado para a área de transferência! Reportar diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index 862bd109..b99d529a 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -6,8 +6,6 @@ İndir Kullanıcı adı ara… Karşılaştır - beğeni - beğeni Metin kopyalanamadı Panoya kopyalandı! Bildir diff --git a/app/src/main/res/values-vi/strings.xml b/app/src/main/res/values-vi/strings.xml index 11a2f1f9..309b22f3 100644 --- a/app/src/main/res/values-vi/strings.xml +++ b/app/src/main/res/values-vi/strings.xml @@ -6,8 +6,6 @@ Tải xuống Tìm tên người dùng… So sánh - thích - thích Lỗi khi sao chép Đã sao chép vào clipboard! Báo cáo diff --git a/app/src/main/res/values-zh/strings.xml b/app/src/main/res/values-zh/strings.xml index 0ea5e170..f15de58e 100755 --- a/app/src/main/res/values-zh/strings.xml +++ b/app/src/main/res/values-zh/strings.xml @@ -6,8 +6,6 @@ 下载 搜索用户名… 比较 - 次赞 - 次赞 复制文字时出错 已复制到剪贴板! 报告 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index cb30dfa2..64d5fa61 100755 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -306,11 +306,11 @@ Video player timeline 1x 2x - 0.25x - 0.5x - 0.75x - 1.25x - 1.5x + 0.25x + 0.5x + 0.75x + 1.25x + 1.5x Liking… Like unsuccessful Unlike unsuccessful diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index d35bba05..aa54c83c 100755 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,8 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionSha256Sum=5252d2f1a984e5518e604678b3964bb0227c4573fcc880b92548bc687c851704 -distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-rc-5-all.zip +distributionSha256Sum=0080de8491f0918e4f529a6db6820fa0b9e818ee2386117f4394f95feb1d5583 +distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip +# https://gradle.org/releases/ +# https://gradle.org/release-checksums/ zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists +zipStorePath=wrapper/dists \ No newline at end of file