Skip to content

Commit

Permalink
Merge branch 'whichCameFirst_design' into wikigame-finalscreen-design
Browse files Browse the repository at this point in the history
  • Loading branch information
cooltey committed Jan 30, 2025
2 parents b31ca74 + 307c7ff commit ae03542
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 20 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ android {
applicationId 'org.wikipedia'
minSdk 21
targetSdk 35
versionCode 50518
versionCode 50519
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 @@ -132,6 +132,7 @@ class DescriptionEditView(context: Context, attrs: AttributeSet?) : LinearLayout
setHintText()
description = originalDescription
setReviewHeaderText(false)
binding.viewDescriptionEditTextLayout.counterMaxLength = resources.getInteger(if (pageTitle.wikiSite.languageCode == "en") R.integer.description_max_chars_en else R.integer.description_max_chars)
}

private fun setVoiceInput() {
Expand Down Expand Up @@ -333,6 +334,8 @@ class DescriptionEditView(context: Context, attrs: AttributeSet?) : LinearLayout
(listOf(".", ",", "!", "?").filter { text.endsWith(it) }).isNotEmpty()) {
isTextValid = false
setError(context.getString(R.string.description_ends_with_punctuation))
} else if (pageTitle.wikiSite.languageCode == "en" && text.length > resources.getInteger(R.integer.description_max_chars_en)) {
setWarning(context.getString(R.string.description_too_long))
} else if ((action == DescriptionEditActivity.Action.ADD_DESCRIPTION || action == DescriptionEditActivity.Action.TRANSLATE_DESCRIPTION) &&
LanguageUtil.startsWithArticle(text, pageTitle.wikiSite.languageCode)) {
setWarning(context.getString(R.string.description_starts_with_article))
Expand Down
19 changes: 0 additions & 19 deletions app/src/main/res/layout/view_main_drawer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -160,25 +160,6 @@
android:text="@string/places_title" />
</LinearLayout>

<LinearLayout
android:id="@+id/main_drawer_game_container"
style="@style/SideDrawerMenuItem">

<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:contentDescription="@null"
app:srcCompat="@drawable/ic_puzzle"
app:tint="?attr/secondary_color" />

<TextView
style="@android:style/TextAppearance"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:text="@string/on_this_day_game_nav_title" />
</LinearLayout>

<LinearLayout
android:id="@+id/main_drawer_settings_container"
style="@style/SideDrawerMenuItem">
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values-qq/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -918,6 +918,7 @@
<string name="description_edit_description_learn_more_url">{{optional}}\nURL that points to a page on mediawiki.org that contains guidelines for writing article descriptions.</string>
<string name="description_edit_image_caption_learn_more_url">{{optional}}\nURL that points to a page on mediawiki.org that contains guidelines for writing Image captions.</string>
<string name="description_too_short">Error text shown when a description is too short.</string>
<string name="description_too_long">Warning text shown when a description is too long.</string>
<string name="description_ends_with_punctuation">Error text shown when a description ends with punctuation.</string>
<string name="description_starts_with_article">{{Optional}}\n\nWarning text shown when a description starts with a definite or indefinite article. Currently implemented in English, German, Spanish, and French. Doesn\'t need translation to other languages. When translating, use the articles in the language and don\'t copy the English ones.</string>
<string name="description_starts_with_uppercase">Warning text shown when a description starts with an uppercase character.</string>
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@

<!-- Description editing -->
<integer name="description_max_chars">250</integer>
<integer name="description_max_chars_en">90</integer>
<integer name="description_max_anon_edits">5</integer>

<!-- Notifications -->
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -920,6 +920,7 @@
<string name="description_edit_image_caption_learn_more_url">https://m.mediawiki.org/wiki/Wikimedia_Apps/Android_Suggested_edits#Image_captions</string>

<string name="description_too_short">The text is too short.</string>
<string name="description_too_long">Try to keep descriptions short so users can understand the article\'s subject at a glance</string>
<string name="description_ends_with_punctuation">The text must not end with punctuation.</string>
<string name="description_starts_with_article">Avoid starting with articles like “a” or “the”.</string>
<string name="description_starts_with_uppercase">Start with a lowercase letter unless the first word is a proper noun.</string>
Expand Down

0 comments on commit ae03542

Please sign in to comment.