Android-x86
Fork
Faire un don

  • R/O
  • HTTP
  • SSH
  • HTTPS

packages-apps-Trebuchet: Commit

packages/apps/Trebuchet


Commit MetaInfo

Révisionf92f9d87d8f36d9b7c39f226fe5fc822c384c250 (tree)
l'heure2018-02-13 12:07:05
AuteurChih-Wei Huang <cwhuang@linu...>
CommiterChih-Wei Huang

Message de Log

Merge remote-tracking branch 'cm/cm-14.1' into cm-14.1-x86

Change Summary

Modification

--- /dev/null
+++ b/res/values-en-rCA/cm_strings.xml
@@ -0,0 +1,33 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<!--Generated by crowdin.com-->
3+<!--
4+ Copyright (C) 2014 The CyanogenMod Project
5+
6+ Licensed under the Apache License, Version 2.0 (the "License");
7+ you may not use this file except in compliance with the License.
8+ You may obtain a copy of the License at
9+
10+ http://www.apache.org/licenses/LICENSE-2.0
11+
12+ Unless required by applicable law or agreed to in writing, software
13+ distributed under the License is distributed on an "AS IS" BASIS,
14+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+ See the License for the specific language governing permissions and
16+ limitations under the License.
17+-->
18+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
19+ <!-- Application name -->
20+ <!-- Settings states -->
21+ <!-- Folder titles -->
22+ <!-- Wallpaper scroll effect -->
23+ <!-- Dynamic Grid -->
24+ <!-- Dialog -->
25+ <!-- Home screen search bar -->
26+ <!-- Larger icons -->
27+ <!-- Icon labels -->
28+ <!-- Protected apps -->
29+ <!-- Developer settings -->
30+ <!-- Drawer settings -->
31+ <!-- Search Manager doesn't exist -->
32+ <!-- App not available toast text -->
33+</resources>
--- /dev/null
+++ b/res/values-fil-rPH/strings.xml
@@ -0,0 +1,120 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<!--Generated by crowdin.com-->
3+<!--
4+/*
5+* Copyright (C) 2008 The Android Open Source Project
6+*
7+* Licensed under the Apache License, Version 2.0 (the "License");
8+* you may not use this file except in compliance with the License.
9+* You may obtain a copy of the License at
10+*
11+* http://www.apache.org/licenses/LICENSE-2.0
12+*
13+* Unless required by applicable law or agreed to in writing, software
14+* distributed under the License is distributed on an "AS IS" BASIS,
15+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+* See the License for the specific language governing permissions and
17+* limitations under the License.
18+*/
19+-->
20+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
21+ <!-- General -->
22+ <!-- URI used to import old favorites. [DO NOT TRANSLATE] -->
23+ <!-- Permission to receive the com.android.launcher3.action.LAUNCH intent. [DO NOT TRANSLATE] -->
24+ <!-- Permission to receive the com.android.launcher3.action.FIRST_LOAD_COMPLETE intent. [DO NOT TRANSLATE] -->
25+ <!-- Application name -->
26+ <!-- Default folder name -->
27+ <!-- Work folder name -->
28+ <!-- Displayed when user selects a shortcut for an app that was uninstalled [CHAR_LIMIT=none]-->
29+ <!-- Displayed when user selects a shortcut for an app that is current not available [CHAR_LIMIT=none]-->
30+ <!-- SafeMode shortcut error string -->
31+ <!-- SafeMode widget error string -->
32+ <!-- Widgets -->
33+ <!-- Message to tell the user to press and hold on a widget to add it [CHAR_LIMIT=50] -->
34+ <!-- The format string for the dimensions of a widget in the drawer -->
35+ <!-- There is a special version of this format string for Farsi -->
36+ <!-- All Apps -->
37+ <!-- Search bar text in the apps view. [CHAR_LIMIT=50] -->
38+ <!-- Loading apps text. [CHAR_LIMIT=50] -->
39+ <!-- No-search-results text. [CHAR_LIMIT=50] -->
40+ <!-- Search market text. This is a format string where the first argument is the name of the activity
41+ handling the search. The format string does not need to handle both of these arguments. [CHAR_LIMIT=50] -->
42+ <!-- Drag and drop -->
43+ <!-- Error message when user has filled a home screen -->
44+ <!-- Error message when user has filled the hotseat -->
45+ <!-- All applications label -->
46+ <!-- Label for button in all applications label to go back home (to the workspace / desktop)
47+ for accessibilty (spoken when the button gets focus). -->
48+ <!-- Label for delete drop target. [CHAR_LIMIT=20] -->
49+ <!-- Label for uninstall drop target. [CHAR_LIMIT=20]-->
50+ <!-- Label for the info icon. [CHAR_LIMIT=20] -->
51+ <!-- Permissions: -->
52+ <!-- Permission short label -->
53+ <!-- Permission description -->
54+ <!-- Permission short label -->
55+ <!-- Permission description -->
56+ <!-- Permission short label -->
57+ <!-- Permission description -->
58+ <!-- Toast shown on clicking a direct call shortcut. [CHAR_LIMIT=80] -->
59+ <!-- Widgets: -->
60+ <!-- Text to show user in place of a gadget when we can't display it properly -->
61+ <!-- Text to show user in place of a gadget when it is not yet initialized. -->
62+ <!-- Text to inform the user that they can't uninstall a system application -->
63+ <!-- Default folder title -->
64+ <!-- Accessibility -->
65+ <!-- The format string for default page scroll text [CHAR_LIMIT=none] -->
66+ <!-- The format string for Workspace page scroll text [CHAR_LIMIT=none] -->
67+ <!-- Clings -->
68+ <!-- The title text for the workspace cling [CHAR_LIMIT=30] -->
69+ <!-- The title text for the migration cling [CHAR_LIMIT=30] -->
70+ <!-- The description of what migration does [CHAR_LIMIT=70] -->
71+ <!-- The description of the button to migrate apps from another launcher [CHAR_LIMIT=30] -->
72+ <!-- The description of the button to use the default launcher layout [CHAR_LIMIT=30] -->
73+ <!-- The title text for workspace longpress action [CHAR_LIMIT=40] -->
74+ <!-- The description of how to use the workspace [CHAR_LIMIT=70] -->
75+ <!-- The description of the button to dismiss the cling [CHAR_LIMIT=30] -->
76+ <!-- Folder accessibility -->
77+ <!-- The format string for when a folder is opened, speaks the dimensions -->
78+ <!-- Instruction that clicking outside will close folder -->
79+ <!-- Instruction that clicking outside will commit folder rename -->
80+ <!-- Indication that folder closed -->
81+ <!-- Folder renamed format -->
82+ <!-- Folder name format -->
83+ <!-- Strings for the customization mode -->
84+ <!-- Text for widget add button -->
85+ <!-- Text for wallpaper change button -->
86+ <!-- Text for settings button -->
87+ <!-- Strings for settings -->
88+ <!-- Title for Allow Rotation setting. [CHAR LIMIT=50] -->
89+ <!-- Label on an icon that references an uninstalled package, for which we have no information about when it might be installed. [CHAR_LIMIT=15] -->
90+ <!-- Button for abandoned promises dialog, to removes this abandoned promise icon. -->
91+ <!-- Button for abandoned promise dialog, to search in the market for the missing package. -->
92+ <!-- Title for abandoned promise dialog. -->
93+ <!-- Explanation for abandoned promise dialog. "The first 'it' refers to the shortcut icon.
94+ The second "it" refers to the app. -->
95+ <!-- Strings for accessibility actions -->
96+ <!-- Accessibility action to add an app to workspace. [CHAR_LIMIT=30] -->
97+ <!-- Accessibility action to move item to the current location. [CHAR_LIMIT=30] -->
98+ <!-- Accessibility confirmation for item added to workspace. -->
99+ <!-- Accessibility confirmation for item removed. -->
100+ <!-- Accessibility action to move an item on the workspace. [CHAR_LIMIT=30] -->
101+ <!-- Accessibility description to move item to empty cell. -->
102+ <!-- Accessibility description to move item inside a folder. -->
103+ <!-- Accessibility description to move item to the hotseat. -->
104+ <!-- Accessibility confirmation for item move. -->
105+ <!-- Accessibility description to move item into an existing folder. -->
106+ <!-- Accessibility description to move item into an existing folder containing an app. -->
107+ <!-- Accessibility confirmation for item added to folder. -->
108+ <!-- Accessibility description to create folder with another item. -->
109+ <!-- Accessibility confirmation for folder created. -->
110+ <!-- Accessibility action to move an item from folder to workspace. [CHAR_LIMIT=30] -->
111+ <!-- Accessibility action to move an homescreen to the left. [CHAR_LIMIT=30] -->
112+ <!-- Accessibility action to move an homescreen to the right. [CHAR_LIMIT=30] -->
113+ <!-- Accessibility confirmation when a screen was moved. -->
114+ <!-- Accessibility action to resize a widget. [CHAR_LIMIT=30] -->
115+ <!-- Accessibility action to increase width of a widget. [CHAR_LIMIT=30] -->
116+ <!-- Accessibility action to increase height of a widget. [CHAR_LIMIT=30] -->
117+ <!-- Accessibility action to decrease width of a widget. [CHAR_LIMIT=30] -->
118+ <!-- Accessibility action to decrease height of a widget. [CHAR_LIMIT=30] -->
119+ <!-- Accessibility confirmation for widget resize. -->
120+</resources>
--- /dev/null
+++ b/res/values-kab-rDZ/cm_strings.xml
@@ -0,0 +1,33 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<!--Generated by crowdin.com-->
3+<!--
4+ Copyright (C) 2014 The CyanogenMod Project
5+
6+ Licensed under the Apache License, Version 2.0 (the "License");
7+ you may not use this file except in compliance with the License.
8+ You may obtain a copy of the License at
9+
10+ http://www.apache.org/licenses/LICENSE-2.0
11+
12+ Unless required by applicable law or agreed to in writing, software
13+ distributed under the License is distributed on an "AS IS" BASIS,
14+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+ See the License for the specific language governing permissions and
16+ limitations under the License.
17+-->
18+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
19+ <!-- Application name -->
20+ <!-- Settings states -->
21+ <!-- Folder titles -->
22+ <!-- Wallpaper scroll effect -->
23+ <!-- Dynamic Grid -->
24+ <!-- Dialog -->
25+ <!-- Home screen search bar -->
26+ <!-- Larger icons -->
27+ <!-- Icon labels -->
28+ <!-- Protected apps -->
29+ <!-- Developer settings -->
30+ <!-- Drawer settings -->
31+ <!-- Search Manager doesn't exist -->
32+ <!-- App not available toast text -->
33+</resources>
--- /dev/null
+++ b/res/values-kab-rDZ/strings.xml
@@ -0,0 +1,120 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<!--Generated by crowdin.com-->
3+<!--
4+/*
5+* Copyright (C) 2008 The Android Open Source Project
6+*
7+* Licensed under the Apache License, Version 2.0 (the "License");
8+* you may not use this file except in compliance with the License.
9+* You may obtain a copy of the License at
10+*
11+* http://www.apache.org/licenses/LICENSE-2.0
12+*
13+* Unless required by applicable law or agreed to in writing, software
14+* distributed under the License is distributed on an "AS IS" BASIS,
15+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+* See the License for the specific language governing permissions and
17+* limitations under the License.
18+*/
19+-->
20+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
21+ <!-- General -->
22+ <!-- URI used to import old favorites. [DO NOT TRANSLATE] -->
23+ <!-- Permission to receive the com.android.launcher3.action.LAUNCH intent. [DO NOT TRANSLATE] -->
24+ <!-- Permission to receive the com.android.launcher3.action.FIRST_LOAD_COMPLETE intent. [DO NOT TRANSLATE] -->
25+ <!-- Application name -->
26+ <!-- Default folder name -->
27+ <!-- Work folder name -->
28+ <!-- Displayed when user selects a shortcut for an app that was uninstalled [CHAR_LIMIT=none]-->
29+ <!-- Displayed when user selects a shortcut for an app that is current not available [CHAR_LIMIT=none]-->
30+ <!-- SafeMode shortcut error string -->
31+ <!-- SafeMode widget error string -->
32+ <!-- Widgets -->
33+ <!-- Message to tell the user to press and hold on a widget to add it [CHAR_LIMIT=50] -->
34+ <!-- The format string for the dimensions of a widget in the drawer -->
35+ <!-- There is a special version of this format string for Farsi -->
36+ <!-- All Apps -->
37+ <!-- Search bar text in the apps view. [CHAR_LIMIT=50] -->
38+ <!-- Loading apps text. [CHAR_LIMIT=50] -->
39+ <!-- No-search-results text. [CHAR_LIMIT=50] -->
40+ <!-- Search market text. This is a format string where the first argument is the name of the activity
41+ handling the search. The format string does not need to handle both of these arguments. [CHAR_LIMIT=50] -->
42+ <!-- Drag and drop -->
43+ <!-- Error message when user has filled a home screen -->
44+ <!-- Error message when user has filled the hotseat -->
45+ <!-- All applications label -->
46+ <!-- Label for button in all applications label to go back home (to the workspace / desktop)
47+ for accessibilty (spoken when the button gets focus). -->
48+ <!-- Label for delete drop target. [CHAR_LIMIT=20] -->
49+ <!-- Label for uninstall drop target. [CHAR_LIMIT=20]-->
50+ <!-- Label for the info icon. [CHAR_LIMIT=20] -->
51+ <!-- Permissions: -->
52+ <!-- Permission short label -->
53+ <!-- Permission description -->
54+ <!-- Permission short label -->
55+ <!-- Permission description -->
56+ <!-- Permission short label -->
57+ <!-- Permission description -->
58+ <!-- Toast shown on clicking a direct call shortcut. [CHAR_LIMIT=80] -->
59+ <!-- Widgets: -->
60+ <!-- Text to show user in place of a gadget when we can't display it properly -->
61+ <!-- Text to show user in place of a gadget when it is not yet initialized. -->
62+ <!-- Text to inform the user that they can't uninstall a system application -->
63+ <!-- Default folder title -->
64+ <!-- Accessibility -->
65+ <!-- The format string for default page scroll text [CHAR_LIMIT=none] -->
66+ <!-- The format string for Workspace page scroll text [CHAR_LIMIT=none] -->
67+ <!-- Clings -->
68+ <!-- The title text for the workspace cling [CHAR_LIMIT=30] -->
69+ <!-- The title text for the migration cling [CHAR_LIMIT=30] -->
70+ <!-- The description of what migration does [CHAR_LIMIT=70] -->
71+ <!-- The description of the button to migrate apps from another launcher [CHAR_LIMIT=30] -->
72+ <!-- The description of the button to use the default launcher layout [CHAR_LIMIT=30] -->
73+ <!-- The title text for workspace longpress action [CHAR_LIMIT=40] -->
74+ <!-- The description of how to use the workspace [CHAR_LIMIT=70] -->
75+ <!-- The description of the button to dismiss the cling [CHAR_LIMIT=30] -->
76+ <!-- Folder accessibility -->
77+ <!-- The format string for when a folder is opened, speaks the dimensions -->
78+ <!-- Instruction that clicking outside will close folder -->
79+ <!-- Instruction that clicking outside will commit folder rename -->
80+ <!-- Indication that folder closed -->
81+ <!-- Folder renamed format -->
82+ <!-- Folder name format -->
83+ <!-- Strings for the customization mode -->
84+ <!-- Text for widget add button -->
85+ <!-- Text for wallpaper change button -->
86+ <!-- Text for settings button -->
87+ <!-- Strings for settings -->
88+ <!-- Title for Allow Rotation setting. [CHAR LIMIT=50] -->
89+ <!-- Label on an icon that references an uninstalled package, for which we have no information about when it might be installed. [CHAR_LIMIT=15] -->
90+ <!-- Button for abandoned promises dialog, to removes this abandoned promise icon. -->
91+ <!-- Button for abandoned promise dialog, to search in the market for the missing package. -->
92+ <!-- Title for abandoned promise dialog. -->
93+ <!-- Explanation for abandoned promise dialog. "The first 'it' refers to the shortcut icon.
94+ The second "it" refers to the app. -->
95+ <!-- Strings for accessibility actions -->
96+ <!-- Accessibility action to add an app to workspace. [CHAR_LIMIT=30] -->
97+ <!-- Accessibility action to move item to the current location. [CHAR_LIMIT=30] -->
98+ <!-- Accessibility confirmation for item added to workspace. -->
99+ <!-- Accessibility confirmation for item removed. -->
100+ <!-- Accessibility action to move an item on the workspace. [CHAR_LIMIT=30] -->
101+ <!-- Accessibility description to move item to empty cell. -->
102+ <!-- Accessibility description to move item inside a folder. -->
103+ <!-- Accessibility description to move item to the hotseat. -->
104+ <!-- Accessibility confirmation for item move. -->
105+ <!-- Accessibility description to move item into an existing folder. -->
106+ <!-- Accessibility description to move item into an existing folder containing an app. -->
107+ <!-- Accessibility confirmation for item added to folder. -->
108+ <!-- Accessibility description to create folder with another item. -->
109+ <!-- Accessibility confirmation for folder created. -->
110+ <!-- Accessibility action to move an item from folder to workspace. [CHAR_LIMIT=30] -->
111+ <!-- Accessibility action to move an homescreen to the left. [CHAR_LIMIT=30] -->
112+ <!-- Accessibility action to move an homescreen to the right. [CHAR_LIMIT=30] -->
113+ <!-- Accessibility confirmation when a screen was moved. -->
114+ <!-- Accessibility action to resize a widget. [CHAR_LIMIT=30] -->
115+ <!-- Accessibility action to increase width of a widget. [CHAR_LIMIT=30] -->
116+ <!-- Accessibility action to increase height of a widget. [CHAR_LIMIT=30] -->
117+ <!-- Accessibility action to decrease width of a widget. [CHAR_LIMIT=30] -->
118+ <!-- Accessibility action to decrease height of a widget. [CHAR_LIMIT=30] -->
119+ <!-- Accessibility confirmation for widget resize. -->
120+</resources>
--- /dev/null
+++ b/res/values-rm-rCH/strings.xml
@@ -0,0 +1,120 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<!--Generated by crowdin.com-->
3+<!--
4+/*
5+* Copyright (C) 2008 The Android Open Source Project
6+*
7+* Licensed under the Apache License, Version 2.0 (the "License");
8+* you may not use this file except in compliance with the License.
9+* You may obtain a copy of the License at
10+*
11+* http://www.apache.org/licenses/LICENSE-2.0
12+*
13+* Unless required by applicable law or agreed to in writing, software
14+* distributed under the License is distributed on an "AS IS" BASIS,
15+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+* See the License for the specific language governing permissions and
17+* limitations under the License.
18+*/
19+-->
20+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
21+ <!-- General -->
22+ <!-- URI used to import old favorites. [DO NOT TRANSLATE] -->
23+ <!-- Permission to receive the com.android.launcher3.action.LAUNCH intent. [DO NOT TRANSLATE] -->
24+ <!-- Permission to receive the com.android.launcher3.action.FIRST_LOAD_COMPLETE intent. [DO NOT TRANSLATE] -->
25+ <!-- Application name -->
26+ <!-- Default folder name -->
27+ <!-- Work folder name -->
28+ <!-- Displayed when user selects a shortcut for an app that was uninstalled [CHAR_LIMIT=none]-->
29+ <!-- Displayed when user selects a shortcut for an app that is current not available [CHAR_LIMIT=none]-->
30+ <!-- SafeMode shortcut error string -->
31+ <!-- SafeMode widget error string -->
32+ <!-- Widgets -->
33+ <!-- Message to tell the user to press and hold on a widget to add it [CHAR_LIMIT=50] -->
34+ <!-- The format string for the dimensions of a widget in the drawer -->
35+ <!-- There is a special version of this format string for Farsi -->
36+ <!-- All Apps -->
37+ <!-- Search bar text in the apps view. [CHAR_LIMIT=50] -->
38+ <!-- Loading apps text. [CHAR_LIMIT=50] -->
39+ <!-- No-search-results text. [CHAR_LIMIT=50] -->
40+ <!-- Search market text. This is a format string where the first argument is the name of the activity
41+ handling the search. The format string does not need to handle both of these arguments. [CHAR_LIMIT=50] -->
42+ <!-- Drag and drop -->
43+ <!-- Error message when user has filled a home screen -->
44+ <!-- Error message when user has filled the hotseat -->
45+ <!-- All applications label -->
46+ <!-- Label for button in all applications label to go back home (to the workspace / desktop)
47+ for accessibilty (spoken when the button gets focus). -->
48+ <!-- Label for delete drop target. [CHAR_LIMIT=20] -->
49+ <!-- Label for uninstall drop target. [CHAR_LIMIT=20]-->
50+ <!-- Label for the info icon. [CHAR_LIMIT=20] -->
51+ <!-- Permissions: -->
52+ <!-- Permission short label -->
53+ <!-- Permission description -->
54+ <!-- Permission short label -->
55+ <!-- Permission description -->
56+ <!-- Permission short label -->
57+ <!-- Permission description -->
58+ <!-- Toast shown on clicking a direct call shortcut. [CHAR_LIMIT=80] -->
59+ <!-- Widgets: -->
60+ <!-- Text to show user in place of a gadget when we can't display it properly -->
61+ <!-- Text to show user in place of a gadget when it is not yet initialized. -->
62+ <!-- Text to inform the user that they can't uninstall a system application -->
63+ <!-- Default folder title -->
64+ <!-- Accessibility -->
65+ <!-- The format string for default page scroll text [CHAR_LIMIT=none] -->
66+ <!-- The format string for Workspace page scroll text [CHAR_LIMIT=none] -->
67+ <!-- Clings -->
68+ <!-- The title text for the workspace cling [CHAR_LIMIT=30] -->
69+ <!-- The title text for the migration cling [CHAR_LIMIT=30] -->
70+ <!-- The description of what migration does [CHAR_LIMIT=70] -->
71+ <!-- The description of the button to migrate apps from another launcher [CHAR_LIMIT=30] -->
72+ <!-- The description of the button to use the default launcher layout [CHAR_LIMIT=30] -->
73+ <!-- The title text for workspace longpress action [CHAR_LIMIT=40] -->
74+ <!-- The description of how to use the workspace [CHAR_LIMIT=70] -->
75+ <!-- The description of the button to dismiss the cling [CHAR_LIMIT=30] -->
76+ <!-- Folder accessibility -->
77+ <!-- The format string for when a folder is opened, speaks the dimensions -->
78+ <!-- Instruction that clicking outside will close folder -->
79+ <!-- Instruction that clicking outside will commit folder rename -->
80+ <!-- Indication that folder closed -->
81+ <!-- Folder renamed format -->
82+ <!-- Folder name format -->
83+ <!-- Strings for the customization mode -->
84+ <!-- Text for widget add button -->
85+ <!-- Text for wallpaper change button -->
86+ <!-- Text for settings button -->
87+ <!-- Strings for settings -->
88+ <!-- Title for Allow Rotation setting. [CHAR LIMIT=50] -->
89+ <!-- Label on an icon that references an uninstalled package, for which we have no information about when it might be installed. [CHAR_LIMIT=15] -->
90+ <!-- Button for abandoned promises dialog, to removes this abandoned promise icon. -->
91+ <!-- Button for abandoned promise dialog, to search in the market for the missing package. -->
92+ <!-- Title for abandoned promise dialog. -->
93+ <!-- Explanation for abandoned promise dialog. "The first 'it' refers to the shortcut icon.
94+ The second "it" refers to the app. -->
95+ <!-- Strings for accessibility actions -->
96+ <!-- Accessibility action to add an app to workspace. [CHAR_LIMIT=30] -->
97+ <!-- Accessibility action to move item to the current location. [CHAR_LIMIT=30] -->
98+ <!-- Accessibility confirmation for item added to workspace. -->
99+ <!-- Accessibility confirmation for item removed. -->
100+ <!-- Accessibility action to move an item on the workspace. [CHAR_LIMIT=30] -->
101+ <!-- Accessibility description to move item to empty cell. -->
102+ <!-- Accessibility description to move item inside a folder. -->
103+ <!-- Accessibility description to move item to the hotseat. -->
104+ <!-- Accessibility confirmation for item move. -->
105+ <!-- Accessibility description to move item into an existing folder. -->
106+ <!-- Accessibility description to move item into an existing folder containing an app. -->
107+ <!-- Accessibility confirmation for item added to folder. -->
108+ <!-- Accessibility description to create folder with another item. -->
109+ <!-- Accessibility confirmation for folder created. -->
110+ <!-- Accessibility action to move an item from folder to workspace. [CHAR_LIMIT=30] -->
111+ <!-- Accessibility action to move an homescreen to the left. [CHAR_LIMIT=30] -->
112+ <!-- Accessibility action to move an homescreen to the right. [CHAR_LIMIT=30] -->
113+ <!-- Accessibility confirmation when a screen was moved. -->
114+ <!-- Accessibility action to resize a widget. [CHAR_LIMIT=30] -->
115+ <!-- Accessibility action to increase width of a widget. [CHAR_LIMIT=30] -->
116+ <!-- Accessibility action to increase height of a widget. [CHAR_LIMIT=30] -->
117+ <!-- Accessibility action to decrease width of a widget. [CHAR_LIMIT=30] -->
118+ <!-- Accessibility action to decrease height of a widget. [CHAR_LIMIT=30] -->
119+ <!-- Accessibility confirmation for widget resize. -->
120+</resources>
--- /dev/null
+++ b/res/values-sc-rIT/cm_strings.xml
@@ -0,0 +1,33 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<!--Generated by crowdin.com-->
3+<!--
4+ Copyright (C) 2014 The CyanogenMod Project
5+
6+ Licensed under the Apache License, Version 2.0 (the "License");
7+ you may not use this file except in compliance with the License.
8+ You may obtain a copy of the License at
9+
10+ http://www.apache.org/licenses/LICENSE-2.0
11+
12+ Unless required by applicable law or agreed to in writing, software
13+ distributed under the License is distributed on an "AS IS" BASIS,
14+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+ See the License for the specific language governing permissions and
16+ limitations under the License.
17+-->
18+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
19+ <!-- Application name -->
20+ <!-- Settings states -->
21+ <!-- Folder titles -->
22+ <!-- Wallpaper scroll effect -->
23+ <!-- Dynamic Grid -->
24+ <!-- Dialog -->
25+ <!-- Home screen search bar -->
26+ <!-- Larger icons -->
27+ <!-- Icon labels -->
28+ <!-- Protected apps -->
29+ <!-- Developer settings -->
30+ <!-- Drawer settings -->
31+ <!-- Search Manager doesn't exist -->
32+ <!-- App not available toast text -->
33+</resources>
--- /dev/null
+++ b/res/values-sc-rIT/strings.xml
@@ -0,0 +1,120 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<!--Generated by crowdin.com-->
3+<!--
4+/*
5+* Copyright (C) 2008 The Android Open Source Project
6+*
7+* Licensed under the Apache License, Version 2.0 (the "License");
8+* you may not use this file except in compliance with the License.
9+* You may obtain a copy of the License at
10+*
11+* http://www.apache.org/licenses/LICENSE-2.0
12+*
13+* Unless required by applicable law or agreed to in writing, software
14+* distributed under the License is distributed on an "AS IS" BASIS,
15+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+* See the License for the specific language governing permissions and
17+* limitations under the License.
18+*/
19+-->
20+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
21+ <!-- General -->
22+ <!-- URI used to import old favorites. [DO NOT TRANSLATE] -->
23+ <!-- Permission to receive the com.android.launcher3.action.LAUNCH intent. [DO NOT TRANSLATE] -->
24+ <!-- Permission to receive the com.android.launcher3.action.FIRST_LOAD_COMPLETE intent. [DO NOT TRANSLATE] -->
25+ <!-- Application name -->
26+ <!-- Default folder name -->
27+ <!-- Work folder name -->
28+ <!-- Displayed when user selects a shortcut for an app that was uninstalled [CHAR_LIMIT=none]-->
29+ <!-- Displayed when user selects a shortcut for an app that is current not available [CHAR_LIMIT=none]-->
30+ <!-- SafeMode shortcut error string -->
31+ <!-- SafeMode widget error string -->
32+ <!-- Widgets -->
33+ <!-- Message to tell the user to press and hold on a widget to add it [CHAR_LIMIT=50] -->
34+ <!-- The format string for the dimensions of a widget in the drawer -->
35+ <!-- There is a special version of this format string for Farsi -->
36+ <!-- All Apps -->
37+ <!-- Search bar text in the apps view. [CHAR_LIMIT=50] -->
38+ <!-- Loading apps text. [CHAR_LIMIT=50] -->
39+ <!-- No-search-results text. [CHAR_LIMIT=50] -->
40+ <!-- Search market text. This is a format string where the first argument is the name of the activity
41+ handling the search. The format string does not need to handle both of these arguments. [CHAR_LIMIT=50] -->
42+ <!-- Drag and drop -->
43+ <!-- Error message when user has filled a home screen -->
44+ <!-- Error message when user has filled the hotseat -->
45+ <!-- All applications label -->
46+ <!-- Label for button in all applications label to go back home (to the workspace / desktop)
47+ for accessibilty (spoken when the button gets focus). -->
48+ <!-- Label for delete drop target. [CHAR_LIMIT=20] -->
49+ <!-- Label for uninstall drop target. [CHAR_LIMIT=20]-->
50+ <!-- Label for the info icon. [CHAR_LIMIT=20] -->
51+ <!-- Permissions: -->
52+ <!-- Permission short label -->
53+ <!-- Permission description -->
54+ <!-- Permission short label -->
55+ <!-- Permission description -->
56+ <!-- Permission short label -->
57+ <!-- Permission description -->
58+ <!-- Toast shown on clicking a direct call shortcut. [CHAR_LIMIT=80] -->
59+ <!-- Widgets: -->
60+ <!-- Text to show user in place of a gadget when we can't display it properly -->
61+ <!-- Text to show user in place of a gadget when it is not yet initialized. -->
62+ <!-- Text to inform the user that they can't uninstall a system application -->
63+ <!-- Default folder title -->
64+ <!-- Accessibility -->
65+ <!-- The format string for default page scroll text [CHAR_LIMIT=none] -->
66+ <!-- The format string for Workspace page scroll text [CHAR_LIMIT=none] -->
67+ <!-- Clings -->
68+ <!-- The title text for the workspace cling [CHAR_LIMIT=30] -->
69+ <!-- The title text for the migration cling [CHAR_LIMIT=30] -->
70+ <!-- The description of what migration does [CHAR_LIMIT=70] -->
71+ <!-- The description of the button to migrate apps from another launcher [CHAR_LIMIT=30] -->
72+ <!-- The description of the button to use the default launcher layout [CHAR_LIMIT=30] -->
73+ <!-- The title text for workspace longpress action [CHAR_LIMIT=40] -->
74+ <!-- The description of how to use the workspace [CHAR_LIMIT=70] -->
75+ <!-- The description of the button to dismiss the cling [CHAR_LIMIT=30] -->
76+ <!-- Folder accessibility -->
77+ <!-- The format string for when a folder is opened, speaks the dimensions -->
78+ <!-- Instruction that clicking outside will close folder -->
79+ <!-- Instruction that clicking outside will commit folder rename -->
80+ <!-- Indication that folder closed -->
81+ <!-- Folder renamed format -->
82+ <!-- Folder name format -->
83+ <!-- Strings for the customization mode -->
84+ <!-- Text for widget add button -->
85+ <!-- Text for wallpaper change button -->
86+ <!-- Text for settings button -->
87+ <!-- Strings for settings -->
88+ <!-- Title for Allow Rotation setting. [CHAR LIMIT=50] -->
89+ <!-- Label on an icon that references an uninstalled package, for which we have no information about when it might be installed. [CHAR_LIMIT=15] -->
90+ <!-- Button for abandoned promises dialog, to removes this abandoned promise icon. -->
91+ <!-- Button for abandoned promise dialog, to search in the market for the missing package. -->
92+ <!-- Title for abandoned promise dialog. -->
93+ <!-- Explanation for abandoned promise dialog. "The first 'it' refers to the shortcut icon.
94+ The second "it" refers to the app. -->
95+ <!-- Strings for accessibility actions -->
96+ <!-- Accessibility action to add an app to workspace. [CHAR_LIMIT=30] -->
97+ <!-- Accessibility action to move item to the current location. [CHAR_LIMIT=30] -->
98+ <!-- Accessibility confirmation for item added to workspace. -->
99+ <!-- Accessibility confirmation for item removed. -->
100+ <!-- Accessibility action to move an item on the workspace. [CHAR_LIMIT=30] -->
101+ <!-- Accessibility description to move item to empty cell. -->
102+ <!-- Accessibility description to move item inside a folder. -->
103+ <!-- Accessibility description to move item to the hotseat. -->
104+ <!-- Accessibility confirmation for item move. -->
105+ <!-- Accessibility description to move item into an existing folder. -->
106+ <!-- Accessibility description to move item into an existing folder containing an app. -->
107+ <!-- Accessibility confirmation for item added to folder. -->
108+ <!-- Accessibility description to create folder with another item. -->
109+ <!-- Accessibility confirmation for folder created. -->
110+ <!-- Accessibility action to move an item from folder to workspace. [CHAR_LIMIT=30] -->
111+ <!-- Accessibility action to move an homescreen to the left. [CHAR_LIMIT=30] -->
112+ <!-- Accessibility action to move an homescreen to the right. [CHAR_LIMIT=30] -->
113+ <!-- Accessibility confirmation when a screen was moved. -->
114+ <!-- Accessibility action to resize a widget. [CHAR_LIMIT=30] -->
115+ <!-- Accessibility action to increase width of a widget. [CHAR_LIMIT=30] -->
116+ <!-- Accessibility action to increase height of a widget. [CHAR_LIMIT=30] -->
117+ <!-- Accessibility action to decrease width of a widget. [CHAR_LIMIT=30] -->
118+ <!-- Accessibility action to decrease height of a widget. [CHAR_LIMIT=30] -->
119+ <!-- Accessibility confirmation for widget resize. -->
120+</resources>
--- /dev/null
+++ b/res/values-tl/cm_strings.xml
@@ -0,0 +1,33 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<!--Generated by crowdin.com-->
3+<!--
4+ Copyright (C) 2014 The CyanogenMod Project
5+
6+ Licensed under the Apache License, Version 2.0 (the "License");
7+ you may not use this file except in compliance with the License.
8+ You may obtain a copy of the License at
9+
10+ http://www.apache.org/licenses/LICENSE-2.0
11+
12+ Unless required by applicable law or agreed to in writing, software
13+ distributed under the License is distributed on an "AS IS" BASIS,
14+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+ See the License for the specific language governing permissions and
16+ limitations under the License.
17+-->
18+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
19+ <!-- Application name -->
20+ <!-- Settings states -->
21+ <!-- Folder titles -->
22+ <!-- Wallpaper scroll effect -->
23+ <!-- Dynamic Grid -->
24+ <!-- Dialog -->
25+ <!-- Home screen search bar -->
26+ <!-- Larger icons -->
27+ <!-- Icon labels -->
28+ <!-- Protected apps -->
29+ <!-- Developer settings -->
30+ <!-- Drawer settings -->
31+ <!-- Search Manager doesn't exist -->
32+ <!-- App not available toast text -->
33+</resources>
--- /dev/null
+++ b/res/values-vec-rIT/cm_strings.xml
@@ -0,0 +1,33 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<!--Generated by crowdin.com-->
3+<!--
4+ Copyright (C) 2014 The CyanogenMod Project
5+
6+ Licensed under the Apache License, Version 2.0 (the "License");
7+ you may not use this file except in compliance with the License.
8+ You may obtain a copy of the License at
9+
10+ http://www.apache.org/licenses/LICENSE-2.0
11+
12+ Unless required by applicable law or agreed to in writing, software
13+ distributed under the License is distributed on an "AS IS" BASIS,
14+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+ See the License for the specific language governing permissions and
16+ limitations under the License.
17+-->
18+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
19+ <!-- Application name -->
20+ <!-- Settings states -->
21+ <!-- Folder titles -->
22+ <!-- Wallpaper scroll effect -->
23+ <!-- Dynamic Grid -->
24+ <!-- Dialog -->
25+ <!-- Home screen search bar -->
26+ <!-- Larger icons -->
27+ <!-- Icon labels -->
28+ <!-- Protected apps -->
29+ <!-- Developer settings -->
30+ <!-- Drawer settings -->
31+ <!-- Search Manager doesn't exist -->
32+ <!-- App not available toast text -->
33+</resources>
--- /dev/null
+++ b/res/values-vec-rIT/strings.xml
@@ -0,0 +1,120 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<!--Generated by crowdin.com-->
3+<!--
4+/*
5+* Copyright (C) 2008 The Android Open Source Project
6+*
7+* Licensed under the Apache License, Version 2.0 (the "License");
8+* you may not use this file except in compliance with the License.
9+* You may obtain a copy of the License at
10+*
11+* http://www.apache.org/licenses/LICENSE-2.0
12+*
13+* Unless required by applicable law or agreed to in writing, software
14+* distributed under the License is distributed on an "AS IS" BASIS,
15+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+* See the License for the specific language governing permissions and
17+* limitations under the License.
18+*/
19+-->
20+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
21+ <!-- General -->
22+ <!-- URI used to import old favorites. [DO NOT TRANSLATE] -->
23+ <!-- Permission to receive the com.android.launcher3.action.LAUNCH intent. [DO NOT TRANSLATE] -->
24+ <!-- Permission to receive the com.android.launcher3.action.FIRST_LOAD_COMPLETE intent. [DO NOT TRANSLATE] -->
25+ <!-- Application name -->
26+ <!-- Default folder name -->
27+ <!-- Work folder name -->
28+ <!-- Displayed when user selects a shortcut for an app that was uninstalled [CHAR_LIMIT=none]-->
29+ <!-- Displayed when user selects a shortcut for an app that is current not available [CHAR_LIMIT=none]-->
30+ <!-- SafeMode shortcut error string -->
31+ <!-- SafeMode widget error string -->
32+ <!-- Widgets -->
33+ <!-- Message to tell the user to press and hold on a widget to add it [CHAR_LIMIT=50] -->
34+ <!-- The format string for the dimensions of a widget in the drawer -->
35+ <!-- There is a special version of this format string for Farsi -->
36+ <!-- All Apps -->
37+ <!-- Search bar text in the apps view. [CHAR_LIMIT=50] -->
38+ <!-- Loading apps text. [CHAR_LIMIT=50] -->
39+ <!-- No-search-results text. [CHAR_LIMIT=50] -->
40+ <!-- Search market text. This is a format string where the first argument is the name of the activity
41+ handling the search. The format string does not need to handle both of these arguments. [CHAR_LIMIT=50] -->
42+ <!-- Drag and drop -->
43+ <!-- Error message when user has filled a home screen -->
44+ <!-- Error message when user has filled the hotseat -->
45+ <!-- All applications label -->
46+ <!-- Label for button in all applications label to go back home (to the workspace / desktop)
47+ for accessibilty (spoken when the button gets focus). -->
48+ <!-- Label for delete drop target. [CHAR_LIMIT=20] -->
49+ <!-- Label for uninstall drop target. [CHAR_LIMIT=20]-->
50+ <!-- Label for the info icon. [CHAR_LIMIT=20] -->
51+ <!-- Permissions: -->
52+ <!-- Permission short label -->
53+ <!-- Permission description -->
54+ <!-- Permission short label -->
55+ <!-- Permission description -->
56+ <!-- Permission short label -->
57+ <!-- Permission description -->
58+ <!-- Toast shown on clicking a direct call shortcut. [CHAR_LIMIT=80] -->
59+ <!-- Widgets: -->
60+ <!-- Text to show user in place of a gadget when we can't display it properly -->
61+ <!-- Text to show user in place of a gadget when it is not yet initialized. -->
62+ <!-- Text to inform the user that they can't uninstall a system application -->
63+ <!-- Default folder title -->
64+ <!-- Accessibility -->
65+ <!-- The format string for default page scroll text [CHAR_LIMIT=none] -->
66+ <!-- The format string for Workspace page scroll text [CHAR_LIMIT=none] -->
67+ <!-- Clings -->
68+ <!-- The title text for the workspace cling [CHAR_LIMIT=30] -->
69+ <!-- The title text for the migration cling [CHAR_LIMIT=30] -->
70+ <!-- The description of what migration does [CHAR_LIMIT=70] -->
71+ <!-- The description of the button to migrate apps from another launcher [CHAR_LIMIT=30] -->
72+ <!-- The description of the button to use the default launcher layout [CHAR_LIMIT=30] -->
73+ <!-- The title text for workspace longpress action [CHAR_LIMIT=40] -->
74+ <!-- The description of how to use the workspace [CHAR_LIMIT=70] -->
75+ <!-- The description of the button to dismiss the cling [CHAR_LIMIT=30] -->
76+ <!-- Folder accessibility -->
77+ <!-- The format string for when a folder is opened, speaks the dimensions -->
78+ <!-- Instruction that clicking outside will close folder -->
79+ <!-- Instruction that clicking outside will commit folder rename -->
80+ <!-- Indication that folder closed -->
81+ <!-- Folder renamed format -->
82+ <!-- Folder name format -->
83+ <!-- Strings for the customization mode -->
84+ <!-- Text for widget add button -->
85+ <!-- Text for wallpaper change button -->
86+ <!-- Text for settings button -->
87+ <!-- Strings for settings -->
88+ <!-- Title for Allow Rotation setting. [CHAR LIMIT=50] -->
89+ <!-- Label on an icon that references an uninstalled package, for which we have no information about when it might be installed. [CHAR_LIMIT=15] -->
90+ <!-- Button for abandoned promises dialog, to removes this abandoned promise icon. -->
91+ <!-- Button for abandoned promise dialog, to search in the market for the missing package. -->
92+ <!-- Title for abandoned promise dialog. -->
93+ <!-- Explanation for abandoned promise dialog. "The first 'it' refers to the shortcut icon.
94+ The second "it" refers to the app. -->
95+ <!-- Strings for accessibility actions -->
96+ <!-- Accessibility action to add an app to workspace. [CHAR_LIMIT=30] -->
97+ <!-- Accessibility action to move item to the current location. [CHAR_LIMIT=30] -->
98+ <!-- Accessibility confirmation for item added to workspace. -->
99+ <!-- Accessibility confirmation for item removed. -->
100+ <!-- Accessibility action to move an item on the workspace. [CHAR_LIMIT=30] -->
101+ <!-- Accessibility description to move item to empty cell. -->
102+ <!-- Accessibility description to move item inside a folder. -->
103+ <!-- Accessibility description to move item to the hotseat. -->
104+ <!-- Accessibility confirmation for item move. -->
105+ <!-- Accessibility description to move item into an existing folder. -->
106+ <!-- Accessibility description to move item into an existing folder containing an app. -->
107+ <!-- Accessibility confirmation for item added to folder. -->
108+ <!-- Accessibility description to create folder with another item. -->
109+ <!-- Accessibility confirmation for folder created. -->
110+ <!-- Accessibility action to move an item from folder to workspace. [CHAR_LIMIT=30] -->
111+ <!-- Accessibility action to move an homescreen to the left. [CHAR_LIMIT=30] -->
112+ <!-- Accessibility action to move an homescreen to the right. [CHAR_LIMIT=30] -->
113+ <!-- Accessibility confirmation when a screen was moved. -->
114+ <!-- Accessibility action to resize a widget. [CHAR_LIMIT=30] -->
115+ <!-- Accessibility action to increase width of a widget. [CHAR_LIMIT=30] -->
116+ <!-- Accessibility action to increase height of a widget. [CHAR_LIMIT=30] -->
117+ <!-- Accessibility action to decrease width of a widget. [CHAR_LIMIT=30] -->
118+ <!-- Accessibility action to decrease height of a widget. [CHAR_LIMIT=30] -->
119+ <!-- Accessibility confirmation for widget resize. -->
120+</resources>
--- a/src/com/android/launcher3/compat/AlphabeticIndexCompat.java
+++ b/src/com/android/launcher3/compat/AlphabeticIndexCompat.java
@@ -1,119 +1,29 @@
11 package com.android.launcher3.compat;
22
33 import android.content.Context;
4+import android.icu.text.AlphabeticIndex;
5+
46 import com.android.launcher3.Utilities;
57
6-import java.lang.reflect.Constructor;
7-import java.lang.reflect.Method;
8-import java.text.Normalizer;
98 import java.util.Locale;
109
11-/**
12- * Fallback class to support Alphabetic indexing if not supported by the framework.
13- * TODO(winsonc): disable for non-english locales
14- */
15-class BaseAlphabeticIndex {
16-
17- private static final String BUCKETS = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-";
18- private static final int UNKNOWN_BUCKET_INDEX = BUCKETS.length() - 1;
19-
20- public BaseAlphabeticIndex() {}
21-
22- /**
23- * Sets the max number of the label buckets in this index.
24- */
25- public void setMaxLabelCount(int count) {
26- // Not currently supported
27- }
28-
29- /**
30- * Returns the index of the bucket in which the given string should appear.
31- */
32- protected int getBucketIndex(String s) {
33- if (s.isEmpty()) {
34- return UNKNOWN_BUCKET_INDEX;
35- }
36- String asciiName = Normalizer.normalize(s, Normalizer.Form.NFD)
37- .replaceAll("[^\\p{ASCII}]", "");
38- if (asciiName.isEmpty()) {
39- return UNKNOWN_BUCKET_INDEX;
40- }
41- int index = BUCKETS.indexOf(asciiName.substring(0, 1).toUpperCase());
42- if (index != -1) {
43- return index;
44- }
45- return UNKNOWN_BUCKET_INDEX;
46- }
47-
48- /**
49- * Returns the label for the bucket at the given index (as returned by getBucketIndex).
50- */
51- protected String getBucketLabel(int index) {
52- return BUCKETS.substring(index, index + 1);
53- }
54-}
55-
56-/**
57- * Reflected libcore.icu.AlphabeticIndex implementation, falls back to the base alphabetic index.
58- */
59-public class AlphabeticIndexCompat extends BaseAlphabeticIndex {
10+public class AlphabeticIndexCompat {
6011
6112 private static final String MID_DOT = "\u2219";
6213
63- private Object mAlphabeticIndex;
64- private Method mAddLabelsMethod;
65- private Method mSetMaxLabelCountMethod;
66- private Method mGetBucketIndexMethod;
67- private Method mGetBucketLabelMethod;
68- private boolean mHasValidAlphabeticIndex;
14+ private AlphabeticIndex.ImmutableIndex mAlphabeticIndex;
6915 private String mDefaultMiscLabel;
7016
7117 public AlphabeticIndexCompat(Context context) {
72- super();
73- try {
74- Locale curLocale = context.getResources().getConfiguration().locale;
75- Class clazz = Class.forName("libcore.icu.AlphabeticIndex");
76- Constructor ctor = clazz.getConstructor(Locale.class);
77- mAddLabelsMethod = clazz.getDeclaredMethod("addLabels", Locale.class);
78- mSetMaxLabelCountMethod = clazz.getDeclaredMethod("setMaxLabelCount", int.class);
79- mGetBucketIndexMethod = clazz.getDeclaredMethod("getBucketIndex", String.class);
80- mGetBucketLabelMethod = clazz.getDeclaredMethod("getBucketLabel", int.class);
81- mAlphabeticIndex = ctor.newInstance(curLocale);
82- try {
83- // Ensure we always have some base English locale buckets
84- if (!curLocale.getLanguage().equals(Locale.ENGLISH.getLanguage())) {
85- mAddLabelsMethod.invoke(mAlphabeticIndex, Locale.ENGLISH);
86- }
87- } catch (Exception e) {
88- e.printStackTrace();
89- }
90- if (curLocale.getLanguage().equals(Locale.JAPANESE.getLanguage())) {
91- // Japanese character 他 ("misc")
92- mDefaultMiscLabel = "\u4ed6";
93- // TODO(winsonc, omakoto): We need to handle Japanese sections better, especially the kanji
94- } else {
95- // Dot
96- mDefaultMiscLabel = MID_DOT;
97- }
98- mHasValidAlphabeticIndex = true;
99- } catch (Exception e) {
100- mHasValidAlphabeticIndex = false;
101- }
102- }
103-
104- /**
105- * Sets the max number of the label buckets in this index.
106- * (ICU 51 default is 99)
107- */
108- public void setMaxLabelCount(int count) {
109- if (mHasValidAlphabeticIndex) {
110- try {
111- mSetMaxLabelCountMethod.invoke(mAlphabeticIndex, count);
112- } catch (Exception e) {
113- e.printStackTrace();
114- }
18+ Locale curLocale = context.getResources().getConfiguration().getLocales().get(0);
19+ mAlphabeticIndex = new AlphabeticIndex(curLocale).buildImmutableIndex();
20+ if (curLocale.getLanguage().equals(Locale.JAPANESE.getLanguage())) {
21+ // Japanese character 他 ("misc")
22+ mDefaultMiscLabel = "\u4ed6";
23+ // TODO(winsonc, omakoto): We need to handle Japanese sections better, especially the kanji
11524 } else {
116- super.setMaxLabelCount(count);
25+ // Dot
26+ mDefaultMiscLabel = MID_DOT;
11727 }
11828 }
11929
@@ -122,7 +32,8 @@ public class AlphabeticIndexCompat extends BaseAlphabeticIndex {
12232 */
12333 public String computeSectionName(CharSequence cs) {
12434 String s = Utilities.trim(cs);
125- String sectionName = getBucketLabel(getBucketIndex(s));
35+ int bucketIndex = mAlphabeticIndex.getBucketIndex(s);
36+ String sectionName = mAlphabeticIndex.getBucket(bucketIndex).getLabel();
12637 if (Utilities.trim(sectionName).isEmpty()) {
12738 if (s.length() > 0) {
12839 int c = s.codePointAt(0);
@@ -149,34 +60,4 @@ public class AlphabeticIndexCompat extends BaseAlphabeticIndex {
14960 }
15061 return sectionName;
15162 }
152-
153- /**
154- * Returns the index of the bucket in which {@param s} should appear.
155- * Function is synchronized because underlying routine walks an iterator
156- * whose state is maintained inside the index object.
157- */
158- protected int getBucketIndex(String s) {
159- if (mHasValidAlphabeticIndex) {
160- try {
161- return (Integer) mGetBucketIndexMethod.invoke(mAlphabeticIndex, s);
162- } catch (Exception e) {
163- e.printStackTrace();
164- }
165- }
166- return super.getBucketIndex(s);
167- }
168-
169- /**
170- * Returns the label for the bucket at the given index (as returned by getBucketIndex).
171- */
172- protected String getBucketLabel(int index) {
173- if (mHasValidAlphabeticIndex) {
174- try {
175- return (String) mGetBucketLabelMethod.invoke(mAlphabeticIndex, index);
176- } catch (Exception e) {
177- e.printStackTrace();
178- }
179- }
180- return super.getBucketLabel(index);
181- }
18263 }
Afficher sur ancien navigateur de dépôt.