Skip to content
This repository has been archived by the owner on Dec 20, 2024. It is now read-only.

Commit

Permalink
Small UI fixes and translations
Browse files Browse the repository at this point in the history
"No transactions found" now translated
Notification text translated
Font size adjustments in transactions list
Light and dark theme current setting displayed properly
Increased amount limits
Increased character limit
Vibration feedback differs based on action
  • Loading branch information
jameskokoska committed Aug 11, 2023
1 parent 6359d97 commit 3caa41d
Show file tree
Hide file tree
Showing 9 changed files with 799 additions and 27 deletions.
699 changes: 699 additions & 0 deletions budget_simple/assets/translations/translationsApp.json

Large diffs are not rendered by default.

64 changes: 63 additions & 1 deletion budget_simple/assets/translations/translationsAppKeyed.json
Original file line number Diff line number Diff line change
Expand Up @@ -1201,7 +1201,7 @@
"cs": "Byla tam chyba. Prosím zkuste to znovu později."
},
"Thank you for supporting Allowance!": {
"en": "Thank you for supporting the Allowance!",
"en": "Thank you for supporting Allowance!",
"fr": "Merci de soutenir l'Allocation !",
"es": "¡Gracias por apoyar el Subsidio!",
"zh": "感谢您对津贴的支持!",
Expand Down Expand Up @@ -1240,6 +1240,68 @@
"th": "บริจาครายเดือน",
"cs": "Darujte měsíčně"
},
"No transactions found": {
"en": "No transactions found",
"fr": "Aucune transaction trouvée",
"es": "No se encontraron transacciones",
"zh": "没有发现交易",
"hi": "कोई परिणाम नहीं मिले",
"ar": "لم يتم العثور على معاملات",
"pt": "Nenhuma transação encontrada",
"ru": "Транзакций не найдено",
"ja": "トランザクションは見つかりません",
"de": "Keine Transaktionen gefunden",
"ko": "거래가 발견되지 않았습니다",
"tr": "İşlem bulunamadı",
"it": "Nessuna transazione trovata",
"vi": "Không tìm thấy giao dịch nào",
"pl": "Nie znaleziono transakcji",
"nl": "Geen transacties gevonden",
"th": "ไม่พบธุรกรรม",
"cs": "Nebyly nalezeny žádné transakce"
}
},
"Store": {
"English": {
"en": "English",
"fr": "French",
"es": "Spanish",
"zh": "Chinese (Simplified)",
"hi": "Hindi",
"ar": "Arabic",
"pt": "Portuguese",
"ru": "Russian",
"ja": "Japanese",
"de": "German",
"ko": "Korean",
"tr": "Turkish",
"it": "Italian",
"vi": "Vietnamese",
"pl": "Polish",
"nl": "Dutch",
"th": "Thai",
"cs": "Czech"
},
"The simplest way to track your spending and analyze your habits.": {
"en": "The simplest way to track your spending and analyze your habits.",
"fr": "Le moyen le plus simple de suivre vos dépenses et d'analyser vos habitudes.",
"es": "La forma más fácil de realizar un seguimiento de sus hábitos de gasto.",
"zh": "跟踪支出和分析习惯的最简单方法。",
"hi": "अपने खर्च को ट्रैक करने और अपनी आदतों का विश्लेषण करने का सबसे आसान तरीका।",
"ar": "أبسط طريقة لتتبع إنفاقك وتحليل عاداتك.",
"pt": "A maneira mais simples de controlar seus gastos e analisar seus hábitos.",
"ru": "Самый простой способ отслеживать свои расходы и анализировать свои привычки.",
"ja": "支出を追跡し、習慣を分析する最も簡単な方法。",
"de": "Einfachste Weg, Ihre Ausgaben zu verfolgen und Ihre Gewohnheiten zu analysieren.",
"ko": "지출을 추적하고 습관을 분석하는 가장 간단한 방법입니다.",
"tr": "Harcamalarınızı takip etmenin ve alışkanlıklarınızı analiz etmenin en basit yolu.",
"it": "Più semplice per tenere traccia delle tue spese e analizzare le tue abitudini.",
"vi": "Cách đơn giản nhất để theo dõi chi tiêu và phân tích thói quen của bạn.",
"pl": "Najprostszy sposób śledzenia wydatków i analizowania nawyków.",
"nl": "Eenvoudigste manier om uw uitgaven bij te houden en uw gewoonten te analyseren",
"th": "วิธีที่ง่ายที่สุดในการติดตามการใช้จ่ายและวิเคราะห์พฤติกรรมของคุณ",
"cs": "Nejjednodušší způsob, jak sledovat své výdaje a analyzovat své návyky."
},
"Do you struggle to keep track of your spending? Are you tired of constantly overspending and not knowing where your money goes?": {
"en": "Do you struggle to keep track of your spending? Are you tired of constantly overspending and not knowing where your money goes?",
"fr": "Avez-vous du mal à suivre vos dépenses ? Vous en avez marre de toujours trop dépenser et de ne pas savoir où va votre argent ?",
Expand Down
2 changes: 1 addition & 1 deletion budget_simple/lib/database/tables.dart
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class TransactionsDatabase extends _$TransactionsDatabase {

Future<int> createOrUpdateSpendingLimit(SpendingLimitData spendingLimit) {
if (spendingLimit.amount > MAX_AMOUNT) {
spendingLimit = spendingLimit.copyWith(amount: 999999);
spendingLimit = spendingLimit.copyWith(amount: MAX_AMOUNT - 1);
}
return into($SpendingLimitTable(attachedDatabase))
.insertOnConflictUpdate(spendingLimit);
Expand Down
2 changes: 1 addition & 1 deletion budget_simple/lib/pages/about_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class AboutPage extends StatelessWidget {
SettingsContainerDropdown(
icon: Icons.lightbulb_outline,
title: "Theme Mode",
initial: "System",
initial: themeMode,
items: const ["System", "Light", "Dark"],
onChanged: (selected) {
themeMode = selected;
Expand Down
11 changes: 8 additions & 3 deletions budget_simple/lib/pages/home_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ class HomePageState extends State<HomePage> {
addToAmount(".");
} else if (event.logicalKey == LogicalKeyboardKey.numpadDecimal) {
addToAmount(".");
} else if (event.logicalKey == LogicalKeyboardKey.comma) {
} else if (event.logicalKey == LogicalKeyboardKey.comma &&
getDecimalSeparator() == ",") {
addToAmount(".");
} else if (event.logicalKey == LogicalKeyboardKey.backspace) {
addToAmount("<");
Expand Down Expand Up @@ -140,7 +141,11 @@ class HomePageState extends State<HomePage> {
currentFocus.unfocus();
}
if (sharedPreferences.getBool("hapticFeedback") ?? true) {
HapticFeedback.heavyImpact();
if (action == ">" || action == "+") {
HapticFeedback.mediumImpact();
} else {
HapticFeedback.selectionClick();
}
}
if (action == "<") {
if (amountCalculated.isNotEmpty) {
Expand Down Expand Up @@ -442,7 +447,7 @@ class HomePageState extends State<HomePage> {
controller: _textController,
focusNode: focusNodeTextInput,
textAlign: TextAlign.right,
maxLength: 40,
maxLength: 60,
scrollPadding: const EdgeInsets.all(10),
decoration: InputDecoration(
contentPadding: const EdgeInsets.symmetric(horizontal: 20),
Expand Down
2 changes: 1 addition & 1 deletion budget_simple/lib/struct/database_global.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import 'package:shared_preferences/shared_preferences.dart';

late TransactionsDatabase database;

double MAX_AMOUNT = 999999;
double MAX_AMOUNT = 999999999999999;
int DEFAULT_LIMIT = 100;

late SharedPreferences sharedPreferences;
Expand Down
5 changes: 3 additions & 2 deletions budget_simple/lib/struct/notifications.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'dart:io';

import 'package:budget_simple/struct/database_global.dart';
import 'package:budget_simple/struct/translations.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter_local_notifications/flutter_local_notifications.dart';
Expand Down Expand Up @@ -96,8 +97,8 @@ Future<bool> scheduleDailyNotification(context, TimeOfDay timeOfDay) async {
NotificationDetails(android: androidNotificationDetails);
await flutterLocalNotificationsPlugin.zonedSchedule(
i,
'Add Transactions',
'Don\'t forget to add transactions to Allowance',
translateText("Add Transactions"),
translateText("Don't forget to add transactions to Allowance"),
dateTime,
notificationDetails,
androidAllowWhileIdle: true,
Expand Down
39 changes: 22 additions & 17 deletions budget_simple/lib/widgets/transaction_entry.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,22 @@ class TransactionEntry extends StatelessWidget {
children: [
TextFont(
maxLines: 2,
fontSize: 25,
fontSize: 22,
fontWeight: FontWeight.bold,
text: currency.format(transaction.amount * -1),
),
const SizedBox(height: 3),
TextFont(
maxLines: 2,
fontSize: 18,
fontSize: 16,
text: DateFormat('MMM d, yyyy')
.format(transaction.dateCreated),
),
const SizedBox(height: 3),
transaction.name != ""
? TextFont(
text: transaction.name,
fontSize: 17,
fontSize: 16,
maxLines: 2,
)
: const SizedBox.shrink(),
Expand Down Expand Up @@ -95,15 +97,15 @@ class TransactionEntry extends StatelessWidget {
TextFont(
text: DateFormat('MMM d, yyyy')
.format(transaction.dateCreated),
fontSize: 23,
fontSize: 22,
maxLines: 5,
fontWeight: FontWeight.bold,
),
const SizedBox(height: 1),
const SizedBox(height: 3),
TextFont(
text: DateFormat('h:mma')
.format(transaction.dateCreated),
fontSize: 17,
fontSize: 16,
maxLines: 5,
),
],
Expand All @@ -117,21 +119,24 @@ class TransactionEntry extends StatelessWidget {
children: [
TextFont(
text: currency.format(transaction.amount * -1),
fontSize: 25,
fontSize: 22,
fontWeight: FontWeight.bold,
textAlign: TextAlign.right,
maxLines: 5,
),
transaction.name != ""
? TextFont(
text: transaction.name,
fontSize: 17,
maxLines: 5,
textAlign: TextAlign.right,
textColor:
Theme.of(context).colorScheme.tertiary,
)
: const SizedBox.shrink(),
Padding(
padding: const EdgeInsets.only(top: 3),
child: transaction.name != ""
? TextFont(
text: transaction.name,
fontSize: 16,
maxLines: 5,
textAlign: TextAlign.right,
textColor:
Theme.of(context).colorScheme.tertiary,
)
: const SizedBox.shrink(),
),
],
),
),
Expand Down
2 changes: 1 addition & 1 deletion budget_simple/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: budget_simple
description: A simple budget app.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev

version: 1.3.2+12
version: 1.3.3+13

environment:
sdk: '>=2.19.0-444.0.dev <3.0.0'
Expand Down

0 comments on commit 3caa41d

Please sign in to comment.