From ea816b28cbb93657a2b408d5bbc7d7284d06d87e Mon Sep 17 00:00:00 2001 From: Sergiy Kozyr Date: Fri, 10 Dec 2021 12:29:34 +0200 Subject: [PATCH] [Android] Edit text dialog improvements (#1663) * Removed EditTextDialogInterface. Added validator and dialog text consumers as EditTextDialogFragment members. EditTextDialogFragment.Validator now return error description. Dialog shows error message. Signed-off-by: S. Kozyr * Added 2 string values: empty_street_name_error -> "Please enter street name", delete_place_empty_comment_error -> "Please enter comment" Signed-off-by: S. Kozyr * Removed hit above text input in dialog_edit_text.xml layout Formatting. Signed-off-by: S. Kozyr * Updated translation of "empty_street_name_error" and "delete_place_empty_comment_error" strings Signed-off-by: S. Kozyr * Removed unused MenuClickProcessorBase.EditAction class because "Edit" menu item was replaced with "Settings" in BookmarkCategoriesFragment Removed "Rename" string constant. Signed-off-by: S. Kozyr --- android/res/layout/dialog_edit_text.xml | 5 +- android/res/values-ar/strings.xml | 2 + android/res/values-be/strings.xml | 4 + android/res/values-cs/strings.xml | 2 + android/res/values-da/strings.xml | 2 + android/res/values-de/strings.xml | 2 + android/res/values-el/strings.xml | 2 + android/res/values-es/strings.xml | 2 + android/res/values-fa/strings.xml | 2 + android/res/values-ru/strings.xml | 4 + android/res/values-uk/strings.xml | 4 + android/res/values/strings.xml | 4 + .../bookmarks/BookmarkCategoriesFragment.java | 58 ++------- .../maps/bookmarks/CategoryValidator.java | 17 +-- .../ChooseBookmarkCategoryFragment.java | 28 ++--- .../maps/dialog/EditTextDialogFragment.java | 118 +++++++++++------- .../maps/editor/EditorFragment.java | 39 +++--- .../mapswithme/maps/editor/StreetAdapter.java | 10 +- .../maps/editor/StreetFragment.java | 18 +-- android/src/com/mapswithme/util/Option.java | 17 ++- data/strings/strings.txt | 62 ++++----- .../ar.lproj/Localizable.strings | 6 + .../be.lproj/Localizable.strings | 6 + .../bg.lproj/Localizable.strings | 6 + .../cs.lproj/Localizable.strings | 6 + .../da.lproj/Localizable.strings | 6 + .../de.lproj/Localizable.strings | 6 + .../el.lproj/Localizable.strings | 6 + .../en-GB.lproj/Localizable.strings | 6 + .../en.lproj/Localizable.strings | 6 + .../es-MX.lproj/Localizable.strings | 6 + .../es.lproj/Localizable.strings | 6 + .../fa.lproj/Localizable.strings | 6 + .../fi.lproj/Localizable.strings | 6 + .../fr.lproj/Localizable.strings | 6 + .../hu.lproj/Localizable.strings | 6 + .../id.lproj/Localizable.strings | 6 + .../it.lproj/Localizable.strings | 6 + .../ja.lproj/Localizable.strings | 6 + .../ko.lproj/Localizable.strings | 6 + .../nb.lproj/Localizable.strings | 6 + .../nl.lproj/Localizable.strings | 6 + .../pl.lproj/Localizable.strings | 6 + .../pt-BR.lproj/Localizable.strings | 6 + .../pt.lproj/Localizable.strings | 6 + .../ro.lproj/Localizable.strings | 6 + .../ru.lproj/Localizable.strings | 6 + .../sk.lproj/Localizable.strings | 6 + .../sv.lproj/Localizable.strings | 6 + .../th.lproj/Localizable.strings | 6 + .../tr.lproj/Localizable.strings | 6 + .../uk.lproj/Localizable.strings | 6 + .../vi.lproj/Localizable.strings | 6 + .../zh-Hans.lproj/Localizable.strings | 6 + .../zh-Hant.lproj/Localizable.strings | 6 + 55 files changed, 412 insertions(+), 194 deletions(-) diff --git a/android/res/layout/dialog_edit_text.xml b/android/res/layout/dialog_edit_text.xml index 18e59c703d..71b94fab61 100644 --- a/android/res/layout/dialog_edit_text.xml +++ b/android/res/layout/dialog_edit_text.xml @@ -2,6 +2,7 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content" + xmlns:app="http://schemas.android.com/apk/res-auto" android:minWidth="@dimen/width_dialog_base" android:orientation="vertical" android:padding="@dimen/margin_base_plus"> @@ -12,11 +13,11 @@ android:layout_marginBottom="@dimen/margin_base" android:textAppearance="@style/MwmTextAppearance.Title" /> + app:hintEnabled="false"> التفاصيل إضافة شارع + + ﻉﺭﺎﺷ ﻢﺳﺍ ﻞﺧﺩﺃ اختر اللغة اختر الشارع الرمز البريدي diff --git a/android/res/values-be/strings.xml b/android/res/values-be/strings.xml index 40b8ea34a5..6ff5c45fa9 100644 --- a/android/res/values-be/strings.xml +++ b/android/res/values-be/strings.xml @@ -460,6 +460,8 @@ Падрабязнасці Дадаць вуліцу + + Увядзіце назву вуліцы Выбраць мову Выбраць вуліцу Паштовы індэкс @@ -555,6 +557,8 @@ Выдаліць даданае месца? Выдаліць Месца не існуе + + Калі ласка, укажыце прычыну выдалення …яшчэ Увядзіце нумар тэлефона правільна diff --git a/android/res/values-cs/strings.xml b/android/res/values-cs/strings.xml index 7f8f65326f..b13096c755 100644 --- a/android/res/values-cs/strings.xml +++ b/android/res/values-cs/strings.xml @@ -448,6 +448,8 @@ Podrobnosti Přidat ulici + + Zadejte název ulice Zvolit jazyk Zvolit ulici PSČ diff --git a/android/res/values-da/strings.xml b/android/res/values-da/strings.xml index 5f7c90a141..8b55b92624 100644 --- a/android/res/values-da/strings.xml +++ b/android/res/values-da/strings.xml @@ -448,6 +448,8 @@ Oplysninger Tilføj en gade + + Indtast et gadenavn Vælg et sprog Vælg en gade Postnummer diff --git a/android/res/values-de/strings.xml b/android/res/values-de/strings.xml index 6004ba0bde..e4ccb363f4 100644 --- a/android/res/values-de/strings.xml +++ b/android/res/values-de/strings.xml @@ -456,6 +456,8 @@ Einzelheiten Eine Straße hinzufügen + + Geben Sie einen Straßennamen ein Eine Sprache wählen Eine Straße wählen Postleitzahl diff --git a/android/res/values-el/strings.xml b/android/res/values-el/strings.xml index 2931f25eed..8e925d1dc2 100644 --- a/android/res/values-el/strings.xml +++ b/android/res/values-el/strings.xml @@ -450,6 +450,8 @@ Λεπτομέρειες Προσθέστε ένα δρόμο + + Εισαγάγετε ένα όνομα οδού Επιλέξτε μια γλώσσα Επιλέξτε μια οδό Κουζίνα diff --git a/android/res/values-es/strings.xml b/android/res/values-es/strings.xml index c9a1727d5d..88d00ea57b 100644 --- a/android/res/values-es/strings.xml +++ b/android/res/values-es/strings.xml @@ -455,6 +455,8 @@ Detalles Añadir una calle + + Ingrese un nombre de calle Elegir un idioma Elegir una calle Código postal diff --git a/android/res/values-fa/strings.xml b/android/res/values-fa/strings.xml index 95fd65c197..53aedf37bc 100644 --- a/android/res/values-fa/strings.xml +++ b/android/res/values-fa/strings.xml @@ -439,6 +439,8 @@ جزئیات اضافه کردن خیابان + + ﺪﯿﻨﮐ ﺩﺭﺍﻭ ﺍﺭ ﻥﺎﺑﺎﯿﺧ ﻡﺎﻧ انتخاب یک زبان انتخاب یک خیابان کد پستی diff --git a/android/res/values-ru/strings.xml b/android/res/values-ru/strings.xml index 0605c7be35..1ef0515b7e 100644 --- a/android/res/values-ru/strings.xml +++ b/android/res/values-ru/strings.xml @@ -458,6 +458,8 @@ Подробнее Добавить улицу + + Введите название улицы Выбрать язык Выбрать улицу Почтовый индекс @@ -554,6 +556,8 @@ Удалить добавленный вами объект? Удалить Места не существует + + Пожалуйста, укажите причину удаления …ещё Введите корректный номер телефона diff --git a/android/res/values-uk/strings.xml b/android/res/values-uk/strings.xml index 710444657d..f3d95505af 100644 --- a/android/res/values-uk/strings.xml +++ b/android/res/values-uk/strings.xml @@ -451,6 +451,8 @@ Детальніше Додати вулицю + + Введіть назву вулиці Вибрати мову Вибрати вулицю Поштовий індекс @@ -546,6 +548,8 @@ Видалити об\'єкт, що ви додали? Видалити Місце не існує + + Будь ласка, вкажіть причину видалення …більше Введіть правильний номер телефону diff --git a/android/res/values/strings.xml b/android/res/values/strings.xml index dfa8af877d..31b872e8f8 100644 --- a/android/res/values/strings.xml +++ b/android/res/values/strings.xml @@ -476,6 +476,8 @@ Details Add a street + + Please enter a street name Choose a language Choose a street Postal Code @@ -572,6 +574,8 @@ Delete added place? Delete Place does not exist + + Please indicate the reason for deleting the place …more Enter a valid phone number diff --git a/android/src/com/mapswithme/maps/bookmarks/BookmarkCategoriesFragment.java b/android/src/com/mapswithme/maps/bookmarks/BookmarkCategoriesFragment.java index 4bdc8f9eb9..c8fef0f0f9 100644 --- a/android/src/com/mapswithme/maps/bookmarks/BookmarkCategoriesFragment.java +++ b/android/src/com/mapswithme/maps/bookmarks/BookmarkCategoriesFragment.java @@ -45,8 +45,7 @@ import java.util.List; import java.util.concurrent.atomic.AtomicInteger; public class BookmarkCategoriesFragment extends BaseMwmRecyclerFragment - implements EditTextDialogFragment.EditTextDialogInterface, - MenuItem.OnMenuItemClickListener, + implements MenuItem.OnMenuItemClickListener, BookmarkManager.BookmarksLoadingListener, CategoryListCallback, OnItemClickListener, @@ -229,11 +228,16 @@ public class BookmarkCategoriesFragment extends BaseMwmRecyclerFragment - { - BookmarkManager.INSTANCE.setCategoryName(category.getId(), newName); - }; - EditTextDialogFragment.show(frag.getString(R.string.bookmark_set_name), - category.getName(), - frag.getString(R.string.rename), - frag.getString(R.string.cancel), - MAX_CATEGORY_NAME_LENGTH, - frag); - } - } - protected static class OpenListSettings extends MenuClickProcessorBase { @Override diff --git a/android/src/com/mapswithme/maps/bookmarks/CategoryValidator.java b/android/src/com/mapswithme/maps/bookmarks/CategoryValidator.java index a2d462e534..57fa8b9ffb 100644 --- a/android/src/com/mapswithme/maps/bookmarks/CategoryValidator.java +++ b/android/src/com/mapswithme/maps/bookmarks/CategoryValidator.java @@ -10,26 +10,19 @@ import com.mapswithme.maps.R; import com.mapswithme.maps.bookmarks.data.BookmarkManager; import com.mapswithme.maps.dialog.DialogUtils; import com.mapswithme.maps.dialog.EditTextDialogFragment; +import com.mapswithme.util.Option; class CategoryValidator implements EditTextDialogFragment.Validator { @Override - public boolean validate(@NonNull Activity activity, @Nullable String text) + public Option validate(@NonNull Activity activity, @Nullable String text) { if (TextUtils.isEmpty(text)) - { - DialogUtils.showAlertDialog(activity, R.string.bookmarks_error_title_empty_list_name, - R.string.bookmarks_error_message_empty_list_name); - return false; - } + return new Option<>(activity.getString(R.string.bookmarks_error_title_empty_list_name)); if (BookmarkManager.INSTANCE.isUsedCategoryName(text)) - { - DialogUtils.showAlertDialog(activity, R.string.bookmarks_error_title_list_name_already_taken, - R.string.bookmarks_error_message_list_name_already_taken); - return false; - } + return new Option<>(activity.getString(R.string.bookmarks_error_title_list_name_already_taken)); - return true; + return Option.empty(); } } diff --git a/android/src/com/mapswithme/maps/bookmarks/ChooseBookmarkCategoryFragment.java b/android/src/com/mapswithme/maps/bookmarks/ChooseBookmarkCategoryFragment.java index ca0b4326ca..45229fcbdc 100644 --- a/android/src/com/mapswithme/maps/bookmarks/ChooseBookmarkCategoryFragment.java +++ b/android/src/com/mapswithme/maps/bookmarks/ChooseBookmarkCategoryFragment.java @@ -21,8 +21,7 @@ import com.mapswithme.maps.dialog.EditTextDialogFragment; import java.util.List; public class ChooseBookmarkCategoryFragment extends BaseMwmDialogFragment - implements EditTextDialogFragment.EditTextDialogInterface, - ChooseBookmarkCategoryAdapter.CategoryListener + implements ChooseBookmarkCategoryAdapter.CategoryListener { public static final String CATEGORY_POSITION = "ExtraCategoryPosition"; @@ -79,21 +78,6 @@ public class ChooseBookmarkCategoryFragment extends BaseMwmDialogFragment super.onAttach(activity); } - @NonNull - @Override - public EditTextDialogFragment.OnTextSaveListener getSaveTextListener() - { - return this::createCategory; - } - - @NonNull - @Override - public EditTextDialogFragment.Validator getValidator() - { - return new CategoryValidator(); - } - - private void createCategory(@NonNull String name) { BookmarkManager.INSTANCE.createCategory(name); @@ -142,7 +126,13 @@ public class ChooseBookmarkCategoryFragment extends BaseMwmDialogFragment @Override public void onCategoryCreate() { - EditTextDialogFragment.show(getString(R.string.bookmark_set_name), null, - getString(R.string.ok), null, this); + EditTextDialogFragment dialogFragment = + EditTextDialogFragment.show(getString(R.string.bookmark_set_name), + null, + getString(R.string.ok), + null, + this, + new CategoryValidator()); + dialogFragment.setTextSaveListener(this::createCategory); } } diff --git a/android/src/com/mapswithme/maps/dialog/EditTextDialogFragment.java b/android/src/com/mapswithme/maps/dialog/EditTextDialogFragment.java index b17736f30a..2968b4fef2 100644 --- a/android/src/com/mapswithme/maps/dialog/EditTextDialogFragment.java +++ b/android/src/com/mapswithme/maps/dialog/EditTextDialogFragment.java @@ -3,10 +3,12 @@ package com.mapswithme.maps.dialog; import android.annotation.SuppressLint; import android.app.Activity; import android.app.Dialog; +import android.content.DialogInterface; import android.os.Bundle; import android.text.InputFilter; import android.text.TextUtils; import android.view.View; +import android.widget.Button; import android.widget.EditText; import android.widget.TextView; @@ -15,10 +17,13 @@ import androidx.annotation.Nullable; import androidx.appcompat.app.AlertDialog; import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentActivity; import com.google.android.material.textfield.TextInputLayout; import com.mapswithme.maps.R; import com.mapswithme.maps.base.BaseMwmDialogFragment; import com.mapswithme.util.InputUtils; +import com.mapswithme.util.Option; +import com.mapswithme.util.StringUtils; public class EditTextDialogFragment extends BaseMwmDialogFragment { @@ -35,50 +40,47 @@ public class EditTextDialogFragment extends BaseMwmDialogFragment private String mInitialText; private String mHint; private EditText mEtInput; + private TextInputLayout mEtInputLayout; + private Button mPositiveButton; + private Validator mInputValidator; + private OnTextSaveListener mTextSaveListener; - public interface EditTextDialogInterface - { - @NonNull - OnTextSaveListener getSaveTextListener(); - - @NonNull - Validator getValidator(); - } - + // Interface of dialog input consumer. public interface OnTextSaveListener { void onSaveText(@NonNull String text); } + // Interface of dialog input validator. public interface Validator { - boolean validate(@NonNull Activity activity, @Nullable String text); + Option validate(@NonNull Activity activity, @Nullable String text); } - public static void show(@Nullable String title, @Nullable String initialText, + public static EditTextDialogFragment show(@Nullable String title, @Nullable String initialText, @Nullable String positiveBtn, @Nullable String negativeBtn, - @NonNull Fragment parent) + @NonNull Fragment parent, @Nullable Validator inputValidator) { - show(title, initialText, "", positiveBtn, negativeBtn, NO_LIMITED_TEXT_LENGTH, parent); + return show(title, initialText, "", positiveBtn, negativeBtn, NO_LIMITED_TEXT_LENGTH, parent, inputValidator); } - public static void show(@Nullable String title, @Nullable String initialText, + public static EditTextDialogFragment show(@Nullable String title, @Nullable String initialText, @Nullable String positiveBtn, @Nullable String negativeBtn, - int textLimit, @NonNull Fragment parent) + int textLimit, @NonNull Fragment parent, @Nullable Validator inputValidator) { - show(title, initialText, "", positiveBtn, negativeBtn, textLimit, parent); + return show(title, initialText, "", positiveBtn, negativeBtn, textLimit, parent, inputValidator); } - public static void show(@Nullable String title, @Nullable String initialText, @Nullable String hint, + public static EditTextDialogFragment show(@Nullable String title, @Nullable String initialText, @Nullable String hint, @Nullable String positiveBtn, @Nullable String negativeBtn, - @NonNull Fragment parent) + @NonNull Fragment parent, @Nullable Validator inputValidator) { - show(title, initialText, hint, positiveBtn, negativeBtn, NO_LIMITED_TEXT_LENGTH, parent); + return show(title, initialText, hint, positiveBtn, negativeBtn, NO_LIMITED_TEXT_LENGTH, parent, inputValidator); } - public static void show(@Nullable String title, @Nullable String initialText, @Nullable String hint, + public static EditTextDialogFragment show(@Nullable String title, @Nullable String initialText, @Nullable String hint, @Nullable String positiveBtn, @Nullable String negativeBtn, int textLimit, - @NonNull Fragment parent) + @NonNull Fragment parent, @Nullable Validator inputValidator) { final Bundle args = new Bundle(); args.putString(ARG_TITLE, title); @@ -90,6 +92,14 @@ public class EditTextDialogFragment extends BaseMwmDialogFragment final EditTextDialogFragment fragment = (EditTextDialogFragment) Fragment.instantiate(parent.getActivity(), EditTextDialogFragment.class.getName()); fragment.setArguments(args); fragment.show(parent.getChildFragmentManager(), EditTextDialogFragment.class.getName()); + fragment.mInputValidator = inputValidator; + + return fragment; + } + + public void setTextSaveListener(OnTextSaveListener textSaveListener) + { + mTextSaveListener = textSaveListener; } @NonNull @@ -109,46 +119,62 @@ public class EditTextDialogFragment extends BaseMwmDialogFragment negativeButtonText = args.getString(ARG_NEGATIVE_BUTTON); } - return new AlertDialog.Builder(getActivity()) + AlertDialog editTextDialog = new AlertDialog.Builder(getActivity()) .setView(buildView()) .setNegativeButton(negativeButtonText, null) .setPositiveButton(positiveButtonText, (dialog, which) -> { - final Fragment parentFragment = getParentFragment(); final String result = mEtInput.getText().toString(); - if (parentFragment instanceof EditTextDialogInterface) - { - dismiss(); - processInput((EditTextDialogInterface) parentFragment, result); - return; - } - - final Activity activity = getActivity(); - if (activity instanceof EditTextDialogInterface) - { - processInput((EditTextDialogInterface) activity, result); - } + processInput(result); + dismiss(); }).create(); + + // Wait till alert is shown to get mPositiveButton. + editTextDialog.setOnShowListener((dialog) -> { + mPositiveButton = editTextDialog.getButton(DialogInterface.BUTTON_POSITIVE); + this.validateInput(getActivity(), mInitialText); + }); + + + // Setup validation on input edit. + mEtInput.addTextChangedListener(new StringUtils.SimpleTextWatcher() + { + @Override + public void onTextChanged(CharSequence s, int start, int before, int count) + { + EditTextDialogFragment.this.validateInput(getActivity(), s.toString()); + } + }); + + return editTextDialog; } - private void processInput(@NonNull EditTextDialogInterface editInterface, - @Nullable String text) + private void validateInput(@NonNull FragmentActivity activity, @Nullable String input) { - Validator validator = editInterface.getValidator(); - if (!validator.validate(getActivity(), text)) - return; + if (mPositiveButton != null && mInputValidator != null) + { + Option maybeError = mInputValidator.validate(activity, input); + mPositiveButton.setEnabled(!maybeError.hasValue()); + mEtInputLayout.setError(maybeError.getOrElse(null)); + } + } - if (TextUtils.isEmpty(text)) - throw new AssertionError("Input must be non-empty!"); + private void processInput(@Nullable String text) + { + if (mTextSaveListener != null) + { + if (TextUtils.isEmpty(text)) + throw new AssertionError("Input must be non-empty!"); - editInterface.getSaveTextListener().onSaveText(text); + mTextSaveListener.onSaveText(text); + } } private View buildView() { @SuppressLint("InflateParams") final View root = getActivity().getLayoutInflater().inflate(R.layout.dialog_edit_text, null); - TextInputLayout inputLayout = root.findViewById(R.id.input); - inputLayout.setHint(TextUtils.isEmpty(mHint) ? getString(R.string.name) : mHint); - mEtInput = inputLayout.findViewById(R.id.et__input); + mEtInputLayout = root.findViewById(R.id.et__input_layout); + mEtInput = mEtInputLayout.findViewById(R.id.et__input); + mEtInput.setHint(TextUtils.isEmpty(mHint) ? getString(R.string.name) : mHint); int maxLength = getArguments().getInt(ARG_TEXT_LENGTH_LIMIT); if (maxLength != NO_LIMITED_TEXT_LENGTH) { diff --git a/android/src/com/mapswithme/maps/editor/EditorFragment.java b/android/src/com/mapswithme/maps/editor/EditorFragment.java index 13d9c6eb8c..428e898b3d 100644 --- a/android/src/com/mapswithme/maps/editor/EditorFragment.java +++ b/android/src/com/mapswithme/maps/editor/EditorFragment.java @@ -38,12 +38,12 @@ import com.mapswithme.maps.editor.data.Timetable; import com.mapswithme.util.Constants; import com.mapswithme.util.Graphics; import com.mapswithme.util.InputUtils; +import com.mapswithme.util.Option; import com.mapswithme.util.StringUtils; import com.mapswithme.util.UiUtils; import com.mapswithme.util.Utils; -public class EditorFragment extends BaseMwmFragment implements View.OnClickListener, - EditTextDialogFragment.EditTextDialogInterface +public class EditorFragment extends BaseMwmFragment implements View.OnClickListener { final static String LAST_INDEX_OF_NAMES_ARRAY = "LastIndexOfNamesArray"; @@ -783,24 +783,31 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe private void placeDoesntExist() { - EditTextDialogFragment.show(getString(R.string.editor_place_doesnt_exist), "", getString(R.string.editor_comment_hint), - getString(R.string.editor_report_problem_send_button), getString(R.string.cancel), this); + EditTextDialogFragment dialogFragment = + EditTextDialogFragment.show(getString(R.string.editor_place_doesnt_exist), + "", + getString(R.string.editor_comment_hint), + getString(R.string.editor_report_problem_send_button), + getString(R.string.cancel), + this, + getDeleteCommentValidator()); + dialogFragment.setTextSaveListener(this::commitPlaceDoesntExists); + } + + private void commitPlaceDoesntExists(@NonNull String text) + { + Editor.nativePlaceDoesNotExist(text); + mParent.onBackPressed(); } @NonNull - @Override - public EditTextDialogFragment.OnTextSaveListener getSaveTextListener() + private EditTextDialogFragment.Validator getDeleteCommentValidator() { - return text -> { - Editor.nativePlaceDoesNotExist(text); - mParent.onBackPressed(); + return (activity, text) -> { + if (TextUtils.isEmpty(text)) + return new Option<>(activity.getString(R.string.delete_place_empty_comment_error)); + else + return Option.empty(); }; } - - @NonNull - @Override - public EditTextDialogFragment.Validator getValidator() - { - return (activity, text) -> !TextUtils.isEmpty(text); - } } diff --git a/android/src/com/mapswithme/maps/editor/StreetAdapter.java b/android/src/com/mapswithme/maps/editor/StreetAdapter.java index d0e0d33473..f7bfa70f82 100644 --- a/android/src/com/mapswithme/maps/editor/StreetAdapter.java +++ b/android/src/com/mapswithme/maps/editor/StreetAdapter.java @@ -65,9 +65,13 @@ public class StreetAdapter extends RecyclerView.Adapter - implements EditTextDialogFragment.EditTextDialogInterface { private LocalizedStreet mSelectedString; @@ -59,17 +60,18 @@ public class StreetFragment extends BaseMwmRecyclerFragment ((EditorHostFragment) getParentFragment()).setStreet(street); } - @NonNull - @Override - public EditTextDialogFragment.OnTextSaveListener getSaveTextListener() + public EditTextDialogFragment.OnTextSaveListener getSaveStreetListener() { return text -> saveStreet(new LocalizedStreet(text, "")); } - @NonNull - @Override - public EditTextDialogFragment.Validator getValidator() + public static EditTextDialogFragment.Validator getStreetValidator() { - return (activity, text) -> !TextUtils.isEmpty(text); + return (activity, text) -> { + if (TextUtils.isEmpty(text)) + return new Option<>(activity.getString(R.string.empty_street_name_error)); + else + return Option.empty(); + }; } } diff --git a/android/src/com/mapswithme/util/Option.java b/android/src/com/mapswithme/util/Option.java index d7e2ca01bd..8640f4d8a3 100644 --- a/android/src/com/mapswithme/util/Option.java +++ b/android/src/com/mapswithme/util/Option.java @@ -3,12 +3,15 @@ package com.mapswithme.util; public class Option { private final T mValue; - private final T mOption; - public Option(T useIfValueIsNull, T value) + public static Option empty() + { + return new Option<>(null); + } + + public Option(T value) { mValue = value; - mOption = useIfValueIsNull; } public boolean hasValue() @@ -18,6 +21,12 @@ public class Option public T get() { - return hasValue() ? mValue : mOption; + assert(hasValue()); + return mValue; + } + + public T getOrElse(T defaultValue) + { + return hasValue() ? mValue : defaultValue; } } diff --git a/data/strings/strings.txt b/data/strings/strings.txt index ab02de6e06..5e55f09d09 100644 --- a/data/strings/strings.txt +++ b/data/strings/strings.txt @@ -7856,42 +7856,6 @@ zh-Hans = 隐藏 zh-Hant = 隱藏 - [rename] - comment = «Rename» context menu - tags = android - en = Rename - ar = إعادة تسمية - be = Пераіменаваць - bg = Преименуване - cs = Přejmenovat - da = Omdøb - de = Umbenennen - el = Μετονομασία - es = Renombrar - fa = تغیر نام - fi = Nimeä uudelleen - fr = Renommer - hu = Átnevez - id = Ubah nama - it = Rinomina - ja = 名前を変更する - ko = 다른 이름으로 변경 - nb = Nytt navn - nl = Naam wijzigen - pl = Zmień nazwę - pt = Alterar nome - pt-BR = Renomear - ro = Redenumire - ru = Переименовать - sk = Premenovať - sv = Byt namn - th = เปลี่ยนชื่อ - tr = Yeniden Adlandır - uk = Перейменувати - vi = Đổi tên - zh-Hans = 重命名 - zh-Hant = 重新命名 - [routing_planning_error] comment = Failed planning route message in navigation view tags = ios @@ -9661,7 +9625,7 @@ zh-Hant = 今天沒有營業 [day_off] - tags = ios + tags = android, ios en = Closed ar = مغلق be = Зачынена @@ -10433,6 +10397,22 @@ zh-Hans = 添加街道 zh-Hant = 新增街道 + [empty_street_name_error] + comment = Error to display when a new street name is not entered in the New street dialog + tags = android + en = Please enter a street name + ar = ﻉﺭﺎﺷ ﻢﺳﺍ ﻞﺧﺩﺃ + be = Увядзіце назву вуліцы + bg = Въведете име на улица + cs = Zadejte název ulice + da = Indtast et gadenavn + de = Geben Sie einen Straßennamen ein + el = Εισαγάγετε ένα όνομα οδού + es = Ingrese un nombre de calle + fa = ﺪﯿﻨﮐ ﺩﺭﺍﻭ ﺍﺭ ﻥﺎﺑﺎﯿﺧ ﻡﺎﻧ + ru = Введите название улицы + uk = Введіть назву вулиці + [choose_language] tags = android, ios en = Choose a language @@ -13482,6 +13462,14 @@ zh-Hans = 位置不存在 zh-Hant = 位置不存在 + [delete_place_empty_comment_error] + comment = Error message for "Place doesn't exist" dialog when comment is empty + tags = android + en = Please indicate the reason for deleting the place + be = Калі ласка, укажыце прычыну выдалення + ru = Пожалуйста, укажите причину удаления + uk = Будь ласка, вкажіть причину видалення + [text_more_button] tags = ios en = …more diff --git a/iphone/Maps/LocalizedStrings/ar.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/ar.lproj/Localizable.strings index d32c22a741..4a90d81be6 100644 --- a/iphone/Maps/LocalizedStrings/ar.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/ar.lproj/Localizable.strings @@ -780,6 +780,9 @@ /* Text field to enter non-existing street name, below list of known streets around */ "add_street" = "إضافة شارع"; +/* Error to display when a new street name is not entered in the New street dialog */ +"empty_street_name_error" = "ﻉﺭﺎﺷ ﻢﺳﺍ ﻞﺧﺩﺃ"; + "choose_language" = "اختر اللغة"; "choose_street" = "اختر الشارع"; @@ -964,6 +967,9 @@ "editor_place_doesnt_exist" = "المكان غير موجود"; +/* Error message for "Place doesn't exist" dialog when comment is empty */ +"delete_place_empty_comment_error" = "Please indicate the reason for deleting the place"; + "text_more_button" = "…المزيد"; /* Phone number error message */ diff --git a/iphone/Maps/LocalizedStrings/be.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/be.lproj/Localizable.strings index 76259abe5b..4605532e55 100644 --- a/iphone/Maps/LocalizedStrings/be.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/be.lproj/Localizable.strings @@ -780,6 +780,9 @@ /* Text field to enter non-existing street name, below list of known streets around */ "add_street" = "Дадаць вуліцу"; +/* Error to display when a new street name is not entered in the New street dialog */ +"empty_street_name_error" = "Увядзіце назву вуліцы"; + "choose_language" = "Выбраць мову"; "choose_street" = "Выбраць вуліцу"; @@ -964,6 +967,9 @@ "editor_place_doesnt_exist" = "Месца не існуе"; +/* Error message for "Place doesn't exist" dialog when comment is empty */ +"delete_place_empty_comment_error" = "Калі ласка, укажыце прычыну выдалення"; + "text_more_button" = "…яшчэ"; /* Phone number error message */ diff --git a/iphone/Maps/LocalizedStrings/bg.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/bg.lproj/Localizable.strings index 24a686cf62..f18a994a01 100644 --- a/iphone/Maps/LocalizedStrings/bg.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/bg.lproj/Localizable.strings @@ -780,6 +780,9 @@ /* Text field to enter non-existing street name, below list of known streets around */ "add_street" = "Добавяне на улица"; +/* Error to display when a new street name is not entered in the New street dialog */ +"empty_street_name_error" = "Въведете име на улица"; + "choose_language" = "Избор на език"; "choose_street" = "Избор на улица"; @@ -964,6 +967,9 @@ "editor_place_doesnt_exist" = "Мястото не съществува"; +/* Error message for "Place doesn't exist" dialog when comment is empty */ +"delete_place_empty_comment_error" = "Please indicate the reason for deleting the place"; + "text_more_button" = "…още"; /* Phone number error message */ diff --git a/iphone/Maps/LocalizedStrings/cs.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/cs.lproj/Localizable.strings index 938c95f1c6..7a02dd0263 100644 --- a/iphone/Maps/LocalizedStrings/cs.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/cs.lproj/Localizable.strings @@ -780,6 +780,9 @@ /* Text field to enter non-existing street name, below list of known streets around */ "add_street" = "Přidat ulici"; +/* Error to display when a new street name is not entered in the New street dialog */ +"empty_street_name_error" = "Zadejte název ulice"; + "choose_language" = "Zvolit jazyk"; "choose_street" = "Zvolit ulici"; @@ -964,6 +967,9 @@ "editor_place_doesnt_exist" = "Místo neexistuje"; +/* Error message for "Place doesn't exist" dialog when comment is empty */ +"delete_place_empty_comment_error" = "Please indicate the reason for deleting the place"; + "text_more_button" = "…dále"; /* Phone number error message */ diff --git a/iphone/Maps/LocalizedStrings/da.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/da.lproj/Localizable.strings index 7235c8b639..c523379bff 100644 --- a/iphone/Maps/LocalizedStrings/da.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/da.lproj/Localizable.strings @@ -780,6 +780,9 @@ /* Text field to enter non-existing street name, below list of known streets around */ "add_street" = "Tilføj en gade"; +/* Error to display when a new street name is not entered in the New street dialog */ +"empty_street_name_error" = "Indtast et gadenavn"; + "choose_language" = "Vælg et sprog"; "choose_street" = "Vælg en gade"; @@ -964,6 +967,9 @@ "editor_place_doesnt_exist" = "Stedet eksisterer ikke"; +/* Error message for "Place doesn't exist" dialog when comment is empty */ +"delete_place_empty_comment_error" = "Please indicate the reason for deleting the place"; + "text_more_button" = "…mere"; /* Phone number error message */ diff --git a/iphone/Maps/LocalizedStrings/de.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/de.lproj/Localizable.strings index 2176836cb4..e174f6b982 100644 --- a/iphone/Maps/LocalizedStrings/de.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/de.lproj/Localizable.strings @@ -780,6 +780,9 @@ /* Text field to enter non-existing street name, below list of known streets around */ "add_street" = "Eine Straße hinzufügen"; +/* Error to display when a new street name is not entered in the New street dialog */ +"empty_street_name_error" = "Geben Sie einen Straßennamen ein"; + "choose_language" = "Eine Sprache wählen"; "choose_street" = "Eine Straße wählen"; @@ -964,6 +967,9 @@ "editor_place_doesnt_exist" = "Dieser Ort existiert nicht"; +/* Error message for "Place doesn't exist" dialog when comment is empty */ +"delete_place_empty_comment_error" = "Please indicate the reason for deleting the place"; + "text_more_button" = "…Mehr"; /* Phone number error message */ diff --git a/iphone/Maps/LocalizedStrings/el.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/el.lproj/Localizable.strings index 3fb6903f26..536804845c 100644 --- a/iphone/Maps/LocalizedStrings/el.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/el.lproj/Localizable.strings @@ -780,6 +780,9 @@ /* Text field to enter non-existing street name, below list of known streets around */ "add_street" = "Προσθέστε ένα δρόμο"; +/* Error to display when a new street name is not entered in the New street dialog */ +"empty_street_name_error" = "Εισαγάγετε ένα όνομα οδού"; + "choose_language" = "Επιλέξτε μια γλώσσα"; "choose_street" = "Επιλέξτε μια οδό"; @@ -964,6 +967,9 @@ "editor_place_doesnt_exist" = "Η τοποθεσία δεν υπάρχει"; +/* Error message for "Place doesn't exist" dialog when comment is empty */ +"delete_place_empty_comment_error" = "Please indicate the reason for deleting the place"; + "text_more_button" = "…περισσότερα"; /* Phone number error message */ diff --git a/iphone/Maps/LocalizedStrings/en-GB.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/en-GB.lproj/Localizable.strings index dd4fa7ce02..83b8269ba2 100644 --- a/iphone/Maps/LocalizedStrings/en-GB.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/en-GB.lproj/Localizable.strings @@ -780,6 +780,9 @@ /* Text field to enter non-existing street name, below list of known streets around */ "add_street" = "Add a street"; +/* Error to display when a new street name is not entered in the New street dialog */ +"empty_street_name_error" = "Please enter a street name"; + "choose_language" = "Choose a language"; "choose_street" = "Choose a street"; @@ -964,6 +967,9 @@ "editor_place_doesnt_exist" = "Place does not exist"; +/* Error message for "Place doesn't exist" dialog when comment is empty */ +"delete_place_empty_comment_error" = "Please indicate the reason for deleting the place"; + "text_more_button" = "…more"; /* Phone number error message */ diff --git a/iphone/Maps/LocalizedStrings/en.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/en.lproj/Localizable.strings index e60bbc07a9..f16c37034c 100644 --- a/iphone/Maps/LocalizedStrings/en.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/en.lproj/Localizable.strings @@ -780,6 +780,9 @@ /* Text field to enter non-existing street name, below list of known streets around */ "add_street" = "Add a street"; +/* Error to display when a new street name is not entered in the New street dialog */ +"empty_street_name_error" = "Please enter a street name"; + "choose_language" = "Choose a language"; "choose_street" = "Choose a street"; @@ -964,6 +967,9 @@ "editor_place_doesnt_exist" = "Place does not exist"; +/* Error message for "Place doesn't exist" dialog when comment is empty */ +"delete_place_empty_comment_error" = "Please indicate the reason for deleting the place"; + "text_more_button" = "…more"; /* Phone number error message */ diff --git a/iphone/Maps/LocalizedStrings/es-MX.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/es-MX.lproj/Localizable.strings index b7335d7855..06c889776c 100644 --- a/iphone/Maps/LocalizedStrings/es-MX.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/es-MX.lproj/Localizable.strings @@ -780,6 +780,9 @@ /* Text field to enter non-existing street name, below list of known streets around */ "add_street" = "Add a street"; +/* Error to display when a new street name is not entered in the New street dialog */ +"empty_street_name_error" = "Please enter a street name"; + "choose_language" = "Choose a language"; "choose_street" = "Choose a street"; @@ -964,6 +967,9 @@ "editor_place_doesnt_exist" = "Place does not exist"; +/* Error message for "Place doesn't exist" dialog when comment is empty */ +"delete_place_empty_comment_error" = "Please indicate the reason for deleting the place"; + "text_more_button" = "…more"; /* Phone number error message */ diff --git a/iphone/Maps/LocalizedStrings/es.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/es.lproj/Localizable.strings index 2928fc975b..26ca97a433 100644 --- a/iphone/Maps/LocalizedStrings/es.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/es.lproj/Localizable.strings @@ -780,6 +780,9 @@ /* Text field to enter non-existing street name, below list of known streets around */ "add_street" = "Añadir una calle"; +/* Error to display when a new street name is not entered in the New street dialog */ +"empty_street_name_error" = "Ingrese un nombre de calle"; + "choose_language" = "Elegir un idioma"; "choose_street" = "Elegir una calle"; @@ -964,6 +967,9 @@ "editor_place_doesnt_exist" = "El lugar no existe"; +/* Error message for "Place doesn't exist" dialog when comment is empty */ +"delete_place_empty_comment_error" = "Please indicate the reason for deleting the place"; + "text_more_button" = "…más"; /* Phone number error message */ diff --git a/iphone/Maps/LocalizedStrings/fa.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/fa.lproj/Localizable.strings index 3bf2780731..c3412cdcb6 100644 --- a/iphone/Maps/LocalizedStrings/fa.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/fa.lproj/Localizable.strings @@ -780,6 +780,9 @@ /* Text field to enter non-existing street name, below list of known streets around */ "add_street" = "اضافه کردن خیابان"; +/* Error to display when a new street name is not entered in the New street dialog */ +"empty_street_name_error" = "ﺪﯿﻨﮐ ﺩﺭﺍﻭ ﺍﺭ ﻥﺎﺑﺎﯿﺧ ﻡﺎﻧ"; + "choose_language" = "انتخاب یک زبان"; "choose_street" = "انتخاب یک خیابان"; @@ -964,6 +967,9 @@ "editor_place_doesnt_exist" = "مکان وجود ندارد"; +/* Error message for "Place doesn't exist" dialog when comment is empty */ +"delete_place_empty_comment_error" = "Please indicate the reason for deleting the place"; + "text_more_button" = "بیشتر…."; /* Phone number error message */ diff --git a/iphone/Maps/LocalizedStrings/fi.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/fi.lproj/Localizable.strings index 3ab87e6c6c..cae2f5266b 100644 --- a/iphone/Maps/LocalizedStrings/fi.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/fi.lproj/Localizable.strings @@ -780,6 +780,9 @@ /* Text field to enter non-existing street name, below list of known streets around */ "add_street" = "Lisää katu"; +/* Error to display when a new street name is not entered in the New street dialog */ +"empty_street_name_error" = "Please enter a street name"; + "choose_language" = "Valitse kieli"; "choose_street" = "Valitse katu"; @@ -964,6 +967,9 @@ "editor_place_doesnt_exist" = "Paikkaa ei ole olemassa"; +/* Error message for "Place doesn't exist" dialog when comment is empty */ +"delete_place_empty_comment_error" = "Please indicate the reason for deleting the place"; + "text_more_button" = "…Näytä"; /* Phone number error message */ diff --git a/iphone/Maps/LocalizedStrings/fr.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/fr.lproj/Localizable.strings index 76434da9b8..761e46019b 100644 --- a/iphone/Maps/LocalizedStrings/fr.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/fr.lproj/Localizable.strings @@ -780,6 +780,9 @@ /* Text field to enter non-existing street name, below list of known streets around */ "add_street" = "Ajouter une rue"; +/* Error to display when a new street name is not entered in the New street dialog */ +"empty_street_name_error" = "Please enter a street name"; + "choose_language" = "Choisir une langue"; "choose_street" = "Choisir une rue"; @@ -964,6 +967,9 @@ "editor_place_doesnt_exist" = "Ce lieu n'existe pas"; +/* Error message for "Place doesn't exist" dialog when comment is empty */ +"delete_place_empty_comment_error" = "Please indicate the reason for deleting the place"; + "text_more_button" = "…Afficher la suite"; /* Phone number error message */ diff --git a/iphone/Maps/LocalizedStrings/hu.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/hu.lproj/Localizable.strings index d7c793409e..f381a995b3 100644 --- a/iphone/Maps/LocalizedStrings/hu.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/hu.lproj/Localizable.strings @@ -780,6 +780,9 @@ /* Text field to enter non-existing street name, below list of known streets around */ "add_street" = "Utca hozzáadása"; +/* Error to display when a new street name is not entered in the New street dialog */ +"empty_street_name_error" = "Please enter a street name"; + "choose_language" = "Nyelv kiválasztása"; "choose_street" = "Utca kiválasztása"; @@ -964,6 +967,9 @@ "editor_place_doesnt_exist" = "A hely nem létezik"; +/* Error message for "Place doesn't exist" dialog when comment is empty */ +"delete_place_empty_comment_error" = "Please indicate the reason for deleting the place"; + "text_more_button" = "…tovább"; /* Phone number error message */ diff --git a/iphone/Maps/LocalizedStrings/id.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/id.lproj/Localizable.strings index fcdb625112..8e6d8591c0 100644 --- a/iphone/Maps/LocalizedStrings/id.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/id.lproj/Localizable.strings @@ -780,6 +780,9 @@ /* Text field to enter non-existing street name, below list of known streets around */ "add_street" = "Tambahkan jalan"; +/* Error to display when a new street name is not entered in the New street dialog */ +"empty_street_name_error" = "Please enter a street name"; + "choose_language" = "Pilih bahasa"; "choose_street" = "Pilih jalan"; @@ -964,6 +967,9 @@ "editor_place_doesnt_exist" = "Tempat tidak ada"; +/* Error message for "Place doesn't exist" dialog when comment is empty */ +"delete_place_empty_comment_error" = "Please indicate the reason for deleting the place"; + "text_more_button" = "…selebihnya"; /* Phone number error message */ diff --git a/iphone/Maps/LocalizedStrings/it.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/it.lproj/Localizable.strings index 0fdc10ebab..3c706d91af 100644 --- a/iphone/Maps/LocalizedStrings/it.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/it.lproj/Localizable.strings @@ -780,6 +780,9 @@ /* Text field to enter non-existing street name, below list of known streets around */ "add_street" = "Aggiungi una strada"; +/* Error to display when a new street name is not entered in the New street dialog */ +"empty_street_name_error" = "Please enter a street name"; + "choose_language" = "Scegli una lingua"; "choose_street" = "Scegli una strada"; @@ -964,6 +967,9 @@ "editor_place_doesnt_exist" = "Luogo inesistente"; +/* Error message for "Place doesn't exist" dialog when comment is empty */ +"delete_place_empty_comment_error" = "Please indicate the reason for deleting the place"; + "text_more_button" = "…continua"; /* Phone number error message */ diff --git a/iphone/Maps/LocalizedStrings/ja.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/ja.lproj/Localizable.strings index 3caabaec66..e30962682b 100644 --- a/iphone/Maps/LocalizedStrings/ja.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/ja.lproj/Localizable.strings @@ -780,6 +780,9 @@ /* Text field to enter non-existing street name, below list of known streets around */ "add_street" = "通りを追加"; +/* Error to display when a new street name is not entered in the New street dialog */ +"empty_street_name_error" = "Please enter a street name"; + "choose_language" = "言語を選択"; "choose_street" = "通りを選択"; @@ -964,6 +967,9 @@ "editor_place_doesnt_exist" = "存在しない場所"; +/* Error message for "Place doesn't exist" dialog when comment is empty */ +"delete_place_empty_comment_error" = "Please indicate the reason for deleting the place"; + "text_more_button" = "…続き"; /* Phone number error message */ diff --git a/iphone/Maps/LocalizedStrings/ko.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/ko.lproj/Localizable.strings index 5e75a1475f..5a025ab926 100644 --- a/iphone/Maps/LocalizedStrings/ko.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/ko.lproj/Localizable.strings @@ -780,6 +780,9 @@ /* Text field to enter non-existing street name, below list of known streets around */ "add_street" = "거리 추가"; +/* Error to display when a new street name is not entered in the New street dialog */ +"empty_street_name_error" = "Please enter a street name"; + "choose_language" = "언어 선택"; "choose_street" = "거리 선택"; @@ -964,6 +967,9 @@ "editor_place_doesnt_exist" = "존재하지 않는 장소입니다."; +/* Error message for "Place doesn't exist" dialog when comment is empty */ +"delete_place_empty_comment_error" = "Please indicate the reason for deleting the place"; + "text_more_button" = "…기타"; /* Phone number error message */ diff --git a/iphone/Maps/LocalizedStrings/nb.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/nb.lproj/Localizable.strings index b5c49debd3..e1c88140c1 100644 --- a/iphone/Maps/LocalizedStrings/nb.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/nb.lproj/Localizable.strings @@ -780,6 +780,9 @@ /* Text field to enter non-existing street name, below list of known streets around */ "add_street" = "Legg til en gate"; +/* Error to display when a new street name is not entered in the New street dialog */ +"empty_street_name_error" = "Please enter a street name"; + "choose_language" = "Velg et språk"; "choose_street" = "Velg en gate"; @@ -964,6 +967,9 @@ "editor_place_doesnt_exist" = "Sted finnes ikke"; +/* Error message for "Place doesn't exist" dialog when comment is empty */ +"delete_place_empty_comment_error" = "Please indicate the reason for deleting the place"; + "text_more_button" = "…mer"; /* Phone number error message */ diff --git a/iphone/Maps/LocalizedStrings/nl.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/nl.lproj/Localizable.strings index 7fe5308ca8..e9fab2929f 100644 --- a/iphone/Maps/LocalizedStrings/nl.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/nl.lproj/Localizable.strings @@ -780,6 +780,9 @@ /* Text field to enter non-existing street name, below list of known streets around */ "add_street" = "Een straat toevoegen"; +/* Error to display when a new street name is not entered in the New street dialog */ +"empty_street_name_error" = "Please enter a street name"; + "choose_language" = "Een taal kiezen"; "choose_street" = "Een straat kiezen"; @@ -964,6 +967,9 @@ "editor_place_doesnt_exist" = "Locatie bestaat niet"; +/* Error message for "Place doesn't exist" dialog when comment is empty */ +"delete_place_empty_comment_error" = "Please indicate the reason for deleting the place"; + "text_more_button" = "…meer"; /* Phone number error message */ diff --git a/iphone/Maps/LocalizedStrings/pl.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/pl.lproj/Localizable.strings index e887e18afb..4e150c1e13 100644 --- a/iphone/Maps/LocalizedStrings/pl.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/pl.lproj/Localizable.strings @@ -780,6 +780,9 @@ /* Text field to enter non-existing street name, below list of known streets around */ "add_street" = "Dodaj ulicę"; +/* Error to display when a new street name is not entered in the New street dialog */ +"empty_street_name_error" = "Please enter a street name"; + "choose_language" = "Wybierz język"; "choose_street" = "Wybierz ulicę"; @@ -964,6 +967,9 @@ "editor_place_doesnt_exist" = "Takie miejsce nie istnieje"; +/* Error message for "Place doesn't exist" dialog when comment is empty */ +"delete_place_empty_comment_error" = "Please indicate the reason for deleting the place"; + "text_more_button" = "…więcej"; /* Phone number error message */ diff --git a/iphone/Maps/LocalizedStrings/pt-BR.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/pt-BR.lproj/Localizable.strings index 972e66f350..ec92ea44be 100644 --- a/iphone/Maps/LocalizedStrings/pt-BR.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/pt-BR.lproj/Localizable.strings @@ -780,6 +780,9 @@ /* Text field to enter non-existing street name, below list of known streets around */ "add_street" = "Adicionar uma rua"; +/* Error to display when a new street name is not entered in the New street dialog */ +"empty_street_name_error" = "Please enter a street name"; + "choose_language" = "Escolher um idioma"; "choose_street" = "Escolher uma rua"; @@ -964,6 +967,9 @@ "editor_place_doesnt_exist" = "O lugar não existe"; +/* Error message for "Place doesn't exist" dialog when comment is empty */ +"delete_place_empty_comment_error" = "Please indicate the reason for deleting the place"; + "text_more_button" = "…mais"; /* Phone number error message */ diff --git a/iphone/Maps/LocalizedStrings/pt.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/pt.lproj/Localizable.strings index 3d6b15d041..8a350650dc 100644 --- a/iphone/Maps/LocalizedStrings/pt.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/pt.lproj/Localizable.strings @@ -780,6 +780,9 @@ /* Text field to enter non-existing street name, below list of known streets around */ "add_street" = "Adicionar uma rua"; +/* Error to display when a new street name is not entered in the New street dialog */ +"empty_street_name_error" = "Please enter a street name"; + "choose_language" = "Escolher um idioma"; "choose_street" = "Escolher uma rua"; @@ -964,6 +967,9 @@ "editor_place_doesnt_exist" = "O local não existe"; +/* Error message for "Place doesn't exist" dialog when comment is empty */ +"delete_place_empty_comment_error" = "Please indicate the reason for deleting the place"; + "text_more_button" = "…mais"; /* Phone number error message */ diff --git a/iphone/Maps/LocalizedStrings/ro.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/ro.lproj/Localizable.strings index 21c9cab733..a13264c99b 100644 --- a/iphone/Maps/LocalizedStrings/ro.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/ro.lproj/Localizable.strings @@ -780,6 +780,9 @@ /* Text field to enter non-existing street name, below list of known streets around */ "add_street" = "Adăugare stradă"; +/* Error to display when a new street name is not entered in the New street dialog */ +"empty_street_name_error" = "Please enter a street name"; + "choose_language" = "Alegeți o limbă"; "choose_street" = "Alegeți o stradă"; @@ -964,6 +967,9 @@ "editor_place_doesnt_exist" = "Locul nu există"; +/* Error message for "Place doesn't exist" dialog when comment is empty */ +"delete_place_empty_comment_error" = "Please indicate the reason for deleting the place"; + "text_more_button" = "…mai multe"; /* Phone number error message */ diff --git a/iphone/Maps/LocalizedStrings/ru.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/ru.lproj/Localizable.strings index 649a2ed739..840f4f6b2e 100644 --- a/iphone/Maps/LocalizedStrings/ru.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/ru.lproj/Localizable.strings @@ -780,6 +780,9 @@ /* Text field to enter non-existing street name, below list of known streets around */ "add_street" = "Добавить улицу"; +/* Error to display when a new street name is not entered in the New street dialog */ +"empty_street_name_error" = "Введите название улицы"; + "choose_language" = "Выбрать язык"; "choose_street" = "Выбрать улицу"; @@ -964,6 +967,9 @@ "editor_place_doesnt_exist" = "Места не существует"; +/* Error message for "Place doesn't exist" dialog when comment is empty */ +"delete_place_empty_comment_error" = "Пожалуйста, укажите причину удаления"; + "text_more_button" = "…ещё"; /* Phone number error message */ diff --git a/iphone/Maps/LocalizedStrings/sk.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/sk.lproj/Localizable.strings index 052c964e75..eb2613407e 100644 --- a/iphone/Maps/LocalizedStrings/sk.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/sk.lproj/Localizable.strings @@ -780,6 +780,9 @@ /* Text field to enter non-existing street name, below list of known streets around */ "add_street" = "Pridať ulicu"; +/* Error to display when a new street name is not entered in the New street dialog */ +"empty_street_name_error" = "Please enter a street name"; + "choose_language" = "Vybrať jazyk"; "choose_street" = "Vybrať ulicu"; @@ -964,6 +967,9 @@ "editor_place_doesnt_exist" = "Miesto neexistuje"; +/* Error message for "Place doesn't exist" dialog when comment is empty */ +"delete_place_empty_comment_error" = "Please indicate the reason for deleting the place"; + "text_more_button" = "…viac"; /* Phone number error message */ diff --git a/iphone/Maps/LocalizedStrings/sv.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/sv.lproj/Localizable.strings index cc1327de20..5eaf71354f 100644 --- a/iphone/Maps/LocalizedStrings/sv.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/sv.lproj/Localizable.strings @@ -780,6 +780,9 @@ /* Text field to enter non-existing street name, below list of known streets around */ "add_street" = "Lägg till en gata"; +/* Error to display when a new street name is not entered in the New street dialog */ +"empty_street_name_error" = "Please enter a street name"; + "choose_language" = "Välj ett språk"; "choose_street" = "Välj en gata"; @@ -964,6 +967,9 @@ "editor_place_doesnt_exist" = "Platsen finns inte"; +/* Error message for "Place doesn't exist" dialog when comment is empty */ +"delete_place_empty_comment_error" = "Please indicate the reason for deleting the place"; + "text_more_button" = "…mer"; /* Phone number error message */ diff --git a/iphone/Maps/LocalizedStrings/th.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/th.lproj/Localizable.strings index 378ade426b..4950034d0f 100644 --- a/iphone/Maps/LocalizedStrings/th.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/th.lproj/Localizable.strings @@ -780,6 +780,9 @@ /* Text field to enter non-existing street name, below list of known streets around */ "add_street" = "เพิ่มถนน"; +/* Error to display when a new street name is not entered in the New street dialog */ +"empty_street_name_error" = "Please enter a street name"; + "choose_language" = "เลือกภาษา"; "choose_street" = "เลือกถนน"; @@ -964,6 +967,9 @@ "editor_place_doesnt_exist" = "ไม่พบสถานที่นี้"; +/* Error message for "Place doesn't exist" dialog when comment is empty */ +"delete_place_empty_comment_error" = "Please indicate the reason for deleting the place"; + "text_more_button" = "…เพิ่มเติม"; /* Phone number error message */ diff --git a/iphone/Maps/LocalizedStrings/tr.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/tr.lproj/Localizable.strings index 41c88a5856..29dff33566 100644 --- a/iphone/Maps/LocalizedStrings/tr.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/tr.lproj/Localizable.strings @@ -780,6 +780,9 @@ /* Text field to enter non-existing street name, below list of known streets around */ "add_street" = "Bir sokak ekle"; +/* Error to display when a new street name is not entered in the New street dialog */ +"empty_street_name_error" = "Please enter a street name"; + "choose_language" = "Bir dil seç"; "choose_street" = "Bir sokak seç"; @@ -964,6 +967,9 @@ "editor_place_doesnt_exist" = "Bu yer mevcut değil"; +/* Error message for "Place doesn't exist" dialog when comment is empty */ +"delete_place_empty_comment_error" = "Please indicate the reason for deleting the place"; + "text_more_button" = "…daha fazla"; /* Phone number error message */ diff --git a/iphone/Maps/LocalizedStrings/uk.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/uk.lproj/Localizable.strings index 65043ab753..dfc583aad1 100644 --- a/iphone/Maps/LocalizedStrings/uk.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/uk.lproj/Localizable.strings @@ -780,6 +780,9 @@ /* Text field to enter non-existing street name, below list of known streets around */ "add_street" = "Додати вулицю"; +/* Error to display when a new street name is not entered in the New street dialog */ +"empty_street_name_error" = "Введіть назву вулиці"; + "choose_language" = "Вибрати мову"; "choose_street" = "Вибрати вулицю"; @@ -964,6 +967,9 @@ "editor_place_doesnt_exist" = "Місце не існує"; +/* Error message for "Place doesn't exist" dialog when comment is empty */ +"delete_place_empty_comment_error" = "Будь ласка, вкажіть причину видалення"; + "text_more_button" = "…більше"; /* Phone number error message */ diff --git a/iphone/Maps/LocalizedStrings/vi.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/vi.lproj/Localizable.strings index 9485fea8bb..19454f3aa6 100644 --- a/iphone/Maps/LocalizedStrings/vi.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/vi.lproj/Localizable.strings @@ -780,6 +780,9 @@ /* Text field to enter non-existing street name, below list of known streets around */ "add_street" = "Thêm con đường"; +/* Error to display when a new street name is not entered in the New street dialog */ +"empty_street_name_error" = "Please enter a street name"; + "choose_language" = "Đã chọn ngôn ngữ"; "choose_street" = "Đã chọn con đường"; @@ -964,6 +967,9 @@ "editor_place_doesnt_exist" = "Địa điểm không tồn tại"; +/* Error message for "Place doesn't exist" dialog when comment is empty */ +"delete_place_empty_comment_error" = "Please indicate the reason for deleting the place"; + "text_more_button" = "…thêm"; /* Phone number error message */ diff --git a/iphone/Maps/LocalizedStrings/zh-Hans.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/zh-Hans.lproj/Localizable.strings index fb0b466599..ea61411572 100644 --- a/iphone/Maps/LocalizedStrings/zh-Hans.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/zh-Hans.lproj/Localizable.strings @@ -780,6 +780,9 @@ /* Text field to enter non-existing street name, below list of known streets around */ "add_street" = "添加街道"; +/* Error to display when a new street name is not entered in the New street dialog */ +"empty_street_name_error" = "Please enter a street name"; + "choose_language" = "选择语言"; "choose_street" = "选择街道"; @@ -964,6 +967,9 @@ "editor_place_doesnt_exist" = "位置不存在"; +/* Error message for "Place doesn't exist" dialog when comment is empty */ +"delete_place_empty_comment_error" = "Please indicate the reason for deleting the place"; + "text_more_button" = "…更多"; /* Phone number error message */ diff --git a/iphone/Maps/LocalizedStrings/zh-Hant.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/zh-Hant.lproj/Localizable.strings index 8be4119c7e..7b8b36e7dc 100644 --- a/iphone/Maps/LocalizedStrings/zh-Hant.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/zh-Hant.lproj/Localizable.strings @@ -780,6 +780,9 @@ /* Text field to enter non-existing street name, below list of known streets around */ "add_street" = "新增街道"; +/* Error to display when a new street name is not entered in the New street dialog */ +"empty_street_name_error" = "Please enter a street name"; + "choose_language" = "選擇語言"; "choose_street" = "選擇街道"; @@ -964,6 +967,9 @@ "editor_place_doesnt_exist" = "位置不存在"; +/* Error message for "Place doesn't exist" dialog when comment is empty */ +"delete_place_empty_comment_error" = "Please indicate the reason for deleting the place"; + "text_more_button" = "…更多"; /* Phone number error message */