From 37c6db8ffc24d5017249cc80f45c078050ce2210 Mon Sep 17 00:00:00 2001 From: Eric House Date: Sat, 12 Jul 2014 16:06:18 -0700 Subject: [PATCH] include language in toast confirming addition to wordlist --- xwords4/android/XWords4/res/values/strings.xml | 2 +- xwords4/android/XWords4/res_src/values-ba_CK/strings.xml | 2 +- xwords4/android/XWords4/res_src/values-ca_PS/strings.xml | 2 +- .../XWords4/src/org/eehouse/android/xw4/LookupAlert.java | 5 ++++- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/xwords4/android/XWords4/res/values/strings.xml b/xwords4/android/XWords4/res/values/strings.xml index 9f45ac122..da9937c3e 100644 --- a/xwords4/android/XWords4/res/values/strings.xml +++ b/xwords4/android/XWords4/res/values/strings.xml @@ -2179,7 +2179,7 @@ Are you sure you want to delete the %1$d selected word[s]?\n\n(This action cannot be undone.) %1$d word[s] copied - %1$s added to list + %1$s added to %2$s list Studylist for %1$s Your words for: diff --git a/xwords4/android/XWords4/res_src/values-ba_CK/strings.xml b/xwords4/android/XWords4/res_src/values-ba_CK/strings.xml index e89e37e9c..0eb8670a7 100644 --- a/xwords4/android/XWords4/res_src/values-ba_CK/strings.xml +++ b/xwords4/android/XWords4/res_src/values-ba_CK/strings.xml @@ -1872,7 +1872,7 @@ Era uoy erus uoy tnaw ot eteled eht %1$d detceles ?]s[drow\n\nsIht( noitca tonnac eb enodnu.) %1$d ]s[drow deipoc - %1$s dedda ot tsil + %1$s dedda ot %2$s tsil Tsilyduts rof %1$s Ruoy sdrow rof: Uoy evah ton tey devas yna sdrow diff --git a/xwords4/android/XWords4/res_src/values-ca_PS/strings.xml b/xwords4/android/XWords4/res_src/values-ca_PS/strings.xml index 4e40a04a0..b635725a0 100644 --- a/xwords4/android/XWords4/res_src/values-ca_PS/strings.xml +++ b/xwords4/android/XWords4/res_src/values-ca_PS/strings.xml @@ -1872,7 +1872,7 @@ ARE YOU SURE YOU WANT TO DELETE THE %1$d SELECTED WORD[S]?\n\n(THIS ACTION CANNOT BE UNDONE.) %1$d WORD[S] COPIED - %1$s ADDED TO LIST + %1$s ADDED TO %2$s LIST STUDYLIST FOR %1$s YOUR WORDS FOR: YOU HAVE NOT YET SAVED ANY WORDS diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/LookupAlert.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/LookupAlert.java index 1ffaccf63..30f3260ad 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/LookupAlert.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/LookupAlert.java @@ -74,6 +74,7 @@ public class LookupAlert extends LinearLayout private static final int LIST_LAYOUT = android.R.layout.simple_list_item_1; private static int s_lang = -1; + private static String s_langName; // These two are probably always the same object private Context m_context; @@ -197,7 +198,8 @@ public class LookupAlert extends LinearLayout String word = m_words[m_wordIndex]; DBUtils.addToStudyList( m_context, word, s_lang ); - String msg = LocUtils.getString( m_context, R.string.add_done_fmt, word ); + String msg = LocUtils.getString( m_context, R.string.add_done_fmt, + word, s_langName ); Utils.showToast( m_context, msg ); } } @@ -321,6 +323,7 @@ public class LookupAlert extends LinearLayout s_urlsAdapter = new ArrayAdapter( context, LIST_LAYOUT, s_lookupNames ); s_lang = lang; + s_langName = DictLangCache.getLangNames( context )[lang]; } }