Skip to content

Commit

Permalink
Merge branch 'main' into UtcDate_LocalDate
Browse files Browse the repository at this point in the history
  • Loading branch information
Isira-Seneviratne authored Mar 28, 2023
2 parents e3d9bc9 + d938a61 commit c5bb936
Show file tree
Hide file tree
Showing 10 changed files with 173 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ android {
applicationId 'org.wikipedia'
minSdkVersion 21
targetSdkVersion 33
versionCode 50433
versionCode 50434
testApplicationId 'org.wikipedia.test'
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
testInstrumentationRunnerArguments clearPackageData: 'true'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ class GalleryItemFragment : Fragment(), MenuProvider, RequestListener<Drawable?>
}
}

private val shareSubject get() = pageTitle?.displayText
private val shareSubject get() = StringUtil.removeHTMLTags(pageTitle?.displayText)

private fun saveImage() {
mediaInfo?.let { callback()?.onDownload(this) }
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/java/org/wikipedia/util/ImageUrlUtil.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ package org.wikipedia.util

object ImageUrlUtil {

private val WIDTH_IN_IMAGE_URL_REGEX = """(\d+)px-""".toPattern()
private val WIDTH_IN_IMAGE_URL_REGEX = """/(page\d+-)?(\d+)(px-)""".toPattern()

fun getUrlForPreferredSize(original: String, size: Int): String {
val matcher = WIDTH_IN_IMAGE_URL_REGEX.matcher(original)
return if (matcher.find() && matcher.group(1)!!.toInt() != size) {
matcher.replaceAll("${size}px-")
return if (matcher.find() && matcher.group(2)!!.toInt() != size) {
matcher.replaceFirst("/${matcher.group(1).orEmpty()}$size$3")
} else {
original
}
Expand Down
6 changes: 6 additions & 0 deletions app/src/main/res/values-fi/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1126,6 +1126,7 @@
<string name="wikitext_small">Pieni teksti</string>
<string name="wikitext_code">Koodi</string>
<string name="wikitext_link">Linkki</string>
<string name="wikitext_heading_n">Alaotsikko %d</string>
<string name="wikitext_formatting">Muotoilu</string>
<string name="wikitext_headings">Otsikot</string>
<string name="wikitext_insert_media">Lisää media</string>
Expand All @@ -1140,6 +1141,7 @@
<string name="insert_media_settings">Media-asetukset</string>
<string name="insert_media_settings_uploaded_image">Tallennettu kuva</string>
<string name="insert_media_settings_caption">Kuvateksti</string>
<string name="insert_media_settings_caption_description">Tunniste, joka näkyy kohteen vieressä kaikille lukijoille</string>
<string name="insert_media_settings_alternative_text">Vaihtoehtoinen teksti</string>
<string name="insert_media_settings_alternative_text_description">Tekstimuotoinen kuvaus lukijoille, jotka eivät voi nähdä kuvaa</string>
<string name="insert_media_advanced_settings">Lisäasetukset</string>
Expand Down Expand Up @@ -1217,6 +1219,7 @@
<string name="talk_list_item_user_icon_content_description">Käyttäjäkuvake</string>
<string name="talk_list_item_swipe_mark_as_read">Luettu</string>
<string name="talk_list_item_swipe_mark_as_unread">Lukematon</string>
<string name="talk_login_to_subscribe_dialog_title">Kirjaudu sisään tilataksesi aiheita</string>
<string name="talk_archived_title">Keskusteluarkisto: %s</string>
<string name="menu_option_share_talk_discussion">Jaa keskustelu</string>
<string name="menu_option_share_talk_page">Jaa keskustelusivu</string>
Expand Down Expand Up @@ -1282,10 +1285,13 @@
<string name="watchlist_page_moved">Siirretty</string>
<string name="watchlist_page_protected">Suojattu</string>
<string name="watchlist_page_deleted">Poistettu</string>
<string name="watchlist_filter_wiki_filter_header">Wiki</string>
<string name="watchlist_filter_all_text">Kaikki</string>
<string name="watchlist_filter_watchlist_activity_header">Tarkkailulistan aktiivisuus</string>
<string name="watchlist_filter_user_status_newcomers">Tulokkaat</string>
<string name="watchlist_filter_automated_contributions_bot">Botti</string>
<string name="watchlist_filter_automated_contributions_human">Ihminen (ei botti)</string>
<string name="watchlist_filter_significance_header">Oleellisuus</string>
<string name="watchlist_filter_significance_minor">Pienet muutokset</string>
<string name="watchlist_filter_type_of_change_wikidata_edits">Wikidata-muokkaukset</string>
<string name="watchlist_filter_type_of_change_new_users">Uudet käyttäjät</string>
Expand Down
21 changes: 21 additions & 0 deletions app/src/main/res/values-nb/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,15 @@
<item quantity="one">Leseliste importert</item>
<item quantity="other">Leselister importert</item>
</plurals>
<string name="reading_lists_preview_header_title">Delt liste</string>
<string name="reading_lists_preview_save_button">Lagre</string>
<string name="reading_lists_preview_save_dialog_title">Lagre liste</string>
<string name="reading_lists_preview_save_dialog_text">Navngi lista og velg artikler som skal lagres.</string>
<string name="reading_lists_preview_save_dialog_title_hint">Tittel</string>
<string name="reading_lists_preview_save_dialog_cancel">Avbryt</string>
<string name="reading_lists_preview_save_dialog_save">Lagre</string>
<string name="reading_lists_preview_saved_snackbar">Leseliste lagret</string>
<string name="reading_lists_preview_saved_snackbar_action">Vis</string>
<string name="user_option_sync_label">Innstillinger</string>
<string name="notification_reverted_title">Tilbakestilt redigering</string>
<string name="notification_channel_title">Laster ned artikler</string>
Expand Down Expand Up @@ -1284,13 +1293,25 @@
<string name="watchlist_expiry_dialog_three_months">3 måneder</string>
<string name="watchlist_expiry_dialog_six_months">6 måneder</string>
<string name="watchlist_empty">Du har ingen artikler i overvåkningslisten din.</string>
<string name="watchlist_search">Søk i overvåkningslista</string>
<string name="watchlist_filter_all">Alle</string>
<string name="watchlist_filter_talk">Diskusjon</string>
<string name="watchlist_filter_pages">Sider</string>
<string name="watchlist_filter_other">Andre</string>
<string name="watchlist_page_moved">Flyttet</string>
<string name="watchlist_page_protected">Beskyttet</string>
<string name="watchlist_page_deleted">Slettet</string>
<string name="watchlist_filter_title">Filter for overvåkningsliste</string>
<string name="watchlist_filter_wiki_filter_header">Wiki</string>
<string name="watchlist_filter_all_text">Alle</string>
<string name="watchlist_filter_watchlist_activity_header">Aktivitet på overvåkningslista</string>
<string name="watchlist_filter_watchlist_activity_unseen">Usette endringer</string>
<string name="watchlist_filter_watchlist_activity_seen">Sette endringer</string>
<string name="watchlist_filter_contribution_quality_header">Estimert bidragskvalitet</string>
<string name="watchlist_filter_contribution_quality_good">Med all sannsynlighet bra</string>
<string name="watchlist_filter_contribution_quality_may_problems">Kan ha problemer</string>
<string name="watchlist_filter_contribution_quality_likely_problems">Har trolig problemer</string>
<string name="watchlist_filter_contribution_quality_bad">Har sannsynligvis problemer</string>
<string name="preview_edit_title">Forhåndsvis endring</string>
<string name="preview_edit_summarize_edit_title">Forklar redigering</string>
<string name="preview_edit_summarize_edit_hint">Hvordan forbedret du denne siden?</string>
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values-ru/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1372,6 +1372,7 @@
<string name="watchlist_page_moved">Перемещено</string>
<string name="watchlist_page_protected">Защищено</string>
<string name="watchlist_page_deleted">Удалено</string>
<string name="watchlist_filter_wiki_filter_header">Вики</string>
<string name="watchlist_filter_user_status_unregistered">Незарегистрированные</string>
<string name="watchlist_filter_user_status_registered">Зарегистрированные</string>
<string name="watchlist_filter_user_status_newcomers">Новички</string>
Expand Down
10 changes: 10 additions & 0 deletions app/src/main/res/values-te/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1116,6 +1116,16 @@
<string name="watchlist_page_moved">తరలించారు</string>
<string name="watchlist_page_protected">సంరక్షించారు</string>
<string name="watchlist_page_deleted">తొలగించారు</string>
<string name="watchlist_filter_wiki_filter_header">వికీ</string>
<string name="watchlist_filter_all_text">అన్నీ</string>
<string name="watchlist_filter_contribution_authorship_own">మీ దిద్దుబాట్లు</string>
<string name="watchlist_filter_significance_header">ప్రాముఖ్యం</string>
<string name="watchlist_filter_significance_minor">చిన్న మార్పులు</string>
<string name="watchlist_filter_type_of_change_page_edits">పేజీ దిద్దుబాట్లు</string>
<string name="watchlist_filter_type_of_change_page_creations">పేజీ సృష్టి</string>
<string name="watchlist_filter_type_of_change_wikidata_edits">వికీడేటా సవరణలు</string>
<string name="watchlist_filter_type_of_change_new_users">కొత్త వాడుకరులు</string>
<string name="watchlist_filter_reset_button">రీసెట్ చెయ్యి</string>
<string name="action_item_categories">వర్గాలు</string>
<string name="page_no_categories">ఈ పేజీ వార్గాలకు చెందినది కాదు.</string>
<string name="category_tab_articles">వ్యాసాలు</string>
Expand Down
Loading

0 comments on commit c5bb936

Please sign in to comment.