Skip to content

Commit

Permalink
Image recs: insert into infobox only for English. (#4679)
Browse files Browse the repository at this point in the history
Co-authored-by: Cooltey Feng <cfeng@wikimedia.org>
  • Loading branch information
dbrant and cooltey committed May 17, 2024
1 parent 7faaa1e commit d6e1601
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,10 @@ class InsertMediaViewModel(bundle: Bundle) : ViewModel() {
}
}

if (autoInsert && attemptInfobox && infoboxMatch != null) {
// Verify a few conditions before attempting to insert into an infobox, including
// whether the infobox actually exists, and whether the current language wiki is
// supported by our hardcoded infoboxVars.
if (autoInsert && attemptInfobox && infoboxMatch != null && infoboxVarsByLang.containsKey(langCode)) {
val infoboxStartIndex = infoboxMatch.range.first
val infoboxEndIndex = infoboxMatch.range.last

Expand Down

0 comments on commit d6e1601

Please sign in to comment.