Change “Switch List Table” to “Show List”/”Show Table”

This commit is contained in:
Hillel Coren 2020-07-26 18:54:07 +03:00
parent bccebfcac9
commit e79aa91c41
3 changed files with 14 additions and 9 deletions

View File

@ -357,7 +357,8 @@ class _AppBottomBarState extends State<AppBottomBar> {
),
if (!widget.entityType.isSetting)
IconButton(
tooltip: localization.switchListTable,
tooltip:
isList ? localization.showTable : localization.showList,
icon: Icon(isList ? Icons.table_chart : Icons.view_list),
onPressed: () {
store.dispatch(SwitchListTableLayout());

View File

@ -52,7 +52,10 @@ class _ListFilterState extends State<ListFilter> {
[EntityType.dashboard, EntityType.settings].contains(widget.entityType);
final key =
isSingle ? widget.entityType.toString() : widget.entityType.plural;
final placeholder = localization.lookup('search_$key');
final placeholder = localization.lookup(
widget.entityType == EntityType.dashboard
? 'search_company'
: 'search_$key');
return isSingle
? placeholder

View File

@ -146,12 +146,11 @@ mixin LocalizationsProvider on LocaleCodeAware {
'search_tax_rates': 'Search :count Tax Rates',
'search_tasks': 'Search :count Tasks',
'search_settings': 'Search Settings',
'search_dashboard': 'Search Dashboard',
'search_projects': 'Search :count Projects',
'search_expenses': 'Search :count Expenses',
'search_payments': 'Search :count Payments',
'search_groups': 'Search :count Groups',
'search_company': 'Search :count Company',
'search_company': 'Search Company',
'search_document': 'Search 1 Document',
'search_design': 'Search 1 Design',
'search_invoice': 'Search 1 Invoice',
@ -1223,7 +1222,8 @@ mixin LocalizationsProvider on LocaleCodeAware {
'email_subject_quote': 'Email Quote Subject',
'email_subject_payment': 'Email Payment Subject',
'email_subject_payment_partial': 'Email Partial Payment Subject',
'switch_list_table': 'Switch List Table',
'show_table': 'Show Table',
'show_list': 'Show List',
'client_city': 'Client City',
'client_state': 'Client State',
'client_country': 'Client Country',
@ -37932,8 +37932,11 @@ mixin LocalizationsProvider on LocaleCodeAware {
String get newPayment => _localizedValues[localeCode]['new_payment'] ?? '';
String get switchListTable =>
_localizedValues[localeCode]['switch_list_table'] ?? '';
String get showTable =>
_localizedValues[localeCode]['show_table'] ?? '';
String get showList =>
_localizedValues[localeCode]['show_list'] ?? '';
String get whenSaved => _localizedValues[localeCode]['when_saved'] ?? '';
@ -38968,8 +38971,6 @@ mixin LocalizationsProvider on LocaleCodeAware {
String get completed => _localizedValues[localeCode]['completed'] ?? '';
String get searchDashboard => _localizedValues[localeCode]['search_dashboard'] ?? '';
String lookup(String key) {
final lookupKey = toSnakeCase(key);