Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Never use android.R.strings; remove unused add string #7024

Merged
merged 3 commits into from
Aug 31, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ object LicenseFragmentHelper {
alert.setView(webView)
Localization.assureCorrectAppLanguage(context)
alert.setNegativeButton(
context.getString(R.string.finish)
context.getString(R.string.ok)
) { dialog, _ -> dialog.dismiss() }
alert.show()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ private void showFailedDialog(@StringRes final int msg) {
new AlertDialog.Builder(context)
.setTitle(R.string.general_error)
.setMessage(msg)
.setNegativeButton(getString(R.string.finish), null)
.setNegativeButton(getString(R.string.ok), null)
.create()
.show();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2071,7 +2071,7 @@ private void showClearingQueueConfirmation(final Runnable onAllow) {
new AlertDialog.Builder(activity)
.setTitle(R.string.clear_queue_confirmation_description)
.setNegativeButton(R.string.cancel, null)
.setPositiveButton(android.R.string.yes, (dialog, which) -> {
.setPositiveButton(R.string.ok, (dialog, which) -> {
onAllow.run();
dialog.dismiss();
}).show();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ class FeedFragment : BaseStateFragment<FeedState>() {
putBoolean(getString(R.string.feed_use_dedicated_fetch_method_key), !usingDedicatedMethod)
}
}
.setPositiveButton(resources.getString(R.string.finish), null)
.setPositiveButton(resources.getString(R.string.ok), null)
.create()
.show()
return true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public Dialog onCreateDialog(@Nullable final Bundle savedInstanceState) {
.setMessage(R.string.import_network_expensive_warning)
.setCancelable(true)
.setNegativeButton(R.string.cancel, null)
.setPositiveButton(R.string.finish, (dialogInterface, i) -> {
.setPositiveButton(R.string.ok, (dialogInterface, i) -> {
if (resultServiceIntent != null && getContext() != null) {
getContext().startService(resultServiceIntent);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,21 +143,15 @@ class FeedGroupDialog : DialogFragment(), BackPressable {
).get(FeedGroupDialogViewModel::class.java)

viewModel.groupLiveData.observe(viewLifecycleOwner, Observer(::handleGroup))
viewModel.subscriptionsLiveData.observe(
viewLifecycleOwner,
Observer {
setupSubscriptionPicker(it.first, it.second)
}
)
viewModel.dialogEventLiveData.observe(
viewLifecycleOwner,
Observer {
when (it) {
ProcessingEvent -> disableInput()
SuccessEvent -> dismiss()
}
viewModel.subscriptionsLiveData.observe(viewLifecycleOwner) {
setupSubscriptionPicker(it.first, it.second)
}
viewModel.dialogEventLiveData.observe(viewLifecycleOwner) {
when (it) {
ProcessingEvent -> disableInput()
SuccessEvent -> dismiss()
}
)
}

subscriptionGroupAdapter = GroupAdapter<GroupieViewHolder>().apply {
add(subscriptionMainSection)
Expand Down Expand Up @@ -437,7 +431,7 @@ class FeedGroupDialog : DialogFragment(), BackPressable {
feedGroupCreateBinding.confirmButton.setText(
when {
currentScreen == InitialScreen && groupId == NO_GROUP_SELECTED -> R.string.create
else -> android.R.string.ok
else -> R.string.ok
}
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ public Dialog onCreateDialog(@Nullable final Bundle savedInstanceState) {
setPlaybackParameters(initialTempo, initialPitch, initialSkipSilence))
.setNeutralButton(R.string.playback_reset, (dialogInterface, i) ->
setPlaybackParameters(DEFAULT_TEMPO, DEFAULT_PITCH, DEFAULT_SKIP_SILENCE))
.setPositiveButton(R.string.finish, (dialogInterface, i) ->
.setPositiveButton(R.string.ok, (dialogInterface, i) ->
setCurrentPlaybackParameters());

return dialogBuilder.create();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ private void requestImportPathResult(final ActivityResult result) {

new AlertDialog.Builder(requireActivity())
.setMessage(R.string.override_current_data)
.setPositiveButton(R.string.finish, (d, id) ->
.setPositiveButton(R.string.ok, (d, id) ->
importDatabase(file, lastImportDataUri))
.setNegativeButton(R.string.cancel, (d, id) ->
d.cancel())
Expand Down Expand Up @@ -232,11 +232,11 @@ private void importDatabase(final StoredFileHelper file, final Uri importDataUri
final AlertDialog.Builder alert = new AlertDialog.Builder(requireContext());
alert.setTitle(R.string.import_settings);

alert.setNegativeButton(android.R.string.no, (dialog, which) -> {
alert.setNegativeButton(R.string.cancel, (dialog, which) -> {
dialog.dismiss();
finishImport(importDataUri);
});
alert.setPositiveButton(getString(R.string.finish), (dialog, which) -> {
alert.setPositiveButton(R.string.ok, (dialog, which) -> {
dialog.dismiss();
manager.loadSharedPreferences(PreferenceManager
.getDefaultSharedPreferences(requireContext()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ private void showMessageDialog(@StringRes final int title, @StringRes final int
final AlertDialog.Builder msg = new AlertDialog.Builder(ctx);
msg.setTitle(title);
msg.setMessage(message);
msg.setPositiveButton(getString(R.string.finish), null);
msg.setPositiveButton(getString(R.string.ok), null);
msg.show();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ private void showAddItemDialog(final Context c) {
.setIcon(R.drawable.place_holder_peertube)
.setView(dialogBinding.getRoot())
.setNegativeButton(R.string.cancel, null)
.setPositiveButton(R.string.finish, (dialog1, which) -> {
.setPositiveButton(R.string.ok, (dialog1, which) -> {
final String url = dialogBinding.dialogEditText.getText().toString();
addInstance(url);
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ private void showError(@NonNull DownloadMission mission) {
);
}

builder.setNegativeButton(R.string.finish, (dialog, which) -> dialog.cancel())
builder.setNegativeButton(R.string.ok, (dialog, which) -> dialog.cancel())
.setTitle(mission.storage.getName())
.create()
.show();
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/dialog_feed_group_reorder.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:text="@string/finish" />
android:text="@string/ok" />
</LinearLayout>
2 changes: 1 addition & 1 deletion app/src/main/res/menu/dialog_url.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<item
android:id="@+id/okay"
android:title="@string/finish"
android:title="@string/ok"
app:showAsAction="always" />

</menu>
3 changes: 1 addition & 2 deletions app/src/main/res/values-ar/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,7 @@
<string name="view">شغل</string>
<string name="delete">حذف</string>
<string name="checksum">التوقيع</string>
<string name="add">مهمة جديدة</string>
<string name="finish">حسناً</string>
<string name="ok">حسناً</string>
<string name="msg_name">اسم الملف</string>
<string name="msg_threads">التقسيم</string>
<string name="msg_error">الخطأ</string>
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/res/values-b+ast/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@
<string name="audio">Audiu</string>
<string name="delete">Desaniciar</string>
<string name="checksum">Suma de comprobación</string>
<string name="add">Misión nueva</string>
<string name="finish">Aceutar</string>
<string name="ok">Aceutar</string>
<string name="msg_threads">Filos</string>
<string name="msg_error">Fallu</string>
<string name="msg_wait">Espera…</string>
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/res/values-b+uz+Latn/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,7 @@
<string name="msg_error">Xato</string>
<string name="msg_threads">Iplar</string>
<string name="msg_name">Faylnomi</string>
<string name="finish">Ok</string>
<string name="add">Yangi missiya</string>
<string name="ok">Ok</string>
<string name="rename">Nomni o\'zgartirish</string>
<string name="dismiss">Tarqatish</string>
<string name="checksum">Sumnazorat</string>
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/res/values-b+zh+HANS+CN/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,7 @@
<string name="view">播放</string>
<string name="delete">删除</string>
<string name="checksum">校验</string>
<string name="add">新任务</string>
<string name="finish">确定</string>
<string name="ok">确定</string>
<string name="msg_name">文件名</string>
<string name="msg_threads">线程数</string>
<string name="msg_error">错误</string>
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/res/values-be/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,7 @@
<string name="checksum">Кантрольная сума</string>
<string name="dismiss">Адхіліць</string>
<string name="rename">Перайменаваць</string>
<string name="add">Новая мэта</string>
<string name="finish">ОК</string>
<string name="ok">ОК</string>
<string name="msg_name">Імя файла</string>
<string name="msg_threads">Патокі</string>
<string name="msg_error">Памылка</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-ber/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<string name="msg_wait">ⵕⴰⵊⴰ…</string>
<string name="msg_error">ⵜⴰⵣⴳⵍⵜ</string>
<string name="msg_name">ⵉⵙⵎ ⵓⴼⴰⵢⵍⵓ</string>
<string name="finish">ⵡⴰⵅⵅⴰ</string>
<string name="ok">ⵡⴰⵅⵅⴰ</string>
<string name="rename">ⵙⵙⵏⴼⵍ ⵉⵙⵎ</string>
<string name="dismiss">ⵙⵙⵔ</string>
<string name="delete_all">ⴽⴽⵙ ⵎⴰⵕⵕⴰ</string>
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/res/values-bg/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
<string name="view">Начало</string>
<string name="delete">Изтрий</string>
<string name="checksum">Контролна сума</string>
<string name="finish">ОК</string>
<string name="ok">ОК</string>
<string name="msg_name">Име на файла</string>
<string name="msg_threads">Нишки</string>
<string name="msg_error">Грешка</string>
Expand Down Expand Up @@ -260,7 +260,6 @@
<string name="start">Начало</string>
<string name="delete_one">Изтрий един</string>
<string name="rename">Преименувай</string>
<string name="add">Нова цел</string>
<string name="no_available_dir">Моля, изберете достъпна папка за изтегляния</string>
<string name="msg_popup_permission">Това разрешение се изисква за
\nвъзпроизвеждане в отделен прозорец</string>
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/res/values-bn-rBD/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,7 @@
<string name="delete">ডিলেট</string>
<string name="checksum">চেকসাম</string>
<!-- Fragment -->
<string name="add">নতুন মিশন</string>
<string name="finish">ঠিক আছে</string>
<string name="ok">ঠিক আছে</string>
<!-- Msg -->
<string name="msg_name">ফাইলের নাম</string>
<string name="msg_threads">থ্রেড</string>
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/res/values-bn-rIN/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
<string name="msg_error">ত্রুটি</string>
<string name="msg_threads">থ্রেড</string>
<string name="msg_name">ফাইলের নাম</string>
<string name="finish">ঠিক আছে</string>
<string name="add">নতুন মিশন</string>
<string name="ok">ঠিক আছে</string>
<string name="rename">নাম পরিবর্তন করুন</string>
<string name="checksum">চেকসাম</string>
<string name="delete">ডিলেট</string>
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/res/values-bn/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,7 @@
<string name="msg_error">ত্রুটি</string>
<string name="msg_threads">থ্রেড</string>
<string name="msg_name">ফাইলের নাম</string>
<string name="finish">ঠিক আছে</string>
<string name="add">নতুন মিশন</string>
<string name="ok">ঠিক আছে</string>
<string name="rename">নাম পরিবর্তন করুন</string>
<string name="dismiss">সরাও</string>
<string name="checksum">চেকসাম</string>
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/res/values-ca/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
<item quantity="one">%s subscriptor</item>
<item quantity="other">%s subscriptors</item>
</plurals>
<string name="finish">D\'acord</string>
<string name="ok">D\'acord</string>
<string name="msg_name">Nom de fitxer</string>
<string name="msg_error">Error</string>
<string name="settings_category_downloads_title">Baixades</string>
Expand Down Expand Up @@ -292,7 +292,6 @@
<string name="short_million">milions</string>
<string name="short_billion">mil milions</string>
<string name="start">Inicia</string>
<string name="add">Nova missió</string>
<string name="msg_url_malform">L\'URL té un format no vàlid o no hi ha connexió a Internet</string>
<string name="msg_running_detail">Feu un toc aquí per a més detalls</string>
<string name="no_available_dir">Defineix una carpeta de baixades més endavant als paràmetres</string>
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/res/values-ckb/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
</plurals>
<string name="delete_one">سڕینەوەی یەک</string>
<string name="show_higher_resolutions_title">پیشاندانی قه‌باره‌ی به‌رزتر</string>
<string name="add">ئەرکی نوێ</string>
<string name="queued">نۆبه‌تكراو</string>
<string name="generate_unique_name">دانانی ناوی نوێ</string>
<string name="import_data_summary">ده‌چه‌سپێت لەسەر مێژووی ئێستات، بەژدارییه‌كانت، خشته‌لێدانه‌كانت و ڕێكخستنه‌كانت</string>
Expand Down Expand Up @@ -299,7 +298,7 @@
</plurals>
<string name="rename_playlist">ناولێنانه‌وه‌</string>
<string name="download">دابه‌زاندن</string>
<string name="finish">باشە</string>
<string name="ok">باشە</string>
<string name="metadata_cache_wipe_title">سڕینه‌وه‌ی پاشماوەی مێتاداتا</string>
<string name="error_download_resource_gone">ناتوانرێت ئەمه‌ داببه‌زێنرێته‌وه‌</string>
<string name="unsubscribe">بەژدارنەبوون</string>
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/res/values-cs/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,7 @@
<string name="your_comment">Vaše poznámky (anglicky):</string>
<string name="storage_permission_denied">Nejdříve udělit oprávnění přístupu k úložišti</string>
<string name="view">Přehrát</string>
<string name="add">Nová mise</string>
<string name="finish">OK</string>
<string name="ok">OK</string>
<string name="title_activity_recaptcha">Výzva reCAPTCHA</string>
<string name="recaptcha_request_toast">Požadována výzva reCAPTCHA</string>
<string name="black_theme_title">Černé</string>
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/res/values-da/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,7 @@
<string name="checksum">Kontrolsum</string>
<string name="dismiss">Afvis</string>
<string name="rename">Omdøb</string>
<string name="add">Ny mission</string>
<string name="finish">OK</string>
<string name="ok">OK</string>
<string name="msg_name">Filnavn</string>
<string name="msg_threads">Tråde</string>
<string name="msg_error">Fejl</string>
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,7 @@
<string name="start">Starten</string>
<string name="pause">Pause</string>
<string name="view">Abspielen</string>
<string name="add">Neue Mission</string>
<string name="finish">OK</string>
<string name="ok">OK</string>
<string name="msg_server_unsupported">Nicht unterstützter Server</string>
<string name="could_not_load_image">Konnte Bild nicht laden</string>
<string name="app_ui_crash">App/UI abgestürzt</string>
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/res/values-el/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,7 @@
<string name="checksum">Άθροισμα ελέγχου</string>
<string name="dismiss">Αγνόηση</string>
<string name="rename">Μετονομασία</string>
<string name="add">Νέα αποστολή</string>
<string name="finish">Εντάξει</string>
<string name="ok">Εντάξει</string>
<string name="msg_name">Όνομα αρχείου</string>
<string name="msg_threads">Νήματα</string>
<string name="msg_server_unsupported">Ο εξυπηρετητής δεν υποστηρίζεται</string>
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/res/values-eo/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,7 @@
<string name="view">Ludi</string>
<string name="delete">Forviŝi</string>
<string name="checksum">Kontrolsumo</string>
<string name="add">Nova misio</string>
<string name="finish">Bone</string>
<string name="ok">Bone</string>
<string name="msg_name">Dosiernomo</string>
<string name="msg_threads">Fadenoj</string>
<string name="msg_error">Eraro</string>
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/res/values-es/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,7 @@
<string name="view">Reproducir</string>
<string name="delete">Borrar</string>
<string name="checksum">Suma de comprobación</string>
<string name="add">Misión nueva</string>
<string name="finish">Aceptar</string>
<string name="ok">Aceptar</string>
<string name="msg_name">Nombre del archivo</string>
<string name="msg_threads">Subprocesos</string>
<string name="msg_error">Error</string>
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/res/values-et/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,7 @@
<string name="checksum">Kontrollsumma</string>
<string name="dismiss">Loobu</string>
<string name="rename">Nimeta ümber</string>
<string name="add">Uus ülesanne</string>
<string name="finish">OK</string>
<string name="ok">OK</string>
<string name="msg_name">Faili nimi</string>
<string name="msg_threads">Lõimed</string>
<string name="msg_error">Viga</string>
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/res/values-eu/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,7 @@
<string name="view">Jo</string>
<string name="delete">Ezabatu</string>
<string name="checksum">Egiaztaketa-batura</string>
<string name="add">Misio berria</string>
<string name="finish">Ados</string>
<string name="ok">Ados</string>
<string name="msg_name">Fitxategi-izena</string>
<string name="msg_threads">Hariak</string>
<string name="msg_error">Errorea</string>
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/res/values-fa/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,7 @@
<string name="view">پخش</string>
<string name="delete">حذف</string>
<string name="checksum">مجموع مقابله‌ای</string>
<string name="add">مآموریت جدید</string>
<string name="finish">قبول</string>
<string name="ok">قبول</string>
<string name="msg_name">نام پرونده</string>
<string name="msg_threads">رشته‌ها</string>
<string name="msg_error">خطا</string>
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/res/values-fi/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,7 @@
<string name="view">Toista</string>
<string name="delete">Poista</string>
<string name="checksum">Tarkistussumma</string>
<string name="add">Uusi tehtävä</string>
<string name="finish">OK</string>
<string name="ok">OK</string>
<string name="msg_name">Tiedostonimi</string>
<string name="msg_threads">Säikeet</string>
<string name="msg_error">Virhe</string>
Expand Down
Loading