forked from organicmaps/organicmaps
EN as additional search language in the editor
Signed-off-by: map-per <map-per@gmx.de>
This commit is contained in:
parent
6a2e58168d
commit
20aa24a74b
2 changed files with 9 additions and 5 deletions
|
@ -406,8 +406,10 @@ Java_app_organicmaps_editor_Editor_nativeGetAllCreatableFeatureTypes(JNIEnv * en
|
|||
jstring jLang)
|
||||
{
|
||||
std::string const & lang = jni::ToNativeString(env, jLang);
|
||||
GetFeatureCategories().AddLanguage(lang);
|
||||
return jni::ToJavaStringArray(env, GetFeatureCategories().GetAllCreatableTypeNames());
|
||||
auto & categories = GetFeatureCategories();
|
||||
categories.AddLanguage(lang);
|
||||
categories.AddLanguage("en");
|
||||
return jni::ToJavaStringArray(env, categories.GetAllCreatableTypeNames());
|
||||
}
|
||||
|
||||
JNIEXPORT jobjectArray JNICALL
|
||||
|
@ -416,9 +418,10 @@ Java_app_organicmaps_editor_Editor_nativeSearchCreatableFeatureTypes(JNIEnv * en
|
|||
jstring jLang)
|
||||
{
|
||||
std::string const & lang = jni::ToNativeString(env, jLang);
|
||||
GetFeatureCategories().AddLanguage(lang);
|
||||
return jni::ToJavaStringArray(env,
|
||||
GetFeatureCategories().Search(jni::ToNativeString(env, query)));
|
||||
auto & categories = GetFeatureCategories();
|
||||
categories.AddLanguage(lang);
|
||||
categories.AddLanguage("en");
|
||||
return jni::ToJavaStringArray(env, categories.Search(jni::ToNativeString(env, query)));
|
||||
}
|
||||
|
||||
JNIEXPORT jobjectArray JNICALL
|
||||
|
|
|
@ -50,6 +50,7 @@ std::string locale()
|
|||
{
|
||||
m_categories = GetFramework().GetEditorCategories();
|
||||
m_categories.AddLanguage(locale());
|
||||
m_categories.AddLanguage("en");
|
||||
|
||||
auto const & types = m_categories.GetAllCreatableTypeNames();
|
||||
m_categoriesList.reserve(types.size());
|
||||
|
|
Loading…
Add table
Reference in a new issue