added translations

This commit is contained in:
Vadim 2024-07-23 15:31:36 +02:00
parent 46d4222ac4
commit 0b06d9b8c7
6 changed files with 117 additions and 15 deletions

View file

@ -1,7 +1,12 @@
import 'package:flutter/material.dart';
import 'package:lightmeter/generated/l10n.dart';
import 'package:lightmeter/providers/films_provider.dart';
enum AppFeature { enum AppFeature {
cameraMetering, reflectedLightMetering,
ndFilters, incidedntLightMetering,
theming, isoAndNdValues,
themeEngine,
spotMetering, spotMetering,
histogram, histogram,
listOfFilms, listOfFilms,
@ -9,15 +14,37 @@ enum AppFeature {
timer, timer,
mainScreenCustomization; mainScreenCustomization;
String get name { String name(BuildContext context) {
return toString().replaceAll(runtimeType.toString(), '').replaceAll('.', ''); switch (this) {
case AppFeature.reflectedLightMetering:
return S.of(context).featureReflectedLightMetering;
case AppFeature.incidedntLightMetering:
return S.of(context).featureIncidentLightMetering;
case AppFeature.isoAndNdValues:
return S.of(context).featureIsoAndNdValues;
case AppFeature.themeEngine:
return S.of(context).featureTheme;
case AppFeature.spotMetering:
return S.of(context).featureSpotMetering;
case AppFeature.histogram:
return S.of(context).featureHistogram;
case AppFeature.listOfFilms:
return S.of(context).featureListOfFilms;
case AppFeature.equipmentProfiles:
return S.of(context).featureEquipmentProfiles;
case AppFeature.timer:
return S.of(context).featureTimer;
case AppFeature.mainScreenCustomization:
return S.of(context).featureMeteringScreenLayout;
}
} }
bool get isFree { bool get isFree {
switch (this) { switch (this) {
case AppFeature.cameraMetering: case AppFeature.reflectedLightMetering:
case AppFeature.ndFilters: case AppFeature.incidedntLightMetering:
case AppFeature.theming: case AppFeature.isoAndNdValues:
case AppFeature.themeEngine:
return true; return true;
default: default:
return false; return false;

View file

@ -109,6 +109,16 @@
"featuresPro": "Pro", "featuresPro": "Pro",
"proFeaturesPromoText": "Lightmeter Pro delivers everything you need to get the best shots!", "proFeaturesPromoText": "Lightmeter Pro delivers everything you need to get the best shots!",
"proFeaturesWhatsIncluded": "What's included?", "proFeaturesWhatsIncluded": "What's included?",
"featureReflectedLightMetering": "Reflected light metering",
"featureIncidentLightMetering": "Incident light metering",
"featureIsoAndNdValues": "Wide range of ISO and ND filters values",
"featureTheme": "Theme customization",
"featureSpotMetering": "Spot metering",
"featureHistogram": "Histogram",
"featureListOfFilms": "List of 20+ films with reciprocity formulas",
"featureEquipmentProfiles": "Equipment profiles",
"featureTimer": "Built-in timer for long exposure",
"featureMeteringScreenLayout": "Customizable main screen",
"proFeaturesSupportText": "By purchasing Lightmeter Pro you support the development and make it possible to add new features to the app.", "proFeaturesSupportText": "By purchasing Lightmeter Pro you support the development and make it possible to add new features to the app.",
"unlockFor": "Unlock for {price}", "unlockFor": "Unlock for {price}",
"@unlockFor": { "@unlockFor": {

View file

@ -104,9 +104,31 @@
} }
}, },
"proFeatures": "Fonctionnalités professionnelles", "proFeatures": "Fonctionnalités professionnelles",
"unlockProFeatures": "Déverrouiller les fonctionnalités professionnelles", "proFeaturesTitle": "Lightmeter Pro",
"unlockProFeaturesDescription": "Déverrouillez des fonctions professionnelles:\n \u2022 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 \u2022 Mesure spot & Histogramme\n \u2022 Et plus encore!\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", "unlock": "Déverrouiller",
"featuresFree": "Gratuit",
"featuresPro": "Pro",
"proFeaturesPromoText": "Lightmeter Pro offre tout ce dont vous avez besoin pour obtenir les meilleurs clichés!",
"proFeaturesWhatsIncluded": "Qu'est-ce qui est inclus?",
"featureReflectedLightMetering": "Mesure de la lumière réfléchie",
"featureIncidentLightMetering": "Mesure de la lumière incidente",
"featureIsoAndNdValues": "Large gamme de valeurs ISO et de filtres ND",
"featureTheme": "Personnalisation du thème",
"featureSpotMetering": "Mesure spot",
"featureHistogram": "Histogramme",
"featureListOfFilms": "Liste de plus de 20 films avec des formules de correction",
"featureEquipmentProfiles": "Profils de l'équipement",
"featureTimer": "Minuteur intégré pour longues expositions",
"featureMeteringScreenLayout": "Écran principal personnalisable",
"proFeaturesSupportText": "En achetant Lightmeter Pro, vous soutenez le développement et permettez l'ajout de nouvelles fonctionnalités à l'application.",
"unlockFor": "Déverrouiller pour {price}",
"@unlockFor": {
"price": {
"version": {
"type": "String"
}
}
},
"tooltipAdd": "Ajouter", "tooltipAdd": "Ajouter",
"tooltipClose": "Fermer", "tooltipClose": "Fermer",
"tooltipExpand": "Élargir", "tooltipExpand": "Élargir",

View file

@ -104,9 +104,31 @@
} }
}, },
"proFeatures": "Профессиональные настройки", "proFeatures": "Профессиональные настройки",
"unlockProFeatures": "Разблокировать профессиональные настройки", "proFeaturesTitle": "Lightmeter Pro",
"unlockProFeaturesDescription": "Вы можете разблокировать профессиональные настройки:\n \u2022 Профили оборудования, содержащие фильтры для диафрагмы, выдержки и других значений\n \u2022 Список пленок с компенсацией эффекта Шварцшильда\n \u2022 Точечный замер и гистограмма\n \u2022 И другие возможности!\n\nПолучая доступ к профессиональным настройкам, вы поддерживаете разработку и делаете возможным появление новых функций в приложении.",
"unlock": "Разблокировать", "unlock": "Разблокировать",
"featuresFree": "Бесплатно",
"featuresPro": "Pro",
"proFeaturesPromoText": "Lightmeter Pro предоставляет все необходимое для получения лучших снимков!",
"proFeaturesWhatsIncluded": "Что включено?",
"featureReflectedLightMetering": "Замер отраженного света",
"featureIncidentLightMetering": "Замер падающего света",
"featureIsoAndNdValues": "Широкий диапазон значений ISO и фильтров ND",
"featureTheme": "Настройка темы",
"featureSpotMetering": "Точечный замер",
"featureHistogram": "Гистограмма",
"featureListOfFilms": "Список из 20+ фильмов с формулами коррекции",
"featureEquipmentProfiles": "Профили оборудования",
"featureTimer": "Встроенный таймер для длинных выдержек",
"featureMeteringScreenLayout": "Настраиваемый главный экран",
"proFeaturesSupportText": "Покупая Lightmeter Pro, вы поддерживаете разработку и делаете возможным добавление новых функций в приложение.",
"unlockFor": "Разблокировать за {price}",
"@unlockFor": {
"price": {
"version": {
"type": "String"
}
}
},
"tooltipAdd": "Добавить", "tooltipAdd": "Добавить",
"tooltipClose": "Закрыть", "tooltipClose": "Закрыть",
"tooltipExpand": "Развернуть", "tooltipExpand": "Развернуть",

View file

@ -104,9 +104,30 @@
} }
}, },
"proFeatures": "专业功能", "proFeatures": "专业功能",
"unlockProFeatures": "解锁专业功能",
"unlockProFeaturesDescription": "\n \u2022 配置文件,其中包含光圈、快门速度等参数\n \u2022 胶卷列表,对胶片倒易率失效进行曝光补偿\n \u2022 点测光和直方图\n \u2022 和更多\n\n通过解锁专业版功能您可以支持开发工作帮助为应用程序添加新功能。",
"unlock": "解锁", "unlock": "解锁",
"featuresFree": "免费",
"featuresPro": "专业版",
"proFeaturesPromoText": "Lightmeter Pro 提供您需要的一切,助您拍出最佳照片!",
"proFeaturesWhatsIncluded": "包括哪些内容?",
"featureReflectedLightMetering": "反射光测光",
"featureIncidentLightMetering": "入射光测光",
"featureIsoAndNdValues": "广泛的ISO和ND滤镜值范围",
"featureTheme": "主题自定义",
"featureSpotMetering": "点测光",
"featureHistogram": "直方图",
"featureListOfFilms": "20多部电影的修正公式列表",
"featureEquipmentProfiles": "设备配置文件",
"featureTimer": "内置长曝光计时器",
"featureMeteringScreenLayout": "可自定义的主屏幕",
"proFeaturesSupportText": "通过购买Lightmeter Pro您支持开发工作并使添加新功能成为可能。",
"unlockFor": "解锁价格 {price}",
"@unlockFor": {
"price": {
"version": {
"type": "String"
}
}
},
"tooltipAdd": "添加", "tooltipAdd": "添加",
"tooltipClose": "关闭", "tooltipClose": "关闭",
"tooltipExpand": "展开", "tooltipExpand": "展开",

View file

@ -142,7 +142,7 @@ class _FeatureItem extends StatelessWidget {
vertical: Dimens.paddingS, vertical: Dimens.paddingS,
), ),
child: Text( child: Text(
feature.name, feature.name(context),
style: Theme.of(context).textTheme.bodyLarge, style: Theme.of(context).textTheme.bodyLarge,
), ),
), ),