Merge pull request #3788 from milchakov/MAPSME-1583_default_name

[editor][ios][android] new way to edit names of place
This commit is contained in:
ygorshenin 2016-07-20 22:52:09 +03:00 committed by GitHub
commit 612799d306
81 changed files with 549 additions and 595 deletions

View file

@ -33,6 +33,9 @@ jclass g_localStreetClazz;
jmethodID g_localStreetCtor;
jfieldID g_localStreetFieldDef;
jfieldID g_localStreetFieldLoc;
jclass g_namesDataSourceClassID;
jmethodID g_namesDataSourceConstructorID;
jobject ToJavaFeatureCategory(JNIEnv * env, osm::NewFeatureCategories::TName const & category)
{
@ -85,6 +88,9 @@ Java_com_mapswithme_maps_editor_Editor_nativeInit(JNIEnv * env, jclass)
g_localStreetCtor = jni::GetConstructorID(env, g_localStreetClazz, "(Ljava/lang/String;Ljava/lang/String;)V");
g_localStreetFieldDef = env->GetFieldID(g_localStreetClazz, "defaultName", "Ljava/lang/String;");
g_localStreetFieldLoc = env->GetFieldID(g_localStreetClazz, "localizedName", "Ljava/lang/String;");
g_namesDataSourceClassID = jni::GetGlobalClassRef(env, "com/mapswithme/maps/editor/data/NamesDataSource");
g_namesDataSourceConstructorID = jni::GetConstructorID(env, g_namesDataSourceClassID, "([Lcom/mapswithme/maps/editor/data/LocalizedName;I)V");
}
JNIEXPORT jstring JNICALL
@ -295,26 +301,19 @@ Java_com_mapswithme_maps_editor_Editor_nativeIsBuilding(JNIEnv * env, jclass cla
return g_editableMapObject.IsBuilding();
}
JNIEXPORT jstring JNICALL
Java_com_mapswithme_maps_editor_Editor_nativeGetDefaultName(JNIEnv * env, jclass)
JNIEXPORT jobject JNICALL
Java_com_mapswithme_maps_editor_Editor_nativeGetNamesDataSource(JNIEnv * env, jclass)
{
return jni::ToJavaString(env, g_editableMapObject.GetDefaultName());
auto const namesDataSource = g_editableMapObject.GetNamesDataSource();
jobjectArray names = jni::ToJavaArray(env, g_localNameClazz, namesDataSource.names, ToJavaName);
jint mandatoryNamesCount = namesDataSource.mandatoryNamesCount;
return env->NewObject(g_namesDataSourceClassID, g_namesDataSourceConstructorID, names, mandatoryNamesCount);
}
JNIEXPORT void JNICALL
Java_com_mapswithme_maps_editor_Editor_nativeSetDefaultName(JNIEnv * env, jclass, jstring name)
{
g_editableMapObject.SetName(jni::ToNativeString(env, name), StringUtf8Multilang::kDefaultCode);
}
JNIEXPORT jobjectArray JNICALL
Java_com_mapswithme_maps_editor_Editor_nativeGetLocalizedNames(JNIEnv * env, jclass)
{
return jni::ToJavaArray(env, g_localNameClazz, g_editableMapObject.GetLocalizedNames(), ToJavaName);
}
JNIEXPORT void JNICALL
Java_com_mapswithme_maps_editor_Editor_nativeSetLocalizedNames(JNIEnv * env, jclass, jobjectArray names)
Java_com_mapswithme_maps_editor_Editor_nativeSetNames(JNIEnv * env, jclass, jobjectArray names)
{
int const length = env->GetArrayLength(names);
for (int i = 0; i < length; i++)

View file

@ -8,7 +8,7 @@
android:gravity="center_vertical"
android:orientation="horizontal">
<com.mapswithme.maps.widget.CustomTextInputLayout
<android.support.design.widget.TextInputLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1">
@ -19,7 +19,7 @@
android:hint="@string/editor_edit_place_name_hint"
android:singleLine="true"/>
</com.mapswithme.maps.widget.CustomTextInputLayout>
</android.support.design.widget.TextInputLayout>
<ImageButton
android:id="@+id/delete"

View file

@ -2,52 +2,47 @@
<!-- TODO set attr android:animateLayoutChanges="true"
when recyclerview-v7:23.2.1+ will be used.
RecyclerView of earlier versions doesn't have scrollTo method and hence crashes.-->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_base"
android:orientation="vertical"
android:paddingEnd="@dimen/margin_base"
android:paddingLeft="@dimen/margin_base"
android:paddingRight="@dimen/margin_base"
android:paddingStart="@dimen/margin_base">
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<EditText
android:id="@+id/input"
style="@style/MwmWidget.Editor.FieldLayout.EditText"
android:hint="@string/editor_edit_place_name_hint"
android:singleLine="true"/>
</android.support.design.widget.TextInputLayout>
<TextView
android:id="@+id/show_langs"
android:id="@+id/show_additional_names"
android:layout_width="match_parent"
android:layout_height="@dimen/height_block_base"
android:background="?clickableBackground"
android:fontFamily="@string/robotoMedium"
android:gravity="center_vertical"
android:text="@string/other_languages"
android:text="@string/editor_edit_place_name_hint"
android:textAppearance="@style/MwmTextAppearance.Body3"
tools:drawableRight="@drawable/ic_expand_more"
tools:ignore="UnusedAttribute"/>
tools:ignore="UnusedAttribute" />
<include layout="@layout/recycler_default"/>
<include layout="@layout/recycler_default" />
<TextView
android:id="@+id/more_names"
android:layout_width="match_parent"
android:layout_height="@dimen/height_block_base"
android:background="?clickableBackground"
android:gravity="center"
android:text="@string/placepage_more_button"
android:textAppearance="@style/MwmTextAppearance.Button" />
<TextView
android:id="@+id/add_langs"
android:layout_width="match_parent"
android:layout_height="@dimen/height_block_base"
android:background="?clickableBackground"
android:gravity="center_vertical"
android:gravity="center"
android:text="@string/add_language"
android:textAppearance="@style/MwmTextAppearance.Button"/>
android:textAppearance="@style/MwmTextAppearance.Button" />
</LinearLayout>
</LinearLayout>

View file

@ -720,7 +720,6 @@
<string name="login_with_openstreetmap">قم بتسجيل الدخول في www.openstreetmap.org</string>
<string name="edit_place">تعديل المكان</string>
<string name="place_name">اسم المكان</string>
<string name="place_name_caption">أدخل الاسم كما هو مبين على العلامة أو اللافتة</string>
<!-- title above languages list cells in the editor, below editable name text field. -->
<string name="other_languages">لغات أخرى</string>
<string name="add_language">إضافة لغة</string>
@ -816,7 +815,6 @@
<string name="editor_tag_description">أدخل الشركة أو المؤسسة أو الشخص المسؤول عن المنشآت.</string>
<string name="editor_no_local_edits_title">ليست لديك تعديلات محلية</string>
<string name="editor_no_local_edits_description">يوضح هذا عدد التغييرات المقترحة على الخريطة والتي يمكن الوصول إليها حاليًا فقط من على جهازك.</string>
<string name="editor_international_names_subtitle">الاسم بلغات أخرى</string>
<string name="editor_send_to_osm">إرسال الى OSM</string>
<string name="editor_remove">إزالة</string>
<string name="downloader_my_maps_title">خرائطي</string>

View file

@ -721,7 +721,6 @@
<string name="login_with_openstreetmap">Přihlásit se pomocí účtu www.openstreetmap.org</string>
<string name="edit_place">Upravit místo</string>
<string name="place_name">Název místa</string>
<string name="place_name_caption">Zadejte název tak, jak je uveden na ceduli nebo vývěsním štítu</string>
<!-- title above languages list cells in the editor, below editable name text field. -->
<string name="other_languages">Další jazyky</string>
<string name="add_language">Přidat jazyk</string>
@ -817,7 +816,6 @@
<string name="editor_tag_description">Zadejte osobu, společnost nebo organizaci, která zodpovídá za zařízení.</string>
<string name="editor_no_local_edits_title">Neprovedli jste žádné místní úpravy</string>
<string name="editor_no_local_edits_description">Zde vidíte počet navržených změn, které jsou v tuto chvíli dostupné pouze na Vašem zařízení.</string>
<string name="editor_international_names_subtitle">Název v jiných jazycích</string>
<string name="editor_send_to_osm">Odeslat do OSM</string>
<string name="editor_remove">Odstranit</string>
<string name="downloader_my_maps_title">Mé mapy</string>

View file

@ -718,7 +718,6 @@
<string name="login_with_openstreetmap">Log ind med www.openstreetmap.org</string>
<string name="edit_place">Redigér stedet</string>
<string name="place_name">Navn på sted</string>
<string name="place_name_caption">Indtast navnet, som det står på skiltet eller navneskiltet</string>
<!-- title above languages list cells in the editor, below editable name text field. -->
<string name="other_languages">Andre sprog</string>
<string name="add_language">Tilføj et sprog</string>
@ -814,7 +813,6 @@
<string name="editor_tag_description">Angiv firmaet, organisationen eller personen som er ansvarlig for faciliteterne.</string>
<string name="editor_no_local_edits_title">Du har ikke lokale ændringer</string>
<string name="editor_no_local_edits_description">Den viser antallet af dine foreslåede ændringer på kortet, der kun er tilgængelige på din enhed.</string>
<string name="editor_international_names_subtitle">Navn på andre sprog</string>
<string name="editor_send_to_osm">Send til OSM</string>
<string name="editor_remove">Fjern</string>
<string name="downloader_my_maps_title">Mine kort</string>

View file

@ -740,7 +740,6 @@
<string name="login_with_openstreetmap">Mit www.openstreetmap.org anmelden</string>
<string name="edit_place">Platz bearbeiten</string>
<string name="place_name">Name des Platzes</string>
<string name="place_name_caption">Geben Sie den Namen wie auf dem Schild oder dem Namensschild angegeben ein</string>
<!-- title above languages list cells in the editor, below editable name text field. -->
<string name="other_languages">Andere Sprachen</string>
<!-- small button to open list with names in different languages -->
@ -840,7 +839,6 @@
<string name="editor_tag_description">Geben Sie die Firma, die Organisation oder die Person an, die den Betrieb des Objekts gewährleistet.</string>
<string name="editor_no_local_edits_title">Sie haben keine lokalen Korrekturen</string>
<string name="editor_no_local_edits_description">Hier erscheint die Anzahl Ihrer Änderungsvorschläge für die Karte, auf die Sie bislang nur von Ihrem Gerät aus zugreifen können.</string>
<string name="editor_international_names_subtitle">Name in anderen Sprachen</string>
<string name="editor_send_to_osm">An OSM senden</string>
<string name="editor_remove">Löschen</string>
<string name="downloader_my_maps_title">Meine Karten</string>

View file

@ -709,7 +709,6 @@
<string name="login_with_openstreetmap">Iniciar sesión con www.openstreetmap.org</string>
<string name="edit_place">Editar el lugar</string>
<string name="place_name">Nombre del lugar</string>
<string name="place_name_caption">Introduce el nombre indicado en el letrero o la placa</string>
<!-- title above languages list cells in the editor, below editable name text field. -->
<string name="other_languages">Otros idiomas</string>
<string name="add_language">Añadir un idioma</string>
@ -805,7 +804,6 @@
<string name="editor_tag_description">Introduzca la empresa, organización o individuo responsable de las instalaciones.</string>
<string name="editor_no_local_edits_title">No tiene ediciones locales</string>
<string name="editor_no_local_edits_description">Esto muestra el número de sus cambios sugeridos en el mapa que actualmente solo son accesibles desde su dispositivo.</string>
<string name="editor_international_names_subtitle">Nombre en otros idiomas</string>
<string name="editor_send_to_osm">Enviar a OSM</string>
<string name="editor_remove">Eliminar</string>
<string name="downloader_my_maps_title">Mis mapas</string>

View file

@ -714,7 +714,6 @@
<string name="login_with_openstreetmap">Kirjaudu sisään osoitteessa www.openstreetmap.org</string>
<string name="edit_place">Muokkaa sijaintia</string>
<string name="place_name">Paikan nimi</string>
<string name="place_name_caption">Syötä nimi kuten nimikyltissä kirjoitettu</string>
<!-- title above languages list cells in the editor, below editable name text field. -->
<string name="other_languages">Muut Kielet</string>
<string name="add_language">Lisää kieli</string>
@ -810,7 +809,6 @@
<string name="editor_tag_description">Syötä tiloista vastuussa oleva yhtiö, organisaatio tai henkilö</string>
<string name="editor_no_local_edits_title">Sinulla ei ole paikallisia muokkauksia</string>
<string name="editor_no_local_edits_description">Tämä näyttää ehdottamiesi muutosten lukumäärän tällä hetkellä vain sinun laitteessasi saatavissa olevassa kartassa.</string>
<string name="editor_international_names_subtitle">Nimi toisella kielellä</string>
<string name="editor_send_to_osm">Lähetä OSM:ään</string>
<string name="editor_remove">Poista</string>
<string name="downloader_my_maps_title">Omat kartat</string>

View file

@ -725,7 +725,6 @@
<string name="login_with_openstreetmap">Connectez-vous sur www.openstreetmap.org</string>
<string name="edit_place">Modifier le lieu</string>
<string name="place_name">Nom du lieu</string>
<string name="place_name_caption">Entrez le nom indiqué sur le panneau ou sur la plaque</string>
<!-- title above languages list cells in the editor, below editable name text field. -->
<string name="other_languages">Autres langues</string>
<string name="add_language">Ajouter une langue</string>
@ -821,7 +820,6 @@
<string name="editor_tag_description">Entrer la société, l\&#39;organisation ou l\&#39;individu responsable des installations.</string>
<string name="editor_no_local_edits_title">Vous n\&#39;avez pas de modifications locales</string>
<string name="editor_no_local_edits_description">Affiche le nombre de modifications suggérées dans la carte actuellement uniquement accessible sur votre périphérique.</string>
<string name="editor_international_names_subtitle">Nom dans d\&#39;autres langues</string>
<string name="editor_send_to_osm">Envoyer à OSM</string>
<string name="editor_remove">Supprimer</string>
<string name="downloader_my_maps_title">Mes cartes</string>

View file

@ -715,7 +715,6 @@
<string name="login_with_openstreetmap">Jelentkezz be a www.openstreetmap.org oldalon</string>
<string name="edit_place">Hely szerkesztése</string>
<string name="place_name">Hely neve</string>
<string name="place_name_caption">Adja meg a táblán vagy az utcatáblán megjelenő nevet</string>
<!-- title above languages list cells in the editor, below editable name text field. -->
<string name="other_languages">Más nyelv</string>
<string name="add_language">Nyelv hozzáadása</string>
@ -811,7 +810,6 @@
<string name="editor_tag_description">Írja ide a működtetésért felelős cég, szervezet vagy magánszemély nevét.</string>
<string name="editor_no_local_edits_title">Nincsenek helyi módosításai</string>
<string name="editor_no_local_edits_description">Itt a pillanatnyilag csak az Ön készülékén elérhető térképek javasolt módosításainak száma látható.</string>
<string name="editor_international_names_subtitle">Név más nyelveken</string>
<string name="editor_send_to_osm">Küldés az OSM-nek</string>
<string name="editor_remove">Eltávolítás</string>
<string name="downloader_my_maps_title">Térképeim</string>

View file

@ -713,7 +713,6 @@
<string name="login_with_openstreetmap">Masuk menggunakan www.openstreetmap.org</string>
<string name="edit_place">Sunting tempat</string>
<string name="place_name">Nama tempat</string>
<string name="place_name_caption">Masukkan nama seperti pada tanda atau pelat nama</string>
<!-- title above languages list cells in the editor, below editable name text field. -->
<string name="other_languages">Bahasa lainnya</string>
<string name="add_language">Tambahkan bahasa</string>
@ -809,7 +808,6 @@
<string name="editor_tag_description">Masukkan perusahaan, organisasi, atau individu yang bertanggung jawab atas fasilitas tersebut.</string>
<string name="editor_no_local_edits_title">Anda tidak memiliki pengeditan lokal</string>
<string name="editor_no_local_edits_description">Ini menunjukkan jumlah saran perubahan dalam peta yang saat ini hanya dapat diakses di perangkat Anda.</string>
<string name="editor_international_names_subtitle">Nama dalam bahasa lain</string>
<string name="editor_send_to_osm">Kirim ke OSM</string>
<string name="editor_remove">Hapus</string>
<string name="downloader_my_maps_title">Peta saya</string>

View file

@ -713,7 +713,6 @@
<string name="login_with_openstreetmap">Accedi con www.openstreetmap.org</string>
<string name="edit_place">Modifica il luogo</string>
<string name="place_name">Nome del luogo</string>
<string name="place_name_caption">Inserisci il nome riportato nel segnale o nella targhetta</string>
<!-- title above languages list cells in the editor, below editable name text field. -->
<string name="other_languages">Altre lingue</string>
<string name="add_language">Aggiungi una lingua</string>
@ -809,7 +808,6 @@
<string name="editor_tag_description">Inserire la società, organizzazione o soggetto responsabile per la struttura.</string>
<string name="editor_no_local_edits_title">Non vi sono modifiche locali</string>
<string name="editor_no_local_edits_description">Qui è visualizzato il numero di modifiche suggerite sulla mappa che sono attualmente solo accessibili sul tuo dispositivo.</string>
<string name="editor_international_names_subtitle">Nome in altre lingue</string>
<string name="editor_send_to_osm">Invia a OSM</string>
<string name="editor_remove">Rimuovi</string>
<string name="downloader_my_maps_title">Le mie mappe</string>

View file

@ -713,7 +713,6 @@
<string name="login_with_openstreetmap">www.openstreetmap.orgでログインしてください</string>
<string name="edit_place">場所を編集</string>
<string name="place_name">場所の名前</string>
<string name="place_name_caption">標識や表札の地名を入力</string>
<!-- title above languages list cells in the editor, below editable name text field. -->
<string name="other_languages">その他の言語</string>
<string name="add_language">言語を追加</string>
@ -809,7 +808,6 @@
<string name="editor_tag_description">施設を管理する企業、組織または個人を入力してください。</string>
<string name="editor_no_local_edits_title">ローカル編集はできません</string>
<string name="editor_no_local_edits_description">これは、現在お使いのデバイスでのみアクセス可能な、マップ上に提案された変更の数を示しています。</string>
<string name="editor_international_names_subtitle">他の言語での名前</string>
<string name="editor_send_to_osm">OSMに送信</string>
<string name="editor_remove">削除</string>
<string name="downloader_my_maps_title">マイマップ</string>

View file

@ -710,7 +710,6 @@
<string name="login_with_openstreetmap">www.openstreetmap.org에 로그인</string>
<string name="edit_place">장소 편집</string>
<string name="place_name">지명</string>
<string name="place_name_caption">기호 또는 이름판으로 이름 입력</string>
<!-- title above languages list cells in the editor, below editable name text field. -->
<string name="other_languages">다른 언어</string>
<string name="add_language">언어 추가</string>
@ -806,7 +805,6 @@
<string name="editor_tag_description">회사, 조직 또는 시설 책임자를 입력하세요.</string>
<string name="editor_no_local_edits_title">편집한 지역정보가 없습니다</string>
<string name="editor_no_local_edits_description">이는 현재 귀하의 장치에서만 액세스할 수 있으며, 지도에서 만든 변경사항를 보여줍니다.</string>
<string name="editor_international_names_subtitle">다른 언어로된 이름</string>
<string name="editor_send_to_osm">OSM에 전송</string>
<string name="editor_remove">삭제</string>
<string name="downloader_my_maps_title">내 지도</string>

View file

@ -714,7 +714,6 @@
<string name="login_with_openstreetmap">Logg inn med www.openstreetmap.org</string>
<string name="edit_place">Rediger stedet</string>
<string name="place_name">Stedsnavn</string>
<string name="place_name_caption">Oppgi navnet som på skiltet eller navneskiltet</string>
<!-- title above languages list cells in the editor, below editable name text field. -->
<string name="other_languages">Andre språk</string>
<string name="add_language">Legg til et språk</string>
@ -808,7 +807,6 @@
<string name="editor_tag_description">Angi firma, organisasjon eller enkeltperson som er ansvarlig for anlegget.</string>
<string name="editor_no_local_edits_title">Du har ikke lokale redigeringer</string>
<string name="editor_no_local_edits_description">Dette viser antallet foreslåtte endringer på kartet som i øyeblikket bare er tilgjengelige på enheten din.</string>
<string name="editor_international_names_subtitle">Navn på andre språk</string>
<string name="editor_send_to_osm">Send til OSM</string>
<string name="editor_remove">Fjern</string>
<string name="downloader_my_maps_title">Mine kart</string>

View file

@ -714,7 +714,6 @@
<string name="login_with_openstreetmap">Aanmelden met www.openstreetmap.org</string>
<string name="edit_place">De locatie bewerken</string>
<string name="place_name">Locatienaam</string>
<string name="place_name_caption">Voer de naam in zoals die op het bord of naamplaatje wordt weergegeven</string>
<!-- title above languages list cells in the editor, below editable name text field. -->
<string name="other_languages">Overige talen</string>
<string name="add_language">Een taal toevoegen</string>
@ -810,7 +809,6 @@
<string name="editor_tag_description">Voer het bedrijf, de organisatie of het individu in dat verantwoordelijk is voor de faciliteiten.</string>
<string name="editor_no_local_edits_title">U hebt geen lokale bewerkingen</string>
<string name="editor_no_local_edits_description">Dit toont het aantal voorgestelde wijzigingen voor de kaart die momenteel alleen toegankelijk zijn op uw apparaat.</string>
<string name="editor_international_names_subtitle">Naam in andere talen</string>
<string name="editor_send_to_osm">Naar OSM sturen</string>
<string name="editor_remove">Verwijderen</string>
<string name="downloader_my_maps_title">Mijn kaarten</string>

View file

@ -731,7 +731,6 @@
<string name="login_with_openstreetmap">Zaloguj się przez www.openstreetmap.org</string>
<string name="edit_place">Edytuj miejsce</string>
<string name="place_name">Nazwa miejsca</string>
<string name="place_name_caption">Wpisz nazwę zgodną z szyldem lub tabliczką</string>
<!-- title above languages list cells in the editor, below editable name text field. -->
<string name="other_languages">Inne języki</string>
<string name="add_language">Dodaj język</string>
@ -827,7 +826,6 @@
<string name="editor_tag_description">Wprowadź nazwę firmy, organizacji lub osoby odpowiedzialnej za obiekty.</string>
<string name="editor_no_local_edits_title">Nie masz lokalnych edycji</string>
<string name="editor_no_local_edits_description">Jest to liczba sugerowanych przez ciebie zmian na mapie, które aktualnie dostępne są tylko na twoim urządzeniu.</string>
<string name="editor_international_names_subtitle">Nazwa w innych językach</string>
<string name="editor_send_to_osm">Wyślij do OSM</string>
<string name="editor_remove">Usuń</string>
<string name="downloader_my_maps_title">Moje mapy</string>

View file

@ -713,7 +713,6 @@
<string name="login_with_openstreetmap">Entrar com www.openstreetmap.org</string>
<string name="edit_place">Editar o local</string>
<string name="place_name">Nome do local</string>
<string name="place_name_caption">Informe o nome como está indicado na sinalização ou na placa</string>
<!-- title above languages list cells in the editor, below editable name text field. -->
<string name="other_languages">Outros idiomas</string>
<string name="add_language">Adicionar um idioma</string>
@ -809,7 +808,6 @@
<string name="editor_tag_description">Introduza a empresa, organização ou indivíduo responsável pelas instalações.</string>
<string name="editor_no_local_edits_title">Não tem edições locais</string>
<string name="editor_no_local_edits_description">Isto demonstra o número das suas alterações sugeridas no mapa que atualmente só são acessíveis no seu dispositivo.</string>
<string name="editor_international_names_subtitle">Nome noutras línguas</string>
<string name="editor_send_to_osm">Enviar para OSM</string>
<string name="editor_remove">Remover</string>
<string name="downloader_my_maps_title">Os meus mapas</string>

View file

@ -711,7 +711,6 @@
<string name="login_with_openstreetmap">Logați-vă cu contul de www.openstreetmap.org</string>
<string name="edit_place">Editați loc</string>
<string name="place_name">Denumire loc</string>
<string name="place_name_caption">Introduceți denumirea așa cum apare ea pe indicator sau plăcuță</string>
<!-- title above languages list cells in the editor, below editable name text field. -->
<string name="other_languages">Alte limbi</string>
<string name="add_language">Adăugare limbă</string>
@ -807,7 +806,6 @@
<string name="editor_tag_description">Introduceți compania, organizația sau persoana responsabilă de facilități.</string>
<string name="editor_no_local_edits_title">Nu aveți modificări locale</string>
<string name="editor_no_local_edits_description">Acesta arată numărul de modificări sugerate pe hartă care sunt momentan accesibile doar pe dispozitivul dvs.</string>
<string name="editor_international_names_subtitle">Nume în alte limbi</string>
<string name="editor_send_to_osm">Trimitere la OSM</string>
<string name="editor_remove">Eliminare</string>
<string name="downloader_my_maps_title">Hărțile mele</string>

View file

@ -744,7 +744,6 @@
<string name="login_with_openstreetmap">Войти через www.openstreetmap.org</string>
<string name="edit_place">Редактировать место</string>
<string name="place_name">Название</string>
<string name="place_name_caption">Введите название как на табличке или вывеске</string>
<!-- title above languages list cells in the editor, below editable name text field. -->
<string name="other_languages">Другие языки</string>
<!-- small button to open list with names in different languages -->
@ -844,7 +843,6 @@
<string name="editor_tag_description">Укажите компанию, организацию или лицо, которое отвечает за работоспособность объекта.</string>
<string name="editor_no_local_edits_title">У вас пока нет локальных правок</string>
<string name="editor_no_local_edits_description">Здесь отображается количество предложенных вами изменений на карте, которые доступны пока только на вашем устройстве.</string>
<string name="editor_international_names_subtitle">Название на других языках</string>
<string name="editor_send_to_osm">Отправить в OSM</string>
<string name="editor_remove">Удалить</string>
<string name="downloader_my_maps_title">Мои карты</string>

View file

@ -717,7 +717,6 @@
<string name="login_with_openstreetmap">Prihlásiť sa cez www.openstreetmap.org</string>
<string name="edit_place">Upraviť miesto</string>
<string name="place_name">Názov miesta</string>
<string name="place_name_caption">Zadajte názov ako na značke alebo menovke</string>
<!-- title above languages list cells in the editor, below editable name text field. -->
<string name="other_languages">Iné jazyky</string>
<string name="add_language">Pridať jazyk</string>
@ -813,7 +812,6 @@
<string name="editor_tag_description">Zadajte spoločnosť, organizáciu alebo osobu zodpovednú za prevádzku.</string>
<string name="editor_no_local_edits_title">Nemáte miestne poznámky</string>
<string name="editor_no_local_edits_description">Tu sa zobrazuje počet navrhovaných zmien na mape momentálne dostupných len vo vašom zariadení.</string>
<string name="editor_international_names_subtitle">Názov v iných jazykoch</string>
<string name="editor_send_to_osm">Odoslať do OSM</string>
<string name="editor_remove">Odstrániť</string>
<string name="downloader_my_maps_title">Moje mapy</string>

View file

@ -718,7 +718,6 @@
<string name="login_with_openstreetmap">Logga in med www.openstreetmap.org</string>
<string name="edit_place">Ändra platsen</string>
<string name="place_name">Platsens namn</string>
<string name="place_name_caption">Ange namnet som på skylten eller på namnbrickan</string>
<!-- title above languages list cells in the editor, below editable name text field. -->
<string name="other_languages">Övriga språk</string>
<string name="add_language">Lägg till ett språk</string>
@ -814,7 +813,6 @@
<string name="editor_tag_description">Ange företag, organisation eller person som är ansvarig för lokalerna.</string>
<string name="editor_no_local_edits_title">Du har inga lokala redigeraingar</string>
<string name="editor_no_local_edits_description">Detta visar antalet föreslagna förändringar på kartan som som endast är tillgängliga på din enhet.</string>
<string name="editor_international_names_subtitle">Namn på andra språk</string>
<string name="editor_send_to_osm">Skicka till OSM</string>
<string name="editor_remove">Ta bord</string>
<string name="downloader_my_maps_title">Mina kartor</string>

View file

@ -720,7 +720,6 @@
<string name="login_with_openstreetmap">ล็อกอินที่ www.openstreetmap.org</string>
<string name="edit_place">แก้ไขสถานที่</string>
<string name="place_name">ชื่อสถานที่</string>
<string name="place_name_caption">กรอกชื่อตามที่แสดงในสัญลักษณ์หรือป้ายแสดงชื่อ</string>
<!-- title above languages list cells in the editor, below editable name text field. -->
<string name="other_languages">ภาษาอื่น ๆ</string>
<string name="add_language">เพิ่มภาษา</string>
@ -816,7 +815,6 @@
<string name="editor_tag_description">ใส่ชื่อบริษัท, องค์กร หรือ บุคคลที่เป็นผู้รับผิดชอบสถานที่นี้</string>
<string name="editor_no_local_edits_title">คุณไม่มีการแก้ไขท้องถิ่น</string>
<string name="editor_no_local_edits_description">หมายเลขที่แสดงอยู่ คือ หมายเลขที่คุณได้ทำการแนะนำการเปลี่ยนแปลงบนแผนที่ที่สามารถเข้าถึงได้โดยอุปกรณ์ของคุณท่านั้น</string>
<string name="editor_international_names_subtitle">ชื่อในภาษาอื่น</string>
<string name="editor_send_to_osm">ส่งไปที่ OSM</string>
<string name="editor_remove">ลบออก</string>
<string name="downloader_my_maps_title">แผนที่ของฉัน</string>

View file

@ -720,7 +720,6 @@
<string name="login_with_openstreetmap">www.openstreetmap.org adresinden oturum aç</string>
<string name="edit_place">Yeri düzenle</string>
<string name="place_name">Yer ismi</string>
<string name="place_name_caption">İşaret veya tabeladaki gibi ismi girin</string>
<!-- title above languages list cells in the editor, below editable name text field. -->
<string name="other_languages">Diğer Diller</string>
<string name="add_language">Bir dil ekle</string>
@ -816,7 +815,6 @@
<string name="editor_tag_description">Tesislerden sorumlu şirketi, kurumu veya bireyi girin.</string>
<string name="editor_no_local_edits_title">Yerel düzenlemeniz yok</string>
<string name="editor_no_local_edits_description">Bu, harita üzerinde önerdiğiniz değişikliklerden sadece şu anda cihazınızda erişilebilenlerin sayısını gösterir.</string>
<string name="editor_international_names_subtitle">Diğer dillerdeki adı</string>
<string name="editor_send_to_osm">OSMye gönder</string>
<string name="editor_remove">Kaldır</string>
<string name="downloader_my_maps_title">Haritalarım</string>

View file

@ -718,7 +718,6 @@
<string name="login_with_openstreetmap">Увійти за допомогою www.openstreetmap.org</string>
<string name="edit_place">Редагувати місце</string>
<string name="place_name">Назва</string>
<string name="place_name_caption">Введіть назву як на вивісці або табличці</string>
<!-- title above languages list cells in the editor, below editable name text field. -->
<string name="other_languages">Інші мови</string>
<string name="add_language">Додати мову</string>
@ -814,7 +813,6 @@
<string name="editor_tag_description">Вкажіть компанію, організацію або особу, що відповідає за працездатність об\&#39;єкта</string>
<string name="editor_no_local_edits_title">Поки що ви не маєте локальних виправлень</string>
<string name="editor_no_local_edits_description">Тут відображається кількість запропонованих вами змін на карті, які доступні тільки на вашому пристрою</string>
<string name="editor_international_names_subtitle">Назва на інших мовах</string>
<string name="editor_send_to_osm">Відправити до OSM</string>
<string name="editor_remove">Видалити</string>
<string name="downloader_my_maps_title">Мої мапи</string>

View file

@ -714,7 +714,6 @@
<string name="login_with_openstreetmap">Đăng nhập với www.openstreetmap.org</string>
<string name="edit_place">Chỉnh sửa địa điểm</string>
<string name="place_name">Tên địa điểm</string>
<string name="place_name_caption">Nhập tên theo như trên chữ ký hoặc biển tên</string>
<!-- title above languages list cells in the editor, below editable name text field. -->
<string name="other_languages">Ngôn ngữ khác</string>
<string name="add_language">Thêm ngôn ngữ</string>
@ -810,7 +809,6 @@
<string name="editor_tag_description">Nhập công ty, tổ chức hoặc cá nhân phụ trách cơ sở.</string>
<string name="editor_no_local_edits_title">Bạn không có những chỗ sửa cục bộ</string>
<string name="editor_no_local_edits_description">Thông tin này cho biết số thay đổi đề nghị của bạn trên bản đồ hiện chỉ có thể truy cập trên thiết bị của bạn.</string>
<string name="editor_international_names_subtitle">Tên bằng các ngôn ngữ khác</string>
<string name="editor_send_to_osm">Gửi đến OSM</string>
<string name="editor_remove">Xóa</string>
<string name="downloader_my_maps_title">Bản đồ của tôi</string>

View file

@ -730,7 +730,6 @@
<string name="login_with_openstreetmap">登入到 www.openstreetmap.org</string>
<string name="edit_place">編輯地點</string>
<string name="place_name">地點名稱</string>
<string name="place_name_caption">輸入標識或名牌上的名稱</string>
<!-- title above languages list cells in the editor, below editable name text field. -->
<string name="other_languages">其他語言</string>
<!-- small button to open list with names in different languages -->
@ -830,7 +829,6 @@
<string name="editor_tag_description">輸入公司、組織或設施負責人。</string>
<string name="editor_no_local_edits_title">您沒有本機編輯</string>
<string name="editor_no_local_edits_description">這顯示了對目前僅可在您的裝置上存取的地圖的建議修改數量。</string>
<string name="editor_international_names_subtitle">其他語言的名稱</string>
<string name="editor_send_to_osm">傳送至 OSM</string>
<string name="editor_remove">移除</string>
<string name="downloader_my_maps_title">我的地圖</string>

View file

@ -720,7 +720,6 @@
<string name="login_with_openstreetmap">登录到www.openstreetmap.org</string>
<string name="edit_place">编辑地点</string>
<string name="place_name">地点名</string>
<string name="place_name_caption">输入标识或名牌上的名称</string>
<!-- title above languages list cells in the editor, below editable name text field. -->
<string name="other_languages">其他语言</string>
<string name="add_language">添加语言</string>
@ -816,7 +815,6 @@
<string name="editor_tag_description">输入公司、组织或设施负责人。</string>
<string name="editor_no_local_edits_title">您没有本地编辑</string>
<string name="editor_no_local_edits_description">这显示了当前仅在您设备上能够访问的对地图建议修改的数量。</string>
<string name="editor_international_names_subtitle">其他语言的名称</string>
<string name="editor_send_to_osm">发送至 OSM</string>
<string name="editor_remove">删除</string>
<string name="downloader_my_maps_title">我的地图</string>

View file

@ -750,7 +750,6 @@
<string name="login_with_openstreetmap">Log in with www.openstreetmap.org</string>
<string name="edit_place">Edit Place</string>
<string name="place_name">Place Name</string>
<string name="place_name_caption">Enter the name as on the sign or nameplate</string>
<!-- title above languages list cells in the editor, below editable name text field. -->
<string name="other_languages">Other Languages</string>
<!-- small button to open list with names in different languages -->
@ -850,7 +849,6 @@
<string name="editor_tag_description">Enter company, organization or individual responsible for the facilities.</string>
<string name="editor_no_local_edits_title">You don\&#39;t have local edits</string>
<string name="editor_no_local_edits_description">This shows the number of your suggested changes on the map that are currently accessible only on your device.</string>
<string name="editor_international_names_subtitle">Name in other languages</string>
<string name="editor_send_to_osm">Send to OSM</string>
<string name="editor_remove">Remove</string>
<string name="downloader_my_maps_title">My maps</string>

View file

@ -17,6 +17,7 @@ import com.mapswithme.maps.editor.data.FeatureCategory;
import com.mapswithme.maps.editor.data.Language;
import com.mapswithme.maps.editor.data.LocalizedName;
import com.mapswithme.maps.editor.data.LocalizedStreet;
import com.mapswithme.maps.editor.data.NamesDataSource;
/**
@ -101,10 +102,8 @@ public final class Editor
public static native boolean nativeIsNameEditable();
public static native boolean nativeIsBuilding();
public static native String nativeGetDefaultName();
public static native void nativeSetDefaultName(String name);
public static native @NonNull LocalizedName[] nativeGetLocalizedNames();
public static native void nativeSetLocalizedNames(@NonNull LocalizedName[] names);
public static native NamesDataSource nativeGetNamesDataSource();
public static native void nativeSetNames(@NonNull LocalizedName[] names);
public static native LocalizedName nativeMakeLocalizedName(String langCode, String name);
public static native Language[] nativeGetSupportedLanguages();

View file

@ -38,52 +38,51 @@ import org.solovyev.android.views.llm.LinearLayoutManager;
public class EditorFragment extends BaseMwmFragment implements View.OnClickListener, EditTextDialogFragment.OnTextSaveListener
{
final static String LAST_LOCALIZED_NAME_INDEX = "LastLocalizedNameIndex";
final static String LAST_INDEX_OF_NAMES_ARRAY = "LastIndexOfNamesArray";
private TextView mCategory;
private View mCardName;
private View mCardAddress;
private View mCardMetadata;
private EditText mName;
private RecyclerView mLocalizedNames;
private RecyclerView mNamesView;
private final RecyclerView.AdapterDataObserver mLocalizedNamesObserver = new RecyclerView.AdapterDataObserver()
private final RecyclerView.AdapterDataObserver mNamesObserver = new RecyclerView.AdapterDataObserver()
{
@Override
public void onChanged()
{
refreshLocalizedNames();
refreshNamesCaption();
}
@Override
public void onItemRangeChanged(int positionStart, int itemCount)
{
refreshLocalizedNames();
refreshNamesCaption();
}
@Override
public void onItemRangeInserted(int positionStart, int itemCount)
{
refreshLocalizedNames();
refreshNamesCaption();
}
@Override
public void onItemRangeRemoved(int positionStart, int itemCount)
{
refreshLocalizedNames();
refreshNamesCaption();
}
@Override
public void onItemRangeMoved(int fromPosition, int toPosition, int itemCount)
{
refreshLocalizedNames();
refreshNamesCaption();
}
};
private MultilanguageAdapter mLocalizedNamesAdapter;
private TextView mLocalizedShow;
private boolean mIsLocalizedShown;
private MultilanguageAdapter mNamesAdapter;
private TextView mNamesCaption;
private TextView mAddLanguage;
private TextView mMoreLanguages;
private TextView mStreet;
private EditText mHouseNumber;
@ -130,7 +129,6 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
initViews(view);
mCategory.setText(Editor.nativeGetCategory());
mName.setText(Editor.nativeGetDefaultName());
final LocalizedStreet street = Editor.nativeGetStreet();
mStreet.setText(street.defaultName);
@ -200,7 +198,6 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
refreshOpeningTime();
refreshEditableFields();
refreshResetButton();
refreshLocalizedNames();
}
@Override
@ -215,7 +212,6 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
if (!validateFields())
return false;
Editor.nativeSetDefaultName(mName.getText().toString());
Editor.nativeSetHouseNumber(mHouseNumber.getText().toString());
Editor.nativeSetZipCode(mZipcode.getText().toString());
Editor.nativeSetBuildingLevels(mBuildingLevels.getText().toString());
@ -224,7 +220,7 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
Editor.nativeSetEmail(mEmail.getText().toString());
Editor.nativeSetHasWifi(mWifi.isChecked());
Editor.nativeSetOperator(mOperator.getText().toString());
Editor.nativeSetLocalizedNames(mParent.getLocalizedNamesAsArray());
Editor.nativeSetNames(mParent.getNamesAsArray());
return true;
}
@ -287,7 +283,6 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
private void refreshEditableFields()
{
UiUtils.showIf(Editor.nativeIsNameEditable(), mCardName);
UiUtils.showIf(Editor.nativeIsAddressEditable(), mCardAddress);
UiUtils.showIf(Editor.nativeIsBuilding(), mBlockLevels);
@ -330,30 +325,38 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
}
}
private void initLocalizedNameView(final View view)
private void initNamesView(final View view)
{
mLocalizedNames = (RecyclerView) view.findViewById(R.id.recycler);
mLocalizedNames.setNestedScrollingEnabled(false);
mLocalizedNames.setLayoutManager(new LinearLayoutManager(getActivity()));
mLocalizedNamesAdapter = new MultilanguageAdapter(mParent);
mLocalizedNames.setAdapter(mLocalizedNamesAdapter);
mLocalizedNamesAdapter.registerAdapterDataObserver(mLocalizedNamesObserver);
refreshLocalizedNames();
mNamesCaption = (TextView) view.findViewById(R.id.show_additional_names);
mNamesCaption.setOnClickListener(this);
mAddLanguage = (TextView) view.findViewById(R.id.add_langs);
mAddLanguage.setOnClickListener(this);
mMoreLanguages = (TextView) view.findViewById(R.id.more_names);
mMoreLanguages.setOnClickListener(this);
mNamesView = (RecyclerView) view.findViewById(R.id.recycler);
mNamesView.setNestedScrollingEnabled(false);
mNamesView.setLayoutManager(new LinearLayoutManager(getActivity()));
mNamesAdapter = new MultilanguageAdapter(mParent);
mNamesView.setAdapter(mNamesAdapter);
mNamesAdapter.registerAdapterDataObserver(mNamesObserver);
final Bundle args = getArguments();
if (args == null || !args.containsKey(LAST_LOCALIZED_NAME_INDEX))
if (args == null || !args.containsKey(LAST_INDEX_OF_NAMES_ARRAY))
{
showLocalizedNames(false);
showAdditionalNames(false);
return;
}
showLocalizedNames(true);
UiUtils.waitLayout(mLocalizedNames, new ViewTreeObserver.OnGlobalLayoutListener()
showAdditionalNames(true);
UiUtils.waitLayout(mNamesView, new ViewTreeObserver.OnGlobalLayoutListener()
{
@Override
public void onGlobalLayout()
{
LinearLayoutManager lm = (LinearLayoutManager) mLocalizedNames.getLayoutManager();
int position = args.getInt(LAST_LOCALIZED_NAME_INDEX);
LinearLayoutManager lm = (LinearLayoutManager) mNamesView.getLayoutManager();
int position = args.getInt(LAST_INDEX_OF_NAMES_ARRAY);
View nameItem = lm.findViewByPosition(position);
@ -378,14 +381,9 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
// TODO show icon and fill it when core will implement that
UiUtils.hide(categoryBlock.findViewById(R.id.icon));
mCategory = (TextView) categoryBlock.findViewById(R.id.name);
mCardName = view.findViewById(R.id.cv__name);
mCardAddress = view.findViewById(R.id.cv__address);
mCardMetadata = view.findViewById(R.id.cv__metadata);
mName = findInput(mCardName);
view.findViewById(R.id.add_langs).setOnClickListener(this);
mLocalizedShow = (TextView) view.findViewById(R.id.show_langs);
mLocalizedShow.setOnClickListener(this);
initLocalizedNameView(view);
initNamesView(view);
// Address
view.findViewById(R.id.block_street).setOnClickListener(this);
@ -484,11 +482,12 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
case R.id.category:
mParent.editCategory();
break;
case R.id.show_langs:
showLocalizedNames(!mIsLocalizedShown);
case R.id.more_names:
case R.id.show_additional_names:
showAdditionalNames(!mNamesAdapter.areAdditionalLanguagesShown());
break;
case R.id.add_langs:
mParent.addLocalizedLanguage();
mParent.addLanguage();
break;
case R.id.about_osm:
startActivity(new Intent((Intent.ACTION_VIEW), Uri.parse(Constants.Url.OSM_ABOUT)));
@ -499,29 +498,43 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
}
}
private void refreshLocalizedNames()
private void showAdditionalNames(boolean show)
{
UiUtils.showIf(mLocalizedNamesAdapter.getItemCount() > 0, mLocalizedShow);
mNamesAdapter.showAdditionalLanguages(show);
refreshNamesCaption();
}
private void showLocalizedNames(boolean show)
private void refreshNamesCaption()
{
mIsLocalizedShown = show;
if (show)
{
UiUtils.show(mLocalizedNames);
setLocalizedShowDrawable(R.drawable.ic_expand_less);
}
if (mNamesAdapter.getNamesCount() <= mNamesAdapter.getMandatoryNamesCount())
setNamesArrow(0 /* arrowResourceId */); // bind arrow with empty resource (do not draw arrow)
else if (mNamesAdapter.areAdditionalLanguagesShown())
setNamesArrow(R.drawable.ic_expand_less);
else
{
UiUtils.hide(mLocalizedNames);
setLocalizedShowDrawable(R.drawable.ic_expand_more);
}
setNamesArrow(R.drawable.ic_expand_more);
boolean showAddLanguage = mNamesAdapter.getNamesCount() <= mNamesAdapter.getMandatoryNamesCount() ||
mNamesAdapter.areAdditionalLanguagesShown();
UiUtils.showIf(showAddLanguage, mAddLanguage);
UiUtils.showIf(!showAddLanguage, mMoreLanguages);
}
private void setLocalizedShowDrawable(@DrawableRes int right)
// Bind arrow in the top right corner of names caption with needed resource.
private void setNamesArrow(@DrawableRes int arrowResourceId)
{
mLocalizedShow.setCompoundDrawablesWithIntrinsicBounds(null, null, Graphics.tint(getActivity(), right, R.attr.iconTint), null);
if (arrowResourceId == 0)
{
mNamesCaption.setCompoundDrawablesWithIntrinsicBounds(null, null, null, null);
return;
}
mNamesCaption.setCompoundDrawablesWithIntrinsicBounds(
null,
null,
Graphics.tint(getActivity(), arrowResourceId, R.attr.iconTint),
null);
}
private void refreshResetButton()

View file

@ -25,6 +25,7 @@ import com.mapswithme.util.ConnectionState;
import com.mapswithme.util.UiUtils;
import com.mapswithme.util.Utils;
import com.mapswithme.util.statistics.Statistics;
import com.mapswithme.maps.editor.data.NamesDataSource;
import java.util.ArrayList;
import java.util.List;
@ -48,29 +49,31 @@ public class EditorHostFragment extends BaseMwmToolbarFragment
/**
* A list of localized names added by a user and those that were in metadata.
*/
private static final List<LocalizedName> sLocalizedNames = new ArrayList<>();
private static final List<LocalizedName> sNames = new ArrayList<>();
/**
* Count of names which should always be shown.
*/
private int mMandatoryNamesCount = 0;
/**
* Used in MultilanguageAdapter to show, select and remove items.
*/
List<LocalizedName> getLocalizedNames()
List<LocalizedName> getNames()
{
return sLocalizedNames;
return sNames;
}
public LocalizedName[] getLocalizedNamesAsArray()
public LocalizedName[] getNamesAsArray()
{
return sLocalizedNames.toArray(new LocalizedName[sLocalizedNames.size()]);
return sNames.toArray(new LocalizedName[sNames.size()]);
}
void setLocalizedNames(LocalizedName[] names)
void setNames(LocalizedName[] names)
{
sLocalizedNames.clear();
sNames.clear();
for (LocalizedName name : names)
{
if (name.code == LocalizedName.DEFAULT_LANG_CODE)
continue;
sLocalizedNames.add(name);
addName(name);
}
}
@ -79,12 +82,22 @@ public class EditorHostFragment extends BaseMwmToolbarFragment
*/
void setName(String name, int index)
{
sLocalizedNames.get(index).name = name;
sNames.get(index).name = name;
}
void addLocalizedName(LocalizedName name)
void addName(LocalizedName name)
{
sLocalizedNames.add(name);
sNames.add(name);
}
public int getMandatoryNamesCount()
{
return mMandatoryNamesCount;
}
public void setMandatoryNamesCount(int mandatoryNamesCount)
{
mMandatoryNamesCount = mandatoryNamesCount;
}
@Nullable
@ -112,7 +125,9 @@ public class EditorHostFragment extends BaseMwmToolbarFragment
mIsNewObject = getArguments().getBoolean(EditorActivity.EXTRA_NEW_OBJECT, false);
mToolbarController.setTitle(getTitle());
setLocalizedNames(Editor.nativeGetLocalizedNames());
NamesDataSource namesDataSource = Editor.nativeGetNamesDataSource();
setNames(namesDataSource.getNames());
setMandatoryNamesCount(namesDataSource.getMandatoryNamesCount());
editMapObject();
}
@ -143,6 +158,7 @@ public class EditorHostFragment extends BaseMwmToolbarFragment
case OPENING_HOURS:
case STREET:
case CUISINE:
case LANGUAGE:
editMapObject();
break;
default:
@ -153,17 +169,17 @@ public class EditorHostFragment extends BaseMwmToolbarFragment
protected void editMapObject()
{
editMapObject(false /* focusToLastLocalizedName */);
editMapObject(false /* focusToLastName */);
}
protected void editMapObject(boolean focusToLastLocalizedName)
protected void editMapObject(boolean focusToLastName)
{
mMode = Mode.MAP_OBJECT;
((SearchToolbarController) mToolbarController).showControls(false);
mToolbarController.setTitle(getTitle());
Bundle args = new Bundle();
if (focusToLastLocalizedName)
args.putInt(EditorFragment.LAST_LOCALIZED_NAME_INDEX, sLocalizedNames.size() - 1);
if (focusToLastName)
args.putInt(EditorFragment.LAST_INDEX_OF_NAMES_ARRAY, sNames.size() - 1);
final Fragment editorFragment = Fragment.instantiate(getActivity(), EditorFragment.class.getName(), args);
getChildFragmentManager().beginTransaction()
.replace(R.id.fragment_container, editorFragment, EditorFragment.class.getName())
@ -187,11 +203,11 @@ public class EditorHostFragment extends BaseMwmToolbarFragment
editWithFragment(Mode.CUISINE, R.string.select_cuisine, null, CuisineFragment.class, true);
}
protected void addLocalizedLanguage()
protected void addLanguage()
{
Bundle args = new Bundle();
ArrayList<String> languages = new ArrayList<>(sLocalizedNames.size());
for (LocalizedName name : sLocalizedNames)
ArrayList<String> languages = new ArrayList<>(sNames.size());
for (LocalizedName name : sNames)
languages.add(name.lang);
args.putStringArrayList(LanguagesFragment.EXISTING_LOCALIZED_NAMES, languages);
editWithFragment(Mode.LANGUAGE, R.string.choose_language, args, LanguagesFragment.class, false);
@ -314,7 +330,7 @@ public class EditorHostFragment extends BaseMwmToolbarFragment
@Override
public void onLanguageSelected(Language lang)
{
addLocalizedName(Editor.nativeMakeLocalizedName(lang.code, ""));
editMapObject(true /* focusToLastLocalizedName */);
addName(Editor.nativeMakeLocalizedName(lang.code, ""));
editMapObject(true /* focusToLastName */);
}
}

View file

@ -1,28 +1,29 @@
package com.mapswithme.maps.editor;
import android.support.design.widget.TextInputLayout;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.EditText;
import java.util.List;
import com.mapswithme.maps.R;
import com.mapswithme.maps.editor.data.LocalizedName;
import com.mapswithme.util.StringUtils;
import com.mapswithme.util.UiUtils;
import java.util.List;
public class MultilanguageAdapter extends RecyclerView.Adapter<MultilanguageAdapter.Holder>
{
private final List<LocalizedName> mNames;
private EditorHostFragment mHostFragment;
private int mMandatoryNamesCount;
private boolean mAdditionalLanguagesShown;
// TODO(mgsergio): Refactor: don't pass the whole EditorHostFragment.
MultilanguageAdapter(EditorHostFragment hostFragment)
{
mHostFragment = hostFragment;
mNames = hostFragment.getLocalizedNames();
mNames = hostFragment.getNames();
mMandatoryNamesCount = hostFragment.getMandatoryNamesCount();
}
@Override
@ -39,29 +40,66 @@ public class MultilanguageAdapter extends RecyclerView.Adapter<MultilanguageAdap
{
LocalizedName name = mNames.get(position);
holder.input.setText(name.name);
holder.input.setHint(name.lang);
holder.inputLayout.setHint(name.langName);
}
@Override
public int getItemCount()
{
return mAdditionalLanguagesShown ? mNames.size() : mMandatoryNamesCount;
}
public int getNamesCount()
{
return mNames.size();
}
public int getMandatoryNamesCount()
{
return mMandatoryNamesCount;
}
public boolean areAdditionalLanguagesShown()
{
return mAdditionalLanguagesShown;
}
public void showAdditionalLanguages(boolean show)
{
if (mAdditionalLanguagesShown == show)
return;
mAdditionalLanguagesShown = show;
if (mNames.size() != mMandatoryNamesCount)
{
if (show)
{
notifyItemRangeInserted(mMandatoryNamesCount, mNames.size() - mMandatoryNamesCount);
}
else
{
notifyItemRangeRemoved(mMandatoryNamesCount, mNames.size() - mMandatoryNamesCount);
}
}
}
public class Holder extends RecyclerView.ViewHolder
{
EditText input;
TextInputLayout inputLayout;
public Holder(View itemView)
{
super(itemView);
input = (EditText) itemView.findViewById(R.id.input);
inputLayout = (TextInputLayout) input.getParent();
input.addTextChangedListener(new StringUtils.SimpleTextWatcher()
{
@Override
public void onTextChanged(CharSequence s, int start, int before, int count)
{
mHostFragment.setName(s.toString(), getAdapterPosition());
mNames.get(getAdapterPosition()).name = s.toString();
}
});

View file

@ -0,0 +1,30 @@
package com.mapswithme.maps.editor.data;
/**
* Class which contains array of localized names with following priority:
* 1. Names for Mwm languages;
* 2. User`s language name;
* 3. Other names;
* and mandatoryNamesCount - count of names which should be always shown.
*/
public class NamesDataSource
{
private final LocalizedName[] mNames;
private final int mMandatoryNamesCount;
public NamesDataSource(LocalizedName[] names, int mandatoryNamesCount)
{
this.mNames = names;
this.mMandatoryNamesCount = mandatoryNamesCount;
}
public LocalizedName[] getNames()
{
return mNames;
}
public int getMandatoryNamesCount()
{
return mMandatoryNamesCount;
}
}

View file

@ -114,3 +114,18 @@ UNIT_TEST(MultilangString_LangNames)
auto const international = StringUtf8Multilang::GetLangIndex("int_name");
TEST_EQUAL(langs[international].m_code, "int_name", ());
}
UNIT_TEST(MultilangString_HasString)
{
StringUtf8Multilang s;
s.AddString(0, "xxx");
s.AddString(18, "yyy");
s.AddString(63, "zzz");
TEST(s.HasString(0), ());
TEST(s.HasString(18), ());
TEST(s.HasString(63), ());
TEST(!s.HasString(1), ());
TEST(!s.HasString(32), ());
}

View file

@ -28,6 +28,11 @@ StringUtf8Multilang::Languages const g_languages = {{ {"default", "Native for ea
}};
} // namespace
int8_t constexpr StringUtf8Multilang::kUnsupportedLanguageCode;
int8_t constexpr StringUtf8Multilang::kDefaultCode;
int8_t constexpr StringUtf8Multilang::kEnglishCode;
int8_t constexpr StringUtf8Multilang::kInternationalCode;
// static
StringUtf8Multilang::Languages const & StringUtf8Multilang::GetSupportedLanguages()
{
@ -134,6 +139,17 @@ bool StringUtf8Multilang::GetString(int8_t lang, string & utf8s) const
return false;
}
bool StringUtf8Multilang::HasString(int8_t lang) const
{
for(size_t i = 0; i < m_s.size(); i = GetNextIndex(i))
{
if ((m_s[i] & 0x3F) == lang)
return true;
}
return false;
}
namespace
{

View file

@ -105,6 +105,8 @@ public:
else
return false;
}
bool HasString(int8_t lang) const;
int8_t FindString(string const & utf8s) const;

View file

@ -1,6 +1,7 @@
#include "indexer/editable_map_object.hpp"
#include "indexer/classificator.hpp"
#include "indexer/cuisines.hpp"
#include "indexer/editable_map_object.hpp"
#include "indexer/osm_editor.hpp"
#include "indexer/postcodes_matcher.hpp"
#include "base/macros.hpp"
@ -9,6 +10,50 @@
#include "std/cctype.hpp"
#include "std/cmath.hpp"
namespace
{
bool ExtractName(StringUtf8Multilang const & names, int8_t const langCode,
vector<osm::LocalizedName> & result)
{
if (StringUtf8Multilang::kUnsupportedLanguageCode == langCode ||
StringUtf8Multilang::kDefaultCode == langCode)
{
return false;
}
// Exclude languages that are already present.
auto const it =
find_if(result.begin(), result.end(), [langCode](osm::LocalizedName const & localizedName) {
return localizedName.m_code == langCode;
});
if (result.end() != it)
return false;
string name;
names.GetString(langCode, name);
result.emplace_back(langCode, name);
return true;
}
size_t PushMwmLanguages(StringUtf8Multilang const & names, vector<int8_t> const & mwmLanguages,
vector<osm::LocalizedName> & result)
{
size_t count = 0;
static size_t const kMaxCountMwmLanguages = 2;
for (size_t i = 0; i < mwmLanguages.size() && count < kMaxCountMwmLanguages; ++i)
{
if (ExtractName(names, mwmLanguages[i], result))
++count;
}
return count;
}
} // namespace
namespace osm
{
// LocalizedName -----------------------------------------------------------------------------------
@ -49,14 +94,54 @@ vector<feature::Metadata::EType> const & EditableMapObject::GetEditableFields()
StringUtf8Multilang const & EditableMapObject::GetName() const { return m_name; }
vector<LocalizedName> EditableMapObject::GetLocalizedNames() const
NamesDataSource EditableMapObject::GetNamesDataSource() const
{
vector<LocalizedName> result;
m_name.ForEach([&result](int8_t code, string const & name) -> bool
{
result.push_back({code, name});
return true;
});
const auto mwmInfo = GetID().m_mwmId.GetInfo();
if (!mwmInfo)
return NamesDataSource();
vector<int8_t> mwmLanguages;
mwmInfo->GetRegionData().GetLanguages(mwmLanguages);
auto const userLangCode = StringUtf8Multilang::GetLangIndex(languages::GetCurrentNorm());
return GetNamesDataSource(m_name, mwmLanguages, userLangCode);
}
// static
NamesDataSource EditableMapObject::GetNamesDataSource(StringUtf8Multilang const & source,
vector<int8_t> const & mwmLanguages,
int8_t const userLangCode)
{
NamesDataSource result;
auto & names = result.names;
auto & mandatoryCount = result.mandatoryNamesCount;
// Push Mwm languages.
mandatoryCount = PushMwmLanguages(source, mwmLanguages, names);
// Push user's language.
if (ExtractName(source, userLangCode, names))
++mandatoryCount;
// Push other languages.
source.ForEach([&names, mandatoryCount](int8_t const code, string const & name) -> bool {
// Exclude default name.
if (StringUtf8Multilang::kDefaultCode == code)
return true;
auto const mandatoryNamesEnd = names.begin() + mandatoryCount;
// Exclude languages which are already in container (languages with top priority).
auto const it = find_if(
names.begin(), mandatoryNamesEnd,
[code](LocalizedName const & localizedName) { return localizedName.m_code == code; });
if (mandatoryNamesEnd == it)
names.emplace_back(code, name);
return true;
});
return result;
}
@ -83,8 +168,42 @@ void EditableMapObject::SetName(StringUtf8Multilang const & name) { m_name = nam
void EditableMapObject::SetName(string name, int8_t langCode)
{
strings::Trim(name);
if (!name.empty())
m_name.AddString(langCode, name);
if (name.empty())
return;
ASSERT_NOT_EQUAL(StringUtf8Multilang::kDefaultCode, langCode,
("Direct editing of default name is deprecated."));
if (!Editor::Instance().OriginalFeatureHasDefaultName(GetID()))
{
const auto mwmInfo = GetID().m_mwmId.GetInfo();
if (mwmInfo)
{
vector<int8_t> mwmLanguages;
mwmInfo->GetRegionData().GetLanguages(mwmLanguages);
if (CanUseAsDefaultName(langCode, mwmLanguages))
m_name.AddString(StringUtf8Multilang::kDefaultCode, name);
}
}
m_name.AddString(langCode, name);
}
// static
bool EditableMapObject::CanUseAsDefaultName(int8_t const lang, vector<int8_t> const & mwmLanguages)
{
for (auto const & mwmLang : mwmLanguages)
{
if (StringUtf8Multilang::kUnsupportedLanguageCode == mwmLang)
continue;
if (lang == mwmLang)
return true;
}
return false;
}
void EditableMapObject::SetMercator(m2::PointD const & center) { m_mercator = center; }

View file

@ -46,6 +46,17 @@ struct LocalizedName
string const m_name;
};
// Class which contains vector of localized names with following priority:
// 1. Names for Mwm languages
// 2. User`s language name
// 3. Other names
// and mandatoryNamesCount - count of names which should be always shown.
struct NamesDataSource
{
vector<LocalizedName> names;
size_t mandatoryNamesCount = 0;
};
struct LocalizedStreet
{
string m_defaultName;
@ -67,7 +78,8 @@ public:
vector<feature::Metadata::EType> const & GetEditableFields() const;
StringUtf8Multilang const & GetName() const;
vector<LocalizedName> GetLocalizedNames() const;
// See comment for NamesDataSource class.
NamesDataSource GetNamesDataSource() const;
LocalizedStreet const & GetStreet() const;
vector<LocalizedStreet> const & GetNearbyStreets() const;
string const & GetHouseNumber() const;
@ -117,6 +129,14 @@ public:
static bool ValidateWebsite(string const & site);
static bool ValidateEmail(string const & email);
// Check whether langCode can be used as default name.
static bool CanUseAsDefaultName(int8_t const langCode, vector<int8_t> const & nativeMwmLanguages);
// See comment for NamesDataSource class.
static NamesDataSource GetNamesDataSource(StringUtf8Multilang const & source,
vector<int8_t> const & nativeMwmLanguages,
int8_t const userLanguage);
private:
string m_houseNumber;
LocalizedStreet m_street;

View file

@ -6,6 +6,11 @@ namespace
{
using osm::EditableMapObject;
int8_t const GetLangCode(char const * ch)
{
return StringUtf8Multilang::GetLangIndex(ch);
}
UNIT_TEST(EditableMapObject_SetWebsite)
{
EditableMapObject emo;
@ -125,4 +130,98 @@ UNIT_TEST(EditableMapObject_ValidateEmail)
TEST(!EditableMapObject::ValidateEmail("emai@l_.ab"), ());
TEST(!EditableMapObject::ValidateEmail("email@e#$%&'*+-/=?^`_{}|~.com"), ());
}
UNIT_TEST(EditableMapObject_CanUseAsDefaultName)
{
EditableMapObject emo;
vector<int8_t> const nativeMwmLanguages {GetLangCode("de"), GetLangCode("fr")};
TEST(EditableMapObject::CanUseAsDefaultName(GetLangCode("de"), nativeMwmLanguages),
("Check possibility to use Mwm language code"));
TEST(EditableMapObject::CanUseAsDefaultName(GetLangCode("fr"), nativeMwmLanguages),
("Check possibility to use Mwm language code"));
TEST(!EditableMapObject::CanUseAsDefaultName(GetLangCode("int_name"), nativeMwmLanguages),
("Check possibility to use international language code"));
TEST(!EditableMapObject::CanUseAsDefaultName(100, nativeMwmLanguages),
("Incorrect language code is not supported"));
TEST(!EditableMapObject::CanUseAsDefaultName(GetLangCode("en"), {GetLangCode("abcd")}),
("Incorrect Mwm language name is not supported"));
TEST(!EditableMapObject::CanUseAsDefaultName(GetLangCode("en"), nativeMwmLanguages),
("Can not to use language which not Mwm language or international"));
TEST(!EditableMapObject::CanUseAsDefaultName(GetLangCode("ru"), nativeMwmLanguages),
("Check possibility to use user`s language code"));
// Trying to use language codes in reverse priority.
StringUtf8Multilang names;
names.AddString(GetLangCode("fr"), "second mwm language");
emo.SetName(names);
TEST(EditableMapObject::CanUseAsDefaultName(GetLangCode("fr"), nativeMwmLanguages),
("It is possible to fix typo"));
names.AddString(GetLangCode("de"), "first mwm language");
emo.SetName(names);
TEST(EditableMapObject::CanUseAsDefaultName(GetLangCode("de"), nativeMwmLanguages),
("It is possible to fix typo"));
TEST(EditableMapObject::CanUseAsDefaultName(GetLangCode("fr"), nativeMwmLanguages),
("It is possible to fix typo"));
}
UNIT_TEST(EditableMapObject_GetNamesDataSource)
{
EditableMapObject emo;
StringUtf8Multilang names;
names.AddString(GetLangCode("default"), "Default name");
names.AddString(GetLangCode("en"), "Eng name");
names.AddString(GetLangCode("int_name"), "Int name");
names.AddString(GetLangCode("de"), "De name");
names.AddString(GetLangCode("ru"), "Ru name");
names.AddString(GetLangCode("sv"), "Sv name");
names.AddString(GetLangCode("be"), "By name");
names.AddString(GetLangCode("ko"), "Ko name");
names.AddString(GetLangCode("it"), "It name");
emo.SetName(names);
vector<int8_t> nativeMwmLanguages = {GetLangCode("de"), GetLangCode("fr")};
auto const namesDataSource =
EditableMapObject::GetNamesDataSource(emo.GetName(), nativeMwmLanguages, GetLangCode("ko"));
TEST_EQUAL(namesDataSource.names.size(), 9, ("All names except the default should be pushed into "
"data source plus empty mandatory names"));
TEST_EQUAL(namesDataSource.mandatoryNamesCount, 3,
("Mandatory names count should be equal == Mwm languages + user`s language"));
TEST_EQUAL(namesDataSource.names[0].m_code, GetLangCode("de"),
("Deutsch name should be first as first language in Mwm"));
TEST_EQUAL(namesDataSource.names[1].m_code, GetLangCode("fr"),
("French name should be second as second language in Mwm"));
TEST_EQUAL(namesDataSource.names[2].m_code, GetLangCode("ko"),
("Korean name should be third because user`s language should be followed by Mwm languages"));
{
vector<int8_t> nativeMwmLanguages = {GetLangCode("de"), GetLangCode("fr")};
auto const namesDataSource =
EditableMapObject::GetNamesDataSource(emo.GetName(), nativeMwmLanguages, GetLangCode("fr"));
TEST_EQUAL(namesDataSource.names.size(), 9,
("All names except the default should be pushed into data source"));
TEST_EQUAL(namesDataSource.mandatoryNamesCount, 2,
("Mandatory names count should be equal == Mwm languages + user`s language. "
"Excluding repetiton"));
}
{
vector<int8_t> nativeMwmLanguages = {GetLangCode("fr"), GetLangCode("fr")};
auto const namesDataSource =
EditableMapObject::GetNamesDataSource(emo.GetName(), nativeMwmLanguages, GetLangCode("fr"));
TEST_EQUAL(namesDataSource.names.size(), 9,
("All names except the default should be pushed into "
"data source plus empty mandatory names"));
TEST_EQUAL(namesDataSource.mandatoryNamesCount, 1,
("Mandatory names count should be equal == Mwm languages + user`s language. "
"Excluding repetiton"));
}
}
} // namespace

View file

@ -426,6 +426,24 @@ bool Editor::IsCreatedFeature(FeatureID const & fid)
return fid.m_index >= kStartIndexForCreatedFeatures;
}
bool Editor::OriginalFeatureHasDefaultName(FeatureID const & fid) const
{
if (IsCreatedFeature(fid))
return false;
auto const originalFeaturePtr = m_getOriginalFeatureFn(fid);
if (!originalFeaturePtr)
{
LOG(LERROR, ("A feature with id", fid, "cannot be loaded."));
alohalytics::LogEvent("Editor_MissingFeature_Error");
return false;
}
auto const & names = originalFeaturePtr->GetNames();
return names.HasString(StringUtf8Multilang::kDefaultCode);
}
/// Several cases should be handled while saving changes:
/// 1) a feature is not in editor's cache
/// I. a feature was created

View file

@ -169,6 +169,8 @@ public:
// Use GetFeatureStatus(fid) instead. This function is used when a feature is
// not yet saved and we have to know if it was modified or created.
static bool IsCreatedFeature(FeatureID const & fid);
// Returns true if the original feature has default name.
bool OriginalFeatureHasDefaultName(FeatureID const & fid) const;
private:
// TODO(AlexZ): Synchronize Save call/make it on a separate thread.

View file

@ -16,7 +16,7 @@
{
MWMEditorAdditionalNamesHeader * h = [[[NSBundle mainBundle] loadNibNamed:[MWMEditorAdditionalNamesHeader className] owner:nil options:nil]
firstObject];
h.label.localizedText = L(@"editor_international_names_subtitle").uppercaseString;
h.label.localizedText = L(@"place_name").uppercaseString;
h.toggleBlock = toggleBlock;
return h;
}

View file

@ -1,5 +0,0 @@
@interface MWMEditorNameFooter : UIView
+ (instancetype)footer;
@end

View file

@ -1,32 +0,0 @@
#import "MWMEditorNameFooter.h"
@interface MWMEditorNameFooter ()
@property (weak, nonatomic) IBOutlet UILabel * label;
@end
@implementation MWMEditorNameFooter
+ (instancetype)footer
{
return [[[NSBundle mainBundle] loadNibNamed:[MWMEditorNameFooter className] owner:nil options:nil]
firstObject];
}
- (void)layoutSubviews
{
[super layoutSubviews];
[self.label sizeToIntegralFit];
self.height = self.subviews.firstObject.height;
[super layoutSubviews];
}
- (CGFloat)height
{
[self setNeedsLayout];
[self layoutIfNeeded];
return super.height;
}
@end

View file

@ -1,51 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="10116" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="DzZ-TH-upf" customClass="MWMEditorNameFooter">
<rect key="frame" x="0.0" y="0.0" width="320" height="36"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="efz-zL-06d">
<rect key="frame" x="0.0" y="2" width="320" height="32"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" preferredMaxLayoutWidth="288" translatesAutoresizingMaskIntoConstraints="NO" id="Peu-jb-4BW">
<rect key="frame" x="16" y="8" width="288" height="16"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="regular13"/>
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackSecondaryText"/>
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="place_name_caption"/>
</userDefinedRuntimeAttributes>
</label>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="Peu-jb-4BW" secondAttribute="bottom" constant="8" id="FFW-ln-kak"/>
<constraint firstItem="Peu-jb-4BW" firstAttribute="leading" secondItem="efz-zL-06d" secondAttribute="leading" constant="16" id="aKn-f3-WJ1"/>
<constraint firstItem="Peu-jb-4BW" firstAttribute="top" secondItem="efz-zL-06d" secondAttribute="top" constant="8" id="lhN-m0-nMG"/>
<constraint firstAttribute="trailing" secondItem="Peu-jb-4BW" secondAttribute="trailing" constant="16" id="y76-6j-Vzl"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="efz-zL-06d" firstAttribute="centerY" secondItem="DzZ-TH-upf" secondAttribute="centerY" id="DBi-4W-Glp"/>
<constraint firstItem="efz-zL-06d" firstAttribute="leading" secondItem="DzZ-TH-upf" secondAttribute="leading" id="X4V-d6-bir"/>
<constraint firstAttribute="trailing" secondItem="efz-zL-06d" secondAttribute="trailing" id="tUJ-dZ-qB0"/>
</constraints>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<connections>
<outlet property="label" destination="Peu-jb-4BW" id="rks-kV-c8c"/>
</connections>
<point key="canvasLocation" x="244" y="341"/>
</view>
</objects>
</document>

View file

@ -1,69 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="10116" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" rowHeight="44" id="uUF-rL-Jcn" customClass="MWMEditorTextTableViewCell">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="uUF-rL-Jcn" id="U0n-vz-Mf1">
<rect key="frame" x="0.0" y="0.0" width="320" height="43"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="xKX-yy-Dlc">
<rect key="frame" x="16" y="11" width="42" height="20"/>
<constraints>
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="10" id="Vyq-1r-IrP"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="regular17"/>
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackPrimaryText"/>
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="name"/>
</userDefinedRuntimeAttributes>
<variation key="default">
<mask key="constraints">
<exclude reference="Vyq-1r-IrP"/>
</mask>
</variation>
</label>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" horizontalCompressionResistancePriority="499" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="natural" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="XnK-GX-uDn">
<rect key="frame" x="74" y="11" width="230" height="21"/>
<fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="17"/>
<textInputTraits key="textInputTraits"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="regular17"/>
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackPrimaryText"/>
<userDefinedRuntimeAttribute type="string" keyPath="localizedPlaceholder" value="editor_edit_place_name_hint"/>
<userDefinedRuntimeAttribute type="string" keyPath="validatorName" value="MWMInputValidator"/>
</userDefinedRuntimeAttributes>
<connections>
<outlet property="delegate" destination="uUF-rL-Jcn" id="7W6-iy-j9O"/>
</connections>
</textField>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="xKX-yy-Dlc" firstAttribute="centerY" secondItem="U0n-vz-Mf1" secondAttribute="centerY" id="FGO-0q-Qkt"/>
<constraint firstAttribute="trailingMargin" secondItem="XnK-GX-uDn" secondAttribute="trailing" constant="8" id="bQK-iT-hix"/>
<constraint firstItem="XnK-GX-uDn" firstAttribute="centerY" secondItem="xKX-yy-Dlc" secondAttribute="centerY" id="gr8-fd-1wy"/>
<constraint firstItem="XnK-GX-uDn" firstAttribute="leading" secondItem="xKX-yy-Dlc" secondAttribute="trailing" constant="16" id="lPz-pZ-7dI"/>
<constraint firstItem="XnK-GX-uDn" firstAttribute="top" secondItem="U0n-vz-Mf1" secondAttribute="topMargin" constant="3" id="o7O-MA-LIA"/>
<constraint firstItem="xKX-yy-Dlc" firstAttribute="leading" secondItem="U0n-vz-Mf1" secondAttribute="leading" constant="16" id="z6t-dN-99D"/>
</constraints>
</tableViewCellContentView>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<connections>
<outlet property="textField" destination="XnK-GX-uDn" id="vHi-Y7-IKE"/>
</connections>
<point key="canvasLocation" x="205" y="291"/>
</tableViewCell>
</objects>
</document>

View file

@ -10,7 +10,6 @@
#import "MWMEditorAdditionalNamesTableViewController.h"
#import "MWMEditorCategoryCell.h"
#import "MWMEditorCommon.h"
#import "MWMEditorNameFooter.h"
#import "MWMEditorNotesFooter.h"
#import "MWMEditorSelectTableViewCell.h"
#import "MWMEditorSwitchTableViewCell.h"
@ -42,7 +41,6 @@ CGFloat const kDefaultFooterHeight = 32.;
typedef NS_ENUM(NSUInteger, MWMEditorSection) {
MWMEditorSectionCategory,
MWMEditorSectionName,
MWMEditorSectionAdditionalNames,
MWMEditorSectionAddress,
MWMEditorSectionDetails,
@ -51,7 +49,6 @@ typedef NS_ENUM(NSUInteger, MWMEditorSection) {
};
vector<MWMPlacePageCellType> const kSectionCategoryCellTypes{MWMPlacePageCellTypeCategory};
vector<MWMPlacePageCellType> const kSectionNameCellTypes{MWMPlacePageCellTypeName};
vector<MWMPlacePageCellType> const kSectionAddressCellTypes{
MWMPlacePageCellTypeStreet, MWMPlacePageCellTypeBuilding, MWMPlacePageCellTypeZipCode};
@ -60,7 +57,6 @@ vector<MWMPlacePageCellType> const kSectionButtonCellTypes{MWMPlacePageCellTypeR
MWMPlacePageCellTypeValueMap const kCellType2ReuseIdentifier{
{MWMPlacePageCellTypeCategory, "MWMEditorCategoryCell"},
{MWMPlacePageCellTypeName, "MWMEditorNameTableViewCell"},
{MWMPlacePageCellTypeAdditionalName, "MWMEditorAdditionalNameTableViewCell"},
{MWMPlacePageCellTypeAddAdditionalName, "MWMEditorAddAdditionalNameTableViewCell"},
{MWMPlacePageCellTypeAddAdditionalNamePlaceholder,
@ -87,17 +83,6 @@ NSString * reuseIdentifier(MWMPlacePageCellType cellType)
return haveCell ? @(it->second.c_str()) : @"";
}
vector<osm::LocalizedName> getAdditionalLocalizedNames(osm::EditableMapObject const & emo)
{
vector<osm::LocalizedName> result;
emo.GetName().ForEach([&result](int8_t code, string const & name) -> bool {
if (code != StringUtf8Multilang::kDefaultCode)
result.push_back({code, name});
return true;
});
return result;
}
void cleanupAdditionalLanguages(vector<osm::LocalizedName> const & names,
vector<NSInteger> & newAdditionalLanguages)
{
@ -113,11 +98,11 @@ void cleanupAdditionalLanguages(vector<osm::LocalizedName> const & names,
}
vector<MWMPlacePageCellType> cellsForAdditionalNames(
vector<osm::LocalizedName> const & names, vector<NSInteger> const & newAdditionalLanguages,
osm::NamesDataSource const & ds, vector<NSInteger> const & newAdditionalLanguages,
BOOL showAdditionalNames)
{
vector<MWMPlacePageCellType> res;
auto const allNamesSize = names.size() + newAdditionalLanguages.size();
auto const allNamesSize = ds.names.size() + newAdditionalLanguages.size();
if (allNamesSize != 0)
{
if (showAdditionalNames)
@ -126,8 +111,9 @@ vector<MWMPlacePageCellType> cellsForAdditionalNames(
}
else
{
res.push_back(MWMPlacePageCellTypeAdditionalName);
if (allNamesSize > 1)
auto const mandatoryNamesCount = ds.mandatoryNamesCount;
res.insert(res.begin(), mandatoryNamesCount, MWMPlacePageCellTypeAdditionalName);
if (allNamesSize > mandatoryNamesCount)
res.push_back(MWMPlacePageCellTypeAddAdditionalNamePlaceholder);
}
}
@ -184,7 +170,6 @@ void registerCellsForTableView(vector<MWMPlacePageCellType> const & cells, UITab
@property(nonatomic) NSMutableArray<NSIndexPath *> * invalidCells;
@property(nonatomic) MWMEditorAdditionalNamesHeader * additionalNamesHeader;
@property(nonatomic) MWMEditorNotesFooter * notesFooter;
@property(nonatomic) MWMEditorNameFooter * nameFooter;
@property(copy, nonatomic) NSString * note;
@property(nonatomic) osm::Editor::FeatureStatus featureStatus;
@property(nonatomic) BOOL isFeatureUploaded;
@ -363,13 +348,6 @@ void registerCellsForTableView(vector<MWMPlacePageCellType> const & cells, UITab
return _notesFooter;
}
- (MWMEditorNameFooter *)nameFooter
{
if (!_nameFooter)
_nameFooter = [MWMEditorNameFooter footer];
return _nameFooter;
}
#pragma mark - Properties
- (void)setShowAdditionalNames:(BOOL)showAdditionalNames
@ -423,18 +401,15 @@ void registerCellsForTableView(vector<MWMPlacePageCellType> const & cells, UITab
if (isNameEditable)
{
m_sections.push_back(MWMEditorSectionName);
m_cells[MWMEditorSectionName] = kSectionNameCellTypes;
registerCellsForTableView(kSectionNameCellTypes, self.tableView);
vector<osm::LocalizedName> localizedNames = getAdditionalLocalizedNames(m_mapObject);
auto const ds = m_mapObject.GetNamesDataSource();
auto const & localizedNames = ds.names;
cleanupAdditionalLanguages(localizedNames, m_newAdditionalLanguages);
auto const cells =
cellsForAdditionalNames(localizedNames, m_newAdditionalLanguages, self.showAdditionalNames);
cellsForAdditionalNames(ds, m_newAdditionalLanguages, self.showAdditionalNames);
m_sections.push_back(MWMEditorSectionAdditionalNames);
m_cells[MWMEditorSectionAdditionalNames] = cells;
registerCellsForTableView(cells, self.tableView);
[self.additionalNamesHeader setAdditionalNamesVisible:cells.size() > 2];
[self.additionalNamesHeader setAdditionalNamesVisible:cells.size() > ds.mandatoryNamesCount + 1];
}
if (isAddressEditable)
@ -564,23 +539,12 @@ void registerCellsForTableView(vector<MWMPlacePageCellType> const & cells, UITab
on:m_mapObject.GetInternet() == osm::Internet::Wlan];
break;
}
case MWMPlacePageCellTypeName:
{
MWMEditorTextTableViewCell * tCell = static_cast<MWMEditorTextTableViewCell *>(cell);
[tCell configWithDelegate:self
icon:nil
text:@(m_mapObject.GetDefaultName().c_str())
placeholder:L(@"name")
keyboardType:UIKeyboardTypeDefault
capitalization:UITextAutocapitalizationTypeSentences];
break;
}
case MWMPlacePageCellTypeAdditionalName:
{
MWMEditorAdditionalNameTableViewCell * tCell =
static_cast<MWMEditorAdditionalNameTableViewCell *>(cell);
vector<osm::LocalizedName> const localizedNames = getAdditionalLocalizedNames(m_mapObject);
auto const & localizedNames = m_mapObject.GetNamesDataSource().names;
if (indexPath.row < localizedNames.size())
{
@ -765,7 +729,6 @@ void registerCellsForTableView(vector<MWMPlacePageCellType> const & cells, UITab
{
switch (m_sections[section])
{
case MWMEditorSectionName:
case MWMEditorSectionAdditionalNames:
case MWMEditorSectionCategory:
case MWMEditorSectionButton: return nil;
@ -780,7 +743,6 @@ void registerCellsForTableView(vector<MWMPlacePageCellType> const & cells, UITab
switch (m_sections[section])
{
case MWMEditorSectionAdditionalNames: return self.additionalNamesHeader;
case MWMEditorSectionName:
case MWMEditorSectionCategory:
case MWMEditorSectionButton:
case MWMEditorSectionNote:
@ -801,7 +763,6 @@ void registerCellsForTableView(vector<MWMPlacePageCellType> const & cells, UITab
if (find(m_sections.begin(), m_sections.end(), MWMEditorSectionNote) == m_sections.end())
return self.notesFooter;
return nil;
case MWMEditorSectionName: return self.nameFooter;
case MWMEditorSectionNote: return self.notesFooter;
}
}
@ -816,14 +777,14 @@ void registerCellsForTableView(vector<MWMPlacePageCellType> const & cells, UITab
switch (m_sections[section])
{
case MWMEditorSectionAddress:
case MWMEditorSectionCategory:
case MWMEditorSectionAdditionalNames: return 1.0;
return 1.0;
case MWMEditorSectionDetails:
if (find(m_sections.begin(), m_sections.end(), MWMEditorSectionNote) == m_sections.end())
return self.notesFooter.height;
return 1.0;
case MWMEditorSectionNote: return self.notesFooter.height;
case MWMEditorSectionName: return self.nameFooter.height;
case MWMEditorSectionCategory:
case MWMEditorSectionAdditionalNames:
case MWMEditorSectionButton: return kDefaultFooterHeight;
}
}
@ -907,7 +868,6 @@ void registerCellsForTableView(vector<MWMPlacePageCellType> const & cells, UITab
string const val = changeText.UTF8String;
switch (cellType)
{
case MWMPlacePageCellTypeName: m_mapObject.SetName(val, StringUtf8Multilang::kDefaultCode); break;
case MWMPlacePageCellTypePhoneNumber:
m_mapObject.SetPhone(val);
if (!osm::EditableMapObject::ValidatePhone(val))

View file

@ -20,8 +20,6 @@
3401CD681C3C03A80028C6F8 /* MWMEditorTextTableViewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3401CD651C3C03A80028C6F8 /* MWMEditorTextTableViewCell.mm */; };
3401CD691C3C03A80028C6F8 /* MWMEditorTextTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3401CD661C3C03A80028C6F8 /* MWMEditorTextTableViewCell.xib */; };
3401CD6A1C3C03A80028C6F8 /* MWMEditorTextTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3401CD661C3C03A80028C6F8 /* MWMEditorTextTableViewCell.xib */; };
3401CD711C3C0C420028C6F8 /* MWMEditorNameTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3401CD701C3C0C420028C6F8 /* MWMEditorNameTableViewCell.xib */; };
3401CD721C3C0C420028C6F8 /* MWMEditorNameTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3401CD701C3C0C420028C6F8 /* MWMEditorNameTableViewCell.xib */; };
3401CD761C3CED1E0028C6F8 /* MWMEditorSelectTableViewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3401CD741C3CED1E0028C6F8 /* MWMEditorSelectTableViewCell.mm */; };
3401CD771C3CED1E0028C6F8 /* MWMEditorSelectTableViewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3401CD741C3CED1E0028C6F8 /* MWMEditorSelectTableViewCell.mm */; };
3401CD781C3CED1E0028C6F8 /* MWMEditorSelectTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3401CD751C3CED1E0028C6F8 /* MWMEditorSelectTableViewCell.xib */; };
@ -227,10 +225,6 @@
34B646BE1CEB6FC000E0C7A5 /* MWMEditorAdditionalNameTableViewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34B646BC1CEB6FC000E0C7A5 /* MWMEditorAdditionalNameTableViewCell.mm */; };
34B646C01CEB6FE000E0C7A5 /* MWMEditorAdditionalNameTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34B646BF1CEB6FE000E0C7A5 /* MWMEditorAdditionalNameTableViewCell.xib */; };
34B646C11CEB6FE000E0C7A5 /* MWMEditorAdditionalNameTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34B646BF1CEB6FE000E0C7A5 /* MWMEditorAdditionalNameTableViewCell.xib */; };
34B646C41CEB740900E0C7A5 /* MWMEditorNameFooter.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34B646C31CEB740900E0C7A5 /* MWMEditorNameFooter.mm */; };
34B646C51CEB740900E0C7A5 /* MWMEditorNameFooter.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34B646C31CEB740900E0C7A5 /* MWMEditorNameFooter.mm */; };
34B646C71CEB742500E0C7A5 /* MWMEditorNameFooter.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34B646C61CEB742500E0C7A5 /* MWMEditorNameFooter.xib */; };
34B646C81CEB742600E0C7A5 /* MWMEditorNameFooter.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34B646C61CEB742500E0C7A5 /* MWMEditorNameFooter.xib */; };
34B6CF5D1BBBFC6B009203C6 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 34B6CF5C1BBBFC6B009203C6 /* LaunchScreen.storyboard */; };
34B82AB21B8344E300180497 /* MWMSearchTextField.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34B82AB11B8344E300180497 /* MWMSearchTextField.mm */; };
34B82ABA1B837FFD00180497 /* MWMSearchHistoryRequestCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34B82AB81B837FFD00180497 /* MWMSearchHistoryRequestCell.mm */; };
@ -881,7 +875,6 @@
3401CD641C3C03A80028C6F8 /* MWMEditorTextTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMEditorTextTableViewCell.h; sourceTree = "<group>"; };
3401CD651C3C03A80028C6F8 /* MWMEditorTextTableViewCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMEditorTextTableViewCell.mm; sourceTree = "<group>"; };
3401CD661C3C03A80028C6F8 /* MWMEditorTextTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMEditorTextTableViewCell.xib; sourceTree = "<group>"; };
3401CD701C3C0C420028C6F8 /* MWMEditorNameTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMEditorNameTableViewCell.xib; sourceTree = "<group>"; };
3401CD731C3CED1E0028C6F8 /* MWMEditorSelectTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMEditorSelectTableViewCell.h; sourceTree = "<group>"; };
3401CD741C3CED1E0028C6F8 /* MWMEditorSelectTableViewCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMEditorSelectTableViewCell.mm; sourceTree = "<group>"; };
3401CD751C3CED1E0028C6F8 /* MWMEditorSelectTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMEditorSelectTableViewCell.xib; sourceTree = "<group>"; };
@ -1113,9 +1106,6 @@
34B646BB1CEB6FC000E0C7A5 /* MWMEditorAdditionalNameTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMEditorAdditionalNameTableViewCell.h; sourceTree = "<group>"; };
34B646BC1CEB6FC000E0C7A5 /* MWMEditorAdditionalNameTableViewCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMEditorAdditionalNameTableViewCell.mm; sourceTree = "<group>"; };
34B646BF1CEB6FE000E0C7A5 /* MWMEditorAdditionalNameTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMEditorAdditionalNameTableViewCell.xib; sourceTree = "<group>"; };
34B646C21CEB740900E0C7A5 /* MWMEditorNameFooter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMEditorNameFooter.h; sourceTree = "<group>"; };
34B646C31CEB740900E0C7A5 /* MWMEditorNameFooter.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMEditorNameFooter.mm; sourceTree = "<group>"; };
34B646C61CEB742500E0C7A5 /* MWMEditorNameFooter.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMEditorNameFooter.xib; sourceTree = "<group>"; };
34B6CF5C1BBBFC6B009203C6 /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = "<group>"; };
34B82AB01B8344E300180497 /* MWMSearchTextField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMSearchTextField.h; sourceTree = "<group>"; };
34B82AB11B8344E300180497 /* MWMSearchTextField.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMSearchTextField.mm; sourceTree = "<group>"; };
@ -2474,7 +2464,6 @@
3401CD641C3C03A80028C6F8 /* MWMEditorTextTableViewCell.h */,
3401CD651C3C03A80028C6F8 /* MWMEditorTextTableViewCell.mm */,
3401CD661C3C03A80028C6F8 /* MWMEditorTextTableViewCell.xib */,
3401CD701C3C0C420028C6F8 /* MWMEditorNameTableViewCell.xib */,
3401CD731C3CED1E0028C6F8 /* MWMEditorSelectTableViewCell.h */,
3401CD741C3CED1E0028C6F8 /* MWMEditorSelectTableViewCell.mm */,
3401CD751C3CED1E0028C6F8 /* MWMEditorSelectTableViewCell.xib */,
@ -2487,9 +2476,6 @@
345FD7DE1CEC7AD400F58045 /* MWMEditorAddAdditionalNameTableViewCell.h */,
345FD7DF1CEC7AD400F58045 /* MWMEditorAddAdditionalNameTableViewCell.mm */,
345FD7E21CEC7B0C00F58045 /* MWMEditorAddAdditionalNameTableViewCell.xib */,
34B646C21CEB740900E0C7A5 /* MWMEditorNameFooter.h */,
34B646C31CEB740900E0C7A5 /* MWMEditorNameFooter.mm */,
34B646C61CEB742500E0C7A5 /* MWMEditorNameFooter.xib */,
345FD7E51CEC7D8400F58045 /* MWMEditorAdditionalNamesHeader.h */,
345FD7E61CEC7D8400F58045 /* MWMEditorAdditionalNamesHeader.mm */,
345FD7E91CEC7DA800F58045 /* MWMEditorAdditionalNamesHeader.xib */,
@ -3385,10 +3371,8 @@
F6ED13561B16439E0095C6DE /* MWMDirectionView.xib in Resources */,
349C3AEF1D33A96B002AC7A9 /* MWMNavigationInfoView.xib in Resources */,
34D15BA91BD8F93C00C8BCBE /* AddSetTableViewCell.xib in Resources */,
34B646C71CEB742500E0C7A5 /* MWMEditorNameFooter.xib in Resources */,
FA99CB73147089B100689A9A /* Localizable.strings in Resources */,
34CFFE8D1B7DE71C009D0C9F /* MWMSearchView.xib in Resources */,
3401CD711C3C0C420028C6F8 /* MWMEditorNameTableViewCell.xib in Resources */,
3490D2E21CE9DD2500D0B838 /* MWMSideButtonsView.xib in Resources */,
347FD8751C60B2CE002FB65E /* MWMOpeningHoursClosedSpanTableViewCell.xib in Resources */,
6B9978351C89A316003B8AA0 /* editor.config in Resources */,
@ -3465,7 +3449,6 @@
6741A94A1BF340DE002C974C /* resources-6plus_clear in Resources */,
6741A94B1BF340DE002C974C /* unicode_blocks.txt in Resources */,
6741A94C1BF340DE002C974C /* fonts_blacklist.txt in Resources */,
3401CD721C3C0C420028C6F8 /* MWMEditorNameTableViewCell.xib in Resources */,
F6D4A7441CC1643100BD4E5B /* MWMButtonCell.xib in Resources */,
34CCFDE31C22A2EF00F28959 /* MWMPlacePageOpeningHoursCell.xib in Resources */,
6741A94D1BF340DE002C974C /* resources-xxhdpi_clear in Resources */,
@ -3533,7 +3516,6 @@
6741A9731BF340DE002C974C /* MWMSearchHistoryMyPositionCell.xib in Resources */,
349C3AF01D33A96B002AC7A9 /* MWMNavigationInfoView.xib in Resources */,
6741A9741BF340DE002C974C /* resources-6plus_dark in Resources */,
34B646C81CEB742600E0C7A5 /* MWMEditorNameFooter.xib in Resources */,
3401CD6A1C3C03A80028C6F8 /* MWMEditorTextTableViewCell.xib in Resources */,
341F99E01C6B1165001C67B8 /* MWMMapDownloaderSubplaceTableViewCell.xib in Resources */,
6741A9751BF340DE002C974C /* WorldCoasts.mwm in Resources */,
@ -3813,7 +3795,6 @@
F64F4B6D1B46A51F0081A24A /* MWMDownloaderDialogCell.mm in Sources */,
3491E7CB1C06F1F10042FE24 /* MWMPlacePageButtonCell.mm in Sources */,
97508423199522D300A7457D /* SettingsAndMoreVC.mm in Sources */,
34B646C41CEB740900E0C7A5 /* MWMEditorNameFooter.mm in Sources */,
341F99D91C6B1165001C67B8 /* MWMMapDownloaderPlaceTableViewCell.mm in Sources */,
345FD7E71CEC7D8400F58045 /* MWMEditorAdditionalNamesHeader.mm in Sources */,
341F99D51C6B1165001C67B8 /* MWMMapDownloaderLargeCountryTableViewCell.mm in Sources */,
@ -4039,7 +4020,6 @@
6741AA1D1BF340DE002C974C /* MWMDownloadTransitMapAlert.mm in Sources */,
341F99DA1C6B1165001C67B8 /* MWMMapDownloaderPlaceTableViewCell.mm in Sources */,
341F99D61C6B1165001C67B8 /* MWMMapDownloaderLargeCountryTableViewCell.mm in Sources */,
34B646C51CEB740900E0C7A5 /* MWMEditorNameFooter.mm in Sources */,
6741AA1E1BF340DE002C974C /* LinkCell.mm in Sources */,
345FD7E81CEC7D8400F58045 /* MWMEditorAdditionalNamesHeader.mm in Sources */,
347FD8701C60B2CE002FB65E /* MWMOpeningHoursAllDayTableViewCell.mm in Sources */,

View file

@ -1214,8 +1214,6 @@
"place_name" = "اسم المكان";
"place_name_caption" = "أدخل الاسم كما هو مبين على العلامة أو اللافتة";
/* title above languages list cells in the editor, below editable name text field. */
"other_languages" = "لغات أخرى";
@ -1405,8 +1403,6 @@
"editor_no_local_edits_description" = "يوضح هذا عدد التغييرات المقترحة على الخريطة والتي يمكن الوصول إليها حاليًا فقط من على جهازك.";
"editor_international_names_subtitle" = "الاسم بلغات أخرى";
"editor_send_to_osm" = "إرسال الى OSM";
"editor_remove" = "إزالة";

View file

@ -1214,8 +1214,6 @@
"place_name" = "Název místa";
"place_name_caption" = "Zadejte název tak, jak je uveden na ceduli nebo vývěsním štítu";
/* title above languages list cells in the editor, below editable name text field. */
"other_languages" = "Další jazyky";
@ -1405,8 +1403,6 @@
"editor_no_local_edits_description" = "Zde vidíte počet navržených změn, které jsou v tuto chvíli dostupné pouze na Vašem zařízení.";
"editor_international_names_subtitle" = "Název v jiných jazycích";
"editor_send_to_osm" = "Odeslat do OSM";
"editor_remove" = "Odstranit";

View file

@ -1214,8 +1214,6 @@
"place_name" = "Navn på sted";
"place_name_caption" = "Indtast navnet, som det står på skiltet eller navneskiltet";
/* title above languages list cells in the editor, below editable name text field. */
"other_languages" = "Andre sprog";
@ -1405,8 +1403,6 @@
"editor_no_local_edits_description" = "Den viser antallet af dine foreslåede ændringer på kortet, der kun er tilgængelige på din enhed.";
"editor_international_names_subtitle" = "Navn på andre sprog";
"editor_send_to_osm" = "Send til OSM";
"editor_remove" = "Fjern";

View file

@ -1214,8 +1214,6 @@
"place_name" = "Name des Platzes";
"place_name_caption" = "Geben Sie den Namen wie auf dem Schild oder dem Namensschild angegeben ein";
/* title above languages list cells in the editor, below editable name text field. */
"other_languages" = "Andere Sprachen";
@ -1405,8 +1403,6 @@
"editor_no_local_edits_description" = "Hier erscheint die Anzahl Ihrer Änderungsvorschläge für die Karte, auf die Sie bislang nur von Ihrem Gerät aus zugreifen können.";
"editor_international_names_subtitle" = "Name in anderen Sprachen";
"editor_send_to_osm" = "An OSM senden";
"editor_remove" = "Löschen";

View file

@ -1214,8 +1214,6 @@
"place_name" = "Place Name";
"place_name_caption" = "Enter the name as on the sign or nameplate";
/* title above languages list cells in the editor, below editable name text field. */
"other_languages" = "Other Languages";
@ -1405,8 +1403,6 @@
"editor_no_local_edits_description" = "This shows the number of your suggested changes on the map that are currently accessible only on your device.";
"editor_international_names_subtitle" = "Name in other languages";
"editor_send_to_osm" = "Send to OSM";
"editor_remove" = "Remove";

View file

@ -1214,8 +1214,6 @@
"place_name" = "Nombre del lugar";
"place_name_caption" = "Introduce el nombre indicado en el letrero o la placa";
/* title above languages list cells in the editor, below editable name text field. */
"other_languages" = "Otros idiomas";
@ -1405,8 +1403,6 @@
"editor_no_local_edits_description" = "Esto muestra el número de sus cambios sugeridos en el mapa que actualmente solo son accesibles desde su dispositivo.";
"editor_international_names_subtitle" = "Nombre en otros idiomas";
"editor_send_to_osm" = "Enviar a OSM";
"editor_remove" = "Eliminar";

View file

@ -1214,8 +1214,6 @@
"place_name" = "Paikan nimi";
"place_name_caption" = "Syötä nimi kuten nimikyltissä kirjoitettu";
/* title above languages list cells in the editor, below editable name text field. */
"other_languages" = "Muut Kielet";
@ -1405,8 +1403,6 @@
"editor_no_local_edits_description" = "Tämä näyttää ehdottamiesi muutosten lukumäärän tällä hetkellä vain sinun laitteessasi saatavissa olevassa kartassa.";
"editor_international_names_subtitle" = "Nimi toisella kielellä";
"editor_send_to_osm" = "Lähetä OSM:ään";
"editor_remove" = "Poista";

View file

@ -1214,8 +1214,6 @@
"place_name" = "Nom du lieu";
"place_name_caption" = "Entrez le nom indiqué sur le panneau ou sur la plaque";
/* title above languages list cells in the editor, below editable name text field. */
"other_languages" = "Autres langues";
@ -1405,8 +1403,6 @@
"editor_no_local_edits_description" = "Affiche le nombre de modifications suggérées dans la carte actuellement uniquement accessible sur votre périphérique.";
"editor_international_names_subtitle" = "Nom dans d'autres langues";
"editor_send_to_osm" = "Envoyer à OSM";
"editor_remove" = "Supprimer";

View file

@ -1214,8 +1214,6 @@
"place_name" = "Hely neve";
"place_name_caption" = "Adja meg a táblán vagy az utcatáblán megjelenő nevet";
/* title above languages list cells in the editor, below editable name text field. */
"other_languages" = "Más nyelv";
@ -1405,8 +1403,6 @@
"editor_no_local_edits_description" = "Itt a pillanatnyilag csak az Ön készülékén elérhető térképek javasolt módosításainak száma látható.";
"editor_international_names_subtitle" = "Név más nyelveken";
"editor_send_to_osm" = "Küldés az OSM-nek";
"editor_remove" = "Eltávolítás";

View file

@ -1214,8 +1214,6 @@
"place_name" = "Nama tempat";
"place_name_caption" = "Masukkan nama seperti pada tanda atau pelat nama";
/* title above languages list cells in the editor, below editable name text field. */
"other_languages" = "Bahasa lainnya";
@ -1405,8 +1403,6 @@
"editor_no_local_edits_description" = "Ini menunjukkan jumlah saran perubahan dalam peta yang saat ini hanya dapat diakses di perangkat Anda.";
"editor_international_names_subtitle" = "Nama dalam bahasa lain";
"editor_send_to_osm" = "Kirim ke OSM";
"editor_remove" = "Hapus";

View file

@ -1214,8 +1214,6 @@
"place_name" = "Nome del luogo";
"place_name_caption" = "Inserisci il nome riportato nel segnale o nella targhetta";
/* title above languages list cells in the editor, below editable name text field. */
"other_languages" = "Altre lingue";
@ -1405,8 +1403,6 @@
"editor_no_local_edits_description" = "Qui è visualizzato il numero di modifiche suggerite sulla mappa che sono attualmente solo accessibili sul tuo dispositivo.";
"editor_international_names_subtitle" = "Nome in altre lingue";
"editor_send_to_osm" = "Invia a OSM";
"editor_remove" = "Rimuovi";

View file

@ -1214,8 +1214,6 @@
"place_name" = "場所の名前";
"place_name_caption" = "標識や表札の地名を入力";
/* title above languages list cells in the editor, below editable name text field. */
"other_languages" = "その他の言語";
@ -1405,8 +1403,6 @@
"editor_no_local_edits_description" = "これは、現在お使いのデバイスでのみアクセス可能な、マップ上に提案された変更の数を示しています。";
"editor_international_names_subtitle" = "他の言語での名前";
"editor_send_to_osm" = "OSMに送信";
"editor_remove" = "削除";

View file

@ -1214,8 +1214,6 @@
"place_name" = "지명";
"place_name_caption" = "기호 또는 이름판으로 이름 입력";
/* title above languages list cells in the editor, below editable name text field. */
"other_languages" = "다른 언어";
@ -1405,8 +1403,6 @@
"editor_no_local_edits_description" = "이는 현재 귀하의 장치에서만 액세스할 수 있으며, 지도에서 만든 변경사항를 보여줍니다.";
"editor_international_names_subtitle" = "다른 언어로된 이름";
"editor_send_to_osm" = "OSM에 전송";
"editor_remove" = "삭제";

View file

@ -1214,8 +1214,6 @@
"place_name" = "Stedsnavn";
"place_name_caption" = "Oppgi navnet som på skiltet eller navneskiltet";
/* title above languages list cells in the editor, below editable name text field. */
"other_languages" = "Andre språk";
@ -1405,8 +1403,6 @@
"editor_no_local_edits_description" = "Dette viser antallet foreslåtte endringer på kartet som i øyeblikket bare er tilgjengelige på enheten din.";
"editor_international_names_subtitle" = "Navn på andre språk";
"editor_send_to_osm" = "Send til OSM";
"editor_remove" = "Fjern";

View file

@ -1214,8 +1214,6 @@
"place_name" = "Locatienaam";
"place_name_caption" = "Voer de naam in zoals die op het bord of naamplaatje wordt weergegeven";
/* title above languages list cells in the editor, below editable name text field. */
"other_languages" = "Overige talen";
@ -1405,8 +1403,6 @@
"editor_no_local_edits_description" = "Dit toont het aantal voorgestelde wijzigingen voor de kaart die momenteel alleen toegankelijk zijn op uw apparaat.";
"editor_international_names_subtitle" = "Naam in andere talen";
"editor_send_to_osm" = "Naar OSM sturen";
"editor_remove" = "Verwijderen";

View file

@ -1214,8 +1214,6 @@
"place_name" = "Nazwa miejsca";
"place_name_caption" = "Wpisz nazwę zgodną z szyldem lub tabliczką";
/* title above languages list cells in the editor, below editable name text field. */
"other_languages" = "Inne języki";
@ -1405,8 +1403,6 @@
"editor_no_local_edits_description" = "Jest to liczba sugerowanych przez ciebie zmian na mapie, które aktualnie dostępne są tylko na twoim urządzeniu.";
"editor_international_names_subtitle" = "Nazwa w innych językach";
"editor_send_to_osm" = "Wyślij do OSM";
"editor_remove" = "Usuń";

View file

@ -1214,8 +1214,6 @@
"place_name" = "Nome do local";
"place_name_caption" = "Informe o nome como está indicado na sinalização ou na placa";
/* title above languages list cells in the editor, below editable name text field. */
"other_languages" = "Outros idiomas";
@ -1405,8 +1403,6 @@
"editor_no_local_edits_description" = "Isto demonstra o número das suas alterações sugeridas no mapa que atualmente só são acessíveis no seu dispositivo.";
"editor_international_names_subtitle" = "Nome noutras línguas";
"editor_send_to_osm" = "Enviar para OSM";
"editor_remove" = "Remover";

View file

@ -1214,8 +1214,6 @@
"place_name" = "Denumire loc";
"place_name_caption" = "Introduceți denumirea așa cum apare ea pe indicator sau plăcuță";
/* title above languages list cells in the editor, below editable name text field. */
"other_languages" = "Alte limbi";
@ -1405,8 +1403,6 @@
"editor_no_local_edits_description" = "Acesta arată numărul de modificări sugerate pe hartă care sunt momentan accesibile doar pe dispozitivul dvs.";
"editor_international_names_subtitle" = "Nume în alte limbi";
"editor_send_to_osm" = "Trimitere la OSM";
"editor_remove" = "Eliminare";

View file

@ -1214,8 +1214,6 @@
"place_name" = "Название";
"place_name_caption" = "Введите название как на табличке или вывеске";
/* title above languages list cells in the editor, below editable name text field. */
"other_languages" = "Другие языки";
@ -1405,8 +1403,6 @@
"editor_no_local_edits_description" = "Здесь отображается количество предложенных вами изменений на карте, которые доступны пока только на вашем устройстве.";
"editor_international_names_subtitle" = "Название на других языках";
"editor_send_to_osm" = "Отправить в OSM";
"editor_remove" = "Удалить";

View file

@ -1214,8 +1214,6 @@
"place_name" = "Názov miesta";
"place_name_caption" = "Zadajte názov ako na značke alebo menovke";
/* title above languages list cells in the editor, below editable name text field. */
"other_languages" = "Iné jazyky";
@ -1405,8 +1403,6 @@
"editor_no_local_edits_description" = "Tu sa zobrazuje počet navrhovaných zmien na mape momentálne dostupných len vo vašom zariadení.";
"editor_international_names_subtitle" = "Názov v iných jazykoch";
"editor_send_to_osm" = "Odoslať do OSM";
"editor_remove" = "Odstrániť";

View file

@ -1214,8 +1214,6 @@
"place_name" = "Platsens namn";
"place_name_caption" = "Ange namnet som på skylten eller på namnbrickan";
/* title above languages list cells in the editor, below editable name text field. */
"other_languages" = "Övriga språk";
@ -1405,8 +1403,6 @@
"editor_no_local_edits_description" = "Detta visar antalet föreslagna förändringar på kartan som som endast är tillgängliga på din enhet.";
"editor_international_names_subtitle" = "Namn på andra språk";
"editor_send_to_osm" = "Skicka till OSM";
"editor_remove" = "Ta bord";

View file

@ -1214,8 +1214,6 @@
"place_name" = "ชื่อสถานที่";
"place_name_caption" = "กรอกชื่อตามที่แสดงในสัญลักษณ์หรือป้ายแสดงชื่อ";
/* title above languages list cells in the editor, below editable name text field. */
"other_languages" = "ภาษาอื่น ๆ";
@ -1405,8 +1403,6 @@
"editor_no_local_edits_description" = "หมายเลขที่แสดงอยู่ คือ หมายเลขที่คุณได้ทำการแนะนำการเปลี่ยนแปลงบนแผนที่ที่สามารถเข้าถึงได้โดยอุปกรณ์ของคุณท่านั้น";
"editor_international_names_subtitle" = "ชื่อในภาษาอื่น";
"editor_send_to_osm" = "ส่งไปที่ OSM";
"editor_remove" = "ลบออก";

View file

@ -1214,8 +1214,6 @@
"place_name" = "Yer ismi";
"place_name_caption" = "İşaret veya tabeladaki gibi ismi girin";
/* title above languages list cells in the editor, below editable name text field. */
"other_languages" = "Diğer Diller";
@ -1405,8 +1403,6 @@
"editor_no_local_edits_description" = "Bu, harita üzerinde önerdiğiniz değişikliklerden sadece şu anda cihazınızda erişilebilenlerin sayısını gösterir.";
"editor_international_names_subtitle" = "Diğer dillerdeki adı";
"editor_send_to_osm" = "OSMye gönder";
"editor_remove" = "Kaldır";

View file

@ -1214,8 +1214,6 @@
"place_name" = "Назва";
"place_name_caption" = "Введіть назву як на вивісці або табличці";
/* title above languages list cells in the editor, below editable name text field. */
"other_languages" = "Інші мови";
@ -1405,8 +1403,6 @@
"editor_no_local_edits_description" = "Тут відображається кількість запропонованих вами змін на карті, які доступні тільки на вашому пристрою";
"editor_international_names_subtitle" = "Назва на інших мовах";
"editor_send_to_osm" = "Відправити до OSM";
"editor_remove" = "Видалити";

View file

@ -1214,8 +1214,6 @@
"place_name" = "Tên địa điểm";
"place_name_caption" = "Nhập tên theo như trên chữ ký hoặc biển tên";
/* title above languages list cells in the editor, below editable name text field. */
"other_languages" = "Ngôn ngữ khác";
@ -1405,8 +1403,6 @@
"editor_no_local_edits_description" = "Thông tin này cho biết số thay đổi đề nghị của bạn trên bản đồ hiện chỉ có thể truy cập trên thiết bị của bạn.";
"editor_international_names_subtitle" = "Tên bằng các ngôn ngữ khác";
"editor_send_to_osm" = "Gửi đến OSM";
"editor_remove" = "Xóa";

View file

@ -1214,8 +1214,6 @@
"place_name" = "地点名";
"place_name_caption" = "输入标识或名牌上的名称";
/* title above languages list cells in the editor, below editable name text field. */
"other_languages" = "其他语言";
@ -1405,8 +1403,6 @@
"editor_no_local_edits_description" = "这显示了当前仅在您设备上能够访问的对地图建议修改的数量。";
"editor_international_names_subtitle" = "其他语言的名称";
"editor_send_to_osm" = "发送至 OSM";
"editor_remove" = "删除";

View file

@ -1214,8 +1214,6 @@
"place_name" = "地點名稱";
"place_name_caption" = "輸入標識或名牌上的名稱";
/* title above languages list cells in the editor, below editable name text field. */
"other_languages" = "其他語言";
@ -1405,8 +1403,6 @@
"editor_no_local_edits_description" = "這顯示了對目前僅可在您的裝置上存取的地圖的建議修改數量。";
"editor_international_names_subtitle" = "其他語言的名稱";
"editor_send_to_osm" = "傳送至 OSM";
"editor_remove" = "移除";

View file

@ -3008,3 +3008,8 @@ void Framework::CreateNote(ms::LatLon const & latLon, FeatureID const & fid,
if (type == osm::Editor::NoteProblemType::PlaceDoesNotExist)
DeactivateMapSelection(true /* notifyUI */);
}
bool Framework::OriginalFeatureHasDefaultName(FeatureID const & fid) const
{
return osm::Editor::Instance().OriginalFeatureHasDefaultName(fid);
}

View file

@ -715,5 +715,9 @@ private:
editor::UserStatsLoader m_userStatsLoader;
//@}
public:
bool OriginalFeatureHasDefaultName(FeatureID const & fid) const;
private:
DECLARE_THREAD_CHECKER(m_threadChecker);
};

View file

@ -60,7 +60,9 @@ EditorDialog::EditorDialog(QWidget * parent, osm::EditableMapObject & emo)
int namesRow = 0;
namesGrid->addWidget(defaultName, namesRow++, 0, 1, 0);
for (osm::LocalizedName const & ln : emo.GetLocalizedNames())
auto const namesDataSource = emo.GetNamesDataSource();
for (auto const & ln : namesDataSource.names)
{
if (ln.m_code == StringUtf8Multilang::kDefaultCode)
{

View file

@ -13946,36 +13946,6 @@
zh-Hant = 地點名稱
sk = Názov miesta
[place_name_caption]
tags = ios, android
en = Enter the name as on the sign or nameplate
ru = Введите название как на табличке или вывеске
ar = أدخل الاسم كما هو مبين على العلامة أو اللافتة
cs = Zadejte název tak, jak je uveden na ceduli nebo vývěsním štítu
da = Indtast navnet, som det står på skiltet eller navneskiltet
nl = Voer de naam in zoals die op het bord of naamplaatje wordt weergegeven
fi = Syötä nimi kuten nimikyltissä kirjoitettu
fr = Entrez le nom indiqué sur le panneau ou sur la plaque
de = Geben Sie den Namen wie auf dem Schild oder dem Namensschild angegeben ein
hu = Adja meg a táblán vagy az utcatáblán megjelenő nevet
id = Masukkan nama seperti pada tanda atau pelat nama
it = Inserisci il nome riportato nel segnale o nella targhetta
ja = 標識や表札の地名を入力
ko = 기호 또는 이름판으로 이름 입력
nb = Oppgi navnet som på skiltet eller navneskiltet
pl = Wpisz nazwę zgodną z szyldem lub tabliczką
pt = Informe o nome como está indicado na sinalização ou na placa
ro = Introduceți denumirea așa cum apare ea pe indicator sau plăcuță
es = Introduce el nombre indicado en el letrero o la placa
sv = Ange namnet som på skylten eller på namnbrickan
th = กรอกชื่อตามที่แสดงในสัญลักษณ์หรือป้ายแสดงชื่อ
tr = İşaret veya tabeladaki gibi ismi girin
uk = Введіть назву як на вивісці або табличці
vi = Nhập tên theo như trên chữ ký hoặc biển tên
zh-Hans = 输入标识或名牌上的名称
zh-Hant = 輸入標識或名牌上的名稱
sk = Zadajte názov ako na značke alebo menovke
[other_languages]
comment = title above languages list cells in the editor, below editable name text field.
tags = ios, android
@ -16619,35 +16589,6 @@
zh-Hant = 這顯示了對目前僅可在您的裝置上存取的地圖的建議修改數量。
sk = Tu sa zobrazuje počet navrhovaných zmien na mape momentálne dostupných len vo vašom zariadení.
[editor_international_names_subtitle]
en = Name in other languages
ru = Название на других языках
ar = الاسم بلغات أخرى
cs = Název v jiných jazycích
da = Navn på andre sprog
nl = Naam in andere talen
fi = Nimi toisella kielellä
fr = Nom dans d'autres langues
de = Name in anderen Sprachen
hu = Név más nyelveken
id = Nama dalam bahasa lain
it = Nome in altre lingue
ja = 他の言語での名前
ko = 다른 언어로된 이름
nb = Navn på andre språk
pl = Nazwa w innych językach
pt = Nome noutras línguas
ro = Nume în alte limbi
es = Nombre en otros idiomas
sv = Namn på andra språk
th = ชื่อในภาษาอื่น
tr = Diğer dillerdeki adı
uk = Назва на інших мовах
vi = Tên bằng các ngôn ngữ khác
zh-Hans = 其他语言的名称
zh-Hant = 其他語言的名稱
sk = Názov v iných jazykoch
[editor_send_to_osm]
en = Send to OSM
ru = Отправить в OSM