forked from organicmaps/organicmaps
Review fixes.
This commit is contained in:
parent
965d71afc3
commit
0f1fb3c9f8
14 changed files with 657 additions and 595 deletions
File diff suppressed because it is too large
Load diff
|
@ -71,8 +71,8 @@ set(
|
|||
succinct_mapper.hpp
|
||||
traffic.cpp
|
||||
traffic.hpp
|
||||
transliterator.cpp
|
||||
transliterator.hpp
|
||||
transliteration.cpp
|
||||
transliteration.hpp
|
||||
uri.cpp
|
||||
uri.hpp
|
||||
url_encode.hpp
|
||||
|
|
|
@ -10,37 +10,71 @@ namespace
|
|||
// Note, that it's not feasible to increase languages number here due to
|
||||
// our current encoding (6 bit to store language code).
|
||||
StringUtf8Multilang::Languages const g_languages = {{
|
||||
{"default", "Native for each country", "Any-Latin"},
|
||||
{"en", "English", ""}, {"ja", "日本語", ""}, {"fr", "Français", ""},
|
||||
{"ko_rm", "Korean (Romanized)", "Korean-Latin/BGN"}, {"ar", "العربية", "Any-Latin"},
|
||||
{"de", "Deutsch", ""}, {"int_name", "International (Latin)", "Any-Latin"},
|
||||
{"ru", "Русский", "Russian-Latin/BGN"}, {"sv", "Svenska", "Any-Latin"},
|
||||
{"zh", "中文", "Any-Latin"}, {"fi", "Suomi", "Any-Latin"},
|
||||
{"be", "Беларуская", "Belarusian-Latin/BGN"}, {"ka", "ქართული", "Georgian-Latin"},
|
||||
{"ko", "한국어", "Hangul-Latin/BGN"}, {"he", "עברית", "Hebrew-Latin/BGN"}, {"nl", "Nederlands", ""},
|
||||
{"ga", "Gaeilge", "Any-Latin"}, {"ja_rm", "Japanese (Romanized)", "Any-Latin"},
|
||||
{"el", "Ελληνικά", "Greek-Latin"}, {"it", "Italiano", ""}, {"es", "Español", ""},
|
||||
{"zh_pinyin", "Chinese (Pinyin)", "Any-Latin"}, {"th", "ไทย", "Thai-Latin"},
|
||||
{"cy", "Cymraeg", "Any-Latin"}, {"sr", "Српски", "Serbian-Latin/BGN"},
|
||||
{"uk", "Українська", "Ukrainian-Latin/BGN"}, {"ca", "Català", "Any-Latin"},
|
||||
{"hu", "Magyar", "Any-Latin"}, {"hsb", "Hornjoserbšćina", "Any-Latin"},
|
||||
{"eu", "Euskara", "Any-Latin"}, {"fa", "فارسی", "Any-Latin"}, {"br", "Breton", "Any-Latin"},
|
||||
{"pl", "Polski", "Any-Latin"}, {"hy", "Հայերէն", "Armenian-Latin"},
|
||||
{"kn", "ಕನ್ನಡ", "Kannada-Latin"}, {"sl", "Slovenščina", "Any-Latin"},
|
||||
{"ro", "Română", "Any-Latin"}, {"sq", "Shqipe", "Any-Latin"},
|
||||
{"am", "አማርኛ", "Amharic-Latin/BGN"}, {"fy", "Frysk", "Any-Latin"},
|
||||
{"cs", "Čeština", "Any-Latin"}, {"gd", "Gàidhlig", "Any-Latin"},
|
||||
{"sk", "Slovenčina", "Any-Latin"}, {"af", "Afrikaans", "Any-Latin"},
|
||||
{"ja_kana", "日本語(カタカナ)", "Katakana-Latin"}, {"lb", "Luxembourgish", "Any-Latin"},
|
||||
{"pt", "Português", "Any-Latin"}, {"hr", "Hrvatski", "Any-Latin"},
|
||||
{"fur", "Friulian", "Any-Latin"}, {"vi", "Tiếng Việt", "Any-Latin"},
|
||||
{"tr", "Türkçe", "Any-Latin"}, {"bg", "Български", "Bulgarian-Latin/BGN"},
|
||||
{"eo", "Esperanto", "Any-Latin"}, {"lt", "Lietuvių", "Any-Latin"}, {"la", "Latin", ""},
|
||||
{"kk", "Қазақ", "Kazakh-Latin/BGN"}, {"gsw", "Schwiizertüütsch", "Any-Latin"},
|
||||
{"et", "Eesti", "Any-Latin"}, {"ku", "Kurdish", "Any-Latin"},
|
||||
{"mn", "Mongolian", "Mongolian-Latin/BGN"}, {"mk", "Македонски", "Macedonian-Latin/BGN"},
|
||||
{"lv", "Latviešu", "Any-Latin"}, {"hi", "हिन्दी", "Any-Latin"}
|
||||
}};
|
||||
{"default", "Native for each country", "Any-Latin"},
|
||||
{"en", "English", ""},
|
||||
{"ja", "日本語", ""},
|
||||
{"fr", "Français", ""},
|
||||
{"ko_rm", "Korean (Romanized)", "Korean-Latin/BGN"},
|
||||
{"ar", "العربية", "Any-Latin"},
|
||||
{"de", "Deutsch", ""},
|
||||
{"int_name", "International (Latin)", "Any-Latin"},
|
||||
{"ru", "Русский", "Russian-Latin/BGN"},
|
||||
{"sv", "Svenska", "Any-Latin"},
|
||||
{"zh", "中文", "Any-Latin"},
|
||||
{"fi", "Suomi", "Any-Latin"},
|
||||
{"be", "Беларуская", "Belarusian-Latin/BGN"},
|
||||
{"ka", "ქართული", "Georgian-Latin"},
|
||||
{"ko", "한국어", "Hangul-Latin/BGN"},
|
||||
{"he", "עברית", "Hebrew-Latin/BGN"},
|
||||
{"nl", "Nederlands", ""},
|
||||
{"ga", "Gaeilge", "Any-Latin"},
|
||||
{"ja_rm", "Japanese (Romanized)", "Any-Latin"},
|
||||
{"el", "Ελληνικά", "Greek-Latin"},
|
||||
{"it", "Italiano", ""},
|
||||
{"es", "Español", ""},
|
||||
{"zh_pinyin", "Chinese (Pinyin)", "Any-Latin"},
|
||||
{"th", "ไทย", "Thai-Latin"},
|
||||
{"cy", "Cymraeg", "Any-Latin"},
|
||||
{"sr", "Српски", "Serbian-Latin/BGN"},
|
||||
{"uk", "Українська", "Ukrainian-Latin/BGN"},
|
||||
{"ca", "Català", "Any-Latin"},
|
||||
{"hu", "Magyar", "Any-Latin"},
|
||||
{"hsb", "Hornjoserbšćina", "Any-Latin"},
|
||||
{"eu", "Euskara", "Any-Latin"},
|
||||
{"fa", "فارسی", "Any-Latin"},
|
||||
{"br", "Breton", "Any-Latin"},
|
||||
{"pl", "Polski", "Any-Latin"},
|
||||
{"hy", "Հայերէն", "Armenian-Latin"},
|
||||
{"kn", "ಕನ್ನಡ", "Kannada-Latin"},
|
||||
{"sl", "Slovenščina", "Any-Latin"},
|
||||
{"ro", "Română", "Any-Latin"},
|
||||
{"sq", "Shqipe", "Any-Latin"},
|
||||
{"am", "አማርኛ", "Amharic-Latin/BGN"},
|
||||
{"fy", "Frysk", "Any-Latin"},
|
||||
{"cs", "Čeština", "Any-Latin"},
|
||||
{"gd", "Gàidhlig", "Any-Latin"},
|
||||
{"sk", "Slovenčina", "Any-Latin"},
|
||||
{"af", "Afrikaans", "Any-Latin"},
|
||||
{"ja_kana", "日本語(カタカナ)", "Katakana-Latin"},
|
||||
{"lb", "Luxembourgish", "Any-Latin"},
|
||||
{"pt", "Português", "Any-Latin"},
|
||||
{"hr", "Hrvatski", "Any-Latin"},
|
||||
{"fur", "Friulian", "Any-Latin"},
|
||||
{"vi", "Tiếng Việt", "Any-Latin"},
|
||||
{"tr", "Türkçe", "Any-Latin"},
|
||||
{"bg", "Български", "Bulgarian-Latin/BGN"},
|
||||
{"eo", "Esperanto", "Any-Latin"},
|
||||
{"lt", "Lietuvių", "Any-Latin"},
|
||||
{"la", "Latin", ""},
|
||||
{"kk", "Қазақ", "Kazakh-Latin/BGN"},
|
||||
{"gsw", "Schwiizertüütsch", "Any-Latin"},
|
||||
{"et", "Eesti", "Any-Latin"},
|
||||
{"ku", "Kurdish", "Any-Latin"},
|
||||
{"mn", "Mongolian", "Mongolian-Latin/BGN"},
|
||||
{"mk", "Македонски", "Macedonian-Latin/BGN"},
|
||||
{"lv", "Latviešu", "Any-Latin"},
|
||||
{"hi", "हिन्दी", "Any-Latin"}
|
||||
}};
|
||||
|
||||
static_assert(g_languages.size() == StringUtf8Multilang::kMaxSupportedLanguages,
|
||||
"With current encoding we are limited to 64 languages max.");
|
||||
|
|
|
@ -15,11 +15,12 @@ Transliteration::~Transliteration()
|
|||
// but it should be called only once for performance reasons.
|
||||
// The primary benefit is to eliminate reports of memory or resource leaks originating
|
||||
// in ICU code from the results generated by heap analysis tools.
|
||||
// http://www.icu-project.org/apiref/icu4c/uclean_8h.html#a93f27d0ddc7c196a1da864763f2d8920
|
||||
m_transliterators.clear();
|
||||
u_cleanup();
|
||||
}
|
||||
|
||||
Transliteration & Transliteration::GetInstance()
|
||||
Transliteration & Transliteration::Instance()
|
||||
{
|
||||
static Transliteration instance;
|
||||
return instance;
|
||||
|
@ -45,21 +46,25 @@ void Transliteration::Init(std::string const & icuDataDir)
|
|||
}
|
||||
}
|
||||
|
||||
std::string Transliteration::Transliterate(std::string const & str, int8_t langCode) const
|
||||
bool Transliteration::Transliterate(std::string const & str, int8_t langCode, std::string & out) const
|
||||
{
|
||||
if (str.empty())
|
||||
return false;
|
||||
|
||||
auto const transliteratorId = StringUtf8Multilang::GetTransliteratorIdByCode(langCode);
|
||||
auto const & it = m_transliterators.find(transliteratorId);
|
||||
if (it == m_transliterators.end())
|
||||
{
|
||||
LOG(LWARNING, ("Transliteration failed, unknown transliterator \"", transliteratorId, "\""));
|
||||
return "";
|
||||
return false;
|
||||
}
|
||||
|
||||
UnicodeString ustr(str.c_str());
|
||||
it->second->transliterate(ustr);
|
||||
|
||||
std::string resultStr;
|
||||
ustr.toUTF8String(resultStr);
|
||||
if (ustr.isEmpty())
|
||||
return false;
|
||||
|
||||
return resultStr;
|
||||
ustr.toUTF8String(out);
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -14,11 +14,11 @@ class Transliteration
|
|||
public:
|
||||
~Transliteration();
|
||||
|
||||
static Transliteration & GetInstance();
|
||||
static Transliteration & Instance();
|
||||
|
||||
void Init(std::string const & icuDataDir);
|
||||
|
||||
std::string Transliterate(std::string const & str, int8_t langCode) const;
|
||||
bool Transliterate(std::string const & str, int8_t langCode, std::string & out) const;
|
||||
|
||||
private:
|
||||
Transliteration() = default;
|
||||
|
|
|
@ -7,8 +7,8 @@ CONFIG -= app_bundle
|
|||
TEMPLATE = app
|
||||
|
||||
ROOT_DIR = ../..
|
||||
DEPENDENCIES = generator map routing routing_common search storage icu indexer platform editor geometry coding base \
|
||||
osrm jansson protobuf succinct stats_client pugixml minizip gflags stats_client
|
||||
DEPENDENCIES = generator map routing routing_common search storage indexer platform editor geometry coding base \
|
||||
osrm jansson protobuf succinct stats_client pugixml minizip gflags stats_client icu
|
||||
|
||||
include($$ROOT_DIR/common.pri)
|
||||
|
||||
|
|
|
@ -37,22 +37,18 @@ bool GetTransliteratedName(feature::RegionData const & regionData, StringUtf8Mul
|
|||
|
||||
string srcName;
|
||||
for (auto const code : mwmLangCodes)
|
||||
{
|
||||
if (src.GetString(code, srcName))
|
||||
{
|
||||
out = Transliteration::GetInstance().Transliterate(srcName, code);
|
||||
if (!out.empty())
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (src.GetString(code, srcName) && Transliteration::Instance().Transliterate(srcName, code, out))
|
||||
return true;
|
||||
|
||||
// If default name is available, interpret it as a name for the first mwm language.
|
||||
if (!mwmLangCodes.empty() && src.GetString(StringUtf8Multilang::kDefaultCode, srcName))
|
||||
out = Transliteration::GetInstance().Transliterate(srcName, mwmLangCodes[0]);
|
||||
return !out.empty();
|
||||
return Transliteration::Instance().Transliterate(srcName, mwmLangCodes[0], out);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool GetBestName(StringUtf8Multilang const & src, vector<int8_t> const & priorityList, string & out)
|
||||
{
|
||||
out.clear();
|
||||
auto bestIndex = priorityList.size();
|
||||
|
||||
auto const findAndSet = [](vector<int8_t> const & langs, int8_t const code, string const & name,
|
||||
|
@ -72,7 +68,6 @@ bool GetBestName(StringUtf8Multilang const & src, vector<int8_t> const & priorit
|
|||
return false;
|
||||
|
||||
findAndSet(priorityList, code, name, bestIndex, out);
|
||||
|
||||
return true;
|
||||
});
|
||||
|
||||
|
@ -83,7 +78,7 @@ bool GetBestName(StringUtf8Multilang const & src, vector<int8_t> const & priorit
|
|||
out = out.substr(0, out.find_first_of(','));
|
||||
}
|
||||
|
||||
return !out.empty();
|
||||
return bestIndex < priorityList.size();
|
||||
}
|
||||
} // namespace
|
||||
|
||||
|
@ -236,11 +231,12 @@ void GetPreferredNames(RegionData const & regionData, StringUtf8Multilang const
|
|||
if (src.IsEmpty())
|
||||
return;
|
||||
|
||||
if (!GetBestName(src, {deviceLang, StrUtf8::kInternationalCode, StrUtf8::kEnglishCode}, primary) &&
|
||||
allowTranslit)
|
||||
{
|
||||
vector<int8_t> const primaryCodes = {deviceLang,
|
||||
StrUtf8::kInternationalCode,
|
||||
StrUtf8::kEnglishCode};
|
||||
|
||||
if (!GetBestName(src, primaryCodes, primary) && allowTranslit)
|
||||
GetTransliteratedName(regionData, src, primary);
|
||||
}
|
||||
|
||||
vector<int8_t> secondaryCodes = {StrUtf8::kDefaultCode,
|
||||
StrUtf8::kInternationalCode};
|
||||
|
@ -276,7 +272,7 @@ void GetReadableName(RegionData const & regionData, StringUtf8Multilang const &
|
|||
codes = {deviceLang, StrUtf8::kInternationalCode, StrUtf8::kEnglishCode};
|
||||
|
||||
if (GetBestName(src, codes, out))
|
||||
return;
|
||||
return;
|
||||
|
||||
if (allowTranslit && GetTransliteratedName(regionData, src, out))
|
||||
return;
|
||||
|
@ -290,5 +286,4 @@ void GetReadableName(RegionData const & regionData, StringUtf8Multilang const &
|
|||
|
||||
GetMwmLangName(regionData, src, out);
|
||||
}
|
||||
|
||||
} // namespace feature
|
||||
|
|
|
@ -18,8 +18,8 @@ namespace feature
|
|||
/// Primary name using priority:
|
||||
/// - device language name;
|
||||
/// - international name;
|
||||
/// - english name.
|
||||
/// - transliterated name.
|
||||
/// - english name;
|
||||
/// - transliterated name (if allowed).
|
||||
/// Secondary name using priority:
|
||||
/// - default name;
|
||||
/// - international name;
|
||||
|
@ -35,13 +35,13 @@ namespace feature
|
|||
/// - default name;
|
||||
/// - international name;
|
||||
/// - english name;
|
||||
/// - transliterated name;
|
||||
/// - transliterated name (if allowed);
|
||||
/// - country language name.
|
||||
/// When MWM does not contain user's language, the priority is the following:
|
||||
/// - device language name;
|
||||
/// - international name;
|
||||
/// - english name;
|
||||
/// - transliterated name;
|
||||
/// - transliterated name (if allowed);
|
||||
/// - default name;
|
||||
/// - country language name.
|
||||
void GetReadableName(RegionData const & regionData, StringUtf8Multilang const & src,
|
||||
|
|
|
@ -131,7 +131,9 @@ char const kTrafficEnabledKey[] = "TrafficEnabled";
|
|||
char const kTrafficSimplifiedColorsKey[] = "TrafficSimplifiedColors";
|
||||
char const kLargeFontsSize[] = "LargeFontsSize";
|
||||
|
||||
#if defined(OMIM_OS_ANDROID)
|
||||
char const kICUDataFile[] = "icudt57l.dat";
|
||||
#endif
|
||||
|
||||
double const kDistEqualQueryMeters = 100.0;
|
||||
double const kLargeFontsScaleFactor = 1.6;
|
||||
|
@ -195,7 +197,7 @@ string MakeSearchBookingUrl(Index const & index, booking::Api const & bookingApi
|
|||
{
|
||||
search::ReverseGeocoder const coder(index);
|
||||
string hotelName;
|
||||
ft.GetReadableName(hotelName);
|
||||
ft.GetReadableName(false /* allowTranslit */, hotelName);
|
||||
|
||||
auto const lang = StringUtf8Multilang::GetLangIndex(languages::GetCurrentNorm());
|
||||
string city = cityFinder.GetCityName(ft.GetCenter(), lang);
|
||||
|
@ -498,16 +500,8 @@ Framework::Framework()
|
|||
|
||||
m_cityFinder = make_unique<CityFinder>(m_model.GetIndex());
|
||||
|
||||
#ifdef OMIM_OS_ANDROID
|
||||
ZipFileReader::UnzipFile(GetPlatform().ResourcesDir(),
|
||||
std::string("assets/") + kICUDataFile,
|
||||
GetPlatform().WritableDir() + kICUDataFile);
|
||||
|
||||
Transliteration::GetInstance().Init(GetPlatform().WritableDir());
|
||||
#else
|
||||
Transliteration::GetInstance().Init(GetPlatform().ResourcesDir());
|
||||
#endif
|
||||
|
||||
InitTransliteration();
|
||||
LOG(LDEBUG, ("Transliterators initialized"));
|
||||
}
|
||||
|
||||
Framework::~Framework()
|
||||
|
@ -1432,6 +1426,25 @@ void Framework::InitSearchEngine()
|
|||
}
|
||||
}
|
||||
|
||||
void Framework::InitTransliteration()
|
||||
{
|
||||
#if defined(OMIM_OS_ANDROID)
|
||||
try
|
||||
{
|
||||
ZipFileReader::UnzipFile(GetPlatform().ResourcesDir(),
|
||||
std::string("assets/") + kICUDataFile,
|
||||
GetPlatform().WritableDir() + kICUDataFile);
|
||||
}
|
||||
catch (Reader::OpenException const & e)
|
||||
{
|
||||
LOG(LWARNING, ("Can't get transliteration data file \"", kICUDataFile, "\", reason:", e.what()));
|
||||
}
|
||||
Transliteration::GetInstance().Init(GetPlatform().WritableDir());
|
||||
#else
|
||||
Transliteration::Instance().Init(GetPlatform().ResourcesDir());
|
||||
#endif
|
||||
}
|
||||
|
||||
storage::TCountryId Framework::GetCountryIndex(m2::PointD const & pt) const
|
||||
{
|
||||
return m_infoGetter->GetRegionCountryId(pt);
|
||||
|
@ -2135,7 +2148,6 @@ void Framework::SetMapSelectionListeners(TActivateMapSelectionFn const & activat
|
|||
void Framework::ActivateMapSelection(bool needAnimation, df::SelectionShape::ESelectedObject selectionType,
|
||||
place_page::Info const & info)
|
||||
{
|
||||
|
||||
ASSERT_NOT_EQUAL(selectionType, df::SelectionShape::OBJECT_EMPTY, ("Empty selections are impossible."));
|
||||
m_selectedFeature = info.GetID();
|
||||
CallDrapeFunction(bind(&df::DrapeEngine::SelectObject, _1, selectionType, info.GetMercator(), info.GetID(),
|
||||
|
|
|
@ -195,6 +195,8 @@ protected:
|
|||
|
||||
void CallDrapeFunction(TDrapeFunction const & fn) const;
|
||||
|
||||
void InitTransliteration();
|
||||
|
||||
public:
|
||||
Framework();
|
||||
virtual ~Framework();
|
||||
|
|
|
@ -15,6 +15,7 @@ set(
|
|||
gps_track_test.cpp
|
||||
kmz_unarchive_test.cpp
|
||||
mwm_url_tests.cpp
|
||||
transliteration_test.cpp
|
||||
working_time_tests.cpp
|
||||
)
|
||||
|
||||
|
|
|
@ -5,32 +5,43 @@
|
|||
|
||||
#include "platform/platform.hpp"
|
||||
|
||||
namespace
|
||||
{
|
||||
void TestTransliteration(Transliteration const & translit, std::string const & locale,
|
||||
std::string const & original, std::string const & expected)
|
||||
{
|
||||
std::string out;
|
||||
translit.Transliterate(original, StringUtf8Multilang::GetLangIndex(locale), out);
|
||||
TEST_EQUAL(expected, out, ());
|
||||
}
|
||||
} // namespace
|
||||
|
||||
// This test is inside of the map_tests because it uses Platform for obtaining the resource directory.
|
||||
UNIT_TEST(Transliteration_CompareSamples)
|
||||
{
|
||||
Transliteration & translit = Transliteration::GetInstance();
|
||||
Transliteration & translit = Transliteration::Instance();
|
||||
translit.Init(GetPlatform().ResourcesDir());
|
||||
|
||||
TEST_EQUAL("ạlʿrbyẗ", translit.Transliterate("العربية", StringUtf8Multilang::GetLangIndex("ar")), ());
|
||||
TEST_EQUAL("Russkiy", translit.Transliterate("Русский", StringUtf8Multilang::GetLangIndex("ru")), ());
|
||||
TEST_EQUAL("zhōng wén", translit.Transliterate("中文", StringUtf8Multilang::GetLangIndex("zh")), ());
|
||||
TEST_EQUAL("Byelaruskaya", translit.Transliterate("Беларуская", StringUtf8Multilang::GetLangIndex("be")), ());
|
||||
TEST_EQUAL("kartuli", translit.Transliterate("ქართული", StringUtf8Multilang::GetLangIndex("ka")), ());
|
||||
TEST_EQUAL("hangug-eo", translit.Transliterate("한국어", StringUtf8Multilang::GetLangIndex("ko")), ());
|
||||
TEST_EQUAL("‘vryt", translit.Transliterate("עברית", StringUtf8Multilang::GetLangIndex("he")), ());
|
||||
TEST_EQUAL("Ellēniká", translit.Transliterate("Ελληνικά", StringUtf8Multilang::GetLangIndex("el")), ());
|
||||
TEST_EQUAL("pīn yīn", translit.Transliterate("拼音", StringUtf8Multilang::GetLangIndex("zh_pinyin")), ());
|
||||
TEST_EQUAL("thịy", translit.Transliterate("ไทย", StringUtf8Multilang::GetLangIndex("th")), ());
|
||||
TEST_EQUAL("Srpski", translit.Transliterate("Српски", StringUtf8Multilang::GetLangIndex("sr")), ());
|
||||
TEST_EQUAL("Ukrayinsʹka", translit.Transliterate("Українська", StringUtf8Multilang::GetLangIndex("uk")), ());
|
||||
TEST_EQUAL("fạrsy̰", translit.Transliterate("فارسی", StringUtf8Multilang::GetLangIndex("fa")), ());
|
||||
TEST_EQUAL("Hayerēn", translit.Transliterate("Հայերէն", StringUtf8Multilang::GetLangIndex("hy")), ());
|
||||
TEST_EQUAL("kannaḍa", translit.Transliterate("ಕನ್ನಡ", StringUtf8Multilang::GetLangIndex("kn")), ());
|
||||
TEST_EQUAL("āmarinya", translit.Transliterate("አማርኛ", StringUtf8Multilang::GetLangIndex("am")), ());
|
||||
TEST_EQUAL("katakana", translit.Transliterate("カタカナ", StringUtf8Multilang::GetLangIndex("ja_kana")), ());
|
||||
TEST_EQUAL("Bŭlgarski", translit.Transliterate("Български", StringUtf8Multilang::GetLangIndex("bg")), ());
|
||||
TEST_EQUAL("Qazaq", translit.Transliterate("Қазақ", StringUtf8Multilang::GetLangIndex("kk")), ());
|
||||
TEST_EQUAL("Mongol hel", translit.Transliterate("Монгол хэл", StringUtf8Multilang::GetLangIndex("mn")), ());
|
||||
TEST_EQUAL("Makedonski", translit.Transliterate("Македонски", StringUtf8Multilang::GetLangIndex("mk")), ());
|
||||
TEST_EQUAL("hindī", translit.Transliterate("हिन्दी", StringUtf8Multilang::GetLangIndex("hi")), ());
|
||||
TestTransliteration(translit, "ar", "العربية", "ạlʿrbyẗ");
|
||||
TestTransliteration(translit, "ru", "Русский", "Russkiy");
|
||||
TestTransliteration(translit, "zh", "中文", "zhōng wén");
|
||||
TestTransliteration(translit, "be", "Беларуская", "Byelaruskaya");
|
||||
TestTransliteration(translit, "ka", "ქართული", "kartuli");
|
||||
TestTransliteration(translit, "ko", "한국어", "hangug-eo");
|
||||
TestTransliteration(translit, "he", "עברית", "‘vryt");
|
||||
TestTransliteration(translit, "el", "Ελληνικά", "Ellēniká");
|
||||
TestTransliteration(translit, "zh_pinyin", "拼音", "pīn yīn");
|
||||
TestTransliteration(translit, "th", "ไทย", "thịy");
|
||||
TestTransliteration(translit, "sr", "Српски", "Srpski");
|
||||
TestTransliteration(translit, "uk", "Українська", "Ukrayinsʹka");
|
||||
TestTransliteration(translit, "fa", "فارسی", "fạrsy̰");
|
||||
TestTransliteration(translit, "hy", "Հայերէն", "Hayerēn");
|
||||
TestTransliteration(translit, "kn", "ಕನ್ನಡ", "kannaḍa");
|
||||
TestTransliteration(translit, "am", "አማርኛ", "āmarinya");
|
||||
TestTransliteration(translit, "ja_kana", "カタカナ", "katakana");
|
||||
TestTransliteration(translit, "bg", "Български", "Bŭlgarski");
|
||||
TestTransliteration(translit, "kk", "Қазақ", "Qazaq");
|
||||
TestTransliteration(translit, "mn", "Монгол хэл", "Mongol hel");
|
||||
TestTransliteration(translit, "mk", "Македонски", "Makedonski");
|
||||
TestTransliteration(translit, "hi", "हिन्दी", "hindī");
|
||||
}
|
||||
|
|
|
@ -25,11 +25,11 @@ omim_link_libraries(
|
|||
oauthcpp
|
||||
platform
|
||||
jansson
|
||||
icu
|
||||
geometry
|
||||
coding
|
||||
base
|
||||
protobuf
|
||||
icu
|
||||
stats_client
|
||||
${LIBZ}
|
||||
)
|
||||
|
|
|
@ -91,6 +91,7 @@
|
|||
67F183811BD5049500AB1840 /* libagg.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 67F1837D1BD5049500AB1840 /* libagg.a */; };
|
||||
67F183831BD5049500AB1840 /* libminizip.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 67F1837F1BD5049500AB1840 /* libminizip.a */; };
|
||||
67F183841BD5049500AB1840 /* libtess2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 67F183801BD5049500AB1840 /* libtess2.a */; };
|
||||
BB421D6C1E8C0031005BFA4D /* transliteration_test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB421D6A1E8C0026005BFA4D /* transliteration_test.cpp */; };
|
||||
F63421F81DF9BF9100A96868 /* reachable_by_taxi_checker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F63421F61DF9BF9100A96868 /* reachable_by_taxi_checker.cpp */; };
|
||||
F63421F91DF9BF9100A96868 /* reachable_by_taxi_checker.hpp in Headers */ = {isa = PBXBuildFile; fileRef = F63421F71DF9BF9100A96868 /* reachable_by_taxi_checker.hpp */; };
|
||||
F6B283031C1B03320081957A /* gps_track_collection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F6B282FB1C1B03320081957A /* gps_track_collection.cpp */; };
|
||||
|
@ -210,6 +211,7 @@
|
|||
67F183801BD5049500AB1840 /* libtess2.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libtess2.a; path = "../../../omim-xcode-build/Debug/libtess2.a"; sourceTree = "<group>"; };
|
||||
67F183851BD504ED00AB1840 /* libsystem_configuration.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libsystem_configuration.tbd; path = usr/lib/system/libsystem_configuration.tbd; sourceTree = SDKROOT; };
|
||||
67F183871BD5050900AB1840 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
|
||||
BB421D6A1E8C0026005BFA4D /* transliteration_test.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = transliteration_test.cpp; sourceTree = "<group>"; };
|
||||
F63421F61DF9BF9100A96868 /* reachable_by_taxi_checker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = reachable_by_taxi_checker.cpp; sourceTree = "<group>"; };
|
||||
F63421F71DF9BF9100A96868 /* reachable_by_taxi_checker.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = reachable_by_taxi_checker.hpp; sourceTree = "<group>"; };
|
||||
F6B282FB1C1B03320081957A /* gps_track_collection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = gps_track_collection.cpp; sourceTree = "<group>"; };
|
||||
|
@ -295,6 +297,7 @@
|
|||
674A29CA1B26FCC0001A525C /* map_tests */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
BB421D6A1E8C0026005BFA4D /* transliteration_test.cpp */,
|
||||
679624A01D1017C200AE4E3C /* address_tests.cpp */,
|
||||
679624A11D1017C200AE4E3C /* feature_getters_tests.cpp */,
|
||||
679624A21D1017C200AE4E3C /* gps_track_collection_test.cpp */,
|
||||
|
@ -552,6 +555,7 @@
|
|||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
67F183761BD5045700AB1840 /* bookmarks_test.cpp in Sources */,
|
||||
BB421D6C1E8C0031005BFA4D /* transliteration_test.cpp in Sources */,
|
||||
67F183771BD5045700AB1840 /* ge0_parser_tests.cpp in Sources */,
|
||||
679624B21D1017DB00AE4E3C /* mwm_set_test.cpp in Sources */,
|
||||
67F183781BD5045700AB1840 /* geourl_test.cpp in Sources */,
|
||||
|
|
Loading…
Add table
Reference in a new issue