Skip to content

Commit 40ce41c

Browse files
pubiqqleticiarossi
authored andcommitted
[i18n][Catalog] Use regular strings on Menu catalog demo instead of @android:string/* which can have translation issues
Resolves #2685 GIT_ORIGIN_REV_ID=be90b301e016031bc19856aaadfbecc40f2eb551 PiperOrigin-RevId: 447821912
1 parent 5d6678c commit 40ce41c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

catalog/java/io/material/catalog/menu/MenuMainDemoFragment.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ public int getIntrinsicWidth() {
149149
public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) {
150150
TextView contextMenuTextView = (TextView) v;
151151
Context context = getContext();
152-
menu.add(android.R.string.copy)
152+
menu.add(R.string.context_menu_copy)
153153
.setOnMenuItemClickListener(
154154
item -> {
155155
ClipboardManager clipboard =

catalog/java/io/material/catalog/menu/res/values/strings.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@
3434
This TextView opens a context menu when long pressed.
3535
\n\nIt provides actions that affect the selected content or context frame.
3636
</string>
37-
<string name="context_menu_highlight" description="text for a menu option to highlight text [CHAR_LIMIT=20].">Highlight</string>
37+
38+
<string name="context_menu_copy" description="Text for a menu option to copy text [CHAR_LIMIT=20].">Copy</string>
39+
<string name="context_menu_highlight" description="Text for a menu option to highlight text [CHAR_LIMIT=20].">Highlight</string>
3840

3941
<string-array name="cat_list_popup_window_content" translatable="false">
4042
<item>Item 1</item>

0 commit comments

Comments
 (0)