Replace 'ownCloud' with reference to app_name
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:48:55 +0000 (12:48 +0200)
res/values/strings.xml
src/com/owncloud/android/authentication/AccountAuthenticator.java

index de97409..7259b1e 100644 (file)
     <string name="auth_timeout_title">The server took too long to respond</string>
     <string name="auth_incorrect_address_title">Malformed URL</string>
     <string name="auth_ssl_general_error_title">SSL initialization failed</string>
-    <string name="auth_ssl_unverified_server_title">Couldn't verify SSL server\'s identity</string>
+    <string name="auth_ssl_unverified_server_title">Couldn\'t verify SSL server\'s identity</string>
     <string name="auth_bad_oc_version_title">Unrecognized server version</string>
     <string name="auth_wrong_connection_title">Couldn\'t establish connection</string>
     <string name="auth_secure_connection">Secure connection established</string>
     <string name="auth_expired_saml_sso_token_toast">Your session expired. Please connect again</string>
        <string name="auth_connecting_auth_server">Connecting to authentication server…</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="fd_keep_in_sync">Keep file up to date</string>
     <string name="common_rename">Rename</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();
                 }
             });