added alternative translations

This commit is contained in:
Vadim 2023-10-28 23:27:07 +02:00
parent e83e6cff3a
commit 75093424d9
8 changed files with 43 additions and 6 deletions

View file

@ -92,10 +92,14 @@
}
}
},
"buyLightmeterPro": "Buy Lightmeter Pro",
"lightmeterPro": "Lightmeter Pro",
"buyLightmeterPro": "Buy Lightmeter Pro",
"lightmeterProDescription": "Unlocks extra features, such as equipment profiles containing filters for aperture, shutter speed, and more; and a list of films with compensation for what's known as reciprocity failure.\n\nThe source code of Lightmeter is available on GitHub. You are welcome to compile it yourself. However, if you want to support the development and receive new features and updates, consider purchasing Lightmeter Pro.",
"buy": "Buy",
"proFeatures": "Pro features",
"unlockProFeatures": "Unlock Pro features",
"unlockProFeaturesDescription": "Unlock professional features, such as equipment profiles containing filters for aperture, shutter speed, and more; and a list of films with compensation for what's known as reciprocity failure.\n\nBy unlocking Pro features you support the development and make it possible to add new features to the app.",
"unlock": "Unlock",
"tooltipAdd": "Add",
"tooltipClose": "Close",
"tooltipExpand": "Expand",

View file

@ -96,6 +96,10 @@
"lightmeterPro": "Lightmeter Pro",
"lightmeterProDescription": "Déverrouille des fonctionnalités supplémentaires, telles que des profils d'équipement contenant des filtres pour l'ouverture, la vitesse d'obturation et plus encore, ainsi qu'une liste de films avec une compensation pour ce que l'on appelle l'échec de réciprocité.\n\nLe code source du Lightmeter est disponible sur GitHub. Vous pouvez le compiler vous-même. Cependant, si vous souhaitez soutenir le développement et recevoir de nouvelles fonctionnalités et mises à jour, envisagez d'acheter Lightmeter Pro.",
"buy": "Acheter",
"proFeatures": "Fonctionnalités professionnelles",
"unlockProFeatures": "Déverrouiller les fonctionnalités professionnelles",
"unlockProFeaturesDescription": "Déverrouillez des fonctions professionnelles, telles que des profils d'équipement contenant des filtres pour l'ouverture, la vitesse d'obturation et plus encore, ainsi qu'une liste de films avec compensation pour ce que l'on appelle l'échec de réciprocité.\n\nEn débloquant les fonctionnalités Pro, vous soutenez le développement et permettez d'ajouter de nouvelles fonctionnalités à l'application.",
"unlock": "Déverrouiller",
"tooltipAdd": "Ajouter",
"tooltipClose": "Fermer",
"tooltipExpand": "Élargir",

View file

@ -96,6 +96,10 @@
"lightmeterPro": "Lightmeter Pro",
"lightmeterProDescription": "Даёт доступ к таким функциям как профили оборудования, содержащие фильтры для диафрагмы, выдержки и других значений, а также набору пленок с компенсацией эффекта Шварцшильда.\n\nИсходный код Lightmeter доступен на GitHub. Вы можете собрать его самостоятельно. Однако если вы хотите поддержать разработку и получать новые функции и обновления, то приобретите Lightmeter Pro.",
"buy": "Купить",
"proFeatures": "Профессиональные настройки",
"unlockProFeatures": "Разблокировать профессиональные настройки",
"unlockProFeaturesDescription": "Вы можете разблокировать профессиональные настройки, такие как профили оборудования, содержащие фильтры для диафрагмы, выдержки и других значений, а также набору пленок с компенсацией эффекта Шварцшильда.\n\nПолучая доступ к профессиональным настройкам, вы поддерживаете разработку и делаете возможным появление новых функций в приложении.",
"unlock": "Разблокировать",
"tooltipAdd": "Добавить",
"tooltipClose": "Закрыть",
"tooltipExpand": "Развернуть",

View file

@ -96,6 +96,10 @@
"lightmeterPro": "Lightmeter Pro",
"lightmeterProDescription": "购买以解锁额外功能。例如包含光圈、快门速度等参数的配置文件;以及一个胶卷预设列表来提供倒易率失效时的曝光补偿。\n\n您可以在 GitHub 上获取 Lightmeter 的源代码,欢迎自行编译。不过,如果您想支持开发并获得新功能和更新,请考虑购买 Lightmeter Pro。",
"buy": "购买",
"proFeatures": "专业功能",
"unlockProFeatures": "解锁专业功能",
"unlockProFeaturesDescription": "解锁专业功能。例如包含光圈、快门速度等参数的配置文件;以及一个胶卷预设列表来提供倒易率失效时的曝光补偿。\n\n通过解锁专业版功能您可以支持开发工作帮助为应用程序添加新功能。",
"unlock": "解锁",
"tooltipAdd": "添加",
"tooltipClose": "关闭",
"tooltipExpand": "展开",

View file

@ -15,3 +15,7 @@ class RemoteConfig extends InheritedWidget {
@override
bool updateShouldNotify(RemoteConfig oldWidget) => true;
}
const a = """
\u2022 Equipment profiles containing filters for aperture, shutter speed, and more\n\u2022 List of films with compensation for what's known as reciprocity failure
""";

View file

@ -1,5 +1,7 @@
import 'package:flutter/material.dart';
import 'package:lightmeter/data/models/feature.dart';
import 'package:lightmeter/generated/l10n.dart';
import 'package:lightmeter/providers/remote_config_provider.dart';
import 'package:lightmeter/screens/settings/components/shared/iap_list_tile/widget_list_tile_iap.dart';
import 'package:lightmeter/screens/settings/components/utils/show_buy_pro_dialog.dart';
@ -10,7 +12,11 @@ class BuyProListTile extends StatelessWidget {
Widget build(BuildContext context) {
return IAPListTile(
leading: const Icon(Icons.star),
title: Text(S.of(context).buyLightmeterPro),
title: Text(
RemoteConfig.isEnabled(context, Feature.unlockProFeaturesText)
? S.of(context).unlockProFeatures
: S.of(context).buyLightmeterPro,
),
onTap: () {
showBuyProDialog(context);
},

View file

@ -1,5 +1,7 @@
import 'package:flutter/material.dart';
import 'package:lightmeter/data/models/feature.dart';
import 'package:lightmeter/generated/l10n.dart';
import 'package:lightmeter/providers/remote_config_provider.dart';
import 'package:lightmeter/screens/settings/components/lightmeter_pro/components/buy_pro/widget_list_tile_buy_pro.dart';
import 'package:lightmeter/screens/settings/components/shared/settings_section/widget_settings_section.dart';
@ -9,7 +11,9 @@ class LightmeterProSettingsSection extends StatelessWidget {
@override
Widget build(BuildContext context) {
return SettingsSection(
title: S.of(context).lightmeterPro,
title: RemoteConfig.isEnabled(context, Feature.unlockProFeaturesText)
? S.of(context).proFeatures
: S.of(context).lightmeterPro,
children: const [BuyProListTile()],
);
}

View file

@ -1,17 +1,24 @@
import 'package:flutter/material.dart';
import 'package:lightmeter/data/models/feature.dart';
import 'package:lightmeter/generated/l10n.dart';
import 'package:lightmeter/providers/remote_config_provider.dart';
import 'package:lightmeter/res/dimens.dart';
import 'package:m3_lightmeter_iap/m3_lightmeter_iap.dart';
Future<void> showBuyProDialog(BuildContext context) {
final unlockFeaturesEnabled = RemoteConfig.isEnabled(context, Feature.unlockProFeaturesText);
return showDialog(
context: context,
builder: (_) => AlertDialog(
icon: const Icon(Icons.star),
titlePadding: Dimens.dialogIconTitlePadding,
title: Text(S.of(context).lightmeterPro),
title: Text(unlockFeaturesEnabled ? S.of(context).proFeatures : S.of(context).lightmeterPro),
contentPadding: const EdgeInsets.symmetric(horizontal: Dimens.paddingL),
content: SingleChildScrollView(child: Text(S.of(context).lightmeterProDescription)),
content: SingleChildScrollView(
child: Text(
unlockFeaturesEnabled ? S.of(context).unlockProFeaturesDescription : S.of(context).lightmeterProDescription,
),
),
actionsPadding: Dimens.dialogActionsPadding,
actions: [
TextButton(
@ -23,7 +30,7 @@ Future<void> showBuyProDialog(BuildContext context) {
Navigator.of(context).pop();
IAPProductsProvider.of(context).buy(IAPProductType.paidFeatures);
},
child: Text(S.of(context).buy),
child: Text(unlockFeaturesEnabled ? S.of(context).unlock : S.of(context).buy),
),
],
),