OSDN Git Service

Fix some build issues on ICS AOSP due to unlocalized strings
authorAdam Shanks <chainsdd@gmail.com>
Tue, 22 Nov 2011 21:20:11 +0000 (21:20 +0000)
committerAdam Shanks <chainsdd@gmail.com>
Tue, 22 Nov 2011 21:20:11 +0000 (21:20 +0000)
res/layout-large-port/activity_home.xml
res/layout-v14/pin_layout.xml
res/layout/activity_pin.xml
res/layout/fragment_app_list.xml
res/layout/more_options.xml
res/layout/pin_layout.xml
res/values/strings.xml
src/com/noshufou/android/su/widget/SlidingPanel.java

index c9f5c80..478c6ab 100644 (file)
@@ -39,7 +39,6 @@
             android:layout_width="match_parent"
             android:layout_height="64dp"
             android:paddingLeft="10dp"
-            android:text=">"
             android:textSize="22sp"
             android:textStyle="bold"
             android:textColor="#bebebe"
index 2e54824..4ac4cc5 100644 (file)
         android:orientation="horizontal">
         <Button android:id="@+id/pin_1"
             style="@style/PinButton"
-            android:text="1" />
+            android:text="@string/one" />
         <Button android:id="@+id/pin_2"
             style="@style/PinButton"
-            android:text="2" />
+            android:text="@string/two" />
         <Button android:id="@+id/pin_3"
             style="@style/PinButton"
-            android:text="3" />
+            android:text="@string/three" />
     </LinearLayout>
     <LinearLayout
         android:layout_width="match_parent"
         android:orientation="horizontal">
         <Button android:id="@+id/pin_4"
             style="@style/PinButton"
-            android:text="4" />
+            android:text="@string/four" />
         <Button android:id="@+id/pin_5"
             style="@style/PinButton"
-            android:text="5" />
+            android:text="@string/five" />
         <Button android:id="@+id/pin_6"
             style="@style/PinButton"
-            android:text="6" />
+            android:text="@string/six" />
     </LinearLayout>
     <LinearLayout
         android:layout_width="match_parent"
         android:orientation="horizontal">
         <Button android:id="@+id/pin_7"
             style="@style/PinButton"
-            android:text="7" />
+            android:text="@string/seven" />
         <Button android:id="@+id/pin_8"
             style="@style/PinButton"
-            android:text="8" />
+            android:text="@string/eight" />
         <Button android:id="@+id/pin_9"
             style="@style/PinButton"
-            android:text="9" />
+            android:text="@string/nine" />
     </LinearLayout>
     <LinearLayout
         android:layout_width="match_parent"
         android:orientation="horizontal">
         <Button android:id="@+id/pin_cancel"
             style="@style/PinButton"
-            android:text="Deny" />
+            android:text="@string/deny" />
         <Button android:id="@+id/pin_0"
             style="@style/PinButton"
-            android:text="0" />
+            android:text="@string/zero" />
         <Button  android:id="@+id/pin_ok"
             style="@style/PinButton"
-            android:text="Allow" />
+            android:text="@string/allow" />
         </LinearLayout>
 </LinearLayout>
index 52162c5..7f0e414 100644 (file)
@@ -27,7 +27,7 @@
         <TextView
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:text="*#*#" />
+            android:text="@string/before_secret_code" />
         <EditText android:id="@+id/secret_code"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
@@ -42,7 +42,7 @@
         <TextView
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:text="#*#*" />
+            android:text="@string/after_secret_code" />
     </LinearLayout>
     <include layout="@layout/pin_layout" />
 </LinearLayout>
index 098088b..5233b6f 100644 (file)
@@ -26,7 +26,7 @@
         <TextView
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:text="Loading..." />
+            android:text="@string/loading" />
         <ProgressBar
             style="@android:style/Widget.ProgressBar.Small"
             android:layout_width="wrap_content"
index bb38fef..992fbf3 100644 (file)
@@ -23,7 +23,7 @@
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:paddingRight="10dp"
-        android:text="Use global settings" />
+        android:text="@string/use_global_settings" />
     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:enabled="false"
-            android:text="Notifications enabled" />
+            android:text="@string/notifications_enabled" />
         <CheckBox android:id="@+id/check_logging"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:enabled="false"
-            android:text="Logging enabled" />
+            android:text="@string/logging_enabled" />
     </LinearLayout>
 </LinearLayout>
\ No newline at end of file
index a303ee1..f5401cc 100644 (file)
         android:orientation="horizontal">
         <Button android:id="@+id/pin_1"
             style="@style/PinButton"
-            android:text="1" />
+            android:text="@string/one" />
         <Button android:id="@+id/pin_2"
             style="@style/PinButton"
-            android:text="2" />
+            android:text="@string/two" />
         <Button android:id="@+id/pin_3"
             style="@style/PinButton"
-            android:text="3" />
+            android:text="@string/three" />
     </LinearLayout>
     <LinearLayout
         android:layout_width="match_parent"
         android:orientation="horizontal">
         <Button android:id="@+id/pin_4"
             style="@style/PinButton"
-            android:text="4" />
+            android:text="@string/four" />
         <Button android:id="@+id/pin_5"
             style="@style/PinButton"
-            android:text="5" />
+            android:text="@string/five" />
         <Button android:id="@+id/pin_6"
             style="@style/PinButton"
-            android:text="6" />
+            android:text="@string/six" />
     </LinearLayout>
     <LinearLayout
         android:layout_width="match_parent"
         android:orientation="horizontal">
         <Button android:id="@+id/pin_7"
             style="@style/PinButton"
-            android:text="7" />
+            android:text="@string/seven" />
         <Button android:id="@+id/pin_8"
             style="@style/PinButton"
-            android:text="8" />
+            android:text="@string/eight" />
         <Button android:id="@+id/pin_9"
             style="@style/PinButton"
-            android:text="9" />
+            android:text="@string/nine" />
     </LinearLayout>
     <LinearLayout
         android:layout_width="match_parent"
         android:orientation="horizontal">
         <Button  android:id="@+id/pin_ok"
             style="@style/PinButton"
-            android:text="Allow" />
+            android:text="@string/allow" />
         <Button android:id="@+id/pin_0"
             style="@style/PinButton"
-            android:text="0" />
+            android:text="@string/zero" />
         <Button android:id="@+id/pin_cancel"
             style="@style/PinButton"
-            android:text="Deny" />
+            android:text="@string/deny" />
     </LinearLayout>
 </LinearLayout>
index 27cf7b8..fa3ee59 100644 (file)
     <string name="detail_command">Command</string>
     <string name="detail_status">Status</string>
 
+    <string name="use_global_settings">Use global settings</string>
+    <string name="notifications_enabled">Notifications enabled</string>
+    <string name="logging_enabled">Logging enabled</string>
+
+    <string name="zero">0</string>
+    <string name="one">1</string>
+    <string name="two">2</string>
+    <string name="three">3</string>
+    <string name="four">4</string>
+    <string name="five">5</string>
+    <string name="six">6</string>
+    <string name="seven">7</string>
+    <string name="eight">8</string>
+    <string name="nine">9</string>
+
     <string name="request_message">%1$s is requesting Superuser access.\n\nWarning: If you did not initiate this action, or if you do not understand this request, it\'s generally a good idea to deny it.</string>
     <string name="request_more_info">Tap for more info</string>
     <string name="request_less_info">Tap for less info</string>
     <string name="malicious_app_uid">shares UID with Superuser</string>
     <string name="malicious_app_respond">requests respond permission</string>
     <string name="malicious_app_write">requests permission to write to permissions provider</string>
-    
+
     <string name="changelog_full_title">Changelog</string>
     <string name="changelog_title">What\'s New</string>
+
+    <!-- Do not translate any strings below, they are here to prevent build errors -->
+    <string name="before_secret_code">*#*#</string>
+    <string name="after_secret_code">#*#*</string>
 </resources>
index 1541bb5..12c0712 100644 (file)
@@ -71,6 +71,7 @@ public class SlidingPanel extends ViewGroup {
     @Override
     protected void onFinishInflate() {
         mButton = findViewById(mButtonId);
+        ((Button)mButton).setText(">");
         if (mButton == null) {
             throw new IllegalArgumentException("The handle attribute must refer to a child");
         }