diff --git a/CHANGELOG.md b/CHANGELOG.md
index 09fb5afd5..bcbfb9026 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
## [Unreleased]
+### Added
+
+- Info: improved GeoTIFF section
+- GeoTIFF: locating from GeoTIFF metadata (requires rescan, limited to some projections)
+- GeoTIFF: overlay on map (limited to some projections)
+- Italian translation (thanks glemco)
+
### Changed
- upgraded Flutter to stable v2.10.4
diff --git a/README.md b/README.md
index 3c6d54aa9..3347076c0 100644
--- a/README.md
+++ b/README.md
@@ -85,7 +85,7 @@ At this stage this project does *not* accept PRs, except for translations.
### Translations
-If you want to translate this app in your language and share the result, [there is a guide](https://github.com/deckerst/aves/wiki/Contributing-to-Translations). English, Korean and French are already handled by me. Russian, German, Spanish, Portuguese, Indonesian & Japanese are handled by generous volunteers.
+If you want to translate this app in your language and share the result, [there is a guide](https://github.com/deckerst/aves/wiki/Contributing-to-Translations). English, Korean and French are already handled by me. Russian, German, Spanish, Portuguese, Indonesian, Japanese & Italian are handled by generous volunteers.
### Donations
diff --git a/lib/l10n/app_it.arb b/lib/l10n/app_it.arb
index 90ac7b55a..ae295ff48 100644
--- a/lib/l10n/app_it.arb
+++ b/lib/l10n/app_it.arb
@@ -361,7 +361,7 @@
"albumPickPageTitleCopy": "Copia su album",
"albumPickPageTitleExport": "Esportazione su album",
- "albumPickPageTitleMove": "Sposta su Album",
+ "albumPickPageTitleMove": "Sposta su album",
"albumPickPageTitlePick": "Scegli l'album",
"albumCamera": "Camera",
diff --git a/lib/widgets/about/credits.dart b/lib/widgets/about/credits.dart
index 9008c2fd1..bfa1de45b 100644
--- a/lib/widgets/about/credits.dart
+++ b/lib/widgets/about/credits.dart
@@ -11,6 +11,7 @@ class AboutCredits extends StatelessWidget {
'Bahasa Indonesia': 'MeFinity',
'Deutsch': 'JanWaldhorn',
'Español (México)': 'n-berenice',
+ 'Italiano': 'glemco',
'Português (Brasil)': 'Jonatas De Almeida Barros',
'Русский': 'D3ZOXY',
'日本語': 'Maki',
diff --git a/lib/widgets/drawer/app_drawer.dart b/lib/widgets/drawer/app_drawer.dart
index 0be0f2e81..ef0d7512b 100644
--- a/lib/widgets/drawer/app_drawer.dart
+++ b/lib/widgets/drawer/app_drawer.dart
@@ -142,7 +142,6 @@ class AppDrawer extends StatelessWidget {
),
child: Wrap(
spacing: 8,
- runSpacing: 8,
children: [
OutlinedButton.icon(
// key is expected by test driver
diff --git a/lib/widgets/settings/language/locale.dart b/lib/widgets/settings/language/locale.dart
index 0123e9323..ca5340d19 100644
--- a/lib/widgets/settings/language/locale.dart
+++ b/lib/widgets/settings/language/locale.dart
@@ -2,15 +2,18 @@ import 'dart:collection';
import 'package:aves/l10n/l10n.dart';
import 'package:aves/model/settings/settings.dart';
+import 'package:aves/theme/durations.dart';
+import 'package:aves/widgets/common/basic/reselectable_radio_list_tile.dart';
import 'package:aves/widgets/common/extensions/build_context.dart';
-import 'package:aves/widgets/dialogs/aves_selection_dialog.dart';
+import 'package:aves/widgets/common/providers/media_query_data_provider.dart';
import 'package:aves/widgets/settings/language/locales.dart';
import 'package:collection/collection.dart';
import 'package:flutter/material.dart';
+import 'package:flutter/scheduler.dart';
import 'package:provider/provider.dart';
class LocaleTile extends StatelessWidget {
- static const _systemLocaleOption = Locale('system');
+ static const systemLocaleOption = Locale('system');
const LocaleTile({Key? key}) : super(key: key);
@@ -23,33 +26,89 @@ class LocaleTile extends StatelessWidget {
subtitle: Selector(
selector: (context, s) => settings.locale,
builder: (context, locale, child) {
- return Text(locale == null ? context.l10n.settingsSystemDefault : _getLocaleName(locale));
+ return Text(locale == null ? context.l10n.settingsSystemDefault : getLocaleName(locale));
},
),
- onTap: () => showSelectionDialog(
- context: context,
- builder: (context) => AvesSelectionDialog(
- initialValue: settings.locale ?? _systemLocaleOption,
- options: _getLocaleOptions(context),
- title: context.l10n.settingsLanguage,
- dense: true,
- ),
- onSelection: (v) => settings.locale = v == _systemLocaleOption ? null : v,
- ),
+ onTap: () async {
+ final value = await Navigator.push(
+ context,
+ MaterialPageRoute(
+ settings: const RouteSettings(name: LocaleSelectionPage.routeName),
+ builder: (context) => const LocaleSelectionPage(),
+ ),
+ );
+ // wait for the dialog to hide as applying the change may block the UI
+ await Future.delayed(Durations.pageTransitionAnimation * timeDilation);
+ if (value != null) {
+ settings.locale = value == systemLocaleOption ? null : value;
+ }
+ },
);
}
- String _getLocaleName(Locale locale) {
+ static String getLocaleName(Locale locale) {
// the package `flutter_localized_locales` has the answer for all locales
// but it comes with 3 MB of assets
return SupportedLocales.languagesByLanguageCode[locale.languageCode] ?? locale.toString();
}
+}
+
+class LocaleSelectionPage extends StatefulWidget {
+ static const routeName = '/settings/locale';
+
+ const LocaleSelectionPage({Key? key}) : super(key: key);
+
+ @override
+ State createState() => _LocaleSelectionPageState();
+}
+
+class _LocaleSelectionPageState extends State {
+ late Locale _selectedValue;
+
+ @override
+ void initState() {
+ super.initState();
+ _selectedValue = settings.locale ?? LocaleTile.systemLocaleOption;
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return MediaQueryDataProvider(
+ child: Scaffold(
+ appBar: AppBar(
+ title: Text(context.l10n.settingsLanguage),
+ ),
+ body: SafeArea(
+ child: ListView(
+ children: _getLocaleOptions(context).entries.map((kv) {
+ final value = kv.key;
+ final title = kv.value;
+ return ReselectableRadioListTile(
+ // key is expected by test driver
+ key: Key(value.toString()),
+ value: value,
+ groupValue: _selectedValue,
+ onChanged: (v) => Navigator.pop(context, v),
+ reselectable: true,
+ title: Text(
+ title,
+ softWrap: false,
+ overflow: TextOverflow.fade,
+ maxLines: 1,
+ ),
+ );
+ }).toList(),
+ ),
+ ),
+ ),
+ );
+ }
LinkedHashMap _getLocaleOptions(BuildContext context) {
- final displayLocales = AppLocalizations.supportedLocales.map((locale) => MapEntry(locale, _getLocaleName(locale))).toList()..sort((a, b) => compareAsciiUpperCase(a.value, b.value));
+ final displayLocales = AppLocalizations.supportedLocales.map((locale) => MapEntry(locale, LocaleTile.getLocaleName(locale))).toList()..sort((a, b) => compareAsciiUpperCase(a.value, b.value));
return LinkedHashMap.of({
- _systemLocaleOption: context.l10n.settingsSystemDefault,
+ LocaleTile.systemLocaleOption: context.l10n.settingsSystemDefault,
...LinkedHashMap.fromEntries(displayLocales),
});
}
diff --git a/lib/widgets/settings/language/locales.dart b/lib/widgets/settings/language/locales.dart
index 9018db893..e699a524d 100644
--- a/lib/widgets/settings/language/locales.dart
+++ b/lib/widgets/settings/language/locales.dart
@@ -7,6 +7,7 @@ class SupportedLocales {
'es': 'Español (México)',
'fr': 'Français',
'id': 'Bahasa Indonesia',
+ 'it': 'Italiano',
'ja': '日本語',
'ko': '한국어',
'pt': 'Português (Brasil)',
diff --git a/untranslated.json b/untranslated.json
index 7540052a7..75f0eefe9 100644
--- a/untranslated.json
+++ b/untranslated.json
@@ -15,6 +15,10 @@
"entryActionShowGeoTiffOnMap"
],
+ "it": [
+ "entryActionShowGeoTiffOnMap"
+ ],
+
"ja": [
"entryActionShowGeoTiffOnMap"
],