Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions assets/i18n/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -1211,7 +1211,6 @@
"holidayOptional": "Optional Holiday",
"holidayObservance": "Observance",
"holidayOther": "Holiday",

"region": "Region",
"accountRegionHint": "This region will be used for content delivery and localization.",
"settingsCustomFontsHelper": "Use comma to seprate.",
Expand Down Expand Up @@ -2770,7 +2769,7 @@
"authFactorEnabled": "Enabled",
"authFactorDisabled": "Disabled",
"profileFields": "Profile Fields",
"physicalPassports": "Physical Passports",
"physicalPassports": "Physical Passports",
"physicalPassport": "Physical Passport",
"addPhysicalPassport": "Add Passport",
"physicalPassportsEmpty": "No physical passports yet",
Expand Down Expand Up @@ -3222,5 +3221,17 @@
"failedToLoadPost": "Failed to load post",
"expandPostDetails": "Expand post details",
"restoreSplitView": "Restore split view",
"closePostDetails": "Close post details"
"closePostDetails": "Close post details",
"customizeNavigation": "Customize Navigation",
"restoreDefaults": "Restore Defaults",
"bottomNavigation": "Bottom Navigation",
"railNavigation": "Rail Navigation",
"notLoggedIn": "Not logged in",
"tapToSignIn": "Tap to sign in",
"systemDefault": "System Default",
"aboutDeviceInformation": "Device Information",
"welcomeToSolarNetwork": "Welcome to\nthe Solar Network",
"loginToAccessDashboard": "Login to access your personalized dashboard with friends, notifications, chats, and more!",
"now": "Now",
"pollFeedback": "Poll Feedback"
}
507 changes: 301 additions & 206 deletions assets/i18n/zh-CN.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/misc/about.dart
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ class _AboutScreenState extends ConsumerState<AboutScreen> {
if (_deviceInfo != null)
_buildSection(
context,
title: 'Device Information',
title: 'aboutDeviceInformation'.tr(),
children: [
FutureBuilder<String>(
future: udid.getDeviceName(),
Expand Down
4 changes: 2 additions & 2 deletions lib/misc/dashboard/dash.dart
Original file line number Diff line number Diff line change
Expand Up @@ -882,7 +882,7 @@ class ChatListCard extends HookConsumerWidget {
error: (error, stack) => Center(child: Text('Error: $error')),
data: (rooms) {
if (rooms.isEmpty) {
return const Center(child: Text('No chat rooms available'));
return Center(child: Text('noChatRoomsAvailable'.tr()));
}
// Take only the first 5 rooms
final recentRooms = rooms.take(5).toList();
Expand Down Expand Up @@ -1206,7 +1206,7 @@ class _UnauthorizedCard extends HookConsumerWidget {
),
const Gap(16),
Text(
'Welcome to\nthe Solar Network',
'welcomeToSolarNetwork'.tr(),
style: Theme.of(
context,
).textTheme.headlineSmall?.copyWith(fontWeight: FontWeight.bold),
Expand Down
6 changes: 3 additions & 3 deletions lib/misc/settings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class SettingsScreen extends HookConsumerWidget {
case 'zh-CN':
return '简体中文';
case 'zh-OG':
return '文言文 (华夏)';
return '文言 (華夏)';
case 'zh-TW':
return '繁體中文 (台灣)';
default:
Expand Down Expand Up @@ -1788,7 +1788,7 @@ class _TtsVoiceSelectorState extends State<_TtsVoiceSelector> {
items: [
DropdownMenuItem<String?>(
value: null,
child: const Text('System Default'),
child: Text('systemDefault').tr(),
),
..._voices.map((voice) {
return DropdownMenuItem<String?>(
Expand Down Expand Up @@ -2191,7 +2191,7 @@ class _EmbeddedAboutContent extends HookConsumerWidget {
const SizedBox(height: 16),
_buildSection(
context,
title: 'Device Information',
title: 'aboutdeviceInformation'.tr(),
children: [
FutureBuilder<String>(
future: udid.getDeviceName(),
Expand Down
14 changes: 7 additions & 7 deletions lib/misc/tabs_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -359,14 +359,14 @@ class _TabsScreenContentState extends ConsumerState<_TabsScreenContent> {
CrossAxisAlignment.start,
children: [
Text(
'Not logged in',
'notLoggedIn'.tr(),
style: Theme.of(context)
.textTheme
.titleSmall
?.copyWith(color: Colors.white),
),
Text(
'Tap to sign in',
'tapToSignIn'.tr(),
style: Theme.of(context)
.textTheme
.bodySmall
Expand Down Expand Up @@ -421,7 +421,7 @@ class _TabsScreenContentState extends ConsumerState<_TabsScreenContent> {
const Divider(),
ListTile(
leading: const Icon(Symbols.tune_rounded),
title: Text('Customize Navigation'),
title: Text('customizeNavigation').tr(),
contentPadding: const EdgeInsets.symmetric(horizontal: 28),
dense: true,
onTap: () {
Expand Down Expand Up @@ -694,15 +694,15 @@ class _NavigationCustomizationSheetState
final allBottomCandidates = widget.allDestinations;

return SheetScaffold(
titleText: 'Customize Navigation',
titleText: 'customizeNavigation'.tr(),
actions: [
IconButton(
onPressed: () {
widget.onRestoreDefaults();
Navigator.of(context).pop();
},
icon: const Icon(Symbols.refresh_rounded),
tooltip: 'Restore Defaults',
tooltip: 'restoreDefaults'.tr(),
),
IconButton(
onPressed: () {
Expand All @@ -720,7 +720,7 @@ class _NavigationCustomizationSheetState
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'Bottom Navigation',
'bottomNavigation'.tr(),
style: Theme.of(context).textTheme.titleMedium,
),
const SizedBox(height: 8),
Expand Down Expand Up @@ -776,7 +776,7 @@ class _NavigationCustomizationSheetState
),
const SizedBox(height: 16),
Text(
'Rail Navigation',
'railNavigation'.tr(),
style: Theme.of(context).textTheme.titleMedium,
),
const SizedBox(height: 8),
Expand Down
4 changes: 2 additions & 2 deletions lib/notifications/notification.dart
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ class SkeletonNotificationTile extends StatelessWidget {
Row(
spacing: 6,
children: [
Text('Loading...').fontSize(11),
Text('loading'.tr()).fontSize(11),
Skeleton.ignore(child: Text('·').fontSize(11).bold()),
Text('Now').fontSize(11),
Text('now'.tr()).fontSize(11),
],
).opacity(0.75).padding(bottom: 4),
MarkdownTextContent(
Expand Down
4 changes: 2 additions & 2 deletions lib/polls/polls_widgets/poll/poll_feedback.dart
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class PollFeedbackSheet extends HookConsumerWidget {
final provider = pollFeedbackNotifierProvider(pollId);

return SheetScaffold(
titleText: title ?? 'Poll feedback',
titleText: title ?? 'pollFeedback'.tr(),
child: poll.when(
data: (data) => CustomScrollView(
slivers: [
Expand Down Expand Up @@ -175,7 +175,7 @@ class _PollAnswerTile extends StatelessWidget {
case SnPollQuestionType.yesNo:
final val = ansMap[q.id];
if (val is bool) {
return val ? 'Yes' : 'No';
return val ? 'yes'.tr() : 'no'.tr();
}
return '—';
case SnPollQuestionType.rating:
Expand Down
2 changes: 1 addition & 1 deletion lib/polls/polls_widgets/poll/poll_stats_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class PollStatsWidget extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
_BarStatRow(
label: 'Yes',
label: 'yes',
count: yes,
fraction: yesPct,
color: Colors.green.shade600,
Expand Down
Loading