Ver código fonte

fixed the concatenation of strings in home fragment

Daniel Lazar 10 anos atrás
pai
commit
cf727cdd99

+ 4 - 4
res/values-de/strings.xml

@@ -11,12 +11,12 @@
     <string name="paranoid">Paranoid Mode</string>
     <string name="details">Verbindungs info</string>
     <string name="not_connected">Nicht verbunden</string>
-    <string name="attack"> Angriff</string>
-    <string name="attacks"> Angriffe</string>
+    <string name="attack">&#160;Angriff</string>
+    <string name="attacks">&#160;Angriffe</string>
     <string name="secure">Sicher</string>
     <string name="insecure">Unsicher</string>
-    <string name="logged"> logged</string>
-    <string name="recorded"> aufgezeichnet</string>
+    <string name="logged">&#160;gelogged</string>
+    <string name="recorded">&#160;aufgezeichnet</string>
     <string name="zero_attacks">0 Angriffe aufgezeichnet</string>
 
     <string name="information">Information</string>

+ 4 - 4
res/values/strings.xml

@@ -11,12 +11,12 @@
     <string name="paranoid">Paranoid Mode</string>
     <string name="details">Connection info</string>
     <string name="not_connected">Not connected</string>
-    <string name="attack"> attack</string>
-    <string name="attacks"> attacks</string>
+    <string name="attack">&#160;attack</string>
+    <string name="attacks">&#160;attacks</string>
     <string name="secure">Secure</string>
     <string name="insecure">Insecure</string>
-    <string name="logged"> logged</string>
-    <string name="recorded"> recorded</string>
+    <string name="logged">&#160;logged</string>
+    <string name="recorded">&#160;recorded</string>
     <string name="zero_attacks">0 attacks recorded</string>
 
     <string name="information">Information</string>

+ 2 - 2
src/de/tudarmstadt/informatik/hostage/ui2/fragment/HomeFragment.java

@@ -192,13 +192,13 @@ public class HomeFragment extends Fragment {
 					mHomeTextSecurity.setTextColor(getResources().getColor(R.color.holo_dark_green));
 					break;
 				case PAST_THREAT:
-					mHomeTextAttacks.setText(totalAttacks + (totalAttacks == 1 ? R.string.attack : R.string.attacks) +  R.string.logged);
+					mHomeTextAttacks.setText(totalAttacks + (totalAttacks == 1 ? getResources().getString(R.string.attack) : getResources().getString(R.string.attacks)) + getResources().getString(R.string.logged));
 					mHomeTextSecurity.setText(R.string.insecure);
 					mHomeTextAttacks.setTextColor(getResources().getColor(R.color.holo_yellow));
 					mHomeTextSecurity.setTextColor(getResources().getColor(R.color.holo_yellow));
 					break;
 				case LIVE_THREAT:
-					mHomeTextAttacks.setText(totalAttacks + (totalAttacks == 1 ? R.string.attack : R.string.attacks) +  R.string.recorded);
+					mHomeTextAttacks.setText(totalAttacks + (totalAttacks == 1 ? getResources().getString(R.string.attack) : getResources().getString(R.string.attacks)) +  getResources().getString(R.string.recorded));
 					mHomeTextSecurity.setText(R.string.insecure);
 					mHomeTextAttacks.setTextColor(getResources().getColor(R.color.holo_red));
 					mHomeTextSecurity.setTextColor(getResources().getColor(R.color.holo_red));