OSDN Git Service

Remove console selection (Issue #17) - Part III (string messages)
authorjruesga <jorge@ruesga.com>
Fri, 26 Oct 2012 22:51:28 +0000 (00:51 +0200)
committerjruesga <jorge@ruesga.com>
Fri, 26 Oct 2012 22:51:28 +0000 (00:51 +0200)
res/values/strings.xml
src/com/cyanogenmod/filemanager/activities/NavigationActivity.java
src/com/cyanogenmod/filemanager/console/ConsoleBuilder.java

index 86d19c7..c757135 100644 (file)
   <!-- Error message -->
   <string name="error_message">Error.</string>
 
-  <!-- A console couldn't be created. Ask the user to change to advanced console mode -->
-  <string name="msgs_change_to_advanced_console_mode">
-    The application is unable to create a console. The only way to run the app
+  <!--  A console couldn't be created. Ask the user to change the access mode -->
+  <string name="msgs_change_to_prompt_access_mode">
+    The application is unable to gain privileges. The only way to run the app
     is to switch to non-privileged mode.\n\nApply this change?</string>
 
-  <!-- A console couldn't be created. Without a console, the application won't work -->
-  <string name="msgs_cant_create_console">The application is unable to create a console and
-       will not work without a console.</string>
-  <!-- The message shown when a allocation of a privileged console fails, and a non
+  <!-- A console couldn't be created. Without privileges, the application won't work -->
+  <string name="msgs_cant_create_console">The application is unable to gain privileges and
+       will not work without under this conditions.</string>
+  <!-- The message shown when an allocation of a privileged console fails, and a non
        privileged is allocated -->
-  <string name="msgs_privileged_console_alloc_failed">A privileged console could not be allocated.
+  <string name="msgs_privileged_console_alloc_failed">The application is unable to gain privileges.
     \nChanging to non-privileged mode.</string>
   <!-- Changing to other type of console failed -->
-  <string name="msgs_console_change_failed">Changing to the new type of console failed.</string>
+  <string name="msgs_console_change_failed">Changing to the new type of access mode failed.</string>
   <!-- The selected setting was not applied or stored -->
   <string name="msgs_settings_save_failure">The setting could not be applied or stored.</string>
   <!-- The initial directory has an invalid or inaccessible reference -->
   <string name="msgs_operation_timeout">The operation timed out.</string>
   <!-- The operation returns an invalid exit code -->
   <string name="msgs_operation_failure">The operation failed.</string>
-  <!-- A console couldn\'t be allocated -->
-  <string name="msgs_console_alloc_failure">A console could not be allocated.</string>
+  <!-- A console couldn't be allocated -->
+  <string name="msgs_console_alloc_failure">An internal error occurred.</string>
   <!-- An operation can't be cancelled -->
   <string name="msgs_operation_can_not_be_cancelled">The operation cannot be cancelled.</string>
   <!-- The operation requieres mount the file system prior to execute the command -->
     <item quantity="other"><xliff:g id="files">%1$d</xliff:g> files</item>
   </plurals>
 
-  <!-- Consoles * Choose console dialog title -->
-  <string name="choose_console_dialog_title">Choose console</string>
-
   <!-- History * History activity title -->
   <string name="history">History</string>
   <!-- History * The history is empty -->
index b275152..20947f6 100644 (file)
@@ -195,7 +195,7 @@ public class NavigationActivity extends Activity
                             return;
                         }
 
-                        // Advanced mode
+                        // Access mode
                         if (key.compareTo(FileManagerSettings.
                                 SETTINGS_ACCESS_MODE.getId()) == 0) {
                             // Is it necessary to create or exit of the ChRooted?
@@ -515,7 +515,7 @@ public class NavigationActivity extends Activity
                     }
 
                     // We are in a trouble (something is not allowing creating the console)
-                    // Ask the user to return to advanced console mode with a
+                    // Ask the user to return to prompt or root access mode mode with a
                     // non-privileged console, prior to make crash the application
                     askOrExit();
                     return;
@@ -1315,14 +1315,14 @@ public class NavigationActivity extends Activity
     }
 
     /**
-     * Method that ask the user to change to to advanced console
+     * Method that ask the user to change the access mode prior to crash.
      * @hide
      */
     void askOrExit() {
         //Show a dialog asking the user
         AlertDialog dialog =
             DialogHelper.createYesNoDialog(
-                this, R.string.msgs_change_to_advanced_console_mode,
+                this, R.string.msgs_change_to_prompt_access_mode,
                 new DialogInterface.OnClickListener() {
                     @Override
                     public void onClick(DialogInterface alertDialog, int which) {
index 7ebbd82..34ff8c4 100644 (file)
@@ -213,8 +213,8 @@ public final class ConsoleBuilder {
      * console is allocated or if the settings preferences has changed.
      *
      * @param context The current context
-     * @param superuserMode If create with a superuser mode console
-     * @param advancedMode If create with a advanced mode console
+     * @param superuserMode If create with a superuser mode console (root access mode)
+     * @param advancedMode If create with a advanced mode console (prompt or root access mode)
      * @return Console An allocated console
      * @throws FileNotFoundException If the initial directory not exists
      * @throws IOException If initial directory couldn't be checked