Skip to content

Commit

Permalink
Refact: General cleanup and english app translation
Browse files Browse the repository at this point in the history
  • Loading branch information
lknknm committed Aug 27, 2023
1 parent d9468e0 commit 97ed94d
Show file tree
Hide file tree
Showing 13 changed files with 39 additions and 37 deletions.
8 changes: 4 additions & 4 deletions REZ/AccountClosed.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
<Grid>
<StackPanel VerticalAlignment="Top" HorizontalAlignment="Center" Margin="0,174,0,0" >
<Image Source="./Assets/AccountClosed.png" Width="686"/>
<TextBlock Text="Tudo pronto! É uma pena ver você ir." FontWeight="SemiBold" FontSize="20" Margin="0,48,0,0" Width="486"/>
<TextBlock Text="Agora o garçom trará a maquininha para realizar o pagamento e fechar o seu pedido!" TextWrapping="Wrap" FontSize="16" Margin="0,8,0,0" Width="486" />
<TextBlock Text="Caso desejar, você também poderá realizar o pagamento via Pix através do QR code abaixo:" TextWrapping="Wrap" FontSize="16" Margin="0" Width="486" />
<TextBlock Text="All set! Sad to see you go." FontWeight="SemiBold" FontSize="20" Margin="0,48,0,0" Width="486"/>
<TextBlock Text="The waiter will bring your bill so you can choose which payment method works best for you." TextWrapping="Wrap" FontSize="16" Margin="0,8,0,0" Width="486" />
<TextBlock Text="If you want, you can also pay using the QR Code below:" TextWrapping="Wrap" FontSize="16" Margin="0" Width="486" />

<Image x:Name="qrImage" Source="./Assets/DummyQRCode.png" Width="198" Height="198" Margin="16"/>

<Button Click="BackToMainMenu" KeyUp="BackToMainMenu" Margin="4,0,0,0" Width="230" HorizontalAlignment="Center">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Text="Voltar ao Menu Principal" VerticalAlignment="Center"/>
<TextBlock Text="Back to the Main Menu" VerticalAlignment="Center"/>
</StackPanel>
</Button>
</StackPanel>
Expand Down
8 changes: 4 additions & 4 deletions REZ/AccountInfo.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,27 @@
<TextBlock x:Name="TitleGreetings" Text="" Style="{ThemeResource BaseTextBlockStyle}" Margin="0"/>

<TextBlock Margin="0,0,0,12">
<Run Text="Você está na Mesa" />
<Run Text="You are at the table" />
<Run Text="#1." />
</TextBlock>
<StackPanel Orientation="Vertical">
<Button Width="328" CornerRadius="16" Margin="0,4,0,4">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock FontFamily="Segoe Fluent Icons" Text="&#xEA37;" VerticalAlignment="Center"/>
<TextBlock Text=" Ver pedidos" VerticalAlignment="Center"/>
<TextBlock Text=" See order history" VerticalAlignment="Center"/>
</StackPanel>
</Button>
<StackPanel Orientation="Horizontal" Margin="0,4,0,0">
<Button Click="CreateAccount_ButtonClick" Width="160" CornerRadius="16" Style="{StaticResource AccentButtonStyle}" HorizontalContentAlignment="Center" Margin="0,0,4,0">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock FontFamily="Segoe Fluent Icons" Text="&#xECC8;" VerticalAlignment="Center"/>
<TextBlock Text=" Adicionar conta" VerticalAlignment="Center"/>
<TextBlock Text=" Add account" VerticalAlignment="Center"/>
</StackPanel>
</Button>
<Button Click="SwitchUser_ButtonClick" Width="160" CornerRadius="16" Margin="4,0,0,0">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock FontFamily="Segoe Fluent Icons" Text="&#xE748;" VerticalAlignment="Center"/>
<TextBlock Text=" Trocar conta" VerticalAlignment="Center"/>
<TextBlock Text=" Switch account" VerticalAlignment="Center"/>
</StackPanel>
</Button>
</StackPanel>
Expand Down
5 changes: 3 additions & 2 deletions REZ/AccountsList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,10 @@ public static async void OpenAddAccountModal(Page page, Action<Account> UpdateUs
ContentDialog dialog = new ContentDialog();
dialog.XamlRoot = page.XamlRoot;
dialog.Style = Microsoft.UI.Xaml.Application.Current.Resources["DefaultContentDialogStyle"] as Style;
dialog.Title = "Hello, let's start!?";
dialog.Title = "Hello, let's get started!";
dialog.PrimaryButtonText = "Add account";
dialog.CloseButtonText = "Cancel";
if (Accounts.Count > 0)
dialog.CloseButtonText = "Cancel";
dialog.DefaultButton = ContentDialogButton.Primary;
dialog.Content = new AddAccountModal(dialog);
dialog.PrimaryButtonClick += delegate { AddAccount(dialog.Content, UpdateUser); };
Expand Down
6 changes: 3 additions & 3 deletions REZ/AddAccountModal.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">

<StackPanel VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Background="White" MaxWidth="464">
<TextBlock Text="Seja bem-vindo ao REZ! Com este aplicativo é possível gerenciar diferentes contas para realizar pedidos em sua mesa!"
<TextBlock Text="Welcome to REZ! With this app it is possible to manage different accounts to order food directly from your table!"
TextWrapping="Wrap"
Margin="0,0,0,8"/>

<TextBox x:Name="Name" Header="Qual o seu nome?*" Margin="0,0,0,12"
<TextBox x:Name="Name" Header="What is your name?*" Margin="0,0,0,12"
IsSpellCheckEnabled="True"
TextChanged="InputName_TextChange" InputScope="PersonalFullName"
SelectionHighlightColor="Green" MinWidth="400"
PlaceholderText="Ex.: John Doe"
/>
<TextBlock x:Name="ErrorMessage_Name" Text="Test" Foreground="#C42B1C" TextWrapping="Wrap" FontSize="12" Margin="0,-12,0,12" Visibility="Collapsed"/>

<TextBox x:Name="CPF" Header="E o seu CPF?*" Margin="0"
<TextBox x:Name="CPF" Header="What is your CPF? (Brazil)*" Margin="0"
TextChanged="CPFNumber_TextChange" InputScope="Number"
SelectionHighlightColor="Green" MinWidth="400"
PlaceholderText="Ex.: 123.456.789-99"
Expand Down
6 changes: 3 additions & 3 deletions REZ/AddAccountModal.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ private void InputName_TextChange(object sender, TextChangedEventArgs e)
ErrorMessage_Name.Visibility = Visibility.Visible;
IsNameInputValid = false;
ErrorMessage_Name.Text = String.IsNullOrEmpty(Name.Text)
? $"Por favor digite um nome."
: $"{Name.Text} - não e um nome valido. Por favor insira outro nome.";
? $"Please type in a name."
: $"{Name.Text} - is not a valid name. Please insert another name.";
}
else
{
Expand Down Expand Up @@ -97,7 +97,7 @@ private void CPFNumber_TextChange(object sender, TextChangedEventArgs e)
if (String.IsNullOrEmpty(CPF.Text))
{
ErrorMessage_CPF.Visibility = Visibility.Visible;
ErrorMessage_CPF.Text = CPF.Text + "Por favor digite um número de CPF.";
ErrorMessage_CPF.Text = CPF.Text + "Please type in another CPF number.";
IsCPFInputValid = false;
}
//else if (!ValidateCPF(CPF.Text))
Expand Down
2 changes: 1 addition & 1 deletion REZ/CloseAccountConfirmation.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">

<StackPanel VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Background="White">
<TextBlock Text="Não se preocupe, você poderá voltar depois :)" TextWrapping="Wrap" />
<TextBlock Text="Don't worry, you can always come back later and create a new account :)" TextWrapping="Wrap" />
</StackPanel>

</Page>
6 changes: 3 additions & 3 deletions REZ/FoodMenu.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@
<StackPanel>
<TextBlock x:Name="Greetings" Text="" Style="{ThemeResource BaseTextBlockStyle}" Margin="0" />
<TextBlock Margin="0,0,0,12">
<Run Text="You are in table" />
<Run Text="You are at the table" />
<Run Text="#1." />
</TextBlock>
<StackPanel Orientation="Vertical">
<Button Click="AccountInfoRedirect" Width="328" CornerRadius="16" Margin="0,4,0,4">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock FontFamily="Segoe Fluent Icons" Text="&#xEA37;" VerticalAlignment="Center"/>
<TextBlock Text=" See previous orders" VerticalAlignment="Center"/>
<TextBlock Text=" See order history" VerticalAlignment="Center"/>
</StackPanel>
</Button>
<StackPanel Orientation="Horizontal" Margin="0,4,0,0">
Expand Down Expand Up @@ -75,7 +75,7 @@
<Button Content="All" CornerRadius="18" Click="FilterByCategory_ButtonClick" Style="{StaticResource AccentButtonStyle}"/>
<Button Content="Drinks" CornerRadius="18" Click="FilterByCategory_ButtonClick"/>
<Button Content="Food" CornerRadius="18" Click="FilterByCategory_ButtonClick"/>
<Button Content="Coffee and Desserts" CornerRadius="18" Click="FilterByCategory_ButtonClick"/>
<Button Content="Cafeteria" CornerRadius="18" Click="FilterByCategory_ButtonClick"/>
</StackPanel>

<StackPanel Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="0,24,0,0">
Expand Down
3 changes: 2 additions & 1 deletion REZ/FoodMenu.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,8 @@ private async void CreateAccount(object sender, RoutedEventArgs e)
dialog.Style = Microsoft.UI.Xaml.Application.Current.Resources["DefaultContentDialogStyle"] as Style;
dialog.Title = "Olá! Vamos começar?";
dialog.PrimaryButtonText = "Adicionar usuário";
dialog.CloseButtonText = "Cancelar";
if (User != null)
dialog.CloseButtonText = "Cancelar";
dialog.DefaultButton = ContentDialogButton.Primary;
dialog.Content = new AddAccountModal(dialog);
dialog.PrimaryButtonClick += delegate { AddAccount(dialog.Content); };
Expand Down
2 changes: 1 addition & 1 deletion REZ/ItemDialogModal.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<TextBox Header="Any comments?" Margin="0,12,0,12" AutomationProperties.Name="simple TextBox"
TextWrapping="Wrap" AcceptsReturn="True" IsSpellCheckEnabled="True"
SelectionHighlightColor="Green" MinWidth="400"
PlaceholderText="Ex.: No onios, mayonese on the side, etc..."/>
PlaceholderText="Ex.: No onions, mayonnaise on the side, etc..."/>

<NumberBox x:Name="Qty"
Margin="0,12,0,12"
Expand Down
6 changes: 3 additions & 3 deletions REZ/MainPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
<StackPanel>
<TextBlock x:Name="Greetings" Text="" Style="{ThemeResource BaseTextBlockStyle}" Margin="0" />
<TextBlock Margin="0,0,0,12">
<Run Text="You are in table" />
<Run Text="You are at the table" />
<Run Text="#1." />
</TextBlock>
<StackPanel Orientation="Vertical">
<Button Click="AccountInfoRedirect" Width="328" CornerRadius="16" Margin="0,4,0,4">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock FontFamily="Segoe Fluent Icons" Text="&#xEA37;" VerticalAlignment="Center"/>
<TextBlock Text=" See previous orders" VerticalAlignment="Center"/>
<TextBlock Text=" See order history" VerticalAlignment="Center"/>
</StackPanel>
</Button>
<StackPanel Orientation="Horizontal" Margin="0,4,0,0">
Expand Down Expand Up @@ -98,7 +98,7 @@
<Button x:Name="Coffe" Margin="24" Click="OpenFoodMenu" Width="164" Height="164">
<StackPanel Orientation="Vertical" VerticalAlignment="Center" HorizontalAlignment="Center">
<PersonPicture MaxWidth="128" ProfilePicture="https://images.pexels.com/photos/3491211/pexels-photo-3491211.jpeg"/>
<TextBlock Margin="10" Text="Coffee and Desserts" FontWeight="Bold" TextAlignment="Center"/>
<TextBlock Margin="10" Text="Cafeteria" FontWeight="Bold" TextAlignment="Center"/>
</StackPanel>
</Button>
</StackPanel>
Expand Down
14 changes: 7 additions & 7 deletions REZ/Properties/Products.json
Original file line number Diff line number Diff line change
Expand Up @@ -201,55 +201,55 @@
},
{
"Name": "Croissant",
"Category": "Coffee and Desserts",
"Category": "Cafeteria",
"SubCategory": "Sweets",
"Description": "Our Croissant recipe with powdered sugar.",
"Price": 8,
"ImageSource": "../Assets/CafeteriaImages/Croissant.jpeg"
},
{
"Name": "Cappuccino",
"Category": "Coffee and Desserts",
"Category": "Cafeteria",
"SubCategory": "Coffees",
"Description": "A creamy cappuccino topped with cocoa powder.",
"Price": 9,
"ImageSource": "../Assets/CafeteriaImages/Cappuccino.jpeg"
},
{
"Name": "Espresso Coffee",
"Category": "Coffee and Desserts",
"Category": "Cafeteria",
"SubCategory": "Coffees",
"Description": "Traditional Espresso made with Orfeu coffee.",
"Price": 5,
"ImageSource": "../Assets/CafeteriaImages/Espresso.jpeg"
},
{
"Name": "Chocolate Brownie",
"Category": "Coffee and Desserts",
"Category": "Cafeteria",
"SubCategory": "Sweets",
"Description": "Belgian chocolate brownie.",
"Price": 8,
"ImageSource": "../Assets/CafeteriaImages/ChocolateBrownie.jpeg"
},
{
"Name": "Strawberry Gelato",
"Category": "Coffee and Desserts",
"Category": "Cafeteria",
"SubCategory": "Sweets",
"Description": "Creamy strawberry-flavored gelato.",
"Price": 10,
"ImageSource": "../Assets/CafeteriaImages/GelattoStrawberry.jpeg"
},
{
"Name": "Chocolate Sorbet",
"Category": "Coffee and Desserts",
"Category": "Cafeteria",
"SubCategory": "Sweets",
"Description": "Classic dark chocolate sorbet.",
"Price": 10,
"ImageSource": "../Assets/CafeteriaImages/ChocolateSorbet.jpeg"
},
{
"Name": "Tiramisù",
"Category": "Coffee and Desserts",
"Category": "Cafeteria",
"SubCategory": "Sweets",
"Description": "A classic Italian dessert with layers of biscuits, coffee, and mascarpone.",
"Price": 15,
Expand Down
8 changes: 4 additions & 4 deletions REZ/ShoppingCartModal.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
Text=""
TextWrapping="Wrap"
Margin="12, 12, 12, 0"/>
<TextBlock Text="Take a look at your order"
<TextBlock Text="Please review your order"
TextWrapping="Wrap"
FontSize="20"
FontWeight="Bold"
Expand Down Expand Up @@ -63,9 +63,9 @@
StrokeThickness="1"
Margin="10"/>

<StackPanel Width="468" VerticalAlignment="Center" HorizontalAlignment="Center">
<TextBlock Text="Select the accounts to split this order with: " TextAlignment="Left" Foreground="Gray" />
<ComboBox x:Name="AccountsComboBox" Width="400" >
<StackPanel Width="468" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="0,12,0,12">
<TextBlock Text="Select the accounts to split this order with: " TextAlignment="Left" Foreground="Gray" Margin="0,0,0,8" />
<ComboBox x:Name="AccountsComboBox" Width="468" >
<ComboBox.ItemTemplate>
<DataTemplate>
<CheckBox Content="{Binding Name}" Tag="{Binding CPF}" IsChecked="{Binding IsSelected}" IsEnabled="{Binding IsEnabled}" Checked="AddAccountToSplit" Unchecked="RemoveAccountToSplit" />
Expand Down
2 changes: 1 addition & 1 deletion REZ/SwitchAccountModal.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@
</ListView.ItemTemplate>
</ListView>
</StackPanel>

</Page>

0 comments on commit 97ed94d

Please sign in to comment.