Replace 'ownCloud' with reference to app_name 1.4.6-easy-setup
authorDavid A. Velasco <dvelasco@solidgear.es>
Wed, 23 Oct 2013 10:48:55 +0000 (12:48 +0200)
committerDavid A. Velasco <dvelasco@solidgear.es>
Wed, 23 Oct 2013 10:54:49 +0000 (12:54 +0200)
res/values/strings.xml
src/com/owncloud/android/authentication/AccountAuthenticator.java

index 0f60b9a..8508014 100644 (file)
        <string name="auth_connecting_auth_server">Connecting to authentication server…</string>
        <string name="auth_follow_auth_server">Follow instructions above to get authenticated</string>
        <string name="auth_unsupported_auth_method">The server does not support this authentication method</string>    
-       <string name="auth_unsupported_multiaccount">This version of ownCloud doesn\'t support multiaccount</string>
+       <string name="auth_unsupported_multiaccount">%1$s does not support multiple accounts</string>
     
     <string name="crashlog_message">Application terminated unexpectedly. Would you like to submit a crash report?</string>
     <string name="crashlog_send_report">Send report</string>
index c9da67b..ff72d73 100644 (file)
@@ -142,13 +142,14 @@ public class AccountAuthenticator extends AbstractAccountAuthenticator {
 
             // Return an error
             bundle.putInt(AccountManager.KEY_ERROR_CODE, AccountManager.ERROR_CODE_UNSUPPORTED_OPERATION);
-            bundle.putString(AccountManager.KEY_ERROR_MESSAGE, mContext.getString(R.string.auth_unsupported_multiaccount));
+            final String message = String.format(mContext.getString(R.string.auth_unsupported_multiaccount), mContext.getString(R.string.app_name)); 
+            bundle.putString(AccountManager.KEY_ERROR_MESSAGE, message);
            
             mHandler.post(new Runnable() {
 
                 @Override
                 public void run() {
-                    Toast.makeText(mContext, R.string.auth_unsupported_multiaccount, Toast.LENGTH_SHORT).show();
+                    Toast.makeText(mContext, message, Toast.LENGTH_SHORT).show();
                 }
             });