summaryrefslogtreecommitdiff
path: root/merchant-terminal/src
diff options
context:
space:
mode:
Diffstat (limited to 'merchant-terminal/src')
-rw-r--r--merchant-terminal/src/main/java/net/taler/merchantpos/config/ConfigManager.kt3
-rw-r--r--merchant-terminal/src/main/res/layout/fragment_order.xml142
-rw-r--r--merchant-terminal/src/main/res/values-fi/strings.xml72
-rw-r--r--merchant-terminal/src/main/res/values-tr/strings.xml4
4 files changed, 157 insertions, 64 deletions
diff --git a/merchant-terminal/src/main/java/net/taler/merchantpos/config/ConfigManager.kt b/merchant-terminal/src/main/java/net/taler/merchantpos/config/ConfigManager.kt
index 2cc0d8c..70c7b18 100644
--- a/merchant-terminal/src/main/java/net/taler/merchantpos/config/ConfigManager.kt
+++ b/merchant-terminal/src/main/java/net/taler/merchantpos/config/ConfigManager.kt
@@ -40,6 +40,7 @@ import net.taler.common.getIncompatibleStringOrNull
import net.taler.merchantlib.ConfigResponse
import net.taler.merchantlib.MerchantApi
import net.taler.merchantlib.MerchantConfig
+import net.taler.merchantpos.BuildConfig
import net.taler.merchantpos.R
private const val SETTINGS_NAME = "taler-merchant-terminal"
@@ -52,7 +53,7 @@ internal const val CONFIG_URL_DEMO = "https://docs.taler.net/_static/sample-pos-
internal const val CONFIG_USERNAME_DEMO = ""
internal const val CONFIG_PASSWORD_DEMO = ""
-private val VERSION = Version(3, 0, 1)
+private val VERSION = Version.parse(BuildConfig.BACKEND_API_VERSION)!!
private val TAG = ConfigManager::class.java.simpleName
diff --git a/merchant-terminal/src/main/res/layout/fragment_order.xml b/merchant-terminal/src/main/res/layout/fragment_order.xml
index 45f1aee..dd2edc5 100644
--- a/merchant-terminal/src/main/res/layout/fragment_order.xml
+++ b/merchant-terminal/src/main/res/layout/fragment_order.xml
@@ -25,7 +25,7 @@
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginBottom="8dp"
- app:layout_constraintBottom_toTopOf="@+id/restartButton"
+ app:layout_constraintBottom_toTopOf="@+id/buttonBar"
app:layout_constraintEnd_toStartOf="@+id/guideline1"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
@@ -44,7 +44,7 @@
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginBottom="8dp"
- app:layout_constraintBottom_toTopOf="@+id/restartButton"
+ app:layout_constraintBottom_toTopOf="@+id/buttonBar"
app:layout_constraintEnd_toStartOf="@+id/guideline2"
app:layout_constraintStart_toStartOf="@+id/guideline1"
app:layout_constraintTop_toTopOf="parent"
@@ -63,86 +63,102 @@
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginBottom="8dp"
- app:layout_constraintBottom_toTopOf="@+id/restartButton"
+ app:layout_constraintBottom_toTopOf="@+id/buttonBar"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@+id/guideline2"
app:layout_constraintTop_toTopOf="parent"
tools:layout="@layout/fragment_categories" />
- <Button
- android:id="@+id/restartButton"
- android:layout_width="wrap_content"
+ <HorizontalScrollView
+ android:id="@+id/buttonBar"
+ android:layout_width="0dp"
android:layout_height="wrap_content"
- android:layout_marginStart="8dp"
- android:backgroundTint="@color/button_bottom"
- android:text="@string/order_restart"
+ android:scrollbars="horizontal"
+ android:fadeScrollbars="false"
+ app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent" />
+ app:layout_constraintEnd_toStartOf="@id/completeButton">
- <Button
- android:id="@+id/plusButton"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginStart="16dp"
- android:minWidth="48dp"
- android:text="+1"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toEndOf="@+id/minusButton"
- tools:ignore="HardcodedText" />
+ <LinearLayout
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal">
- <Button
- android:id="@+id/minusButton"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginStart="32dp"
- android:minWidth="48dp"
- android:text="-1"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toEndOf="@+id/restartButton"
- tools:ignore="HardcodedText" />
+ <Button
+ android:id="@+id/restartButton"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="8dp"
+ android:backgroundTint="@color/button_bottom"
+ android:text="@string/order_restart"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintStart_toStartOf="parent" />
- <Button
- android:id="@+id/prevButton"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginStart="32dp"
- android:backgroundTint="@color/button_bottom"
- android:text="@string/order_previous"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toEndOf="@+id/plusButton" />
+ <Button
+ android:id="@+id/plusButton"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="16dp"
+ android:minWidth="48dp"
+ android:text="+1"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintStart_toEndOf="@+id/minusButton"
+ tools:ignore="HardcodedText" />
- <Button
- android:id="@+id/nextButton"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginStart="16dp"
- android:backgroundTint="@color/button_bottom"
- android:text="@string/order_next"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toEndOf="@+id/prevButton" />
-
- <ImageButton
- android:id="@+id/customButton"
- android:layout_width="48dp"
- android:layout_height="48dp"
- android:layout_marginStart="16dp"
- android:backgroundTint="?colorPrimary"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toEndOf="@+id/nextButton"
- app:srcCompat="@drawable/ic_dialpad"
- android:contentDescription="@string/order_custom" />
+ <Button
+ android:id="@+id/minusButton"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="8dp"
+ android:minWidth="48dp"
+ android:text="-1"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintStart_toEndOf="@+id/restartButton"
+ tools:ignore="HardcodedText" />
+
+ <Button
+ android:id="@+id/prevButton"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="16dp"
+ android:backgroundTint="@color/button_bottom"
+ android:text="@string/order_previous"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintStart_toEndOf="@+id/plusButton" />
+
+ <Button
+ android:id="@+id/nextButton"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="8dp"
+ android:backgroundTint="@color/button_bottom"
+ android:text="@string/order_next"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintStart_toEndOf="@+id/prevButton" />
+
+ <ImageButton
+ android:id="@+id/customButton"
+ android:layout_width="48dp"
+ android:layout_height="48dp"
+ android:layout_marginStart="16dp"
+ android:layout_marginEnd="8dp"
+ android:backgroundTint="?colorPrimary"
+ app:srcCompat="@drawable/ic_dialpad"
+ android:contentDescription="@string/order_custom" />
+
+ </LinearLayout>
+
+ </HorizontalScrollView>
<Button
android:id="@+id/completeButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginStart="32dp"
android:layout_marginEnd="8dp"
- android:backgroundTint="@color/button_bottom"
+ android:backgroundTint="@color/green"
android:text="@string/order_complete"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintHorizontal_bias="1.0"
- app:layout_constraintStart_toEndOf="@+id/customButton" />
+ app:layout_constraintHorizontal_bias="1.0" />
</androidx.constraintlayout.widget.ConstraintLayout>
diff --git a/merchant-terminal/src/main/res/values-fi/strings.xml b/merchant-terminal/src/main/res/values-fi/strings.xml
new file mode 100644
index 0000000..ff7c02e
--- /dev/null
+++ b/merchant-terminal/src/main/res/values-fi/strings.xml
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="app_name">GNU Taler -myyntipiste</string>
+ <string name="app_name_short">Kauppiasterminaali</string>
+ <string name="project_name">GNU Taler</string>
+ <string name="menu_order">Tilaukset</string>
+ <string name="menu_history">Historia</string>
+ <string name="order_label_title">Tilaus #%s</string>
+ <string name="order_total">Yhteensä: #%s</string>
+ <string name="order_undo">Kumoa</string>
+ <string name="order_previous">Edellinen</string>
+ <string name="order_custom">Lisää mukautettu tuote</string>
+ <string name="order_complete">Valmis</string>
+ <string name="order_custom_product">Mukautettu tuotteen nimi</string>
+ <string name="order_custom_product_default">Tip</string>
+ <string name="config_label">Kauppiaan asetukset</string>
+ <string name="config_url">Määrityksen URL -osoite</string>
+ <string name="config_username">Käyttäjänimi</string>
+ <string name="config_password">Salasana</string>
+ <string name="config_ok">Nouda määritykset</string>
+ <string name="config_error_network">Virhe: Ei voitu muodostaa yhteyttä määrityspalvelimeen</string>
+ <string name="config_error_category">Virhe: kelvollista tuoteluokkaa ei löytynyt</string>
+ <string name="config_error_malformed">Virhe: Määrityksen JSON on virheellinen</string>
+ <string name="config_error_currency">Virhe: Tuotteen %1$s valuutta on %2$s, mutta %3$s odotetaan</string>
+ <string name="config_error_product_category_id">Virhe: Tuote %1$s viittaa tuntemattomaan luokkatunnukseen %2$d</string>
+ <string name="config_error_product_zero">Virhe: kelvollisia tuotteita ei löytynyt</string>
+ <string name="config_error_unknown">Virhe: Virheellinen määritys</string>
+ <string name="config_fetching">Haetaan määritystä…</string>
+ <string name="config_save_password">Muista salasana</string>
+ <string name="config_forget_password">Unohda</string>
+ <string name="config_changed">Vaihdettu uudeksi kauppiaaksi käyttämällä %s</string>
+ <string name="payment_intro_nfc">Anna asiakkaan skannata QR-koodi tai käyttää NFC:tä maksamiseen.</string>
+ <string name="payment_intro">Anna asiakkaan skannata QR-koodi maksaaksesi.</string>
+ <string name="payment_claimed">Odotetaan asiakkaan maksun vahvistamista…</string>
+ <string name="payment_cancel">Peruuta maksu</string>
+ <string name="payment_received">Maksu vastaanotettu</string>
+ <string name="payment_back_button">Jatka</string>
+ <string name="payment_order_id">Kuitti #%s</string>
+ <string name="payment_process_label">Maksua vaaditaan</string>
+ <string name="payment_canceled">Maksu peruutettu</string>
+ <string name="history_label">Maksu historia</string>
+ <string name="history_refund">Palautus</string>
+ <string name="history_unpaid">Maksamaton</string>
+ <string name="refund_amount">Summa</string>
+ <string name="refund_reason">Palautuksen syy</string>
+ <string name="refund_abort">Keskeytä</string>
+ <string name="refund_complete">Vastaanotettu</string>
+ <string name="refund_confirm">Hyväksy hyvitys</string>
+ <string name="refund_error_max_amount">Suurempi kuin tilausmäärä %s</string>
+ <string name="refund_error_invalid_amount">Virheellinen summa</string>
+ <string name="refund_error_zero">On oltava positiivinen määrä</string>
+ <string name="refund_error_backend">Hyvityksen käsittelyssä tapahtui virhe</string>
+ <string name="refund_error_already_refunded">Palautettu jo</string>
+ <string name="refund_intro_nfc">Anna asiakkaan skannata QR-koodi tai käyttää NFC:tä hyvityksen tarjoamiseksi</string>
+ <string name="refund_intro">Anna asiakkaan skannata QR-koodi hyvityksen tarjoamiseksi</string>
+ <string name="refund_order_ref">Ostoviite: %1$s
+\n
+\n%2$s</string>
+ <string name="error_payment">Virhe: Maksua ei vastaanotettu</string>
+ <string name="error_timeout">Maksua ei ole suoritettu maksuajan kuluessa, yritä uudelleen!</string>
+ <string name="error_cancelled">Maksu peruutettu</string>
+ <string name="error_history">Virhe noudettaessa tilaushistoriaa</string>
+ <string name="toast_back_to_exit">Napsauta «takaisin» uudelleen poistuaksesi</string>
+ <string name="menu_settings">Asetukset</string>
+ <string name="order_restart">Uudelleenkäynnistys</string>
+ <string name="order_next">Seuraava</string>
+ <string name="order_custom_add_button">Lisää</string>
+ <string name="config_auth_error">Virhe: Virheellinen käyttäjätunnus tai salasana</string>
+ <string name="config_fetching_label">Haetaan määritystä</string>
+ <string name="config_docs">Katso määritysmuodon <a href="https://docs.taler.net/taler-merchant-pos-terminal.html#apis-and-data-formats">dokumentaatiosta</a>.</string>
+ <string name="refund_error_deadline">Palautusaika on umpeutunut</string>
+</resources> \ No newline at end of file
diff --git a/merchant-terminal/src/main/res/values-tr/strings.xml b/merchant-terminal/src/main/res/values-tr/strings.xml
index a6362ca..bdd4d40 100644
--- a/merchant-terminal/src/main/res/values-tr/strings.xml
+++ b/merchant-terminal/src/main/res/values-tr/strings.xml
@@ -65,4 +65,8 @@
<string name="config_fetching">Kurulum getiriliyor…</string>
<string name="config_save_password">Şifreyi hatırla</string>
<string name="menu_history">Geçmiş</string>
+ <string name="order_custom">Özel ürün ekle</string>
+ <string name="order_custom_product">Özel ürünün ismi</string>
+ <string name="order_custom_product_default">Bahşiş</string>
+ <string name="order_custom_add_button">Ekle</string>
</resources> \ No newline at end of file