Commit 4af3e329 authored by Orin Jaworski's avatar Orin Jaworski Committed by Commit Bot

[omnibox] Add ar, bg, bn, ca, cs, da, el languages for Pedals

This CL adds concept matching data for several languages,
making use of new generation capabilities in pedal_processor.

Bug: 893183
Change-Id: I8fca6123ff3bdf6fe5e7ec06e759f76414c88e56
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2358430
Auto-Submit: Orin Jaworski <orinj@chromium.org>
Commit-Queue: manuk hovanesian <manukh@chromium.org>
Reviewed-by: default avatarmanuk hovanesian <manukh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#798667}
parent 36a34290
...@@ -25,12 +25,20 @@ TEST(OmniboxPedals, DataLoadsForAllLocales) { ...@@ -25,12 +25,20 @@ TEST(OmniboxPedals, DataLoadsForAllLocales) {
}; };
const TestCase test_cases[] = { const TestCase test_cases[] = {
// clang-format off // clang-format off
{"am", "ሰርዝ ታሪክ"}, // Test cases generated by pedal_processor:
{"de", "leeren cache"}, {"am", "አስወግድ መሸጎጫ"},
{"en", "clear history"}, {"ar", "إزالة ذاكرة التخزين المؤقت"},
{"fr", "supprime historique"}, {"bg", "премахване"},
{"ja", "消す 履歴"}, {"bn", "মিটিয়ে দিন ক্যাশে ফাইল"},
{"zh-CN", "清除 数据"}, {"ca", "suprimeix memòria cau"},
{"cs", "odstranit soubory cookie"},
{"da", "fjern browseroplysninger"},
{"de", "entfernen browserverlauf"},
{"el", "εκκαθάριση πληροφορίες"},
{"en", "delete information"},
{"fr", "suppression informations"},
{"ja", "クリアキャッシュ"},
{"zh-CN", "清除浏览数据"},
// clang-format on // clang-format on
}; };
for (const TestCase& test_case : test_cases) { for (const TestCase& test_case : test_cases) {
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
// This value is generated during Pedal concept data processing, and written // This value is generated during Pedal concept data processing, and written
// to all data files as well as the source code here to ensure synchrony. // to all data files as well as the source code here to ensure synchrony.
// The runtime loaded data must match this version exactly or it won't load. // The runtime loaded data must match this version exactly or it won't load.
constexpr int OMNIBOX_PEDAL_CONCEPTS_DATA_VERSION = 15462706; constexpr int OMNIBOX_PEDAL_CONCEPTS_DATA_VERSION = 15468548;
// Unique identifiers for Pedals, used to bind loaded data to implementations. // Unique identifiers for Pedals, used to bind loaded data to implementations.
enum class OmniboxPedalId { enum class OmniboxPedalId {
......
{ {
"schema": "pedal_concepts_runtime", "schema": "pedal_concepts_runtime",
"schema_version": 1, "schema_version": 1,
"data_version": 15462706, "data_version": 15468548,
"tokenize_characters": " -", "tokenize_characters": " -",
"dictionary": [ "dictionary": [
"chrome", "chrome",
......
{
"schema": "pedal_concepts_runtime",
"schema_version": 1,
"data_version": 15468548,
"tokenize_characters": " -",
"dictionary": [
"a",
"an",
"chrome",
"google",
"أنا",
"إتمام",
"إدارة",
"إزالة",
"إظهار",
"إلى",
"إنشاء",
"ائتمان",
"ال",
"الائتمان",
"الارتباط",
"الاعتماد",
"البطاقة",
"التخزين",
"التصفح",
"التصفّح",
"الخاص",
"الدفع",
"الدفعات",
"الصفحة",
"اللغة",
"المؤقت",
"المتخفي",
"المرور",
"الوضع",
"بدء",
"بطاقات",
"بطاقة",
"بي/التابعة/الخاص/التابع",
"بيانات",
"تبويب",
"تثبيت",
"تحديث",
"ترجمة",
"ترقية",
"تشغيل",
"تصفُّح",
"تعديل",
"تعريف",
"تغيير",
"حجب",
"حذف",
"حفظ",
"خاصة",
"داخل",
"دخول",
"ذاكرة",
"سجلّ",
"صفحة",
"ضمن/غضون/خلال",
"طرق",
"عرض",
"علامة",
"على",
"فتح",
"في",
"كلمات",
"كلمة",
"كيف",
"لـ/لمدة",
"لي/الخاصة",
"متصفّح",
"محو",
"مدير",
"مرور",
"مسح",
"معلومات",
"ملفات",
"نافذة",
"هذه",
"وضع"
],
"pedals": [
{
"name": "CLEAR_BROWSING_DATA",
"id": 1,
"groups": [
{
"required": false,
"single": true,
"synonyms": [
[
3,
2
],
[
65
],
[
40
],
[
2
]
]
},
{
"required": true,
"single": true,
"synonyms": [
[
7
],
[
45
],
[
69
],
[
66
],
[
44
]
]
},
{
"required": true,
"single": true,
"synonyms": [
[
50,
17,
25
],
[
71,
42,
14
],
[
70
],
[
70
],
[
33
],
[
51
]
]
}
]
},
{
"name": "MANAGE_PASSWORDS",
"id": 2,
"groups": [
{
"required": false,
"single": true,
"synonyms": [
[
3,
2
],
[
65
],
[
2
]
]
},
{
"required": true,
"single": true,
"synonyms": [
[
41
],
[
6
],
[
36
],
[
43
],
[
8
],
[
67
],
[
46
],
[
55
]
]
},
{
"required": true,
"single": true,
"synonyms": [
[
33,
15
],
[
60,
27
],
[
61,
68
]
]
}
]
},
{
"name": "UPDATE_CREDIT_CARD",
"id": 3,
"groups": [
{
"required": false,
"single": true,
"synonyms": [
[
3,
2
],
[
65
],
[
2
]
]
},
{
"required": true,
"single": true,
"synonyms": [
[
6
],
[
36
],
[
41
],
[
43
],
[
46
]
]
},
{
"required": true,
"single": true,
"synonyms": [
[
70,
31,
13
],
[
70,
31,
13
],
[
30,
13
],
[
70,
16
],
[
70,
16
],
[
31,
11
],
[
54,
21
],
[
22
],
[
30
],
[
21
]
]
}
]
},
{
"name": "LAUNCH_INCOGNITO",
"id": 4,
"groups": [
{
"required": false,
"single": true,
"synonyms": [
[
3,
2
],
[
65
],
[
2
]
]
},
{
"required": false,
"single": true,
"synonyms": [
[
39
],
[
10
],
[
49
],
[
29
],
[
58
]
]
},
{
"required": true,
"single": true,
"synonyms": [
[
56,
34,
74,
19,
26
],
[
72,
19,
26
],
[
74,
19,
26
],
[
56,
34,
47
],
[
18,
26
],
[
28,
20
],
[
72,
47
]
]
}
]
},
{
"name": "TRANSLATE",
"id": 5,
"groups": [
{
"required": false,
"single": true,
"synonyms": [
[
3,
2
],
[
65
],
[
2
]
]
},
{
"required": true,
"single": true,
"synonyms": [
[
43,
24
],
[
37
]
]
},
{
"required": true,
"single": true,
"synonyms": [
[
73,
23
],
[
52
],
[
73
]
]
}
]
},
{
"name": "UPDATE_CHROME",
"id": 6,
"groups": [
{
"required": true,
"single": true,
"synonyms": [
[
3,
2
],
[
65
],
[
2
]
]
},
{
"required": true,
"single": true,
"synonyms": [
[
38
],
[
35
],
[
36
]
]
}
]
}
],
"ignore_group": {
"required": false,
"single": false,
"synonyms": [
[
64,
32
],
[
53
],
[
63
],
[
5
],
[
48
],
[
62
],
[
57
],
[
9
],
[
4
],
[
12
],
[
59
],
[
1
],
[
0
]
]
},
"max_tokens": 32
}
\ No newline at end of file
This diff is collapsed.
{
"schema": "pedal_concepts_runtime",
"schema_version": 1,
"data_version": 15468548,
"tokenize_characters": " -",
"dictionary": [
"chrome",
"google",
"the",
"অনুবাদ",
"আপগ্রেড",
"আপডেট",
"আমার",
"আমি",
"ইতিহাস",
"ইনস্টল",
"উইন্ডো",
"উপরে",
"এই",
"একটি",
"এডিট",
"এন্টার",
"এর",
"করা",
"করুন",
"কার্ড",
"কার্ডের",
"কীভাবে",
"কুকি",
"ক্যাশে",
"ক্রেডিট",
"ক্রেডেনশিয়াল",
"খুলুন",
"ছদ্মবেশী",
"জন্য",
"ট্যাব",
"ডেটা",
"তথ্য",
"তৈরি",
"দিকে",
"দিন",
"দেখান",
"দেখুন",
"পদ্ধতি",
"পরিবর্তন",
"পাসওয়ার্ড",
"পৃষ্ঠা",
"পেমেন্ট",
"ফাইল",
"ব্যক্তিগত",
"ব্রাউজ",
"ব্রাউজার",
"ভাষা",
"ভেতরে",
"মধ্যে",
"মিটিয়ে",
"মুছে",
"মোড",
"ম্যানেজ",
"ম্যানেজার",
"লঞ্চ",
"শুরু",
"সরিয়ে",
"সেভ",
"হচ্ছে"
],
"pedals": [
{
"name": "CLEAR_BROWSING_DATA",
"id": 1,
"groups": [
{
"required": false,
"single": true,
"synonyms": [
[
44,
58
],
[
1,
0
],
[
45
],
[
0
]
]
},
{
"required": true,
"single": true,
"synonyms": [
[
49,
34
],
[
56,
34
],
[
50,
34
],
[
50,
34
],
[
50,
34
]
]
},
{
"required": true,
"single": true,
"synonyms": [
[
23,
42
],
[
8
],
[
30
],
[
31
],
[
31
],
[
22
]
]
}
]
},
{
"name": "MANAGE_PASSWORDS",
"id": 2,
"groups": [
{
"required": false,
"single": true,
"synonyms": [
[
1,
0
],
[
45
],
[
0
]
]
},
{
"required": true,
"single": true,
"synonyms": [
[
38,
18
],
[
52,
18
],
[
5,
18
],
[
14,
18
],
[
57,
18
],
[
53
],
[
36
],
[
35
]
]
},
{
"required": true,
"single": true,
"synonyms": [
[
25
],
[
39
],
[
39
]
]
}
]
},
{
"name": "UPDATE_CREDIT_CARD",
"id": 3,
"groups": [
{
"required": false,
"single": true,
"synonyms": [
[
1,
0
],
[
45
],
[
0
]
]
},
{
"required": true,
"single": true,
"synonyms": [
[
38,
18
],
[
52,
18
],
[
5,
18
],
[
14,
18
],
[
57,
18
]
]
},
{
"required": true,
"single": true,
"synonyms": [
[
24,
20,
31
],
[
24,
20,
31
],
[
41,
37
],
[
24,
19
],
[
24,
19
],
[
20,
31
],
[
20,
31
],
[
41
],
[
41
],
[
19
]
]
}
]
},
{
"name": "LAUNCH_INCOGNITO",
"id": 4,
"groups": [
{
"required": false,
"single": true,
"synonyms": [
[
1,
0
],
[
45
],
[
0
]
]
},
{
"required": false,
"single": true,
"synonyms": [
[
15,
18
],
[
54,
18
],
[
55,
18
],
[
32,
18
],
[
26
]
]
},
{
"required": true,
"single": true,
"synonyms": [
[
43,
10
],
[
27,
10
],
[
43,
29
],
[
27,
29
],
[
43,
51
],
[
27,
51
],
[
27
]
]
}
]
},
{
"name": "TRANSLATE",
"id": 5,
"groups": [
{
"required": false,
"single": true,
"synonyms": [
[
1,
0
],
[
45
],
[
0
]
]
},
{
"required": true,
"single": true,
"synonyms": [
[
46,
38,
18
],
[
3,
18
]
]
},
{
"required": true,
"single": true,
"synonyms": [
[
12,
40
],
[
40
],
[
12
]
]
}
]
},
{
"name": "UPDATE_CHROME",
"id": 6,
"groups": [
{
"required": true,
"single": true,
"synonyms": [
[
1,
0
],
[
45
],
[
0
]
]
},
{
"required": true,
"single": true,
"synonyms": [
[
4,
18
],
[
9,
18
],
[
5,
18
]
]
}
]
}
],
"ignore_group": {
"required": false,
"single": false,
"synonyms": [
[
16,
48
],
[
16,
33
],
[
21
],
[
47
],
[
48
],
[
28
],
[
13
],
[
6
],
[
11
],
[
13
],
[
17
],
[
7
],
[
2
]
]
},
"max_tokens": 32
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
{ {
"schema": "pedal_concepts_runtime", "schema": "pedal_concepts_runtime",
"schema_version": 1, "schema_version": 1,
"data_version": 15462706, "data_version": 15468548,
"tokenize_characters": " -", "tokenize_characters": " -",
"dictionary": [ "dictionary": [
"aktualisieren", "aktualisieren",
......
This diff is collapsed.
{ {
"schema": "pedal_concepts_runtime", "schema": "pedal_concepts_runtime",
"schema_version": 1, "schema_version": 1,
"data_version": 15462706, "data_version": 15468548,
"tokenize_characters": " -", "tokenize_characters": " -",
"dictionary": [ "dictionary": [
"a", "a",
......
{ {
"schema": "pedal_concepts_runtime", "schema": "pedal_concepts_runtime",
"schema_version": 1, "schema_version": 1,
"data_version": 15462706, "data_version": 15468548,
"tokenize_characters": " -", "tokenize_characters": " -",
"dictionary": [ "dictionary": [
"actualise", "actualise",
......
{ {
"schema": "pedal_concepts_runtime", "schema": "pedal_concepts_runtime",
"schema_version": 1, "schema_version": 1,
"data_version": 15462706, "data_version": 15468548,
"tokenize_characters": "", "tokenize_characters": "",
"dictionary": [ "dictionary": [
" ", " ",
......
{ {
"schema": "pedal_concepts_runtime", "schema": "pedal_concepts_runtime",
"schema_version": 1, "schema_version": 1,
"data_version": 15462706, "data_version": 15468548,
"tokenize_characters": "", "tokenize_characters": "",
"dictionary": [ "dictionary": [
" ", " ",
......
...@@ -108,14 +108,36 @@ ...@@ -108,14 +108,36 @@
<output filename="omnibox_resources_zh-TW.pak" type="data_package" lang="zh-TW" /> <output filename="omnibox_resources_zh-TW.pak" type="data_package" lang="zh-TW" />
</outputs> </outputs>
<release seq="1" allow_pseudo="false"> <release seq="1" allow_pseudo="false">
<!-- This <includes> tag is generated by pedal_processor. -->
<includes> <includes>
<!-- These resources do not require translation or further processing because they are already handled by a separate localization process. --> <!-- These resources do not require translation or further processing because they are already handled by a separate localization process. -->
<if expr="lang == 'am'"> <if expr="lang == 'am'">
<include name="IDR_OMNIBOX_PEDAL_CONCEPTS" file="omnibox_pedal_concepts_am.json" type="BINDATA" compress="gzip" /> <include name="IDR_OMNIBOX_PEDAL_CONCEPTS" file="omnibox_pedal_concepts_am.json" type="BINDATA" compress="gzip" />
</if> </if>
<if expr="lang == 'ar'">
<include name="IDR_OMNIBOX_PEDAL_CONCEPTS" file="omnibox_pedal_concepts_ar.json" type="BINDATA" compress="gzip" />
</if>
<if expr="lang == 'bg'">
<include name="IDR_OMNIBOX_PEDAL_CONCEPTS" file="omnibox_pedal_concepts_bg.json" type="BINDATA" compress="gzip" />
</if>
<if expr="lang == 'bn'">
<include name="IDR_OMNIBOX_PEDAL_CONCEPTS" file="omnibox_pedal_concepts_bn.json" type="BINDATA" compress="gzip" />
</if>
<if expr="lang == 'ca'">
<include name="IDR_OMNIBOX_PEDAL_CONCEPTS" file="omnibox_pedal_concepts_ca.json" type="BINDATA" compress="gzip" />
</if>
<if expr="lang == 'cs'">
<include name="IDR_OMNIBOX_PEDAL_CONCEPTS" file="omnibox_pedal_concepts_cs.json" type="BINDATA" compress="gzip" />
</if>
<if expr="lang == 'da'">
<include name="IDR_OMNIBOX_PEDAL_CONCEPTS" file="omnibox_pedal_concepts_da.json" type="BINDATA" compress="gzip" />
</if>
<if expr="lang == 'de'"> <if expr="lang == 'de'">
<include name="IDR_OMNIBOX_PEDAL_CONCEPTS" file="omnibox_pedal_concepts_de.json" type="BINDATA" compress="gzip" /> <include name="IDR_OMNIBOX_PEDAL_CONCEPTS" file="omnibox_pedal_concepts_de.json" type="BINDATA" compress="gzip" />
</if> </if>
<if expr="lang == 'el'">
<include name="IDR_OMNIBOX_PEDAL_CONCEPTS" file="omnibox_pedal_concepts_el.json" type="BINDATA" compress="gzip" />
</if>
<if expr="lang == 'en'"> <if expr="lang == 'en'">
<include name="IDR_OMNIBOX_PEDAL_CONCEPTS" file="omnibox_pedal_concepts_en.json" type="BINDATA" compress="gzip" /> <include name="IDR_OMNIBOX_PEDAL_CONCEPTS" file="omnibox_pedal_concepts_en.json" type="BINDATA" compress="gzip" />
</if> </if>
...@@ -128,7 +150,7 @@ ...@@ -128,7 +150,7 @@
<if expr="lang == 'zh-CN'"> <if expr="lang == 'zh-CN'">
<include name="IDR_OMNIBOX_PEDAL_CONCEPTS" file="omnibox_pedal_concepts_zh-CN.json" type="BINDATA" compress="gzip" /> <include name="IDR_OMNIBOX_PEDAL_CONCEPTS" file="omnibox_pedal_concepts_zh-CN.json" type="BINDATA" compress="gzip" />
</if> </if>
<if expr="lang not in ['am', 'de', 'en', 'fr', 'ja', 'zh-CN']"> <if expr="lang not in ['am','ar','bg','bn','ca','cs','da','de','el','en','fr','ja','zh-CN',]">
<!-- Fall back to English for unsupported languages. --> <!-- Fall back to English for unsupported languages. -->
<include name="IDR_OMNIBOX_PEDAL_CONCEPTS" file="omnibox_pedal_concepts_en.json" type="BINDATA" compress="gzip" /> <include name="IDR_OMNIBOX_PEDAL_CONCEPTS" file="omnibox_pedal_concepts_en.json" type="BINDATA" compress="gzip" />
</if> </if>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment