From 3c92b8837aa90b2d7444967fd74835b37ab6a052 Mon Sep 17 00:00:00 2001 From: Eric House Date: Sun, 24 Jan 2016 10:32:07 -0800 Subject: [PATCH 1/2] add changelog mention of weblate additions --- xwords4/android/XWords4/assets/changes.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xwords4/android/XWords4/assets/changes.html b/xwords4/android/XWords4/assets/changes.html index c0129785b..32db08d4e 100644 --- a/xwords4/android/XWords4/assets/changes.html +++ b/xwords4/android/XWords4/assets/changes.html @@ -40,6 +40,9 @@
  • Finish fixing problem with moves being dropped
  • +
  • Add Japanese translation; update Catalan, Dutch, and French + (Thanks to Weblate and the translators!)
  • +
  • Make it easier to "discover" and enable play-via-SMS (GSM phones only)
  • From 813d5c18b34a80f84eae38c59189781f67011607 Mon Sep 17 00:00:00 2001 From: Eric House Date: Mon, 25 Jan 2016 07:29:26 -0800 Subject: [PATCH 2/2] show explanatory text when there are no invitations --- xwords4/android/XWords4/archive/R.java | 1 + .../android/XWords4/res/values/strings.xml | 2 + .../XWords4/res_src/values-ba_CK/strings.xml | 1 + .../XWords4/res_src/values-ca_PS/strings.xml | 1 + .../src/org/eehouse/android/xw4/DBUtils.java | 57 +++++++++++-------- 5 files changed, 37 insertions(+), 25 deletions(-) diff --git a/xwords4/android/XWords4/archive/R.java b/xwords4/android/XWords4/archive/R.java index 82ac5621e..fa974799a 100644 --- a/xwords4/android/XWords4/archive/R.java +++ b/xwords4/android/XWords4/archive/R.java @@ -4497,6 +4497,7 @@ XLATE-ME you get this error message */ public static final int no_games_to_refresh=0x7f050096; + public static final int no_invites=0x7f05033b; /** Google Play app not found */ public static final int no_market=0x7f05027a; diff --git a/xwords4/android/XWords4/res/values/strings.xml b/xwords4/android/XWords4/res/values/strings.xml index 478c62a73..17920b91c 100644 --- a/xwords4/android/XWords4/res/values/strings.xml +++ b/xwords4/android/XWords4/res/values/strings.xml @@ -2652,4 +2652,6 @@ You are using the default player name \"%1$s\". Would you like to personalize with your own name before you create this game? + + This game has sent no invitations 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 f549612ce..d74f30af9 100644 --- a/xwords4/android/XWords4/res_src/values-ba_CK/strings.xml +++ b/xwords4/android/XWords4/res_src/values-ba_CK/strings.xml @@ -2268,4 +2268,5 @@ Uoy era gnisu eht tluafed reyalp eman \"%1$s\". Dluow uoy ekil ot ezilanosrep htiw ruoy nwo eman erofeb uoy etaerc siht ?emag + Siht emag sah tnes on snoitativni 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 5ebced2b3..443c1e6b4 100644 --- a/xwords4/android/XWords4/res_src/values-ca_PS/strings.xml +++ b/xwords4/android/XWords4/res_src/values-ca_PS/strings.xml @@ -2268,4 +2268,5 @@ YOU ARE USING THE DEFAULT PLAYER NAME \"%1$s\". WOULD YOU LIKE TO PERSONALIZE WITH YOUR OWN NAME BEFORE YOU CREATE THIS GAME? + THIS GAME HAS SENT NO INVITATIONS diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/DBUtils.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/DBUtils.java index 616f0151d..00d1ca901 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/DBUtils.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/DBUtils.java @@ -511,37 +511,44 @@ public class DBUtils { public String getAsText( Context context ) { + String result; int count = m_timestamps.size(); - String[] strs = new String[count]; - for ( int ii = 0; ii < count; ++ii ) { - InviteMeans means = m_means.get(ii); - String target = m_targets.get(ii); - String timestamp = m_timestamps.get(ii).toString(); - String msg; + if ( 0 == count ) { + result = LocUtils.getString( context, R.string.no_invites ); + } else { + String[] strs = new String[count]; + for ( int ii = 0; ii < count; ++ii ) { + InviteMeans means = m_means.get(ii); + String target = m_targets.get(ii); + String timestamp = m_timestamps.get(ii).toString(); + String msg; - switch ( means ) { - case SMS: - msg = LocUtils.getString( context, R.string.invit_expl_sms_fmt, - target, timestamp ); - break; - case BLUETOOTH: - String devName = BTService.nameForAddr( target ); - msg = LocUtils.getString( context, R.string.invit_expl_bt_fmt, - devName, timestamp ); - break; - case RELAY: - msg = LocUtils.getString( context, R.string.invit_expl_relay_fmt, - timestamp ); - break; - default: - msg = LocUtils.getString( context, R.string.invit_expl_notarget_fmt, - means.toString(), timestamp ); + switch ( means ) { + case SMS: + msg = LocUtils.getString( context, R.string.invit_expl_sms_fmt, + target, timestamp ); + break; + case BLUETOOTH: + String devName = BTService.nameForAddr( target ); + msg = LocUtils.getString( context, R.string.invit_expl_bt_fmt, + devName, timestamp ); + break; + case RELAY: + msg = LocUtils.getString( context, R.string.invit_expl_relay_fmt, + timestamp ); + break; + default: + msg = LocUtils.getString( context, R.string.invit_expl_notarget_fmt, + means.toString(), timestamp ); + } + strs[ii] = msg; } - strs[ii] = msg; + result = TextUtils.join( "\n\n", strs ); } - return TextUtils.join( "\n\n", strs ); + return result; } + } public static SentInvitesInfo getInvitesFor( Context context, long rowid )