Browse Source

started extracting strings and translating app to german

Daniel Lazar 10 years ago
parent
commit
362144b190

+ 3 - 3
res/layout/fragment_home.xml

@@ -35,7 +35,7 @@
             android:layout_gravity="center_horizontal"
             android:layout_marginLeft="15dp"
             android:layout_weight="1"
-            android:text="Monitor current connection"
+            android:text="@string/monitor_current_connection"
             android:textStyle="bold" />
 
         <Switch
@@ -103,7 +103,7 @@
             android:layout_height="wrap_content"
             android:layout_gravity="center_horizontal"
             android:layout_marginTop="10dp"
-            android:text="Insecure"
+            android:text="@string/insecure"
             android:textAppearance="@android:style/TextAppearance.Holo.Small"
             android:textColor="@color/holo_red"
             android:textSize="13sp" />
@@ -128,7 +128,7 @@
                 android:layout_height="wrap_content"
                 android:layout_alignParentTop="true"
                 android:layout_centerHorizontal="true"
-                android:text="Active profile: "
+                android:text="@string/active_profile"
                 android:textSize="11sp"
                 android:textStyle="bold"
                 android:layout_marginTop="15dp"/>

+ 2 - 2
res/layout/fragment_services.xml

@@ -18,7 +18,7 @@
                 android:layout_marginLeft="15dp"
                 android:layout_marginTop="20dp"
                 android:layout_weight="1"
-                android:text="Current connection"
+                android:text="@string/current_connection"
                 android:textSize="18dp"
                 android:textStyle="bold" />
 
@@ -75,7 +75,7 @@
                 android:layout_marginLeft="15dp"
                 android:layout_marginTop="35dp"
                 android:layout_weight="1"
-                android:text="Monitor services"
+                android:text="@string/monitor_services"
                 android:textStyle="bold"
                 android:textSize="20dp"/>
 

+ 1 - 1
res/layout/services_list_item.xml

@@ -38,7 +38,7 @@
                 android:layout_marginLeft="50dp"
                 android:layout_marginTop="25dp"
                 android:layout_weight="1"
-                android:text="recorded attacks: "
+                android:text="@string/recorded_attacks"
                 android:textStyle="bold"
                 android:textSize="12dp"/>
         <TextView

+ 81 - 0
res/values-de/strings.xml

@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+
+    <string name="app_name">HosTaGe</string>
+    <string name="action_settings">Einstellungen</string>
+    <string name="action_about">Über</string>
+    <string name="capital_on">AUS</string>
+    <string name="capital_off">AN</string>
+    <string name="title_connection_info">Verbindungs Info</string>
+    <string name="status">Status</string>
+    <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="secure">Sicher</string>
+    <string name="insecure">Unsicher</string>
+    <string name="logged"> logged</string>
+    <string name="recorded"> aufgezeichnet</string>
+    <string name="zero_attacks">0 Angriffe aufgezeichnet</string>
+
+    <string name="information">Information</string>
+    <string name="wifi_not_connected_msg">Sie sind nicht mit einem WLAN Netzwerk verbunden. \n\nBitte verbinden sie sich mit einem, bevor sie HosTaGe starten.</string>
+
+    <string name="monitor_current_connection">Überwache aktuelle Verbindung</string>
+    <string name="active_profile">Aktives Profil: </string>
+
+    <string name="ssid">SSID:</string>
+    <string name="bssid">BSSID:</string>
+    <string name="protocol">Protokol:</string>
+    <string name="timestamp">Zeitstempel:</string>
+    <string name="location">Ort:</string>
+    <string name="internal_ip">Interne IP:</string>
+    <string name="external_ip">Externe IP:</string>
+    <string name="remote_ip">Remote IP:</string>
+    <string name="packet_type">Packet Typ:</string>
+    <string name="packet_content">Packet Inhalt:</string>
+
+    <string name="services">Dienste</string>
+    <string name="connections">Aufgezeichnete Verbindungen:</string>
+    <string name="statistics">Statistiken</string>
+    <string name="database">Datenbank</string>
+    <string name="log_actions">Aktionen</string>
+    <string name="firstAttack">Erster Angriff:</string>
+    <string name="lastAttack">Letzter Angriff:</string>
+    <string name="clear">Clear</string>
+    <string name="delete">Löschen</string>
+    <string name="cancel">Abbrechen</string>
+    <string name="close">Schließen</string>
+    <string name="show_records">Zeige Aufzeichnungen</string>
+    <string name="dialog_clear_database">Clear all data?</string>
+    <string name="export_dialog_title">Choose Export Format</string>
+    <string name="delete_dialog_title">Delete data sets by:</string>
+    <string name="dialog_clear_database_date">Delete all data before:</string>
+
+    <string name="RecordBSSID">BSSID</string>
+    <string name="RecordSSID">SSID</string>
+    <string name="RecordTimestamp">Zeitstempel</string>
+    <string name="RecordProtocol">Protokol</string>
+
+    <string name="drawer_open">Öffne Navigation</string>
+    <string name="drawer_close">Schließe Navigation</string>
+
+    <string name="drawer_overview">Übersicht</string>
+    <string name="drawer_threat_map">Threat Map</string>
+    <string name="drawer_records">Aufzeichnungen</string>
+    <string name="drawer_services">Dienste</string>
+    <string name="drawer_settings">Einstellungen</string>
+    <string name="drawer_profile_manager">Profil Manager</string>
+    <string name="drawer_app_info">Über diese App</string>
+    <string name="drawer_statistics">Statistiken</string>
+
+    <string name="button_title_apply">Anwenden</string>
+    <string name="button_title_cancel">Abbrechen</string>
+    <string name="shared_preference_path">de.tudarmstadt.informatik.hostage.preferences</string>
+    <string name="UUID">9fc4f490-659e-11e3-949a-0800200c9a66</string>
+
+    <string name="recorded_attacks">Angriffe: </string>
+    <string name="current_connection">aktuelle Verbindung</string>
+    <string name="monitor_services">Überwache Dienste</string>
+</resources>

+ 18 - 0
res/values/strings.xml

@@ -10,6 +10,20 @@
     <string name="status">Status</string>
     <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="secure">Secure</string>
+    <string name="insecure">Insecure</string>
+    <string name="logged"> logged</string>
+    <string name="recorded"> recorded</string>
+    <string name="zero_attacks">0 attacks recorded</string>
+
+    <string name="information">Information</string>
+    <string name="wifi_not_connected_msg">You are not connected to a WiFi network. \n\nPlease connect to one, before trying to activate HosTaGe.</string>
+
+    <string name="monitor_current_connection">Monitor current connection</string>
+    <string name="active_profile">Active profile: </string>
 
     <string name="ssid">SSID:</string>
     <string name="bssid">BSSID:</string>
@@ -60,4 +74,8 @@
     <string name="button_title_cancel">Cancel</string>
     <string name="shared_preference_path">de.tudarmstadt.informatik.hostage.preferences</string>
     <string name="UUID">9fc4f490-659e-11e3-949a-0800200c9a66</string>
+
+    <string name="recorded_attacks">recorded attacks: </string>
+    <string name="current_connection">Current connection</string>
+    <string name="monitor_services">Monitor services</string>
 </resources>

+ 2 - 2
src/de/tudarmstadt/informatik/hostage/ui2/adapter/ServicesListAdapter.java

@@ -90,8 +90,8 @@ public class ServicesListAdapter extends ArrayAdapter<ServicesListItem> {
 							ServicesListItem item = (ServicesListItem) buttonView.getTag();
 				if(!HelperUtils.isWifiConnected(mActivity)){
 					new AlertDialog.Builder(mActivity)
-							.setTitle("Information")
-							.setMessage("You are not connected to a WiFi network. \n\nPlease connect to one, before trying to activate HosTaGe.")
+							.setTitle(R.string.information)
+							.setMessage(R.string.wifi_not_connected_msg)
 							.setPositiveButton(android.R.string.ok,
 									new DialogInterface.OnClickListener() {
 										public void onClick(DialogInterface dialog, int which) {

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

@@ -129,7 +129,7 @@ public class HomeFragment extends Fragment {
 		mHomeProfileImage.setVisibility(View.INVISIBLE);
 		mHomeConnectionInfoButton.setVisibility(View.INVISIBLE);
 
-		mHomeTextName.setText("Not connected");
+		mHomeTextName.setText(R.string.not_connected);
 	}
 
 	public void setStateConnected(){
@@ -186,20 +186,20 @@ public class HomeFragment extends Fragment {
 
 			switch(THREAT_LEVEL){
 				case NO_THREAT:
-					mHomeTextAttacks.setText("0 attacks recorded");
-					mHomeTextSecurity.setText("Secure");
+					mHomeTextAttacks.setText(R.string.zero_attacks);
+					mHomeTextSecurity.setText(R.string.secure);
 					mHomeTextAttacks.setTextColor(getResources().getColor(R.color.holo_dark_green));
 					mHomeTextSecurity.setTextColor(getResources().getColor(R.color.holo_dark_green));
 					break;
 				case PAST_THREAT:
-					mHomeTextAttacks.setText(totalAttacks + (totalAttacks == 1 ? " attack" : " attacks") +  " logged");
-					mHomeTextSecurity.setText("Insecure");
+					mHomeTextAttacks.setText(totalAttacks + (totalAttacks == 1 ? R.string.attack : R.string.attacks) +  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 ? " attack" : " attacks") +  " recorded");
-					mHomeTextSecurity.setText("Insecure");
+					mHomeTextAttacks.setText(totalAttacks + (totalAttacks == 1 ? R.string.attack : R.string.attacks) +  R.string.recorded);
+					mHomeTextSecurity.setText(R.string.insecure);
 					mHomeTextAttacks.setTextColor(getResources().getColor(R.color.holo_red));
 					mHomeTextSecurity.setTextColor(getResources().getColor(R.color.holo_red));
 					break;
@@ -268,8 +268,8 @@ public class HomeFragment extends Fragment {
 			    public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
 				    if(!HelperUtils.isWifiConnected(getActivity())){
 					    new AlertDialog.Builder(getActivity())
-							    .setTitle("Information")
-							    .setMessage("You are not connected to a WiFi network. \n\nPlease connect to one, before trying to activate HosTaGe.")
+							    .setTitle(R.string.information)
+							    .setMessage(R.string.wifi_not_connected_msg)
 							    .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
 								    public void onClick(DialogInterface dialog, int which) {
 

+ 3 - 3
src/de/tudarmstadt/informatik/hostage/ui2/fragment/ServicesFragment.java

@@ -142,8 +142,8 @@ public class ServicesFragment extends Fragment{
 				public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
 					if(!HelperUtils.isWifiConnected(getActivity())){
 						new AlertDialog.Builder(getActivity())
-								.setTitle("Information")
-								.setMessage("You are not connected to a WiFi network. \n\nPlease connect to one, before trying to activate HosTaGe.")
+								.setTitle(R.string.information)
+								.setMessage(R.string.wifi_not_connected_msg)
 								.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
 									public void onClick(DialogInterface dialog, int which) {
 
@@ -204,7 +204,7 @@ public class ServicesFragment extends Fragment{
 	}
 
 	private void setStateNotConnected() {
-		mServicesTextName.setText("Not connected");
+		mServicesTextName.setText(R.string.not_connected);
 	}
 
 	private void setStateNotActive() {