Merge branch 'main' into mapreset6486

This commit is contained in:
Nicolas Raoul 2025-10-15 22:30:35 +09:00 committed by GitHub
commit 222c162605
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
29 changed files with 69 additions and 73 deletions

View file

@ -57,8 +57,7 @@
tools:replace="android:appComponentFactory">
<activity
android:name=".activity.SingleWebViewActivity"
android:exported="false"
android:label="@string/title_activity_single_web_view" />
android:exported="false" />
<activity
android:name=".nearby.WikidataFeedback"
android:exported="false" />

View file

@ -180,8 +180,8 @@ class ContributionController @Inject constructor(@param:Named("default_preferenc
showAlertDialog(
activity, activity.getString(R.string.location_permission_title),
activity.getString(R.string.in_app_camera_location_permission_rationale),
activity.getString(android.R.string.ok),
activity.getString(android.R.string.cancel),
activity.getString(R.string.ok),
activity.getString(R.string.cancel),
{
createDialogsAndHandleLocationPermissions(
activity,

View file

@ -150,7 +150,7 @@ class DescriptionEditActivity :
this,
getString(titleStringID),
getString(messageStringId),
getString(android.R.string.ok),
getString(R.string.ok),
null
)
}

View file

@ -140,8 +140,8 @@ class ExploreMapFragment : CommonsDaggerSupportFragment(), ExploreMapContract.Vi
requireActivity(),
requireActivity().getString(R.string.location_permission_title),
requireActivity().getString(R.string.location_permission_rationale_explore),
requireActivity().getString(android.R.string.ok),
requireActivity().getString(android.R.string.cancel),
requireActivity().getString(R.string.ok),
requireActivity().getString(R.string.cancel),
{ askForLocationPermission() },
null,
null

View file

@ -67,10 +67,10 @@ class RecentSearchesFragment : CommonsDaggerSupportFragment() {
private fun showDeleteRecentAlertDialog(context: Context) {
AlertDialog.Builder(context)
.setMessage(getString(R.string.delete_recent_searches_dialog))
.setPositiveButton(android.R.string.yes) { dialog: DialogInterface, _: Int ->
.setPositiveButton(R.string.yes) { dialog: DialogInterface, _: Int ->
setDeleteRecentPositiveButton(context, dialog)
}
.setNegativeButton(android.R.string.no, null)
.setNegativeButton(R.string.no, null)
.setCancelable(false)
.create()
.show()
@ -102,7 +102,7 @@ class RecentSearchesFragment : CommonsDaggerSupportFragment() {
setDeletePositiveButton(context, dialog, position)
}
)
.setNegativeButton(android.R.string.cancel, null)
.setNegativeButton(R.string.cancel, null)
.setCancelable(false)
.create()
.show()

View file

@ -64,8 +64,8 @@ class LocationPermissionsHelper(
activity,
activity.getString(dialogTitleResource),
activity.getString(dialogTextResource),
activity.getString(android.R.string.ok),
activity.getString(android.R.string.cancel),
activity.getString(R.string.ok),
activity.getString(R.string.cancel),
{
ActivityCompat.requestPermissions(
activity,

View file

@ -151,7 +151,7 @@ class QuizChecker @Inject constructor(
activity.getString(R.string.quiz),
activity.getString(R.string.quiz_alert_message, revertPercentageForMessage),
activity.getString(R.string.about_translate_proceed),
activity.getString(android.R.string.cancel),
activity.getString(R.string.cancel),
{ startQuizActivity(activity) },
null
)

View file

@ -193,7 +193,7 @@ class QuizResultActivity : AppCompatActivity() {
alertadd.setPositiveButton(R.string.about_translate_proceed) { dialog, _ ->
shareScreen(screenshot)
}
alertadd.setNegativeButton(android.R.string.cancel) { dialog, _ ->
alertadd.setNegativeButton(R.string.cancel) { dialog, _ ->
dialog.cancel()
}
alertadd.show()

View file

@ -238,7 +238,7 @@ class ReviewActivity : BaseActivity() {
this,
getString(R.string.skip_image).uppercase(Locale.ROOT),
getString(R.string.skip_image_explanation),
getString(android.R.string.ok),
getString(R.string.ok),
null,
null,
null
@ -250,7 +250,7 @@ class ReviewActivity : BaseActivity() {
this,
getString(R.string.title_activity_review),
getString(R.string.review_image_explanation),
getString(android.R.string.ok),
getString(R.string.ok),
null,
null,
null

View file

@ -446,7 +446,7 @@ class UploadActivity : BaseActivity(), UploadContract.View, UploadBaseFragment.C
this,
getString(R.string.storage_permissions_denied),
getString(R.string.unable_to_share_upload_item),
getString(android.R.string.ok)
getString(R.string.ok)
) { finish() }
} else {
showAlertDialog(
@ -455,7 +455,7 @@ class UploadActivity : BaseActivity(), UploadContract.View, UploadBaseFragment.C
getString(
R.string.write_storage_permission_rationale_for_image_share
),
getString(android.R.string.ok)
getString(R.string.ok)
) { checkStoragePermissions() }
}
}

View file

@ -117,7 +117,7 @@ class UploadCategoriesFragment : UploadBaseFragment(), CategoriesContract.View {
requireActivity(),
getString(R.string.categories_activity_title),
getString(R.string.categories_tooltip),
getString(android.R.string.ok),
getString(R.string.ok),
null
)
}

View file

@ -116,7 +116,7 @@ class DepictsFragment : UploadBaseFragment(), DepictsContract.View {
requireActivity(),
getString(R.string.depicts_step_title),
getString(R.string.depicts_tooltip),
getString(android.R.string.ok),
getString(R.string.ok),
null
)
}

View file

@ -303,7 +303,7 @@ class UploadMediaDetailFragment : UploadBaseFragment(), UploadMediaDetailsContra
requireActivity(),
getString(titleStringID),
getString(messageStringId),
getString(android.R.string.ok),
getString(R.string.ok),
null
)
}
@ -919,4 +919,4 @@ class UploadMediaDetailFragment : UploadBaseFragment(), UploadMediaDetailsContra
const val UPLOADABLE_FILE: String = "uploadable_file"
const val UPLOAD_MEDIA_DETAILS: String = "upload_media_detail_adapter"
}
}
}

View file

@ -209,8 +209,8 @@ object PermissionUtils {
activity,
activity.getString(rationaleTitle),
activity.getString(rationaleMessage),
activity.getString(android.R.string.ok),
activity.getString(android.R.string.cancel),
activity.getString(R.string.ok),
activity.getString(R.string.cancel),
{
if (activity is UploadActivity) {
activity.isShowPermissionsDialog = true

View file

@ -1,4 +0,0 @@
<vector android:height="16dp" android:viewportHeight="28"
android:viewportWidth="28" android:width="16dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#2D8BA4" android:pathData="M14,0L11.533,2.467L21.298,12.25H0V15.75H21.298L11.533,25.532L14,28L28,14L14,0Z"/>
</vector>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/white"></solid>
<solid android:color="@color/white" />
</shape>

View file

@ -16,7 +16,7 @@
android:padding="12dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"></EditText>
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/recent_searches"

View file

@ -22,9 +22,8 @@
android:id="@+id/tv_review_question"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:gravity="center"
tools:text="testing1"
android:textAlignment="center"
android:textColor="?attr/reviewHeading"
android:textSize="32sp"/>
@ -33,9 +32,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/filter_padding"
android:gravity="center_vertical"
android:gravity="center"
tools:text="testing2"
android:textAlignment="center"
android:textSize="22sp"/>
</LinearLayout>

View file

@ -119,7 +119,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="horizontal"></LinearLayout>
android:orientation="horizontal" />
<LinearLayout
android:id="@+id/ll_location_status"
@ -149,13 +149,6 @@
android:textColor="#2D8BA4"
android:textSize="@dimen/normal_text"
android:textStyle="bold" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/tiny_margin"
android:layout_weight="1"
android:src="@drawable/ic_arrow_16dp" />
</LinearLayout>
</LinearLayout>

View file

@ -3,6 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/category_layout"
android:layoutDirection="locale"
android:layout_width="match_parent"
android:layout_height="wrap_content">
@ -10,26 +11,31 @@
android:id="@+id/upload_category_checkbox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:minWidth="48dp"
android:minHeight="48dp"
android:checkMark="?android:attr/textCheckMark"
android:checked="false"
android:gravity="center_vertical"
android:padding="@dimen/tiny_gap"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/category_image"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/category_image"
android:layout_width="50dp"
android:layout_height="50dp"
android:paddingEnd="@dimen/tiny_gap"
android:layout_marginStart="@dimen/tiny_gap"
android:layout_marginEnd="@dimen/tiny_gap"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@+id/upload_category_checkbox"
app:layout_constraintStart_toEndOf="@+id/upload_category_checkbox"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toStartOf="@+id/text_container"
app:placeholderImage="@drawable/commons" />
<LinearLayout
android:id="@+id/text_container"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:orientation="vertical"

View file

@ -2,6 +2,7 @@
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/depicts_layout"
android:layoutDirection="locale"
android:layout_width="match_parent"
android:layout_height="wrap_content">
@ -9,26 +10,31 @@
android:id="@+id/depict_checkbox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:minWidth="48dp"
android:minHeight="48dp"
android:checkMark="?android:attr/textCheckMark"
android:checked="false"
android:gravity="center_vertical"
android:padding="@dimen/tiny_gap"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/depicted_image"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/depicted_image"
android:layout_width="50dp"
android:layout_height="50dp"
android:paddingRight="@dimen/tiny_gap"
android:layout_marginStart="@dimen/tiny_gap"
android:layout_marginEnd="@dimen/tiny_gap"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@+id/depict_checkbox"
app:layout_constraintStart_toEndOf="@+id/depict_checkbox"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toStartOf="@+id/text_container"
app:placeholderImage="@drawable/ic_wikidata_logo_24dp" />
<LinearLayout
android:id="@+id/text_container"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:orientation="vertical"
@ -41,14 +47,14 @@
android:id="@+id/depicts_label"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Label"
android:text="@string/depicts_label"
android:textStyle="bold" />
<TextView
android:id="@+id/description"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Description" />
android:text="@string/depicts_description" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -35,7 +35,6 @@
android:layout_height="wrap_content"
android:id="@+id/appwidget_title"
android:textAlignment="center"
android:layout_gravity="bottom"
android:textColor="@color/white"
android:layout_marginTop="@dimen/filter_padding"
android:layout_marginStart="@dimen/tiny_padding"

View file

@ -17,7 +17,6 @@
android:layout_width="wrap_content"
android:layout_height="@dimen/half_standard_height"
android:layout_marginEnd="@dimen/standard_gap"
android:layout_marginRight="@dimen/standard_gap"
android:orientation="horizontal">
<TextView
@ -25,7 +24,6 @@
android:layout_width="wrap_content"
android:layout_height="@dimen/half_standard_height"
android:layout_marginEnd="@dimen/standard_gap"
android:layout_marginRight="@dimen/standard_gap"
android:gravity="center_vertical"
android:textSize="@dimen/normal_text"
android:textStyle="bold"
@ -77,7 +75,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/tiny_gap"
android:layout_marginRight="@dimen/tiny_gap"
android:layout_gravity="center_vertical|end"
android:indeterminate="true"
android:indeterminateOnly="true"

View file

@ -22,7 +22,6 @@
android:layout_marginEnd="@dimen/standard_gap"
android:layout_marginRight="@dimen/standard_gap"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:orientation="horizontal">
<TextView
@ -30,7 +29,6 @@
android:layout_width="wrap_content"
android:layout_height="@dimen/half_standard_height"
android:layout_marginEnd="@dimen/standard_gap"
android:layout_marginRight="@dimen/standard_gap"
android:gravity="center_vertical"
android:textSize="@dimen/normal_text"
android:textStyle="bold"
@ -99,7 +97,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/tiny_gap"
android:layout_marginRight="@dimen/tiny_gap"
android:layout_gravity="center_vertical|end"
android:indeterminate="true"
android:indeterminateOnly="true"

View file

@ -5,7 +5,7 @@
* Nemoralis
-->
<resources>
<string name="crash_dialog_title">Nasazlıq</string>
<string name="crash_dialog_title">Commons çökdü</string>
<string name="crash_dialog_text">Uups. Nəsə düzgün çalışmır!</string>
<string name="crash_dialog_comment_prompt">Nə etdiyinizi bizə deyin, sonra e-poçt vasitəsilə bizimlə paylaşın. Bu, bizə bunu düzəltməyə kömək edəcək!</string>
<string name="crash_dialog_ok_toast">Təşəkkürlər!</string>

View file

@ -1,9 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Authors:
* Amire80
* Shirayuki
-->
<resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="all">
<string name="crash_dialog_title">Title of dialog to show when the app crashes</string>
<string name="crash_dialog_text">Shown when the application crashed.</string>
<string name="crash_dialog_comment_prompt">Prompt asking people to enter info about what they were doing when the app crashed</string>
<string name="crash_dialog_ok_toast">Toast to be displayed once someone sends an error report thanking them.\n{{Identical|Thank you}}</string>
</resources>

View file

@ -468,6 +468,8 @@
<string name="map_attribution">{{Optional}}\n&lt;code&gt;&amp;amp;#169;&lt;/code&gt; is the copyright symbol (©).</string>
<string name="categories_tooltip">{{Doc-commons-app-depicts}}</string>
<string name="depicts_step_title">{{Doc-commons-app-depicts}}</string>
<string name="depicts_label">Label</string>
<string name="depicts_description">Description</string>
<string name="pan_and_zoom_to_adjust">Panning means moving the map left/right/up/down, typically by touching the screen with one finger and moving it.\n\nZooming means making the map\'s scale bigger or smaller, typically by pinching with two fingers.\n\nExample in other app:\nhttps://igss.schneider-electric.com/features/pan-and-zoom-in-definition/</string>
<string name="location_picker_image_view_shadow">A description of a visual element, location picker image shadow. Used for accesibility usually.</string>
<string name="label">{{Identical|Label}}</string>

View file

@ -133,6 +133,7 @@
<string name="title_activity_settings">Settings</string>
<string name="title_activity_signup">Sign Up</string>
<string name="title_activity_featured_images">Featured Images</string>
<string name="images_featured_explanation">Featured images are contributions by highly skilled photographers and illustrators that the Wikimedia Commons community has chosen as some of the highest quality on the site.</string>
<string name="title_activity_custom_selector">Custom Selector</string>
<string name="title_activity_category_details">Category</string>
<string name="title_activity_review">Peer Review</string>
@ -529,7 +530,6 @@ Upload your first media by tapping on the add button.</string>
<string name="error_occurred_in_picking_images">Error occurred while picking images</string>
<string name="please_wait">Please wait…</string>
<string name="images_featured_explanation">Featured pictures are images from highly skilled photographers and illustrators that the Wikimedia Commons community has chosen as some of the highest quality on the site.</string>
<string name="images_via_nearby_explanation">Images Uploaded via Nearby places are the images which are uploaded by discovering places on the map.</string>
<string name="thanks_received_explanation">This feature allows editors to send a Thank you notification to users who make useful edits by using a small thank link on the history page or diff page.</string>
<string name="copy_image_caption_description">Copy to the next items</string>
@ -619,7 +619,7 @@ Upload your first media by tapping on the add button.</string>
<string name="place_state_exists">Exists</string>
<string name="place_state_needs_photo">Needs Photo</string>
<string name="place_type">Place type:</string>
<string name="nearby_search_hint">Bridge, museum, hotel etc.</string>
<string name="nearby_search_hint">Bridge, museum, hotel, etc.</string>
<string name="you_must_reset_your_passsword">Something went wrong with log-in. You must reset your password!</string>
<string name="title_for_media">MEDIA</string>
<string name="title_for_child_classes">CHILD CLASSES</string>
@ -710,6 +710,8 @@ Upload your first media by tapping on the add button.</string>
<string name="categories_tooltip">Please select the appropriate categories. Unlike depictions, categories are only in English.</string>
<string name="license_tooltip">Commons makes your pictures reusable and adapted by everyone. Do you want to waive all rights? Do you want to be attributed? Do you want adaptations to use the same license?</string>
<string name="depicts_step_title">Depicts</string>
<string name="depicts_label">Label</string>
<string name="depicts_description">Description</string>
<string name="license_step_title">Media License</string>
<string name="media_detail_step_title">Media Details</string>
<string name="menu_view_category_page">View category page</string>
@ -736,7 +738,7 @@ Upload your first media by tapping on the add button.</string>
<string name="back">Back</string>
<string name="welcome_custom_picture_selector_text">Welcome to Custom Picture Selector</string>
<string name="custom_selector_info_text1">This picker shows you which pictures you have already uploaded to Commons.</string>
<string name="custom_selector_info_text2">Unlike the picture on the left, the picture on the right has the Commons logo indicating it is already uploaded. \n Touch and hold for image preview.</string>
<string name="custom_selector_info_text2">Unlike the picture on the left, the picture on the right has the Commons logo indicating it is already uploaded.\n\nTouch and hold for image preview.</string>
<string name="welcome_custom_selector_ok">Awesome</string>
<string name="custom_selector_already_uploaded_image_text">This image has already been uploaded to Commons.</string>
<string name="custom_selector_over_limit_warning">For technical reasons, the app can\'t reliably upload more than %1$d pictures at once. The upload limit of %1$d has been exceeded by %2$d.</string>
@ -767,7 +769,7 @@ Upload your first media by tapping on the add button.</string>
<string name="location_message">Location data helps Wiki editors find your picture, making it much more useful.\nYour recent uploads have no location.\nWe suggest you turn on location in your camera app\'s settings.\nThank you for uploading!</string>
<string name="no_location_found_title">No location found</string>
<string name="no_location_found_message">How about adding the place where this image was taken?\nLocation data helps Wiki editors find your picture, making it much more useful.\nThank you!</string>
<string name="add_location">Add location</string>
<string name="add_location">Add Location</string>
<string name="feedback_sharing_data_alert">Please remove from this email any information that you are not comfortable sharing publicly. Also, please be aware that your email address with which you are posting, and the associated name and profile picture, will be visible publicly.</string>
<string name="explore_map_details">Details</string>
<string name="achievements_unavailable_beta">Achievements are only available in the prod flavor. Please check the developer documentation.</string>
@ -788,8 +790,8 @@ Upload your first media by tapping on the add button.</string>
<string name="unmark_as_not_for_upload">Unmark as not for upload</string>
<string name="marking_as_not_for_upload">Marking as not for upload</string>
<string name="unmarking_as_not_for_upload">Unmarking as not for upload</string>
<string name="show_already_actioned_pictures">Show already actioned pictures</string>
<string name="hiding_already_actioned_pictures">Hiding already actioned pictures</string>
<string name="show_already_actioned_pictures">Show already handled pictures</string>
<string name="hiding_already_actioned_pictures">Hiding already handled pictures</string>
<string name="no_more_images_found">No more images found</string>
<string name="this_image_is_already_uploaded">This image is already uploaded</string>
<string name="can_not_select_this_image_for_upload">Can not select this image for upload</string>
@ -825,12 +827,12 @@ Upload your first media by tapping on the add button.</string>
<string name="invalid_login_message">Your log-in has expired. Please log in again.</string>
<string name="no_application_available_to_open_gpx_files">No application available to open GPX files</string>
<string name="file_saved_successfully">File Saved Successfully</string>
<string name="do_you_want_to_open_gpx_file">Do you want to open GPX file?</string>
<string name="do_you_want_to_open_kml_file">Do you want to open KML file?</string>
<string name="failed_to_save_kml_file">Failed to save KML file.</string>
<string name="failed_to_save_gpx_file">Failed to save GPX file.</string>
<string name="saving_kml_file">Saving KML File</string>
<string name="saving_gpx_file">Saving GPX File</string>
<string name="do_you_want_to_open_gpx_file">Do you want to open the GPX file?</string>
<string name="do_you_want_to_open_kml_file">Do you want to open the KML file?</string>
<string name="failed_to_save_kml_file">Failed to save the KML file.</string>
<string name="failed_to_save_gpx_file">Failed to save the GPX file.</string>
<string name="saving_kml_file">Saving as a KML file...</string>
<string name="saving_gpx_file">Saving as a GPX file...</string>
<plurals name="custom_picker_images_selected_title_appendix">
<item quantity="one">%d image selected</item>
<item quantity="other">%d images selected</item>
@ -873,7 +875,6 @@ Upload your first media by tapping on the add button.</string>
<string name="usages_on_other_wikis_heading">Other wikis</string>
<string name="bullet_point"></string>
<string name="file_usages_container_heading">File usages</string>
<string name="title_activity_single_web_view">SingleWebViewActivity</string>
<string name="account">Account</string>
<string name="vanish_account">Vanish Account</string>
<string name="account_vanish_request_confirm_title">Vanish account warning</string>

View file

@ -193,8 +193,8 @@ class DescriptionEditActivityUnitTest {
method.isAccessible = true
method.invoke(
activity,
android.R.string.ok,
android.R.string.ok,
R.string.ok,
R.string.ok,
)
val dialog: AlertDialog = ShadowAlertDialog.getLatestDialog() as AlertDialog
assertEquals(dialog.isShowing, true)