Commit efa98914 authored by jordan.dalby's avatar jordan.dalby

Added some language strings

parent 7b14c8a4
......@@ -14,6 +14,9 @@ import com.yorksj.museumapp.book.BookPacket;
import com.yorksj.museumapp.book.CafeItem;
import com.yorksj.museumapp.home.HomeButton;
import java.text.NumberFormat;
import java.util.Locale;
public class BookCafe extends AppCompatActivity
{
......@@ -99,9 +102,10 @@ public class BookCafe extends AppCompatActivity
public void updateSubtotal()
{
String s = "\t\tCafe Total \t\t\t\t£" + bookPacket.cafe.getTotal() + ".00" +
"\n+\tEntrance Fee \t\t£" + bookPacket.museumPacket.entranceFee + ".00" +
"\n=\tTotal \t\t\t\t\t\t\t\t\t£" + (bookPacket.cafe.getTotal() + bookPacket.museumPacket.entranceFee) + ".00";
Locale locale = getResources().getConfiguration().getLocales().get(0);
String s = "\t\t" + getString(R.string.cafeTotal) + " \t\t\t\t" + NumberFormat.getCurrencyInstance(locale).format(bookPacket.cafe.getTotal()) +
"\n+\t" + getString(R.string.entranceFee) + " \t\t" + NumberFormat.getCurrencyInstance(locale).format(bookPacket.museumPacket.entranceFee) +
"\n=\t" + getString(R.string.total) + "\t\t\t\t\t\t\t\t\t" + NumberFormat.getCurrencyInstance(locale).format((bookPacket.cafe.getTotal() + bookPacket.museumPacket.entranceFee));
subtotal.setText(s);
}
......
......@@ -66,15 +66,17 @@ public class BookConfirmation extends AppCompatActivity
String date = bookPacket.getDateFormatted();
String time = bookPacket.time.name;
String totalCost = NumberFormat.getCurrencyInstance(Locale.UK).format(bookPacket.getTotalCost());
String paid = NumberFormat.getCurrencyInstance(Locale.UK).format(bookPacket.amountPaid);
Locale locale = getResources().getConfiguration().getLocales().get(0);
String totalCost = NumberFormat.getCurrencyInstance(locale).format(bookPacket.getTotalCost());
String paid = NumberFormat.getCurrencyInstance(locale).format(bookPacket.amountPaid);
String change = bookPacket.getChangeString();
String bookingCodeVal = String.format("%06d", new Random().nextInt(999999));
TextView title = findViewById(R.id.orderTitle);
title.setText("Thank you for your order " + customerName + "!");
title.setText(getString(R.string.thankYou) + " " + customerName);
TextView bookingCode = findViewById(R.id.bookingCode);
bookingCode.setText(bookingCodeVal);
......@@ -104,6 +106,8 @@ public class BookConfirmation extends AppCompatActivity
{
TextView path = findViewById(R.id.saveLocation);
Locale locale = getResources().getConfiguration().getLocales().get(0);
try
{
File dir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS);
......@@ -113,40 +117,40 @@ public class BookConfirmation extends AppCompatActivity
path.setText(file.getAbsolutePath());
FileWriter writer = new FileWriter(file);
writer.write("Booking Code: " + bookingCode + "\n");
writer.write("Customer Name: " + LoginManager.getInstance().getActiveUser().getFullName() + "\n");
writer.write("Museum: " + bookPacket.museumPacket.name + "\n");
writer.write("Date and time: " + bookPacket.getDateFormatted() + " " + bookPacket.time.name + "\n\n");
writer.write(getString(R.string.bookingCode) + ": " + bookingCode + "\n");
writer.write(getString(R.string.customerName) + ": " + LoginManager.getInstance().getActiveUser().getFullName() + "\n");
writer.write(getString(R.string.museum) + ": " + bookPacket.museumPacket.name + "\n");
writer.write(getString(R.string.dateAndTime) + ": " + bookPacket.getDateFormatted() + " " + bookPacket.time.name + "\n\n");
writer.write("Cafe items purchased:\n");
writer.write(getString(R.string.cafeItemsPurchased) + ":\n");
for (CafeItem item : bookPacket.cafe.quantities.keySet())
{
int amt = bookPacket.cafe.getAmount(item);
if (amt == 0)
continue;
writer.write(item.displayName + " x" + bookPacket.cafe.quantities.get(item) + " " + NumberFormat.getCurrencyInstance(Locale.UK).format((item.cost * amt)) + "\n");
writer.write(item.displayName + " x" + bookPacket.cafe.quantities.get(item) + " " + NumberFormat.getCurrencyInstance(locale).format((item.cost * amt)) + "\n");
}
writer.write("\nSouvenirs purchased:\n");
writer.write(getString(R.string.souvenirsPurchased) + "\n:\n");
for (SouvenirItem item : bookPacket.souvenir.quantities.keySet())
{
int amt = bookPacket.souvenir.getAmount(item);
if (amt == 0)
continue;
writer.write(item.displayName + " x" + bookPacket.souvenir.quantities.get(item) + " " + NumberFormat.getCurrencyInstance(Locale.UK).format((item.cost * amt)) + "\n");
writer.write(item.displayName + " x" + bookPacket.souvenir.quantities.get(item) + " " + NumberFormat.getCurrencyInstance(locale).format((item.cost * amt)) + "\n");
}
writer.write("\n\nTotal cost: " + NumberFormat.getCurrencyInstance(Locale.UK).format(bookPacket.getTotalCost()) + "\n");
writer.write("Payment received: " + NumberFormat.getCurrencyInstance(Locale.UK).format(bookPacket.amountPaid) + "\n");
writer.write("Change due: " + bookPacket.getChangeString() + "\n");
writer.write("\n\n" + getString(R.string.totalCost) + ": " + NumberFormat.getCurrencyInstance(locale).format(bookPacket.getTotalCost()) + "\n");
writer.write(getString(R.string.paymentReceived) + ": " + NumberFormat.getCurrencyInstance(locale).format(bookPacket.amountPaid) + "\n");
writer.write(getString(R.string.changeDue) + ": " + bookPacket.getChangeString() + "\n");
writer.close();
}
catch (IOException exception)
{
exception.printStackTrace();
Toast.makeText(BookConfirmation.this, "Failed to save receipt to file", Toast.LENGTH_LONG);
Toast.makeText(BookConfirmation.this, getString(R.string.failedToSave), Toast.LENGTH_LONG);
}
}
......
......@@ -92,11 +92,15 @@ public class BookPayment extends AppCompatActivity implements TextWatcher
if (s.length() == 0)
{
Toast.makeText(BookPayment.this, "Please enter an amount to pay", Toast.LENGTH_LONG).show();
Toast.makeText(BookPayment.this, getString(R.string.amountToPay), Toast.LENGTH_LONG).show();
return;
}
String clean = s.toString().replaceAll("[£,.]", "");
Locale locale = getResources().getConfiguration().getLocales().get(0);
String currencySymbol = NumberFormat.getCurrencyInstance(locale).getCurrency().getCurrencyCode();
String clean = s.toString().replaceAll("[" + currencySymbol + ",.]", "");
double parsed = Double.parseDouble(clean) / 100;
......@@ -104,12 +108,12 @@ public class BookPayment extends AppCompatActivity implements TextWatcher
if (parsed < requiredAmount)
{
Toast.makeText(BookPayment.this, "The amount must be greater than or equal to £" + requiredAmount + ".00", Toast.LENGTH_LONG).show();
Toast.makeText(BookPayment.this, getString(R.string.amountMustBeGreater) + " " + NumberFormat.getCurrencyInstance(locale).format(requiredAmount), Toast.LENGTH_LONG).show();
}
else
{
bookPacket.amountPaid = parsed;
Toast.makeText(BookPayment.this, "Thank you for your purchase", Toast.LENGTH_LONG).show();
Toast.makeText(BookPayment.this, getString(R.string.thankYou), Toast.LENGTH_LONG).show();
Intent intent = new Intent(BookPayment.this, BookConfirmation.class);
intent.putExtra("packet", bookPacket);
......@@ -122,6 +126,8 @@ public class BookPayment extends AppCompatActivity implements TextWatcher
private void updateOverview()
{
Locale locale = getResources().getConfiguration().getLocales().get(0);
TextView nameOverview = findViewById(R.id.paymentOverviewItem);
TextView quantityOverview = findViewById(R.id.paymentOverviewQuantity);
TextView costOverview = findViewById(R.id.paymentOverviewCost);
......@@ -130,9 +136,9 @@ public class BookPayment extends AppCompatActivity implements TextWatcher
StringBuilder quantityBuilder = new StringBuilder();
StringBuilder costBuilder = new StringBuilder();
nameBuilder.append("Item Name\n");
quantityBuilder.append("Quantity\n");
costBuilder.append("Cost\n");
nameBuilder.append(getString(R.string.itemName) + "\n");
quantityBuilder.append(getString(R.string.quantity) + "\n");
costBuilder.append(getString(R.string.cost) + "\n");
boolean b = false;
for (CafeItem item : bookPacket.cafe.quantities.keySet())
......@@ -143,7 +149,7 @@ public class BookPayment extends AppCompatActivity implements TextWatcher
nameBuilder.append(item.displayName + "\n");
quantityBuilder.append(String.valueOf(amt) + "\n");
costBuilder.append("£" + (item.cost * amt) + ".00\n");
costBuilder.append(NumberFormat.getCurrencyInstance(locale).format(item.cost * amt) + "\n");
b = true;
}
......@@ -164,7 +170,7 @@ public class BookPayment extends AppCompatActivity implements TextWatcher
b = true;
nameBuilder.append(item.displayName + "\n");
quantityBuilder.append(String.valueOf(amt) + "\n");
costBuilder.append("£" + (item.cost * amt) + ".00\n");
costBuilder.append(NumberFormat.getCurrencyInstance(locale).format(item.cost * amt) + "\n");
}
if (b)
......@@ -177,12 +183,12 @@ public class BookPayment extends AppCompatActivity implements TextWatcher
quantityBuilder.append("\n");
costBuilder.append("\n");
nameBuilder.append("Entrance fee\n" + bookPacket.getDateFormatted() + "\n" + bookPacket.time.name + "\n\n");
nameBuilder.append(getString(R.string.entranceFee) + "\n" + bookPacket.getDateFormatted() + "\n" + bookPacket.time.name + "\n\n");
quantityBuilder.append("1");
costBuilder.append("£" + bookPacket.museumPacket.entranceFee + ".00");
costBuilder.append(NumberFormat.getCurrencyInstance(locale).format(bookPacket.museumPacket.entranceFee));
nameBuilder.append("Total");
costBuilder.append("\n\n\n£" + bookPacket.getTotalCost() + ".00");
nameBuilder.append(getString(R.string.total));
costBuilder.append("\n\n\n" + NumberFormat.getCurrencyInstance(locale).format(bookPacket.getTotalCost()));
nameOverview.setText(nameBuilder.toString());
quantityOverview.setText(quantityBuilder.toString());
......@@ -213,10 +219,13 @@ public class BookPayment extends AppCompatActivity implements TextWatcher
{
enterAmount.removeTextChangedListener(this);
String clean = s.toString().replaceAll("[£,.]", "");
Locale locale = getResources().getConfiguration().getLocales().get(0);
String currency = NumberFormat.getCurrencyInstance(locale).getCurrency().getCurrencyCode();
String clean = s.toString().replaceAll("[" + currency + ",.]", "");
double parsed = Double.parseDouble(clean);
String formatted = NumberFormat.getCurrencyInstance(Locale.UK).format((parsed / 100));
String formatted = NumberFormat.getCurrencyInstance(locale).format((parsed / 100));
current = formatted;
......
......@@ -14,6 +14,9 @@ import com.yorksj.museumapp.book.BookPacket;
import com.yorksj.museumapp.book.SouvenirItem;
import com.yorksj.museumapp.home.HomeButton;
import java.text.NumberFormat;
import java.util.Locale;
public class BookSouvenir extends AppCompatActivity
{
......@@ -60,7 +63,7 @@ public class BookSouvenir extends AppCompatActivity
{
initialiseMenuItem(SouvenirItem.SHIRT, R.id.shirtAdd, R.id.shirtMinus, R.id.shirtQuantity);
initialiseMenuItem(SouvenirItem.HAT, R.id.hatAdd, R.id.hatMinus, R.id.hatQuantity);
initialiseMenuItem(SouvenirItem.SNOW_GLOBE, R.id.snowglobeAdd, R.id.snowglobeMinus, R.id.snowglobeQuantity);
initialiseMenuItem(SouvenirItem.SNOW_GLOBE,R.id.snowglobeAdd, R.id.snowglobeMinus, R.id.snowglobeQuantity);
initialiseMenuItem(SouvenirItem.KEY_CHAIN, R.id.keychainAdd, R.id.keychainMinus, R.id.keychainQuantity);
initialiseMenuItem(SouvenirItem.BOTTLE, R.id.bottleAdd, R.id.bottleMinus, R.id.bottleQuantity);
initialiseMenuItem(SouvenirItem.MUG, R.id.mugAdd, R.id.mugMinus, R.id.mugQuantity);
......@@ -99,10 +102,11 @@ public class BookSouvenir extends AppCompatActivity
public void updateSubtotal()
{
String s = "\t\tCafe Total \t\t\t\t£" + bookPacket.cafe.getTotal() + ".00" +
"\n+\tSouvenir Total \t£" + bookPacket.souvenir.getTotal() + ".00" +
"\n+\tEntrance Fee \t\t£" + bookPacket.museumPacket.entranceFee + ".00" +
"\n=\tTotal \t\t\t\t\t\t\t\t\t£" + (bookPacket.souvenir.getTotal() + bookPacket.museumPacket.entranceFee) + ".00";
Locale locale = getResources().getConfiguration().getLocales().get(0);
String s = "\t\t" + getString(R.string.cafeTotal) + " \t\t\t\t" + NumberFormat.getCurrencyInstance(locale).format(bookPacket.cafe.getTotal()) +
"\n+\t" + getString(R.string.souvenirTotal) + " \t" + NumberFormat.getCurrencyInstance(locale).format(bookPacket.souvenir.getTotal()) +
"\n+\t" + getString(R.string.entranceFee) + " \t\t" + NumberFormat.getCurrencyInstance(locale).format(bookPacket.museumPacket.entranceFee) +
"\n=\t" + getString(R.string.cafeTotal) + " \t\t\t\t\t\t\t\t\t" + NumberFormat.getCurrencyInstance(locale).format((bookPacket.souvenir.getTotal() + bookPacket.museumPacket.entranceFee));
subtotal.setText(s);
}
......
......@@ -68,19 +68,19 @@ public class LoginPage extends AppCompatActivity
if (usernameString.length() <= 4)
{
Toast.makeText(LoginPage.this, "Username must be at least 5 characters.", Toast.LENGTH_SHORT).show();
Toast.makeText(LoginPage.this, getString(R.string.username) + " " + getString(R.string.chars), Toast.LENGTH_SHORT).show();
return;
}
if (passwordString.length() <= 4)
{
Toast.makeText(LoginPage.this, "Password must be at least 5 characters.", Toast.LENGTH_SHORT).show();
Toast.makeText(LoginPage.this, getString(R.string.password) + " " + getString(R.string.chars), Toast.LENGTH_SHORT).show();
return;
}
if (fullNameString.length() <= 4)
{
Toast.makeText(LoginPage.this, "Full name must be at least 5 characters.", Toast.LENGTH_SHORT).show();
Toast.makeText(LoginPage.this, getString(R.string.fullname) + " " + getString(R.string.chars), Toast.LENGTH_SHORT).show();
return;
}
......@@ -94,11 +94,11 @@ public class LoginPage extends AppCompatActivity
System.out.println("Register result: " + result);
if (result)
{
Toast.makeText(LoginPage.this, "Successfully registered.", Toast.LENGTH_SHORT).show();
Toast.makeText(LoginPage.this, getString(R.string.registerSuccess), Toast.LENGTH_SHORT).show();
}
else
{
Toast.makeText(LoginPage.this, "Registration failed.", Toast.LENGTH_SHORT).show();
Toast.makeText(LoginPage.this, getString(R.string.registerFailed), Toast.LENGTH_SHORT).show();
}
}
});
......
package com.yorksj.museumapp.book;
import com.yorksj.museumapp.R;
import java.io.Serializable;
public enum CafeItem implements Serializable
{
TEA("Tea", 1),
WATER("Water", 1),
COFFEE("Coffee", 2),
FLATBREAD("Flatbread", 2),
SANDWICH("Sandwich", 2),
SWEET_ROLL("Sweet Roll", 2),
SALAD("Salad", 2);
TEA(R.string.tea, 1),
WATER(R.string.water, 1),
COFFEE(R.string.coffee, 2),
FLATBREAD(R.string.flatbread, 2),
SANDWICH(R.string.sandwich, 2),
SWEET_ROLL(R.string.sweetroll, 2),
SALAD(R.string.salad, 2);
public String displayName;
public int displayName;
public int cost;
CafeItem(String _displayName, int _cost)
CafeItem(int _displayName, int _cost)
{
displayName = _displayName;
cost = _cost;
......
package com.yorksj.museumapp.book;
import com.yorksj.museumapp.R;
import java.io.Serializable;
public enum SouvenirItem implements Serializable
{
SHIRT("Shirt", 10),
HAT("Hat", 5),
SNOW_GLOBE("Snow Globe", 5),
KEY_CHAIN("Key Chain", 5),
BOTTLE("Bottle", 5),
MUG("Mug", 5),
COASTER("Coaster", 2);
SHIRT(R.string.shirt, 10),
HAT(R.string.hat, 5),
SNOW_GLOBE(R.string.snowglobe, 5),
KEY_CHAIN(R.string.keychain, 5),
BOTTLE(R.string.bottle, 5),
MUG(R.string.mug, 5),
COASTER(R.string.coaster, 2);
public String displayName;
public int displayName;
public int cost;
SouvenirItem(String _displayName, int _cost)
SouvenirItem(int _displayName, int _cost)
{
displayName = _displayName;
cost = _cost;
......
......@@ -12,7 +12,7 @@
android:layout_height="22dp"
android:layout_marginStart="52dp"
android:layout_marginTop="348dp"
android:text="Salad"
android:text="@string/salad"
android:textAlignment="center"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView5" />
......@@ -34,7 +34,7 @@
android:layout_height="20dp"
android:layout_marginStart="52dp"
android:layout_marginTop="340dp"
android:text="£2.00"
android:text="@string/cost2"
android:textAlignment="center"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/teaImage" />
......@@ -103,7 +103,7 @@
android:layout_height="22dp"
android:layout_marginStart="248dp"
android:layout_marginTop="176dp"
android:text="Sweet Roll"
android:text="@string/sweetroll"
android:textAlignment="center"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView5" />
......@@ -114,7 +114,7 @@
android:layout_height="22dp"
android:layout_marginStart="152dp"
android:layout_marginTop="176dp"
android:text="Sandwich"
android:text="@string/sandwich"
android:textAlignment="center"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView5" />
......@@ -125,7 +125,7 @@
android:layout_height="22dp"
android:layout_marginStart="52dp"
android:layout_marginTop="176dp"
android:text="Flatbread"
android:text="@string/flatbread"
android:textAlignment="center"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView5" />
......@@ -159,7 +159,7 @@
android:layout_height="20dp"
android:layout_marginStart="52dp"
android:layout_marginTop="168dp"
android:text="£2.00"
android:text="@string/cost2"
android:textAlignment="center"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/teaImage" />
......@@ -215,7 +215,7 @@
android:layout_height="20dp"
android:layout_marginStart="152dp"
android:layout_marginTop="168dp"
android:text="£2.00"
android:text="@string/cost2"
android:textAlignment="center"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/teaImage" />
......@@ -248,7 +248,7 @@
android:layout_height="20dp"
android:layout_marginStart="248dp"
android:layout_marginTop="168dp"
android:text="£2.00"
android:text="@string/cost2"
android:textAlignment="center"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/teaImage" />
......@@ -293,7 +293,7 @@
android:layout_width="72dp"
android:layout_height="20dp"
android:layout_marginStart="252dp"
android:text="£2.00"
android:text="@string/cost2"
android:textAlignment="center"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/teaImage" />
......@@ -314,7 +314,7 @@
android:layout_height="22dp"
android:layout_marginStart="252dp"
android:layout_marginTop="8dp"
android:text="Coffee"
android:text="@string/coffee"
android:textAlignment="center"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView5" />
......@@ -360,7 +360,7 @@
android:layout_width="72dp"
android:layout_height="20dp"
android:layout_marginStart="156dp"
android:text="£1.00"
android:text="@string/cost1"
android:textAlignment="center"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/teaImage" />
......@@ -371,7 +371,7 @@
android:layout_height="22dp"
android:layout_marginStart="156dp"
android:layout_marginTop="8dp"
android:text="Water"
android:text="@string/water"
android:textAlignment="center"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView5" />
......@@ -417,7 +417,7 @@
android:layout_width="318dp"
android:layout_height="28dp"
android:layout_marginTop="16dp"
android:text="Cafe"
android:text="@string/cafe"
android:textAlignment="center"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
......@@ -429,7 +429,7 @@
android:id="@+id/textView5"
android:layout_width="318dp"
android:layout_height="28dp"
android:text="Select the items you want to preorder"
android:text="@string/cafeOrderText"
android:textAlignment="center"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.494"
......@@ -464,7 +464,7 @@
android:layout_width="72dp"
android:layout_height="20dp"
android:layout_marginStart="56dp"
android:text="£1.00"
android:text="@string/cost1"
android:textAlignment="center"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/teaImage" />
......@@ -475,7 +475,7 @@
android:layout_height="22dp"
android:layout_marginStart="56dp"
android:layout_marginTop="8dp"
android:text="Tea"
android:text="@string/tea"
android:textAlignment="center"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView5" />
......@@ -515,7 +515,7 @@
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_marginTop="20dp"
android:text="Subtotal"
android:text="@string/subtotal"
app:layout_constraintStart_toEndOf="@+id/saladName"
app:layout_constraintTop_toBottomOf="@+id/sandwichMinus" />
......@@ -534,7 +534,7 @@
android:layout_height="wrap_content"
android:layout_marginEnd="12dp"
android:layout_marginBottom="16dp"
android:text="Continue"
android:text="@string/cont"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
......
......@@ -23,7 +23,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:text="Your booking code is"
android:text="@string/bookingCode"
android:textSize="16sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.498"
......@@ -48,7 +48,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="424dp"
android:text="Your receipt has been saved to"
android:text="@string/receipt"
android:textAlignment="center"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.497"
......@@ -60,10 +60,10 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:text="(View > Tool Windows > Device File Explorer)"
android:text="@string/fileInstructions"
android:textAlignment="center"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.497"
app:layout_constraintHorizontal_bias="0.496"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/saveLocation" />
......@@ -85,7 +85,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="36dp"
android:text="You are going to"
android:text="@string/goingTo"
android:textAlignment="center"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.498"
......@@ -133,7 +133,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:text="on"
android:text="@string/on"
android:textAlignment="center"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.498"
......@@ -145,7 +145,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:text="Total Cost"
android:text="@string/totalCost"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.498"
app:layout_constraintStart_toStartOf="parent"
......@@ -168,7 +168,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:text="Amount Paid"
android:text="@string/amountPaid"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.498"
app:layout_constraintStart_toStartOf="parent"
......@@ -191,7 +191,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:text="Change"
android:text="@string/change"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.498"
app:layout_constraintStart_toStartOf="parent"
......
......@@ -23,7 +23,7 @@
android:layout_width="fill_parent"
android:layout_height="22dp"
android:layout_marginStart="4dp"
android:text="Select a date and time"
android:text="@string/selectDateAndTime"
android:textAlignment="center"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/museumBookName" />
......@@ -53,7 +53,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:text="Continue"
android:text="@string/cont"
app:iconTint="#FFFFFF"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
......
......@@ -12,7 +12,7 @@
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:layout_marginBottom="16dp"
android:text="Confirm Purchase"
android:text="@string/confirmPurchase"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
......@@ -73,7 +73,7 @@
android:id="@+id/paymentMuseumName2"
android:layout_width="fill_parent"
android:layout_height="26dp"
android:text="Please review your purchase overview"
android:text="@string/reviewPurchaseOverview"
android:textAlignment="center"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
......@@ -87,7 +87,6 @@
android:layout_marginStart="24dp"
android:layout_marginBottom="24dp"
android:ems="10"
android:hint="£"
android:inputType="numberDecimal"
android:singleLine="true"
app:layout_constraintBottom_toBottomOf="parent"
......@@ -98,7 +97,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:text="Enter amount to pay"
android:text="@string/enterAmount"
app:layout_constraintBottom_toTopOf="@+id/paymentEnterAmount"
app:layout_constraintStart_toStartOf="parent" />
......
......@@ -12,7 +12,7 @@
android:layout_height="22dp"
android:layout_marginStart="52dp"
android:layout_marginTop="348dp"
android:text="Coaster"
android:text="@string/coaster"
android:textAlignment="center"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView5" />
......@@ -34,7 +34,7 @@
android:layout_height="20dp"
android:layout_marginStart="52dp"
android:layout_marginTop="340dp"
android:text="£2.00"
android:text="@string/cost2"
android:textAlignment="center"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/shirtImage" />
......@@ -103,7 +103,7 @@
android:layout_height="22dp"
android:layout_marginStart="248dp"
android:layout_marginTop="176dp"
android:text="Mug"
android:text="@string/mug"
android:textAlignment="center"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView5" />
......@@ -114,7 +114,7 @@
android:layout_height="22dp"
android:layout_marginStart="152dp"
android:layout_marginTop="176dp"
android:text="Bottle"
android:text="@string/bottle"
android:textAlignment="center"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView5" />
......@@ -125,7 +125,7 @@
android:layout_height="22dp"
android:layout_marginStart="52dp"
android:layout_marginTop="176dp"
android:text="Keychain"
android:text="@string/keychain"
android:textAlignment="center"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView5" />
......@@ -159,7 +159,7 @@
android:layout_height="20dp"
android:layout_marginStart="52dp"
android:layout_marginTop="168dp"
android:text="£5.00"
android:text="@string/cost5"
android:textAlignment="center"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/shirtImage" />
......@@ -215,7 +215,7 @@
android:layout_height="20dp"
android:layout_marginStart="152dp"
android:layout_marginTop="168dp"
android:text="£5.00"
android:text="@string/cost5"
android:textAlignment="center"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/shirtImage" />
......@@ -248,7 +248,7 @@
android:layout_height="20dp"
android:layout_marginStart="248dp"
android:layout_marginTop="168dp"
android:text="£5.00"
android:text="@string/cost5"
android:textAlignment="center"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/shirtImage" />
......@@ -293,7 +293,7 @@
android:layout_width="72dp"
android:layout_height="20dp"
android:layout_marginStart="252dp"
android:text="£5.00"
android:text="@string/cost5"
android:textAlignment="center"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/shirtImage" />
......@@ -310,11 +310,11 @@
<TextView
android:id="@+id/snowglobeName"
android:layout_width="73dp"
android:layout_width="92dp"
android:layout_height="22dp"
android:layout_marginStart="252dp"
android:layout_marginTop="8dp"
android:text="Snowglobe"
android:text="@string/snowglobe"
android:textAlignment="center"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView5" />
......@@ -360,7 +360,7 @@
android:layout_width="72dp"
android:layout_height="20dp"
android:layout_marginStart="156dp"
android:text="£5.00"
android:text="@string/cost5"
android:textAlignment="center"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/shirtImage" />
......@@ -371,7 +371,7 @@
android:layout_height="22dp"
android:layout_marginStart="156dp"
android:layout_marginTop="8dp"
android:text="Hat"
android:text="@string/hat"
android:textAlignment="center"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView5" />
......@@ -417,7 +417,7 @@
android:layout_width="318dp"
android:layout_height="28dp"
android:layout_marginTop="16dp"
android:text="Souvenirs"
android:text="@string/souvenirsName"
android:textAlignment="center"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
......@@ -429,7 +429,7 @@
android:id="@+id/textView5"
android:layout_width="318dp"
android:layout_height="28dp"
android:text="Select the items you want to preorder"
android:text="@string/cafeOrderText"
android:textAlignment="center"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.494"
......@@ -464,7 +464,7 @@
android:layout_width="72dp"
android:layout_height="20dp"
android:layout_marginStart="56dp"
android:text="£10.00"
android:text="@string/cost10"
android:textAlignment="center"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/shirtImage" />
......@@ -475,7 +475,7 @@
android:layout_height="22dp"
android:layout_marginStart="56dp"
android:layout_marginTop="8dp"
android:text="Shirt"
android:text="@string/shirt"
android:textAlignment="center"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView5" />
......@@ -515,7 +515,7 @@
android:layout_height="wrap_content"
android:layout_marginEnd="12dp"
android:layout_marginBottom="16dp"
android:text="Continue"
android:text="@string/cont"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
......@@ -534,7 +534,7 @@
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_marginTop="20dp"
android:text="Subtotal"
android:text="@string/subtotal"
app:layout_constraintStart_toEndOf="@+id/coasterName"
app:layout_constraintTop_toBottomOf="@+id/bottleMinus" />
......
......@@ -11,7 +11,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:hint="Password"
android:hint="@string/password"
android:inputType="textPassword"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
......@@ -25,7 +25,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:hint="Username"
android:hint="@string/username"
android:inputType="textPersonName"
app:layout_constraintBottom_toTopOf="@+id/password"
app:layout_constraintEnd_toEndOf="parent"
......@@ -39,7 +39,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:hint="Full Name"
android:hint="@string/fullname"
android:inputType="textPersonName"
app:layout_constraintBottom_toTopOf="@+id/register"
app:layout_constraintEnd_toEndOf="parent"
......@@ -52,7 +52,7 @@
android:id="@+id/login"
android:layout_width="209dp"
android:layout_height="50dp"
android:text="Login"
android:text="@string/login"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.495"
......@@ -64,7 +64,7 @@
android:id="@+id/register"
android:layout_width="209dp"
android:layout_height="50dp"
android:text="Register"
android:text="@string/register"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.49"
......
......@@ -20,6 +20,70 @@
<string name="american_natural_history_enhanced_description">The American Museum of Natural History is located in US, New York. The museum contains over 34,000,000 specimens including human remains. This museum was founded by Theodore Roosevelt\'s father and some others in 1869. This museum was the home of the Night at the Museum film starring Ben Stiller as Larry Daley.</string>
<string name="hermitage_description">Located in Saint Petersburg, Russia. \n£5 entrance fee.</string>
<string name="hermitage_enhanced_description">The State Hermitage Museum is located in Saint Petersburg, Russia. It has the largest collections of paintings in the world. The Hermitage is considered a world wonder in the games Civilization IV, V, and VI.</string>
<string name="shirt">Shirt</string>
<string name="hat">Hat</string>
<string name="snowglobe">Snow Globe</string>
<string name="keychain">Key Chain</string>
<string name="bottle">Bottle</string>
<string name="mug">Mug</string>
<string name="coaster">Coaster</string>
<string name="cafeTotal">Cafe Total</string>
<string name="souvenirTotal">Souvenir Total</string>
<string name="entranceFee">Entrance Fee</string>
<string name="total">Total</string>
<string name="tea">Tea</string>
<string name="water">Water</string>
<string name="coffee">Coffee</string>
<string name="flatbread">Flatbread</string>
<string name="sandwich">Sandwich</string>
<string name="sweetroll">Sweet Roll</string>
<string name="salad">Salad</string>
<string name="subtotal">Subtotal</string>
<string name="cost1">£1.00</string>
<string name="cost2">£2.00</string>
<string name="cost5">£5.00</string>
<string name="cost10">£10.00</string>
<string name="cafe">Cafe</string>
<string name="cafeOrderText">Select the items you want to preorder</string>
<string name="cont">Continue</string>
<string name="thankYou">Thank you for your order</string>
<string name="bookingCode">Your booking code is</string>
<string name="goingTo">You are going to</string>
<string name="on">on</string>
<string name="totalCost">Total Cost</string>
<string name="amountPaid">Amount Paid</string>
<string name="change">Change</string>
<string name="receipt">Your receipt has been saved to</string>
<string name="fileInstructions">(View > Tool Windows > Device File Explorer)</string>
<string name="bookingCode">Booking Code</string>
<string name="customerName">Customer Name</string>
<string name="museum">Museum</string>
<string name="dateAndTime">Date and time</string>
<string name="cafeItemsPurchased">Cafe items purchased</string>
<string name="souvenirsPurchased">Souvenirs purchased</string>
<string name="paymentReceived">Payment received</string>
<string name="changeDue">Change due</string>
<string name="failedToSave">Failed to save receipt to file</string>
<string name="selectDateAndTime">Select a date and time</string>
<string name="amountToPay">Please enter an amount to pay</string>
<string name="amountMustBeGreater">The amount must be greater than or equal to</string>
<string name="itemName">Item Name</string>
<string name="quantity">Quantity</string>
<string name="cost">Cost</string>
<string name="reviewPurchaseOverview">Please review your purchase overview</string>
<string name="enterAmount">Enter amount to pay</string>
<string name="confirmPurchase">Confirm purchase</string>
<string name="souvenirsName">Souvenirs</string>
<string name="username">Username</string>
<string name="password">Password</string>
<string name="fullname">Full Name</string>
<string name="login">Login</string>
<string name="register">Register</string>
<string name="loginSuccess">Login successful.</string>
<string name="invalidUsername">Invalid username/password</string>
<string name="chars">must be at least 5 characters.</string>
<string name="registerSuccess">Successfully registered.</string>
<string name="registerFailed">Registration failed.</string>
<string-array name="book_times">
<item>9am-11am</item>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment