Merge pull request #5077 from mpimenov/wifi-categories

[search] Support hyphen in the Wi-Fi category.
This commit is contained in:
ygorshenin 2017-01-09 16:38:23 +03:00 committed by GitHub
commit e6d985b5ce
5 changed files with 32 additions and 28 deletions

View file

@ -423,7 +423,7 @@
<!-- Settings item title -->
<string name="pref_calibration_title">Compass calibration</string>
<!-- Search Suggestion -->
<string name="wifi">Wi-Fi</string>
<string name="wifi">WiFi</string>
<!-- Update map suggestion -->
<string name="routing_map_outdated">Please update the map to create a route</string>
<!-- Update maps suggestion -->

View file

@ -5565,35 +5565,35 @@ sk:Oceán
sw:Bahari
@wifi
en:WiFi
ru:WiFi
en:WiFi|Wi-Fi
ru:WiFi|Wi-Fi
ar:وايفاي
cs:WiFi
da:WiFi
nl:WiFi
fi:WiFi
fr:WiFi
de:WLAN|WiFi
hu:WiFi
id:WiFi
it:WiFi
cs:WiFi|Wi-Fi
da:WiFi|Wi-Fi
nl:WiFi|Wi-Fi
fi:WiFi|Wi-Fi
fr:WiFi|Wi-Fi
de:WLAN|WiFi|Wi-Fi
hu:WiFi|Wi-Fi
id:WiFi|Wi-Fi
it:WiFi|Wi-Fi
ja:無線LAN
ko:WiFi인터넷|WiFi 인터넷
nb:WiFi
pl:WiFi
pt:WiFi
ro:WiFi
es:WiFi
sv:WiFi
th:WiFi
tr:WiFi
uk:WiFi
vi:WiFi
ko:WiFi인터넷|WiFi 인터넷|Wi-Fi인터넷|Wi-Fi 인터넷
nb:WiFi|Wi-Fi
pl:WiFi|Wi-Fi
pt:WiFi|Wi-Fi
ro:WiFi|Wi-Fi
es:WiFi|Wi-Fi
sv:WiFi|Wi-Fi
th:WiFi|Wi-Fi
tr:WiFi|Wi-Fi
uk:WiFi|Wi-Fi
vi:WiFi|Wi-Fi
zh-Hans:无线网络
zh-Hant:無線網路
el:WiFi
sk:WiFi
sw:WiFi
el:WiFi|Wi-Fi
sk:WiFi|Wi-Fi
sw:WiFi|Wi-Fi
internet_access|internet_access-wlan|@wifi
en:3^Internet|U+1F4F6

View file

@ -225,9 +225,11 @@ bool CategoriesHolder::ValidKeyToken(StringT const & s)
return true;
/// @todo We need to have global stop words array for the most used languages.
for (char const * token : {"a", "z", "s", "d", "di", "de", "le", "wi", "fi", "ra", "ao"})
for (char const * token : {"a", "z", "s", "d", "di", "de", "le", "ra", "ao"})
{
if (s.IsEqualAscii(token))
return false;
}
return true;
}

View file

@ -677,6 +677,8 @@ UNIT_CLASS_TEST(ProcessorTest, TestCategories)
TEST(ResultsMatch("#void-", TRules{}), ());
TEST(ResultsMatch("wifi", {ExactMatch(wonderlandId, cafe)}), ());
TEST(ResultsMatch("wi-fi", {ExactMatch(wonderlandId, cafe)}), ());
TEST(ResultsMatch("wai-fai", TRules{}), ());
TEST(ResultsMatch("toilet", {ExactMatch(wonderlandId, toi)}), ());
TEST(ResultsMatch("beach ",
{ExactMatch(wonderlandId, nonameBeach), ExactMatch(wonderlandId, namedBeach)}),

View file

@ -7237,7 +7237,7 @@
[wifi]
comment = Search Suggestion
tags = ios,android,tizen
en = Wi-Fi
en = WiFi
ru = WiFi
ar = واي فاي
cs = WiFi