some more bugfixes, cleanup and translation

This commit is contained in:
JG-Cody 2021-07-10 17:04:00 +02:00
parent ca19e0fc09
commit 102dd23aae
12 changed files with 64 additions and 125 deletions

View File

@ -42,7 +42,6 @@ import androidx.appcompat.widget.Toolbar;
import androidx.core.view.GravityCompat;
import androidx.drawerlayout.widget.DrawerLayout;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentTransaction;
import androidx.navigation.NavController;
import androidx.navigation.Navigation;
import androidx.navigation.fragment.NavHostFragment;
@ -65,7 +64,6 @@ import java.util.Map;
import java.util.Objects;
import java.util.Set;
import de.jg_cody.Teraplex.ui.Credits.CreditsFragment;
import de.jg_cody.Teraplex.ui.Einstellungen.EinstellungenFragment;
import de.jg_cody.Teraplex.ui.Flur.FlurFragment;
import de.jg_cody.Teraplex.ui.rooms.ListAdapter;
@ -380,20 +378,16 @@ public class MainActivity extends AppCompatActivity {
public void menurighttopeinstellungen(MenuItem i) {
EinstellungenFragment pef = new EinstellungenFragment();
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
transaction.replace(R.id.nav_host_fragment, pef).setPrimaryNavigationFragment(pef);
transaction.addToBackStack(null);
transaction.commit();
Fragment currentFragment = getSupportFragmentManager().findFragmentById(R.id.nav_host_fragment);
NavHostFragment nhf = (NavHostFragment) currentFragment;
nhf.getChildFragmentManager().beginTransaction().replace(R.id.nav_host_fragment, new EinstellungenFragment()).commit();
Objects.requireNonNull(getSupportActionBar()).setTitle(R.string.menu_settings);
}
public void menurighttopcredits(MenuItem i) {
CreditsFragment pef = new CreditsFragment();
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
transaction.replace(R.id.nav_host_fragment, pef).setPrimaryNavigationFragment(pef);
transaction.addToBackStack(null);
transaction.commit();
public void menurighttopabout(MenuItem i) {
Fragment currentFragment = getSupportFragmentManager().findFragmentById(R.id.nav_host_fragment);
NavHostFragment nhf = (NavHostFragment) currentFragment;
nhf.getChildFragmentManager().beginTransaction().replace(R.id.nav_host_fragment, new EinstellungenFragment()).commit();
Objects.requireNonNull(getSupportActionBar()).setTitle(R.string.menu_about);
}
@ -402,7 +396,7 @@ public class MainActivity extends AppCompatActivity {
startActivity(in);
}
public void menurighttopschliessen(MenuItem i) {
public void menurighttopcloseapp(MenuItem i) {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
finishAffinity();
} else {

View File

@ -56,7 +56,7 @@
android:layout_marginEnd="10dp"
android:layout_marginRight="10dp"
android:gravity="center_horizontal|left"
android:text="@string/hintergrund"
android:text="@string/background"
android:textAlignment="center"
android:textColor="@color/mtrl_btn_text_color_selector"
android:textSize="18sp"
@ -93,7 +93,7 @@
android:layout_marginEnd="10dp"
android:layout_marginRight="10dp"
android:gravity="center_horizontal|left"
android:text="@string/sprache"
android:text="@string/language"
android:textAlignment="center"
android:textColor="@color/mtrl_btn_text_color_selector"
android:textSize="18sp"
@ -111,7 +111,7 @@
android:layout_marginEnd="10dp"
android:layout_marginRight="10dp"
android:gravity="center_horizontal|left"
android:text="@string/einstellungen_zurücksetzen"
android:text="@string/reset_settings"
android:textAlignment="center"
android:textColor="@color/mtrl_btn_text_color_selector"
android:textSize="18sp"
@ -128,7 +128,7 @@
android:layout_marginEnd="50dp"
android:layout_marginRight="50dp"
android:background="@drawable/button_round"
android:text="@string/button_zurücksetzen"
android:text="@string/button_reset"
app:backgroundTint="@null"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/divider3" />
@ -210,7 +210,7 @@
android:layout_marginEnd="50dp"
android:layout_marginRight="50dp"
android:background="@drawable/button_round"
android:text="@string/sprache"
android:text="@string/language"
app:backgroundTint="@null"
app:layout_constraintBottom_toTopOf="@+id/divider3"
app:layout_constraintEnd_toEndOf="parent"
@ -224,7 +224,7 @@
android:layout_marginEnd="50dp"
android:layout_marginRight="50dp"
android:background="@drawable/button_round"
android:text="@string/button_hintergrund_wählen"
android:text="@string/button_choose_background"
app:backgroundTint="@null"
app:layout_constraintBottom_toTopOf="@+id/divider"
app:layout_constraintEnd_toEndOf="parent"

View File

@ -91,7 +91,7 @@
android:layout_marginTop="25dp"
android:backgroundTint="@color/mtrl_btn_text_color_selector"
android:ems="10"
android:hint="@string/login_ipadresse"
android:hint="@string/login_ipaddress"
android:inputType="text"
android:textColor="@color/mtrl_btn_text_color_selector"
android:textColorHint="@color/mtrl_btn_text_color_selector"
@ -106,7 +106,7 @@
android:layout_height="wrap_content"
android:backgroundTint="@color/mtrl_btn_text_color_selector"
android:ems="10"
android:hint="@string/login_benutzername"
android:hint="@string/login_username"
android:inputType="textEmailAddress"
android:singleLine="false"
android:textColor="@color/mtrl_btn_text_color_selector"
@ -122,7 +122,7 @@
android:layout_height="wrap_content"
android:backgroundTint="@color/mtrl_btn_text_color_selector"
android:ems="10"
android:hint="@string/login_passwort"
android:hint="@string/login_password"
android:inputType="textPassword"
android:textColor="@color/mtrl_btn_text_color_selector"
android:textColorHint="@color/mtrl_btn_text_color_selector"
@ -169,7 +169,7 @@
android:drawableRight="@drawable/signal_wifi_off_24px"
android:drawableTint="@color/mtrl_btn_text_color_selector"
android:hapticFeedbackEnabled="true"
android:text="@string/aus"
android:text="@string/off"
app:backgroundTint="@null"
app:layout_constraintBottom_toBottomOf="@+id/textView5"
app:layout_constraintStart_toEndOf="@+id/textView5"
@ -185,7 +185,7 @@
android:drawableRight="@drawable/kodi_aus_1_"
android:drawableTint="@color/mtrl_btn_text_color_selector"
android:hapticFeedbackEnabled="true"
android:text="@string/aus"
android:text="@string/off"
app:backgroundTint="@null"
app:layout_constraintBottom_toBottomOf="@+id/textView7"
app:layout_constraintStart_toEndOf="@+id/textView7"
@ -201,7 +201,7 @@
android:drawableLeft="@drawable/signal_wifi_statusbar_4_bar_24px"
android:drawableTint="@color/mtrl_btn_text_color_selector"
android:hapticFeedbackEnabled="true"
android:text="@string/an"
android:text="@string/on"
app:backgroundTint="@null"
app:layout_constraintBottom_toBottomOf="@+id/textView5"
app:layout_constraintEnd_toStartOf="@+id/textView5"
@ -217,7 +217,7 @@
android:drawableLeft="@drawable/kodi"
android:drawableTint="@color/mtrl_btn_text_color_selector"
android:hapticFeedbackEnabled="true"
android:text="@string/an"
android:text="@string/on"
app:backgroundTint="@null"
app:layout_constraintBottom_toBottomOf="@+id/textView7"
app:layout_constraintEnd_toStartOf="@+id/textView7"

View File

@ -89,7 +89,7 @@
android:layout_width="253dp"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text="@string/konsole"
android:text="@string/console"
android:textAlignment="center"
android:textColor="@color/mtrl_btn_text_color_selector"
android:textSize="20sp"
@ -103,7 +103,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="25dp"
android:gravity="center_horizontal"
android:text="@string/serverbefehle"
android:text="@string/servercommands"
android:textAlignment="center"
android:textColor="@color/mtrl_btn_text_color_selector"
android:textSize="20sp"

View File

@ -46,7 +46,7 @@
android:layout_marginLeft="10dp"
android:background="@drawable/button_right"
android:hapticFeedbackEnabled="true"
android:text="@string/aus"
android:text="@string/off"
app:backgroundTint="@null"
app:layout_constraintBottom_toBottomOf="@+id/textView2"
app:layout_constraintStart_toEndOf="@+id/textView2"
@ -60,7 +60,7 @@
android:layout_marginRight="10dp"
android:background="@drawable/button_left"
android:hapticFeedbackEnabled="true"
android:text="@string/an"
android:text="@string/on"
app:backgroundTint="@null"
app:layout_constraintBottom_toBottomOf="@+id/textView2"
app:layout_constraintEnd_toStartOf="@+id/textView2"
@ -74,7 +74,7 @@
android:layout_marginLeft="10dp"
android:background="@drawable/button_right"
android:hapticFeedbackEnabled="true"
android:text="@string/aus"
android:text="@string/off"
app:backgroundTint="@null"
app:layout_constraintBottom_toBottomOf="@+id/textView3"
app:layout_constraintStart_toEndOf="@+id/textView3"
@ -88,7 +88,7 @@
android:layout_marginRight="10dp"
android:background="@drawable/button_left"
android:hapticFeedbackEnabled="true"
android:text="@string/an"
android:text="@string/on"
app:backgroundTint="@null"
app:layout_constraintBottom_toBottomOf="@+id/textView3"
app:layout_constraintEnd_toStartOf="@+id/textView3"
@ -102,7 +102,7 @@
android:layout_marginRight="10dp"
android:background="@drawable/button_left"
android:hapticFeedbackEnabled="true"
android:text="@string/an"
android:text="@string/on"
app:backgroundTint="@null"
app:layout_constraintBottom_toBottomOf="@+id/textView5"
app:layout_constraintEnd_toStartOf="@+id/textView5"
@ -164,7 +164,7 @@
android:layout_marginLeft="10dp"
android:background="@drawable/button_right"
android:hapticFeedbackEnabled="true"
android:text="@string/aus"
android:text="@string/off"
app:backgroundTint="@null"
app:layout_constraintBottom_toBottomOf="@+id/textView5"
app:layout_constraintStart_toEndOf="@+id/textView5"

View File

@ -58,7 +58,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="25dp"
android:gravity="center_horizontal"
android:text="@string/befehl"
android:text="@string/command"
android:textAlignment="center"
android:textColor="@color/mtrl_btn_text_color_selector"
android:textSize="20sp"
@ -73,7 +73,7 @@
android:layout_width="253dp"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text="@string/zeitgesteuerte_kommandos"
android:text="@string/timed_commands"
android:textAlignment="center"
android:textColor="@color/mtrl_btn_text_color_selector"
android:textSize="20sp"

View File

@ -17,10 +17,10 @@
android:id="@+id/imageView"
android:layout_width="wrap_content"
android:layout_height="80dp"
android:contentDescription="@string/nav_header_desc"
android:paddingTop="@dimen/nav_header_vertical_spacing"
android:src="@drawable/teraplex_logo"
app:tint="@color/mtrl_btn_text_color_selector"/>
app:tint="@color/mtrl_btn_text_color_selector"
android:contentDescription="TODO" />
<TextView
android:layout_width="match_parent"

View File

@ -19,14 +19,14 @@
app:showAsAction="never" />
<item
android:id="@+id/über"
android:onClick="menurighttopcredits"
android:onClick="menurighttopabout"
android:orderInCategory="100"
android:title="@string/menu_about"
app:showAsAction="never" />
<item
android:id="@+id/exit"
android:icon="@drawable/logout_24px"
android:onClick="menurighttopschliessen"
android:onClick="menurighttopcloseapp"
android:orderInCategory="100"
android:title="@string/menu_close"
app:iconTint="?attr/colorOnPrimary"

View File

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">TERAPLEX</string>
</resources>

View File

@ -4,9 +4,9 @@
<string name="navigation_drawer_open">NAVIGATION ÖFFNEN</string>
<string name="navigation_drawer_close">NAVIGATION SCHLIESSEN</string>
<string name="nav_header_title">ANDROID STUDIO</string>
<string name="login_ipadresse">IP-ADRESSE</string>
<string name="login_benutzername">BENUTZERNAME</string>
<string name="login_passwort">PASSWORT</string>
<string name="login_ipaddress">IP-ADRESSE</string>
<string name="login_username">BENUTZERNAME</string>
<string name="login_password">PASSWORT</string>
<string name="menu_home">HOME</string>
<string name="menu_konsole">KONSOLE</string>
<string name="menu_kueche">KÜCHE</string>
@ -19,29 +19,28 @@
<string name="menu_logout">AUSLOGGEN</string>
<string name="menu_language">SPRACHE</string>
<string name="menu_close">SCHLIESSEN</string>
<string name="colorpicker">WÄHLE DEINE FARBE</string>
<string name="ok">WEITER</string>
<string name="action_logout">AUSLOGGEN</string>
<string name="Welcome_to_your_HOMEAUTOMATION_APP">WILLKOMMEN BEI TERAPLEX</string>
<string name="login">EINLOGGEN</string>
<string name="wlan">WLAN</string>
<string name="kodi">KODI</string>
<string name="aus">AUS</string>
<string name="an">AN</string>
<string name="konsole">KONSOLE</string>
<string name="off">AUS</string>
<string name="on">AN</string>
<string name="console">KONSOLE</string>
<string name="button_send_command">BEFEHL SENDEN</string>
<string name="serverbefehle">SERVERBEFEHLE</string>
<string name="servercommands">SERVERBEFEHLE</string>
<string name="reboot">NEUSTARTEN</string>
<string name="shutdown">HERUNTERFAHREN</string>
<string name="zeitgesteuerte_kommandos">ZEITGESTEUERTE KOMMANDOS</string>
<string name="befehl">BEFEHL</string>
<string name="timed_commands">ZEITGESTEUERTE KOMMANDOS</string>
<string name="command">BEFEHL</string>
<string name="send_timed_command">ZEITGESTEUERTER BEFEHL</string>
<string name="farben">FARBEN</string>
<string name="hintergrund">HINTERGRUND</string>
<string name="sprache">SPRACHE</string>
<string name="einstellungen_zurücksetzen">EINSTELLUNGEN ZURÜCKSETZEN</string>
<string name="button_zurücksetzen">ZURÜCKSETZEN</string>
<string name="button_hintergrund_wählen">HINTERGRUND WÄHLEN</string>
<string name="background">HINTERGRUND</string>
<string name="language">SPRACHE</string>
<string name="reset_settings">EINSTELLUNGEN ZURÜCKSETZEN</string>
<string name="button_reset">ZURÜCKSETZEN</string>
<string name="button_choose_background">HINTERGRUND WÄHLEN</string>
<string name="ssh_remote">SSH-FERNBEDIENUNG</string>
<string name="please_login">BITTE VERBINDE DICH MIT DEINEM SERVER</string>
<string name="sie_sind_als_angemeldet">DU BIST ALS {USERNAME} AUF {IP}</string>
@ -49,7 +48,7 @@
<string name="logout">AUSLOGGEN</string>
<string name="are_you_sure_to_reset">MÖCHTEST DU WIRKLICH DIE APP UND ALLE IHRE EINSTELLUNGEN ZURÜCKSETZEN?</string>
<string name="reset_app">APP ZURÜCKSETZEN</string>
<string name="menu_about">ABOUT</string>
<string name="menu_about">ÜBER</string>
<string name="login_saved">LOGIN_DATEN GESPEICHERT</string>
<string name="felder_dürfen_nicht_leer_sein">FELDER DÜRFEN NICHT LEER SEIN!</string>
<string name="themes">FARBSCHEMA</string>

View File

@ -1,44 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="login_ipadresse">jIQuch</string>
<string name="login_benutzername">\'up</string>
<string name="login_passwort">polonyuS</string>
<string name="menu_home">juH</string>
<string name="menu_konsole">ghoS</string>
<string name="menu_kueche">qevpob</string>
<string name="menu_zeitsteuerung">Doch</string>
<string name="menu_schlafzimmer">pum</string>
<string name="menu_flur">vaS</string>
<string name="menu_küche">qeylIS</string>
<string name="menu_settings">\'Iv</string>
<string name="menu_documentation">yu\'</string>
<string name="menu_language">Hol</string>
<string name="menu_close">SoQmoH</string>
<string name="colorpicker">bIrchoH</string>
<string name="ok">lu\'</string>
<string name="menu_logout">parmaq</string>
<string name="action_logout">parmaq</string>
<string name="Welcome_to_your_HOMEAUTOMATION_APP">BATLH BIMEJNIS</string>
<string name="login">QONOS</string>
<string name="wlan">qatlh</string>
<string name="kodi">vutwI\'</string>
<string name="aus">Bej</string>
<string name="an">Daq</string>
<string name="konsole">ghoS</string>
<string name="button_send_command">ja\'chu\'</string>
<string name="serverbefehle">ja\'chu\'</string>
<string name="reboot">Daw\'</string>
<string name="shutdown">QID</string>
<string name="zeitgesteuerte_kommandos">naD</string>
<string name="befehl">naD</string>
<string name="send_timed_command">naD</string>
<string name="farben">ngeH</string>
<string name="hintergrund">chech</string>
<string name="sprache">Hol</string>
<string name="einstellungen_zurücksetzen">qem</string>
<string name="button_hintergrund_wählen">nobHa\'</string>
<string name="button_zurücksetzen">lI\'</string>
<string name="ssh_remote">verengan</string>
<string name="nav_header_subtitle">android.studio@android.com</string>
<string name="logout">parmaq</string>
</resources>

View File

@ -4,49 +4,44 @@
<string name="navigation_drawer_close">Close navigation drawer</string>
<string name="nav_header_title">Android Studio</string>
<string name="nav_header_subtitle">android.studio@android.com</string>
<string name="nav_header_desc">Navigation header</string>
<string name="SSH_IP">Navigation header</string>
<string name="SSH_User">Navigation header</string>
<string name="SSH_Password">Navigation header</string>
<string name="SSH_Command">Navigation header</string>
<string name="action_logout">LOGOUT</string>
<string name="ssh_remote">SSH-REMOTE</string>
//home
<string name="Welcome_to_your_HOMEAUTOMATION_APP">WELCOME TO TERAPLEX</string>
<string name="login_ipadresse">IP-ADDRESS</string>
<string name="login_benutzername">USERNAME</string>
<string name="login_passwort">PASSWORD</string>
<string name="login_ipaddress">IP-ADDRESS</string>
<string name="login_username">USERNAME</string>
<string name="login_password">PASSWORD</string>
<string name="login">LOGIN</string>
<string name="logout">LOGOUT</string>
<string name="wlan">WLAN</string>
<string name="kodi">KODI</string>
<string name="aus">OFF</string>
<string name="an">ON</string>
<string name="off">OFF</string>
<string name="on">ON</string>
<string name="please_login">PLEASE CONNECT TO YOUR SERVER</string>
<string name="sie_sind_als_angemeldet">YOU ARE LOGGED IN ON {IP} AS {USERNAME}</string>
<string name="felder_dürfen_nicht_leer_sein">INPUTFIELDS CANT BE EMPTY!</string>
<string name="login_saved">LOGIN-DATA SAVED!</string>
//konsole
<string name="konsole">CONSOLE</string>
<string name="console">CONSOLE</string>
<string name="button_send_command">SEND COMMAND</string>
<string name="serverbefehle">SERVERCOMMANDS</string>
<string name="servercommands">SERVERCOMMANDS</string>
<string name="reboot">REBOOT</string>
<string name="shutdown">SHUTDOWN</string>
//zeitgesteuerte kommandos
<string name="zeitgesteuerte_kommandos">TIMED COMMANDS</string>
<string name="befehl">COMMAND</string>
<string name="timed_commands">TIMED COMMANDS</string>
<string name="command">COMMAND</string>
<string name="send_timed_command">SET TIMED COMMAND</string>
//settings
<string name="farben">COLORS</string>
<string name="hintergrund">BACKGROUND</string>
<string name="button_hintergrund_wählen">"CHOOSE\nBACKGROUND"</string>
<string name="sprache">LANGUAGE</string>
<string name="einstellungen_zurücksetzen">RESET SETTINGS</string>
<string name="button_zurücksetzen">RESET</string>
<string name="background">BACKGROUND</string>
<string name="button_choose_background">"CHOOSE\nBACKGROUND"</string>
<string name="language">LANGUAGE</string>
<string name="reset_settings">RESET SETTINGS</string>
<string name="button_reset">RESET</string>
<string name="themes">COLORSCHEME</string>
<string name="red_blue">"RED\nBLUE"</string>
<string name="green_yellow">"GREEN\nYELLOW"</string>
@ -81,7 +76,6 @@
<string name="menu_language">LANGUAGE</string>
<string name="menu_close">CLOSE</string>
<string name="colorpicker">CHOOSE YOUR COLOR</string>
<string name="ok">OK</string>
</resources>