mirror of
https://github.com/inventree/inventree-app.git
synced 2025-04-28 05:26:47 +00:00
Fixed (most) of the raw text instances
This commit is contained in:
parent
c8583aba04
commit
34a6a43d35
@ -116,7 +116,7 @@ class InvenTreeAboutWidget extends StatelessWidget {
|
||||
tiles.add(
|
||||
ListTile(
|
||||
title: Text(I18N.of(context).releaseNotes),
|
||||
subtitle: Text("Display app release notes"),
|
||||
subtitle: Text(I18N.of(context).appReleaseNotes),
|
||||
leading: FaIcon(FontAwesomeIcons.fileAlt),
|
||||
onTap: () {
|
||||
_releaseNotes(context);
|
||||
@ -127,7 +127,7 @@ class InvenTreeAboutWidget extends StatelessWidget {
|
||||
tiles.add(
|
||||
ListTile(
|
||||
title: Text(I18N.of(context).credits),
|
||||
subtitle: Text("Additional app credits"),
|
||||
subtitle: Text(I18N.of(context).appCredits),
|
||||
leading: FaIcon(FontAwesomeIcons.bullhorn),
|
||||
onTap: () {
|
||||
_credits(context);
|
||||
|
@ -95,8 +95,8 @@ class _InvenTreeAppSettingsState extends State<InvenTreeAppSettingsWidget> {
|
||||
leading: FaIcon(FontAwesomeIcons.shapes),
|
||||
),
|
||||
ListTile(
|
||||
title: Text("Include Subcategories"),
|
||||
subtitle: Text("Display subcategory parts in list view"),
|
||||
title: Text(I18N.of(context).includeSubcategories),
|
||||
subtitle: Text(I18N.of(context).includeSubcategoriesDetail),
|
||||
leading: FaIcon(FontAwesomeIcons.sitemap),
|
||||
trailing: Switch(
|
||||
value: partSubcategory,
|
||||
@ -111,8 +111,8 @@ class _InvenTreeAppSettingsState extends State<InvenTreeAppSettingsWidget> {
|
||||
leading: FaIcon(FontAwesomeIcons.boxes),
|
||||
),
|
||||
ListTile(
|
||||
title: Text("Include Sublocations"),
|
||||
subtitle: Text("Display sublocation items in list view"),
|
||||
title: Text(I18N.of(context).includeSublocations),
|
||||
subtitle: Text(I18N.of(context).includeSublocationsDetail),
|
||||
leading: FaIcon(FontAwesomeIcons.sitemap),
|
||||
trailing: Switch(
|
||||
value: stockSublocation,
|
||||
@ -129,7 +129,7 @@ class _InvenTreeAppSettingsState extends State<InvenTreeAppSettingsWidget> {
|
||||
),
|
||||
ListTile(
|
||||
title: Text(I18N.of(context).serverError),
|
||||
subtitle: Text("Play audible tone on server error"),
|
||||
subtitle: Text(I18N.of(context).soundOnServerError),
|
||||
leading: FaIcon(FontAwesomeIcons.server),
|
||||
trailing: Switch(
|
||||
value: serverSounds,
|
||||
@ -138,7 +138,7 @@ class _InvenTreeAppSettingsState extends State<InvenTreeAppSettingsWidget> {
|
||||
),
|
||||
ListTile(
|
||||
title: Text(I18N.of(context).barcodeTones),
|
||||
subtitle: Text("Play audible tones for barcode actions"),
|
||||
subtitle: Text(I18N.of(context).soundOnBarcodeAction),
|
||||
leading: FaIcon(FontAwesomeIcons.qrcode),
|
||||
trailing: Switch(
|
||||
value: barcodeSounds,
|
||||
|
@ -300,7 +300,7 @@ class _InvenTreeLoginSettingsState extends State<InvenTreeLoginSettingsWidget> {
|
||||
// No profile available!
|
||||
children.add(
|
||||
ListTile(
|
||||
title: Text("No profiles available"),
|
||||
title: Text(I18N.of(context).profileNone),
|
||||
)
|
||||
);
|
||||
}
|
||||
|
@ -163,7 +163,7 @@ class _CategoryDisplayState extends RefreshableState<CategoryDisplayWidget> {
|
||||
if (category == null) {
|
||||
return Card(
|
||||
child: ListTile(
|
||||
title: Text("Top level part category"),
|
||||
title: Text(I18N.of(context).partCategoryTopLevel)
|
||||
)
|
||||
);
|
||||
} else {
|
||||
@ -248,8 +248,8 @@ class _CategoryDisplayState extends RefreshableState<CategoryDisplayWidget> {
|
||||
tiles.add(progressIndicator());
|
||||
} else if (_subcategories.length == 0) {
|
||||
tiles.add(ListTile(
|
||||
title: Text("No Subcategories"),
|
||||
subtitle: Text("No subcategories available")
|
||||
title: Text(I18N.of(context).noSubcategories),
|
||||
subtitle: Text(I18N.of(context).noSubcategoriesAvailable)
|
||||
));
|
||||
} else {
|
||||
tiles.add(SubcategoryList(_subcategories));
|
||||
|
@ -66,13 +66,13 @@ class ImagePickerField extends FormField<File> {
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: <Widget>[
|
||||
FlatButton(
|
||||
child: Text("Select Image"),
|
||||
child: Text(I18N.of(context).selectImage),
|
||||
onPressed: () {
|
||||
_selectFromGallery(state);
|
||||
},
|
||||
),
|
||||
FlatButton(
|
||||
child: Text("Take Picture"),
|
||||
child: Text(I18N.of(context).takePicture),
|
||||
onPressed: () {
|
||||
_selectFromCamera(state);
|
||||
},
|
||||
@ -81,7 +81,7 @@ class ImagePickerField extends FormField<File> {
|
||||
),
|
||||
);
|
||||
return ListTile(
|
||||
title: Text("Select Image"),
|
||||
title: Text(I18N.of(context).selectImage),
|
||||
);
|
||||
}
|
||||
);
|
||||
|
@ -104,22 +104,6 @@ class _InvenTreeHomePageState extends State<InvenTreeHomePage> {
|
||||
});
|
||||
}
|
||||
|
||||
void _unsupported() {
|
||||
showDialog(
|
||||
context: context,
|
||||
child: new SimpleDialog(
|
||||
title: new Text("Unsupported"),
|
||||
children: <Widget>[
|
||||
ListTile(
|
||||
title: Text("This feature is not yet supported"),
|
||||
subtitle: Text("It will be supported in an upcoming release"),
|
||||
)
|
||||
],
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
void _loadProfile() async {
|
||||
|
||||
_profile = await UserProfileDBManager().getSelectedProfile();
|
||||
@ -144,8 +128,8 @@ class _InvenTreeHomePageState extends State<InvenTreeHomePage> {
|
||||
// Tap to select / create a profile
|
||||
if (_profile == null) {
|
||||
return ListTile(
|
||||
title: Text("No Profile Selected"),
|
||||
subtitle: Text("Tap to create or select a profile"),
|
||||
title: Text(I18N.of(context).profileNotSelected),
|
||||
subtitle: Text(I18N.of(context).profileTapToCreate),
|
||||
leading: FaIcon(FontAwesomeIcons.server),
|
||||
trailing: FaIcon(
|
||||
FontAwesomeIcons.user,
|
||||
@ -160,7 +144,7 @@ class _InvenTreeHomePageState extends State<InvenTreeHomePage> {
|
||||
// Profile is selected ...
|
||||
if (InvenTreeAPI().isConnecting()) {
|
||||
return ListTile(
|
||||
title: Text("Connecting to server..."),
|
||||
title: Text(I18N.of(context).serverConnecting),
|
||||
subtitle: Text("${InvenTreeAPI().baseUrl}"),
|
||||
leading: FaIcon(FontAwesomeIcons.server),
|
||||
trailing: Spinner(
|
||||
@ -173,7 +157,7 @@ class _InvenTreeHomePageState extends State<InvenTreeHomePage> {
|
||||
);
|
||||
} else if (InvenTreeAPI().isConnected()) {
|
||||
return ListTile(
|
||||
title: Text("Connected to server"),
|
||||
title: Text(I18N.of(context).serverConnected),
|
||||
subtitle: Text("${InvenTreeAPI().baseUrl}"),
|
||||
leading: FaIcon(FontAwesomeIcons.server),
|
||||
trailing: FaIcon(
|
||||
@ -186,7 +170,7 @@ class _InvenTreeHomePageState extends State<InvenTreeHomePage> {
|
||||
);
|
||||
} else {
|
||||
return ListTile(
|
||||
title: Text("Could not connect to server"),
|
||||
title: Text(I18N.of(context).serverCouldNotConnect),
|
||||
subtitle: Text("${_profile.server}"),
|
||||
leading: FaIcon(FontAwesomeIcons.server),
|
||||
trailing: FaIcon(
|
||||
|
@ -183,7 +183,7 @@ class _LocationDisplayState extends RefreshableState<LocationDisplayWidget> {
|
||||
if (includeActions) {
|
||||
children.add(
|
||||
ListTile(
|
||||
title: Text("Parent Category"),
|
||||
title: Text(I18N.of(context).parentCategory),
|
||||
subtitle: Text("${location.parentpathstring}"),
|
||||
leading: FaIcon(FontAwesomeIcons.levelUpAlt),
|
||||
onTap: () {
|
||||
@ -286,8 +286,8 @@ List<Widget> detailTiles() {
|
||||
tiles.add(SublocationList(_sublocations));
|
||||
} else {
|
||||
tiles.add(ListTile(
|
||||
title: Text("No Sublocations"),
|
||||
subtitle: Text("No sublocations available")
|
||||
title: Text(I18N.of(context).sublocationNone),
|
||||
subtitle: Text(I18N.of(context).sublocationNoneDetail)
|
||||
));
|
||||
}
|
||||
|
||||
|
@ -216,7 +216,7 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
|
||||
if (part.categoryName != null && part.categoryName.isNotEmpty) {
|
||||
tiles.add(
|
||||
ListTile(
|
||||
title: Text("Part Category"),
|
||||
title: Text(I18N.of(context).partCategory),
|
||||
subtitle: Text("${part.categoryName}"),
|
||||
leading: FaIcon(FontAwesomeIcons.sitemap),
|
||||
onTap: () {
|
||||
@ -232,8 +232,8 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
|
||||
} else {
|
||||
tiles.add(
|
||||
ListTile(
|
||||
title: Text("Part Category"),
|
||||
subtitle: Text("Top level part category"),
|
||||
title: Text(I18N.of(context).partCategory),
|
||||
subtitle: Text(I18N.of(context).partCategoryTopLevel),
|
||||
leading: FaIcon(FontAwesomeIcons.sitemap),
|
||||
onTap: () {
|
||||
Navigator.push(context, MaterialPageRoute(builder: (context) => CategoryDisplayWidget(null)));
|
||||
@ -261,7 +261,7 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
|
||||
if (part.supplier_count > 0) {
|
||||
tiles.add(
|
||||
ListTile(
|
||||
title: Text("Suppliers"),
|
||||
title: Text(I18N.of(context).suppliers),
|
||||
leading: FaIcon(FontAwesomeIcons.industry),
|
||||
trailing: Text("${part.supplier_count}"),
|
||||
)
|
||||
@ -289,7 +289,7 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
|
||||
if (false && part.isAssembly) {
|
||||
|
||||
tiles.add(ListTile(
|
||||
title: Text("Bill of Materials"),
|
||||
title: Text(I18N.of(context).billOfMaterials),
|
||||
leading: FaIcon(FontAwesomeIcons.thList),
|
||||
trailing: Text("${part.bomItemCount}"),
|
||||
onTap: null,
|
||||
@ -298,7 +298,7 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
|
||||
|
||||
tiles.add(
|
||||
ListTile(
|
||||
title: Text("Building"),
|
||||
title: Text(I18N.of(context).building),
|
||||
leading: FaIcon(FontAwesomeIcons.tools),
|
||||
trailing: Text("${part.building}"),
|
||||
onTap: null,
|
||||
@ -344,7 +344,7 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
|
||||
// TODO - Add request tests?
|
||||
if (false && part.isTrackable) {
|
||||
tiles.add(ListTile(
|
||||
title: Text("Required Tests"),
|
||||
title: Text(I18N.of(context).testsRequired),
|
||||
leading: FaIcon(FontAwesomeIcons.tasks),
|
||||
trailing: Text("${part.testTemplateCount}"),
|
||||
onTap: null,
|
||||
@ -356,11 +356,10 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
|
||||
if (part.notes.isNotEmpty) {
|
||||
tiles.add(
|
||||
ListTile(
|
||||
title: Text("Notes"),
|
||||
title: Text(I18N.of(context).notes),
|
||||
leading: FaIcon(FontAwesomeIcons.stickyNote),
|
||||
trailing: Text(""),
|
||||
onTap: () {
|
||||
print("Hello");
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) => PartNotesWidget(part))
|
||||
|
@ -157,21 +157,21 @@ class PartSearchDelegate extends SearchDelegate<InvenTreePart> {
|
||||
|
||||
if (query.length == 0) {
|
||||
return ListTile(
|
||||
title: Text("Enter search query")
|
||||
title: Text(I18N.of(context).queryEnter)
|
||||
);
|
||||
}
|
||||
|
||||
if (query.length < 3) {
|
||||
return ListTile(
|
||||
title: Text("Query too short"),
|
||||
subtitle: Text("Enter a query of at least three characters")
|
||||
title: Text(I18N.of(context).queryShort),
|
||||
subtitle: Text(I18N.of(context).queryShortDetail)
|
||||
);
|
||||
}
|
||||
|
||||
if (partResults.length == 0) {
|
||||
return ListTile(
|
||||
title: Text(I18N.of(context).noResults),
|
||||
subtitle: Text("No results for '${query}'")
|
||||
subtitle: Text(I18N.of(context).queryNoResults + " '${query}'")
|
||||
);
|
||||
}
|
||||
|
||||
@ -340,21 +340,21 @@ class StockSearchDelegate extends SearchDelegate<InvenTreeStockItem> {
|
||||
|
||||
if (query.length == 0) {
|
||||
return ListTile(
|
||||
title: Text("Enter search query")
|
||||
title: Text(I18N.of(context).queryEnter)
|
||||
);
|
||||
}
|
||||
|
||||
if (query.length < 3) {
|
||||
return ListTile(
|
||||
title: Text("Query too short"),
|
||||
subtitle: Text("Enter a query of at least three characters")
|
||||
title: Text(I18N.of(context).queryShort),
|
||||
subtitle: Text(I18N.of(context).queryShortDetail)
|
||||
);
|
||||
}
|
||||
|
||||
if (itemResults.length == 0) {
|
||||
return ListTile(
|
||||
title: Text(I18N.of(context).noResults),
|
||||
subtitle: Text("No results for '${query}'")
|
||||
subtitle: Text(I18N.of(context).queryNoResults + " '${query}'")
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -7,6 +7,8 @@ import 'package:InvenTree/widget/refreshable_state.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
|
||||
import '../api.dart';
|
||||
|
||||
|
||||
@ -24,7 +26,7 @@ class _StarredPartState extends RefreshableState<StarredPartWidget> {
|
||||
List<InvenTreePart> starredParts = [];
|
||||
|
||||
@override
|
||||
String getAppBarTitle(BuildContext context) => "Starred Parts";
|
||||
String getAppBarTitle(BuildContext context) => I18N.of(context).partsStarred;
|
||||
|
||||
@override
|
||||
Future<void> request(BuildContext context) async {
|
||||
@ -75,8 +77,8 @@ class _StarredPartState extends RefreshableState<StarredPartWidget> {
|
||||
return ListView(
|
||||
children: [
|
||||
ListTile(
|
||||
title: Text("No Parts"),
|
||||
subtitle: Text("No starred parts available")
|
||||
title: Text(I18N.of(context).partsNone),
|
||||
subtitle: Text(I18N.of(context).partsStarredNone)
|
||||
)
|
||||
],
|
||||
);
|
||||
|
@ -410,7 +410,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
|
||||
ListTile(
|
||||
title: Text(I18N.of(context).stockLocation),
|
||||
leading: FaIcon(FontAwesomeIcons.mapMarkerAlt),
|
||||
subtitle: Text("No location set"),
|
||||
subtitle: Text(I18N.of(context).locationNotSet),
|
||||
)
|
||||
);
|
||||
}
|
||||
@ -508,14 +508,14 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
|
||||
if (!InvenTreeAPI().checkPermission('stock', 'change')) {
|
||||
tiles.add(
|
||||
ListTile(
|
||||
title: Text("Permission Required"),
|
||||
title: Text(I18N.of(context).permissionRequired),
|
||||
leading: FaIcon(FontAwesomeIcons.userTimes)
|
||||
)
|
||||
);
|
||||
|
||||
tiles.add(
|
||||
ListTile(
|
||||
subtitle: Text("Your account does not have permission to perform stock adjustments"),
|
||||
subtitle: Text(I18N.of(context).permissionAccountDenied),
|
||||
)
|
||||
);
|
||||
|
||||
|
@ -178,7 +178,7 @@ class _StockItemTestResultDisplayState extends RefreshableState<StockItemTestRes
|
||||
|
||||
tiles.add(
|
||||
ListTile(
|
||||
title: Text("Test Results",
|
||||
title: Text(I18N.of(context).testResults,
|
||||
style: TextStyle(fontWeight: FontWeight.bold)
|
||||
)
|
||||
)
|
||||
@ -193,8 +193,8 @@ class _StockItemTestResultDisplayState extends RefreshableState<StockItemTestRes
|
||||
|
||||
if (results.length == 0) {
|
||||
tiles.add(ListTile(
|
||||
title: Text("No Results"),
|
||||
subtitle: Text("No test results available"),
|
||||
title: Text(I18N.of(context).testResultNone),
|
||||
subtitle: Text(I18N.of(context).testResultNoneDetail),
|
||||
));
|
||||
|
||||
return tiles;
|
||||
@ -254,7 +254,7 @@ class _StockItemTestResultDisplayState extends RefreshableState<StockItemTestRes
|
||||
|
||||
if (tiles.isEmpty) {
|
||||
tiles.add(ListTile(
|
||||
title: Text("No test results"),
|
||||
title: Text(I18N.of(context).testResultNone),
|
||||
));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user