diff --git a/android/jni/com/mapswithme/maps/editor/Editor.cpp b/android/jni/com/mapswithme/maps/editor/Editor.cpp
index 8b7c349cce..05361d78a3 100644
--- a/android/jni/com/mapswithme/maps/editor/Editor.cpp
+++ b/android/jni/com/mapswithme/maps/editor/Editor.cpp
@@ -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++)
diff --git a/android/res/layout/item_localized_name.xml b/android/res/layout/item_localized_name.xml
index 3173863aa5..78db5817a0 100644
--- a/android/res/layout/item_localized_name.xml
+++ b/android/res/layout/item_localized_name.xml
@@ -8,7 +8,7 @@
android:gravity="center_vertical"
android:orientation="horizontal">
-
@@ -19,7 +19,7 @@
android:hint="@string/editor_edit_place_name_hint"
android:singleLine="true"/>
-
+
-
-
-
-
-
-
-
+ tools:ignore="UnusedAttribute" />
-
+
+
+
+ android:textAppearance="@style/MwmTextAppearance.Button" />
-
\ No newline at end of file
+
diff --git a/android/res/values-ar/strings.xml b/android/res/values-ar/strings.xml
index ad11e450bb..32247168d2 100644
--- a/android/res/values-ar/strings.xml
+++ b/android/res/values-ar/strings.xml
@@ -720,7 +720,6 @@
قم بتسجيل الدخول في www.openstreetmap.orgتعديل المكاناسم المكان
- أدخل الاسم كما هو مبين على العلامة أو اللافتةلغات أخرىإضافة لغة
@@ -816,7 +815,6 @@
أدخل الشركة أو المؤسسة أو الشخص المسؤول عن المنشآت.ليست لديك تعديلات محليةيوضح هذا عدد التغييرات المقترحة على الخريطة والتي يمكن الوصول إليها حاليًا فقط من على جهازك.
- الاسم بلغات أخرىإرسال الى OSMإزالةخرائطي
diff --git a/android/res/values-cs/strings.xml b/android/res/values-cs/strings.xml
index 98264f4ad4..62b0cd4a43 100644
--- a/android/res/values-cs/strings.xml
+++ b/android/res/values-cs/strings.xml
@@ -721,7 +721,6 @@
Přihlásit se pomocí účtu www.openstreetmap.orgUpravit místoNázev místa
- Zadejte název tak, jak je uveden na ceduli nebo vývěsním štítuDalší jazykyPřidat jazyk
@@ -817,7 +816,6 @@
Zadejte osobu, společnost nebo organizaci, která zodpovídá za zařízení.Neprovedli jste žádné místní úpravyZde vidíte počet navržených změn, které jsou v tuto chvíli dostupné pouze na Vašem zařízení.
- Název v jiných jazycíchOdeslat do OSMOdstranitMé mapy
diff --git a/android/res/values-da/strings.xml b/android/res/values-da/strings.xml
index 13e93a41d0..f6a47316f4 100644
--- a/android/res/values-da/strings.xml
+++ b/android/res/values-da/strings.xml
@@ -718,7 +718,6 @@
Log ind med www.openstreetmap.orgRedigér stedetNavn på sted
- Indtast navnet, som det står på skiltet eller navneskiltetAndre sprogTilføj et sprog
@@ -814,7 +813,6 @@
Angiv firmaet, organisationen eller personen som er ansvarlig for faciliteterne.Du har ikke lokale ændringerDen viser antallet af dine foreslåede ændringer på kortet, der kun er tilgængelige på din enhed.
- Navn på andre sprogSend til OSMFjernMine kort
diff --git a/android/res/values-de/strings.xml b/android/res/values-de/strings.xml
index 34440e9106..4548b83515 100644
--- a/android/res/values-de/strings.xml
+++ b/android/res/values-de/strings.xml
@@ -740,7 +740,6 @@
Mit www.openstreetmap.org anmeldenPlatz bearbeitenName des Platzes
- Geben Sie den Namen wie auf dem Schild oder dem Namensschild angegeben einAndere Sprachen
@@ -840,7 +839,6 @@
Geben Sie die Firma, die Organisation oder die Person an, die den Betrieb des Objekts gewährleistet.Sie haben keine lokalen KorrekturenHier erscheint die Anzahl Ihrer Änderungsvorschläge für die Karte, auf die Sie bislang nur von Ihrem Gerät aus zugreifen können.
- Name in anderen SprachenAn OSM sendenLöschenMeine Karten
diff --git a/android/res/values-es/strings.xml b/android/res/values-es/strings.xml
index c8c3c10594..086f146b19 100644
--- a/android/res/values-es/strings.xml
+++ b/android/res/values-es/strings.xml
@@ -709,7 +709,6 @@
Iniciar sesión con www.openstreetmap.orgEditar el lugarNombre del lugar
- Introduce el nombre indicado en el letrero o la placaOtros idiomasAñadir un idioma
@@ -805,7 +804,6 @@
Introduzca la empresa, organización o individuo responsable de las instalaciones.No tiene ediciones localesEsto muestra el número de sus cambios sugeridos en el mapa que actualmente solo son accesibles desde su dispositivo.
- Nombre en otros idiomasEnviar a OSMEliminarMis mapas
diff --git a/android/res/values-fi/strings.xml b/android/res/values-fi/strings.xml
index c6c7d17040..198009782c 100644
--- a/android/res/values-fi/strings.xml
+++ b/android/res/values-fi/strings.xml
@@ -714,7 +714,6 @@
Kirjaudu sisään osoitteessa www.openstreetmap.orgMuokkaa sijaintiaPaikan nimi
- Syötä nimi kuten nimikyltissä kirjoitettuMuut KieletLisää kieli
@@ -810,7 +809,6 @@
Syötä tiloista vastuussa oleva yhtiö, organisaatio tai henkilöSinulla ei ole paikallisia muokkauksiaTämä näyttää ehdottamiesi muutosten lukumäärän tällä hetkellä vain sinun laitteessasi saatavissa olevassa kartassa.
- Nimi toisella kielelläLähetä OSM:äänPoistaOmat kartat
diff --git a/android/res/values-fr/strings.xml b/android/res/values-fr/strings.xml
index 007ad51b63..c202b29999 100644
--- a/android/res/values-fr/strings.xml
+++ b/android/res/values-fr/strings.xml
@@ -725,7 +725,6 @@
Connectez-vous sur www.openstreetmap.orgModifier le lieuNom du lieu
- Entrez le nom indiqué sur le panneau ou sur la plaqueAutres languesAjouter une langue
@@ -821,7 +820,6 @@
Entrer la société, l\'organisation ou l\'individu responsable des installations.Vous n\'avez pas de modifications localesAffiche le nombre de modifications suggérées dans la carte actuellement uniquement accessible sur votre périphérique.
- Nom dans d\'autres languesEnvoyer à OSMSupprimerMes cartes
diff --git a/android/res/values-hu/strings.xml b/android/res/values-hu/strings.xml
index c66081c4df..04a7b08890 100644
--- a/android/res/values-hu/strings.xml
+++ b/android/res/values-hu/strings.xml
@@ -715,7 +715,6 @@
Jelentkezz be a www.openstreetmap.org oldalonHely szerkesztéseHely neve
- Adja meg a táblán vagy az utcatáblán megjelenő nevetMás nyelvNyelv hozzáadása
@@ -811,7 +810,6 @@
Írja ide a működtetésért felelős cég, szervezet vagy magánszemély nevét.Nincsenek helyi módosításaiItt a pillanatnyilag csak az Ön készülékén elérhető térképek javasolt módosításainak száma látható.
- Név más nyelvekenKüldés az OSM-nekEltávolításTérképeim
diff --git a/android/res/values-in/strings.xml b/android/res/values-in/strings.xml
index 31f08ec3a5..1b0a78e3c6 100644
--- a/android/res/values-in/strings.xml
+++ b/android/res/values-in/strings.xml
@@ -713,7 +713,6 @@
Masuk menggunakan www.openstreetmap.orgSunting tempatNama tempat
- Masukkan nama seperti pada tanda atau pelat namaBahasa lainnyaTambahkan bahasa
@@ -809,7 +808,6 @@
Masukkan perusahaan, organisasi, atau individu yang bertanggung jawab atas fasilitas tersebut.Anda tidak memiliki pengeditan lokalIni menunjukkan jumlah saran perubahan dalam peta yang saat ini hanya dapat diakses di perangkat Anda.
- Nama dalam bahasa lainKirim ke OSMHapusPeta saya
diff --git a/android/res/values-it/strings.xml b/android/res/values-it/strings.xml
index 6523fc1d4b..bf0cae7a0c 100644
--- a/android/res/values-it/strings.xml
+++ b/android/res/values-it/strings.xml
@@ -713,7 +713,6 @@
Accedi con www.openstreetmap.orgModifica il luogoNome del luogo
- Inserisci il nome riportato nel segnale o nella targhettaAltre lingueAggiungi una lingua
@@ -809,7 +808,6 @@
Inserire la società, organizzazione o soggetto responsabile per la struttura.Non vi sono modifiche localiQui è visualizzato il numero di modifiche suggerite sulla mappa che sono attualmente solo accessibili sul tuo dispositivo.
- Nome in altre lingueInvia a OSMRimuoviLe mie mappe
diff --git a/android/res/values-ja/strings.xml b/android/res/values-ja/strings.xml
index 2bfd14505d..0595ab2cb0 100644
--- a/android/res/values-ja/strings.xml
+++ b/android/res/values-ja/strings.xml
@@ -713,7 +713,6 @@
www.openstreetmap.orgでログインしてください場所を編集場所の名前
- 標識や表札の地名を入力その他の言語言語を追加
@@ -809,7 +808,6 @@
施設を管理する企業、組織または個人を入力してください。ローカル編集はできませんこれは、現在お使いのデバイスでのみアクセス可能な、マップ上に提案された変更の数を示しています。
- 他の言語での名前OSMに送信削除マイマップ
diff --git a/android/res/values-ko/strings.xml b/android/res/values-ko/strings.xml
index 11fb8fb2ac..9d9a31ee48 100644
--- a/android/res/values-ko/strings.xml
+++ b/android/res/values-ko/strings.xml
@@ -710,7 +710,6 @@
www.openstreetmap.org에 로그인장소 편집지명
- 기호 또는 이름판으로 이름 입력다른 언어언어 추가
@@ -806,7 +805,6 @@
회사, 조직 또는 시설 책임자를 입력하세요.편집한 지역정보가 없습니다이는 현재 귀하의 장치에서만 액세스할 수 있으며, 지도에서 만든 변경사항를 보여줍니다.
- 다른 언어로된 이름OSM에 전송삭제내 지도
diff --git a/android/res/values-nb/strings.xml b/android/res/values-nb/strings.xml
index f8e729e313..56c9d420a4 100644
--- a/android/res/values-nb/strings.xml
+++ b/android/res/values-nb/strings.xml
@@ -714,7 +714,6 @@
Logg inn med www.openstreetmap.orgRediger stedetStedsnavn
- Oppgi navnet som på skiltet eller navneskiltetAndre språkLegg til et språk
@@ -808,7 +807,6 @@
Angi firma, organisasjon eller enkeltperson som er ansvarlig for anlegget.Du har ikke lokale redigeringerDette viser antallet foreslåtte endringer på kartet som i øyeblikket bare er tilgjengelige på enheten din.
- Navn på andre språkSend til OSMFjernMine kart
diff --git a/android/res/values-nl/strings.xml b/android/res/values-nl/strings.xml
index 5b553948f3..a6969234df 100644
--- a/android/res/values-nl/strings.xml
+++ b/android/res/values-nl/strings.xml
@@ -714,7 +714,6 @@
Aanmelden met www.openstreetmap.orgDe locatie bewerkenLocatienaam
- Voer de naam in zoals die op het bord of naamplaatje wordt weergegevenOverige talenEen taal toevoegen
@@ -810,7 +809,6 @@
Voer het bedrijf, de organisatie of het individu in dat verantwoordelijk is voor de faciliteiten.U hebt geen lokale bewerkingenDit toont het aantal voorgestelde wijzigingen voor de kaart die momenteel alleen toegankelijk zijn op uw apparaat.
- Naam in andere talenNaar OSM sturenVerwijderenMijn kaarten
diff --git a/android/res/values-pl/strings.xml b/android/res/values-pl/strings.xml
index ab7406f9da..b2514b8780 100644
--- a/android/res/values-pl/strings.xml
+++ b/android/res/values-pl/strings.xml
@@ -731,7 +731,6 @@
Zaloguj się przez www.openstreetmap.orgEdytuj miejsceNazwa miejsca
- Wpisz nazwę zgodną z szyldem lub tabliczkąInne językiDodaj język
@@ -827,7 +826,6 @@
Wprowadź nazwę firmy, organizacji lub osoby odpowiedzialnej za obiekty.Nie masz lokalnych edycjiJest to liczba sugerowanych przez ciebie zmian na mapie, które aktualnie dostępne są tylko na twoim urządzeniu.
- Nazwa w innych językachWyślij do OSMUsuńMoje mapy
diff --git a/android/res/values-pt/strings.xml b/android/res/values-pt/strings.xml
index f9d449d0e4..f8115f0838 100644
--- a/android/res/values-pt/strings.xml
+++ b/android/res/values-pt/strings.xml
@@ -713,7 +713,6 @@
Entrar com www.openstreetmap.orgEditar o localNome do local
- Informe o nome como está indicado na sinalização ou na placaOutros idiomasAdicionar um idioma
@@ -809,7 +808,6 @@
Introduza a empresa, organização ou indivíduo responsável pelas instalações.Não tem edições locaisIsto demonstra o número das suas alterações sugeridas no mapa que atualmente só são acessíveis no seu dispositivo.
- Nome noutras línguasEnviar para OSMRemoverOs meus mapas
diff --git a/android/res/values-ro/strings.xml b/android/res/values-ro/strings.xml
index b67a222db3..ee4fb9e4e5 100644
--- a/android/res/values-ro/strings.xml
+++ b/android/res/values-ro/strings.xml
@@ -711,7 +711,6 @@
Logați-vă cu contul de www.openstreetmap.orgEditați locDenumire loc
- Introduceți denumirea așa cum apare ea pe indicator sau plăcuțăAlte limbiAdăugare limbă
@@ -807,7 +806,6 @@
Introduceți compania, organizația sau persoana responsabilă de facilități.Nu aveți modificări localeAcesta arată numărul de modificări sugerate pe hartă care sunt momentan accesibile doar pe dispozitivul dvs.
- Nume în alte limbiTrimitere la OSMEliminareHărțile mele
diff --git a/android/res/values-ru/strings.xml b/android/res/values-ru/strings.xml
index c30523ac90..0a50441607 100644
--- a/android/res/values-ru/strings.xml
+++ b/android/res/values-ru/strings.xml
@@ -744,7 +744,6 @@
Войти через www.openstreetmap.orgРедактировать местоНазвание
- Введите название как на табличке или вывескеДругие языки
@@ -844,7 +843,6 @@
Укажите компанию, организацию или лицо, которое отвечает за работоспособность объекта.У вас пока нет локальных правокЗдесь отображается количество предложенных вами изменений на карте, которые доступны пока только на вашем устройстве.
- Название на других языкахОтправить в OSMУдалитьМои карты
diff --git a/android/res/values-sk/strings.xml b/android/res/values-sk/strings.xml
index ed02347c99..86ac233aca 100644
--- a/android/res/values-sk/strings.xml
+++ b/android/res/values-sk/strings.xml
@@ -717,7 +717,6 @@
Prihlásiť sa cez www.openstreetmap.orgUpraviť miestoNázov miesta
- Zadajte názov ako na značke alebo menovkeIné jazykyPridať jazyk
@@ -813,7 +812,6 @@
Zadajte spoločnosť, organizáciu alebo osobu zodpovednú za prevádzku.Nemáte miestne poznámkyTu sa zobrazuje počet navrhovaných zmien na mape momentálne dostupných len vo vašom zariadení.
- Názov v iných jazykochOdoslať do OSMOdstrániťMoje mapy
diff --git a/android/res/values-sv/strings.xml b/android/res/values-sv/strings.xml
index 0d3564e19e..0f55b9c405 100644
--- a/android/res/values-sv/strings.xml
+++ b/android/res/values-sv/strings.xml
@@ -718,7 +718,6 @@
Logga in med www.openstreetmap.orgÄndra platsenPlatsens namn
- Ange namnet som på skylten eller på namnbrickanÖvriga språkLägg till ett språk
@@ -814,7 +813,6 @@
Ange företag, organisation eller person som är ansvarig för lokalerna.Du har inga lokala redigeraingarDetta visar antalet föreslagna förändringar på kartan som som endast är tillgängliga på din enhet.
- Namn på andra språkSkicka till OSMTa bordMina kartor
diff --git a/android/res/values-th/strings.xml b/android/res/values-th/strings.xml
index 79463af3c3..ec91830551 100644
--- a/android/res/values-th/strings.xml
+++ b/android/res/values-th/strings.xml
@@ -720,7 +720,6 @@
ล็อกอินที่ www.openstreetmap.orgแก้ไขสถานที่ชื่อสถานที่
- กรอกชื่อตามที่แสดงในสัญลักษณ์หรือป้ายแสดงชื่อภาษาอื่น ๆเพิ่มภาษา
@@ -816,7 +815,6 @@
ใส่ชื่อบริษัท, องค์กร หรือ บุคคลที่เป็นผู้รับผิดชอบสถานที่นี้คุณไม่มีการแก้ไขท้องถิ่นหมายเลขที่แสดงอยู่ คือ หมายเลขที่คุณได้ทำการแนะนำการเปลี่ยนแปลงบนแผนที่ที่สามารถเข้าถึงได้โดยอุปกรณ์ของคุณท่านั้น
- ชื่อในภาษาอื่นส่งไปที่ OSMลบออกแผนที่ของฉัน
diff --git a/android/res/values-tr/strings.xml b/android/res/values-tr/strings.xml
index 5e70582fbc..44e2d48e02 100644
--- a/android/res/values-tr/strings.xml
+++ b/android/res/values-tr/strings.xml
@@ -720,7 +720,6 @@
www.openstreetmap.org adresinden oturum açYeri düzenleYer ismi
- İşaret veya tabeladaki gibi ismi girinDiğer DillerBir dil ekle
@@ -816,7 +815,6 @@
Tesislerden sorumlu şirketi, kurumu veya bireyi girin.Yerel düzenlemeniz yokBu, harita üzerinde önerdiğiniz değişikliklerden sadece şu anda cihazınızda erişilebilenlerin sayısını gösterir.
- Diğer dillerdeki adıOSM’ye gönderKaldırHaritalarım
diff --git a/android/res/values-uk/strings.xml b/android/res/values-uk/strings.xml
index dcf591e848..51dc2279fb 100644
--- a/android/res/values-uk/strings.xml
+++ b/android/res/values-uk/strings.xml
@@ -718,7 +718,6 @@
Увійти за допомогою www.openstreetmap.orgРедагувати місцеНазва
- Введіть назву як на вивісці або табличціІнші мовиДодати мову
@@ -814,7 +813,6 @@
Вкажіть компанію, організацію або особу, що відповідає за працездатність об\'єктаПоки що ви не маєте локальних виправленьТут відображається кількість запропонованих вами змін на карті, які доступні тільки на вашому пристрою
- Назва на інших мовахВідправити до OSMВидалитиМої мапи
diff --git a/android/res/values-vi/strings.xml b/android/res/values-vi/strings.xml
index 43d9d7ae79..758bb51f5b 100644
--- a/android/res/values-vi/strings.xml
+++ b/android/res/values-vi/strings.xml
@@ -714,7 +714,6 @@
Đăng nhập với www.openstreetmap.orgChỉnh sửa địa điểmTên địa điểm
- Nhập tên theo như trên chữ ký hoặc biển tênNgôn ngữ khácThêm ngôn ngữ
@@ -810,7 +809,6 @@
Nhập công ty, tổ chức hoặc cá nhân phụ trách cơ sở.Bạn không có những chỗ sửa cục bộ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.
- Tên bằng các ngôn ngữ khácGửi đến OSMXóaBản đồ của tôi
diff --git a/android/res/values-zh-rTW/strings.xml b/android/res/values-zh-rTW/strings.xml
index c6fe783872..587711df8a 100644
--- a/android/res/values-zh-rTW/strings.xml
+++ b/android/res/values-zh-rTW/strings.xml
@@ -730,7 +730,6 @@
登入到 www.openstreetmap.org編輯地點地點名稱
- 輸入標識或名牌上的名稱其他語言
@@ -830,7 +829,6 @@
輸入公司、組織或設施負責人。您沒有本機編輯這顯示了對目前僅可在您的裝置上存取的地圖的建議修改數量。
- 其他語言的名稱傳送至 OSM移除我的地圖
diff --git a/android/res/values-zh/strings.xml b/android/res/values-zh/strings.xml
index 07dbca6a68..d800c5c369 100644
--- a/android/res/values-zh/strings.xml
+++ b/android/res/values-zh/strings.xml
@@ -720,7 +720,6 @@
登录到www.openstreetmap.org编辑地点地点名
- 输入标识或名牌上的名称其他语言添加语言
@@ -816,7 +815,6 @@
输入公司、组织或设施负责人。您没有本地编辑这显示了当前仅在您设备上能够访问的对地图建议修改的数量。
- 其他语言的名称发送至 OSM删除我的地图
diff --git a/android/res/values/strings.xml b/android/res/values/strings.xml
index 5f923a3287..e4e69237b4 100644
--- a/android/res/values/strings.xml
+++ b/android/res/values/strings.xml
@@ -750,7 +750,6 @@
Log in with www.openstreetmap.orgEdit PlacePlace Name
- Enter the name as on the sign or nameplateOther Languages
@@ -850,7 +849,6 @@
Enter company, organization or individual responsible for the facilities.You don\'t have local editsThis shows the number of your suggested changes on the map that are currently accessible only on your device.
- Name in other languagesSend to OSMRemoveMy maps
diff --git a/android/src/com/mapswithme/maps/editor/Editor.java b/android/src/com/mapswithme/maps/editor/Editor.java
index 3bd5321189..ac879ad9e3 100644
--- a/android/src/com/mapswithme/maps/editor/Editor.java
+++ b/android/src/com/mapswithme/maps/editor/Editor.java
@@ -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();
diff --git a/android/src/com/mapswithme/maps/editor/EditorFragment.java b/android/src/com/mapswithme/maps/editor/EditorFragment.java
index 8335e8f5c5..3c8ea0e36b 100644
--- a/android/src/com/mapswithme/maps/editor/EditorFragment.java
+++ b/android/src/com/mapswithme/maps/editor/EditorFragment.java
@@ -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()
diff --git a/android/src/com/mapswithme/maps/editor/EditorHostFragment.java b/android/src/com/mapswithme/maps/editor/EditorHostFragment.java
index 116d900d61..fec816accc 100644
--- a/android/src/com/mapswithme/maps/editor/EditorHostFragment.java
+++ b/android/src/com/mapswithme/maps/editor/EditorHostFragment.java
@@ -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 sLocalizedNames = new ArrayList<>();
+ private static final List 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 getLocalizedNames()
+ List 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 languages = new ArrayList<>(sLocalizedNames.size());
- for (LocalizedName name : sLocalizedNames)
+ ArrayList 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 */);
}
}
diff --git a/android/src/com/mapswithme/maps/editor/MultilanguageAdapter.java b/android/src/com/mapswithme/maps/editor/MultilanguageAdapter.java
index 4fc1eca797..3b8e9ce611 100644
--- a/android/src/com/mapswithme/maps/editor/MultilanguageAdapter.java
+++ b/android/src/com/mapswithme/maps/editor/MultilanguageAdapter.java
@@ -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
{
private final List 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 & 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 const & mwmLanguages,
+ vector & 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 const & EditableMapObject::GetEditableFields()
StringUtf8Multilang const & EditableMapObject::GetName() const { return m_name; }
-vector EditableMapObject::GetLocalizedNames() const
+NamesDataSource EditableMapObject::GetNamesDataSource() const
{
- vector 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 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 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 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 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; }
diff --git a/indexer/editable_map_object.hpp b/indexer/editable_map_object.hpp
index 365b23d20b..d033bc3d04 100644
--- a/indexer/editable_map_object.hpp
+++ b/indexer/editable_map_object.hpp
@@ -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 names;
+ size_t mandatoryNamesCount = 0;
+};
+
struct LocalizedStreet
{
string m_defaultName;
@@ -67,7 +78,8 @@ public:
vector const & GetEditableFields() const;
StringUtf8Multilang const & GetName() const;
- vector GetLocalizedNames() const;
+ // See comment for NamesDataSource class.
+ NamesDataSource GetNamesDataSource() const;
LocalizedStreet const & GetStreet() const;
vector 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 const & nativeMwmLanguages);
+
+ // See comment for NamesDataSource class.
+ static NamesDataSource GetNamesDataSource(StringUtf8Multilang const & source,
+ vector const & nativeMwmLanguages,
+ int8_t const userLanguage);
+
private:
string m_houseNumber;
LocalizedStreet m_street;
diff --git a/indexer/indexer_tests/editable_map_object_test.cpp b/indexer/indexer_tests/editable_map_object_test.cpp
index 059db03572..cfad66817d 100644
--- a/indexer/indexer_tests/editable_map_object_test.cpp
+++ b/indexer/indexer_tests/editable_map_object_test.cpp
@@ -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 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 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 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 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
diff --git a/indexer/osm_editor.cpp b/indexer/osm_editor.cpp
index 76e55a5197..1b428c35f0 100644
--- a/indexer/osm_editor.cpp
+++ b/indexer/osm_editor.cpp
@@ -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
diff --git a/indexer/osm_editor.hpp b/indexer/osm_editor.hpp
index a17da2477f..0ccfe8f264 100644
--- a/indexer/osm_editor.hpp
+++ b/indexer/osm_editor.hpp
@@ -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.
diff --git a/iphone/Maps/Classes/Editor/MWMEditorAdditionalNamesHeader.mm b/iphone/Maps/Classes/Editor/MWMEditorAdditionalNamesHeader.mm
index fbf0b4718b..0612758636 100644
--- a/iphone/Maps/Classes/Editor/MWMEditorAdditionalNamesHeader.mm
+++ b/iphone/Maps/Classes/Editor/MWMEditorAdditionalNamesHeader.mm
@@ -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;
}
diff --git a/iphone/Maps/Classes/Editor/MWMEditorNameFooter.h b/iphone/Maps/Classes/Editor/MWMEditorNameFooter.h
deleted file mode 100644
index 25f7d4043a..0000000000
--- a/iphone/Maps/Classes/Editor/MWMEditorNameFooter.h
+++ /dev/null
@@ -1,5 +0,0 @@
-@interface MWMEditorNameFooter : UIView
-
-+ (instancetype)footer;
-
-@end
diff --git a/iphone/Maps/Classes/Editor/MWMEditorNameFooter.mm b/iphone/Maps/Classes/Editor/MWMEditorNameFooter.mm
deleted file mode 100644
index 719fdf0478..0000000000
--- a/iphone/Maps/Classes/Editor/MWMEditorNameFooter.mm
+++ /dev/null
@@ -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
diff --git a/iphone/Maps/Classes/Editor/MWMEditorNameFooter.xib b/iphone/Maps/Classes/Editor/MWMEditorNameFooter.xib
deleted file mode 100644
index 7b39464c16..0000000000
--- a/iphone/Maps/Classes/Editor/MWMEditorNameFooter.xib
+++ /dev/null
@@ -1,51 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/iphone/Maps/Classes/Editor/MWMEditorNameTableViewCell.xib b/iphone/Maps/Classes/Editor/MWMEditorNameTableViewCell.xib
deleted file mode 100644
index e6689106d3..0000000000
--- a/iphone/Maps/Classes/Editor/MWMEditorNameTableViewCell.xib
+++ /dev/null
@@ -1,69 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/iphone/Maps/Classes/Editor/MWMEditorViewController.mm b/iphone/Maps/Classes/Editor/MWMEditorViewController.mm
index 31d1024d32..5271ce3a93 100644
--- a/iphone/Maps/Classes/Editor/MWMEditorViewController.mm
+++ b/iphone/Maps/Classes/Editor/MWMEditorViewController.mm
@@ -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 const kSectionCategoryCellTypes{MWMPlacePageCellTypeCategory};
-vector const kSectionNameCellTypes{MWMPlacePageCellTypeName};
vector const kSectionAddressCellTypes{
MWMPlacePageCellTypeStreet, MWMPlacePageCellTypeBuilding, MWMPlacePageCellTypeZipCode};
@@ -60,7 +57,6 @@ vector 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 getAdditionalLocalizedNames(osm::EditableMapObject const & emo)
-{
- vector 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 const & names,
vector & newAdditionalLanguages)
{
@@ -113,11 +98,11 @@ void cleanupAdditionalLanguages(vector const & names,
}
vector cellsForAdditionalNames(
- vector const & names, vector const & newAdditionalLanguages,
+ osm::NamesDataSource const & ds, vector const & newAdditionalLanguages,
BOOL showAdditionalNames)
{
vector 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 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 const & cells, UITab
@property(nonatomic) NSMutableArray * 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 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 const & cells, UITab
if (isNameEditable)
{
- m_sections.push_back(MWMEditorSectionName);
- m_cells[MWMEditorSectionName] = kSectionNameCellTypes;
- registerCellsForTableView(kSectionNameCellTypes, self.tableView);
-
- vector 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 const & cells, UITab
on:m_mapObject.GetInternet() == osm::Internet::Wlan];
break;
}
- case MWMPlacePageCellTypeName:
- {
- MWMEditorTextTableViewCell * tCell = static_cast(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(cell);
- vector const localizedNames = getAdditionalLocalizedNames(m_mapObject);
+ auto const & localizedNames = m_mapObject.GetNamesDataSource().names;
if (indexPath.row < localizedNames.size())
{
@@ -765,7 +729,6 @@ void registerCellsForTableView(vector const & cells, UITab
{
switch (m_sections[section])
{
- case MWMEditorSectionName:
case MWMEditorSectionAdditionalNames:
case MWMEditorSectionCategory:
case MWMEditorSectionButton: return nil;
@@ -780,7 +743,6 @@ void registerCellsForTableView(vector 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 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 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 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))
diff --git a/iphone/Maps/Maps.xcodeproj/project.pbxproj b/iphone/Maps/Maps.xcodeproj/project.pbxproj
index ebf94628ce..56b98ef64d 100644
--- a/iphone/Maps/Maps.xcodeproj/project.pbxproj
+++ b/iphone/Maps/Maps.xcodeproj/project.pbxproj
@@ -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 = ""; };
3401CD651C3C03A80028C6F8 /* MWMEditorTextTableViewCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMEditorTextTableViewCell.mm; sourceTree = ""; };
3401CD661C3C03A80028C6F8 /* MWMEditorTextTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMEditorTextTableViewCell.xib; sourceTree = ""; };
- 3401CD701C3C0C420028C6F8 /* MWMEditorNameTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMEditorNameTableViewCell.xib; sourceTree = ""; };
3401CD731C3CED1E0028C6F8 /* MWMEditorSelectTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMEditorSelectTableViewCell.h; sourceTree = ""; };
3401CD741C3CED1E0028C6F8 /* MWMEditorSelectTableViewCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMEditorSelectTableViewCell.mm; sourceTree = ""; };
3401CD751C3CED1E0028C6F8 /* MWMEditorSelectTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMEditorSelectTableViewCell.xib; sourceTree = ""; };
@@ -1113,9 +1106,6 @@
34B646BB1CEB6FC000E0C7A5 /* MWMEditorAdditionalNameTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMEditorAdditionalNameTableViewCell.h; sourceTree = ""; };
34B646BC1CEB6FC000E0C7A5 /* MWMEditorAdditionalNameTableViewCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMEditorAdditionalNameTableViewCell.mm; sourceTree = ""; };
34B646BF1CEB6FE000E0C7A5 /* MWMEditorAdditionalNameTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMEditorAdditionalNameTableViewCell.xib; sourceTree = ""; };
- 34B646C21CEB740900E0C7A5 /* MWMEditorNameFooter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMEditorNameFooter.h; sourceTree = ""; };
- 34B646C31CEB740900E0C7A5 /* MWMEditorNameFooter.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMEditorNameFooter.mm; sourceTree = ""; };
- 34B646C61CEB742500E0C7A5 /* MWMEditorNameFooter.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMEditorNameFooter.xib; sourceTree = ""; };
34B6CF5C1BBBFC6B009203C6 /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = ""; };
34B82AB01B8344E300180497 /* MWMSearchTextField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMSearchTextField.h; sourceTree = ""; };
34B82AB11B8344E300180497 /* MWMSearchTextField.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMSearchTextField.mm; sourceTree = ""; };
@@ -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 */,
diff --git a/iphone/Maps/ar.lproj/Localizable.strings b/iphone/Maps/ar.lproj/Localizable.strings
index 05987bfacf..5c34d37012 100644
--- a/iphone/Maps/ar.lproj/Localizable.strings
+++ b/iphone/Maps/ar.lproj/Localizable.strings
@@ -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" = "إزالة";
diff --git a/iphone/Maps/cs.lproj/Localizable.strings b/iphone/Maps/cs.lproj/Localizable.strings
index adfcc354ec..4e30b37670 100644
--- a/iphone/Maps/cs.lproj/Localizable.strings
+++ b/iphone/Maps/cs.lproj/Localizable.strings
@@ -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";
diff --git a/iphone/Maps/da.lproj/Localizable.strings b/iphone/Maps/da.lproj/Localizable.strings
index 0ed344e3cd..ecce898d0a 100644
--- a/iphone/Maps/da.lproj/Localizable.strings
+++ b/iphone/Maps/da.lproj/Localizable.strings
@@ -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";
diff --git a/iphone/Maps/de.lproj/Localizable.strings b/iphone/Maps/de.lproj/Localizable.strings
index cbf6785bf4..2fa8ada71e 100644
--- a/iphone/Maps/de.lproj/Localizable.strings
+++ b/iphone/Maps/de.lproj/Localizable.strings
@@ -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";
diff --git a/iphone/Maps/en.lproj/Localizable.strings b/iphone/Maps/en.lproj/Localizable.strings
index ceac7c26ab..2dbfe13183 100644
--- a/iphone/Maps/en.lproj/Localizable.strings
+++ b/iphone/Maps/en.lproj/Localizable.strings
@@ -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";
diff --git a/iphone/Maps/es.lproj/Localizable.strings b/iphone/Maps/es.lproj/Localizable.strings
index 233eec9897..a472d3ce56 100644
--- a/iphone/Maps/es.lproj/Localizable.strings
+++ b/iphone/Maps/es.lproj/Localizable.strings
@@ -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";
diff --git a/iphone/Maps/fi.lproj/Localizable.strings b/iphone/Maps/fi.lproj/Localizable.strings
index 8ed4c5cb4c..5d4b4c2b98 100644
--- a/iphone/Maps/fi.lproj/Localizable.strings
+++ b/iphone/Maps/fi.lproj/Localizable.strings
@@ -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";
diff --git a/iphone/Maps/fr.lproj/Localizable.strings b/iphone/Maps/fr.lproj/Localizable.strings
index 667fc272c3..12f495b862 100644
--- a/iphone/Maps/fr.lproj/Localizable.strings
+++ b/iphone/Maps/fr.lproj/Localizable.strings
@@ -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";
diff --git a/iphone/Maps/hu.lproj/Localizable.strings b/iphone/Maps/hu.lproj/Localizable.strings
index 78d7a98211..65df74d625 100644
--- a/iphone/Maps/hu.lproj/Localizable.strings
+++ b/iphone/Maps/hu.lproj/Localizable.strings
@@ -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";
diff --git a/iphone/Maps/id.lproj/Localizable.strings b/iphone/Maps/id.lproj/Localizable.strings
index cf7da885e1..34ea2b4681 100644
--- a/iphone/Maps/id.lproj/Localizable.strings
+++ b/iphone/Maps/id.lproj/Localizable.strings
@@ -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";
diff --git a/iphone/Maps/it.lproj/Localizable.strings b/iphone/Maps/it.lproj/Localizable.strings
index 689c30b1c0..42cded8d26 100644
--- a/iphone/Maps/it.lproj/Localizable.strings
+++ b/iphone/Maps/it.lproj/Localizable.strings
@@ -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";
diff --git a/iphone/Maps/ja.lproj/Localizable.strings b/iphone/Maps/ja.lproj/Localizable.strings
index ed132ab509..425813b273 100644
--- a/iphone/Maps/ja.lproj/Localizable.strings
+++ b/iphone/Maps/ja.lproj/Localizable.strings
@@ -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" = "削除";
diff --git a/iphone/Maps/ko.lproj/Localizable.strings b/iphone/Maps/ko.lproj/Localizable.strings
index 5badb0ddc7..764fd13505 100644
--- a/iphone/Maps/ko.lproj/Localizable.strings
+++ b/iphone/Maps/ko.lproj/Localizable.strings
@@ -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" = "삭제";
diff --git a/iphone/Maps/nb.lproj/Localizable.strings b/iphone/Maps/nb.lproj/Localizable.strings
index 8285b4ec0a..832ad87a4b 100644
--- a/iphone/Maps/nb.lproj/Localizable.strings
+++ b/iphone/Maps/nb.lproj/Localizable.strings
@@ -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";
diff --git a/iphone/Maps/nl.lproj/Localizable.strings b/iphone/Maps/nl.lproj/Localizable.strings
index f2f565261c..676d020a32 100644
--- a/iphone/Maps/nl.lproj/Localizable.strings
+++ b/iphone/Maps/nl.lproj/Localizable.strings
@@ -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";
diff --git a/iphone/Maps/pl.lproj/Localizable.strings b/iphone/Maps/pl.lproj/Localizable.strings
index b409070bd6..f522f310db 100644
--- a/iphone/Maps/pl.lproj/Localizable.strings
+++ b/iphone/Maps/pl.lproj/Localizable.strings
@@ -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ń";
diff --git a/iphone/Maps/pt.lproj/Localizable.strings b/iphone/Maps/pt.lproj/Localizable.strings
index 1cf7961d3f..e3c5d9e5fb 100644
--- a/iphone/Maps/pt.lproj/Localizable.strings
+++ b/iphone/Maps/pt.lproj/Localizable.strings
@@ -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";
diff --git a/iphone/Maps/ro.lproj/Localizable.strings b/iphone/Maps/ro.lproj/Localizable.strings
index 0c8411c706..6a15d69688 100644
--- a/iphone/Maps/ro.lproj/Localizable.strings
+++ b/iphone/Maps/ro.lproj/Localizable.strings
@@ -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";
diff --git a/iphone/Maps/ru.lproj/Localizable.strings b/iphone/Maps/ru.lproj/Localizable.strings
index 5262e95667..c5d8b7c2ff 100644
--- a/iphone/Maps/ru.lproj/Localizable.strings
+++ b/iphone/Maps/ru.lproj/Localizable.strings
@@ -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" = "Удалить";
diff --git a/iphone/Maps/sk.lproj/Localizable.strings b/iphone/Maps/sk.lproj/Localizable.strings
index 7fe9108a54..e6a06b05a8 100644
--- a/iphone/Maps/sk.lproj/Localizable.strings
+++ b/iphone/Maps/sk.lproj/Localizable.strings
@@ -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ť";
diff --git a/iphone/Maps/sv.lproj/Localizable.strings b/iphone/Maps/sv.lproj/Localizable.strings
index 9256baa5c1..c3d1d7d180 100644
--- a/iphone/Maps/sv.lproj/Localizable.strings
+++ b/iphone/Maps/sv.lproj/Localizable.strings
@@ -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";
diff --git a/iphone/Maps/th.lproj/Localizable.strings b/iphone/Maps/th.lproj/Localizable.strings
index 9772c0e167..d460767063 100644
--- a/iphone/Maps/th.lproj/Localizable.strings
+++ b/iphone/Maps/th.lproj/Localizable.strings
@@ -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" = "ลบออก";
diff --git a/iphone/Maps/tr.lproj/Localizable.strings b/iphone/Maps/tr.lproj/Localizable.strings
index 41ebd3fc92..e217d29a2b 100644
--- a/iphone/Maps/tr.lproj/Localizable.strings
+++ b/iphone/Maps/tr.lproj/Localizable.strings
@@ -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" = "OSM’ye gönder";
"editor_remove" = "Kaldır";
diff --git a/iphone/Maps/uk.lproj/Localizable.strings b/iphone/Maps/uk.lproj/Localizable.strings
index 4fe386e970..22f64ff12c 100644
--- a/iphone/Maps/uk.lproj/Localizable.strings
+++ b/iphone/Maps/uk.lproj/Localizable.strings
@@ -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" = "Видалити";
diff --git a/iphone/Maps/vi.lproj/Localizable.strings b/iphone/Maps/vi.lproj/Localizable.strings
index 537b45bbb8..d67744126d 100644
--- a/iphone/Maps/vi.lproj/Localizable.strings
+++ b/iphone/Maps/vi.lproj/Localizable.strings
@@ -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";
diff --git a/iphone/Maps/zh-Hans.lproj/Localizable.strings b/iphone/Maps/zh-Hans.lproj/Localizable.strings
index 35f9de851f..3bc189c818 100644
--- a/iphone/Maps/zh-Hans.lproj/Localizable.strings
+++ b/iphone/Maps/zh-Hans.lproj/Localizable.strings
@@ -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" = "删除";
diff --git a/iphone/Maps/zh-Hant.lproj/Localizable.strings b/iphone/Maps/zh-Hant.lproj/Localizable.strings
index ab50581f21..106182cd7d 100644
--- a/iphone/Maps/zh-Hant.lproj/Localizable.strings
+++ b/iphone/Maps/zh-Hant.lproj/Localizable.strings
@@ -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" = "移除";
diff --git a/map/framework.cpp b/map/framework.cpp
index 5ec8d764b0..b5f9ed046b 100644
--- a/map/framework.cpp
+++ b/map/framework.cpp
@@ -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);
+}
diff --git a/map/framework.hpp b/map/framework.hpp
index 33888c5837..5f3940c480 100644
--- a/map/framework.hpp
+++ b/map/framework.hpp
@@ -715,5 +715,9 @@ private:
editor::UserStatsLoader m_userStatsLoader;
//@}
+public:
+ bool OriginalFeatureHasDefaultName(FeatureID const & fid) const;
+
+private:
DECLARE_THREAD_CHECKER(m_threadChecker);
};
diff --git a/qt/editor_dialog.cpp b/qt/editor_dialog.cpp
index f9e39a5eea..bc29764e54 100644
--- a/qt/editor_dialog.cpp
+++ b/qt/editor_dialog.cpp
@@ -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)
{
diff --git a/strings.txt b/strings.txt
index 5048f44e7b..c1d509e2ba 100644
--- a/strings.txt
+++ b/strings.txt
@@ -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