Browse Source

version 0.1.3

* added german translation
pull/20/head
Jannik 4 years ago
parent
commit
a58d6436b3
  1. 4
      app/build.gradle
  2. 5
      app/src/main/java/org/mosad/seil0/projectlaogai/MainActivity.kt
  3. 4
      app/src/main/java/org/mosad/seil0/projectlaogai/fragments/HomeFragment.kt
  4. 2
      app/src/main/java/org/mosad/seil0/projectlaogai/hsoparser/MensaParser.kt
  5. 2
      app/src/main/res/menu/main.xml
  6. 24
      app/src/main/res/values-de-rDE/strings.xml
  7. 43
      app/src/main/res/values/strings.xml

4
app/build.gradle

@ -10,8 +10,8 @@ android {
applicationId "org.mosad.seil0.projectlaogai"
minSdkVersion 21
targetSdkVersion 28
versionCode 3
versionName "0.1.2"
versionCode 4
versionName "0.1.3"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {

5
app/src/main/java/org/mosad/seil0/projectlaogai/MainActivity.kt

@ -32,7 +32,6 @@ import android.view.MenuItem
import androidx.fragment.app.FragmentTransaction
import kotlinx.android.synthetic.main.activity_main.*
import kotlinx.android.synthetic.main.app_bar_main.*
import org.jetbrains.anko.custom.async
import org.jetbrains.anko.doAsync
import org.mosad.seil0.projectlaogai.fragments.HomeFragment
import org.mosad.seil0.projectlaogai.fragments.MensaFragment
@ -151,7 +150,7 @@ class MainActivity : AppCompatActivity(), NavigationView.OnNavigationItemSelecte
println(course.course)
println(course.courseTTLink)
// the app is hanging here
// the app is hanging here TODO show loading dialog
doAsync {
timeTableWeek = timeTableParser.getTimeTable(course.courseTTLink.replace("http", "https"))
}.get()
@ -159,8 +158,6 @@ class MainActivity : AppCompatActivity(), NavigationView.OnNavigationItemSelecte
/**
* load the mensa menus of the current week
* TODO show loading screen while loading
* TODO make mensa and timetable query parallel (use coroutines)
* TODO evaluate if we should use a timeout here
*/
private fun load() {

4
app/src/main/java/org/mosad/seil0/projectlaogai/fragments/HomeFragment.kt

@ -92,7 +92,7 @@ class HomeFragment : Fragment() {
for (i in 0..5) {
val lessonCardView = LessonCardView(context!!, null)
lessonCardView.getTxtViewLesson().text = timeTableDay[i].lessonSubject + "\n"
lessonCardView.getTxtViewLesson().text = resources.getString(R.string.string_new_line, timeTableDay[i].lessonSubject)
lessonCardView.getTxtViewLesson().append(timeTableDay[i].lessonTeacher + "\n")
lessonCardView.getTxtViewLesson().append(timeTableDay[i].lessonRoom)
lessonCardView.getTxtViewTime().text = DataTypes().getTime()[i]
@ -105,7 +105,7 @@ class HomeFragment : Fragment() {
if (linLayoutTimeTable.childCount == 0) {
// TODO we could display the next day with a lecture
val noLessonCardView = LessonCardView(context!!, null)
noLessonCardView.getTxtViewLesson().text = resources.getString(R.string.no_lesson_today) + "\n"
noLessonCardView.getTxtViewLesson().text = resources.getString(R.string.no_lesson_today)
linLayoutTimeTable.addView(noLessonCardView)
}
}

2
app/src/main/java/org/mosad/seil0/projectlaogai/hsoparser/MensaParser.kt

@ -68,7 +68,7 @@ class MensaParser {
Calendar.THURSDAY -> "Don"
Calendar.FRIDAY -> "Fre"
Calendar.SATURDAY -> "Sam"
else -> "TODAY" //TODO
else -> "TODAY"
}
for (meal in mealList) {

2
app/src/main/res/menu/main.xml

@ -2,7 +2,7 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item android:id="@+id/action_settings"
android:title="@string/action_settings"
android:title="@string/settings"
android:orderInCategory="100"
app:showAsAction="never"/>
</menu>

24
app/src/main/res/values-de-rDE/strings.xml

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="home">Home</string>
<string name="mensa">Mensa</string>
<string name="timetable">Stundenplan</string>
<string name="moodle">Moodle</string>
<string name="e_mail">E-Mail</string>
<string name="settings">Einstellungen</string>
<string name="meal_1">Essen 1</string>
<string name="meal_2">Essen 2</string>
<string name="no_meal_today">heute keine Essensausgabe</string>
<string name="no_more_food">Diese Woche keine weitere Essensausgabe</string>
<string name="no_lesson_today">heute keine Vorlesung</string>
<string name="info">Info</string>
<string name="user">Benutzer</string>
<string name="course_desc">Tippen, um den Kurs zu ändern</string>
<string name="primary_color">Primärfarbe</string>
<string name="main_color_desc">Die Primärfarbe, standard ist Indigo</string>
<string name="select">auswählen</string>
<string name="about">über</string>
<string name="hello_blank_fragment">bald ™</string>
<string name="navigation_drawer_close">Navigationsleiste schließen</string>
<string name="navigation_drawer_open">Navigationsleiste öffnen</string>
</resources>

43
app/src/main/res/values/strings.xml

@ -1,44 +1,45 @@
<resources>
<string name="app_name">Project Laogai</string>
<string name="app_name" translatable="false">Project Laogai</string>
<string name="navigation_drawer_open">Open navigation drawer</string>
<string name="navigation_drawer_close">Close navigation drawer</string>
<string name="nav_header_title">hso App 0.1.2</string>
<string name="nav_header_subtitle">seil0@mosad.xyz</string>
<string name="nav_header_desc">Navigation header</string>
<string name="nav_header_title" translatable="false">hso App 0.1.3</string>
<string name="nav_header_subtitle" translatable="false">seil0@mosad.xyz</string>
<string name="nav_header_desc" translatable="false">Project Laogai</string>
<string name="home">Home</string>
<string name="mensa">Mensa</string>
<string name="timetable">Timetable</string>
<string name="moodle">moodle</string>
<string name="moodle">Moodle</string>
<string name="e_mail">E-Mail</string>
<string name="settings">Settings</string>
<string name="action_settings">Settings</string>
<string name="meal_1">Essen 1</string>
<string name="meal_2">Essen 2</string>
<string name="no_meal_today">heute keine Essensausgabe</string>
<string name="no_more_food">Diese Woche keine weitere Essensausgabe</string>
<string name="meal_1">Meal 1</string>
<string name="meal_2">Meal 2</string>
<string name="no_meal_today">Mensa closed today</string>
<string name="no_more_food">No more Food this week</string>
<string name="no_lesson_today">heute keine Vorlesung</string>
<string name="no_lesson_today">"no lecture today "</string>
<string name="a_lesson">a lesson\na teacher\na room</string>
<string name="a_time">0.00 – 23.59</string>
<string name="sample_user" translatable="false">SampleUser@stud.hs-offenburg.de</string>
<string name="sample_course" translatable="false">SampleCourse 3</string>
<string name="sample_date" translatable="false">Montag, 30.02</string>
<string name="a_lesson" translatable="false">a lesson\na teacher\na room</string>
<string name="a_time" translatable="false">0.00 – 23.59</string>
<string name="info">Info</string>
<string name="user">User</string>
<string name="sample_user">SampleUser@stud.hs-offenburg.de</string>
<string name="sample_course">SampleCourse 3</string>
<string name="sample_date">Montag, 30.02</string>
<string name="course_desc">Tap to change course</string>
<string name="primary_color">primary color</string>
<string name="main_color_desc">The primary color, default is indigo</string>
<string name="select">select</string>
<string name="version">version 0.1.2</string>
<string name="version" translatable="false">version 0.1.3</string>
<string name="about">about</string>
<string name="about_text">This software is made by @Seil0 and is published under the terms and conditions of GPL 3.
For further information visit git.mosad.xyz/Seil0/ProjectLaogai\n\n© 2018 seil0@mosad.xyz
<string name="about_txtView" translatable="false">hso App by @Seil0</string>
<string name="about_text" translatable="false">"This software is made by @Seil0 and is published under the terms and conditions of GPL 3.
For further information visit git.mosad.xyz/Seil0/ProjectLaogai © 2018 seil0@mosad.xyz "
</string>
<string name="about_txtView">hso App by @Seil0</string>
<string name="hello_blank_fragment">Hello blank fragment</string>
<string name="hello_blank_fragment">soon ™</string>
<string name="string_new_line" translatable="false">%1$s\n</string>
</resources>

Loading…
Cancel
Save

Du besuchst diese Seite mit einem veralteten IPv4-Internetzugang. Möglicherweise treten in Zukunft Probleme mit der Erreichbarkeit und Performance auf. Bitte frage deinen Internetanbieter oder Netzwerkadministrator nach IPv6-Unterstützung.
You are visiting this site with an outdated IPv4 internet access. You may experience problems with accessibility and performance in the future. Please ask your ISP or network administrator for IPv6 support.
Weitere Infos | More Information
Klicke zum schließen | Click to close