l10n: minor fixes

This commit is contained in:
Thibault Deckers 2021-10-28 10:52:42 +09:00
parent c1f33c3f69
commit 91da9db1c0
9 changed files with 45 additions and 40 deletions

View file

@ -7,4 +7,4 @@
preferred-supported-locales: preferred-supported-locales:
- en - en
# untranslated-messages-file: untranslated.json untranslated-messages-file: untranslated.json

View file

@ -858,18 +858,6 @@
"statsPageTitle": "Stats", "statsPageTitle": "Stats",
"@statsPageTitle": {}, "@statsPageTitle": {},
"statsImage": "{count, plural, =1{image} other{images}}",
"@statsImage": {
"placeholders": {
"count": {}
}
},
"statsVideo": "{count, plural, =1{video} other{videos}}",
"@statsVideo": {
"placeholders": {
"count": {}
}
},
"statsWithGps": "{count, plural, =1{1 item with location} other{{count} items with location}}", "statsWithGps": "{count, plural, =1{1 item with location} other{{count} items with location}}",
"@statsWithGps": { "@statsWithGps": {
"placeholders": { "placeholders": {

View file

@ -422,8 +422,6 @@
"settingsUnitSystemTitle": "단위법", "settingsUnitSystemTitle": "단위법",
"statsPageTitle": "통계", "statsPageTitle": "통계",
"statsImage": "{count, plural, other{사진}}",
"statsVideo": "{count, plural, other{동영상}}",
"statsWithGps": "{count, plural, other{{count}개 위치가 있음}}", "statsWithGps": "{count, plural, other{{count}개 위치가 있음}}",
"statsTopCountries": "국가 랭킹", "statsTopCountries": "국가 랭킹",
"statsTopPlaces": "장소 랭킹", "statsTopPlaces": "장소 랭킹",

View file

@ -5,8 +5,8 @@
"welcomeTermsToggle": "Я согласен с условиями и положениями", "welcomeTermsToggle": "Я согласен с условиями и положениями",
"itemCount": "{count, plural, =1{1 объект} few{{count} объекта} other{{count} объектов}}", "itemCount": "{count, plural, =1{1 объект} few{{count} объекта} other{{count} объектов}}",
"timeSeconds": "{seconds, plural, =1{1 секунда} few{{count} секунды} other{{seconds} секунд}}", "timeSeconds": "{seconds, plural, =1{1 секунда} few{{seconds} секунды} other{{seconds} секунд}}",
"timeMinutes": "{minutes, plural, =1{1 минута} few{{count} минуты}other{{minutes} минут}}", "timeMinutes": "{minutes, plural, =1{1 минута} few{{minutes} минуты} other{{minutes} минут}}",
"applyButtonLabel": "ПРИМЕНИТЬ", "applyButtonLabel": "ПРИМЕНИТЬ",
"deleteButtonLabel": "УДАЛИТЬ", "deleteButtonLabel": "УДАЛИТЬ",
@ -217,7 +217,6 @@
"aboutCredits": "Благодарности", "aboutCredits": "Благодарности",
"aboutCreditsWorldAtlas1": "Это приложение использует файл TopoJSON из", "aboutCreditsWorldAtlas1": "Это приложение использует файл TopoJSON из",
"aboutCreditsWorldAtlas2": "под лицензией ISC.", "aboutCreditsWorldAtlas2": "под лицензией ISC.",
"aboutCreditsTranslators": "Translators:",
"aboutLicenses": "Лицензии с открытым исходным кодом", "aboutLicenses": "Лицензии с открытым исходным кодом",
"aboutLicensesBanner": "Это приложение использует следующие пакеты и библиотеки с открытым исходным кодом.", "aboutLicensesBanner": "Это приложение использует следующие пакеты и библиотеки с открытым исходным кодом.",
@ -252,7 +251,7 @@
"dateYesterday": "Вчера", "dateYesterday": "Вчера",
"dateThisMonth": "В этом месяце", "dateThisMonth": "В этом месяце",
"collectionDeleteFailureFeedback": "{count, plural, =1{Не удалось удалить 1 объект} few{Не удалось удалить {count} объекта} other{Не удалось удалить {count} объектов}}", "collectionDeleteFailureFeedback": "{count, plural, =1{Не удалось удалить 1 объект} few{Не удалось удалить {count} объекта} other{Не удалось удалить {count} объектов}}",
"collectionCopyFailureFeedback": "{count, plural, =1{Не удалось скопировать 1 объект} few{Не удалось скопировать {count} объекта}} other{Не удалось скопировать {count} объектов}}", "collectionCopyFailureFeedback": "{count, plural, =1{Не удалось скопировать 1 объект} few{Не удалось скопировать {count} объекта} other{Не удалось скопировать {count} объектов}}",
"collectionMoveFailureFeedback": "{count, plural, =1{Не удалось переместить 1 объект} few{Не удалось переместить {count} объекта} other{Не удалось переместить {count} объектов}}", "collectionMoveFailureFeedback": "{count, plural, =1{Не удалось переместить 1 объект} few{Не удалось переместить {count} объекта} other{Не удалось переместить {count} объектов}}",
"collectionExportFailureFeedback": "{count, plural, =1{Не удалось экспортировать 1 страницу} few{Не удалось экспортировать {count} страницы} other{Не удалось экспортировать {count} страниц}}", "collectionExportFailureFeedback": "{count, plural, =1{Не удалось экспортировать 1 страницу} few{Не удалось экспортировать {count} страницы} other{Не удалось экспортировать {count} страниц}}",
"collectionCopySuccessFeedback": "{count, plural, =1{Скопирован 1 объект} few{Скопировано {count} объекта} other{Скопировано {count} объектов}}", "collectionCopySuccessFeedback": "{count, plural, =1{Скопирован 1 объект} few{Скопировано {count} объекта} other{Скопировано {count} объектов}}",
@ -422,8 +421,6 @@
"settingsUnitSystemTitle": "Единицы измерения", "settingsUnitSystemTitle": "Единицы измерения",
"statsPageTitle": "Статистика", "statsPageTitle": "Статистика",
"statsImage": "{count, plural, =1{изображение} few{изображения} other{изображений)}}",
"statsVideo": "{count, plural, =1{видео} few{видео} other{видео}}",
"statsWithGps": "{count, plural, =1{1 объект с местоположением} few{{count} объекта с местоположением} other{{count} объектов с местоположением}}", "statsWithGps": "{count, plural, =1{1 объект с местоположением} few{{count} объекта с местоположением} other{{count} объектов с местоположением}}",
"statsTopCountries": "Топ стран", "statsTopCountries": "Топ стран",
"statsTopPlaces": "Топ локаций", "statsTopPlaces": "Топ локаций",

View file

@ -5,7 +5,7 @@ import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart'; import 'package:flutter/widgets.dart';
class AvesDialog extends AlertDialog { class AvesDialog extends AlertDialog {
static const EdgeInsets contentHorizontalPadding = EdgeInsets.symmetric(horizontal: 24); static const double defaultHorizontalContentPadding = 24;
static const double controlCaptionPadding = 16; static const double controlCaptionPadding = 16;
static const double borderWidth = 1.0; static const double borderWidth = 1.0;
@ -16,6 +16,7 @@ class AvesDialog extends AlertDialog {
ScrollController? scrollController, ScrollController? scrollController,
List<Widget>? scrollableContent, List<Widget>? scrollableContent,
bool hasScrollBar = true, bool hasScrollBar = true,
double horizontalContentPadding = defaultHorizontalContentPadding,
Widget? content, Widget? content,
required List<Widget> actions, required List<Widget> actions,
}) : assert((scrollableContent != null) ^ (content != null)), }) : assert((scrollableContent != null) ^ (content != null)),
@ -34,7 +35,7 @@ class AvesDialog extends AlertDialog {
// and overflow feedback ignores the dialog shape, // and overflow feedback ignores the dialog shape,
// so we restrict scrolling to the content instead // so we restrict scrolling to the content instead
content: _buildContent(context, scrollController, scrollableContent, hasScrollBar, content), content: _buildContent(context, scrollController, scrollableContent, hasScrollBar, content),
contentPadding: scrollableContent != null ? EdgeInsets.zero : const EdgeInsets.fromLTRB(24, 20, 24, 0), contentPadding: scrollableContent != null ? EdgeInsets.zero : EdgeInsets.fromLTRB(horizontalContentPadding, 20, horizontalContentPadding, 0),
actions: actions, actions: actions,
actionsPadding: const EdgeInsets.symmetric(horizontal: 8), actionsPadding: const EdgeInsets.symmetric(horizontal: 8),
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
@ -115,7 +116,7 @@ class DialogTitle extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
alignment: Alignment.center, alignment: Alignment.center,
padding: const EdgeInsets.symmetric(vertical: 20), padding: const EdgeInsets.symmetric(vertical: 20, horizontal: 16),
decoration: BoxDecoration( decoration: BoxDecoration(
border: Border( border: Border(
bottom: Divider.createBorderSide(context, width: AvesDialog.borderWidth), bottom: Divider.createBorderSide(context, width: AvesDialog.borderWidth),
@ -127,6 +128,7 @@ class DialogTitle extends StatelessWidget {
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
fontFeatures: [FontFeature.enable('smcp')], fontFeatures: [FontFeature.enable('smcp')],
), ),
textAlign: TextAlign.center,
), ),
); );
} }

View file

@ -44,6 +44,8 @@ class _CreateAlbumDialogState extends State<CreateAlbumDialog> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
const contentHorizontalPadding = EdgeInsets.symmetric(horizontal: AvesDialog.defaultHorizontalContentPadding);
final volumeTiles = <Widget>[]; final volumeTiles = <Widget>[];
if (_allVolumes.length > 1) { if (_allVolumes.length > 1) {
final byPrimary = groupBy<StorageVolume, bool>(_allVolumes, (volume) => volume.isPrimary); final byPrimary = groupBy<StorageVolume, bool>(_allVolumes, (volume) => volume.isPrimary);
@ -52,7 +54,7 @@ class _CreateAlbumDialogState extends State<CreateAlbumDialog> {
final otherVolumes = (byPrimary[false] ?? [])..sort(compare); final otherVolumes = (byPrimary[false] ?? [])..sort(compare);
volumeTiles.addAll([ volumeTiles.addAll([
Padding( Padding(
padding: AvesDialog.contentHorizontalPadding + const EdgeInsets.only(top: 20), padding: contentHorizontalPadding + const EdgeInsets.only(top: 20),
child: Text(context.l10n.newAlbumDialogStorageLabel), child: Text(context.l10n.newAlbumDialogStorageLabel),
), ),
...primaryVolumes.map((volume) => _buildVolumeTile(context, volume)), ...primaryVolumes.map((volume) => _buildVolumeTile(context, volume)),
@ -68,7 +70,7 @@ class _CreateAlbumDialogState extends State<CreateAlbumDialog> {
scrollableContent: [ scrollableContent: [
...volumeTiles, ...volumeTiles,
Padding( Padding(
padding: AvesDialog.contentHorizontalPadding + const EdgeInsets.only(bottom: 8), padding: contentHorizontalPadding + const EdgeInsets.only(bottom: 8),
child: ValueListenableBuilder<bool>( child: ValueListenableBuilder<bool>(
valueListenable: _existsNotifier, valueListenable: _existsNotifier,
builder: (context, exists, child) { builder: (context, exists, child) {

View file

@ -32,17 +32,20 @@ class _VideoSpeedDialogState extends State<VideoSpeedDialog> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AvesDialog( return AvesDialog(
context: context, context: context,
horizontalContentPadding: 4,
content: Column( content: Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Row( Padding(
children: [ padding: const EdgeInsets.symmetric(horizontal: 24),
const SizedBox(width: 24), child: Wrap(
Text(context.l10n.videoSpeedDialogLabel), children: [
const SizedBox(width: 16), Text(context.l10n.videoSpeedDialogLabel),
Text('x$_speed'), const SizedBox(width: 16),
], Text('x$_speed'),
],
),
), ),
const SizedBox(height: 16), const SizedBox(height: 16),
Slider( Slider(

View file

@ -22,6 +22,7 @@ import 'package:charts_flutter/flutter.dart' as charts;
import 'package:collection/collection.dart'; import 'package:collection/collection.dart';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:intl/intl.dart'; import 'package:intl/intl.dart';
import 'package:percent_indicator/linear_percent_indicator.dart'; import 'package:percent_indicator/linear_percent_indicator.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@ -78,8 +79,8 @@ class StatsPage extends StatelessWidget {
alignment: WrapAlignment.center, alignment: WrapAlignment.center,
crossAxisAlignment: WrapCrossAlignment.center, crossAxisAlignment: WrapCrossAlignment.center,
children: [ children: [
_buildMimeDonut(context, (sum) => context.l10n.statsImage(sum), imagesByMimeTypes, animate), _buildMimeDonut(context, AIcons.image, imagesByMimeTypes, animate),
_buildMimeDonut(context, (sum) => context.l10n.statsVideo(sum), videoByMimeTypes, animate), _buildMimeDonut(context, AIcons.video, videoByMimeTypes, animate),
], ],
); );
@ -108,7 +109,10 @@ class StatsPage extends StatelessWidget {
), ),
), ),
const SizedBox(height: 8), const SizedBox(height: 8),
Text(context.l10n.statsWithGps(withGpsCount)), Text(
context.l10n.statsWithGps(withGpsCount),
textAlign: TextAlign.center,
),
], ],
), ),
); );
@ -136,7 +140,7 @@ class StatsPage extends StatelessWidget {
Widget _buildMimeDonut( Widget _buildMimeDonut(
BuildContext context, BuildContext context,
String Function(int) label, IconData icon,
Map<String, int> byMimeTypes, Map<String, int> byMimeTypes,
bool animate, bool animate,
) { ) {
@ -180,9 +184,15 @@ class StatsPage extends StatelessWidget {
), ),
), ),
Center( Center(
child: Text( child: Column(
'$sum\n${label(sum)}', mainAxisSize: MainAxisSize.min,
textAlign: TextAlign.center, children: [
Icon(icon),
Text(
'$sum',
textAlign: TextAlign.center,
),
],
), ),
), ),
], ],

5
untranslated.json Normal file
View file

@ -0,0 +1,5 @@
{
"ru": [
"aboutCreditsTranslators"
]
}