From 6166fde7cd11c4c22750dfc0dd5f2d654ea7feee Mon Sep 17 00:00:00 2001 From: "translatewiki.net" Date: Thu, 26 Oct 2023 13:03:03 +0200 Subject: [PATCH 001/693] Localisation updates from https://translatewiki.net. --- app/src/main/res/values-ast/strings.xml | 9 +- app/src/main/res/values-br/strings.xml | 43 ++++- app/src/main/res/values-fr/strings.xml | 2 + app/src/main/res/values-ia/strings.xml | 35 ++++ app/src/main/res/values-it/strings.xml | 1 + app/src/main/res/values-iw/strings.xml | 1 + app/src/main/res/values-ky/strings.xml | 2 +- app/src/main/res/values-mk/strings.xml | 1 + app/src/main/res/values-skr/strings.xml | 1 + app/src/main/res/values-sr/strings.xml | 1 + app/src/main/res/values-sv/strings.xml | 3 + app/src/main/res/values-xal/strings.xml | 188 +++++++++++++++++++++ app/src/main/res/values-zh-rTW/strings.xml | 7 + 13 files changed, 288 insertions(+), 6 deletions(-) create mode 100644 app/src/main/res/values-xal/strings.xml diff --git a/app/src/main/res/values-ast/strings.xml b/app/src/main/res/values-ast/strings.xml index be722b57c..8fc8cfbcb 100644 --- a/app/src/main/res/values-ast/strings.xml +++ b/app/src/main/res/values-ast/strings.xml @@ -4,6 +4,7 @@ * Fueyas * Tokvo * Xuacu +* YoaR --> Páxina de Facebook de Commons @@ -144,7 +145,7 @@ Esperando pola primera sincronización… Inda nun xubió denguna foto. Reintentar - Encaboxar + Zarrar El presentar esta imaxe, declaro que ye una obra propia, que nun contien material con derechu d\'autor o «selfies», y que s\'atien a les <a href=\"https://commons.wikimedia.org/wiki/Commons:Policies_and_guidelines\">polítiques de Wikimedia Commons</a>. Descargar Llicencia predeterminada @@ -222,7 +223,7 @@ Bienvenida a Wikipedia Bienvenida a Derechos d\'autor Ópera de Sidney - Encaboxar + Zarrar Abrir Zarrar Entamu @@ -287,7 +288,7 @@ Llingües Escueye l\'idioma pal que quies unviar traducciones Siguir - Encaboxar + Zarrar Retentar Estos son sitios cercanos que precisen imaxes para ilustrar los sos artículos de Wikipedia.\n\nAl pulsiar en \'BUSCAR NESTA ÁREA\' bloquiase\'l mapa y llánzase una busca cercana alredor d\'esi llugar. Esti llugar precisa una semeya. @@ -324,7 +325,7 @@ Si sigues xubiendo imáxenes que riquen desaniciase, la to cuenta probablemente va bloquiase. ¿Seguro que desees acabar el cuestionariu? Más d\'un %1$s de les imáxenes que xubisti desaniciáronse. Si sigues xubiendo imáxenes que riquen desaniciase, la to cuenta probablemente va bloquiase.\n\n¿Desees volver a ver el tutorial y llueu contestar un cuestionariu p\'ayudate a saber qué triba d\'imáxenes puedes o nun puedes xubir? Los selfies nun tienen munchu valor enciclopédicu. Por favor, nun xubas una semeya de ti mesmu sacante que yá esista un artículu de Wikipedia que trate de ti. - Les semeyes de monumentos y escenes en esteriores pueden xubise pa la mayor parte de paises. Ten presente que les instalaciones artístiques temporales en esteriores de vezu tienen derechos d\'autor y nun pueden xubise. + Les semeyes de monumentos y escenes en esteriores pueden xubise pa la mayor parte de países. Ten presente que les instalaciones artístiques temporales en esteriores de vezu tienen derechos d\'autor y nun pueden xubise. Los pantallazos de sitios web considérense obres derivaes, y tán suxetes a los derechos d\'autor del propiu sitiu web. Los mesmos pueden usase en teniendo permisu del autor. Ensin esi permisu, cualquier obra artística que crees basada nel so trabayu tien la consideración llegal de copia ensin llicencia que pertenez al autor orixinal. Unu de los oxetivos de Commons ye collechar imáxenes de calidá. Por eso, les imáxenes borroses nun tendríen de xubise. Tenta siempre sacar semeyes guapes con bona lluz. Les semeyes qu\'amuesen la teunoloxía o la cultura son enforma bienveníes en Commons. diff --git a/app/src/main/res/values-br/strings.xml b/app/src/main/res/values-br/strings.xml index dce9693b7..17cf2ed44 100644 --- a/app/src/main/res/values-br/strings.xml +++ b/app/src/main/res/values-br/strings.xml @@ -15,8 +15,11 @@ Logo Commons Lec\'hienn web Commons Kas + Ouzhpennañ un deskrivadur all Degasadenn nevez Istitloù + Deskrivadur ar yezh + Alc\'hwez Deskrivadur Skeudenn An holl @@ -54,6 +57,7 @@ Neuz Hollek Sonjoù + Prevezded Commons Arventennoù @@ -79,6 +83,7 @@ Oc\'h echuiñ enporzhiadenn %1$s C\'hwitet en deus enporzhiañ %1$s Pouezit evit diskwel + Pouezit evit diskwel Ma enporzhiadennoù nevez Lakaet el lostennad C\'hwitet @@ -261,6 +266,7 @@ N\'eus bet kavet skeudenn ebet ! Ur fazi zo c\'hoarvezet p\'eo bet karget ar skeudennoù. Pellgaset gant:%1$s + Stanket Stanket oc\'h bet ha ne c\'hallit ket mui kemmañ war Commons Skeudenn an deiz Klask @@ -284,9 +290,11 @@ Respont reizh Respont fall Rannañ an arloadoù + C\'hwelañ Klask nevez ebet Istor klask diverket Dilemel + Trec\'hioù Profil Stadegoù Trugarekadennoù resevet @@ -298,7 +306,9 @@ Skeudennoù implijet Ur fazi zo bet ! Implijit un anv aozer personelaet + Degasadennoù Nepell + Kemennoù Kemennoù (lennet) Roll Lankad %1$d eus %2$d: %3$s @@ -310,23 +320,46 @@ Ouzhpennañ/Dilemel sinedoù Sinedoù Sinedoù + Enporzhiet eo bet dre fazi Rummad ebet diuzet Deskrivadur ebet diuzet Nullañ an enporzhiadur Kenderc\'hel an enporzhiadur - (Evit holl skeudennoù an hollad) + (Evit holl skeudennoù an hollad) Goulenn aotre + Arabat goulenn en-dro + Aotren + Disteurel Graet + Trugarekaet eo bet %1$s gant berzh + Trugarekaat %1$s + Skeudenn da-heul + Ya, perak pas + Skeudenn ebet implijet + N\'eus bet kaset skeudenn ebet + N\'ho peus kemenn ebet da lenn + N\'ho peus kemenn ebet bet lennet + Diskwel ar re bet lennet + Diskwel ar re a zo da lenn + Gortozit mar plij… + Eilet + Tremen e-bioù ar skeudenn-mañ Aozer Gwirioù oberour + Lec\'hiadur + Doare kamera Meziant Titouroù ar skeudenn Rummad ebet kavet Deskrivadur ebet kavet Enporzhiadur nullet + Perak e rankfed dilemel %1$s? + Yezh deskrivadur dre ziouer Berzh C\'hwitet Logo + Berzh + Berzh Kont krouet! Testenn eilet er golver Ur fazi zo bet! @@ -341,17 +374,25 @@ Kadarnaat 7. Embann ar pennad ehan + adstagañ ganti Ehanet Muioc\'h Sinedoù Trec\'hioù Renkadur Renk: + Kont: Renk Implijer + Kont Bloaziek + Bep sizhun + A-viskoazh Enporzhiañ Nepell + Implijet + Skeudennoù a-zoare + Nullañ an enporzhiadur Lenn muioc\'h En holl yezhoù Deskrivadur diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index d6bdd8452..61eac6a4a 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -4,6 +4,7 @@ * Ajeje Brazorf * Alno * BaRaN6161 TURK +* BlueCamille * Cigaryno * Cyclicus * DavidL @@ -375,6 +376,7 @@ Mauvaise réponse Cette copie d’écran est-elle correcte pour être téléversée ? Partager l’application + Pivoter Erreur durant la recherche d’endroits proches. Aucun lieu à proximité Erreur de récupération des monuments à proximité. diff --git a/app/src/main/res/values-ia/strings.xml b/app/src/main/res/values-ia/strings.xml index 776445a18..976de3ce8 100644 --- a/app/src/main/res/values-ia/strings.xml +++ b/app/src/main/res/values-ia/strings.xml @@ -64,20 +64,32 @@ Incargamento in curso Nomine de usator Contrasigno + Aperir session a tu conto de Commons Beta Aperir session + Contrasigno oblidate? + Inscriber se Apertura de session Un momento… + Actualisa legendas e descriptiones + Un momento… Session aperite! Session fallite! + File non trovate. Proba con un altere file. + Limite maxime de tentativas attingite! Per favor cancella le incargamento e essaya lo de novo. + Disactivar le optimisation del batteria? + Incargar plus de 3 imagines functiona plus solidemente quando le optimisation del batteria es disactivate. Per favor disactiva le optimisation del batteria pro le app Commons in le Parametros pro un experientia de incargamento plus fluide.\n\nPassos possibile pro disactivar le optimisation del batteria:\n\nPasso 1: Tocca le button ‘Parametros’ infra.\n\nPasso 2: Cambia de ‘Non optimisate’ a ‘Tote le apps’.\n\nPasso 3: Cerca “Commons” o “fr.free.nrw.commons”.\n\nPasso 4: Tocca lo e selige ‘Non optimizar’.\n\nPasso 5: Preme ‘Facite’. Authentication fallite, per favor reaperi session Incargamento comenciate! + Incargamento in cauda (modo de connexion limitate activate) %1$s incargate! Tocca pro vider tu incargamento Incargante le file: %1$s %1$s es incargate ora Termina incargar %1$s Error incargante %1$s + Incargamento de %1$s in pausa Tocca pro vider + Tocca pro vider Mi incargamentos recente In cauda Fallite @@ -85,8 +97,31 @@ Incarga Del galeria Prender photo + A proximitate Mi incargamentos Condivider + Visitar le pagina del file + Legenda (obligatori) + Per favor, forni un legenda pro iste file + Description + Legenda + Impossibile aperir session; fallimento de rete + Troppo de tentativas fallite. Per favor reproba in alcun minutas. + Iste usator ha essite blocate sur Commons + Tu debe fornir tu codice de authentication bifactorial. + Apertura de session fallite + Incargar + Nomine de iste insimul + Modificationes + Incargar + Cercar categorias + Cerca elementos que tu file representa (montania, Taj Mahal, etc.) + Salveguardar + Refrescar + Listar + (Nihil incargate ancora) + Necun categoria correspondente a %1$s trovate + Necun elemento Wikidata correspondente a %1$s trovate Permission necessari: Scriber sur immagazinage externe. Le app non pote acceder a tu camera/galeria sin isto. Error de connexion Le processo de incargamento require un accesso a internet active. Per favor verifica tu connexion al rete. diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index cdaa8e528..2632220f7 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -352,6 +352,7 @@ Risposta sbagliata Questo screenshot è OK per essere caricato? Condividi applicazione + Ruota Errore durante il recupero dei luoghi nelle vicinanze. Nessun luogo trovato nelle vicinanze Errore durante la ricerca di monumenti nei pressi. diff --git a/app/src/main/res/values-iw/strings.xml b/app/src/main/res/values-iw/strings.xml index 686383866..d85384835 100644 --- a/app/src/main/res/values-iw/strings.xml +++ b/app/src/main/res/values-iw/strings.xml @@ -373,6 +373,7 @@ תשובה שגויה האם בסדר להעלות את צילום המסך הזה? שיתוף היישום + סיבוב שגיאה באחזור המקומות בסביבתך. אין מקומות בסביבה שגיאה באחזור אתרים בסביבתך. diff --git a/app/src/main/res/values-ky/strings.xml b/app/src/main/res/values-ky/strings.xml index 9266c0ebc..e1498ea98 100644 --- a/app/src/main/res/values-ky/strings.xml +++ b/app/src/main/res/values-ky/strings.xml @@ -33,7 +33,7 @@ Купуялык Викиказына Ырастоолор - Колдонуучунун ысымы + Колдонуучунун аты Сырсөз Кирүү Катталуу diff --git a/app/src/main/res/values-mk/strings.xml b/app/src/main/res/values-mk/strings.xml index 0141b98d3..f79393362 100644 --- a/app/src/main/res/values-mk/strings.xml +++ b/app/src/main/res/values-mk/strings.xml @@ -343,6 +343,7 @@ Погрешен одговор Дали оваа екранска снимка е во ред за подигање? Сподели прилог + Сврти Грешка при добивањето на околните места. Не најдов околни места Грешка при добивањето на околните споменици. diff --git a/app/src/main/res/values-skr/strings.xml b/app/src/main/res/values-skr/strings.xml index aea0e53f1..4104f5652 100644 --- a/app/src/main/res/values-skr/strings.xml +++ b/app/src/main/res/values-skr/strings.xml @@ -165,6 +165,7 @@ جاری رکھو درست جواب غلط جواب + بھن٘واؤ مٹاؤ کامیابیاں پروفائل diff --git a/app/src/main/res/values-sr/strings.xml b/app/src/main/res/values-sr/strings.xml index 281532190..f023d7f2d 100644 --- a/app/src/main/res/values-sr/strings.xml +++ b/app/src/main/res/values-sr/strings.xml @@ -345,6 +345,7 @@ Погрешан одговор Желите ли да отпремите овај снимак екрана? Дели апликацију + Ротирај Грешка при добављању места у близини. Не постоје најближа места у близини Грешка при добављању споменика у близини. diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index 50c741e77..3e29af9b6 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -348,6 +348,7 @@ Fel svar Är det okej att ladda upp denna skärmdump? Dela app + Rotera Fel uppstod när platser i närheten hämtades. Inga platser i närheten Fel uppstod när monument i närheten hämtades. @@ -732,6 +733,8 @@ Svep snabbt och länge för att utföra dessa åtgärder: \n- Vänster/Höger: Gå till föregående/nästa \n- Upp: Markera\n- Ned: Markera som inte för uppladdning. För att ange din avatar för topplistan trycker du på \"Använd som avatar\" i menyn med de tre punkter på valfri bild. Koordinaterna är inte de exakta koordinaterna, men personen som laddade upp denna bild tycker att de är tillräckligt nära. + Lagringsbehörigheter nekades + Kunde inte dela detta objekt %d markerad bild %d markerade bilder diff --git a/app/src/main/res/values-xal/strings.xml b/app/src/main/res/values-xal/strings.xml new file mode 100644 index 000000000..0742d2dbc --- /dev/null +++ b/app/src/main/res/values-xal/strings.xml @@ -0,0 +1,188 @@ + + + + Вики-аһулх һазрин Фэйсбук халх + Вики-аһулх һазрин Гитхабдк экн кодмуд + Вики-аһулх һазрин лого-темдг + Вики-аһулх һазрин вэб-сайт + Бәәршл суңһх терзәс һарх + Йовулх + Оңгдан тодрхаллт немх + Шин хүв-немр немх + Келнә тодрхаллт + Тодрхаллт + Дүрсн + Бүк + Эн өдрин зург + Йирңкә + Санл, күслт + Нууцлл + Вики-аһулх һазр + Тохрллһ + Вики-аһулх һазрур ацалх + Ацалгдҗана... + Кергләчин нерн + Нууц үг + Невтрх + Нууц үгән мартвт? + Бүрткүлх + Невтрҗәнә + Күләхнтн... + Күләхнтн... + Невтрлт амҗлтта болла! + Невтрҗ чадсн уга! + Ацаллт кеҗ экллә! + %1$s ацалгдв! + Ацаллтын җигсәлтиг үзх + Файл ацалгдҗана: %s + %1$s ацалгдҗана + %1$s ацалгдҗ дуусчана + %1$s ацалҗ чадсн уга + Энд дарҗ хәләтн + Энд дарҗ хәләтн + Җигсәлтд орулла + Эндү һарв + %1$d%% кегдлә + Ацалгдҗана + Галереяс + Зург цокх + Мини кесн ацаллт + Хувалцх + Файлын халхиг үзх + Эн файлын нериг заахнтн + Тодрхаллт + Невтрхд эндү — сүлҗән + Эн кергләч Вики-аһулх һазр деер блоклгдсн бәәнә + Невтрҗ чадсн уга! + Орулх + Кесн хүврлтс + Орулх + Нерн, төрләр хәәх + Хадһлх + Сергәх + Җигсәлт + Нерн, төрл + Тохрллһ + Бүрткүлх + Туск + Нууцллын бодлһ + Туск + Дәкн орлдтн + Цуцлх + Татҗ авх + Аңхдгчар бәәсн лиценз + Attribution-ShareAlike 4.0 + Attribution 4.0 + Attribution-ShareAlike 3.0 + Attribution 3.0 + Һарцг: Сиднейн дүүрин театр + Тодрхаллт: Сиднейн дүүрин театр, булңгин үзмҗ + Тиим + Делгрңгү + Нерн, төрл + Умшҗана... + Алькинь чигн суңһад уга + Тодрхаллт уга + Күүндән уга + Сергәх + Нә + Аңхартн + Орулх + Тиим + Уга + Һарцг + Тодрхаллтс + Тодрхаллт + Күүндән + Зокагч + Лиценз + 2ФА код + Һархд итклтә бәәнт? + Зао уул + Лам гөрәсн + Солңһта тагт + Бамб цецг + Википедьт тавта мөрлтн! + Тавта мөрлтн — зокагчин эрк + Сиднейн дүүрин театр + Цуцлх + Неех + Хаах + Нүр + Орулх + Тохрллһ + Санл, күслт + Һарх + Медгдлмүд + тодрхаллт олдсн уга + Википедин өгүлл + Дүрсн дегәд баран бәәнә + Дүрсн тодрха биш бәәнә + Холвлтын эндү + Хуулврлгдв + Эн дүрсиг өңгрүлх + Зокагч + Зокагчин эрк + Бәәршл + Програмин хаңһмҗ + Дүрснә туск медәлл + Амҗлтта + Чадсн уга + Кевллин герл зург + Сүлҗәндк санмсрго герл зург + Лого-темдг + Яһад гихлә + Амҗлтта + Амҗлтта + Бүртклиг амҗлтта үүскв! + Хавчурһс + Тохрллһ + Баран + Батлх + 7. Өгүллән ниитлтн + завсрлһ + үрглҗлүлх + Завсрлгдв + Үлү + Хавчурһс + То: + То + Чинртә дүрсн + Делгрңгү умшх + Бүк келәр + Бәәршл суңһтн + Бәәршл суңһтн + Бәәршл сольх + Дүрснә бәәршл + Тодрхаллт + Кегдв + Буцх + Һәәхлтә + Кергләчин халхиг үзх + Тотрхаллтыг ясврлх + Өргдксн тохрллһ + Дәкн тохрулх + Бәәршл олдсн уга + Бәәршл немх + Делгрңгү медәлл + Андроидын хүвлвр + Төкәрмҗин үүлдврләч + Төкәрмҗин загвр + Төкәрмҗин нерн + Сүлҗәнә төрл + Санл, күслт өгснд байрлҗанавидн + Санл, күслт йовулхд эндү һарв + Тана санл, күслт + Бәәршүлх биш гиҗ темдглх + Бәәршүлх биш гисн темдгиг уга кех + Дүрсиг суңһв + Хадһлх Зөвшәрлиг эс зөвшәрв + Эн зүүләр хувалцх болмҗ уга + + %d дүрс суңһсн + %d дүрс суңһсн + + diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index ea2941b0e..c1cf36401 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -363,6 +363,7 @@ 錯誤答案 這張截圖可以上傳嗎? 分享應用程式 + 旋轉 獲取附近地點時出錯。 找不到附近地點 索取附近古蹟景點時出錯。 @@ -749,4 +750,10 @@ 快速長滑來執行以下操作:\n- 左/右:跳到上一張/下一張\n- 上:選擇\n- 下:標記為不上傳。 要設定您的排行榜頭像,請在任何圖片裡輕觸三點樣式選單中的「設定成頭像」。 座標雖不準確,但上傳這張圖片的人認為已經足夠接近了。 + 儲存裝置權限被拒絕 + 無法分享此項目 + + 已選 %d 張圖片 + 已選 %d 張圖片 + From 39a2fbe3d51a596d556780eeec3092dc4423dca0 Mon Sep 17 00:00:00 2001 From: Ritika Pahwa <83745993+RitikaPahwa4444@users.noreply.github.com> Date: Sun, 29 Oct 2023 19:51:16 +0530 Subject: [PATCH 002/693] ensure that cancelled uploads are really getting cancelled (#5367) --- .../free/nrw/commons/CommonsApplication.java | 5 ++ .../ContributionsListFragment.java | 2 + .../nrw/commons/upload/worker/UploadWorker.kt | 55 ++++++++++++++----- 3 files changed, 47 insertions(+), 15 deletions(-) diff --git a/app/src/main/java/fr/free/nrw/commons/CommonsApplication.java b/app/src/main/java/fr/free/nrw/commons/CommonsApplication.java index bce49fd5a..7e9834585 100644 --- a/app/src/main/java/fr/free/nrw/commons/CommonsApplication.java +++ b/app/src/main/java/fr/free/nrw/commons/CommonsApplication.java @@ -141,6 +141,11 @@ public class CommonsApplication extends MultiDexApplication { */ public static Map pauseUploads = new HashMap<>(); + /** + * In-memory list of uploads that have been cancelled by the user + */ + public static HashSet cancelledUploads = new HashSet<>(); + /** * Used to declare and initialize various components and dependencies */ diff --git a/app/src/main/java/fr/free/nrw/commons/contributions/ContributionsListFragment.java b/app/src/main/java/fr/free/nrw/commons/contributions/ContributionsListFragment.java index 468272efb..6fed83a5d 100644 --- a/app/src/main/java/fr/free/nrw/commons/contributions/ContributionsListFragment.java +++ b/app/src/main/java/fr/free/nrw/commons/contributions/ContributionsListFragment.java @@ -36,6 +36,7 @@ import butterknife.BindView; import butterknife.ButterKnife; import butterknife.OnClick; import com.google.android.material.floatingactionbutton.FloatingActionButton; +import fr.free.nrw.commons.CommonsApplication; import fr.free.nrw.commons.Media; import fr.free.nrw.commons.R; import fr.free.nrw.commons.Utils; @@ -429,6 +430,7 @@ public class ContributionsListFragment extends CommonsDaggerSupportFragment impl () -> { ViewUtil.showShortToast(getContext(), R.string.cancelling_upload); contributionsListPresenter.deleteUpload(contribution); + CommonsApplication.cancelledUploads.add(contribution.getPageId()); }, () -> { // Do nothing }); diff --git a/app/src/main/java/fr/free/nrw/commons/upload/worker/UploadWorker.kt b/app/src/main/java/fr/free/nrw/commons/upload/worker/UploadWorker.kt index c26243762..ee03ac845 100644 --- a/app/src/main/java/fr/free/nrw/commons/upload/worker/UploadWorker.kt +++ b/app/src/main/java/fr/free/nrw/commons/upload/worker/UploadWorker.kt @@ -172,6 +172,16 @@ class UploadWorker(var appContext: Context, workerParams: WorkerParameters) : CommonsApplication.NOTIFICATION_CHANNEL_ID_ALL )!! withContext(Dispatchers.IO) { + /* + queuedContributions receives the results from a one-shot query. + This means that once the list has been fetched from the database, + it does not get updated even if some changes (insertions, deletions, etc.) + are made to the contribution table afterwards. + + Related issues (fixed): + https://github.com/commons-app/apps-android-commons/issues/5136 + https://github.com/commons-app/apps-android-commons/issues/5346 + */ val queuedContributions = contributionDao.getContribution(statesToProcess) .blockingGet() //Showing initial notification for the number of uploads being processed @@ -202,24 +212,32 @@ class UploadWorker(var appContext: Context, workerParams: WorkerParameters) : } queuedContributions.asFlow().map { contribution -> - /** - * If the limited connection mode is on, lets iterate through the queued - * contributions - * and set the state as STATE_QUEUED_LIMITED_CONNECTION_MODE , - * otherwise proceed with the upload - */ - if (isLimitedConnectionModeEnabled()) { - if (contribution.state == Contribution.STATE_QUEUED) { - contribution.state = Contribution.STATE_QUEUED_LIMITED_CONNECTION_MODE + // Upload the contribution if it has not been cancelled by the user + if (!CommonsApplication.cancelledUploads.contains(contribution.pageId)) { + /** + * If the limited connection mode is on, lets iterate through the queued + * contributions + * and set the state as STATE_QUEUED_LIMITED_CONNECTION_MODE , + * otherwise proceed with the upload + */ + if (isLimitedConnectionModeEnabled()) { + if (contribution.state == Contribution.STATE_QUEUED) { + contribution.state = Contribution.STATE_QUEUED_LIMITED_CONNECTION_MODE + contributionDao.saveSynchronous(contribution) + } + } else { + contribution.transferred = 0 + contribution.state = Contribution.STATE_IN_PROGRESS contributionDao.saveSynchronous(contribution) + setProgressAsync(Data.Builder().putInt("progress", countUpload).build()) + countUpload++ + uploadContribution(contribution = contribution) } } else { - contribution.transferred = 0 - contribution.state = Contribution.STATE_IN_PROGRESS - contributionDao.saveSynchronous(contribution) - setProgressAsync(Data.Builder().putInt("progress", countUpload).build()) - countUpload++ - uploadContribution(contribution = contribution) + /* We can remove the cancelled upload from the hashset + as this contribution will not be processed again + */ + removeUploadFromInMemoryHashSet(contribution) } }.collect() @@ -240,6 +258,13 @@ class UploadWorker(var appContext: Context, workerParams: WorkerParameters) : return Result.success() } + /** + * Removes the processed contribution from the cancelledUploads in-memory hashset + */ + private fun removeUploadFromInMemoryHashSet(contribution: Contribution) { + CommonsApplication.cancelledUploads.remove(contribution.pageId) + } + /** * Create new notification for foreground service */ From b7913fa02741df0e6bb00f3588906e2c97a4f0c6 Mon Sep 17 00:00:00 2001 From: "translatewiki.net" Date: Mon, 30 Oct 2023 13:02:43 +0100 Subject: [PATCH 003/693] Localisation updates from https://translatewiki.net. --- app/src/main/res/values-ast/strings.xml | 6 +- app/src/main/res/values-bg/strings.xml | 2 + app/src/main/res/values-fr/strings.xml | 3 +- app/src/main/res/values-ia/strings.xml | 344 +++++++++++++++++++++ app/src/main/res/values-nl/strings.xml | 19 +- app/src/main/res/values-pt-rBR/strings.xml | 12 +- app/src/main/res/values-pt/strings.xml | 3 +- app/src/main/res/values-qq/strings.xml | 6 +- app/src/main/res/values-ru/strings.xml | 3 + app/src/main/res/values-sr/strings.xml | 2 +- app/src/main/res/values-tcy/strings.xml | 1 + 11 files changed, 387 insertions(+), 14 deletions(-) diff --git a/app/src/main/res/values-ast/strings.xml b/app/src/main/res/values-ast/strings.xml index 8fc8cfbcb..22a0a3ba3 100644 --- a/app/src/main/res/values-ast/strings.xml +++ b/app/src/main/res/values-ast/strings.xml @@ -418,6 +418,8 @@ Remata el: Amosar campañes Ver les campañes en cursu + Permitir + Descartar Por favor asegúrate de qu\'esti selector d\'Android nuevu nun esancia l\'allugamientu de les tos semeyes. Yá nun verás más les campañes. Sicasí, si quies puedes reactivar esti avisu na configuración. Esta función rique conexón de rede, comprueba la configuración de conexón. @@ -501,7 +503,7 @@ Logo Porque ye Compartir imaxe per - Inda nun ficisti nenguna contribución + %s nun fizó entá nenguna contribución ¡Cuenta creada! Testu copiáu al cartafueyu Notificación marcada como lleida @@ -534,4 +536,6 @@ ¿Sacasti estes dos semeyes nel mesmu llugar? ¿Quies usar la llatitú/llonxitú da la semeya de la derecha? Cargar más Nun s\'alcontraron llugares, tenta cambiar los criterios de gueta. + Confirmar + Instrucciones diff --git a/app/src/main/res/values-bg/strings.xml b/app/src/main/res/values-bg/strings.xml index 6535d37fc..c8bc856df 100644 --- a/app/src/main/res/values-bg/strings.xml +++ b/app/src/main/res/values-bg/strings.xml @@ -270,6 +270,7 @@ Използване на персонализирано авторско име При качването използвайте персонализирано авторско име вместо потребителското си име Персонализирано авторско име + Наблизо Известия (прочетени) Списък Следваща @@ -305,4 +306,5 @@ Възникна грешка при избирането на изображенията Моля, изчакайте... напълно размазано + Наблизо diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 61eac6a4a..5c314e8db 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -18,6 +18,7 @@ * Jean-Frédéric * JenyxGym * KATRINE1992 +* McDutchie * Melissadeba95 * Metroitendo * Mirzali @@ -227,7 +228,7 @@ Demande d’autorisation d’accès au stockage Permission nécessaire : lecture sur stockage externe. Sans cela, l’application ne peut pas accéder à votre galerie. Permission obligatoire : écriture sur stockage externe. Sans cela, l’application ne peut pas accéder à votre appareil photo ou votre galerie. - Demande d’autorisation d’accès au stockage + Demande d’autorisation d’accès au localisation Enregistrer l’emplacement pour les prises de vue dans l’application L’activer pour enregistrer l’emplacement avec les prises de vue dans l’application, si l’appareil photo ne le fait pas OK diff --git a/app/src/main/res/values-ia/strings.xml b/app/src/main/res/values-ia/strings.xml index 976de3ce8..50f2256b6 100644 --- a/app/src/main/res/values-ia/strings.xml +++ b/app/src/main/res/values-ia/strings.xml @@ -122,26 +122,370 @@ (Nihil incargate ancora) Necun categoria correspondente a %1$s trovate Necun elemento Wikidata correspondente a %1$s trovate + %1$s non ha alcun classe filio + %1$s non ha alcun classe genitor + Adde categorias pro render tu imagines plus discoperibile sur Wikimedia Commons.\nComencia a scriber pro adder categorias. + Categorias + Parametros + Inscriber se + Imagines eminente + Selector personalisate + Categoria + Revision per pares + A proposito + Le app de Wikimedia Commons es un app open-source create e mantenite per subventionatos e voluntarios del communitate de Wikimedia. Le Fundation Wikimedia non es involvite in le creation, disveloppamento o mantenimento del app. + Crea un nove <a href=\"%1$s\">reporto sur GitHub</a> pro signalar anomalias e dar suggestiones. + Politica de confidentialitate + Creditos + A proposito + Inviar commentario (per e-mail) + Necun cliente de e-mail installate + Categorias recentemente usate + Attende prime synchronisation… + Tu non ha ancora incargate alcun photo. + Reprobar + Cancellar + Submittente iste imagine, io declara que iste es mi obra proprie, que illo non contine material protegite per derectos de autor ni ‘selfies’, e adhere al <a href=\"https://commons.wikimedia.org/wiki/Commons:Policies_and_guidelines\">politicas de Wikimedia Commons</a>. + Discargar + Licentia predefinite + Usar le titulo e description precedente + Thema + Attribution-CompartiSimile 4.0 + Attribution 4.0 + Attribution-CompartiSimile 3.0 + Attribution 3.0 + Wikimedia Commons alberga le major parte del imagines usate in Wikipedia. + Tu imagines adjuta a educar gente de tote le mundo! + Per favor incarga solmente imagines que tu mesme ha prendite o create: + Objectos natural (flores, animales, montanias) + Objectos utile (bicyclettas, stationes ferroviari) + Personas famose (tu burgomaestro, athletas olympic que tu ha incontrate) + Per favor NON incarga: + “Selfies” o photos de tu amicos + Imagines que tu ha discargate de internet + Capturas de schermo de applicationes proprietari + Exemplo de incargamento: + Titulo: Opera de Sydney + Description: Le opera de Sydney vidite de trans le baia + Categorias: Opera de Sydney desde le west, Vistas a distantia del Opera de Sydney + Contribue tu imagines. Adjuta le articulos de Wikipedia a prender vita! + Le imagines sur Wikipedia proveni de Wikimedia Commons. + Tu imagines adjuta a educar gente de tote le mundo. + Evita materiales protegite per derectos de autor que tu ha trovate sur internet assi como imagines de posters, affiches, coperturas de libros, etc. + Tu pensa que tu comprende? + Si! + Plus information + Categorias + Cargamento in curso… + Nihil seligite + Necun legenda + Necun description + Necun discussion + Licentia incognite + Refrescar + Requestar permission de immagazinage + Permission necessari: lectura de immagazinage externe. Le application non pote acceder a tu galeria sin isto. Permission necessari: Scriber sur immagazinage externe. Le app non pote acceder a tu camera/galeria sin isto. + Requestar permission de position + Memorisar le position geographic pro photos prendite in le application + Activa isto pro memorisar le position geographic con photos prendite in le application in caso que le camera del apparato non lo registra + OK + Advertimento + Nomine de file duplicate trovate + Incargar + Si + No + Legenda + Titulo + Objectos representate + Description + Discussion + Autor + Data de incargamento + Licentia + Coordinatas + Non fornite + Devenir testator beta + Abona te a nostre canal beta sur Google Play e sia le prime a ganiar accesso a nove functiones e correctiones de anomalias + Codice 2FA + Vole tu vermente clauder session? + Imagine multimedial fallite + Necun subcategoria trovate + Necun categoria genitor trovate + Monte Zao + Lamas + Ponte del Arco Iris + Tulipan + Benvenita: Wikipedia + Benvenita: derectos de autor + Opera de Sydney + Cancellar + Aperir + Clauder + Initio + Incargar + A proximitate + A proposito + Parametros + Commentario + Clauder session + Tutorial + Notificationes + Revider + necun description trovate + Pagina del file sur Commons + Elemento Wikidata + Articulo de Wikipedia + Per favor, describe le file multimedial tanto como possibile: Ubi ha le imagine/video essite prendite? Que monstra illo? Qual es le contexto? Per favor, describe le objectos o personas. Revela information que non pote esser facilemente conjecturate, per exemplo, le hora del die si se tracta de un paisage. Si le file monstra qualcosa insolite, per favor explica lo que lo rende insolite. + Per favor, scribe un curte description del imagine. Le prime legenda essera usate como le Titulo pro le imagine. Limite: 255 characteres. + Problemas potential con iste imagine: + Le imagine es troppo obscur. + Le imagine es indistincte. + Le imagine es ja sur Commons. + Iste imagine ha essite prendite in un altere loco. + Per favor, solmente incarga imagines que tu ha prendite tu mesme. Non incarga imagines que tu ha trovate in le contos Facebook de altere personas. + Vole tu totevia incargar iste imagine? Error de connexion Le processo de incargamento require un accesso a internet active. Per favor verifica tu connexion al rete. + Problemas trovate in le imagine + Per favor, solmente incarga imagines que tu ha prendite tu mesme. Non incarga imagines que tu ha discargate del Internet. Salveguardar photos prendite in app Salveguardar le photos prendite con le camera del application sur le immagazinage de tu apparato + Aperir session in tu conto + Inviar file de registro + Invia le file de registro al disveloppatores via email pro adjutar a resolver problemas con le application. Nota: le registros poterea continer informationes personal. + Necun navigator web trovate pro aperir le URL + Error: URL non trovate + Nominar pro deletion + Iste pagina ha essite nominate pro deletion. + Vide le pagina web pro detalios + Saltar + Aperir session + Vole tu vermente saltar le apertura de session? + Tu debera alora aperir session pro incargar imagines plus tarde. + Per favor aperi session pro usar iste function + Copiar le wikitexto al area de transferentia + Le wikitexto ha essite copiate al area de transferentia \"A proximitate\" poterea non functionar, perque le position geographic non es disponibile. + Le accesso al position ha essite refusate. Per favor indica tu position manualmente pro usar iste function. + Permission necessari pro monstrar un lista de locos a proximitate Itinerario Wikidata Wikipedia Commons + Evalutar nos + FAQ + Guida de usator + Saltar le tutorial + Internet indisponibile + Error durante le obtention de notificationes + Error durante le obtention del imagine pro revision. Per favor refresca pro tentar lo de novo. + Necun notification trovate + Traducer + Linguas + Selige le lingua pro le qual tu vole submitter traductiones + Proceder + Cancellar + Reprobar + Istes es le locos in tu vicinitate que require imagines pro illustrar lor articulos in Wikipedia.\n\nCliccar sur ‘CERCAR ISTE AREA’ bloca le carta e lancea un recerca a proximitate de ille loco. + Iste loco require un photo. + Iste loco ha ja un photo. + Iste loco non existe plus. + Necun imagine trovate! + Un error ha occurrite durante le cargamento de imagines. + Incargate per: %1$s Blocate + Tu ha essite blocate e non pote modificar Commons + Imagine del die + Cercar + Cercar in Commons + Cercar + Recercas recente: + Recercas recente + Consultas recente de lingua + Un error ha occurrite durante le cargamento de categorias. + Un error ha occurrite durante le cargamento de objectos representate. Multimedia Categorias + Objectos In evidentia Incargate via mobile + Carta + Imagine addite a %1$s sur Wikidata! + Le actualisation del entitate Wikidata correspondente ha fallite! + Fixar como fundo de schermo + Fundo de schermo fixate con successo! + Quiz + Es iste imagine bon pro incargar? + Question + Resultato + Si tu continua a incargar imagines que require deletion, tu conto probabilemente essera bannite. Es tu certe que tu vole terminar le questionario? + Plus de %1$s del imagines que tu ha incargate ha essite delite. Si tu continua a incargar imagines que require deletion, tu conto probabilemente essera bannite.\n\nVolerea tu vider le tutorial de novo e postea responder a un questionario pro apprender que typo de imagines tu debe o non debe incargar? + Selfies non ha multe valor encyclopedic. Per favor, non incarga un imagine de te mesme a minus que tu ha ja un articulo in Wikipedia sur te. + Imagines de monumentos e scenarios exterior es acceptabile pro incargamento in le majoritate de paises. Per favor nota que installationes artistic temporari al exterior es frequentemente sub derecto de copyright e non es acceptabile pro incargamento. + Capturas de schermo de sitos web es considerate como obras derivative e sub le jurisdiction del copyright del sito web mesme. Illos pote esser usate post permission del autor. Sin iste permission, omne arte que tu crea basate in su obra es juridicamente considerate como un copia non autorisate que appertine al autor original. + Un del objectivos de Commons es colliger imagines de qualitate. Pro isto, imagines indistincte non debera esser incargate. Sempre essaya a prender belle photos con un bon illumination. + Imagines que monstra technologia o cultura es multo benvenite sur Commons. + Tu ha %1$s del responsas correcte. Felicitationes! + Selige un del duo optiones pro responder al question + Session expirate, per favor reaperi session + Condivide tu quiz con tu amicos! + Continuar + Responsa correcte + Responsa incorrecte + Es iste captura de schermo bon pro incargar? + Condivider app + Rotar + Error durante le obtention de locos a proximitate. + Necun loco a proximitate + Error durante le obtention de monumentos a proximitate. + Necun recerca recente + Es tu secur de voler rader tu historia de recerca? + Es tu secur de voler cancellar iste incargamento? + Vole tu deler iste recerca? + Historia de recerca delite + Nominar pro deletion Deler + Realisationes + Profilo Statisticas + Regratiamentos recipite + Imagines eminente + Imagines via “Locos a proximitate” Nivello + Imagines incargate + Imagines non revertite + Imagines usate + Condivide tu realisationes con tu amicos! + Tu nivello augmenta a mesura que tu satisface iste requisitos. Le elementos in le section “statisticas” non conta pro tu nivello. + minimo requisite: + Le numero de imagines que tu ha incargate a Commons, per medio de qualcunque software de incargamento + Le percentage de imagines que tu ha incargate a Commons que non ha essite delite + Le numero de imagines que tu ha incargate a Commons que ha essite usate in articulos de Wikimedia + Un error ha occurrite! + Notification de Commons + Usar un nomine de autor personalisate + Usar un nomine de autor personalisate in loco de tu nomine de usator durante le incargamento de photos + Nomine de autor personalisate + Contributiones + A proximitate + Notificationes + Notificationes (legite) + Monstrar notification a proximitate + Monstrar le notification del application pro le loco le plus proxime que ha besonio de photos + Lista + Permission de immagazinage + Nos ha besonio de tu permission pro acceder al immagazinage externe de tu apparato a fin de incargar imagines. + Tu non videra plus le loco le plus proxime que ha besonio de imagines. Totevia, tu pote reactivar iste notification in le Parametros si tu vole. + Passo %1$d de %2$d: %3$s + Sequente + Precedente + Un file con le nomine %1$s ja existe. Es tu secur de voler continuar?\n\nNota: Un suffixo appropriate essera automaticamente addite al nomine del file. + Necun application cartographic compatibile pote esser trovate sur tu apparato. Per favor installa un application cartographic pro usar iste function. + Imagines + Locos + Adder al/Remover del marcapaginas + Marcapaginas + Tu non ha addite alcun marcapagina + Marcapaginas + Le collection de registros ha comenciate. Per favor REINITIA le application, exeque le action que tu vole registrar, e postea tocca ‘Inviar file de registro’ de novo. + Io lo ha incargate per error + Io non sapeva que illo essera publicamente visibile + Io ha comprendite que es mal pro mi vita private + Io ha cambiate de idea, io non vole plus que illo sia publicamente visibile + Iste imagine non es interessante pro un encyclopedia + Incargate per me mesme le %1$s, usate in %2$d articulo(s). Benvenite a Commons!\n\nPro incargar tu prime file multimedial, tocca le button Adder. + Necun categoria seligite + Imagines sin categorias es rarmente usabile. Es tu secur de voler continuar sin seliger categorias? + Necun representation seligite + Imagines con representationes es plus facilemente trovate e lor uso es plus probabile. Es tu secur de voler continuar sin seliger representationes? + Cancellar incargamento + Le uso del button Retro cancellara iste incargamento e tu perdera tu progresso. + Continuar incargamento + (Pro tote le imagines in le insimul) + Cercar in iste area + Requesta de permission + Vole tu que nos usa tu position actual pro monstrar le loco le plus vicin que ha besonio de imagines? + Non es possibile monstrar le loco le plus proxime que ha besonio de imagines sin permission de acceder al position. + Nunquam demandar isto de novo + Demandar permission de position + Demandar le permission de acceder al position quando es necessari pro le function de notification a proximitate. + Un problema ha occurrite. Non esseva possibile obtener tu realisationes. + Tu ha facite tante contributiones que nostre systema de calculo de realisationes non pote contar los. Iste es le realisation ultime! + Termina le: + Monstrar campanias + Vider le campanias in curso + Permitter al application obtener le position geographic in caso que le camera non lo registra. Alcun cameras de apparatos non registra le position. In tal casos, permitter al application obtener e attachar le position rende tu contribution plus utile. Tu pote cambiar isto a tote momento in le Parametros. + Permitter + Clauder + Per favor, activa le accesso al position in le Parametros e essaya lo de novo.\n\nNota: Le file incargate pote non haber le position si le application non pote recuperar le position del apparato in curte tempore. + Le camera in le application necessita permission al position pro attachar lo a tu imagines in caso que le position non es disponibile in EXIF. Per favor, permitte al application acceder a tu position e essaya lo de novo.\n\nNota: Le file incargate pote non haber le position si le application non pote recuperar le position del apparato in curte tempore. + Le application non registrara le position con photos prendite desde le application a causa del manco de permission de position + Le application non registrara le position con photos prendite desde le application perque GPS ha essite disactivate + Usar selector de photos basate sur documento + Le nove selector de photos de Android risca perder le information de position. Activa lo su tu sembla usar lo. + Si tu disactiva isto, le nove selector de photos de Android pote esser activate. Isto involve le periculo que information de position pote esser perdite.\n\nTocca ‘Leger plus’ pro plus information. + Tu non videra plus le campanias. Totevia, tu pote reactivar iste notification in le Parametros si tu vole. + Iste function require un connexion al rete. Per favor verifica tu parametros de connexion. + Un error ha occurrite durante le processamento del imagine. Per favor essaya lo de novo! + Obtention de un token de modification + Addition de un patrono pro le controlo de categoria + Requesta de un controlo de categoria pro %1$s + Requesta de un controlo de categoria + Controlo de categoria requestate + Le requesta de controlo de categoria non ha functionate + Controlo de categoria requestate pro %1$s + Requesta de un controlo de categoria pro %1$s + Facite + Invio de regratiamento: Successo + Regratiamento correctemente inviate a %1$s + Le invio de un regratiamento a %1$s ha fallite + Invio de regratiamento: Fallimento + Invio de regratiamento pro %1$s + Seque isto le regulas del derecto de autor? + Es isto categorisate correctemente? + Es isto compatibile con le objectivos del projecto? + Vole tu regratiar le contributor? + Clicca sur NO pro nominar iste pagina pro deletion si non es utile del toto. + Logos, capturas de schermo, affiches de films es frequentemente violationes del derecto de autor.\nClicca sur NO pro nominar iste imagine pro deletion. + %1$s essera incoragiate per tu appreciation + Oh, isto non es mesmo categorisate! + Iste imagine es in %1$s categorias. + Isto non es compatibile con le objectivos del projecto perque es + Isto es un violation del derecto de autor, perque es + Imagine sequente + Si, proque non + Cliccar sur iste button te dara un altere imagine recentemente incargate de Wikimedia Commons + Tu pote revider imagines pro meliorar le qualitate de Wikimedia Commons.\nLe tres parametros de revision es:\n\n- Es iste imagine compatibile con le objectivos del projecto?\nQuando tu tocca No (non compatibile), tu adde un patrono de nomination pro deletion a iste imagine.\n\n- Seque iste imagine le regulas del derecto de autor?\nQuando tu tocca No (non los seque), tu adde un patrono de nomination pro deletion a iste imagine.\n\n- Es iste imagine categorisate correctemente?\nQuando tu tocca No (non categorisate correctemente), tu adde un patrono de requesta de categorisation a iste imagine.\n\nSi toto es bon, necun patrono es addite al imagine, e tu ha le opportunitate de regratiar le contributor. + Necun imagine usate + Necun imagine revertite + Necun imagine incargate + Tu non ha notificationes non legite + Tu non ha notificationes legite + Condivider registros usante + Vider legites + Vider non legites + Un error ha occurrite durante le selection de imagines + Un momento… + Le imagines eminente es creationes de photographos e illustratores multo habile que le communitate de Wikimedia Commons ha seligite como alcunes del melior qualitate sur le sito. + Le imagines incargate per medio de ‘Locos a proximitate’ es le imagines que es incargate per le discoperta de locos sur le carta. + Iste function permitte a redactores inviar un notification de regratiamento a usatores que face modificationes utile, usante un micre ligamine ‘regratiar’ sur le pagina de historia o de differentias. + Copiar a medios de communication subsequente + Copiate + Exemplos de bon imagines a incargar a Commons + Exemplos de imagines que non debe esser incargate Saltar iste imagine + Discargamento fallite! Non es possibile discargar le file sin permission de immagazinage externe. + Gerer etiquettas EXIF + Selige qual etiquettas EXIF conservar in files incargate + Autor + Derectos de autor + Loco + Modello de camera + Modello de lente + Numeros de serie + Software %1$s es incargate per: %2$s Violation del libertate de panorama Un error ha occurrite durante le apertura de session. Es necessari reinitialisar tu contrasigno. diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index 478aa8d76..15a5f35c4 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -289,7 +289,7 @@ Overslaan Aanmelden Weet je zeker dat je het aanmelden wilt overslaan? - U moet inloggen om later afbeeldingen te kunnen uploaden. + U moet zich dan later wel aanmelden om afbeeldingen te kunnen uploaden. Meld je aan om deze functie te gebruiken Kopieer de wikitekst naar het klembord De wikitekst is gekopieerd naar het klembord @@ -343,7 +343,7 @@ Stel in als achtergrond Achtergrond succesvol ingesteld! Vragenspel - Kan je afbeelding worden geplaatst? + Is deze afbeelding geschikt om te uploaden? Vraag Uitslag Als u doorgaat met het uploaden van afbeeldingen die moeten worden verwijderd, wordt uw account waarschijnlijk geblokkeerd. Weet u zeker dat u de quiz wilt beëindigen? @@ -362,6 +362,7 @@ Fout antwoord Is deze screenshot OK om te uploaden? Toepassing delen + Draaien Fout bij het ophalen van plaatsen in de buurt. Geen plaatsen in de buurt Fout bij het ophalen van monumenten. @@ -406,7 +407,7 @@ Stap %1$d van %2$d: %3$s Volgende Vorige - Er bestaat een bestand met de bestandsnaam %1$s . Weet u zeker dat u door wilt gaan?\n\nOpmerking: Er wordt automatisch een geschikt achtervoegsel aan de bestandsnaam toegevoegd. + Er is al een bestand met de bestandsnaam %1$s. Weet u zeker dat u door wilt gaan?\n\nOpmerking: Er wordt automatisch een geschikt achtervoegsel aan de bestandsnaam toegevoegd. Er is geen compatibele kaarttoepassing gevonden op uw apparaat. Installeer een kaarttoepassing om deze functie te gebruiken. Afbeeldingen Locaties @@ -472,15 +473,15 @@ Verstuur een bedankje voor %1$s Voldoet dit aan de regels van het auteursrecht? Is dit correct gecategoriseerd? - Valt dit binnen de scope? + Past dit bij de doelstelling van het project? Wilt u de bijdrager bedanken? Klik op NEE om deze afbeelding te nomineren voor verwijdering als deze helemaal niet nuttig is. Logo\'s, screenshots, filmposters zijn vaak auteursrechtschendingen.\nKlik NEE om deze afbeelding te nomineren voor verwijdering %1$s zal worden aangemoedigd door uw waardering Oh, dit is niet eens gecategoriseerd! Deze afbeelding valt onder %1$s categorieën. - Het valt buiten de scope want het is - Het is schending van het auteursrecht omdat het + Het past niet bij de doelstelling van het project, want het is + Het is een schending van het auteursrecht, want het is Volgende afbeelding Ja, waarom niet Als u op deze knop klikt, krijgt u nog een recent geüploade afbeelding van Wikimedia Commons @@ -748,4 +749,10 @@ Veeg snel en lang om deze handelingen te verrichten: \n- Links/Rechts: Naar vorige/volgende gaan\n- Omhoog: Selecteren\n- Omlaag: Als niet voor uploaden markeren Om uw leaderboard-avatar te kiezen tikt u op \"Als avatar instellen\" in het driestippenmenu van een afbeelding. De coördinaten zijn niet precies, maar degene die deze foto heeft geüpload vindt dat ze redelijk in de buurt komen. + Opslagtoestemming geweigerd + Kan dit item niet delen + + %d afbeelding geselecteerd + %d afbeeldingen geselecteerd + diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index 2a442e941..7763d2c25 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -15,6 +15,7 @@ * Luckas * Mariagarbin * Maxan +* McDutchie * Mello25 * Re demz * Stephanyb76 @@ -363,6 +364,7 @@ Resposta incorreta Esta captura de tela pode ser carregada? Compartilhar o aplicativo + Girar Erro ao buscar lugares próximos. Não há lugares próximos Erro ao buscar monumentos próximos. @@ -407,7 +409,7 @@ Passo %1$d de %2$d: %3$s Próximo Anterior - Um arquivo com o nome do arquivo% 1 $ s existe. Tem certeza de que deseja continuar?\n\nNota: Um sufixo adequado será adicionado ao nome do arquivo automaticamente. + Um arquivo com o nome do arquivo %1$s existe. Tem certeza de que deseja continuar?\n\nNota: Um sufixo adequado será adicionado ao nome do arquivo automaticamente. Nenhum aplicativo de mapa compatível pode ser encontrado no seu dispositivo. Por favor, instale um aplicativo de mapa para usar este recurso. Fotografias Locais @@ -730,6 +732,8 @@ A sua opinião Marcar como não sendo para carregamento Remover marcação de como não sendo para carregamento + Marcado para não ser carregado + Remover marcação para não ser carregado Mostrar imagens já processadas Ocultando as imagens já processadas Não foram encontradas mais imagens @@ -747,4 +751,10 @@ Passe o dedo com um gesto rápido e longo para executar estas operações: \n- Esquerda/direita: Ir para o anterior/seguinte\n- Cima: Selecionar\n- Baixo: Marcar como não sendo para carregamento. Para definir seu avatar da tabela de classificação, clique em \"Definir como avatar\" no menu de três pontos da sua imagem. As coordenadas não são exatas, mas a pessoa que carregou essa imagem crê que sejam próximas o suficiente. + Permissão de armazenamento negada + Incapaz de compartilhar esse item + + %d imagem selecinada + %d imagens selecionadas + diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index c6a55f9e9..115567cca 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -12,6 +12,7 @@ * Luckas * Malafaya * Mansil alfalb +* McDutchie * Mirzali * Sarilho1 * Unamane @@ -393,7 +394,7 @@ Passo %1$d de %2$d: %3$s Seguinte Anterior - Já existe um ficheiro com o nome %1$s. Tem a certeza de que deseja continuar?\n\n\nNota: será adicionado automaticamente ao nome do ficheiro um sufixo apropriado. + Já existe um ficheiro com o nome %1$s. Tem a certeza de que deseja continuar?\n\nNota: será adicionado automaticamente ao nome do ficheiro um sufixo apropriado. Não foi encontrada no seu dispositivo nenhuma aplicação de mapas compatível. Para usar esta funcionalidade instale uma aplicação de mapas, por favor. Fotografias Locais diff --git a/app/src/main/res/values-qq/strings.xml b/app/src/main/res/values-qq/strings.xml index 91cb62317..0a804042e 100644 --- a/app/src/main/res/values-qq/strings.xml +++ b/app/src/main/res/values-qq/strings.xml @@ -108,7 +108,7 @@ Message explaining what kind of images not to submit, without a received permission from the copyright holder. Message asking user if they understand what kinds of images to upload. Button text for confirming the user understands what kinds of images to upload.\n{{Identical|Yes}} - NEEDS DOCUMENTATION + Label for categories list in media detail panel.\n{{Identical|Category}} Placeholder for categories list in media detail panel, while loading from network.\n{{Identical|Loading}} Placeholder for categories list in media detail panel, if no categories found.\n{{Identical|None selected}} @@ -130,8 +130,8 @@ An animal. See [[:d:Q42569|Wikidata item Q42569]] for a list of possible translations. A bridge in Japan. See [[:d:Q1046736|Wikidata item Q1046736]] for a list of possible translations. A flower. See [[:d:Q93201|Wikidata item Q93201]] for a list of possible translations. - Description of [https://github.com/commons-app/apps-android-commons/blob/master/app/src/main/res/drawable-hdpi/welcome_wikipedia.png the image] displayed on the welcome screen to illustrate {{msg-wm|Commons-android-strings-welcome wikipedia text}} and {{msg-wm|Commons-android-strings-welcome wikipedia subtext}}. - Description of [https://github.com/commons-app/apps-android-commons/blob/master/app/src/main/res/drawable-hdpi/welcome_copyright.png the image] displayed on the welcome screen to illustrate {{msg-wm|Commons-android-strings-welcome copyright text}} and {{msg-wm|Commons-android-strings-welcome copyright subtext}}. + Description of [https://github.com/commons-app/apps-android-commons/blob/main/app/src/main/res/drawable-hdpi/welcome_wikipedia.webp the image] displayed on the welcome screen to illustrate {{msg-wm|Commons-android-strings-welcome wikipedia text}} and {{msg-wm|Commons-android-strings-welcome wikipedia subtext}}. + Description of [https://github.com/commons-app/apps-android-commons/blob/main/app/src/main/res/drawable-hdpi/welcome_copyright.webp the image] displayed on the welcome screen to illustrate {{msg-wm|Commons-android-strings-welcome copyright text}} and {{msg-wm|Commons-android-strings-welcome copyright subtext}}. A building in the city of Sydney. See [[:d:Q45178|Wikidata item Q45178]] for a list of possible translations. {{Identical|Cancel}} {{Identical|Open}} diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 02addb5e0..85bc94492 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -393,6 +393,7 @@ Неверный ответ Этот скриншот подходит для загрузки на Викисклад? Поделиться приложением + Повернуть Ошибка получения мест поблизости Нет мест поблизости Ошибка получения мест поблизости. @@ -779,6 +780,8 @@ Проведите быстро и широко, чтобы выполнить следующие действия: \n- Влево/вправо: переход к предыдущему/следующему \n- Вверх: выбрать\n- Вниз: пометить как не для загрузки. Чтобы установить свой аватар в таблице лидеров, на любом изображении в меню с тремя точками нажмите «Установить как аватар». Координаты не являются точными, но человек, загрузивший эту фотографию, считает, что они достаточно близки. + Доступ к хранилищу запрещён + Невозможно поделиться этим объектом выбрано %d изображение выбрано %d изображения diff --git a/app/src/main/res/values-sr/strings.xml b/app/src/main/res/values-sr/strings.xml index f023d7f2d..f0c8f86ac 100644 --- a/app/src/main/res/values-sr/strings.xml +++ b/app/src/main/res/values-sr/strings.xml @@ -197,7 +197,7 @@ Потребна дозвола: Читање спољашње меморије. Апликација не може да приступи Ваших галерији без овога. Потребна дозвола: Писање у спољашњој меморији. Апликација не може да приступи Вашој камери/галерији без ове дозволе. Захтевање дозволе за локацију - Сними локацију за снимке у апликацији + Забележи локацију за снимке у апликацији Омогућите ово да би сте снимили локацију за снимке у апликацији, у случају да је камера уређаја не сними У реду Упозорење diff --git a/app/src/main/res/values-tcy/strings.xml b/app/src/main/res/values-tcy/strings.xml index a890f12aa..5db413720 100644 --- a/app/src/main/res/values-tcy/strings.xml +++ b/app/src/main/res/values-tcy/strings.xml @@ -281,6 +281,7 @@ ತಪ್ಪು ಉತ್ತರೊ ಈ ಪರದೆಚಿತ್ರನ್ ಮಿತೇರಾವರೆ ಒಪ್ಪಿಗೆ ಉಂಡಾ? ಶೇರ್ ಅಪ್ಯ್ + ತಿರ್ಗಲೆ ಕೈತಲ್ದ ಜಾಗೊಲೆನ್ ಕಣನಗ ದೋಷವಾಂಡ್. ಇಂಚೊಗು ನಾಡಿನವು ದಾಲಾ ಇಜ್ಜಿ ಇರ್ ನಾಡ್ನಾ ಇತಿಹಾಸೋನ್ ಮಾಜಾಯಾರಾ ಉಪ್ಪುವರತಾ? From 6f96e8959b38c47c4b542d4a7467fe49be932885 Mon Sep 17 00:00:00 2001 From: HNYDDDTONY-ANU <140160683+HNYDDDTONY-ANU@users.noreply.github.com> Date: Thu, 2 Nov 2023 00:25:07 +1100 Subject: [PATCH 004/693] Fixes #5344 Some categories hidden at top of Upload Wizard suggestions, need to manually scroll up (#5370) * Fix Issue #5344 * fix update Issue #5344 * Add Comment --- .../categories/UploadCategoriesFragment.java | 16 ++++++++++++++++ .../commons/upload/depicts/DepictsFragment.java | 16 +++++++++++++++- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/fr/free/nrw/commons/upload/categories/UploadCategoriesFragment.java b/app/src/main/java/fr/free/nrw/commons/upload/categories/UploadCategoriesFragment.java index e378ef53b..f32fb286b 100644 --- a/app/src/main/java/fr/free/nrw/commons/upload/categories/UploadCategoriesFragment.java +++ b/app/src/main/java/fr/free/nrw/commons/upload/categories/UploadCategoriesFragment.java @@ -198,6 +198,22 @@ public class UploadCategoriesFragment extends UploadBaseFragment implements Cate } else { adapter.setItems(categories); } + adapter.notifyDataSetChanged(); + + // Nested waiting for search result data to load into the category + // list and smoothly scroll to the top of the search result list. + rvCategories.post(new Runnable() { + @Override + public void run() { + rvCategories.smoothScrollToPosition(0); + rvCategories.post(new Runnable() { + @Override + public void run() { + rvCategories.smoothScrollToPosition(0); + } + }); + } + }); } @Override diff --git a/app/src/main/java/fr/free/nrw/commons/upload/depicts/DepictsFragment.java b/app/src/main/java/fr/free/nrw/commons/upload/depicts/DepictsFragment.java index 3582f69c0..4450f67ef 100644 --- a/app/src/main/java/fr/free/nrw/commons/upload/depicts/DepictsFragment.java +++ b/app/src/main/java/fr/free/nrw/commons/upload/depicts/DepictsFragment.java @@ -246,7 +246,21 @@ public class DepictsFragment extends UploadBaseFragment implements DepictsContra adapter.setItems(depictedItemList); } } - depictsRecyclerView.smoothScrollToPosition(0); + + // Nested waiting for search result data to load into the depicted item + // list and smoothly scroll to the top of the search result list. + depictsRecyclerView.post(new Runnable() { + @Override + public void run() { + depictsRecyclerView.smoothScrollToPosition(0); + depictsRecyclerView.post(new Runnable() { + @Override + public void run() { + depictsRecyclerView.smoothScrollToPosition(0); + } + }); + } + }); } /** From 187872114c2fbacc3e3814fa4952943af993eecf Mon Sep 17 00:00:00 2001 From: Kanahia <114223204+kanahia1@users.noreply.github.com> Date: Thu, 2 Nov 2023 06:49:47 +0530 Subject: [PATCH 005/693] Fixed Grey empty screen at Upload wizard (#5356) * Fixed Grey empty screen at Upload wizard caption step after denying files permission * Empty commit * Fixed loop issue * Created docs for earlier commits * Fixed javadoc * Fixed spaces --- .../nrw/commons/upload/UploadActivity.java | 74 ++++++++++++++++++- .../nrw/commons/utils/PermissionUtils.java | 48 +++++++++--- app/src/main/res/values/strings.xml | 1 + 3 files changed, 108 insertions(+), 15 deletions(-) diff --git a/app/src/main/java/fr/free/nrw/commons/upload/UploadActivity.java b/app/src/main/java/fr/free/nrw/commons/upload/UploadActivity.java index 415629256..0b85cf089 100644 --- a/app/src/main/java/fr/free/nrw/commons/upload/UploadActivity.java +++ b/app/src/main/java/fr/free/nrw/commons/upload/UploadActivity.java @@ -2,6 +2,7 @@ package fr.free.nrw.commons.upload; import static fr.free.nrw.commons.contributions.ContributionController.ACTION_INTERNAL_UPLOADS; import static fr.free.nrw.commons.utils.PermissionUtils.PERMISSIONS_STORAGE; +import static fr.free.nrw.commons.utils.PermissionUtils.checkPermissionsAndPerformAction; import static fr.free.nrw.commons.wikidata.WikidataConstants.PLACE_OBJECT; import static fr.free.nrw.commons.wikidata.WikidataConstants.SELECTED_NEARBY_PLACE; import static fr.free.nrw.commons.wikidata.WikidataConstants.SELECTED_NEARBY_PLACE_CATEGORY; @@ -146,6 +147,23 @@ public class UploadActivity extends BaseActivity implements UploadContract.View, */ public static HashMap nearbyPopupAnswers; + /** + * A private boolean variable to control whether a permissions dialog should be shown + * when necessary. Initially, it is set to `true`, indicating that the permissions dialog + * should be displayed if permissions are missing and it is first time calling + * `checkStoragePermissions` method. + * + * This variable is used in the `checkStoragePermissions` method to determine whether to + * show a permissions dialog to the user if the required permissions are not granted. + * + * If `showPermissionsDialog` is set to `true` and the necessary permissions are missing, + * a permissions dialog will be displayed to request the required permissions. If set + * to `false`, the dialog won't be shown. + * + * @see UploadActivity#checkStoragePermissions() + */ + private boolean showPermissionsDialog = true; + @SuppressLint("CheckResult") @Override protected void onCreate(Bundle savedInstanceState) { @@ -169,7 +187,6 @@ public class UploadActivity extends BaseActivity implements UploadContract.View, } locationManager.requestLocationUpdatesFromProvider(LocationManager.GPS_PROVIDER); locationManager.requestLocationUpdatesFromProvider(LocationManager.NETWORK_PROVIDER); - checkStoragePermissions(); } private void init() { @@ -227,6 +244,12 @@ public class UploadActivity extends BaseActivity implements UploadContract.View, return sessionManager.isUserLoggedIn(); } + @Override + protected void onStart() { + super.onStart(); + checkStoragePermissions(); + } + @Override protected void onResume() { super.onResume(); @@ -235,6 +258,7 @@ public class UploadActivity extends BaseActivity implements UploadContract.View, askUserToLogIn(); } checkBlockStatus(); + checkStoragePermissions(); } /** @@ -255,13 +279,36 @@ public class UploadActivity extends BaseActivity implements UploadContract.View, true))); } - private void checkStoragePermissions() { + public void checkStoragePermissions() { + // Check if all required permissions are granted final boolean hasAllPermissions = PermissionUtils.hasPermission(this, PERMISSIONS_STORAGE); if (hasAllPermissions) { + // All required permissions are granted, so enable UI elements and perform actions receiveSharedItems(); - } else if (VERSION.SDK_INT >= VERSION_CODES.M) { - requestPermissions(PERMISSIONS_STORAGE, RequestCodes.STORAGE); + cvContainerTopCard.setVisibility(View.VISIBLE); + } else { + // Permissions are missing + cvContainerTopCard.setVisibility(View.INVISIBLE); + if(showPermissionsDialog){ + checkPermissionsAndPerformAction(this, + () -> { + cvContainerTopCard.setVisibility(View.VISIBLE); + this.receiveSharedItems(); + },() -> { + this.showPermissionsDialog = true; + this.checkStoragePermissions(); + }, + R.string.storage_permission_title, + R.string.write_storage_permission_rationale_for_image_share, + PERMISSIONS_STORAGE); + } } + /* If all permissions are not granted and a dialog is already showing on screen + showPermissionsDialog will set to false making it not show dialog again onResume, + but if user Denies any permission showPermissionsDialog will be to true + and permissions dialog will be shown again. + */ + this.showPermissionsDialog = hasAllPermissions ; } @Override @@ -721,6 +768,25 @@ public class UploadActivity extends BaseActivity implements UploadContract.View, } } + /** + * Get the value of the showPermissionDialog variable. + * + * @return {@code true} if Permission Dialog should be shown, {@code false} otherwise. + */ + public boolean isShowPermissionsDialog() { + return showPermissionsDialog; + } + + /** + * Set the value of the showPermissionDialog variable. + * + * @param showPermissionsDialog {@code true} to indicate to show + * Permissions Dialog if permissions are missing, {@code false} otherwise. + */ + public void setShowPermissionsDialog(final boolean showPermissionsDialog) { + this.showPermissionsDialog = showPermissionsDialog; + } + /** * Overrides the back button to make sure the user is prepared to lose their progress */ diff --git a/app/src/main/java/fr/free/nrw/commons/utils/PermissionUtils.java b/app/src/main/java/fr/free/nrw/commons/utils/PermissionUtils.java index bb35b2f67..b0a72eae1 100644 --- a/app/src/main/java/fr/free/nrw/commons/utils/PermissionUtils.java +++ b/app/src/main/java/fr/free/nrw/commons/utils/PermissionUtils.java @@ -7,6 +7,7 @@ import android.content.pm.PackageManager; import android.net.Uri; import android.os.Build; import android.provider.Settings; +import android.widget.Toast; import androidx.annotation.StringRes; import androidx.core.content.ContextCompat; import com.karumi.dexter.Dexter; @@ -16,6 +17,7 @@ import com.karumi.dexter.listener.PermissionRequest; import com.karumi.dexter.listener.multi.MultiplePermissionsListener; import fr.free.nrw.commons.CommonsApplication; import fr.free.nrw.commons.R; +import fr.free.nrw.commons.upload.UploadActivity; import java.util.List; @@ -80,14 +82,14 @@ public class PermissionUtils { *

* Sample usage: *

- * PermissionUtils.checkPermissionsAndPerformAction(activity, Manifest.permission.WRITE_EXTERNAL_STORAGE, - * () -> initiateCameraUpload(activity), R.string.storage_permission_title, - * R.string.write_storage_permission_rationale); + * PermissionUtils.checkPermissionsAndPerformAction(activity, + * Manifest.permission.WRITE_EXTERNAL_STORAGE, () -> initiateCameraUpload(activity), + * R.string.storage_permission_title, R.string.write_storage_permission_rationale); *

* If you don't want the permission rationale to be shown then use: *

- * PermissionUtils.checkPermissionsAndPerformAction(activity, Manifest.permission.WRITE_EXTERNAL_STORAGE, - * () -> initiateCameraUpload(activity), - 1, -1); + * PermissionUtils.checkPermissionsAndPerformAction(activity, + * Manifest.permission.WRITE_EXTERNAL_STORAGE, () -> initiateCameraUpload(activity), - 1, -1); * * @param activity activity requesting permissions * @param permissions the permissions array being requests @@ -110,8 +112,9 @@ public class PermissionUtils { *

* Sample usage: *

- * PermissionUtils.checkPermissionsAndPerformAction(activity, Manifest.permission.WRITE_EXTERNAL_STORAGE, - * () -> initiateCameraUpload(activity), () -> showMessage(), R.string.storage_permission_title, + * PermissionUtils.checkPermissionsAndPerformAction(activity, + * Manifest.permission.WRITE_EXTERNAL_STORAGE, () -> initiateCameraUpload(activity), () -> + * showMessage(), R.string.storage_permission_title, * R.string.write_storage_permission_rationale); * * @param activity activity requesting permissions @@ -138,8 +141,15 @@ public class PermissionUtils { // permission is denied permanently, we will show user a dialog message. DialogUtil.showAlertDialog(activity, activity.getString(rationaleTitle), activity.getString(rationaleMessage), - activity.getString(R.string.navigation_item_settings), null, - () -> askUserToManuallyEnablePermissionFromSettings(activity), null); + activity.getString(R.string.navigation_item_settings), + null, + () -> { + askUserToManuallyEnablePermissionFromSettings(activity); + if (activity instanceof UploadActivity) { + ((UploadActivity) activity).setShowPermissionsDialog(true); + } + }, null, null, + !(activity instanceof UploadActivity)); } else { if (null != onPermissionDenied) { onPermissionDenied.run(); @@ -158,8 +168,24 @@ public class PermissionUtils { activity.getString(rationaleMessage), activity.getString(android.R.string.ok), activity.getString(android.R.string.cancel), - token::continuePermissionRequest, - token::cancelPermissionRequest, + () -> { + if (activity instanceof UploadActivity) { + ((UploadActivity) activity).setShowPermissionsDialog(true); + } + token.continuePermissionRequest(); + } + , + () -> { + Toast.makeText(activity.getApplicationContext(), + R.string.permissions_are_required_for_functionality, + Toast.LENGTH_LONG) + .show(); + token.cancelPermissionRequest(); + if (activity instanceof UploadActivity) { + activity.finish(); + } + } + , null, false); } diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index a926e8108..9034b385b 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -778,6 +778,7 @@ Upload your first media by tapping on the add button. The coordinates are not the exact coordinates, but the person who uploaded this picture thinks they are close enough. Storage Permissions Denied Unable to share this item + Permissions are required for functionality %d image selected %d images selected From fb166b52ec3387a51cc27fcbef360b95d8817084 Mon Sep 17 00:00:00 2001 From: "translatewiki.net" Date: Thu, 2 Nov 2023 13:02:53 +0100 Subject: [PATCH 006/693] Localisation updates from https://translatewiki.net. --- app/src/main/res/values-bn/strings.xml | 1 + app/src/main/res/values-es/strings.xml | 5 +- app/src/main/res/values-fr/strings.xml | 5 +- app/src/main/res/values-hu/strings.xml | 4 + app/src/main/res/values-ia/error.xml | 2 +- app/src/main/res/values-ia/strings.xml | 259 +++++++++++++++++++-- app/src/main/res/values-in/strings.xml | 3 +- app/src/main/res/values-iw/strings.xml | 3 +- app/src/main/res/values-mk/strings.xml | 3 +- app/src/main/res/values-nl/strings.xml | 12 +- app/src/main/res/values-qq/strings.xml | 1 + app/src/main/res/values-ru/strings.xml | 3 +- app/src/main/res/values-sk/strings.xml | 3 +- app/src/main/res/values-sl/strings.xml | 3 +- app/src/main/res/values-sr/strings.xml | 2 +- app/src/main/res/values-tr/strings.xml | 3 +- app/src/main/res/values-zh-rTW/strings.xml | 3 +- app/src/main/res/values-zh/strings.xml | 3 +- 18 files changed, 284 insertions(+), 34 deletions(-) diff --git a/app/src/main/res/values-bn/strings.xml b/app/src/main/res/values-bn/strings.xml index 3a1a6319d..b12800fe5 100644 --- a/app/src/main/res/values-bn/strings.xml +++ b/app/src/main/res/values-bn/strings.xml @@ -332,6 +332,7 @@ ভুল উত্তর এই স্ক্রিনশটটি কি আপলোড করা ঠিক হয়েছে? অ্যাপ শেয়ার করুন + ঘোরান কাছাকাছি স্থানগুলি আনতে ত্রুটি। আশেপাশে কোনো এলাকা পাওয়া যায়নি আশেপাশের স্মৃতিস্তম্ভগুলি আনায়নে ত্রুটি৷ diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index c86843a1e..217a85437 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -34,6 +34,7 @@ * Madamebiblio * MarcoAurelio * MarionaDSR +* McDutchie * Miguel2706 * Mirzali * No se @@ -528,7 +529,7 @@ No se encontró ninguna categoría No se encontraron representaciones Se canceló la carga - No hay datos sobre el título o la descripción anteriores de la imagen + No hay datos sobre el título o la descripción de la imagen anterior ¿Por qué debe borrarse %1$s? %1$s fue subida por: %2$s Idioma por defecto de la descripción @@ -614,7 +615,7 @@ - Añadir las categorias a esta imagen para mejorar su usabilidad. - Añadir esta imagen al artículo relacionado de Wikipedia que no tiene imagen. Añadir la imagen a Wikipedia - ¿Quieres añadir esta imagen al artículo de %1$s de Wikipedia? + ¿Quieres añadir esta imagen al artículo de Wikipedia en %1$s? Confirmar Instrucciones 1. Usa el siguiente wikitexto: diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 5c314e8db..12f5a14fc 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -706,7 +706,7 @@ Génial Cette image a déjà été téléversée sur Commons. WLM - Cette image sera entrée dans le concours « Wiki aime les monuments » de 2021 + Cette image sera entrée dans le concours « Wiki aime les monuments » Afficher les monuments C’est le mois de « Wiki  aime les monuments » ! EN SAVOIR PLUS @@ -764,6 +764,9 @@ Balayez rapidement et assez loin pour effectuer les actions suivantes :\n– vers la gauche / droite : aller au précédent / suivant ;\n– vers le haut : sélectionner ;\n– vers le bas : marquer comme à ne pas téléverser. Pour configurer votre avatar de classement, appuyez sur « Définir comme avatar » dans le menu à trois points de n’importe quelle image. Les coordonnées ne sont pas les coordonnées exactes, mais la personne qui a téléversé cette image pense qu’elles sont suffisamment proches. + Droits de stockage refusés + Impossible de partager cet élément + Des autorisations sont nécessaires pour la fonctionnalité %d image sélectionnée %d images sélectionnées diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml index ebf361ca0..3e9679b1e 100644 --- a/app/src/main/res/values-hu/strings.xml +++ b/app/src/main/res/values-hu/strings.xml @@ -491,4 +491,8 @@ Felhasználó jelentése Tartalom jelentése Kérelem a felhasználó letiltásához + + %d kép kiválasztva + %d kép kiválasztva + diff --git a/app/src/main/res/values-ia/error.xml b/app/src/main/res/values-ia/error.xml index 877fcd28c..73c77e1be 100644 --- a/app/src/main/res/values-ia/error.xml +++ b/app/src/main/res/values-ia/error.xml @@ -3,7 +3,7 @@ * McDutchie --> - Commons: crash + Commons ha collabite Ups. Qualcosa ha facite fiasco! Dice nos lo que tu faceva, e invia nos lo per e-mail. Isto nos adjutara a corriger le problema! Gratias! diff --git a/app/src/main/res/values-ia/strings.xml b/app/src/main/res/values-ia/strings.xml index 50f2256b6..169e3e468 100644 --- a/app/src/main/res/values-ia/strings.xml +++ b/app/src/main/res/values-ia/strings.xml @@ -186,9 +186,9 @@ Requestar permission de immagazinage Permission necessari: lectura de immagazinage externe. Le application non pote acceder a tu galeria sin isto. Permission necessari: Scriber sur immagazinage externe. Le app non pote acceder a tu camera/galeria sin isto. - Requestar permission de position + Requestar permission de localisation Memorisar le position geographic pro photos prendite in le application - Activa isto pro memorisar le position geographic con photos prendite in le application in caso que le camera del apparato non lo registra + Activa isto pro memorisar le localisation con photos prendite in le application in caso que le camera del apparato non lo registra OK Advertimento Nomine de file duplicate trovate @@ -266,8 +266,8 @@ Per favor aperi session pro usar iste function Copiar le wikitexto al area de transferentia Le wikitexto ha essite copiate al area de transferentia - \"A proximitate\" poterea non functionar, perque le position geographic non es disponibile. - Le accesso al position ha essite refusate. Per favor indica tu position manualmente pro usar iste function. + “A proximitate” poterea non functionar perque le localisation non es disponibile. + Le accesso al localisation ha essite refusate. Per favor indica tu localisation manualmente pro usar iste function. Permission necessari pro monstrar un lista de locos a proximitate Itinerario Wikidata @@ -406,26 +406,26 @@ (Pro tote le imagines in le insimul) Cercar in iste area Requesta de permission - Vole tu que nos usa tu position actual pro monstrar le loco le plus vicin que ha besonio de imagines? - Non es possibile monstrar le loco le plus proxime que ha besonio de imagines sin permission de acceder al position. + Vole tu que nos usa tu localisation actual pro monstrar le loco le plus vicin que ha besonio de imagines? + Non es possibile monstrar le loco le plus vicin que ha besonio de imagines sin permission de acceder al localisation. Nunquam demandar isto de novo - Demandar permission de position + Demandar permission de localisation Demandar le permission de acceder al position quando es necessari pro le function de notification a proximitate. Un problema ha occurrite. Non esseva possibile obtener tu realisationes. Tu ha facite tante contributiones que nostre systema de calculo de realisationes non pote contar los. Iste es le realisation ultime! Termina le: Monstrar campanias Vider le campanias in curso - Permitter al application obtener le position geographic in caso que le camera non lo registra. Alcun cameras de apparatos non registra le position. In tal casos, permitter al application obtener e attachar le position rende tu contribution plus utile. Tu pote cambiar isto a tote momento in le Parametros. + Permitter al application obtener le localisation in caso que le camera non lo registra. Alcun cameras de apparatos non registra le localisation. In tal casos, permitter al application obtener e attachar le localisation rende tu contribution plus utile. Tu pote cambiar isto a tote momento in le Parametros. Permitter Clauder - Per favor, activa le accesso al position in le Parametros e essaya lo de novo.\n\nNota: Le file incargate pote non haber le position si le application non pote recuperar le position del apparato in curte tempore. - Le camera in le application necessita permission al position pro attachar lo a tu imagines in caso que le position non es disponibile in EXIF. Per favor, permitte al application acceder a tu position e essaya lo de novo.\n\nNota: Le file incargate pote non haber le position si le application non pote recuperar le position del apparato in curte tempore. + Per favor, activa le accesso al localisation in le Parametros e essaya lo de novo.\n\nNota: Le file incargate pote non haber le localisation si le application non pote recuperar le localisation del apparato in curte tempore. + Le camera in le application require le permission de acceder al localisation pro attachar lo a tu imagines in caso que le localisation non es disponibile in EXIF. Per favor, permitte al application acceder a tu localisation e essaya lo de novo.\n\nNota: Le file incargate pote non haber le localisation si le application non pote recuperar le localisation del apparato in curte tempore. Le application non registrara le position con photos prendite desde le application a causa del manco de permission de position - Le application non registrara le position con photos prendite desde le application perque GPS ha essite disactivate + Le application non registrara le localisation con photos prendite desde le application perque GPS ha essite disactivate Usar selector de photos basate sur documento - Le nove selector de photos de Android risca perder le information de position. Activa lo su tu sembla usar lo. - Si tu disactiva isto, le nove selector de photos de Android pote esser activate. Isto involve le periculo que information de position pote esser perdite.\n\nTocca ‘Leger plus’ pro plus information. + Le nove selector de photos de Android risca perder le information de localisation. Activa lo su tu sembla usar lo. + Si tu disactiva isto, le nove selector de photos de Android pote esser activate. Isto involve le periculo que information de localisation pote esser perdite.\n\nTocca ‘Leger plus’ pro plus information. Tu non videra plus le campanias. Totevia, tu pote reactivar iste notification in le Parametros si tu vole. Iste function require un connexion al rete. Per favor verifica tu parametros de connexion. Un error ha occurrite durante le processamento del imagine. Per favor essaya lo de novo! @@ -436,6 +436,7 @@ Controlo de categoria requestate Le requesta de controlo de categoria non ha functionate Controlo de categoria requestate pro %1$s + Non poteva requestar un controlo de categoria pro %1$s Requesta de un controlo de categoria pro %1$s Facite Invio de regratiamento: Successo @@ -481,18 +482,248 @@ Selige qual etiquettas EXIF conservar in files incargate Autor Derectos de autor - Loco + Localisation Modello de camera Modello de lente Numeros de serie Software + Accesso al localisation del file multimedial refusate + Es possibile que nos non potera obtener automaticamente le datos de localisation del imagines que tu incarga. Per favor adde le localisation appropriate pro cata imagine ante de submitter. + Incarga photos a Wikimedia Commons directemente desde tu telephono. Discarga le app de Commons ora: %1$s + Condivider app via… + Information del imagine + Necun categoria trovate + Necun representation trovate + Incargamento cancellate + Il non ha datos sur le titulo o description del imagine anterior + Proque debe %1$s esser delite? %1$s es incargate per: %2$s + Lingua predefinite de description + Nominar pro deletion + Successo + %1$s nominate pro deletion. + Fallite + Non poteva requestar deletion. + un ‘selfie’ que non es usate in alcun articulo + totalmente indistincte + nonsenso, absolutemente non usabile in alcun articulo + Photo de pressa + Un photo qualcunque prendite de internet + Logo Violation del libertate de panorama + Perque es + Tentativa in curso de actualisar categorias. + Actualisation de categoria + Successo + + Le categoria %1$s es addite. + Le categorias %1$s es addite. + + Non poteva adder categorias. + Actualisar categorias + Tentativa in curso de actualisar representationes. + Modificar representationes + + Le representation %1$s es addite. + Le representationes %1$s es addite. + + Non poteva adder representationes. + Tentativa in curso de actualisar coordinatas. + Actualisation de coordinatas + Actualisation del description + Actualisation del legenda + Successo + Le coordinatas %1$s es addite. + Descriptiones es addite. + Legenda es addite. + Non poteva adder categorias. + Non poteva adder descriptiones + Non poteva adder legenda. + Non pote obtener coordinatas. + Non pote obtener descriptiones. + Modificar descriptiones e legendas + Condivider imagine via + Tu non ha ancora facite alcun contribution + %s non ha ancora facite alcun contribution + Conto create! + Texto copiate al area de transferentia + Notification marcate como legite + Un error ha occurrite! + Stato del loco: + Existe + Require photo + Typo de loco: + Ponte, museo, hotel, etc. Un error ha occurrite durante le apertura de session. Es necessari reinitialisar tu contrasigno. + MULTIMEDIA + CLASSES FILIO + CLASSES GENITOR + Loco a proximitate trovate + Es isto un photo de %1$s? Marcapaginas Configurationes + Removite del marcapaginas + Addite al marcapaginas + Qualcosa ha vadite mal. Non poteva fixar le fundo de schermo + Fixar como fundo de schermo + Installation del fundo de schermo. Un momento… + Sequer le systema + Obscur + Clar + Fallimento de acceder al parametros de localisation. Per favor activa manualmente le localisation + Pro le melior resultatos, elige le modo de alte precision. + Activar localisation? + ‘Locos a proximitate’ require que le localisation es activate pro functionar correctemente + Tu debe dar accesso a tu localisation actual pro determinar automaticamente tu position. + Ha tu prendite iste duo photos al mesme loco? Vole tu usar le latitude/longitude del imagine al dextra? + Cargar plus + Necun loco trovate. Tenta cambiar tu criterios de recerca. + Meliorationes suggerite: + - Adde categorias a iste imagine pro meliorar le usabilitate. + - Adde iste imagine al articulo de Wikipedia associate que non ha imagines. + Adder imagine a Wikipedia + Vole tu adder iste photo al articulo de Wikipedia in %1$s? + Confirmar + Instructiones + 1. Usa le sequente wikitexto: + 2. Cliccar sur Confirmar aperira le articulo de Wikipedia + 3. Cerca un section appropriate in le articulo pro tu imagine + 4. Clicca sur le icone Modificar (resimilante un stilo) pro ille section. + 5. Colla le wikitexto in le loco appropriate. + 6. Modifica le wikitexto pro un positionamento appropriate, si necessari. Pro plus information, lege <a href=\"https://en.wikipedia.org/wiki/Wikipedia:Manual_of_Style/Images#How_to_place_an_image\">isto</a>. + 7. Publica le articulo + Copiar le wikicodice al area de transferentia + pausar + reprender + Pausate + Plus + Marcapaginas + Realisationes Tabula de classamento + Rango: + Numero: + Rango + Usator + Numero + Fixar como avatar pro le tabula de classamento + Fixation como avatar in curso, un momento + Avatar fixate + Error durante le fixation del nove avatar, per favor reproba Eliger como avatar + Annual + Septimanal + Tote le tempore + Incargar + A proximitate + Usate + Mi rango + &#169; <a href=\"https://www.mapbox.com/about/maps/\">Mapbox</a> &#169; <a href=\"https://www.openstreetmap.org/copyright\">OpenStreetMap</a> <a href=\"https://www.mapbox.com/map-feedback/\">Meliorar iste carta</a> + Le modo de connexion limitate ha essite activate! + Le modo de connexion limitate ha essite disactivate. Le incargamentos attendente se reprendera ora. + Modo de connexion limitate + Imagines de qualitate + Le imagines de qualitate es diagrammas o photographias que compli certe standards de qualitate (generalmente de character technic) e que es preciose pro le projectos de Wikimedia. + Reprende incargamento… + Pausa incargamento… + Cancella incargamento… + Cancellar incargamento + Tu ha activate le modo de connexion limitate. Tote le incargamentos es pausate e continuara quando iste modo es disactivate. + Le modo de connexion limitate es active. + Per favor, scribe un curte legenda que describe lo que tu imagine monstra. In le description, indica lo que rende le imagine interessante, typic o rar, e explica le contexto, visibile o non. Emplea terminos tanto exacte como possibile. + Per favor, trova e selige tote le conceptos que iste imagine representa. Sia tanto specific como possibile. Si le imagine representa plure cosas, selige totes intra limites rationabile. Non selige etiquettas generic si existe etiquettas plus specific. + Per favor, selige le categorias appropriate. A differentia del representationes, le categorias es solmente in anglese. + Commons rende tu imagines reusabile e adaptabile per omnes. Vole tu renunciar a tote derectos? Vole tu esser attribuite? Vole tu que le adaptationes usa le mesme licentia? + Representa + Licentia del file multimedial + Detalios sur le file multimedial + Vider pagina de categoria + Visitar le pagina del objecto + Lingua del interfacie de usator del application + Remove un legenda e un description + Leger plus + In tote le linguas + Elige un position + Move le panorama e face zoom pro adjustar + Selige position + Monstrar in application cartographic + Modificar position + Le vista in imagine del selector de loco + \n Le umbra del vista in imagine del selector de loco + Localisation del imagine + Verificar si le localisation es correcte + Etiquetta + Description + Elementos + Selector personalisate + Necun imagine + Facite + Retro + Benvenite al selector de imagine personalisate + Iste selector te monstra qual imagines tu ha ja incargate a Commons. + A differentia del imagine al sinistra, le imagine al dextra ha le logo de Commons que indica que illo ha ja essite incargate.\n Tocca e mantene pro un previsualisation del imagine. + Genial + Iste imagine ha ja essite incargate a Commons. + Iste imagine entrara in le concurso Wiki Loves Monuments. + Monstrar monumentos + Es le mense de Wiki Loves Monuments! + LEGER PLUS + Wiki Loves Monuments es un concurso international de photographias de monumentos organisate per Wikimedia + Permission necessari + Le cartas a proximitate debe leger le STATO DEL TELEPHONO pro functionar correctemente + Contributiones del usator: %s + Realisationes del usator: %s + Visitar le pagina del usator + Modificar representationes + Modificar categorias + Optiones avantiate + Tu pote personalisar le consulta ‘A proximitate’. In caso de errores, reinitialisa e applica. + Applicar + Reinitialisar + Le datos de localisation adjuta le redactores wiki a trovar tu imagine, rendente lo multo plus utile.\nTu files recentemente incargate non ha localisation.\nNos suggere que tu activa le localisation un le parametros de tu application de camera.\nGratias pro incargar! + Necun localisation trovate + Proque non adder le loco ubi iste imagine ha essite prendite?\nLe datos de localisation adjuta le redactores wiki a trovar tu imagine, rendente lo multo plus utile.\nGratias! + Adder localisation + Per favor remove de iste e-mail omne information que tu non vole condivider publicamente. In ultra, sia conscie que le adresse de e-mail que tu usa pro publicar, e le nomine e imagine de profilo associate, essera visibile publicamente. + Detalios + Le realisationes es disponibile solmente in le version de production. Per favor consulta le documentation del disveloppator. + Le tabula de classamento es solmente disponibile in le version de production. Per favor consulta le documentation del disveloppator. + Per favor incarga solmente imagines que tu ha prendite tu mesme. Le incargatores de imagines con derectos de autor essera blocate. Isto se applica equalmente al version beta. Gratias pro testar le application! + Per favor dismarca omne information que tu non vole condivider publicamente. + Nivello del API + Version Android + Fabricante del apparato + Modello del apparato + Nomine del apparato + Typo de rete + Gratias pro dar retroaction + Error durante le invio del retroaction + Que es tu commentario? + Tu commentario + Marcar como non a incargar + Dismarcar como non a incargar + Marca como non a incargar + Dismarca como non a incargar + Monstrar imagines ja tractate + Celar imagines ja tractate + Necun altere imagine trovate + Iste imagine ha ja essite incargate + Non pote seliger iste imagine pro incargamento + Imagine seligite + Imagine marcate como non a incargar + Reportar + Reportar violation + Reportar iste usator + Reportar iste contento + Requestar de blocar iste usator + Benvenite al modo de selection de plen schermo + Usa duo digitos pro facer zoom avante e retro. + Glissa rapidemente e longe pro exequer iste actiones:\n- Sinistra/Dextra: Ir al precedente/sequente\n- In alto: Seliger\n- In basso: Marcar como non a incargar. Pro eliger tu avatar pro le tabula de classamento, tocca \"Eliger como avatar\" in le menu a tres punctos de qualcunque imagine. Le coordinatas non es exacte, ma le persona qui ha incargate iste imagine pensa que illos es satis proxime. + Permission de immagazinage refusate + Non pote condivider iste objecto + + %d imagine seligite + %d imagines seligite + diff --git a/app/src/main/res/values-in/strings.xml b/app/src/main/res/values-in/strings.xml index d4dca30dc..21e3fbeb1 100644 --- a/app/src/main/res/values-in/strings.xml +++ b/app/src/main/res/values-in/strings.xml @@ -11,6 +11,7 @@ * Ilham151096 * Iwan Novirion * Joseagush +* McDutchie * NFarras * Naufal06 * Pebaryan @@ -651,7 +652,7 @@ Bagus Gambar ini sudah diunggah di Commons. WLM - Gambar ini akan dimasukkan ke dalam kontes Wiki Loves Monuents 2021 + Gambar ini akan dimasukkan ke dalam kontes Wiki Loves Monuments Tampilkan monumen Ini adalah bulan Wiki Loves Monuments! PELAJARI LEBIH LANJUT diff --git a/app/src/main/res/values-iw/strings.xml b/app/src/main/res/values-iw/strings.xml index d85384835..1a093b3cc 100644 --- a/app/src/main/res/values-iw/strings.xml +++ b/app/src/main/res/values-iw/strings.xml @@ -706,7 +706,7 @@ מגניב התמונה הזאת כבר הועלתה לוויקישיתוף. ויקיפדיה אוהבת אתרי מורשת - התמונה הזאת תוכנס לתחרות ויקי אוהבת אתרי מורשת 2021 + התמונה הזאת תוכנס לתחרות ויקי אוהבת אתרי מורשת הצגת אתרי מורשת זהו חודש ויקי אוהבת אתרי מורשת! מידע נוסף @@ -766,6 +766,7 @@ נקודות הציון אינן מדויקות, אבל האדם שהעלה את התמונה הזאת חושב שהן קרובות מספיק. הרשאת האחסון נדחתה לא ניתן לשתף את הפריט הזה + צריך הרשאות כדי להשתמש בזה נבחרה תמונה אחת נבחרו שתי תמונות diff --git a/app/src/main/res/values-mk/strings.xml b/app/src/main/res/values-mk/strings.xml index f79393362..ebc64479f 100644 --- a/app/src/main/res/values-mk/strings.xml +++ b/app/src/main/res/values-mk/strings.xml @@ -672,7 +672,7 @@ Одлично Оваа слика е веќе подигната на Ризницата. WLM - Оваа слика ќе учествува во натпреварот „Вики ги сака спомениците 2021“ + Оваа слика ќе учествува во натпреварот „Вики ги сака спомениците“ Прикажи споменици Ова е месец на „Вики ги сака спомениците“! ДОЗНАЈТЕ ПОВЕЌЕ @@ -732,6 +732,7 @@ Наведените координати не се прецизни, но лицето што ја подигнало сликава смета дека се доволно блиску. Дозволата за складирање е одбиена Не може да се сподели оваа ставка + Се бараат дозволи за функцијата Избрана е %d слика Избрани се %d слики diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index 15a5f35c4..ba954587b 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -543,8 +543,8 @@ Categorie-update Afgerond - Categorie %1$s is toegevoegd. - Categorieën %1$s zijn toegevoegd. + Categorie %1$s wordt toegevoegd. + Categorieën %1$s worden toegevoegd. Kan geen categorieën toevoegen. Categorieën bijwerken @@ -560,9 +560,9 @@ Bijwerking beschrijving Bijwerking bijschrift Afgerond - Coördinaten %1$s zijn toegevoegd. - Beschrijvingen zijn toegevoegd. - Bijschrift is toegevoegd. + Coördinaten %1$s worden toegevoegd. + Beschrijvingen worden toegevoegd. + Bijschrift wordt toegevoegd. Kan geen coördinaten toevoegen. Kon beschrijvingen niet toevoegen. Kon bijschrift niet toevoegen. @@ -594,7 +594,7 @@ Er is iets fout gegaan. Kan de achtergrond niet instellen Instellen als achtergrond Wordt ingesteld als achtergrond. Een ogenblik geduld... - Volgsysteem + Systeem volgen Donker Licht Kan locatie-instellingen niet openen. Schakel locatie handmatig in diff --git a/app/src/main/res/values-qq/strings.xml b/app/src/main/res/values-qq/strings.xml index 0a804042e..648d7a65c 100644 --- a/app/src/main/res/values-qq/strings.xml +++ b/app/src/main/res/values-qq/strings.xml @@ -176,6 +176,7 @@ {{Identical|Author}} {{Identical|Location}} {{identical|Bookmark}} + Option to make the app\'s theme follow the global system setting. {{Identical|More}} <code>&amp;#169;</code> is the copyright symbol (©). A description of a visual element, location picker image shadow. Used for accesibility usually. diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 85bc94492..30cc3ea1f 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -17,6 +17,7 @@ * Kaganer * Kareyac * MaxBioHazard +* McDutchie * Megakott * Monirec * Movses @@ -723,7 +724,7 @@ В отличие от изображения слева, изображение справа имеет логотип Commons, указывающий, что оно уже загружено.\n Нажмите и удерживайте для предварительного просмотра изображения. Потрясающе Это изображение уже было загружено на Викисклад. - Это изображение будет участвовать в конкурсе «Вики любит памятники — 2021». + Это изображение будет участвовать в конкурсе «Вики любит памятники». Показать памятники Это месяц «Вики любит памятники»! УЗНАТЬ ПОДРОБНЕЕ diff --git a/app/src/main/res/values-sk/strings.xml b/app/src/main/res/values-sk/strings.xml index e9aba6fc0..3e6fe7636 100644 --- a/app/src/main/res/values-sk/strings.xml +++ b/app/src/main/res/values-sk/strings.xml @@ -3,6 +3,7 @@ * AtonX * Kusavica * Luky001 +* McDutchie * Patriccck * Patrik L. * Sudo77(new) @@ -671,7 +672,7 @@ Na rozdiel od obrázka v ľavo, obrázkov v pravo má logo Commons, ktoré indikuje, že už je nahraný. Podržte kurzor nad obrázkom pre náhľad. Úžasné Tento obrázok už bol do Commons nahraný. - Tento obrázok bude zaradený do súťaže Wiki miluje monumenty 2021 + Tento obrázok bude zaradený do súťaže Wiki miluje monumenty Zobraziť monumenty Je mesiac Wiki miluje monumenty! ZISTIŤ VIAC diff --git a/app/src/main/res/values-sl/strings.xml b/app/src/main/res/values-sl/strings.xml index e2f3999ec..2393f26b0 100644 --- a/app/src/main/res/values-sl/strings.xml +++ b/app/src/main/res/values-sl/strings.xml @@ -2,6 +2,7 @@ @@ -689,7 +690,7 @@ Odlično Ta slika je že naložena v Zbirko. WLM - Ta slika bo vključena v natečaj Viki obožuje spomenike 2021 + Ta slika bo vključena v natečaj Viki obožuje spomenike Prikaži spomenike Odprt je natečaj Viki obožuje spomenike! VEČ O TEM diff --git a/app/src/main/res/values-sr/strings.xml b/app/src/main/res/values-sr/strings.xml index f0c8f86ac..c50c86703 100644 --- a/app/src/main/res/values-sr/strings.xml +++ b/app/src/main/res/values-sr/strings.xml @@ -580,7 +580,7 @@ Потврди Упутства 1. Користите следећи викитекст: - 2. Додиривањем \"Потвдрди\", биће отворен чланак на Википедији + 2. Кликом на потврди, биће отворен чланак на Википедији 3. Пронађите одговарајући одељак у чланку за вашу слику 4. Тапните на иконицу Уреди (који личи на оловку) за тај одељак. 5. Налепите викитекст на одговарајуће место. diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index ec52c6e96..bbd9ff333 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -12,6 +12,7 @@ * JackUKElliott * Joseph * McAang +* McDutchie * Mirzali * MrSchipunov * MuratTheTurkish @@ -690,7 +691,7 @@ Soldaki resimden farklı olarak, sağdaki resimde zaten yüklendiğini belirten Commons logosu var.\n Resim ön izlemesi için dokunup basılı tutun. Harika Bu resim zaten Commons\'a yüklendi. - Bu resim Viki, Anıtları Seviyor 2021 yarışmasına katılacaktır + Bu resim Viki, Anıtları Seviyor yarışmasına katılacaktır Anıtları göster Viki, Anıtları Seviyor ayı! DAHA FAZLA BİLGİ EDİN diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index c1cf36401..bba58db2a 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -10,6 +10,7 @@ * LNDDYL * Liuxinyu970226 * Madhurgupta10 +* McDutchie * Reke * S099001 * Simon Shek @@ -692,7 +693,7 @@ 棒極了 此圖片已上傳到維基共享資源。 維基愛古蹟 - 此圖片會進入2021年維基愛古蹟競賽 + 此圖片會進入年維基愛古蹟競賽 顯示古蹟景點 本月有「維基愛古蹟」活動! 了解更多 diff --git a/app/src/main/res/values-zh/strings.xml b/app/src/main/res/values-zh/strings.xml index df7b7346d..5c9ca4f10 100644 --- a/app/src/main/res/values-zh/strings.xml +++ b/app/src/main/res/values-zh/strings.xml @@ -18,6 +18,7 @@ * LittlePaw365 * Liuxinyu970226 * Looong +* McDutchie * NACHOgao3 * Qiyue2001 * Shizhao @@ -712,7 +713,7 @@ 右边的图片与左边的不同,它具有已上传至维基共享资源的标志。\n点击并长按来预览图像。 棒极了 此图像已上传至维基共享资源。 - 此图像将会进入2021年维基爱古迹竞赛 + 此图像将会进入年维基爱古迹竞赛 显示古迹 维基爱古迹的月份! 了解更多 From 327541c7b13dedc979b0a88b434aee14b62975d0 Mon Sep 17 00:00:00 2001 From: "translatewiki.net" Date: Mon, 6 Nov 2023 13:02:54 +0100 Subject: [PATCH 007/693] Localisation updates from https://translatewiki.net. --- app/src/main/res/values-bg/strings.xml | 1 + app/src/main/res/values-bn/strings.xml | 2 ++ app/src/main/res/values-de/strings.xml | 29 ++++++++++++++++++++++ app/src/main/res/values-ia/strings.xml | 1 + app/src/main/res/values-iw/strings.xml | 2 +- app/src/main/res/values-ko/strings.xml | 1 + app/src/main/res/values-nl/strings.xml | 3 ++- app/src/main/res/values-qq/strings.xml | 2 ++ app/src/main/res/values-sr/strings.xml | 1 + app/src/main/res/values-zh-rTW/strings.xml | 3 ++- app/src/main/res/values-zh/strings.xml | 2 +- 11 files changed, 43 insertions(+), 4 deletions(-) diff --git a/app/src/main/res/values-bg/strings.xml b/app/src/main/res/values-bg/strings.xml index c8bc856df..87d6305f1 100644 --- a/app/src/main/res/values-bg/strings.xml +++ b/app/src/main/res/values-bg/strings.xml @@ -230,6 +230,7 @@ Оценете ни! ЧЗВ Няма връзка с интернет + Превеждане Езици Отказ Това място има нужда от снимка. diff --git a/app/src/main/res/values-bn/strings.xml b/app/src/main/res/values-bn/strings.xml index b12800fe5..1cc44fd5d 100644 --- a/app/src/main/res/values-bn/strings.xml +++ b/app/src/main/res/values-bn/strings.xml @@ -2,6 +2,7 @@ कॉमन्स फेसबुक पृष्ठ - कॉमन्स गिटहब स्त्रोत कूटशब्द + कॉमन्स गिटहब सोर्स कोड कॉमन्स का प्रतीक चिन्ह - कॉमन्स जालस्थान + कॉमन्स का जालस्थान जमा करें विवरण चित्र @@ -67,10 +68,10 @@ प्रवेश पासवर्ड भूल गये? खाता बनायें - प्रवेश हो रहा - प्रतीक्षा करें… - प्रवेश में सफल हुआ! - प्रवेश विफल हुआ! + लॉग इन हो रहा है + कृपया प्रतीक्षा करें... + लॉग इन सफल! + लॉग इन विफल! फ़ाइल नहीं मिली, कृपया अन्य फ़ाइल से प्रयास करें। प्रमाणीकरण विफल, पुनः लॉगिन करें अपलोड आरंभ! @@ -78,13 +79,13 @@ अपना अपलोड देखने के लिए टैप करें %1$s का अपलोड शुरू हुआ %1$s अपलोड हो रहा - %1$s का अपलोड पूरा हुआ + %1$s का अपलोड पूर्ण हुआ %1$s का अपलोड विफल हुआ देखने हेतु टैप करें मेरे ताज़ा अपलोड प्रतीक्षा में विफल - %1$d%% पूरा हुआ + %1$d%% पूर्ण हुआ अपलोड हो रहा गैलरी से फ़ोटो लें diff --git a/app/src/main/res/values-ia/strings.xml b/app/src/main/res/values-ia/strings.xml index e0115a103..3a37f6b0c 100644 --- a/app/src/main/res/values-ia/strings.xml +++ b/app/src/main/res/values-ia/strings.xml @@ -663,6 +663,10 @@ A differentia del imagine al sinistra, le imagine al dextra ha le logo de Commons que indica que illo ha ja essite incargate.\n Tocca e mantene pro un previsualisation del imagine. Genial Iste imagine ha ja essite incargate a Commons. + Pro rationes technic, le application non pote de maniera digne de fide incargar plus de %1$d imagines al vice. Le limite de incargamento de %1$d ha essite excedite per %2$d. + Clauder + Max: %1$d + Error: limite de incargamento excedite Iste imagine entrara in le concurso Wiki Loves Monuments. Monstrar monumentos Es le mense de Wiki Loves Monuments! diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index 69a0f1d97..0e4910f4a 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -676,6 +676,10 @@ Till skillnad från bilden till vänster har bilden till höger Commons-logotypen, vilket innebär att den redan är uppladdad.\n Tryck och håll ned för att förhandsgranska bilden. Häftigt Denna bild har redan laddats upp till Commons. + Av tekniska skäl kan appen inte ladda upp fler än %1$d bilder samtidigt. Uppladdningsgränsen för %1$d har överskridits med %2$d. + Stäng + Max: %1$d + Fel: Uppladdningsgränsen har överskridits Denna bild kommer att skickas in till tävlingen Wiki Loves Monuments Visa monument Det är Wiki Loves Monuments-månaden! diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index 8f28952f4..907d62615 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -475,19 +475,19 @@ 向%1$s發送感謝 這是否遵守版權規範? 這是正確分類的嗎? - 這在範圍內嗎? + 這在收錄範圍內嗎? 您想要向貢獻者感謝嗎? 若此圖片無用,點擊「否」來提名刪除。 商標、螢幕截圖、電影海報通常都會違反版權。\n點擊「否」來提名刪除此圖片。 %1$s會被您的肯定給鼓舞 喔,這甚至沒有分類! 此圖片屬於%1$s分類。 - 這超出範圍是因為 + 這不在收錄範圍的原因是 該文件侵犯版權,原因是 下一張圖片 是的,為何不呢 點擊此按鈕會提供給您其它近期從維基共享資源上傳的圖片 - 您可以檢閱來改善維基共享資源的品質。\n檢閱的三個指標有:\n- 此圖片是否符合範圍?\n當您輕觸「否」(代表不在符合範圍),您會對此圖片添加刪除提名模板。\n\n- 此圖片是否遵守版權規範?\n當您輕觸「否」(代表未遵守版權規範),您會對此圖片添加刪除提名模板。\n\n- 此圖片是否有分類正確?\n當您輕觸「否」(代表分類不正確),您會對此圖片添加分類請求模板。\n\n如果一切都沒問題,就不會對圖片添加模板,您另外可以對貢獻者表達感謝。 + 您可以檢閱來改善維基共享資源的品質。\n檢閱的三個指標有:\n- 此圖片是否在收錄範圍?\n當您輕觸「否」(代表不在收錄範圍),您會對此圖片添加刪除提名模板。\n\n- 此圖片是否遵守版權規範?\n當您輕觸「否」(代表未遵守版權規範),您會對此圖片添加刪除提名模板。\n\n- 此圖片是否有分類正確?\n當您輕觸「否」(代表分類不正確),您會對此圖片添加分類請求模板。\n\n如果一切都沒問題,就不會對圖片添加模板,您另外可以對貢獻者表達感謝。 沒有圖片被使用到 沒有圖片被還原回復 未上傳圖片 From e1e4f9329a8d0dcb307bdc9d6b09c0a66acd7745 Mon Sep 17 00:00:00 2001 From: Pierre Monier Date: Thu, 30 Nov 2023 02:07:53 +0100 Subject: [PATCH 024/693] Add background color option for media detail page (#5394) * feat: add backgroundColor property on media * feat: add optional menu items for media backgroundColor * fix: test pass when running in batch * refactor: remove backgroundColor from media * refactor: add string for background color menu * chore: remove useless change * feat: change media image background color * feat: pass backgroundColor to ZoomableActivity * chore: remove extra space --- .../commons/media/MediaDetailFragment.java | 46 ++++++++++- .../media/MediaDetailPagerFragment.java | 63 +++++++++++++++ .../nrw/commons/media/ZoomableActivity.kt | 18 ++++- .../main/res/menu/fragment_image_detail.xml | 20 +++++ app/src/main/res/values/strings.xml | 2 + .../media/MediaDetailFragmentUnitTests.kt | 45 ++++++++++- .../MediaDetailPagerFragmentUnitTests.kt | 81 +++++++++++++++++-- 7 files changed, 260 insertions(+), 15 deletions(-) diff --git a/app/src/main/java/fr/free/nrw/commons/media/MediaDetailFragment.java b/app/src/main/java/fr/free/nrw/commons/media/MediaDetailFragment.java index f2315c81c..3d6cddf15 100644 --- a/app/src/main/java/fr/free/nrw/commons/media/MediaDetailFragment.java +++ b/app/src/main/java/fr/free/nrw/commons/media/MediaDetailFragment.java @@ -17,6 +17,7 @@ import android.annotation.SuppressLint; import android.app.AlertDialog; import android.content.Context; import android.content.Intent; +import android.content.SharedPreferences; import android.content.res.Configuration; import android.graphics.drawable.Animatable; import android.net.Uri; @@ -78,6 +79,7 @@ import fr.free.nrw.commons.di.CommonsDaggerSupportFragment; import fr.free.nrw.commons.explore.depictions.WikidataItemDetailsActivity; import fr.free.nrw.commons.kvstore.JsonKvStore; import fr.free.nrw.commons.location.LocationServiceManager; +import fr.free.nrw.commons.media.ZoomableActivity.ZoomableActivityConstants; import fr.free.nrw.commons.profile.ProfileActivity; import fr.free.nrw.commons.settings.Prefs; import fr.free.nrw.commons.ui.widget.HtmlTextView; @@ -111,8 +113,11 @@ import timber.log.Timber; public class MediaDetailFragment extends CommonsDaggerSupportFragment implements CategoryEditHelper.Callback { - private static final int REQUEST_CODE = 1001 ; - private static final int REQUEST_CODE_EDIT_DESCRIPTION = 1002 ; + private static final int REQUEST_CODE = 1001; + private static final int REQUEST_CODE_EDIT_DESCRIPTION = 1002; + private static final String IMAGE_BACKGROUND_COLOR = "image_background_color"; + static final int DEFAULT_IMAGE_BACKGROUND_COLOR = 0; + private boolean editable; private boolean isCategoryImage; private MediaDetailPagerFragment.MediaDetailProvider detailProvider; @@ -388,6 +393,15 @@ public class MediaDetailFragment extends CommonsDaggerSupportFragment implements zoomableIntent.setData(Uri.parse(media.getImageUrl())); zoomableIntent.putExtra( ZoomableActivity.ZoomableActivityConstants.ORIGIN, "MediaDetails"); + + int backgroundColor = getImageBackgroundColor(); + if (backgroundColor != DEFAULT_IMAGE_BACKGROUND_COLOR) { + zoomableIntent.putExtra( + ZoomableActivity.ZoomableActivityConstants.PHOTO_BACKGROUND_COLOR, + backgroundColor + ); + } + ctx.startActivity( zoomableIntent ); @@ -599,6 +613,10 @@ public class MediaDetailFragment extends CommonsDaggerSupportFragment implements * - when the high resolution image is available, it replaces the low resolution image */ private void setupImageView() { + int imageBackgroundColor = getImageBackgroundColor(); + if (imageBackgroundColor != DEFAULT_IMAGE_BACKGROUND_COLOR) { + image.setBackgroundColor(imageBackgroundColor); + } image.getHierarchy().setPlaceholderImage(R.drawable.image_placeholder); image.getHierarchy().setFailureImage(R.drawable.image_placeholder); @@ -1472,4 +1490,28 @@ public class MediaDetailFragment extends CommonsDaggerSupportFragment implements public interface Callback { void nominatingForDeletion(int index); } + + /** + * Called when the image background color is changed. + * You should pass a useable color, not a resource id. + * @param color + */ + public void onImageBackgroundChanged(int color) { + int currentColor = getImageBackgroundColor(); + if (currentColor == color) { + return; + } + + image.setBackgroundColor(color); + getImageBackgroundColorPref().edit().putInt(IMAGE_BACKGROUND_COLOR, color).apply(); + } + + private SharedPreferences getImageBackgroundColorPref() { + return getContext().getSharedPreferences(IMAGE_BACKGROUND_COLOR + media.getPageId(), Context.MODE_PRIVATE); + } + + private int getImageBackgroundColor() { + SharedPreferences imageBackgroundColorPref = this.getImageBackgroundColorPref(); + return imageBackgroundColorPref.getInt(IMAGE_BACKGROUND_COLOR, DEFAULT_IMAGE_BACKGROUND_COLOR); + } } diff --git a/app/src/main/java/fr/free/nrw/commons/media/MediaDetailPagerFragment.java b/app/src/main/java/fr/free/nrw/commons/media/MediaDetailPagerFragment.java index c2fdab702..d0773279b 100644 --- a/app/src/main/java/fr/free/nrw/commons/media/MediaDetailPagerFragment.java +++ b/app/src/main/java/fr/free/nrw/commons/media/MediaDetailPagerFragment.java @@ -5,6 +5,8 @@ import static fr.free.nrw.commons.Utils.handleWebUrl; import android.annotation.SuppressLint; import android.content.ActivityNotFoundException; import android.content.Intent; +import android.graphics.Bitmap; +import android.graphics.BitmapFactory; import android.net.Uri; import android.os.Bundle; import android.view.LayoutInflater; @@ -18,6 +20,7 @@ import androidx.appcompat.app.ActionBar; import androidx.appcompat.app.AlertDialog; import androidx.appcompat.app.AppCompatActivity; import androidx.annotation.NonNull; +import androidx.core.content.ContextCompat; import androidx.fragment.app.Fragment; import androidx.fragment.app.FragmentManager; import androidx.fragment.app.FragmentStatePagerAdapter; @@ -41,9 +44,16 @@ import fr.free.nrw.commons.utils.DownloadUtils; import fr.free.nrw.commons.utils.ImageUtils; import fr.free.nrw.commons.utils.NetworkUtils; import fr.free.nrw.commons.utils.ViewUtil; +import io.reactivex.Observable; +import io.reactivex.android.schedulers.AndroidSchedulers; import io.reactivex.disposables.CompositeDisposable; +import io.reactivex.schedulers.Schedulers; +import java.net.MalformedURLException; +import java.net.URL; +import java.net.URLConnection; import java.util.ArrayList; import java.util.Objects; +import java.util.concurrent.Callable; import javax.inject.Inject; import timber.log.Timber; @@ -190,6 +200,7 @@ public class MediaDetailPagerFragment extends CommonsDaggerSupportFragment imple } Media m = provider.getMediaAtPosition(pager.getCurrentItem()); + MediaDetailFragment mediaDetailFragment = this.adapter.getCurrentMediaDetailFragment(); switch (item.getItemId()) { case R.id.menu_bookmark_current_image: boolean bookmarkExists = bookmarkDao.updateBookmark(bookmark); @@ -243,6 +254,16 @@ public class MediaDetailPagerFragment extends CommonsDaggerSupportFragment imple return true; case R.id.menu_view_report: showReportDialog(m); + case R.id.menu_view_set_white_background: + if (mediaDetailFragment != null) { + mediaDetailFragment.onImageBackgroundChanged(ContextCompat.getColor(getContext(), R.color.white)); + } + return true; + case R.id.menu_view_set_black_background: + if (mediaDetailFragment != null) { + mediaDetailFragment.onImageBackgroundChanged(ContextCompat.getColor(getContext(), R.color.black)); + } + return true; default: return super.onOptionsItemSelected(item); } @@ -372,6 +393,17 @@ public class MediaDetailPagerFragment extends CommonsDaggerSupportFragment imple if (m.getUser() != null) { menu.findItem(R.id.menu_view_user_page).setEnabled(true).setVisible(true); } + + try { + URL mediaUrl = new URL(m.getImageUrl()); + this.handleBackgroundColorMenuItems( + () -> BitmapFactory.decodeStream(mediaUrl.openConnection().getInputStream()), + menu + ); + } catch (Exception e) { + Timber.e("Cant detect media transparency"); + } + // Initialize bookmark object bookmark = new Bookmark( m.getFilename(), @@ -422,6 +454,25 @@ public class MediaDetailPagerFragment extends CommonsDaggerSupportFragment imple } } + /** + * Decide wether or not we should display the background color menu items + * We display them if the image is transparent + * @param getBitmap + * @param menu + */ + private void handleBackgroundColorMenuItems(Callable getBitmap, Menu menu) { + Observable.fromCallable( + getBitmap + ).subscribeOn(Schedulers.newThread()) + .observeOn(AndroidSchedulers.mainThread()) + .subscribe(image -> { + if (image.hasAlpha()) { + menu.findItem(R.id.menu_view_set_white_background).setVisible(true).setEnabled(true); + menu.findItem(R.id.menu_view_set_black_background).setVisible(true).setEnabled(true); + } + }); + } + private void updateBookmarkState(MenuItem item) { boolean isBookmarked = bookmarkDao.findBookmark(bookmark); if(isBookmarked) { @@ -567,6 +618,18 @@ public class MediaDetailPagerFragment extends CommonsDaggerSupportFragment imple return mCurrentFragment; } + /** + * If current fragment is of type MediaDetailFragment, return it, otherwise return null. + * @return MediaDetailFragment + */ + public MediaDetailFragment getCurrentMediaDetailFragment() { + if (mCurrentFragment instanceof MediaDetailFragment) { + return (MediaDetailFragment) mCurrentFragment; + } + + return null; + } + /** * Called to inform the adapter of which item is currently considered to be the "primary", * that is the one show to the user as the current page. diff --git a/app/src/main/java/fr/free/nrw/commons/media/ZoomableActivity.kt b/app/src/main/java/fr/free/nrw/commons/media/ZoomableActivity.kt index a679f908d..ac7d420fb 100644 --- a/app/src/main/java/fr/free/nrw/commons/media/ZoomableActivity.kt +++ b/app/src/main/java/fr/free/nrw/commons/media/ZoomableActivity.kt @@ -13,6 +13,7 @@ import android.widget.Button import android.widget.ProgressBar import android.widget.TextView import android.widget.Toast +import androidx.core.content.ContextCompat import androidx.lifecycle.ViewModelProvider import butterknife.BindView import butterknife.ButterKnife @@ -69,6 +70,8 @@ class ZoomableActivity : BaseActivity() { @JvmField @BindView(R.id.zoomable) var photo: ZoomableDraweeView? = null + + var photoBackgroundColor: Int? = null @JvmField @BindView(R.id.zoom_progress_bar) @@ -180,6 +183,13 @@ class ZoomableActivity : BaseActivity() { ).apply() } } + + val backgroundColor = intent.getIntExtra(ZoomableActivityConstants.PHOTO_BACKGROUND_COLOR, + MediaDetailFragment.DEFAULT_IMAGE_BACKGROUND_COLOR); + + if (backgroundColor != MediaDetailFragment.DEFAULT_IMAGE_BACKGROUND_COLOR) { + photoBackgroundColor = backgroundColor + } } /** @@ -196,7 +206,7 @@ class ZoomableActivity : BaseActivity() { /** * Handle view model result. */ - private fun handleResult(result: Result){ + private fun handleResult(result: Result) { if(result.status is CallbackStatus.SUCCESS){ val images = result.images if(images.isNotEmpty()) { @@ -608,6 +618,10 @@ class ZoomableActivity : BaseActivity() { .setControllerListener(loadingListener) .build() photo!!.controller = controller + + if (photoBackgroundColor != null) { + photo!!.setBackgroundColor(photoBackgroundColor!!) + } if (!images.isNullOrEmpty()) { val selectedIndex = getImagePosition(selectedImages, images!![position]) @@ -667,5 +681,7 @@ class ZoomableActivity : BaseActivity() { * the custom picker. */ const val ORIGIN = "Origin"; + + const val PHOTO_BACKGROUND_COLOR = "photo_background_color" } } \ No newline at end of file diff --git a/app/src/main/res/menu/fragment_image_detail.xml b/app/src/main/res/menu/fragment_image_detail.xml index 65ad9ebbe..7ab77b686 100644 --- a/app/src/main/res/menu/fragment_image_detail.xml +++ b/app/src/main/res/menu/fragment_image_detail.xml @@ -38,5 +38,25 @@ android:id="@+id/menu_view_report" android:title="@string/menu_view_report" app:showAsAction="never" /> + + + + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 9dfc22948..040e1b209 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -770,6 +770,8 @@ Upload your first media by tapping on the add button. Image selected Image marked as not for upload Report + Set white background + Set black background Report violation Report this user Report this content diff --git a/app/src/test/kotlin/fr/free/nrw/commons/media/MediaDetailFragmentUnitTests.kt b/app/src/test/kotlin/fr/free/nrw/commons/media/MediaDetailFragmentUnitTests.kt index 94aa05f15..b007ceb95 100644 --- a/app/src/test/kotlin/fr/free/nrw/commons/media/MediaDetailFragmentUnitTests.kt +++ b/app/src/test/kotlin/fr/free/nrw/commons/media/MediaDetailFragmentUnitTests.kt @@ -3,6 +3,7 @@ package fr.free.nrw.commons.media import android.app.Activity import android.content.Context import android.content.Intent +import android.content.SharedPreferences import android.content.res.Configuration import android.os.Bundle import android.os.Looper @@ -20,6 +21,7 @@ import com.facebook.drawee.generic.GenericDraweeHierarchy import com.facebook.drawee.view.SimpleDraweeView import com.facebook.soloader.SoLoader import com.nhaarman.mockitokotlin2.whenever +import com.nhaarman.mockitokotlin2.doReturn import fr.free.nrw.commons.LocationPicker.LocationPickerActivity import fr.free.nrw.commons.Media import fr.free.nrw.commons.R @@ -132,13 +134,19 @@ class MediaDetailFragmentUnitTests { @Mock private lateinit var listView: ListView - @Mock - private lateinit var searchView: SearchView - @Mock private lateinit var intent: Intent private lateinit var activity: SearchActivity + + @Mock + private lateinit var mockContext: Context + + @Mock + private lateinit var mockSharedPreferences: SharedPreferences + + @Mock + private lateinit var mockSharedPreferencesEditor: SharedPreferences.Editor @Before fun setUp() { @@ -146,7 +154,6 @@ class MediaDetailFragmentUnitTests { MockitoAnnotations.openMocks(this) context = ApplicationProvider.getApplicationContext() - AppAdapter.set(TestAppAdapter()) SoLoader.setInTestMode() @@ -212,6 +219,10 @@ class MediaDetailFragmentUnitTests { val map = HashMap() map[Locale.getDefault().language] = "" `when`(media.descriptions).thenReturn(map) + + doReturn(mockSharedPreferences).`when`(mockContext).getSharedPreferences(anyString(), anyInt()) + doReturn(mockSharedPreferencesEditor).`when`(mockSharedPreferences).edit() + doReturn(mockSharedPreferencesEditor).`when`(mockSharedPreferencesEditor).putInt(anyString(), anyInt()) } @Test @@ -805,4 +816,30 @@ class MediaDetailFragmentUnitTests { method.isAccessible = true method.invoke(fragment, media) } + + @Test + fun testOnImageBackgroundChangedWithDifferentColor() { + val spyFragment = spy(fragment) + val color = 0xffffff + doReturn(mockContext).`when`(spyFragment).context + doReturn(-1).`when`(mockSharedPreferences).getInt(anyString(), anyInt()) + + spyFragment.onImageBackgroundChanged(color) + + verify(simpleDraweeView, times(1)).setBackgroundColor(color) + verify(mockSharedPreferencesEditor, times(1)).putInt(anyString(), anyInt()) + } + + + @Test + fun testOnImageBackgroundChangedWithSameColor() { + val spyFragment = spy(fragment) + val color = 0 + doReturn(mockContext).`when`(spyFragment).context + doReturn(color).`when`(mockSharedPreferences).getInt(anyString(), anyInt()) + + spyFragment.onImageBackgroundChanged(color) + verify(simpleDraweeView, never()).setBackgroundColor(anyInt()) + verify(mockSharedPreferencesEditor, never()).putInt(anyString(), anyInt()) + } } diff --git a/app/src/test/kotlin/fr/free/nrw/commons/media/MediaDetailPagerFragmentUnitTests.kt b/app/src/test/kotlin/fr/free/nrw/commons/media/MediaDetailPagerFragmentUnitTests.kt index 5f5f3bd06..9529637a3 100644 --- a/app/src/test/kotlin/fr/free/nrw/commons/media/MediaDetailPagerFragmentUnitTests.kt +++ b/app/src/test/kotlin/fr/free/nrw/commons/media/MediaDetailPagerFragmentUnitTests.kt @@ -1,24 +1,34 @@ package fr.free.nrw.commons.media import android.content.Context +import android.graphics.Bitmap import android.os.Bundle import android.os.Looper +import android.view.Menu +import android.view.MenuItem import androidx.fragment.app.FragmentManager import androidx.fragment.app.FragmentTransaction import androidx.test.core.app.ApplicationProvider import com.facebook.drawee.backends.pipeline.Fresco import com.facebook.soloader.SoLoader +import com.nhaarman.mockitokotlin2.any +import com.nhaarman.mockitokotlin2.doReturn +import com.nhaarman.mockitokotlin2.never +import com.nhaarman.mockitokotlin2.times +import com.nhaarman.mockitokotlin2.verify import fr.free.nrw.commons.Media import fr.free.nrw.commons.TestAppAdapter import fr.free.nrw.commons.TestCommonsApplication import fr.free.nrw.commons.auth.SessionManager import fr.free.nrw.commons.explore.SearchActivity -import fr.free.nrw.commons.mwapi.OkHttpJsonApiClient +import io.reactivex.android.plugins.RxAndroidPlugins +import io.reactivex.plugins.RxJavaPlugins +import io.reactivex.schedulers.Schedulers +import org.junit.After import org.junit.Assert import org.junit.Before import org.junit.Test import org.junit.runner.RunWith -import org.mockito.InjectMocks import org.mockito.Mock import org.mockito.Mockito.`when` import org.mockito.MockitoAnnotations @@ -30,12 +40,12 @@ import org.robolectric.annotation.LooperMode import org.wikipedia.AppAdapter import java.lang.reflect.Field import java.lang.reflect.Method +import java.util.concurrent.Callable @RunWith(RobolectricTestRunner::class) @Config(sdk = [21], application = TestCommonsApplication::class) @LooperMode(LooperMode.Mode.PAUSED) class MediaDetailPagerFragmentUnitTests { - private lateinit var fragment: MediaDetailPagerFragment private lateinit var context: Context private lateinit var fragmentManager: FragmentManager @@ -49,12 +59,20 @@ class MediaDetailPagerFragmentUnitTests { @Mock internal var sessionManager: SessionManager? = null - @InjectMocks - private lateinit var okHttpJsonApiClient: OkHttpJsonApiClient + @Mock + private lateinit var menu: Menu + + @Mock + private lateinit var menuItem: MenuItem + + @Mock + private lateinit var bitmap: Bitmap @Before fun setUp() { - + RxAndroidPlugins.setMainThreadSchedulerHandler { Schedulers.trampoline() } + RxJavaPlugins.setNewThreadSchedulerHandler { Schedulers.trampoline() } + MockitoAnnotations.openMocks(this) context = ApplicationProvider.getApplicationContext() @@ -67,8 +85,8 @@ class MediaDetailPagerFragmentUnitTests { val activity = Robolectric.buildActivity(SearchActivity::class.java).create().get() - fragment = MediaDetailPagerFragment.newInstance(false, true); - fragment = MediaDetailPagerFragment.newInstance(false, false); + fragment = MediaDetailPagerFragment.newInstance(false, true) + fragment = MediaDetailPagerFragment.newInstance(false, false) fragmentManager = activity.supportFragmentManager val fragmentTransaction: FragmentTransaction = fragmentManager.beginTransaction() fragmentTransaction.add(fragment, null) @@ -78,6 +96,16 @@ class MediaDetailPagerFragmentUnitTests { SessionManager::class.java.getDeclaredField("context") fieldContext.isAccessible = true fieldContext.set(sessionManager, context) + + doReturn(menuItem).`when`(menu).findItem(any()) + doReturn(menuItem).`when`(menuItem).isEnabled = any() + doReturn(menuItem).`when`(menuItem).isVisible = any() + } + + @After + fun tearDown() { + RxAndroidPlugins.reset() + RxJavaPlugins.reset() } @Test @@ -198,4 +226,41 @@ class MediaDetailPagerFragmentUnitTests { fragment.onDataSetChanged() } + private fun invokeHandleBackgroundColorMenuItems(getBitmap: Callable) { + val method: Method = MediaDetailPagerFragment::class.java.getDeclaredMethod( + "handleBackgroundColorMenuItems", + Callable::class.java, + Menu::class.java + ) + method.isAccessible = true + method.invoke(fragment, getBitmap, menu) + } + + @Test + fun testShouldDisplayBackgroundColorMenuWithTransparentMedia() { + doReturn(true).`when`(bitmap).hasAlpha() + + invokeHandleBackgroundColorMenuItems { + bitmap + } + + verify(bitmap, times(1)).hasAlpha() + verify(menu, times(2)).findItem(any()) + verify(menuItem, times(2)).isEnabled = true + verify(menuItem, times(2)).isVisible = true + } + + @Test + fun testShouldNotDisplayBackgroundColorMenuWithOpaqueMedia() { + doReturn(false).`when`(bitmap).hasAlpha() + + invokeHandleBackgroundColorMenuItems { + bitmap + } + + verify(bitmap, times(1)).hasAlpha() + verify(menu, never()).findItem(any()) + verify(menuItem, never()).isEnabled = true + verify(menuItem, never()).isVisible = true + } } \ No newline at end of file From 96431dd01d1029d6b50ef6a362a5ef0fb5968e11 Mon Sep 17 00:00:00 2001 From: "translatewiki.net" Date: Thu, 30 Nov 2023 13:02:29 +0100 Subject: [PATCH 025/693] Localisation updates from https://translatewiki.net. --- app/src/main/res/values-ar/strings.xml | 1 + app/src/main/res/values-eo/strings.xml | 48 +++++++++++++++++----- app/src/main/res/values-iw/strings.xml | 2 + app/src/main/res/values-mk/strings.xml | 2 + app/src/main/res/values-nl/strings.xml | 2 + app/src/main/res/values-pt/strings.xml | 5 +++ app/src/main/res/values-qq/strings.xml | 3 +- app/src/main/res/values-zh-rTW/strings.xml | 2 + 8 files changed, 54 insertions(+), 11 deletions(-) diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml index d8740d249..cf7c9e84b 100644 --- a/app/src/main/res/values-ar/strings.xml +++ b/app/src/main/res/values-ar/strings.xml @@ -113,6 +113,7 @@ الإعدادات رفع إلى المشاعات + جار الرفع اسم المستخدم كلمة السر سجل الدخول إلى حسابك في كومنز بيتا diff --git a/app/src/main/res/values-eo/strings.xml b/app/src/main/res/values-eo/strings.xml index 8e4b9380c..e354c7c3f 100644 --- a/app/src/main/res/values-eo/strings.xml +++ b/app/src/main/res/values-eo/strings.xml @@ -9,12 +9,14 @@ * Robin van der Vliet * Surfo * YvesNevelsteen +* Ziko --> Facebook-Paĝo de Komunejo Fontokodo de Komunejo ĉe Github Emblemo de Komunejo Retejo de Komunejo + Eliri lok-elektilon Sendi Aldoni alian priskribon Aldoni novan kontribuaĵon @@ -35,8 +37,7 @@ %1$d dosiero alŝutata %1$d dosieroj alŝutataj - - \@string/contributions_subtitle_zero + (%1$d) (%1$d) @@ -70,6 +71,7 @@ Agordoj Alŝuti al la Komunejo + Alŝutante Uzantnomo Pasvorto Ensaluti en via Komunejo beta-konto @@ -83,8 +85,12 @@ Ensalutado sukcesis Ensalutado malsukcesis Dosiero ne trovita. Bonvolu provi alian dosieron. + Maksimuma limo por denovaj provoj atingita! Bonvolu ĉesigi la alŝuton kaj provi denove + Ĉu malŝalti baterian optimumigon? + Alŝuto de pli ol 3 bildoj funkcias pli fidinde kiam la bateria optimumigo estas malŝaltita. Bonvolu malŝalti baterian optimumigon por la aplikaĵo \"Commons\" de la agordoj por glata alŝutado. \n\nEblaj paŝoj por malŝalti baterian optimumigon:\n\nPaŝo 1: Premmu la butonon \'Agordoj\' sube.\n\nPaŝo 2: Ŝanĝu de \'Ne optimumigita\' al \'Ĉiuj aplikaĵoj\'.\n\nPaŝo 3: Serĉu \"Commons\" aŭ \"fr.free.nrw.commons\".\n\nPaŝo 4: Premu ĝin kaj elektu \'Ne optimumigu\'.!N !\nPaŝo 5: Premu \'Farita\'. Aŭtentigo malsukcesis, bonvolu denove ensaluti La alŝutado komenciĝis! + Alŝuto atendas en vico (limigita konekta modo estas ebligita) %1$s alŝutita! Tuŝetu por vidi vian alŝutadon Alŝutas dosieron: %s @@ -196,8 +202,11 @@ Postulata permeso: Legi eksteran konservejon. La aplikaĵo ne povas atingi vian galerion sen tio. Postulata permeso: Skribi al ekstera konservejo. La aplikaĵo ne povas atingi viajn fotilon/galerion sen tio. Petante Permeson por Lokado + Konservi lokon por fotoj el la aplikaĵo + Aktivigu ĉi tiun por konservi lokon kun en-aplikaĵaj fotoj por la kazo ke la kamerao de la aparato ne konservas ĝin Bone Averto + Duobla dosier-nomo trovita Alŝuti Jes Ne @@ -272,7 +281,8 @@ Bonvolu ensaluti por uzi ĉi tiun eblon Kopii la vikitekston en la tondujon La vikiteksto kopiiĝis en la tondujon - Pozicio ne havebla. + Proksime eble ne funkcias ĝuste, Loko ne havebla. + Loka aliro malakceptita. Bonvolu agordi vian lokon permane por uzi ĉi tiun funkcion. Permeso estas postulata por montri liston de apudaj lokoj Instrukcio Vikidatumoj @@ -340,8 +350,10 @@ Malĝusta Respondo Ĉu ĉi tiu ekrankopio estas alŝutebla? Diskonigi Aplikaĵon + Turni Eraro dum akirado de apudaj lokoj. Neniuj apudaj lokoj ĉirkaŭ + Eraro dum akirado de apudaj monumentoj. Neniu ĵusa serĉo Ĉu vi certas ke vi volas malplenigi vian serĉ-historion? Ĉu vi certas, ke vi volas nuligi ĉi tiun alŝuton? @@ -375,12 +387,12 @@ Sciigoj Sciigoj (legita) Montri sciigojn pri apudaĵoj - Tuŝetu ĉi tie por vidi apudan lokon kiu bezonas bildojn + Montru en-aplikaĵan sciigon pri la plej proksima loko, kiu bezonas bildojn Listo Permeso por Konservado Ni bezonas vian permeson aliri eksteran konservejon de via aparato por alŝuti bildojn. Vi ne plu vidos la plej proksiman lokon bezonantan bildojn. Tamen, vi povas reŝalti tiun sciigon en Agordoj se vi volas. - Paŝo %1$d el %2$d + Paŝo %1$d de %2$d: %3$s Sekva Antaŭa Ekzistas dosiero kun la nomo %1$s. Ĉu vi certas, ke vi volas daŭrigi?\n\nNotu: taŭga sufikso estos aŭtomate aldonita al la dosiernomo. @@ -401,18 +413,34 @@ Bonvenon al Komunejo!\n\nAlŝutu vian unuan aŭdvidaĵon per frapeto de la butono \'Aldoni\'. Neniu Elektita Kategorio Bildoj sen kategorioj estas malofte uzebla. Ĉu vi certas, ke vi volas daŭrigi sen elekti kategoriojn? - (Je ĉiuj bildoj en aro) + Neniuj priskriboj elektitaj + Bildoj kun priskriboj estas pli facile troveblaj kaj pli probable uzataj. Ĉu vi certas, ke vi volas daŭrigi sen elekti bildojn? + Ĉesigi alŝutadon + Uzo de la malantaŭa butono nuligos ĉi tiun alŝuton kaj vi perdos vian progreson + Daŭrigu alŝuton + (Por ĉiuj bildoj en aro) Serĉi ĉi tiun areon Peto por Permeso Ĉu vi volas ke ni uzu vian aktualan lokon por montri la plej proksima loko bezonanta bildojn? Ne povas montri apudajn lokojn bezonantajn bildojn, pro manko de permeso de lokado. Ne plu repeti - Montri permeson pri loko + Montri permeson pri loko Peti por permeso de lokado, kiam ĝi estas postulata por la funkciado de la karta vido de de apudaj sciigoj. Io misfunkciis; ni ne povis akiri viajn atingojn + Vi faris tiom da kontribuoj, ke nia atingo-kalkula sistemo ne povas elteni ion. Tio estas la plej granda atingo. Finiĝas je: Montri kampanjojn Vidi estantajn kampanjojn + Permesu al la programo preni lokon se la fotilo ne registras ĝin. Iuj aparataj fotiloj ne registras lokon. En tiaj kazoj, lasi la aplikaĵon preni kaj aligi lokon al ĝi faras vian kontribuon pli utila. Vi povas ŝanĝi ĉi tion iam ajn de la Agordoj + Permesi + Forĵeti + Bonvolu aktivigi aliron al loko en la instalo kaj provu denove.\nNoto: La alŝuto eble ne havas lokon se la programo ne povas retrovi lokon de la aparato ene de mallonga intervalo. + En-aplikaĵa fotilo bezonas lokpermeson por alkroĉi ĝin al viaj bildoj, se loko ne estas havebla en EXIF. Bonvolu permesi al la programo aliri vian lokon kaj provi denove.\n\nNoto: La alŝuto eble ne havas lokon se la aplikaĵo ne povas preni lokon de la aparato ene de mallonga intervalo. + La aplikaĵo ne registrus lokon kune kun enaj fotoj pro manko de lokpermeso + La aplikaĵo ne registrus lokon kune kun enaj fotoj ĉar la GPS estas malŝaltita + Uzu dokument-bazitan foto-elektilon + La nova Android-foto-elektilo riskas perdi informojn pri loko. Ebligu se vi eble uzos ĝin. + Malŝalti ĉi tion povus ekigi la novan Android-foto-elektilon. Ĝi riskas perdi lokiformojn.\n\nAlklaku \'Legu pli\' por pliaj informoj. Vi ne plu vidos la kampanjojn. Tamen, vi povas reŝalti tiun sciigon en Agordoj se vi volas. Ĉi tiu funkcio postulas konekton al reto; bonvolu kontroli viajn agordojn pri konektado. Eraro okazis dum traktado de la bildo. Bonvolu reprovi! @@ -422,7 +450,7 @@ Petante kontrolon de kategorio Petis kontrolon de kategorio Misfunkciis kontrolo de kategorio pri %1$s - Sukcese petis kontrolon de kategorio pri %1$s + Petita kategorikontrolo por %1$s Ne povis peti kontrolon de kategorio pri %1$s Petante kontrolon de kategorio pri %1$s Farite @@ -442,8 +470,8 @@ Ĉi tiu kategorio estas en %1$s kategorioj. Ĝi estas netaŭga ĉar ĝi estas Ĝi malobservas aŭtorrajtojn ĉar ĝi estas - Jes, kial ne - Sekva bildo + Sekva bildo + Jes, kial ne Alklakado de ĉi tiu butono donos vin alia ĵus alŝutita bildo en Vikimedia Komunejo Vi povas revizii bildojn kaj plibonigi la kvaliton de Vikimedia Komunejo.\n Jen la kvar reviziaj parametroj: \n - Ĉu la bildo estas taŭga? \n - Ĉu la bildo observas la regulojn pri aŭtorrajtoj? \n - Ĉu la bildo estis ĝuste enkategoriigita? \n - Se ĉio estas bona, vi povas danki la kontribuinton. Neniu uzita bildo diff --git a/app/src/main/res/values-iw/strings.xml b/app/src/main/res/values-iw/strings.xml index 7a11accd7..ac1d490f6 100644 --- a/app/src/main/res/values-iw/strings.xml +++ b/app/src/main/res/values-iw/strings.xml @@ -759,6 +759,8 @@ נבחרה תמונה התמונה סומנה בתור \"לא להעלאה\" דיווח + הגדרת רקע לבן + הגדרת רקע שחור דיווח על הפרה דיווח על המשתמש הזה דיווח על התוכן הזה diff --git a/app/src/main/res/values-mk/strings.xml b/app/src/main/res/values-mk/strings.xml index 63b8b2746..03fa3641f 100644 --- a/app/src/main/res/values-mk/strings.xml +++ b/app/src/main/res/values-mk/strings.xml @@ -725,6 +725,8 @@ Избрана слика Сликата е означена дека не за подигање Пријави + Постави бела позадина + Постави црна позадина Пријави прекршок Пријави го корисников Пријави ја содржинава diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index e6382971a..d231e5ac1 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -745,6 +745,8 @@ Afbeelding geselecteerd Afbeelding gemarkeerd als niet voor uploaden Rapporteren + Witte achtergrond instellen + Zwarte achtergrond instellen Rapporteer overtredingen Rapporteer deze Gebruiker Rapporteer deze inhoud diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index 115567cca..850198ce2 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -1,6 +1,7 @@ + + Commons paam daʋŋ + Oops. Daʋŋ si\'a kidig! + M pʋ\'ʋsya! + diff --git a/app/src/main/res/values-kus/strings.xml b/app/src/main/res/values-kus/strings.xml new file mode 100644 index 000000000..3c597a9f6 --- /dev/null +++ b/app/src/main/res/values-kus/strings.xml @@ -0,0 +1,319 @@ + + + + Commons Facebook Page + Commons Github Source Code + Commons zanbin + Commons Website + Yiib zin\'ig + Tisim + Paasim pa\'alʋg si\'a + Paasim bʋmpaal + Paasim bʋnkanɛ yi kamɛra ni + Paasim bʋnkanɛ yi footonamin + Paasim tʋʋma yi tʋʋmkʋda la ni + Pian\'a zut + Buudi pian\'ad pa\'alʋg + Pian\'azug + Awiesi pa\'al + Siig + Wʋsa + Ieb nyɛɛb + Zin\'igi an si\'em + siigkanɛ gat dabisir la pʋʋgin + + yinne=%1$d faal la kpɛn\'ɛd + + + yinne=(%1$d) + + Kpɛn\'ɛb pin\'in + + yinsne=maan %d kpɛn\'ɛsʋg + + + yinne=%d kpɛn\'ɛsʋg + + + yinne=siig kaŋa na paam suori yi %1$s + + + yinne=%1$d kpɛn\'ɛsʋg + + + yinne=Di\'ednɛ la\'akanɛ ka ba pʋdig. Siig la maalʋg tʋn\'e nɔk saŋa bɛdegʋ ka di yinne siig la zɛm si\'em nɛ fʋ laʋk kanɛ ka fʋ mɔri pʋdigid + + gɔɔm + Nɛɛsim + Li wʋsa + Gandigir + Su\'adim + Commons + Maalʋg + Nɔkim kpɛn\'ɛs Commons + Kpɛn\'ɛsʋg nan kennɛ + Fʋ yʋ\'ʋr + Paaswɛɛd + Kpɛn\'ɛmi fʋ Commons Bita akaʋny la ni + Kpɛn\'ɛm + Fʋ tami fʋ paaswɛɛtɛ? + Yɔ\'ɔgin kpɛn\' + Kpɛn\'ɛdnɛ + M bɛlimnɛ gu\'usim... + Maligim maal pian\'azut nɛ pa\'alʋg nam + M bɛlimnɛ gu\'usim... + Kpɛn\'ɛb nyaŋya + Kpɛn\'ɛb gʋ\'ʋŋya + M Pʋ nyɛ faal la. M bɛlimnɛ tiakim faal si\'a. + Fʋ lɛm mɔnɛ ka saŋa paae! m bɛlimnɛ basim kpɛn\'ɛsʋg la ka lɛm mɔɔ nya\'aŋ ya\'as + M Kpiisim dinɛ dit batir la? + Akpɛn\'ɛs siisa atan tʋm sʋ\'ʋŋa nɛ fʋ ya\'a kpiis dinɛ dit batir la ka di pʋ tʋmma. M bɛlimnɛ kpiisim dinɛ dit batir la Commons App la ni dɔlidi maalʋg la ni ka di nya\'ŋi kpɛn\' sʋ\'ʋŋa.\nsuobanɛ ka sɔ\' na dɔl ka kpiis dinɛ dit batir la anɛ:\nsuor 1: Si\'isim \"maalʋg\" babkanɛ bɛ teŋir la. \n\nsuor 2: Tiakim yi Dim batiri keŋ appnam wʋsa.\n\nSuor 3: Iem \"Commons\" bɛɛ \"fr.free.nrw.commons\".\n\nSuor 4: Si\'isimi di ka gaŋ da dii.\n\nSuor 5: Diim \"di naaeya\". + Suor basib gʋ\'ʋŋya, m bɛlimnɛ kpɛn\'ɛm ya\'as + Kpɛn\'ɛsʋg pin\'ilʋg! + %1$s Kpɛn\'ɛya! + Di\'em ka gɔs dinɛ ka fʋ Kpɛn\'ɛs + Kpɛn\'ɛsidnɛ faal: %s + %1$s Kpɛn\'ɛsidnɛ + Kpɛn\'ɛsʋg naaednɛ %1$s + %1$s Kpɛn\'ɛsʋg gʋ\'ʋnya + %1$s Kpɛn\'ɛsʋg gu\'oeya + Diim ka gɔs + Diim ka gɔs + Banɛ ka m Kpɛn\'ɛs nananna + Ba bɛ nɛ lai zug + Gʋ\'ʋŋya + %1$d%% naaeya + Kpɛn\'ɛsidnɛ + Di yinɛ Galari ni + Nwaam footo + Yamma + Banɛ ka m kpɛn\'ɛs + Pʋdigim + Gɔsim faal lakir zin\'ig + Pian\'azug (nar ye di bɛ) + M bɛlimnɛ tisim faal kaŋa pian\'azug + Awiesi pa\'al + Pian\'azug + Pʋ nyaŋi kpɛn\'ɛ - nɛtwɛk gʋ\'ʋnir zug + Fʋ mɔ\' nɔɔrim babiga ka pʋ nyaŋi. M bɛlimnɛ mɔɔm ya\'as saŋa bi\'ela ni. + Gafara, ba gu\' tʋmtʋm kaŋa bɛ Commons ni + Asɛɛ ka fʋ tis two factor authentication koodi + Kpɛn\'ɛb gʋ\'ʋŋya + Kpɛn\'ɛsim + Pʋdim la\'askaŋa yʋ\'ʋr + Tiakirnam + Kpɛn\'ɛsim + Iem buudi nam + Iem la\'abanɛ nwɛnɛ fʋ media (Zuor, Taj Mahal nɛ banɛ kpɛlim) + Niŋim + Maligim maal + La\'ad + (Nam pʋ kpɛn\'ɛs la\'ad) + Buudi kae nwɛnɛ %1$s + Wikidata laʋk kae nwɛnɛ %1$s + %1$s pʋ mɔr biig dɔɔdɛ + %1$s pʋ mɔr du\'adib dɔɔdɛ + Buudi + Maalʋg + Yɔ\'ɔgim kpɛn\' maal + Footo banɛ nwɛn taaba + Buudi + Ala\'asi dɛŋim gɔs + Dinɛ yɛla + Maalim bʋmpaal <a href=\"%1$s\">GitHub issue</a> tis daʋŋ pɔtimʋg nɛ pʋtɛnda tisib. + Su\'adim gban\'ar + Dinɛ yɛla + Tisim gandigir (dɔlis email ni) + Sɔ\' pʋ kpɛn\'ɛ emailɛ + Buudi banɛ tʋm ka nam pʋ yuugɛ + Gurnɛ ye di gilig + Fʋ nam pʋ kpɛn\'ɛsi fʋ footonam la. + Mɔɔm ya\'as + Basim + Vɛ\'ɛgim + Tʋʋma gbaʋŋ kanɛ an na\'ana + Nɔkim pian\'azug kʋdʋg nɛ pa\'alʋg + Pian\'azug + Attribution-ShareAlike 4.0 + Attribution 4.0 + Attribution-ShareAlike 3.0 + Attribution 3.0 + Wikimedia Commonsi mɔr footonam bɛdegʋ banɛ bɛ Wikipedia tʋʋma ni la. + Fʋ footo la sʋŋi pa\'an nidib dunia wʋsa ni! + M bɛlimnɛ kpɛn\'ɛsim footo banɛ ka fʋ mɛŋ ki\'a bɛɛ ka fʋ mɛŋ maal: + La\'abanɛ ka Wina\'am maal (mɔbanɛ mɔr puum, bʋnkɔnbid, zuoya) + La\'abanɛ mɔr tʋʋma (kɛɛkɛ, ziriga siteesin nam) + Nimbanɛ yʋda dʋ\' (fʋ mayor, zɔt zɔtib banɛ sia\'al kʋdʋm) + M bɛlimnɛ DA kpɛn\'ɛsɛ: + Dinɛ ka fʋ mɛŋ kia bɛɛ fʋ zuanam footonam + Footobanɛ ka fʋ vɛ\'ɛgi yi internetin + Fʋ tɛn\'ɛs ye fʋ paami dii? + Ɛɛn! + Labaya bɛdigʋ + Buudi kɔn\'ɔb-kɔn\'ɔb + Pʋ gaŋ si\'ela + Pian\'azug kae + Pa\'alʋg kae + Sɔnsʋg kae + Ti zi\' kasɛta gbaʋŋ kaŋa + Maligim maal + Bu\'osidnɛ suor ye di yɔ\'ɔg zin\'ig + Awɔɔ + Kpa\'asʋg + Kpɛn\'ɛsʋg + Ɛɛn + Ayei + Pian\'azug + Yʋ\'ʋr + Nwɛnnim + Awiesi pa\'al + Sɔnsʋg + Sʋ\'ʋd + Kpɛn\'ɛsʋg dabisir kal + Kasɛta gbaʋŋ + Pʋ bɔ si\'ela + Liebim onɛ kpansid Beta + 2FA koodi + Fʋ sid bɔɔdi fʋ yi yiiŋa? + Zao zuor + Lamas + Rainbow Birig + Tulip + Ken-ken Wikipiidia + Ken-ken Gbauŋ sɔbid nyadi + Sydney Opera House + Basim + Yɔ\'ɔgin + Yɔɔm + Yin + Kpɛn\'ɛsim + Yamma + Dinɛ yɛla + Maalʋg + Gandigir + Yim yiiŋ + Pa\'alʋg + Labaya + Maligim gɔs + Pʋ paam pa\'alsi\'a + Commons faal lakir + Wikidata laʋk + Wikipiidia atikil + Daʋŋ be footo kaŋa ni + Footo la sɔbʋgnɛ galis. + Footo la anɛ diisʋgʋ. + Footo pʋn dɛŋim bɛ Commons sa. + Ba nwaae siig la yinɛ zin\'ikanɛ bɛ di kɔn\'. + Fʋ nan kpɛm bɔɔd ye fʋ kpɛn\'ɛs siig laa? + Tɔ\'ɔŋir gbɛligya + Daamʋgnam be footo la ni + Kpɛn\'ɛmi fʋ akaʋnt pʋʋgin + Gaŋim dinɛ bɔɔd yisʋg + Footo kaŋa gaŋɛ ye di yisʋg + Gaŋim gaad + Kpɛn\'ɛm + Fʋ sid bɔɔdi fʋ gaŋ kpɛn\'ɛbɔ? + Di nar ye fʋ kpɛn\' nya\'aŋi kpɛn\'ɛs footonam. + M bɛlimnɛ kpɛn\'ɛm pʋʋgin ka nɔk bʋnkaŋa tʋm + Kopim wikisɔbʋg la niŋ clipboard + Suoya pa\'alʋg + Wikidata + Wikipedia + Commons + Makimi ti + FAQ + Tʋntʋn sʋŋid + Gaŋim pa\'alʋgʋ gaad + Internet kae + Tienr labaya kae + Lɛbigim + Buudi pian\'ad nam + Gaŋim buudi kanɛ ka fʋ bɔɔd ye fʋ lɛbig sɔbʋg la keŋ + Kem tuon + Basim + Mɔɔm ya\'as + Zin\'kaŋ bɔɔdi footo. + Zin\'ikaŋa pʋm mɔr footo sa. + Zin\'ikaŋa pʋ lɛm bɛ ya\'asa. + Pʋ nyɛ footo! + Daʋŋʋ kidig footonam la kpɛn\'ɛdin la. + %1$s kpɛn\'ɛs + Ba bʋlokya + Ba bʋlokif ye fʋ da nyaŋi maal dɛmisʋg Commons nii + Dabisir la footo kanɛ bɛ di kɔn\' + Iem + Iem Commons + Iem + Banɛ ka fʋ ia ka di pʋ yuugɛ: + Banɛ ka fʋ ia ka di pʋ yuuge bu\'osa + Buudi kɔn\'ɔb-kɔn\'ɔb + La\'ad + Pʋdigimi fʋ bu\'osa la nɛ fʋ zuanam! + Kem tuon + Gandig sʋŋ + Gandig bɛ\'ɛd + Footo kaŋa an sʋ\'ʋm nɛ kpɛn\'ɛsʋgɔɔ? + Pʋdigim App + Giligim + Daʋŋ bɛ zin\'ibanɛ bɛ yamma paamʋg ni. + Zin\'ibanɛ bɛ yamma kae + Dinɛ ka ba ia nananna kae + Fʋ siak ye fʋ bɔɔd ye fʋ ɛɛnsi fʋ ieeb labakʋdaa? + Fʋ siak ye fʋ bɔɔd ye fʋ bas kpɛn\'ɛsʋg kaŋaa? + Fʋ bɔɔd ye fʋ yis ieb kaŋaa? + Ieb labakʋda yiya + Gaŋim dinɛ bɔɔd yisʋg + Yisim + Nyɔɔd nam + Mɛŋ yɛla + Kaalʋg + Pʋ\'ʋsʋg di\'eya + Footo banɛ nwɛn taaba + Footo banɛ dɔlis zin\'ibanɛ bɛ yamma. + Zi\'esim + Footonam kpɛn\'ɛya + Ba pʋ lɛbis Footo din aan si\'em + Footonam tʋmya + Pʋdigimi fʋ nyɔɔd nɛ fʋ zuanam! + Bi\'ela kanɛ an tilas + Suoya %1$d of %2$d: %3$s + Tɔlisim tuon + Lɛm nya\'aŋ + Footonam + zin\'is + Paasim/yisimi bookmarknam ni + Bookmark nam + Fʋ pʋ paas bookmark si\'a + Bookmark nam + M yidignɛ kpɛn\'ɛsidi + M pʋ baŋ ye sɔ\' wʋsa na nyɛ di + M tɛn\'ɛs ye di na an bɛ\'ɛd tisi m mɛŋ gu\'udim yɛla + M tiaki m pʋtɛ\'ɛr, m pʋ lɛm bɔɔd ye di bɛ zin\'ikanɛ ka sɔ\' wʋsa na nyɛ ya\'asa + Gafara footo kaŋa pʋ nar ye di bɛ encyclopedia + M kpɛ\'ɛsidinɛ %1$s m mɛŋ, ka nɔki tʋm %2$d atikil (nam) ni. + Commons pʋ\'ʋsidif ken-ken!\n\nKpɛn\'ɛmi fʋ yiiga media dɔlisid fʋn na din paasim la. + Fʋ pʋ gaŋ buudsi\'a + Fʋ pʋ gaŋ banɛ nwan taaba + Basim kpɛn\'ɛsʋg + Kem tuoni kpɛn\'ɛs + (Tis footo (nam) la wʋsa) + Iem kpɛla + Suor basib bu\'osʋg + Da lɛm bu\'os nɛ\' ya\'asa + Bu\'osim zin\'ig suor basib yɛla + Daʋŋ si\'a kidig, ti pʋ nyaŋi gbin\'e dinɛ ka fʋ ied la + Naadnɛ: + Niem kampeenam + Gɔsim kampeen banɛ ken + Basim suor + Basim + Naaya + Kennɛ M pʋ\'ʋsya: Nyaŋya + Nyaŋi tis %1$s M pʋ\'ʋsya labaar + + %d image selected + %d images selected + + diff --git a/app/src/main/res/values-sl/strings.xml b/app/src/main/res/values-sl/strings.xml index 2393f26b0..625d83c50 100644 --- a/app/src/main/res/values-sl/strings.xml +++ b/app/src/main/res/values-sl/strings.xml @@ -316,7 +316,7 @@ Ta kraj ne obstaja več. Ni najdenih slik! Pri nalaganju slik je prišlo do napake. - Naložil_a: %1$s + Naložil/a: %1$s Blokiran_a Urejanje Zbirke vam je preprečeno Slika dneva @@ -358,6 +358,7 @@ Napačen odgovor Ali je ta zaslonski posnetek primeren za naložitev? Delite aplikacijo + Zasukaj Napaka pri pridobivanju bližnjih krajev. Tu okoli ni bližnjih krajev Napaka pri pridobivanju bližnjih spomenikov. @@ -462,8 +463,8 @@ Zahtevam preverjanje kategorij za »%1$s« Opravljeno Pošiljanje zahvale: uspešno - Zahvala uporabniku_ci %1$s je bila uspešno poslana - Pošiljanje zahvale uporabniku_ci %1$s ni uspelo + Zahvala uporabniku/ci %1$s je bila uspešno poslana + Pošiljanje zahvale uporabniku/ci %1$s ni uspelo Pošiljanje zahvale: neuspešno Pošiljam zahvalo uporabniku/ici %1$s Ali so tu upoštevane avtorske pravice? @@ -689,8 +690,12 @@ V nasprotju s sliko na levi je slika na desni označena z logotipom Zbirke, kar pomeni, da je v projekt že naložena.\n Za predogled slike se je dotaknite in jo pridržite. Odlično Ta slika je že naložena v Zbirko. + Zaradi tehničnih razlogov aplikacija ne more zanesljivo naložiti več kot %1$d slik hkrati. Omejitev nalaganja %1$d je bila presežena za %2$d. + Opusti + Največ: %1$d + Napaka: presežena omejitev nalaganja WLM - Ta slika bo vključena v natečaj Viki obožuje spomenike + Ta slika bo vključena v natečaj Viki obožuje spomenike Prikaži spomenike Odprt je natečaj Viki obožuje spomenike! VEČ O TEM @@ -739,6 +744,8 @@ Slika izbrana Slika je označena kot ni za nalaganje Prijava + Nastavitev belega ozadja + Nastavitev črnega ozadja Prijavi kršitev Prijavi uporabnika Prijavi to vsebino @@ -750,4 +757,11 @@ Koordinate niso točne koordinate, vendar oseba, ki je naložila to sliko, meni, da so ustrezen približek. Dovoljenje za shranjevanje zavrnjeno Tega predmeta ni mogoče deliti + Za delovanje so potrebna dovoljenja + + %d izbrana slika + %d izbrani sliki + %d izbranih slik + %d izbranih slik + diff --git a/app/src/main/res/values-tcy/strings.xml b/app/src/main/res/values-tcy/strings.xml index 5db413720..32ea7ff5e 100644 --- a/app/src/main/res/values-tcy/strings.xml +++ b/app/src/main/res/values-tcy/strings.xml @@ -235,8 +235,8 @@ <u>FAQ</u> ಟ್ಯುಟೋರಿಯಲ್‌ನ್ ಬುಡ್ಲೆ ಇಂಟರ್ನೆಟ್ ಇಜ್ಜಿ - ಅಧಿಸೂಚನೆಟ್ ದೋಷೊ ಉಂಡು - ಅಧಿಸೂಚನೆ ಇಜ್ಜಿ. + ಸೂಚನೆಲೆಡ್ ದೋಷೊ ಉಂಡು + ವೊವ್ವೆ ಸೂಚನೆಲು ಇಜ್ಜಿ ಅನುವಾದೊ ಬಾಸೆಲು ಇರ್ ಅನುವಾದೊನ್ ಕೊರಿಯರ ಒಪ್ಪಗೆ ಉಂಡಾ, ಭಾಷೆನ್ ಆಯ್ಕೆ ಮಾಲ್ಲುಲೆ. @@ -304,15 +304,15 @@ ಈರ್ ಕಾಮನ್ಸ್\'ಗು ಮಿತೇರಾಯಿನ ಆಕೃತಿಲೆಡ್ ಮಾಜಾವಂದಿನ ಶೇಕಡ. ಈರ್ ಕಾಮನ್ಸ್\'ಗು ಮಿತೇರಾಯಿನ ಆಕೃತಿಲೆಡ್ ವಿಕಿಮೀಡಿಯಾ ಲೇಖನೊಲೆಡ್ ಬಳಕೆಯಾಯಿನ ಸಂಖ್ಯೆ. ದೋಸೊ ಆತ್ಂಡ್! - ಕಾಮನ್ಸ್ ಅಧಿಸೂಚನೆ + ಕಾಮನ್ಸ್ ಸೂಚನೆ ನಿಷ್ಟ ಲೇಖಕ ಪುದರ್ ಬಳಸುಲೆ. ಚಿತ್ರೊಲೆನ್ ಮಿತೇರಾನಗ ಇರೆನ ಬಳಕೆಪುದರುದ ಬದಲ್ ಒಂಜಿ ನಿಷ್ಟ ಲೇಖಕ ಪುದರ್ ಬಳಸುಲೆ. ನಿಷ್ಟ ಲೇಖಕ ಪುದರ್ ಕಾನಿಕೆಲು ಕೈತಲ್‍ದ - ಅಧಿಸೂಚನೆಲು + ಸೂಚನೆಲು ಅಧಿಸೂಚನೆಲು(ಓದಿನ) - ಕೈತಲ್ದ ಅಧಿಸೂಚನೆ ತೋಜಾಲೆ + ಕೈತಲ್ದ ಸೂಚನೆ ತೋಜಾಲೆ ಚಿತ್ರ ಬೋಡಾಯಿನ ಕೈತಲ್ದ ಜಾಗ ತೂವರೆ ಮುಲ್ಪ ತಟ್ಟ್\'ಲೆ ಪಟ್ಟಿ ಶೇಖರಣ ಅನುಮತಿ From eef82d04ebe9db77eca3c8784a868f7d22fb2627 Mon Sep 17 00:00:00 2001 From: "translatewiki.net" Date: Thu, 7 Dec 2023 13:03:19 +0100 Subject: [PATCH 028/693] Localisation updates from https://translatewiki.net. --- app/src/main/res/values-kus/strings.xml | 174 ++++++++++++++++++++++++ app/src/main/res/values-ru/strings.xml | 6 + app/src/main/res/values-uz/strings.xml | 8 ++ 3 files changed, 188 insertions(+) diff --git a/app/src/main/res/values-kus/strings.xml b/app/src/main/res/values-kus/strings.xml index 3c597a9f6..01f06e0f7 100644 --- a/app/src/main/res/values-kus/strings.xml +++ b/app/src/main/res/values-kus/strings.xml @@ -278,6 +278,18 @@ Footonam tʋmya Pʋdigimi fʋ nyɔɔd nɛ fʋ zuanam! Bi\'ela kanɛ an tilas + Footo banɛ ka fʋ zaŋi kpɛn\'ɛs Commons, dɔlis kpɛn\'ɛsʋg software si\'a + Ba pʋ yis footo banɛ ka fʋ zaŋi kpɛn\'ɛs Commons la basɛ + Footo banɛ ka fʋ zaŋi kpɛn\'ɛs Commons la ka ba nɔki tʋm Wikipedia atikilnam tʋʋma. + Daʋŋ si\'a kidig! + Commons tienr labaar + Tʋʋma nam + Yamma + Tienr labaya + Tienr labaya(karim) + Niem tienr labaar kanɛ bɛ yamma + La\'ad + Kpɛn\'ɛsʋg suor basib Suoya %1$d of %2$d: %3$s Tɔlisim tuon Lɛm nya\'aŋ @@ -312,6 +324,168 @@ Naaya Kennɛ M pʋ\'ʋsya: Nyaŋya Nyaŋi tis %1$s M pʋ\'ʋsya labaar + Pʋ nyaŋi paas nwɛnnɛmnama. + Nyaŋya + Coordinate nam %1$s paasya + Pa\'ala paasya. + Pian\'azut paasya. + Pʋ nyaŋi paas coordinate nama. + Pʋ nyaŋi paas pa\'alaa. + Pʋ nyaŋi paas piana\'azutɛ. + P nyaŋi paam coordinatenama + Pʋ nyaŋi paam pa\'alaa. + Dɛmisim Pa\'ala nɛ pian\'azut + Pʋdigim footo dɔlis + Fʋ nam pʋ tʋm tʋʋmsi\'a nannɛ + %s nam pʋ tʋm tʋʋmsi\'a nannɛ + Akaʋnt yɔ\'ɔgya! + Kopi sɔbʋg la keŋ su\'ak zin\'igin + Tienr labaar Zanbili pa\'al ye di karimya + Gbɛlʋŋsi\'a naam! + Zin\'igi an si\'em: + + Bɔɔdi footo + Zin\'igi buudi: + Bridge, museum, hotel etc. + Daʋŋsi\'a kidig kpɛn\'ɛb suorin la, asɛɛ ka fʋ tiaki fʋ paaswɛɛd la!! + MEDIA + CHILD\n CLASSES + PARENT CLASSES + Gban\'e zin\'ibanɛ bɛ yamma + Nɛ\' anɛ %1$s footo? + Bookmark nam + Maalʋg + Yisi yi Bookmarknamin + Ba zaŋi paas bookmarknamin + Daʋŋsi\'a naam. Pʋ nyaŋi maal nibdaa footo la + Maalimi fʋ nindaa footo la + Maanɛ nindaa footo. M bɛlimnɛ gu\'usim... + Dɔl sistɛm la + Lik + Nɛɛsim + Pʋ nyaŋi yɔ\'ɔg zin\'ig maalʋgɔ. M bɛlimnɛ yɔ\'ɔgimi fʋ zin\'ig pa\'alʋg la fʋ mɛŋ. + Fʋ ya\'a bɔɔd sʋ\'ʋm, gaŋim sʋ\'ʋm kanɛ gat zi\'esim. + Ye fʋ yɔ\'ɔgifʋ zin\'ig pa\'alʋgɔ? + Zin\'ibanɛ bɛ yamma yʋ\'ʋn na nyaŋi tʋm sʋ\'ʋŋa + Loodim bɛdegʋ + Pʋ paam zin\'isi\'a, mɔɔm tiaki fʋ ieb suor la. + Pʋtɛn\'ɛr zaŋi ken sʋm yɛla: + -Paasim buudinami tis footo kaŋ ka di sʋŋ tʋʋma. + -Zaŋim footo kaŋa paas Wikipedia atikil kanɛ tɔ\'ɔŋ nɛ di ka pʋ mɔr footonama. + Zaŋim footo paas Wikipedia ni + Siakim + Sa\'alʋg nam + Nɔkim Wikisɔbʋbkaŋa: + Fʋ ya\'a din\' ya\'as di na yɔ\'ɔg Wikipedia atikil la + Kopim wikidoodi keŋ suak zin\'igin + Zi\'enim + Lɛm pin\'il ya\'as + Zi\'enya + Bɛdegʋ + Bookmark nam + Nyɔɔd nam + Leaderboard + Tɛbisim: + Kaalim: + Tɛbisim + Tʋmtʋm + Kaalim + Maalim ka di an leaderboard avatar + Maanɛ ye di an avatar, m bɛlimnɛ gu\'usim + Avatar maalya + Daʋŋ bɛ avatar maalʋgin, m bɛlimnɛ mɔɔm ya\'as + Maalim ka di an avatar + Yʋʋm-yʋʋm + Bakɔi-bakɔi + Saŋa wʋsa + Kpɛn\'ɛsim + Yamma + Tʋmya + M tɛbisim + &#169; <a href=\"https://www.mapbox.com/about/maps/\">Mapbox</a> &#169; <a href=\"https://www.openstreetmap.org/copyright\">OpenStreetMap</a> <a href=\"https://www.mapbox.com/map-feedback/\">Improve this map</a> + Bas suor ye di tʋm saŋa bi\'ela! + Atʋm bi\'ela zi\'esim + Footo sʋma + Lɛm pin\'in kpɛn\'ɛsʋg... + Gu\'om kpɛn\'ɛsʋg... + Basid kpɛn\'ɛsʋg... + Basim kpɛn\'ɛsʋg + Bas suor ye di tʋm saŋa bi\'ela. + Nwɛnnɛm nam + Media tʋʋma gbaʋŋ + Mɛdia wiesʋg + Gɔsim buudi lakir + Gɔsim laʋk lakir zin\'ig + Yisnɛ pian\'azug nɛ pa\'alʋg + Karimim bɛdegʋ + Buudi pian\'ad wʋsa ni + Gaŋim zin\'ig + Gaŋim babir + Pa\'alim map app ni + Dɛmisim zin\'ig + Footo gɔsʋg kanɛ bɛ zin\'ig nɔkirin + Footo kanɛ pa\'an zin\'ig nɔkir la siig + Footo zin\'ig + Gɔsim ye zin\'ig la an sʋm bɛ + Zanbin + Pa\'alʋg + La\'ad + Agaŋ yɔri + Footonam kae + Naaya + Nya\'aŋ + A gaŋ footo yɔri pʋ\'ʋsidif ken-ken + Nyalima + Ba pʋn kpɛn\'ɛs footo kaŋa Commons sa. + Basim + Max: %1$d + Di anɛ Wiki Loves Monuments nwadig! + ZAMISIM BɛDEGʋ + Bɔɔdi suor ye di tʋm + Map banɛ bɛ yamma bɔɔd ye ba karim Moba zi\'esim ka nyaŋi tʋm sʋ\'ʋŋa + Tʋmtʋm tʋʋma: %s + Tʋmtʋm nyɔɔd: %s + Gɔsim tʋmtʋm lakir zin\'ig + Dɛmisim nwɛnnɛmnam + Dɛmisim buudinam + Tuon ken gaansʋg + Zaŋim tʋm + Maligim maal + Pʋ paam zin\'isi\'aa + Paasim zin\'ig + Wiesʋg + API zi\'esim + Android version + Onɛ maal divaasi + Divaasi buudi + Divaasi yʋ\'ʋr + Nɛtwɛk buudi + M pʋ\'ʋsya nɛ fʋn gandig la + Daʋŋ bɛ gandigir lɛbisʋgin + Fʋ gandigir an bɔ? + Fʋ gandigir + Zanbilim ye di ka\' dine kpɛn\'ɛsida + Da zanbil kanɛ an ye di ka\' dinɛ kpɛn\'ɛsid la + Zanbinnɛ ye di ka\' dine kpɛn\'ɛsida + Yisidnɛ zanbin kanɛ an ye di ka\' dine kpɛn\'ɛsid la + Pa\'aolim footo banɛ dɛŋim mɔr tʋʋma + Su\'am footo banɛ dɛŋim mɔr tʋʋma + Pʋ nyɛ footo si\'a + Footo kaŋa pʋn kpɛn\' sa + Kʋ nyaŋi gaŋ footo kaŋa kpɛn\'ɛsɛ + Gaŋ footo + Ba zanbil footo la ye di kʋ nyaŋi kpɛn\'ɛsɛ + Pɔɔtimim + Maalim nindaa la piel + Maalim nindaa la sabil + Pɔɔtimim daʋŋ + Pɔɔtimim tʋmtʋm kaŋa + Pɔɔtimim labakaŋa + Sɔsim suori bʋlɔk tʋmtʋmkaŋa + Full-Screen Selection Mode pʋ\'ʋsidif ken-ken + Nɔkim nu\'ubibis ayi yalig ka ku\'ol footo. + Pʋ bas suor ye fʋ kpɛn\' la\'ad suak zin\'igin la. + Pʋ nyaŋi pʋdig laʋk kaŋa %d image selected %d images selected diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 1055fe284..f62d0349e 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -132,6 +132,7 @@ Файл не найден. Попробуйте другой файл. Достигнут максимальный лимит повторов! Пожалуйста, отмените загрузку и повторите попытку. Выключить оптимизацию батареи? + Загрузка более 3 изображений работает более надежно, если оптимизация заряда батареи отключена. Пожалуйста, отключите оптимизацию заряда батареи для приложения Викисклада в настройках, чтобы обеспечить плавную загрузку. \n\nВозможные действия по отключению оптимизации заряда батареи:\n\nШаг 1: Нажмите кнопку \'Настройки\' ниже.\n\nШаг 2: Переключитесь с \'Не оптимизировано\' на \'Все приложения\'.\n\nШаг 3. Найдите «Викисклад» или «fr.free.nrw.commons».\n\nШаг 4. Нажмите на него и выберите \'Не оптимизировать\'.\n\nШаг 5: Нажмите \'Готово\'. Ошибка аутентификации. Пожалуйста, авторизуйтесь ещё раз. Загрузка началась! Загрузка в очереди (включен режим ограниченного подключения) @@ -724,6 +725,8 @@ В отличие от изображения слева, изображение справа имеет логотип Commons, указывающий, что оно уже загружено.\n Нажмите и удерживайте для предварительного просмотра изображения. Потрясающе Это изображение уже было загружено на Викисклад. + Отменить + Максимально: %1$d Это изображение будет участвовать в конкурсе «Вики любит памятники». Показать памятники Это месяц «Вики любит памятники»! @@ -772,6 +775,8 @@ Изображение выбрано Изображение помечено как не подлежащее загрузке Отчёт + Установить белый фон + Установить черный фон Сообщить о нарушении Пожаловаться на участника_цу Пожаловаться на это содержимое @@ -783,6 +788,7 @@ Координаты не являются точными, но человек, загрузивший эту фотографию, считает, что они достаточно близки. Доступ к хранилищу запрещён Невозможно поделиться этим объектом + Для функционирования требуются разрешения выбрано %d изображение выбрано %d изображения diff --git a/app/src/main/res/values-uz/strings.xml b/app/src/main/res/values-uz/strings.xml index 2490c3b46..39de382b6 100644 --- a/app/src/main/res/values-uz/strings.xml +++ b/app/src/main/res/values-uz/strings.xml @@ -1,6 +1,7 @@ @@ -63,6 +64,7 @@ Vikiombor Tanlovlar Vikiomborga yuklash + Yuklash davom etmoqda Foydalanuvchi nomi Parol Vikiombor Beta hisobiga kirish @@ -76,6 +78,9 @@ Kirish muvaffaqiyatli bajarildi! Kirish muvaffaqiyatsiz yakunlandi! Fayl topilmadi. Iltimos, boshqa faylni izlab koʻring. + Qayta urinish maksimal chegarasi yetdi! Iltimos yuklashni bekor qiling va yana urinib koʻring + Batareyani optimallashtirishni oʻchirib qoʻying? + Batareyani optimallashtirish oʻchirilgan boʻlsa, 3 tadan ortiq rasmni yuklash yanada ishonchli ishlaydi. Yuklash muammosiz ishlashi uchun Commons ilovasi uchun batareya quvvatini optimallashtirishni sozlamalardan oʻchirib qoʻying. \n\nBatareyani optimallashtirishni oʻchirish uchun mumkin boʻlgan qadamlar:\n\n1-qadam: Quyidagi “Sozlamalar” tugmasini bosing.\n\n2-qadam: “Optimallashtirilmagan”dan “Hammasi”ga oʻting.\n\n3-qadam: “Commons” yoki “fr.free.nrw.commons” ni qidiring.\n\n4-qadam: Unga teging va “Optimallamang”ni tanlang.!N !\n5-qadam: “Bajarildi” tugmasini bosing. Kirib boʻlmadi. Qaytadan urinib koʻring Yuklash boshlandi! Yuklash navbatda (cheklangan ulanish sozlanmasi yoqilgan) @@ -185,8 +190,11 @@ Qurilmangiz tashqi xotirasini oʻqishga ruxsat berishingiz soʻraladi. Busiz ilova galereyangizga kira olmaydi. Qurilmangiz tashqi xotirasini oʻqishga ruxsat berishingiz soʻraladi. Ilova kamera/galereyagi busiz kira olmaydi. Joylashuvga ruxsat soʻramoqda + Ilova ichidagi suratlar uchun joylashuvni yozib oling + Qurilma kamerasi yozib olmasa, ilova ichidagi suratlar bilan joylashuvni yozib olish uchun buni yoqing Mayli Ogohlantirish + Ikki nusxadagi fayl nomi topildi Yuklash Ha Yoʻq From 3ae5bb5cd77345be697564345df99a37973a8ac0 Mon Sep 17 00:00:00 2001 From: "translatewiki.net" Date: Mon, 11 Dec 2023 13:02:55 +0100 Subject: [PATCH 029/693] Localisation updates from https://translatewiki.net. --- app/src/main/res/values-es/strings.xml | 11 ++++++++++- app/src/main/res/values-ia/strings.xml | 2 ++ app/src/main/res/values-it/strings.xml | 3 +++ app/src/main/res/values-iw/strings.xml | 2 +- app/src/main/res/values-krc/strings.xml | 2 +- app/src/main/res/values-sr/strings.xml | 2 ++ app/src/main/res/values-ta/strings.xml | 3 ++- 7 files changed, 21 insertions(+), 4 deletions(-) diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index e45585568..764fb99e6 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -41,6 +41,7 @@ * Pompilos * Raos10 * Rodney Araujo +* Samthony * Superzerocool * Tiberius1701 * Vivaelcelta @@ -106,6 +107,7 @@ Configuración Subir a Commons + Carga en curso Nombre de usuario Contraseña Accede a tu cuenta de Commons Beta @@ -119,6 +121,9 @@ Inicio de sesión exitoso Falló el inicio de sesión No se encontró el archivo. Por favor prueba con otro. + ¡Se alcanzó el límite máximo de reintentos! Cancela la subida e inténtalo de nuevo + ¿Desactivar la optimización de la batería? + Subir más de 3 imágenes funciona mejor cuando la optimización de la batería está desactivada. Desactiva la optimización de la batería para la aplicación Commons desde la configuración para una experiencia de subida más fluida. \n\nPosibles pasos para desactivar la optimización de la batería:\n\nPaso 1: Pulsa en el botón de \'Configuración\' mostrado a continuación.\n\nPaso 2: Navega desde \'No optimizado\' a \'Todas las apps\'.\n\nPaso 3: Busca \"Commons\" o \"fr.free.nrw.commons\".\n\nPaso 4: Púlsalo y selecciona \'No optimizar\'\n\nPaso 5: Pulsa en \'Aceptar\'. La autenticación ha fallado, por favor prueba a acceder otra vez ¡Subiendo! Carga en cola (modo de conexión limitada activado) @@ -233,6 +238,8 @@ Permiso necesario: lectura de almacenamiento externo. La aplicación no puede acceder a la galería sin él. Permiso necesario: escritura en almacenamiento externo. La aplicación no puede acceder a la cámara o la galería sin este. Pidiendo Permiso de Ubicación + Registra la ubicación de las fotos tomadas desde la aplicación + Habilita esto para registrar la ubicación de fotografías tomadas desde la aplicación en caso de que la cámara del dispositivo no la registre automáticamente Aceptar Atención Nombre de archivo duplicado encontrado @@ -311,6 +318,7 @@ Copia el wikitexto al portapapeles El wikitexto fue copiado al portapapeles Cercanos no puede funcionar correctamente. La ubicación no está disponible. + Acceso a la ubicación denegado. Configura tu ubicación manualmente para utilizar esta función. Se necesita permiso para mostrar una lista de lugares cercanos Cómo llegar Wikidata @@ -378,6 +386,7 @@ Respuesta incorrecta ¿Esta captura de pantalla esta bien para ser subida? Compartir aplicación + Rotar Error al recuperar los lugares cercanos. No hay lugares cercanos alrededor Error al encontrar monumentos cercanos. @@ -593,7 +602,7 @@ CLASES HIJAS CLASES PADRES Lugar cercano encontrado - ¿Esta es una foto del lugar %1$s? + ¿Esta foto es de %1$s? Marcadores Configuración removido de marcadores diff --git a/app/src/main/res/values-ia/strings.xml b/app/src/main/res/values-ia/strings.xml index 3a37f6b0c..5ec4a824f 100644 --- a/app/src/main/res/values-ia/strings.xml +++ b/app/src/main/res/values-ia/strings.xml @@ -715,6 +715,8 @@ Imagine seligite Imagine marcate como non a incargar Reportar + Poner fundo blanc + Poner fundo nigre Reportar violation Reportar iste usator Reportar iste contento diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 2632220f7..30f79e443 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -10,6 +10,7 @@ * Gianfranco * Lorelai87 * Lorem Ipsum +* Luca.favorido * Nemo bis * Noretta93 * S4b1nuz E.656 @@ -679,6 +680,8 @@ Immagine selezionata Immagine contrassegnata come da non caricare Segnalazioni + Imposta lo sfondo bianco + Imposta lo sfondo nero Segnala violazione Segnala questo utente Segnala questo contenuto diff --git a/app/src/main/res/values-iw/strings.xml b/app/src/main/res/values-iw/strings.xml index ac1d490f6..a265fa7e9 100644 --- a/app/src/main/res/values-iw/strings.xml +++ b/app/src/main/res/values-iw/strings.xml @@ -338,7 +338,7 @@ חיפוש חיפוש בוויקישיתוף חיפוש - חיפוש אחרונים: + חיפושים אחרונים: דברים שחיפשת לאחרונה שאילתות שפה אחרונות אירעה שגיאה בעת טעינת קטגוריות. diff --git a/app/src/main/res/values-krc/strings.xml b/app/src/main/res/values-krc/strings.xml index 578ed71c3..571a9d7e8 100644 --- a/app/src/main/res/values-krc/strings.xml +++ b/app/src/main/res/values-krc/strings.xml @@ -9,7 +9,7 @@ Джарашдырыула Къошулуучуну аты Пароль - Кириу + Кир Системагъа кириу Бираз сакълагъыз… Авторизация тыйыншлы ётдю diff --git a/app/src/main/res/values-sr/strings.xml b/app/src/main/res/values-sr/strings.xml index 82be6164b..29695204b 100644 --- a/app/src/main/res/values-sr/strings.xml +++ b/app/src/main/res/values-sr/strings.xml @@ -699,6 +699,8 @@ Одабрана слика Слика означена као „није за отпремање” Пријави + Постави белу позадину + Постави црну позадину Пријави злоупотребу Пријави овог корисника Пријави овај садржај diff --git a/app/src/main/res/values-ta/strings.xml b/app/src/main/res/values-ta/strings.xml index 754e986ae..773b3508e 100644 --- a/app/src/main/res/values-ta/strings.xml +++ b/app/src/main/res/values-ta/strings.xml @@ -1,6 +1,7 @@ @@ -371,7 +372,7 @@ النتيجة إذا استمر رفع الصور التي تتطلب الحذف، فمن المحتمل أن يتم من حسابك، هل أنت متأكد من أنك تريد إنهاء الاختبار؟ تم حذف أكثر من %1$s من الصور التي رفعتها، إذا استمر تحميل الصور التي تتطلب الحذف، فمن المحتمل أن يتم منع حسابك. \n\nهل ترغب في مشاهدة البرنامج التعليمي مرة أخرى ومن ثم إجراء اختبار لمساعدتك في معرفة نوع الصور التي ينبغي أو لا ينبغي رفعا؟ - الصور الشخصية ليست لها قيمة موسوعية كبيرة; يُرجَى عدم رفع صورة لنفسك ما لم تكن لديك بالفعل مقالة ويكيبيديا عنك. + الصور الشخصية ليس لها قيمة موسوعية كبيرة; يُرجَى عدم رفع صورة لنفسك ما لم تكن لديك بالفعل مقالة ويكيبيديا عنك. من الأفضل رفع صور المعالم الأثرية والمناظر الخارجية في معظم البلدان، تُرجَى ملاحظة أن المنشآت الفنية المؤقتة بالخارج تكون محمية بحقوق الطبع والنشر في الغالب وليس مسموحا برفعها. تُعتبَر لقطات شاشة المواقع الإلكترونية أعمالا مشتقة وتخضع لأي حقوق نشر على الموقع نفسه، ويمكن استخدامها بعد الحصول على إذن من المؤلف، بدون هذا الإذن، يُعتبَر أي فن تقوم بإنشائه بناءً على عملهم نسخة غير مرخصة من قبل المؤلف الأصلي. أحد أهداف كومنز جمع صور عالية الجودة، لذلك; لا يجب رفع صور باهتة; حاول دائما التقاط صور جميلة بإضاءة جيدة. @@ -502,8 +503,8 @@ لا صور مستخدمة لم يتم إرجاع أية صور لا توجد صور مرفوعة - ليست لديك إشعارات غير مقروءة - ليست لديك إشعارات مقروءة + ليس لديك أي إشعارات غير مقروءة + ليس لديك أي إشعاراتٍ غير مقروءة مشاركة السجلات باستخدام عرض المقروءة عرض غير المقروءة diff --git a/app/src/main/res/values-kus/strings.xml b/app/src/main/res/values-kus/strings.xml index 01f06e0f7..171d0fd4d 100644 --- a/app/src/main/res/values-kus/strings.xml +++ b/app/src/main/res/values-kus/strings.xml @@ -20,6 +20,7 @@ Awiesi pa\'al Siig Wʋsa + Dʋmma agɔl Ieb nyɛɛb Zin\'igi an si\'em siigkanɛ gat dabisir la pʋʋgin @@ -72,6 +73,7 @@ Akpɛn\'ɛs siisa atan tʋm sʋ\'ʋŋa nɛ fʋ ya\'a kpiis dinɛ dit batir la ka di pʋ tʋmma. M bɛlimnɛ kpiisim dinɛ dit batir la Commons App la ni dɔlidi maalʋg la ni ka di nya\'ŋi kpɛn\' sʋ\'ʋŋa.\nsuobanɛ ka sɔ\' na dɔl ka kpiis dinɛ dit batir la anɛ:\nsuor 1: Si\'isim \"maalʋg\" babkanɛ bɛ teŋir la. \n\nsuor 2: Tiakim yi Dim batiri keŋ appnam wʋsa.\n\nSuor 3: Iem \"Commons\" bɛɛ \"fr.free.nrw.commons\".\n\nSuor 4: Si\'isimi di ka gaŋ da dii.\n\nSuor 5: Diim \"di naaeya\". Suor basib gʋ\'ʋŋya, m bɛlimnɛ kpɛn\'ɛm ya\'as Kpɛn\'ɛsʋg pin\'ilʋg! + Dinɛ ka fʋ zaŋi kpɛn\'ɛsid la bɛnɛ lai zug (fʋ bas suor ye di tɔ\'ɔŋim tʋm bi\'ela ma\'aa) %1$s Kpɛn\'ɛya! Di\'em ka gɔs dinɛ ka fʋ Kpɛn\'ɛs Kpɛn\'ɛsidnɛ faal: %s @@ -115,15 +117,19 @@ Wikidata laʋk kae nwɛnɛ %1$s %1$s pʋ mɔr biig dɔɔdɛ %1$s pʋ mɔr du\'adib dɔɔdɛ + Paasim buudi ka di kɛ ka fʋ footonam la paamʋg an na\'ana\' Wikimedia Commons ni.\n\nPin\'ilim sɔbʋgʋ paas buudinam. Buudi Maalʋg Yɔ\'ɔgim kpɛn\' maal Footo banɛ nwɛn taaba + Agaŋ yɔri Buudi Ala\'asi dɛŋim gɔs Dinɛ yɛla + Wikimedia Commons app la anɛ dinɛ bɛ tis sɔ\' wʋsa ka nidib banɛ bɛ Wikimedia Community pɛsigi ba mɛŋi maal zaalim. Wikimedia Foundation pʋ paas banɛ maan, sʋŋid bɛɛ gɔsid app la yɛlaa. Maalim bʋmpaal <a href=\"%1$s\">GitHub issue</a> tis daʋŋ pɔtimʋg nɛ pʋtɛnda tisib. Su\'adim gban\'ar + Nyɔɔd Dinɛ yɛla Tisim gandigir (dɔlis email ni) Sɔ\' pʋ kpɛn\'ɛ emailɛ @@ -132,6 +138,7 @@ Fʋ nam pʋ kpɛn\'ɛsi fʋ footonam la. Mɔɔm ya\'as Basim + Mam niŋ footo kaŋa la, m pa\'al ye nɛ\' anɛ mam mɛŋ tʋʋma, ye di pʋ mɔr sɔ\' tʋʋma di pʋʋginɛ ka ya\'a ka\' wala kaam <a href=\"https://commons.wikimedia.org/wiki/Commons:Policies_and_guidelines\">Wikimedia Commons policies</a>. Vɛ\'ɛgim Tʋʋma gbaʋŋ kanɛ an na\'ana Nɔkim pian\'azug kʋdʋg nɛ pa\'alʋg @@ -149,19 +156,35 @@ M bɛlimnɛ DA kpɛn\'ɛsɛ: Dinɛ ka fʋ mɛŋ kia bɛɛ fʋ zuanam footonam Footobanɛ ka fʋ vɛ\'ɛgi yi internetin + Proprietary\n app footonam + Tituunli kpɛn\'ɛsya: + Pian\'azug: Sydney Opera House + Pa\'alʋg: Sydney Opera House nwɛnɛ ban nyɛ di si\'em bay la lɔ\'ɔm + Buudinam: Sydney Opera House din yi Ya-tuona baba, Sydney Opera House remote views + Paasimi fʋ footo. Sʋŋim Wikipedia atikil ka di vʋ\'ʋg! + Footo banɛ bɛ Wikipedia la yinɛ Wikimedia Commons. + Fʋ footo la sʋŋi pa\'an nidib dunia wʋsa ni. + Da nɔ\'ɔsid la\'abanɛ ka nidib maali digil intanɛtɛ la\'anɛ footonam, gbana nya\'aŋ pak, nɛ banɛ kpɛlim wʋsa. Fʋ tɛn\'ɛs ye fʋ paami dii? Ɛɛn! Labaya bɛdigʋ Buudi kɔn\'ɔb-kɔn\'ɔb + Bɛ tʋʋma ni... Pʋ gaŋ si\'ela Pian\'azug kae Pa\'alʋg kae Sɔnsʋg kae Ti zi\' kasɛta gbaʋŋ kaŋa Maligim maal + Bu\'osidnɛ suor ye di yɔ\'ɔg la\'ad suak zin\'ig + Asɛɛ ka fʋ bas suor: Karim yiiŋ la\'ad sua\'asig la. App la kʋ nyaŋi yɔ\'ɔg galari ka nɛ\' ka\'asigɛ. + Asɛɛ ka fʋ bas suor: Karim yiiŋ la\'ad sua\'asig la. App la kʋ nyaŋi yɔ\'ɔg kamɛrs/ galari ka nɛ\' ka\'asigɛ. Bu\'osidnɛ suor ye di yɔ\'ɔg zin\'ig + Pa\'alim zin\'ikanɛ ka fʋ na sua footbama + Basim suor ka app la nyaŋi pa\'al zin\'ikanɛ ka fʋ bɛ ka divaasi la tʋn\'e pʋ pa\'ali di Awɔɔ Kpa\'asʋg + Paamnɛ faal si\'a yʋ\'ʋr ya\'as Kpɛn\'ɛsʋg Ɛɛn Ayei @@ -173,10 +196,14 @@ Sʋ\'ʋd Kpɛn\'ɛsʋg dabisir kal Kasɛta gbaʋŋ + Coordinates Pʋ bɔ si\'ela Liebim onɛ kpansid Beta 2FA koodi Fʋ sid bɔɔdi fʋ yi yiiŋa? + Midia footo gʋ\'ʋŋya + Pʋ paam buudi bibisɛ + Pʋ paam buudi si\'a Zao zuor Lamas Rainbow Birig @@ -201,6 +228,8 @@ Commons faal lakir Wikidata laʋk Wikipiidia atikil + M bɛlimnɛ pa\'alim midia la yɛla bɛdegʋ: Yaanɛ ka ba daa nɔki li? Di pa\'an bɔ? Ya\'am bɔ bɛɛ di ni? \nM bɛlimnɛ pa\'alim la\'ad bɛɛ nidib la. Niem labakanɛ na sʋŋ ka ti kʋ bi\'esida, nwɛnɛ dabisir pʋʋgin sankanɛ ka si\'el naam. Midia la ya\'a pa\'an dinɛ bɛ li kɔn\', pa\'alim dinɛ kɛ ka di bɛɛ di kɔn\' + M bɛlimnɛ sɔm si\'el bi\'ela pa\'al footo la an si\'el. \nYiiga pian\'azug la na liebi footo la yʋ\'ʋr. Kɛl ka sɔbbiela la an 255. Daʋŋ be footo kaŋa ni Footo la sɔbʋgnɛ galis. Footo la anɛ diisʋgʋ. @@ -248,8 +277,20 @@ Iem Banɛ ka fʋ ia ka di pʋ yuugɛ: Banɛ ka fʋ ia ka di pʋ yuuge bu\'osa + Media Buudi kɔn\'ɔb-kɔn\'ɔb La\'ad + Naalʋŋ + Zaŋim moba kpɛn\'ɛsi li + Map + Footo la paasnɛ %1$s ni bɛ Wikidata! + Pʋ nyaŋi tɛnrig Wikidata la\'abanɛ nar la! + Maalimi fʋ nindaa footo + Nindaan footo maalya nyain! + Bu\'osa + Footo kaŋa an sʋ\'ʋm nɛ ban na kpɛn\'ɛsi dii? + Bu\'osʋg + Lɛbisʋg/ nyɔɔd Pʋdigimi fʋ bu\'osa la nɛ fʋ zuanam! Kem tuon Gandig sʋŋ @@ -321,10 +362,102 @@ Gɔsim kampeen banɛ ken Basim suor Basim + Di\'ed si\'el fʋ dɛmis la zug + Paasidnɛ tempilet ye di gɔs buudi yɛla + Buosidnɛ %1$s buudi yɛla + Buosidnɛ buudi yɛla + Buudi kpansʋg yɛla bu\'osya + Buudi yɛla bu\'osʋg pʋ tʋmm + Buosidnɛ %1$s buudi yɛla + Pʋ nyaŋi bu\'os %1$s buudi yɛlaa + Buosidnɛ %1$s buudi yɛla Naaya Kennɛ M pʋ\'ʋsya: Nyaŋya Nyaŋi tis %1$s M pʋ\'ʋsya labaar + Pʋ nyaŋi tis %1$s m pʋ\'ʋsya + Tisidnɛ M pʋ\'ʋsya: Gʋ\'ʋŋnɛ + Tisidnɛ %1$s m pʋ\'ʋsya + Nɛ\'ɛŋa dɔli anɔk sɔ\' tʋʋma wada? + Nɛ\'ɛŋa pʋʋ ba buudinam sʋ\'ʋŋaa? + Nɛ\' anɛ insikop pɛɛ? + Fʋ na bɔɔd ye fʋ pʋ\'ʋs tʋmtʋm laa? + Diimi AYEI gaŋ footo kaŋa yis di ya\'a pʋ mɔr nyɔɔd baa bi\'elaa. + Logonam, footo banɛ nwaae nindaan, nɛ sigiilima ɛɛnti mɔr daʋŋ nɛ a nɔk sɔ\' tʋʋma wada.\nDiim AYEI gaŋ footo kaŋa yisi bas + Fʋ pʋ\'ʋsʋg la na kpɛmis %1$s + Oo, ba pʋm pʋ pʋ\' nɛ\'ɛŋa! + Footo kaŋa bɛnɛ %1$s buudi ni. + Di pʋ dɔl zi\'esim la bɔzugɔ di anɛ + Di gɛɛsnɛ sɔb wada bɔzugɔ di anɛ + Footo kanɛ bɛ tuon + ɛɛn, bɔɔ kɛ + Fʋ ya\'a din\' nɛ\'ɛŋa di na tisif suor ka fʋ yɔ\'ɔg footo kanɛ ka ba nan kpɛn\'ɛs Wikipedia Commons nananna + Ba pʋ nɔk footo tʋm + Ba pʋ lɛbis footonam ban aan si\'em + Ba pʋ kpɛn\'ɛs footonama + Fʋ pʋ mɔr tienr labaya banɛ ka fʋ pʋ karim + Fʋ pʋ mɔr tienr labaya banɛ ka fʋ karim + Pʋdigim lognam la dɔlisid + Gɔsim dinɛ ka fʋ karim sa + Gɔsim dinɛ ka fʋ nam pʋ karim + Daʋŋʋ kidig footonam la nɔkirin + M bɛlimnɛ gu\'usim... + Footo banɛ ka fʋ kpɛn\'ɛsi dɔlis zin\'ibanɛ be yamma anɛ footo banɛ ka fʋ kpɛn\'ɛs ka di yinɛ fʋn nyɛ di map ni la. + Yaam paas media banɛ bɛ tuon + Yaaiya + Footo banɛ nar nɛ Commons kpɛn\'ɛsʋg tituunli + Footo banɛ pʋ nar nɛ kpɛn\'ɛsʋg tituunli + Iankim gaŋ footo kaŋa + Vɛ\'ɛgor gʋ\'ʋŋya!!. Ti kʋ nyaŋi vɛ\'ɛg faal la ka pʋ paam suori yi yiiŋ suak zin\'igin la. + Maalim EXIF tagnam + Gaŋim EXIF tagbanɛ ka fʋ ye fʋ kpɛn\'ɛs + Sʋ\'ʋd + Sɔ\' tʋʋma wada dɔlisʋg + Zin\'ig + Kamɛra zi\'esim + Lens Model + Serial Numbers + Software + Pʋ bas suor ye fʋ kpɛn\' midia zin\'iginɛ + Pʋdigim app la dɔlis... + Footo labaar + Pʋ paam buudinama + Pʋ nyɛ nwɛnnɛm si\'aa. + Basim kpɛn\'ɛsʋg + Labaar kae pa\'an footo kanɛ gaad la pian\'azug bɛɛ pa\'alʋgɔ + Bɔ ka di nar ye %1$s yisɛ? + %2$s kpɛn\'ɛs %1$s + yɔɔg-yɔɔg buudi pian\'ad pa\'alʋg + Gaŋidnɛ ye ba yisi bas + Nyaŋya + Gaŋnɛ %1$s ye di yis. + Gʋ\'ʋŋya + Pʋ nyaŋi yɛl ye ba yisima. + Wʋsa anɛ diisʋg + Press footo + yɔɔg-yɔɔg footo yi internet + Logo + Breach of Freedom of Panorama + Bɔzugɔ di anɛ + Mɔɔd ye maal buudinam. + Buudi tɛnrigir + Nyaŋya + + Category %1$s is added. + Categories %1$s are added. + + Pʋ nyaŋi paas buudinama. + Tɛnrigim buudinam + Mɔɔd ye di tɛndig nwannim nam. + Dɛmisim nwɛnnɛmnam + + Depiction %1$s is added. + Depictions %1$s are added. + Pʋ nyaŋi paas nwɛnnɛmnama. + Mɔɔd ye di tɛndig Coordinates. + Coordinates tɛndigir + Pa\'alʋg tɛndigir + Pian\'azug tɛndigir Nyaŋya Coordinate nam %1$s paasya Pa\'ala paasya. diff --git a/app/src/main/res/values-lb/strings.xml b/app/src/main/res/values-lb/strings.xml index 9364bae73..3edd66c1a 100644 --- a/app/src/main/res/values-lb/strings.xml +++ b/app/src/main/res/values-lb/strings.xml @@ -105,7 +105,7 @@ Iwwer D\'App Wikimedia Commons ass eng \'Open-Source-App\' déi vu Fräiwëllege vun der Wikimedia Foundation entwéckelt gouf an och vun hinnen ënnerhal gëtt. D\'Wikimedia Foundation ass net an d\'Entwécklung oder den Ënnerhalt vun der App implizéiert. Leet wgl. e <a href=\"%1$s\">GitHub-Antrag</a> u fir Feeler ze mellen a Proposen ze maachen. - Dateschutz + Dateschutzrichtlinnen Merci Iwwer Feedback schécken (per E-Mail) @@ -118,7 +118,7 @@ Eroflueden Standardlizenz Viregen Titel a Beschreiwung benotzen - Thema + Faarfschema Attribution-ShareAlike 4.0 Attribution 4.0 CC Attribution-ShareAlike 3.0 diff --git a/app/src/main/res/values-sl/strings.xml b/app/src/main/res/values-sl/strings.xml index 625d83c50..c2901e940 100644 --- a/app/src/main/res/values-sl/strings.xml +++ b/app/src/main/res/values-sl/strings.xml @@ -316,7 +316,7 @@ Ta kraj ne obstaja več. Ni najdenih slik! Pri nalaganju slik je prišlo do napake. - Naložil/a: %1$s + Naložil_a: %1$s Blokiran_a Urejanje Zbirke vam je preprečeno Slika dneva From c818e8b7c2f0fc0ca03ab8cee070d44d80c6b0b2 Mon Sep 17 00:00:00 2001 From: Srishti Rohatgi <53987325+srishti-R@users.noreply.github.com> Date: Wed, 20 Dec 2023 19:18:32 +0530 Subject: [PATCH 033/693] widget correction (#5402) --- .../java/fr/free/nrw/commons/widget/PicOfDayAppWidget.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/fr/free/nrw/commons/widget/PicOfDayAppWidget.java b/app/src/main/java/fr/free/nrw/commons/widget/PicOfDayAppWidget.java index e3d989798..f33631784 100644 --- a/app/src/main/java/fr/free/nrw/commons/widget/PicOfDayAppWidget.java +++ b/app/src/main/java/fr/free/nrw/commons/widget/PicOfDayAppWidget.java @@ -51,7 +51,7 @@ public class PicOfDayAppWidget extends AppWidgetProvider { // Launch App on Button Click Intent viewIntent = new Intent(context, MainActivity.class); - PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, viewIntent, 0); + PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, viewIntent, PendingIntent.FLAG_IMMUTABLE); views.setOnClickPendingIntent(R.id.camera_button, pendingIntent); appWidgetManager.updateAppWidget(appWidgetId, views); @@ -81,7 +81,7 @@ public class PicOfDayAppWidget extends AppWidgetProvider { Intent viewIntent = new Intent(); viewIntent.setAction(ACTION_VIEW); viewIntent.setData(Uri.parse(response.getPageTitle().getMobileUri())); - PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, viewIntent, 0); + PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, viewIntent, PendingIntent.FLAG_IMMUTABLE); views.setOnClickPendingIntent(R.id.appwidget_image, pendingIntent); loadImageFromUrl(response.getThumbUrl(), context, views, appWidgetManager, appWidgetId); From 8b054926feb63ff654bf687eeba318d88eb5f25b Mon Sep 17 00:00:00 2001 From: "translatewiki.net" Date: Thu, 21 Dec 2023 13:02:30 +0100 Subject: [PATCH 034/693] Localisation updates from https://translatewiki.net. --- app/src/main/res/values-ar/strings.xml | 3 +++ app/src/main/res/values-lb/strings.xml | 4 ++++ app/src/main/res/values-se/strings.xml | 1 + app/src/main/res/values-sl/strings.xml | 4 ++-- 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml index 70062a20a..436fce3eb 100644 --- a/app/src/main/res/values-ar/strings.xml +++ b/app/src/main/res/values-ar/strings.xml @@ -762,4 +762,7 @@ مرحبًا بك في وضع التحديد بملء الشاشة استخدم إصبعين للتكبير والتصغير. مرر سريعًا وطويلًا لتنفيذ هذه الإجراءات:! N! - يسار / يمين: انتقل إلى السابق / التالي! N! - لأعلى: حدد! N! - أسفل: وضع علامة على أنه ليس للتحميل. + رُفض إذن التخزين + تعذر مشاركة هذا العنصر + الإذن مطلوب لهذه الوظيفة diff --git a/app/src/main/res/values-lb/strings.xml b/app/src/main/res/values-lb/strings.xml index 3edd66c1a..c8517dd49 100644 --- a/app/src/main/res/values-lb/strings.xml +++ b/app/src/main/res/values-lb/strings.xml @@ -11,6 +11,10 @@ Commons-Logo Internetsite vu Commons Späicheren + Nach eng Beschreiwung derbäisetzen + En neie Bäitrag derbäiasetzen + E Bäitrag vun der Kamera derbäisetzen + E Bäitrag aus de Fotoen derbäisetzen Sprooch-Beschreiwung Beschreiwung Bild diff --git a/app/src/main/res/values-se/strings.xml b/app/src/main/res/values-se/strings.xml index 2cf24bf0b..70ff01a88 100644 --- a/app/src/main/res/values-se/strings.xml +++ b/app/src/main/res/values-se/strings.xml @@ -236,6 +236,7 @@ LASSEDIEĐUT Čájet geavaheaddjisiiddu Rievdat kategoriijaid + Lasseásahusat Geavat Lassedieđut Android-veršuvdna diff --git a/app/src/main/res/values-sl/strings.xml b/app/src/main/res/values-sl/strings.xml index c2901e940..7f73bc18c 100644 --- a/app/src/main/res/values-sl/strings.xml +++ b/app/src/main/res/values-sl/strings.xml @@ -463,8 +463,8 @@ Zahtevam preverjanje kategorij za »%1$s« Opravljeno Pošiljanje zahvale: uspešno - Zahvala uporabniku/ci %1$s je bila uspešno poslana - Pošiljanje zahvale uporabniku/ci %1$s ni uspelo + Zahvala uporabniku_ci %1$s je bila uspešno poslana + Pošiljanje zahvale uporabniku_ci %1$s ni uspelo Pošiljanje zahvale: neuspešno Pošiljam zahvalo uporabniku/ici %1$s Ali so tu upoštevane avtorske pravice? From 3d525d4eb3bdafc4b31eeb737435dcb8e77bbf42 Mon Sep 17 00:00:00 2001 From: Paul Hawke Date: Sat, 23 Dec 2023 00:31:10 -0600 Subject: [PATCH 035/693] Removed butterknife from contributions list fragment (#5396) * Removed butterknife from contributions list fragment and overhauled its test * Suggested fix from stack overflow to remove duplicate class error during build --- .gitignore | 4 + app/build.gradle | 25 ++- .../ContributionsListFragment.java | 117 ++++++------- .../ContributionsListFragmentUnitTests.kt | 154 +++++------------- data-client/build.gradle | 10 +- 5 files changed, 126 insertions(+), 184 deletions(-) diff --git a/.gitignore b/.gitignore index 418e4c380..e54ea2551 100644 --- a/.gitignore +++ b/.gitignore @@ -43,3 +43,7 @@ app/src/main/jniLibs #https://docs.opencv.org/3.3.0/ /libraries/opencv/javadoc/ captures/* + +# Test and other output +app/jacoco.exec +app/CommonsContributions \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index 2c0b0d93c..6a197c811 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -75,20 +75,22 @@ dependencies { kapt "com.google.dagger:dagger-compiler:$DAGGER_VERSION" annotationProcessor "com.google.dagger:dagger-android-processor:$DAGGER_VERSION" - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$KOTLIN_VERSION" implementation "org.jetbrains.kotlin:kotlin-reflect:$KOTLIN_VERSION" //Mocking testImplementation 'com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0' testImplementation 'org.mockito:mockito-inline:5.2.0' - testImplementation 'org.mockito:mockito-core:5.5.0' + testImplementation 'org.mockito:mockito-core:5.6.0' testImplementation "org.powermock:powermock-module-junit4:2.0.9" testImplementation "org.powermock:powermock-api-mockito2:2.0.9" // Unit testing testImplementation 'junit:junit:4.13.2' - testImplementation 'org.robolectric:robolectric:4.10.3' + testImplementation 'org.robolectric:robolectric:4.11.1' testImplementation 'androidx.test:core:1.5.0' + testImplementation "androidx.test:runner:1.5.2" + testImplementation 'androidx.test.ext:junit:1.1.5' + testImplementation "androidx.test:rules:1.5.0" testImplementation "com.squareup.okhttp3:mockwebserver:$OKHTTP_VERSION" testImplementation "com.jraska.livedata:testing-ktx:1.1.2" testImplementation "androidx.arch.core:core-testing:2.2.0" @@ -96,9 +98,9 @@ dependencies { testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:5.10.0" testImplementation 'com.facebook.soloader:soloader:0.10.5' testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.3" + debugImplementation("androidx.fragment:fragment-testing:1.6.2") // Android testing - androidTestImplementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$KOTLIN_VERSION" androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.0-alpha04' androidTestImplementation 'androidx.test.espresso:espresso-intents:3.4.0' androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.5.0-alpha04' @@ -158,6 +160,15 @@ dependencies { kaptAndroidTest "androidx.databinding:databinding-compiler:8.0.2" implementation("io.github.coordinates2country:coordinates2country-android:1.3") { exclude group: 'com.google.android', module: 'android' } + + constraints { + implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.0") { + because("kotlin-stdlib-jdk7 is now a part of kotlin-stdlib") + } + implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.0") { + because("kotlin-stdlib-jdk8 is now a part of kotlin-stdlib") + } + } } task disableAnimations(type: Exec) { @@ -206,8 +217,10 @@ android { testOptions { animationsDisabled true - unitTests.returnDefaultValues = true - unitTests.includeAndroidResources = true + unitTests { + returnDefaultValues = true + includeAndroidResources = true + } unitTests.all { jvmArgs '-noverify' diff --git a/app/src/main/java/fr/free/nrw/commons/contributions/ContributionsListFragment.java b/app/src/main/java/fr/free/nrw/commons/contributions/ContributionsListFragment.java index 6fed83a5d..20435da34 100644 --- a/app/src/main/java/fr/free/nrw/commons/contributions/ContributionsListFragment.java +++ b/app/src/main/java/fr/free/nrw/commons/contributions/ContributionsListFragment.java @@ -24,6 +24,7 @@ import androidx.activity.result.ActivityResultLauncher; import androidx.activity.result.contract.ActivityResultContracts; import androidx.annotation.NonNull; import androidx.annotation.Nullable; +import androidx.annotation.VisibleForTesting; import androidx.appcompat.widget.AppCompatTextView; import androidx.fragment.app.FragmentManager; import androidx.recyclerview.widget.GridLayoutManager; @@ -32,15 +33,13 @@ import androidx.recyclerview.widget.RecyclerView.AdapterDataObserver; import androidx.recyclerview.widget.RecyclerView.ItemAnimator; import androidx.recyclerview.widget.RecyclerView.OnItemTouchListener; import androidx.recyclerview.widget.SimpleItemAnimator; -import butterknife.BindView; -import butterknife.ButterKnife; -import butterknife.OnClick; import com.google.android.material.floatingactionbutton.FloatingActionButton; import fr.free.nrw.commons.CommonsApplication; import fr.free.nrw.commons.Media; import fr.free.nrw.commons.R; import fr.free.nrw.commons.Utils; import fr.free.nrw.commons.auth.SessionManager; +import fr.free.nrw.commons.databinding.FragmentContributionsListBinding; import fr.free.nrw.commons.di.CommonsDaggerSupportFragment; import fr.free.nrw.commons.media.MediaClient; import fr.free.nrw.commons.profile.ProfileActivity; @@ -66,61 +65,43 @@ public class ContributionsListFragment extends CommonsDaggerSupportFragment impl private static final String RV_STATE = "rv_scroll_state"; - @BindView(R.id.contributionsList) - RecyclerView rvContributionsList; - @BindView(R.id.loadingContributionsProgressBar) - ProgressBar progressBar; - @BindView(R.id.fab_plus) - FloatingActionButton fabPlus; - @BindView(R.id.fab_camera) - FloatingActionButton fabCamera; - @BindView(R.id.fab_gallery) - FloatingActionButton fabGallery; - @BindView(R.id.noContributionsYet) - TextView noContributionsYet; - @BindView(R.id.fab_layout) - LinearLayout fab_layout; - @BindView(R.id.fab_custom_gallery) - FloatingActionButton fabCustomGallery; - @Inject SystemThemeUtils systemThemeUtils; - @BindView(R.id.tv_contributions_of_user) - AppCompatTextView tvContributionsOfUser; - @Inject ContributionController controller; @Inject MediaClient mediaClient; - @Named(NAMED_LANGUAGE_WIKI_PEDIA_WIKI_SITE) @Inject WikiSite languageWikipediaSite; - @Inject ContributionsListPresenter contributionsListPresenter; - @Inject SessionManager sessionManager; + private FragmentContributionsListBinding binding; private Animation fab_close; private Animation fab_open; private Animation rotate_forward; private Animation rotate_backward; - - private boolean isFabOpen; - private ContributionsListAdapter adapter; + @VisibleForTesting + protected RecyclerView rvContributionsList; + + @VisibleForTesting + protected ContributionsListAdapter adapter; @Nullable - private Callback callback; + @VisibleForTesting + protected Callback callback; private final int SPAN_COUNT_LANDSCAPE = 3; private final int SPAN_COUNT_PORTRAIT = 1; private int contributionsSize; - String userName; + private String userName; + private ActivityResultLauncher inAppCameraLocationPermissionLauncher = registerForActivityResult(new ActivityResultContracts.RequestMultiplePermissions(), new ActivityResultCallback>() { @Override public void onActivityResult(Map result) { @@ -162,21 +143,32 @@ public class ContributionsListFragment extends CommonsDaggerSupportFragment impl public View onCreateView( final LayoutInflater inflater, @Nullable final ViewGroup container, @Nullable final Bundle savedInstanceState) { - final View view = inflater.inflate(R.layout.fragment_contributions_list, container, false); - ButterKnife.bind(this, view); + binding = FragmentContributionsListBinding.inflate( + inflater, container, false + ); + rvContributionsList = binding.contributionsList; + contributionsListPresenter.onAttachView(this); + binding.fabCustomGallery.setOnClickListener(v -> launchCustomSelector()); if (Objects.equals(sessionManager.getUserName(), userName)) { - tvContributionsOfUser.setVisibility(GONE); - fab_layout.setVisibility(VISIBLE); + binding.tvContributionsOfUser.setVisibility(GONE); + binding.fabLayout.setVisibility(VISIBLE); } else { - tvContributionsOfUser.setVisibility(VISIBLE); - tvContributionsOfUser.setText(getString(R.string.contributions_of_user, userName)); - fab_layout.setVisibility(GONE); + binding.tvContributionsOfUser.setVisibility(VISIBLE); + binding.tvContributionsOfUser.setText(getString(R.string.contributions_of_user, userName)); + binding.fabLayout.setVisibility(GONE); } initAdapter(); - return view; + + return binding.getRoot(); + } + + @Override + public void onDestroyView() { + binding = null; + super.onDestroyView(); } @Override @@ -309,7 +301,7 @@ public class ContributionsListFragment extends CommonsDaggerSupportFragment impl public void onConfigurationChanged(final Configuration newConfig) { super.onConfigurationChanged(newConfig); // check orientation - fab_layout.setOrientation(newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE ? + binding.fabLayout.setOrientation(newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE ? LinearLayout.HORIZONTAL : LinearLayout.VERTICAL); rvContributionsList .setLayoutManager( @@ -324,12 +316,12 @@ public class ContributionsListFragment extends CommonsDaggerSupportFragment impl } private void setListeners() { - fabPlus.setOnClickListener(view -> animateFAB(isFabOpen)); - fabCamera.setOnClickListener(view -> { + binding.fabPlus.setOnClickListener(view -> animateFAB(isFabOpen)); + binding.fabCamera.setOnClickListener(view -> { controller.initiateCameraPick(getActivity(), inAppCameraLocationPermissionLauncher); animateFAB(isFabOpen); }); - fabGallery.setOnClickListener(view -> { + binding.fabGallery.setOnClickListener(view -> { controller.initiateGalleryPick(getActivity(), true); animateFAB(isFabOpen); }); @@ -338,8 +330,7 @@ public class ContributionsListFragment extends CommonsDaggerSupportFragment impl /** * Launch Custom Selector. */ - @OnClick(R.id.fab_custom_gallery) - void launchCustomSelector() { + protected void launchCustomSelector() { controller.initiateCustomGalleryPickWithPermission(getActivity()); animateFAB(isFabOpen); } @@ -350,23 +341,23 @@ public class ContributionsListFragment extends CommonsDaggerSupportFragment impl private void animateFAB(final boolean isFabOpen) { this.isFabOpen = !isFabOpen; - if (fabPlus.isShown()) { + if (binding.fabPlus.isShown()) { if (isFabOpen) { - fabPlus.startAnimation(rotate_backward); - fabCamera.startAnimation(fab_close); - fabGallery.startAnimation(fab_close); - fabCustomGallery.startAnimation(fab_close); - fabCamera.hide(); - fabGallery.hide(); - fabCustomGallery.hide(); + binding.fabPlus.startAnimation(rotate_backward); + binding.fabCamera.startAnimation(fab_close); + binding.fabGallery.startAnimation(fab_close); + binding.fabCustomGallery.startAnimation(fab_close); + binding.fabCamera.hide(); + binding.fabGallery.hide(); + binding.fabCustomGallery.hide(); } else { - fabPlus.startAnimation(rotate_forward); - fabCamera.startAnimation(fab_open); - fabGallery.startAnimation(fab_open); - fabCustomGallery.startAnimation(fab_open); - fabCamera.show(); - fabGallery.show(); - fabCustomGallery.show(); + binding.fabPlus.startAnimation(rotate_forward); + binding.fabCamera.startAnimation(fab_open); + binding.fabGallery.startAnimation(fab_open); + binding.fabCustomGallery.startAnimation(fab_open); + binding.fabCamera.show(); + binding.fabGallery.show(); + binding.fabCustomGallery.show(); } this.isFabOpen = !isFabOpen; } @@ -377,7 +368,7 @@ public class ContributionsListFragment extends CommonsDaggerSupportFragment impl */ @Override public void showWelcomeTip(final boolean shouldShow) { - noContributionsYet.setVisibility(shouldShow ? VISIBLE : GONE); + binding.noContributionsYet.setVisibility(shouldShow ? VISIBLE : GONE); } /** @@ -387,12 +378,12 @@ public class ContributionsListFragment extends CommonsDaggerSupportFragment impl */ @Override public void showProgress(final boolean shouldShow) { - progressBar.setVisibility(shouldShow ? VISIBLE : GONE); + binding.loadingContributionsProgressBar.setVisibility(shouldShow ? VISIBLE : GONE); } @Override public void showNoContributionsUI(final boolean shouldShow) { - noContributionsYet.setVisibility(shouldShow ? VISIBLE : GONE); + binding.noContributionsYet.setVisibility(shouldShow ? VISIBLE : GONE); } @Override diff --git a/app/src/test/kotlin/fr/free/nrw/commons/contributions/ContributionsListFragmentUnitTests.kt b/app/src/test/kotlin/fr/free/nrw/commons/contributions/ContributionsListFragmentUnitTests.kt index 7d50e083e..936b0fd94 100644 --- a/app/src/test/kotlin/fr/free/nrw/commons/contributions/ContributionsListFragmentUnitTests.kt +++ b/app/src/test/kotlin/fr/free/nrw/commons/contributions/ContributionsListFragmentUnitTests.kt @@ -1,18 +1,11 @@ package fr.free.nrw.commons.contributions -import android.content.Context import android.content.res.Configuration -import android.os.Bundle import android.os.Looper -import android.view.LayoutInflater -import android.widget.LinearLayout -import android.widget.ProgressBar -import android.widget.TextView -import androidx.fragment.app.FragmentManager -import androidx.fragment.app.FragmentTransaction -import androidx.recyclerview.widget.GridLayoutManager -import androidx.recyclerview.widget.RecyclerView -import androidx.test.core.app.ApplicationProvider +import androidx.fragment.app.testing.FragmentScenario +import androidx.fragment.app.testing.launchFragmentInContainer +import androidx.lifecycle.Lifecycle +import androidx.test.ext.junit.runners.AndroidJUnit4 import com.google.android.material.floatingactionbutton.FloatingActionButton import fr.free.nrw.commons.Media import fr.free.nrw.commons.TestAppAdapter @@ -23,113 +16,48 @@ import org.junit.Before import org.junit.Test import org.junit.runner.RunWith import org.mockito.ArgumentMatchers.anyInt -import org.mockito.Mock import org.mockito.Mockito.verify import org.mockito.Mockito.`when` -import org.mockito.MockitoAnnotations -import org.powermock.reflect.Whitebox -import org.robolectric.Robolectric -import org.robolectric.RobolectricTestRunner import org.robolectric.Shadows import org.robolectric.annotation.Config import org.robolectric.annotation.LooperMode import org.wikipedia.AppAdapter import java.lang.reflect.Method +import fr.free.nrw.commons.R +import org.mockito.Mockito.mock -@RunWith(RobolectricTestRunner::class) +@RunWith(AndroidJUnit4::class) @Config(sdk = [21], application = TestCommonsApplication::class) @LooperMode(LooperMode.Mode.PAUSED) class ContributionsListFragmentUnitTests { - private lateinit var activity: MainActivity + private lateinit var scenario: FragmentScenario private lateinit var fragment: ContributionsListFragment - private lateinit var context: Context - private lateinit var layoutInflater: LayoutInflater - @Mock - private lateinit var savedInstanceState: Bundle - - @Mock - private lateinit var rvContributionsList: RecyclerView - - @Mock - private lateinit var adapter: ContributionsListAdapter - - @Mock - private lateinit var contribution: Contribution - - @Mock - private lateinit var media: Media - - @Mock - private lateinit var wikidataPlace: WikidataPlace - - @Mock - private lateinit var callback: ContributionsListFragment.Callback - - @Mock - private lateinit var layoutManager: RecyclerView.LayoutManager - - @Mock - private lateinit var gridLayoutManager: GridLayoutManager - - @Mock - private lateinit var noContributionsYet: TextView - - @Mock - private lateinit var progressBar: ProgressBar - - @Mock - private lateinit var fabPlus: FloatingActionButton - - @Mock - private lateinit var fabCamera: FloatingActionButton - - @Mock - private lateinit var fabGallery: FloatingActionButton - - @Mock - private lateinit var fabCustomGallery: FloatingActionButton - - @Mock - private lateinit var newConfig: Configuration - - @Mock - private lateinit var fabLayout: LinearLayout - - @Mock - private lateinit var contributionsListPresenter: ContributionsListPresenter + private val adapter: ContributionsListAdapter = mock() + private val contribution: Contribution = mock() + private val media: Media = mock() + private val wikidataPlace: WikidataPlace = mock() @Before fun setUp() { - MockitoAnnotations.initMocks(this) AppAdapter.set(TestAppAdapter()) - context = ApplicationProvider.getApplicationContext() - activity = Robolectric.buildActivity(MainActivity::class.java).create().get() - layoutInflater = LayoutInflater.from(activity) + scenario = launchFragmentInContainer( + initialState = Lifecycle.State.RESUMED, + themeResId = R.style.LightAppTheme + ) { + ContributionsListFragment().apply { + contributionsListPresenter = mock() + callback = mock() + }.also { + fragment = it + } + } - fragment = ContributionsListFragment() - val fragmentManager: FragmentManager = activity.supportFragmentManager - val fragmentTransaction: FragmentTransaction = fragmentManager.beginTransaction() - fragmentTransaction.add(fragment, null) - fragmentTransaction.commit() - - Whitebox.setInternalState(fragment, "rvContributionsList", rvContributionsList) - Whitebox.setInternalState(fragment, "adapter", adapter) - Whitebox.setInternalState(fragment, "callback", callback) - Whitebox.setInternalState(fragment, "noContributionsYet", noContributionsYet) - Whitebox.setInternalState(fragment, "progressBar", progressBar) - Whitebox.setInternalState(fragment, "fabPlus", fabPlus) - Whitebox.setInternalState(fragment, "fabCamera", fabCamera) - Whitebox.setInternalState(fragment, "fabGallery", fabGallery) - Whitebox.setInternalState(fragment, "fabCustomGallery", fabCustomGallery) - Whitebox.setInternalState(fragment, "fab_layout", fabLayout) - Whitebox.setInternalState( - fragment, - "contributionsListPresenter", - contributionsListPresenter - ) + scenario.onFragment { + it.adapter = adapter + } } @Test @@ -139,13 +67,6 @@ class ContributionsListFragmentUnitTests { Assert.assertNotNull(fragment) } - @Test - @Throws(Exception::class) - fun testOnCreateView() { - Shadows.shadowOf(Looper.getMainLooper()).idle() - fragment.onCreateView(layoutInflater, null, savedInstanceState) - } - @Test @Throws(Exception::class) fun testOnDetach() { @@ -165,8 +86,9 @@ class ContributionsListFragmentUnitTests { @Throws(Exception::class) fun testOnScrollToTop() { Shadows.shadowOf(Looper.getMainLooper()).idle() + fragment.rvContributionsList = mock() fragment.scrollToTop() - verify(rvContributionsList).smoothScrollToPosition(0) + verify(fragment.rvContributionsList).smoothScrollToPosition(0) } @Test @@ -261,16 +183,14 @@ class ContributionsListFragmentUnitTests { @Throws(Exception::class) fun testOnViewStateRestored() { Shadows.shadowOf(Looper.getMainLooper()).idle() - `when`(rvContributionsList.layoutManager).thenReturn(layoutManager) - fragment.onViewStateRestored(savedInstanceState) + fragment.onViewStateRestored(mock()) } @Test @Throws(Exception::class) fun testOnSaveInstanceState() { Shadows.shadowOf(Looper.getMainLooper()).idle() - `when`(rvContributionsList.layoutManager).thenReturn(gridLayoutManager) - fragment.onSaveInstanceState(savedInstanceState) + fragment.onSaveInstanceState(mock()) } @Test @@ -298,7 +218,9 @@ class ContributionsListFragmentUnitTests { @Throws(Exception::class) fun testAnimateFAB() { Shadows.shadowOf(Looper.getMainLooper()).idle() - `when`(fabPlus.isShown).thenReturn(false) + scenario.onFragment { + it.requireView().findViewById(R.id.fab_plus).hide() + } val method: Method = ContributionsListFragment::class.java.getDeclaredMethod( "animateFAB", Boolean::class.java @@ -311,7 +233,9 @@ class ContributionsListFragmentUnitTests { @Throws(Exception::class) fun testAnimateFABCaseShownAndOpen() { Shadows.shadowOf(Looper.getMainLooper()).idle() - `when`(fabPlus.isShown).thenReturn(true) + scenario.onFragment { + it.requireView().findViewById(R.id.fab_plus).show() + } val method: Method = ContributionsListFragment::class.java.getDeclaredMethod( "animateFAB", Boolean::class.java @@ -324,7 +248,9 @@ class ContributionsListFragmentUnitTests { @Throws(Exception::class) fun testAnimateFABCaseShownAndClose() { Shadows.shadowOf(Looper.getMainLooper()).idle() - `when`(fabPlus.isShown).thenReturn(true) + scenario.onFragment { + it.requireView().findViewById(R.id.fab_plus).show() + } val method: Method = ContributionsListFragment::class.java.getDeclaredMethod( "animateFAB", Boolean::class.java @@ -359,8 +285,8 @@ class ContributionsListFragmentUnitTests { @Throws(Exception::class) fun testOnConfigurationChanged() { Shadows.shadowOf(Looper.getMainLooper()).idle() + val newConfig: Configuration = mock() newConfig.orientation = Configuration.ORIENTATION_LANDSCAPE fragment.onConfigurationChanged(newConfig) } - } \ No newline at end of file diff --git a/data-client/build.gradle b/data-client/build.gradle index e8c732dc5..3b2a33cd1 100644 --- a/data-client/build.gradle +++ b/data-client/build.gradle @@ -78,7 +78,6 @@ dependencies { implementation "io.reactivex.rxjava2:rxjava:2.2.3" implementation "io.reactivex.rxjava2:rxandroid:2.1.0" implementation 'org.apache.commons:commons-lang3:3.8.1' - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' @@ -88,6 +87,15 @@ dependencies { testImplementation 'org.hamcrest:hamcrest-junit:2.0.0.0' testImplementation "com.squareup.okhttp3:mockwebserver:4.10.0" testImplementation "commons-io:commons-io:2.6" + + constraints { + implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.0") { + because("kotlin-stdlib-jdk7 is now a part of kotlin-stdlib") + } + implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.0") { + because("kotlin-stdlib-jdk8 is now a part of kotlin-stdlib") + } + } } repositories { From 5df18fb4a6f7c105b3a7d14526c08a0d1dd8f9ad Mon Sep 17 00:00:00 2001 From: Kanahia <114223204+kanahia1@users.noreply.github.com> Date: Sun, 24 Dec 2023 16:40:39 +0530 Subject: [PATCH 036/693] Replaced Mapbox with osmdroid (Nearby activity) (#5403) * Fixed Grey empty screen at Upload wizard caption step after denying files permission * Empty commit * Fixed loop issue * Created docs for earlier commits * Fixed javadoc * Fixed spaces * Added added basic features to OSM Maps * Added search location feature * Added filter to Open Street Maps * Fixed chipGroup in Open Street Maps * Removed mapBox code * Removed mapBox's code * Reformat code * Reformatted code * Removed rotation feature to map * Removed rotation files and Fixed Marker click problem * Ignored failing tests --- .idea/codeStyles/Project.xml | 2 - app/build.gradle | 2 + .../NearbyParentFragmentContract.java | 63 +- .../fragments/NearbyParentFragment.java | 1411 +++++++++-------- .../NearbyParentFragmentPresenter.java | 248 +-- .../res/layout/fragment_nearby_parent.xml | 378 ++--- app/src/main/res/values/strings.xml | 2 +- .../NearbyParentFragmentPresenterTest.kt | 92 +- .../nearby/NearbyParentFragmentUnitTest.kt | 78 +- gradle.properties | 1 + 10 files changed, 1239 insertions(+), 1038 deletions(-) diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml index f6ced2b5c..5c297a65e 100644 --- a/.idea/codeStyles/Project.xml +++ b/.idea/codeStyles/Project.xml @@ -315,9 +315,7 @@ diff --git a/app/build.gradle b/app/build.gradle index 6a197c811..c309a52b2 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -161,6 +161,8 @@ dependencies { implementation("io.github.coordinates2country:coordinates2country-android:1.3") { exclude group: 'com.google.android', module: 'android' } + //OSMDroid + implementation ("org.osmdroid:osmdroid-android:$OSMDROID_VERSION") constraints { implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.0") { because("kotlin-stdlib-jdk7 is now a part of kotlin-stdlib") diff --git a/app/src/main/java/fr/free/nrw/commons/nearby/contract/NearbyParentFragmentContract.java b/app/src/main/java/fr/free/nrw/commons/nearby/contract/NearbyParentFragmentContract.java index 1e071bd72..3b7a3d09f 100644 --- a/app/src/main/java/fr/free/nrw/commons/nearby/contract/NearbyParentFragmentContract.java +++ b/app/src/main/java/fr/free/nrw/commons/nearby/contract/NearbyParentFragmentContract.java @@ -1,57 +1,84 @@ package fr.free.nrw.commons.nearby.contract; import android.content.Context; - import androidx.annotation.Nullable; import com.mapbox.mapboxsdk.annotations.Marker; - -import fr.free.nrw.commons.location.LocationServiceManager.LocationChangeType; -import java.util.List; - import fr.free.nrw.commons.kvstore.JsonKvStore; import fr.free.nrw.commons.location.LatLng; +import fr.free.nrw.commons.location.LocationServiceManager.LocationChangeType; import fr.free.nrw.commons.nearby.Label; import fr.free.nrw.commons.nearby.NearbyBaseMarker; import fr.free.nrw.commons.nearby.Place; +import java.util.List; public interface NearbyParentFragmentContract { interface View { + boolean isNetworkConnectionEstablished(); + void listOptionMenuItemClicked(); + void populatePlaces(LatLng curlatLng); + void populatePlaces(LatLng curlatLng, String customQuery); + boolean isListBottomSheetExpanded(); + void checkPermissionsAndPerformAction(); + void displayLoginSkippedWarning(); + void setFABPlusAction(android.view.View.OnClickListener onClickListener); + void setFABRecenterAction(android.view.View.OnClickListener onClickListener); + void animateFABs(); + void recenterMap(LatLng curLatLng); + void showLocationOffDialog(); + void openLocationSettings(); + void hideBottomSheet(); + void hideBottomDetailsSheet(); + void displayBottomSheetWithInfo(Marker marker); - void addOnCameraMoveListener(); + void addSearchThisAreaButtonAction(); + void setSearchThisAreaButtonVisibility(boolean isVisible); + void setProgressBarVisibility(boolean isVisible); + void setTabItemContributions(); + boolean isDetailsBottomSheetVisible(); + void setBottomSheetDetailsSmaller(); - boolean isSearchThisAreaButtonVisible(); + void setRecyclerViewAdapterAllSelected(); + void setRecyclerViewAdapterItemsGreyedOut(); + void setCheckBoxAction(); + void setCheckBoxState(int state); + void setFilterState(); + void disableFABRecenter(); + void enableFABRecenter(); + void addCurrentLocationMarker(LatLng curLatLng); void updateMapToTrackPosition(LatLng curLatLng); + void clearAllMarkers(); + Context getContext(); void updateMapMarkers(List nearbyBaseMarkers, Marker selectedMarker); @@ -60,7 +87,9 @@ public interface NearbyParentFragmentContract { void displayAllMarkers(); - void filterMarkersByLabels(List

+ * Should be called only on creation of mapboxMap, there is other method to update markers + * location with users move. * - * Should be called only on creation of mapboxMap, there - * is other method to update markers location with users - * move. * @param curLatLng current location */ @Override public void addCurrentLocationMarker(final fr.free.nrw.commons.location.LatLng curLatLng) { if (null != curLatLng && !isPermissionDenied && locationManager.isGPSProviderEnabled()) { ExecutorUtils.get().submit(() -> { - mapView.post(() -> removeCurrentLocationMarker()); Timber.d("Adds current location marker"); - - final Icon icon = IconFactory.getInstance(getContext()) - .fromResource(R.drawable.current_location_marker); - - final MarkerOptions currentLocationMarkerOptions = new MarkerOptions() - .position(new LatLng(curLatLng.getLatitude(), - curLatLng.getLongitude())); - currentLocationMarkerOptions.setIcon(icon); // Set custom icon - mapView.post( - () -> currentLocationMarker = mapBox.addMarker(currentLocationMarkerOptions)); - - final List circle = UiUtils - .createCircleArray(curLatLng.getLatitude(), curLatLng.getLongitude(), - curLatLng.getAccuracy() * 2, 100); - - final PolygonOptions currentLocationPolygonOptions = new PolygonOptions() - .addAll(circle) - .strokeColor(getResources().getColor(R.color.current_marker_stroke)) - .fillColor(getResources().getColor(R.color.current_marker_fill)); - mapView.post( - () -> currentLocationPolygon = mapBox - .addPolygon(currentLocationPolygonOptions)); + recenterMarkerToPosition( + new GeoPoint(curLatLng.getLatitude(), curLatLng.getLongitude())); }); } else { Timber.d("not adding current location marker..current location is null"); } } - private void removeCurrentLocationMarker() { - if (currentLocationMarker != null && mapBox!=null) { - mapBox.removeMarker(currentLocationMarker); - if (currentLocationPolygon != null) { - mapBox.removePolygon(currentLocationPolygon); - } - } - } - - /** * Makes map camera follow users location with animation + * * @param curLatLng current location of user */ @Override public void updateMapToTrackPosition(final fr.free.nrw.commons.location.LatLng curLatLng) { Timber.d("Updates map camera to track user position"); - final CameraPosition cameraPosition; - if(isPermissionDenied){ - cameraPosition = new CameraPosition.Builder().target - (LocationUtils.commonsLatLngToMapBoxLatLng(curLatLng)).build(); - }else{ - cameraPosition = new CameraPosition.Builder().target - (LocationUtils.commonsLatLngToMapBoxLatLng(curLatLng)) - .zoom(ZOOM_LEVEL).build(); - } - if(null!=mapBox) { - mapBox.setCameraPosition(cameraPosition); - mapBox.animateCamera(CameraUpdateFactory - .newCameraPosition(cameraPosition), 1000); + if (null != mapView) { + recenterMap(curLatLng); } } @Override - public void updateMapMarkers(final List nearbyBaseMarkers, final Marker selectedMarker) { - if(mapBox!=null && isMapBoxReady){ - mapBox.clear(); - addNearbyMarkersToMapBoxMap(nearbyBaseMarkers, selectedMarker); + public void updateMapMarkers(final List nearbyBaseMarkers, + final Marker selectedMarker) { + if (mapView != null) { presenter.updateMapMarkersToController(nearbyBaseMarkers); - // Re-enable mapbox gestures on custom location markers load - mapBox.getUiSettings().setAllGesturesEnabled(true); } } @Override public void filterOutAllMarkers() { - hideAllMarkers(); + clearAllMarkers(); } /** @@ -1525,16 +1519,18 @@ public class NearbyParentFragment extends CommonsDaggerSupportFragment @Override public void displayAllMarkers() { for (final MarkerPlaceGroup markerPlaceGroup : NearbyController.markerLabelList) { - updateMarker(markerPlaceGroup.getIsBookmarked(), markerPlaceGroup.getPlace(), NearbyController.currentLocation); + updateMarker(markerPlaceGroup.getIsBookmarked(), markerPlaceGroup.getPlace(), + NearbyController.currentLocation); } } /** * Filters markers based on selectedLabels and chips - * @param selectedLabels label list that user clicked - * @param displayExists chip for displaying only existing places - * @param displayNeedsPhoto chip for displaying only places need photos - * @param filterForPlaceState true if we filter places for place state + * + * @param selectedLabels label list that user clicked + * @param displayExists chip for displaying only existing places + * @param displayNeedsPhoto chip for displaying only places need photos + * @param filterForPlaceState true if we filter places for place state * @param filterForAllNoneType true if we filter places with all none button */ @Override @@ -1544,20 +1540,16 @@ public class NearbyParentFragment extends CommonsDaggerSupportFragment final boolean displayWlm, final boolean filterForPlaceState, final boolean filterForAllNoneType) { - // Remove the previous markers before updating them - hideAllMarkers(); - - filteredMarkers = new ArrayList<>(); - + clearAllMarkers(); for (final MarkerPlaceGroup markerPlaceGroup : NearbyController.markerLabelList) { final Place place = markerPlaceGroup.getPlace(); - // When label filter is engaged // then compare it against place's label if (selectedLabels != null && (selectedLabels.size() != 0 || !filterForPlaceState) && (!selectedLabels.contains(place.getLabel()) - && !(selectedLabels.contains(Label.BOOKMARKS) && markerPlaceGroup.getIsBookmarked()))) { + && !(selectedLabels.contains(Label.BOOKMARKS) + && markerPlaceGroup.getIsBookmarked()))) { continue; } @@ -1565,93 +1557,67 @@ public class NearbyParentFragment extends CommonsDaggerSupportFragment continue; } - boolean shouldUpdateMarker=false; + boolean shouldUpdateMarker = false; if (displayWlm && place.isMonument()) { - shouldUpdateMarker=true; - } - else if (displayExists && displayNeedsPhoto) { + shouldUpdateMarker = true; + } else if (displayExists && displayNeedsPhoto) { // Exists and needs photo if (place.exists && place.pic.trim().isEmpty()) { - shouldUpdateMarker=true; + shouldUpdateMarker = true; } } else if (displayExists && !displayNeedsPhoto) { // Exists and all included needs and doesn't needs photo if (place.exists) { - shouldUpdateMarker=true; + shouldUpdateMarker = true; } } else if (!displayExists && displayNeedsPhoto) { // All and only needs photo if (place.pic.trim().isEmpty()) { - shouldUpdateMarker=true; + shouldUpdateMarker = true; } } else if (!displayExists && !displayNeedsPhoto) { // all - shouldUpdateMarker=true; + shouldUpdateMarker = true; } - if(shouldUpdateMarker){ - updateMarker(markerPlaceGroup.getIsBookmarked(), place, NearbyController.currentLocation); + if (shouldUpdateMarker) { + updateMarker(markerPlaceGroup.getIsBookmarked(), place, + NearbyController.currentLocation); } } - - mapBox.clear(); - mapBox.addMarkers(filteredMarkers); + if (selectedLabels == null || selectedLabels.size() == 0) { + ArrayList markerArrayList = new ArrayList<>(); + for (final MarkerPlaceGroup markerPlaceGroup : NearbyController.markerLabelList) { + NearbyBaseMarker nearbyBaseMarker = new NearbyBaseMarker(); + nearbyBaseMarker.place(markerPlaceGroup.getPlace()); + markerArrayList.add(nearbyBaseMarker); + } + addMarkersToMap(markerArrayList, null); + } } @Override public fr.free.nrw.commons.location.LatLng getCameraTarget() { - return mapBox==null?null:LocationUtils.mapBoxLatLngToCommonsLatLng(mapBox.getCameraPosition().target); + return mapView == null ? null : getMapFocus(); } /** * Sets marker icon according to marker status. Sets title and distance. + * * @param isBookmarked true if place is bookmarked * @param place - * @param curLatLng current location + * @param curLatLng current location */ - public void updateMarker(final boolean isBookmarked, final Place place, @Nullable final fr.free.nrw.commons.location.LatLng curLatLng) { - VectorDrawableCompat vectorDrawable = VectorDrawableCompat.create( - getContext().getResources(), getIconFor(place, isBookmarked), getContext().getTheme()); - - if(curLatLng != null) { - for (NearbyBaseMarker nearbyMarker : allMarkers) { - if (nearbyMarker.getMarker().getTitle() != null && nearbyMarker.getMarker().getTitle().equals(place.getName())) { - - final Bitmap icon = UiUtils.getBitmap(vectorDrawable); - - final String distance = formatDistanceBetween(curLatLng, place.location); - place.setDistance(distance); - - final NearbyBaseMarker nearbyBaseMarker = new NearbyBaseMarker(); - nearbyBaseMarker.title(place.name); - nearbyBaseMarker.position( - new com.mapbox.mapboxsdk.geometry.LatLng( - place.location.getLatitude(), - place.location.getLongitude())); - nearbyBaseMarker.place(place); - nearbyBaseMarker.icon(IconFactory.getInstance(getContext()) - .fromBitmap(icon)); - nearbyMarker.setIcon(IconFactory.getInstance(getContext()).fromBitmap(icon)); - filteredMarkers.add(nearbyBaseMarker); - } - } - } else { - for (Marker marker : mapBox.getMarkers()) { - if (marker.getTitle() != null && marker.getTitle().equals(place.getName())) { - - final Bitmap icon = UiUtils.getBitmap(vectorDrawable); - marker.setIcon(IconFactory.getInstance(getContext()).fromBitmap(icon)); - } - } - } + public void updateMarker(final boolean isBookmarked, final Place place, + @Nullable final fr.free.nrw.commons.location.LatLng curLatLng) { + addMarkerToMap(place, isBookmarked); } private @DrawableRes int getIconFor(Place place, Boolean isBookmarked) { - if(place.isMonument()){ + if (place.isMonument()) { return R.drawable.ic_custom_map_marker_monuments; - } - else if (!place.pic.trim().isEmpty()) { + } else if (!place.pic.trim().isEmpty()) { return (isBookmarked ? R.drawable.ic_custom_map_marker_green_bookmarked : R.drawable.ic_custom_map_marker_green); @@ -1667,46 +1633,103 @@ public class NearbyParentFragment extends CommonsDaggerSupportFragment } /** - * Removes all markers except current location marker, an icon has been used - * but it is transparent more than grey(as the name of the icon might suggest) - * since grey icon may lead the users to believe that it is disabled or prohibited contribution + * Adds a marker representing a place to the map with optional bookmark icon. + * + * @param place The Place object containing information about the location. + * @param isBookMarked A Boolean flag indicating whether the place is bookmarked or not. */ - private void hideAllMarkers() { - final VectorDrawableCompat vectorDrawable; - vectorDrawable = VectorDrawableCompat.create( - getContext().getResources(), R.drawable.ic_custom_greyed_out_marker, getContext().getTheme()); - final Bitmap icon = UiUtils.getBitmap(vectorDrawable); - for (final Marker marker : mapBox.getMarkers()) { - if (!marker.equals(currentLocationMarker)) { - marker.setIcon(IconFactory.getInstance(getContext()).fromBitmap(icon)); - } - } - addCurrentLocationMarker(NearbyController.currentLocation); + private void addMarkerToMap(Place place, Boolean isBookMarked) { + ArrayList items = new ArrayList<>(); + Drawable icon = ContextCompat.getDrawable(getContext(), getIconFor(place, isBookMarked)); + GeoPoint point = new GeoPoint(place.location.getLatitude(), place.location.getLongitude()); + OverlayItem item = new OverlayItem(place.name, null, point); + item.setMarker(icon); + items.add(item); + ItemizedOverlayWithFocus overlay = new ItemizedOverlayWithFocus(items, + new OnItemGestureListener() { + @Override + public boolean onItemSingleTapUp(int index, OverlayItem item) { + passInfoToSheet(place); + hideBottomSheet(); + if (clickedMarkerPlace != null) { + removeMarker(clickedMarkerPlace); + addMarkerToMap(clickedMarkerPlace,isClickedMarkerBookmarked); + } + clickedMarkerPlace = place; + isClickedMarkerBookmarked = isBookMarked ; + bottomSheetDetailsBehavior.setState(BottomSheetBehavior.STATE_COLLAPSED); + return true; + } + + @Override + public boolean onItemLongPress(int index, OverlayItem item) { + return false; + } + }, getContext()); + + overlay.setFocusItemsOnTap(true); + mapView.getOverlays().add(overlay); // Add the overlay to the map } - private void addNearbyMarkersToMapBoxMap(final List nearbyBaseMarkers, final Marker selectedMarker) { - if (isMapBoxReady && mapBox != null) { - allMarkers = new ArrayList<>(nearbyBaseMarkers); - mapBox.addMarkers(nearbyBaseMarkers); - setMapMarkerActions(selectedMarker); - presenter.updateMapMarkersToController(nearbyBaseMarkers); + /** + * Adds multiple markers representing places to the map and handles item gestures. + * + * @param nearbyBaseMarkers The list of Place objects containing information about the + * locations. + */ + private void addMarkersToMap(List nearbyBaseMarkers, + final Marker selectedMarker) { + ArrayList items = new ArrayList<>(); + for (int i = 0; i < nearbyBaseMarkers.size(); i++) { + Drawable icon = ContextCompat.getDrawable(getContext(), + getIconFor(nearbyBaseMarkers.get(i).getPlace(), false)); + GeoPoint point = new GeoPoint( + nearbyBaseMarkers.get(i).getPlace().location.getLatitude(), + nearbyBaseMarkers.get(i).getPlace().location.getLongitude()); + OverlayItem item = new OverlayItem(nearbyBaseMarkers.get(i).getPlace().name, null, + point); + item.setMarker(icon); + items.add(item); } + ItemizedOverlayWithFocus overlay = new ItemizedOverlayWithFocus(items, + new OnItemGestureListener() { + @Override + public boolean onItemSingleTapUp(int index, OverlayItem item) { + final Place place = nearbyBaseMarkers.get(index).getPlace(); + passInfoToSheet(place); + hideBottomSheet(); + if (clickedMarkerPlace != null) { + removeMarker(clickedMarkerPlace); + addMarkerToMap(clickedMarkerPlace,isClickedMarkerBookmarked); + } + clickedMarkerPlace = place ; + isClickedMarkerBookmarked = false ; + bottomSheetDetailsBehavior.setState(BottomSheetBehavior.STATE_COLLAPSED); + return true; + } + + @Override + public boolean onItemLongPress(int index, OverlayItem item) { + return false; + } + }, getContext()); + overlay.setFocusItemsOnTap(true); + mapView.getOverlays().add(overlay); } - private void setMapMarkerActions(final Marker selectedMarker) { - if (mapBox != null) { - mapBox.setOnInfoWindowCloseListener(marker -> { - if (marker == selectedMarker) { - presenter.markerUnselected(); + private void removeMarker(Place place){ + List overlays = mapView.getOverlays(); + for (int i = 0; i < overlays.size();i++){ + if (overlays.get(i) instanceof ItemizedOverlayWithFocus){ + ItemizedOverlayWithFocus item = (ItemizedOverlayWithFocus)overlays.get(i); + OverlayItem overlayItem = item.getItem(0); + fr.free.nrw.commons.location.LatLng diffLatLang = new fr.free.nrw.commons.location.LatLng(overlayItem.getPoint().getLatitude(),overlayItem.getPoint().getLongitude(),100); + if (place.location.getLatitude() == overlayItem.getPoint().getLatitude() && place.location.getLongitude() == overlayItem.getPoint().getLongitude()){ + mapView.getOverlays().remove(i); + mapView.invalidate(); + break; } - }); - - mapBox.setOnMarkerClickListener(marker -> { - if (marker instanceof NearbyMarker) { - presenter.markerSelected(marker); - } - return false; - }); + } } } @@ -1715,45 +1738,44 @@ public class NearbyParentFragment extends CommonsDaggerSupportFragment if (isPermissionDenied || curLatLng == null) { recenterToUserLocation = true; checkPermissionsAndPerformAction(); - if (!isPermissionDenied && !(locationManager.isNetworkProviderEnabled() || locationManager.isGPSProviderEnabled())) { + if (!isPermissionDenied && !(locationManager.isNetworkProviderEnabled() + || locationManager.isGPSProviderEnabled())) { showLocationOffDialog(); } return; } addCurrentLocationMarker(curLatLng); - final CameraPosition position; - - if (ViewUtil.isPortrait(getActivity())) { - position = new CameraPosition.Builder() - .target(isListBottomSheetExpanded() ? - new LatLng(curLatLng.getLatitude() - CAMERA_TARGET_SHIFT_FACTOR_PORTRAIT, - curLatLng.getLongitude()) - : new LatLng(curLatLng.getLatitude(), curLatLng.getLongitude(), 0)) // Sets the new camera position - .zoom(isListBottomSheetExpanded() ? - ZOOM_LEVEL - : mapBox.getCameraPosition().zoom) // Same zoom level - .build(); - } else { - position = new CameraPosition.Builder() - .target(isListBottomSheetExpanded() ? - new LatLng(curLatLng.getLatitude() - CAMERA_TARGET_SHIFT_FACTOR_LANDSCAPE, - curLatLng.getLongitude()) - : new LatLng(curLatLng.getLatitude(), curLatLng.getLongitude(), 0)) // Sets the new camera position - .zoom(isListBottomSheetExpanded() ? - ZOOM_LEVEL - : mapBox.getCameraPosition().zoom) // Same zoom level - .build(); + mapView.getController() + .animateTo(new GeoPoint(curLatLng.getLatitude(), curLatLng.getLongitude())); + if (lastMapFocus != null) { + Location mylocation = new Location(""); + Location dest_location = new Location(""); + dest_location.setLatitude(mapView.getMapCenter().getLatitude()); + dest_location.setLongitude(mapView.getMapCenter().getLongitude()); + mylocation.setLatitude(lastMapFocus.getLatitude()); + mylocation.setLongitude(lastMapFocus.getLongitude()); + Float distance = mylocation.distanceTo(dest_location);//in meters + if (lastMapFocus != null) { + if (isNetworkConnectionEstablished()) { + if (distance > 2000.0) { + setSearchThisAreaButtonVisibility(true); + } else { + setSearchThisAreaButtonVisibility(false); + } + } + } else { + setSearchThisAreaButtonVisibility(false); + } } - - mapBox.animateCamera(CameraUpdateFactory.newCameraPosition(position), 1000); } @Override public void showLocationOffDialog() { // This creates a dialog box that prompts the user to enable location DialogUtil - .showAlertDialog(getActivity(), getString(R.string.ask_to_turn_location_on), getString(R.string.nearby_needs_location), - getString(R.string.yes), getString(R.string.no), this::openLocationSettings, null); + .showAlertDialog(getActivity(), getString(R.string.ask_to_turn_location_on), + getString(R.string.nearby_needs_location), + getString(R.string.yes), getString(R.string.no), this::openLocationSettings, null); } @Override @@ -1762,11 +1784,13 @@ public class NearbyParentFragment extends CommonsDaggerSupportFragment final Intent intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS); final PackageManager packageManager = getActivity().getPackageManager(); - if (intent.resolveActivity(packageManager)!= null) { + if (intent.resolveActivity(packageManager) != null) { startActivity(intent); - Toast.makeText(getContext(), R.string.recommend_high_accuracy_mode, Toast.LENGTH_LONG).show(); + Toast.makeText(getContext(), R.string.recommend_high_accuracy_mode, Toast.LENGTH_LONG) + .show(); } else { - Toast.makeText(getContext(), R.string.cannot_open_location_settings, Toast.LENGTH_LONG).show(); + Toast.makeText(getContext(), R.string.cannot_open_location_settings, Toast.LENGTH_LONG) + .show(); } } @@ -1790,15 +1814,11 @@ public class NearbyParentFragment extends CommonsDaggerSupportFragment bottomSheetDetailsBehavior.setState(BottomSheetBehavior.STATE_COLLAPSED); } - @Override - public void addOnCameraMoveListener() { - mapBox.addOnCameraMoveListener(cameraMoveListener); - } - /** - * If nearby details bottom sheet state is collapsed: show fab plus - * If nearby details bottom sheet state is expanded: show fab plus - * If nearby details bottom sheet state is hidden: hide all fabs + * If nearby details bottom sheet state is collapsed: show fab plus If nearby details bottom + * sheet state is expanded: show fab plus If nearby details bottom sheet state is hidden: hide + * all fabs + * * @param bottomSheetState see bottom sheet states */ public void prepareViewsForSheetPosition(final int bottomSheetState) { @@ -1811,9 +1831,6 @@ public class NearbyParentFragment extends CommonsDaggerSupportFragment } break; case (BottomSheetBehavior.STATE_HIDDEN): - if (null != mapBox) { - mapBox.deselectMarkers(); - } transparentView.setClickable(false); transparentView.setAlpha(0); collapseFABs(isFABsExpanded); @@ -1825,6 +1842,7 @@ public class NearbyParentFragment extends CommonsDaggerSupportFragment /** * Same bottom sheet carries information for all nearby places, so we need to pass information * (title, description, distance and links) to view on nearby marker click + * * @param place Place of clicked nearby marker */ private void passInfoToSheet(final Place place) { @@ -1835,19 +1853,23 @@ public class NearbyParentFragment extends CommonsDaggerSupportFragment final boolean isBookmarked = bookmarkLocationDao.updateBookmarkLocation(selectedPlace); updateBookmarkButtonImage(selectedPlace); updateMarker(isBookmarked, selectedPlace, locationManager.getLastLocation()); + mapView.invalidate(); }); - wikipediaButton.setVisibility(place.hasWikipediaLink()?View.VISIBLE:View.GONE); - wikipediaButton.setOnClickListener(view -> Utils.handleWebUrl(getContext(), selectedPlace.siteLinks.getWikipediaLink())); + wikipediaButton.setVisibility(place.hasWikipediaLink() ? View.VISIBLE : View.GONE); + wikipediaButton.setOnClickListener( + view -> Utils.handleWebUrl(getContext(), selectedPlace.siteLinks.getWikipediaLink())); - wikidataButton.setVisibility(place.hasWikidataLink()?View.VISIBLE:View.GONE); - wikidataButton.setOnClickListener(view -> Utils.handleWebUrl(getContext(), selectedPlace.siteLinks.getWikidataLink())); + wikidataButton.setVisibility(place.hasWikidataLink() ? View.VISIBLE : View.GONE); + wikidataButton.setOnClickListener( + view -> Utils.handleWebUrl(getContext(), selectedPlace.siteLinks.getWikidataLink())); directionsButton.setOnClickListener(view -> Utils.handleGeoCoordinates(getActivity(), selectedPlace.getLocation())); - commonsButton.setVisibility(selectedPlace.hasCommonsLink()?View.VISIBLE:View.GONE); - commonsButton.setOnClickListener(view -> Utils.handleWebUrl(getContext(), selectedPlace.siteLinks.getCommonsLink())); + commonsButton.setVisibility(selectedPlace.hasCommonsLink() ? View.VISIBLE : View.GONE); + commonsButton.setOnClickListener( + view -> Utils.handleWebUrl(getContext(), selectedPlace.siteLinks.getCommonsLink())); icon.setImageResource(selectedPlace.getLabel().getIcon()); @@ -1855,8 +1877,9 @@ public class NearbyParentFragment extends CommonsDaggerSupportFragment distance.setText(selectedPlace.distance); // Remove label since it is double information String descriptionText = selectedPlace.getLongDescription() - .replace(selectedPlace.getName() + " (",""); - descriptionText = (descriptionText.equals(selectedPlace.getLongDescription()) ? descriptionText : descriptionText.replaceFirst(".$","")); + .replace(selectedPlace.getName() + " (", ""); + descriptionText = (descriptionText.equals(selectedPlace.getLongDescription()) + ? descriptionText : descriptionText.replaceFirst(".$", "")); // Set the short description after we remove place name from long description description.setText(descriptionText); @@ -1910,7 +1933,7 @@ public class NearbyParentFragment extends CommonsDaggerSupportFragment @Override public void onWikidataEditSuccessful() { - if (mapBox != null && presenter != null && locationManager != null) { + if (presenter != null && locationManager != null) { presenter.updateMapAndList(MAP_UPDATED); } } @@ -1930,7 +1953,7 @@ public class NearbyParentFragment extends CommonsDaggerSupportFragment locationManager.registerLocationManager(); Timber.d("Location service manager added and registered"); } - }catch (final Exception e){ + } catch (final Exception e) { Timber.e(e); //Broadcasts are tricky, should be catchedonR } @@ -1939,7 +1962,7 @@ public class NearbyParentFragment extends CommonsDaggerSupportFragment @Override public void setUserVisibleHint(final boolean isVisibleToUser) { super.setUserVisibleHint(isVisibleToUser); - this.isVisibleToUser=isVisibleToUser; + this.isVisibleToUser = isVisibleToUser; if (isResumed() && isVisibleToUser) { startTheMap(); } else { @@ -1954,15 +1977,134 @@ public class NearbyParentFragment extends CommonsDaggerSupportFragment } private void startTheMap() { - mapView.onStart(); performMapReadyActions(); } - public interface NearbyParentFragmentInstanceReadyCallback{ + /** + * Clears all markers from the map and resets certain map overlays and gestures. After clearing + * markers, it re-adds a scale bar overlay and rotation gesture overlay to the map. + */ + @Override + public void clearAllMarkers() { + mapView.getOverlayManager().clear(); + mapView.invalidate(); + GeoPoint geoPoint = mapCenter; + if (geoPoint != null) { + List overlays = mapView.getOverlays(); + ScaleDiskOverlay diskOverlay = + new ScaleDiskOverlay(this.getContext(), + geoPoint, 2000, GeoConstants.UnitOfMeasure.foot); + Paint circlePaint = new Paint(); + circlePaint.setColor(Color.rgb(128, 128, 128)); + circlePaint.setStyle(Paint.Style.STROKE); + circlePaint.setStrokeWidth(2f); + diskOverlay.setCirclePaint2(circlePaint); + Paint diskPaint = new Paint(); + diskPaint.setColor(Color.argb(40, 128, 128, 128)); + diskPaint.setStyle(Paint.Style.FILL_AND_STROKE); + diskOverlay.setCirclePaint1(diskPaint); + diskOverlay.setDisplaySizeMin(900); + diskOverlay.setDisplaySizeMax(1700); + mapView.getOverlays().add(diskOverlay); + org.osmdroid.views.overlay.Marker startMarker = new org.osmdroid.views.overlay.Marker( + mapView); + startMarker.setPosition(geoPoint); + startMarker.setAnchor(org.osmdroid.views.overlay.Marker.ANCHOR_CENTER, + org.osmdroid.views.overlay.Marker.ANCHOR_BOTTOM); + startMarker.setIcon( + ContextCompat.getDrawable(this.getContext(), R.drawable.current_location_marker)); + startMarker.setTitle("Your Location"); + startMarker.setTextLabelFontSize(24); + mapView.getOverlays().add(startMarker); + } + ScaleBarOverlay scaleBarOverlay = new ScaleBarOverlay(mapView); + scaleBarOverlay.setScaleBarOffset(15, 25); + Paint barPaint = new Paint(); + barPaint.setARGB(200, 255, 250, 250); + scaleBarOverlay.setBackgroundPaint(barPaint); + scaleBarOverlay.enableScaleBar(); + mapView.getOverlays().add(scaleBarOverlay); + mapView.getOverlays().add(new MapEventsOverlay(new MapEventsReceiver() { + @Override + public boolean singleTapConfirmedHelper(GeoPoint p) { + if (clickedMarkerPlace != null){ + removeMarker(clickedMarkerPlace); + addMarkerToMap(clickedMarkerPlace,isClickedMarkerBookmarked); + }else { + Timber.e("CLICKED MARKER IS NULL"); + } + if (isListBottomSheetExpanded()) { + // Back should first hide the bottom sheet if it is expanded + hideBottomSheet(); + } else if (isDetailsBottomSheetVisible()) { + hideBottomDetailsSheet(); + } + return true; + } + + @Override + public boolean longPressHelper(GeoPoint p) { + return false; + } + })); + mapView.setMultiTouchControls(true); + } + + /** + * Recenters the map to the Center and adds a scale disk overlay and a marker at the position. + * + * @param geoPoint The GeoPoint representing the new center position of the map. + */ + private void recenterMarkerToPosition(GeoPoint geoPoint) { + if (geoPoint != null) { + mapView.getController().setCenter(geoPoint); + List overlays = mapView.getOverlays(); + for (int i = 0; i < overlays.size(); i++) { + if (overlays.get(i) instanceof org.osmdroid.views.overlay.Marker) { + mapView.getOverlays().remove(i); + } else if (overlays.get(i) instanceof ScaleDiskOverlay) { + mapView.getOverlays().remove(i); + } + } + ScaleDiskOverlay diskOverlay = + new ScaleDiskOverlay(this.getContext(), + geoPoint, 2000, GeoConstants.UnitOfMeasure.foot); + Paint circlePaint = new Paint(); + circlePaint.setColor(Color.rgb(128, 128, 128)); + circlePaint.setStyle(Paint.Style.STROKE); + circlePaint.setStrokeWidth(2f); + diskOverlay.setCirclePaint2(circlePaint); + Paint diskPaint = new Paint(); + diskPaint.setColor(Color.argb(40, 128, 128, 128)); + diskPaint.setStyle(Paint.Style.FILL_AND_STROKE); + diskOverlay.setCirclePaint1(diskPaint); + diskOverlay.setDisplaySizeMin(900); + diskOverlay.setDisplaySizeMax(1700); + mapView.getOverlays().add(diskOverlay); + org.osmdroid.views.overlay.Marker startMarker = new org.osmdroid.views.overlay.Marker( + mapView); + startMarker.setPosition(geoPoint); + startMarker.setAnchor(org.osmdroid.views.overlay.Marker.ANCHOR_CENTER, + org.osmdroid.views.overlay.Marker.ANCHOR_BOTTOM); + startMarker.setIcon( + ContextCompat.getDrawable(this.getContext(), R.drawable.current_location_marker)); + startMarker.setTitle("Your Location"); + startMarker.setTextLabelFontSize(24); + mapView.getOverlays().add(startMarker); + } + } + + private void moveCameraToPosition(GeoPoint geoPoint) { + mapView.getController().animateTo(geoPoint); + } + + public interface NearbyParentFragmentInstanceReadyCallback { + void onReady(); } - public void setNearbyParentFragmentInstanceReadyCallback(NearbyParentFragmentInstanceReadyCallback nearbyParentFragmentInstanceReadyCallback) { + public void setNearbyParentFragmentInstanceReadyCallback( + NearbyParentFragmentInstanceReadyCallback nearbyParentFragmentInstanceReadyCallback) { this.nearbyParentFragmentInstanceReadyCallback = nearbyParentFragmentInstanceReadyCallback; } @@ -1970,9 +2112,10 @@ public class NearbyParentFragment extends CommonsDaggerSupportFragment public void onConfigurationChanged(@NonNull final Configuration newConfig) { super.onConfigurationChanged(newConfig); ViewGroup.LayoutParams rlBottomSheetLayoutParams = rlBottomSheet.getLayoutParams(); - rlBottomSheetLayoutParams.height = getActivity().getWindowManager().getDefaultDisplay().getHeight() / 16 * 9; + rlBottomSheetLayoutParams.height = + getActivity().getWindowManager().getDefaultDisplay().getHeight() / 16 * 9; rlBottomSheet.setLayoutParams(rlBottomSheetLayoutParams); - } + } @OnClick(R.id.tv_learn_more) public void onLearnMoreClicked() { diff --git a/app/src/main/java/fr/free/nrw/commons/nearby/presenter/NearbyParentFragmentPresenter.java b/app/src/main/java/fr/free/nrw/commons/nearby/presenter/NearbyParentFragmentPresenter.java index 4019aa9fc..d7f2919a5 100644 --- a/app/src/main/java/fr/free/nrw/commons/nearby/presenter/NearbyParentFragmentPresenter.java +++ b/app/src/main/java/fr/free/nrw/commons/nearby/presenter/NearbyParentFragmentPresenter.java @@ -1,31 +1,5 @@ package fr.free.nrw.commons.nearby.presenter; -import android.view.View; - -import androidx.annotation.MainThread; -import androidx.annotation.Nullable; -import com.mapbox.mapboxsdk.annotations.Marker; - -import fr.free.nrw.commons.location.LocationServiceManager.LocationChangeType; -import java.lang.reflect.Proxy; -import java.util.HashMap; -import java.util.List; - -import fr.free.nrw.commons.bookmarks.locations.BookmarkLocationsDao; -import fr.free.nrw.commons.kvstore.JsonKvStore; -import fr.free.nrw.commons.location.LatLng; -import fr.free.nrw.commons.location.LocationUpdateListener; -import fr.free.nrw.commons.nearby.CheckBoxTriStates; -import fr.free.nrw.commons.nearby.Label; -import fr.free.nrw.commons.nearby.MarkerPlaceGroup; -import fr.free.nrw.commons.nearby.NearbyBaseMarker; -import fr.free.nrw.commons.nearby.NearbyController; -import fr.free.nrw.commons.nearby.NearbyFilterState; -import fr.free.nrw.commons.nearby.contract.NearbyParentFragmentContract; -import fr.free.nrw.commons.utils.LocationUtils; -import fr.free.nrw.commons.wikidata.WikidataEditListener; -import timber.log.Timber; - import static fr.free.nrw.commons.location.LocationServiceManager.LocationChangeType.CUSTOM_QUERY; import static fr.free.nrw.commons.location.LocationServiceManager.LocationChangeType.LOCATION_SIGNIFICANTLY_CHANGED; import static fr.free.nrw.commons.location.LocationServiceManager.LocationChangeType.LOCATION_SLIGHTLY_CHANGED; @@ -36,10 +10,34 @@ import static fr.free.nrw.commons.nearby.CheckBoxTriStates.UNCHECKED; import static fr.free.nrw.commons.nearby.CheckBoxTriStates.UNKNOWN; import static fr.free.nrw.commons.wikidata.WikidataConstants.PLACE_OBJECT; +import android.location.Location; +import android.view.View; +import androidx.annotation.MainThread; +import androidx.annotation.Nullable; +import com.mapbox.mapboxsdk.annotations.Marker; +import fr.free.nrw.commons.bookmarks.locations.BookmarkLocationsDao; +import fr.free.nrw.commons.kvstore.JsonKvStore; +import fr.free.nrw.commons.location.LatLng; +import fr.free.nrw.commons.location.LocationServiceManager.LocationChangeType; +import fr.free.nrw.commons.location.LocationUpdateListener; +import fr.free.nrw.commons.nearby.CheckBoxTriStates; +import fr.free.nrw.commons.nearby.Label; +import fr.free.nrw.commons.nearby.MarkerPlaceGroup; +import fr.free.nrw.commons.nearby.NearbyBaseMarker; +import fr.free.nrw.commons.nearby.NearbyController; +import fr.free.nrw.commons.nearby.NearbyFilterState; +import fr.free.nrw.commons.nearby.contract.NearbyParentFragmentContract; +import fr.free.nrw.commons.utils.LocationUtils; +import fr.free.nrw.commons.wikidata.WikidataEditListener; +import java.lang.reflect.Proxy; +import java.util.HashMap; +import java.util.List; +import timber.log.Timber; + public class NearbyParentFragmentPresenter - implements NearbyParentFragmentContract.UserActions, - WikidataEditListener.WikidataP18EditListener, - LocationUpdateListener { + implements NearbyParentFragmentContract.UserActions, + WikidataEditListener.WikidataP18EditListener, + LocationUpdateListener { private boolean isNearbyLocked; private LatLng curLatLng; @@ -51,40 +49,40 @@ public class NearbyParentFragmentPresenter private @Nullable String customQuery; private static final NearbyParentFragmentContract.View DUMMY = (NearbyParentFragmentContract.View) Proxy.newProxyInstance( - NearbyParentFragmentContract.View.class.getClassLoader(), - new Class[]{NearbyParentFragmentContract.View.class}, (proxy, method, args) -> { - if (method.getName().equals("onMyEvent")) { - return null; - } else if (String.class == method.getReturnType()) { - return ""; - } else if (Integer.class == method.getReturnType()) { - return Integer.valueOf(0); - } else if (int.class == method.getReturnType()) { - return 0; - } else if (Boolean.class == method.getReturnType()) { - return Boolean.FALSE; - } else if (boolean.class == method.getReturnType()) { - return false; - } else { - return null; - } + NearbyParentFragmentContract.View.class.getClassLoader(), + new Class[]{NearbyParentFragmentContract.View.class}, (proxy, method, args) -> { + if (method.getName().equals("onMyEvent")) { + return null; + } else if (String.class == method.getReturnType()) { + return ""; + } else if (Integer.class == method.getReturnType()) { + return Integer.valueOf(0); + } else if (int.class == method.getReturnType()) { + return 0; + } else if (Boolean.class == method.getReturnType()) { + return Boolean.FALSE; + } else if (boolean.class == method.getReturnType()) { + return false; + } else { + return null; } + } ); private NearbyParentFragmentContract.View nearbyParentFragmentView = DUMMY; - public NearbyParentFragmentPresenter(BookmarkLocationsDao bookmarkLocationDao){ - this.bookmarkLocationDao=bookmarkLocationDao; + public NearbyParentFragmentPresenter(BookmarkLocationsDao bookmarkLocationDao) { + this.bookmarkLocationDao = bookmarkLocationDao; } @Override - public void attachView(NearbyParentFragmentContract.View view){ - this.nearbyParentFragmentView=view; + public void attachView(NearbyParentFragmentContract.View view) { + this.nearbyParentFragmentView = view; } @Override - public void detachView(){ - this.nearbyParentFragmentView=DUMMY; + public void detachView() { + this.nearbyParentFragmentView = DUMMY; } @Override @@ -109,13 +107,13 @@ public class NearbyParentFragmentPresenter if (applicationKvStore.getBoolean("login_skipped", false)) { // prompt the user to login nearbyParentFragmentView.displayLoginSkippedWarning(); - }else { + } else { nearbyParentFragmentView.animateFABs(); } }); nearbyParentFragmentView.setFABRecenterAction(v -> { - nearbyParentFragmentView.recenterMap(curLatLng); + nearbyParentFragmentView.recenterMap(curLatLng); }); } @@ -125,8 +123,7 @@ public class NearbyParentFragmentPresenter if (nearbyParentFragmentView.isAdvancedQueryFragmentVisible()) { nearbyParentFragmentView.showHideAdvancedQueryFragment(false); return true; - } - else if(nearbyParentFragmentView.isListBottomSheetExpanded()) { + } else if (nearbyParentFragmentView.isListBottomSheetExpanded()) { // Back should first hide the bottom sheet if it is expanded nearbyParentFragmentView.listOptionMenuItemClicked(); return true; @@ -150,6 +147,7 @@ public class NearbyParentFragmentPresenter /** * Nearby updates takes time, since they are network operations. During update time, we don't * want to get any other calls from user. So locking nearby. + * * @param isNearbyLocked true means lock, false means unlock */ @Override @@ -163,8 +161,8 @@ public class NearbyParentFragmentPresenter } /** - * This method should be the single point to update Map and List. Triggered by location - * changes + * This method should be the single point to update Map and List. Triggered by location changes + * * @param locationChangeType defines if location changed significantly or slightly */ @Override @@ -180,9 +178,12 @@ public class NearbyParentFragmentPresenter return; } - LatLng lastLocation = nearbyParentFragmentView.getLastLocation(); - curLatLng = lastLocation; - + LatLng lastLocation = nearbyParentFragmentView.getLastMapFocus(); + if (nearbyParentFragmentView.getMapCenter() != null) { + curLatLng = nearbyParentFragmentView.getMapCenter(); + } else { + curLatLng = lastLocation; + } if (curLatLng == null) { Timber.d("Skipping update of nearby places as location is unavailable"); return; @@ -192,31 +193,29 @@ public class NearbyParentFragmentPresenter * Significant changed - Markers and current location will be updated together * Slightly changed - Only current position marker will be updated */ - if(locationChangeType.equals(CUSTOM_QUERY)){ + if (locationChangeType.equals(CUSTOM_QUERY)) { Timber.d("ADVANCED_QUERY_SEARCH"); lockUnlockNearby(true); nearbyParentFragmentView.setProgressBarVisibility(true); - LatLng updatedLocationByUser = LocationUtils.deriveUpdatedLocationFromSearchQuery(customQuery); + LatLng updatedLocationByUser = LocationUtils.deriveUpdatedLocationFromSearchQuery( + customQuery); if (updatedLocationByUser == null) { updatedLocationByUser = lastLocation; } nearbyParentFragmentView.populatePlaces(updatedLocationByUser, customQuery); - } - else if (locationChangeType.equals(LOCATION_SIGNIFICANTLY_CHANGED) - || locationChangeType.equals(MAP_UPDATED)) { - Timber.d("LOCATION_SIGNIFICANTLY_CHANGED"); + } else if (locationChangeType.equals(LOCATION_SIGNIFICANTLY_CHANGED) + || locationChangeType.equals(MAP_UPDATED)) { lockUnlockNearby(true); nearbyParentFragmentView.setProgressBarVisibility(true); - nearbyParentFragmentView.populatePlaces(lastLocation); - + nearbyParentFragmentView.populatePlaces(nearbyParentFragmentView.getMapCenter()); } else if (locationChangeType.equals(SEARCH_CUSTOM_AREA)) { Timber.d("SEARCH_CUSTOM_AREA"); lockUnlockNearby(true); nearbyParentFragmentView.setProgressBarVisibility(true); - nearbyParentFragmentView.populatePlaces(nearbyParentFragmentView.getCameraTarget()); + nearbyParentFragmentView.populatePlaces(nearbyParentFragmentView.getMapFocus()); } else { // Means location changed slightly, ie user is walking or driving. Timber.d("Means location changed slightly"); - if (nearbyParentFragmentView.isCurrentLocationMarkerVisible()){ // Means user wants to see their live location + if (nearbyParentFragmentView.isCurrentLocationMarkerVisible()) { // Means user wants to see their live location nearbyParentFragmentView.recenterMap(curLatLng); } } @@ -225,31 +224,29 @@ public class NearbyParentFragmentPresenter /** * Populates places for custom location, should be used for finding nearby places around a * location where you are not at. + * * @param nearbyPlacesInfo This variable has placeToCenter list information and distances. */ - public void updateMapMarkers(NearbyController.NearbyPlacesInfo nearbyPlacesInfo, Marker selectedMarker, boolean shouldTrackPosition) { - if(null!=nearbyParentFragmentView) { + public void updateMapMarkers(NearbyController.NearbyPlacesInfo nearbyPlacesInfo, + Marker selectedMarker, boolean shouldTrackPosition) { + if (null != nearbyParentFragmentView) { + nearbyParentFragmentView.clearAllMarkers(); List nearbyBaseMarkers = NearbyController - .loadAttractionsFromLocationToBaseMarkerOptions(nearbyPlacesInfo.curLatLng, // Curlatlang will be used to calculate distances - nearbyPlacesInfo.placeList, - nearbyParentFragmentView.getContext(), - bookmarkLocationDao.getAllBookmarksLocations()); + .loadAttractionsFromLocationToBaseMarkerOptions(nearbyPlacesInfo.curLatLng, + // Curlatlang will be used to calculate distances + nearbyPlacesInfo.placeList, + nearbyParentFragmentView.getContext(), + bookmarkLocationDao.getAllBookmarksLocations()); nearbyParentFragmentView.updateMapMarkers(nearbyBaseMarkers, selectedMarker); - nearbyParentFragmentView.addCurrentLocationMarker(nearbyPlacesInfo.curLatLng); - if(shouldTrackPosition){ - nearbyParentFragmentView.updateMapToTrackPosition(nearbyPlacesInfo.curLatLng); - } lockUnlockNearby(false); // So that new location updates wont come nearbyParentFragmentView.setProgressBarVisibility(false); nearbyParentFragmentView.updateListFragment(nearbyPlacesInfo.placeList); - handleCenteringTaskIfAny(); - nearbyParentFragmentView.centerMapToPosition(nearbyPlacesInfo.searchLatLng); } } /** - * Some centering task may need to wait for map to be ready, if they are requested before - * map is ready. So we will remember it when the map is ready + * Some centering task may need to wait for map to be ready, if they are requested before map is + * ready. So we will remember it when the map is ready */ private void handleCenteringTaskIfAny() { if (!placesLoadedOnce) { @@ -282,31 +279,32 @@ public class NearbyParentFragmentPresenter @Override public void onCameraMove(com.mapbox.mapboxsdk.geometry.LatLng latLng) { - nearbyParentFragmentView.setProjectorLatLngBounds(); - // If our nearby markers are calculated at least once - if (NearbyController.latestSearchLocation != null) { - double distance =latLng.distanceTo - (LocationUtils.commonsLatLngToMapBoxLatLng(NearbyController.latestSearchLocation)); - if (nearbyParentFragmentView.isNetworkConnectionEstablished()) { - if (distance > NearbyController.latestSearchRadius) { - nearbyParentFragmentView.setSearchThisAreaButtonVisibility(true); - } else { - nearbyParentFragmentView.setSearchThisAreaButtonVisibility(false); - } + // If our nearby markers are calculated at least once + if (NearbyController.latestSearchLocation != null) { + double distance = latLng.distanceTo + (LocationUtils.commonsLatLngToMapBoxLatLng(NearbyController.latestSearchLocation)); + if (nearbyParentFragmentView.isNetworkConnectionEstablished()) { + if (distance > NearbyController.latestSearchRadius) { + //nearbyParentFragmentView.setSearchThisAreaButtonVisibility(true); + } else { + nearbyParentFragmentView.setSearchThisAreaButtonVisibility(false); } - } else { - nearbyParentFragmentView.setSearchThisAreaButtonVisibility(false); } + } else { + nearbyParentFragmentView.setSearchThisAreaButtonVisibility(false); + } } @Override - public void filterByMarkerType(List