From ea4f28f33cf1494f1de36c6ca8643e00db307077 Mon Sep 17 00:00:00 2001 From: Jong Hyun Kim Date: Sat, 14 Dec 2024 16:36:36 +0900 Subject: [PATCH 1/2] feat: Add more localization keys for ColorPicker - Add valueSliderTooltip and alphaSliderTooltip localization keys --- lib/l10n/generated/fluent_localizations.dart | 12 +++++++++ .../generated/fluent_localizations_ar.dart | 12 ++++++++- .../generated/fluent_localizations_be.dart | 10 +++++++ .../generated/fluent_localizations_bn.dart | 10 +++++++ .../generated/fluent_localizations_ca.dart | 10 +++++++ .../generated/fluent_localizations_cs.dart | 10 +++++++ .../generated/fluent_localizations_de.dart | 12 ++++++++- .../generated/fluent_localizations_el.dart | 10 +++++++ .../generated/fluent_localizations_en.dart | 10 +++++++ .../generated/fluent_localizations_es.dart | 10 +++++++ .../generated/fluent_localizations_fa.dart | 10 +++++++ .../generated/fluent_localizations_fr.dart | 10 +++++++ .../generated/fluent_localizations_he.dart | 10 +++++++ .../generated/fluent_localizations_hi.dart | 10 +++++++ .../generated/fluent_localizations_hr.dart | 10 +++++++ .../generated/fluent_localizations_hu.dart | 10 +++++++ .../generated/fluent_localizations_id.dart | 10 +++++++ .../generated/fluent_localizations_it.dart | 10 +++++++ .../generated/fluent_localizations_ja.dart | 20 ++++++++++---- .../generated/fluent_localizations_ko.dart | 12 ++++++++- .../generated/fluent_localizations_ku.dart | 10 +++++++ .../generated/fluent_localizations_ms.dart | 10 +++++++ .../generated/fluent_localizations_my.dart | 10 +++++++ .../generated/fluent_localizations_nl.dart | 10 +++++++ .../generated/fluent_localizations_pl.dart | 10 +++++++ .../generated/fluent_localizations_pt.dart | 10 +++++++ .../generated/fluent_localizations_ro.dart | 10 +++++++ .../generated/fluent_localizations_ru.dart | 10 +++++++ .../generated/fluent_localizations_sk.dart | 10 +++++++ .../generated/fluent_localizations_sv.dart | 10 +++++++ .../generated/fluent_localizations_ta.dart | 10 +++++++ .../generated/fluent_localizations_th.dart | 10 +++++++ .../generated/fluent_localizations_tr.dart | 10 +++++++ .../generated/fluent_localizations_uk.dart | 10 +++++++ .../generated/fluent_localizations_ur.dart | 10 +++++++ .../generated/fluent_localizations_uz.dart | 10 +++++++ .../generated/fluent_localizations_vi.dart | 10 +++++++ .../generated/fluent_localizations_zh.dart | 26 ++++++++++++++++--- lib/l10n/intl_ar.arb | 4 ++- lib/l10n/intl_be.arb | 4 ++- lib/l10n/intl_bn.arb | 2 ++ lib/l10n/intl_ca.arb | 2 ++ lib/l10n/intl_cs.arb | 2 ++ lib/l10n/intl_de.arb | 4 ++- lib/l10n/intl_el.arb | 2 ++ lib/l10n/intl_en.arb | 19 ++++++++++++++ lib/l10n/intl_es.arb | 2 ++ lib/l10n/intl_fa.arb | 2 ++ lib/l10n/intl_fr.arb | 2 ++ lib/l10n/intl_he.arb | 2 ++ lib/l10n/intl_hi.arb | 2 ++ lib/l10n/intl_hr.arb | 2 ++ lib/l10n/intl_hu.arb | 2 ++ lib/l10n/intl_id.arb | 2 ++ lib/l10n/intl_it.arb | 2 ++ lib/l10n/intl_ja.arb | 12 +++++---- lib/l10n/intl_ko.arb | 4 ++- lib/l10n/intl_ku.arb | 4 ++- lib/l10n/intl_ms.arb | 2 ++ lib/l10n/intl_my.arb | 4 ++- lib/l10n/intl_nl.arb | 2 ++ lib/l10n/intl_pl.arb | 2 ++ lib/l10n/intl_pt.arb | 2 ++ lib/l10n/intl_ro.arb | 2 ++ lib/l10n/intl_ru.arb | 2 ++ lib/l10n/intl_sk.arb | 2 ++ lib/l10n/intl_sv.arb | 2 ++ lib/l10n/intl_ta.arb | 2 ++ lib/l10n/intl_th.arb | 2 ++ lib/l10n/intl_tr.arb | 2 ++ lib/l10n/intl_uk.arb | 2 ++ lib/l10n/intl_ur.arb | 2 ++ lib/l10n/intl_uz.arb | 4 ++- lib/l10n/intl_vi.arb | 2 ++ lib/l10n/intl_zh.arb | 4 ++- lib/l10n/intl_zh_Hant.arb | 6 +++-- 76 files changed, 511 insertions(+), 26 deletions(-) diff --git a/lib/l10n/generated/fluent_localizations.dart b/lib/l10n/generated/fluent_localizations.dart index e9e38dfb..704ca318 100644 --- a/lib/l10n/generated/fluent_localizations.dart +++ b/lib/l10n/generated/fluent_localizations.dart @@ -409,6 +409,18 @@ abstract class FluentLocalizations { /// **'Less'** String get lessText; + /// No description provided for @valueSliderTooltip. + /// + /// In en, this message translates to: + /// **'Value {value} ({colorName})'** + String valueSliderTooltip(int value, String colorName); + + /// No description provided for @alphaSliderTooltip. + /// + /// In en, this message translates to: + /// **'{value}% opacity'** + String alphaSliderTooltip(int value); + /// The name of the color, Black. /// /// In en, this message translates to: diff --git a/lib/l10n/generated/fluent_localizations_ar.dart b/lib/l10n/generated/fluent_localizations_ar.dart index 3613f7e5..edc2ad76 100644 --- a/lib/l10n/generated/fluent_localizations_ar.dart +++ b/lib/l10n/generated/fluent_localizations_ar.dart @@ -109,7 +109,7 @@ class FluentLocalizationsAr extends FluentLocalizations { String get blueLabel => 'أزرق'; @override - String get opacityLabel => 'الشفافية'; + String get opacityLabel => 'معدل العتامة'; @override String get hueLabel => 'التدرج'; @@ -126,6 +126,16 @@ class FluentLocalizationsAr extends FluentLocalizations { @override String get lessText => 'أقل'; + @override + String valueSliderTooltip(int value, String colorName) { + return '($colorName) $value القيمة'; + } + + @override + String alphaSliderTooltip(int value) { + return '%$value معدل العتامة'; + } + @override String get colorBlack => 'أسود'; diff --git a/lib/l10n/generated/fluent_localizations_be.dart b/lib/l10n/generated/fluent_localizations_be.dart index e9d6565d..fb49805f 100644 --- a/lib/l10n/generated/fluent_localizations_be.dart +++ b/lib/l10n/generated/fluent_localizations_be.dart @@ -126,6 +126,16 @@ class FluentLocalizationsBe extends FluentLocalizations { @override String get lessText => 'Менш'; + @override + String valueSliderTooltip(int value, String colorName) { + return 'Значэнне $value ($colorName)'; + } + + @override + String alphaSliderTooltip(int value) { + return '$value% Непразрыстасць'; + } + @override String get colorBlack => 'Black'; diff --git a/lib/l10n/generated/fluent_localizations_bn.dart b/lib/l10n/generated/fluent_localizations_bn.dart index ed7661fd..822b5278 100644 --- a/lib/l10n/generated/fluent_localizations_bn.dart +++ b/lib/l10n/generated/fluent_localizations_bn.dart @@ -127,6 +127,16 @@ class FluentLocalizationsBn extends FluentLocalizations { @override String get lessText => 'কম'; + @override + String valueSliderTooltip(int value, String colorName) { + return 'মান $value ($colorName)'; + } + + @override + String alphaSliderTooltip(int value) { + return '$value% অস্বচ্ছতা'; + } + @override String get colorBlack => 'কালো'; diff --git a/lib/l10n/generated/fluent_localizations_ca.dart b/lib/l10n/generated/fluent_localizations_ca.dart index cbbcc23b..93f8a40e 100644 --- a/lib/l10n/generated/fluent_localizations_ca.dart +++ b/lib/l10n/generated/fluent_localizations_ca.dart @@ -129,6 +129,16 @@ class FluentLocalizationsCa extends FluentLocalizations { @override String get lessText => 'Menys'; + @override + String valueSliderTooltip(int value, String colorName) { + return 'Valor $value ($colorName)'; + } + + @override + String alphaSliderTooltip(int value) { + return '$value% Opacitat'; + } + @override String get colorBlack => 'Negre'; diff --git a/lib/l10n/generated/fluent_localizations_cs.dart b/lib/l10n/generated/fluent_localizations_cs.dart index f15c7162..4ed53feb 100644 --- a/lib/l10n/generated/fluent_localizations_cs.dart +++ b/lib/l10n/generated/fluent_localizations_cs.dart @@ -127,6 +127,16 @@ class FluentLocalizationsCs extends FluentLocalizations { @override String get lessText => 'Méně'; + @override + String valueSliderTooltip(int value, String colorName) { + return 'Hodnota $value ($colorName)'; + } + + @override + String alphaSliderTooltip(int value) { + return '$value% Neprůhlednost'; + } + @override String get colorBlack => 'Černá'; diff --git a/lib/l10n/generated/fluent_localizations_de.dart b/lib/l10n/generated/fluent_localizations_de.dart index 00b4ed94..516fb75e 100644 --- a/lib/l10n/generated/fluent_localizations_de.dart +++ b/lib/l10n/generated/fluent_localizations_de.dart @@ -121,7 +121,7 @@ class FluentLocalizationsDe extends FluentLocalizations { String get saturationLabel => 'Sättigung'; @override - String get valueLabel => 'Helligkeit'; + String get valueLabel => 'Wert'; @override String get moreText => 'Mehr'; @@ -129,6 +129,16 @@ class FluentLocalizationsDe extends FluentLocalizations { @override String get lessText => 'Weniger'; + @override + String valueSliderTooltip(int value, String colorName) { + return 'Wert $value ($colorName)'; + } + + @override + String alphaSliderTooltip(int value) { + return 'Deckkraft: $value%'; + } + @override String get colorBlack => 'Schwarz'; diff --git a/lib/l10n/generated/fluent_localizations_el.dart b/lib/l10n/generated/fluent_localizations_el.dart index 60008704..0bf9614c 100644 --- a/lib/l10n/generated/fluent_localizations_el.dart +++ b/lib/l10n/generated/fluent_localizations_el.dart @@ -129,6 +129,16 @@ class FluentLocalizationsEl extends FluentLocalizations { @override String get lessText => 'Λιγότερα'; + @override + String valueSliderTooltip(int value, String colorName) { + return 'Τιμή $value ($colorName)'; + } + + @override + String alphaSliderTooltip(int value) { + return '$value% Αδιαφάνεια'; + } + @override String get colorBlack => 'Μαύρο'; diff --git a/lib/l10n/generated/fluent_localizations_en.dart b/lib/l10n/generated/fluent_localizations_en.dart index 6569de7d..e4e42188 100644 --- a/lib/l10n/generated/fluent_localizations_en.dart +++ b/lib/l10n/generated/fluent_localizations_en.dart @@ -128,6 +128,16 @@ class FluentLocalizationsEn extends FluentLocalizations { @override String get lessText => 'Less'; + @override + String valueSliderTooltip(int value, String colorName) { + return 'Value $value ($colorName)'; + } + + @override + String alphaSliderTooltip(int value) { + return '$value% opacity'; + } + @override String get colorBlack => 'Black'; diff --git a/lib/l10n/generated/fluent_localizations_es.dart b/lib/l10n/generated/fluent_localizations_es.dart index b417284d..8c462447 100644 --- a/lib/l10n/generated/fluent_localizations_es.dart +++ b/lib/l10n/generated/fluent_localizations_es.dart @@ -129,6 +129,16 @@ class FluentLocalizationsEs extends FluentLocalizations { @override String get lessText => 'Menos'; + @override + String valueSliderTooltip(int value, String colorName) { + return 'Valor $value ($colorName)'; + } + + @override + String alphaSliderTooltip(int value) { + return '$value% Opacidad'; + } + @override String get colorBlack => 'Negro'; diff --git a/lib/l10n/generated/fluent_localizations_fa.dart b/lib/l10n/generated/fluent_localizations_fa.dart index 189d7079..4a723b16 100644 --- a/lib/l10n/generated/fluent_localizations_fa.dart +++ b/lib/l10n/generated/fluent_localizations_fa.dart @@ -127,6 +127,16 @@ class FluentLocalizationsFa extends FluentLocalizations { @override String get lessText => 'کمتر'; + @override + String valueSliderTooltip(int value, String colorName) { + return '($colorName) $value مقدار'; + } + + @override + String alphaSliderTooltip(int value) { + return '%$value تاری'; + } + @override String get colorBlack => 'مشکی'; diff --git a/lib/l10n/generated/fluent_localizations_fr.dart b/lib/l10n/generated/fluent_localizations_fr.dart index b6b21609..11421a61 100644 --- a/lib/l10n/generated/fluent_localizations_fr.dart +++ b/lib/l10n/generated/fluent_localizations_fr.dart @@ -129,6 +129,16 @@ class FluentLocalizationsFr extends FluentLocalizations { @override String get lessText => 'Moins'; + @override + String valueSliderTooltip(int value, String colorName) { + return 'Valeur $value ($colorName)'; + } + + @override + String alphaSliderTooltip(int value) { + return '$value% opacité'; + } + @override String get colorBlack => 'Noir'; diff --git a/lib/l10n/generated/fluent_localizations_he.dart b/lib/l10n/generated/fluent_localizations_he.dart index 91645307..dcea2d66 100644 --- a/lib/l10n/generated/fluent_localizations_he.dart +++ b/lib/l10n/generated/fluent_localizations_he.dart @@ -126,6 +126,16 @@ class FluentLocalizationsHe extends FluentLocalizations { @override String get lessText => 'פחות'; + @override + String valueSliderTooltip(int value, String colorName) { + return '($colorName) $value ערך'; + } + + @override + String alphaSliderTooltip(int value) { + return '%$value אטימות'; + } + @override String get colorBlack => 'שחור'; diff --git a/lib/l10n/generated/fluent_localizations_hi.dart b/lib/l10n/generated/fluent_localizations_hi.dart index 0597b02f..86ef78bb 100644 --- a/lib/l10n/generated/fluent_localizations_hi.dart +++ b/lib/l10n/generated/fluent_localizations_hi.dart @@ -128,6 +128,16 @@ class FluentLocalizationsHi extends FluentLocalizations { @override String get lessText => 'कम'; + @override + String valueSliderTooltip(int value, String colorName) { + return 'मान $value ($colorName)'; + } + + @override + String alphaSliderTooltip(int value) { + return '$value% अपारदर्शिता'; + } + @override String get colorBlack => 'काला'; diff --git a/lib/l10n/generated/fluent_localizations_hr.dart b/lib/l10n/generated/fluent_localizations_hr.dart index 3d742113..f76c2f1f 100644 --- a/lib/l10n/generated/fluent_localizations_hr.dart +++ b/lib/l10n/generated/fluent_localizations_hr.dart @@ -128,6 +128,16 @@ class FluentLocalizationsHr extends FluentLocalizations { @override String get lessText => 'Manje'; + @override + String valueSliderTooltip(int value, String colorName) { + return 'Vrijednost $value ($colorName)'; + } + + @override + String alphaSliderTooltip(int value) { + return '$value% Neprozirnost'; + } + @override String get colorBlack => 'Crna'; diff --git a/lib/l10n/generated/fluent_localizations_hu.dart b/lib/l10n/generated/fluent_localizations_hu.dart index 4711eea4..df5a43e5 100644 --- a/lib/l10n/generated/fluent_localizations_hu.dart +++ b/lib/l10n/generated/fluent_localizations_hu.dart @@ -127,6 +127,16 @@ class FluentLocalizationsHu extends FluentLocalizations { @override String get lessText => 'Kevesebb'; + @override + String valueSliderTooltip(int value, String colorName) { + return 'Érték $value ($colorName)'; + } + + @override + String alphaSliderTooltip(int value) { + return '$value% Átlátszatlanság'; + } + @override String get colorBlack => 'Fekete'; diff --git a/lib/l10n/generated/fluent_localizations_id.dart b/lib/l10n/generated/fluent_localizations_id.dart index bff29e50..bff6b46c 100644 --- a/lib/l10n/generated/fluent_localizations_id.dart +++ b/lib/l10n/generated/fluent_localizations_id.dart @@ -128,6 +128,16 @@ class FluentLocalizationsId extends FluentLocalizations { @override String get lessText => 'Sedikit'; + @override + String valueSliderTooltip(int value, String colorName) { + return 'Nilai $value ($colorName)'; + } + + @override + String alphaSliderTooltip(int value) { + return '$value% Keburaman'; + } + @override String get colorBlack => 'Hitam'; diff --git a/lib/l10n/generated/fluent_localizations_it.dart b/lib/l10n/generated/fluent_localizations_it.dart index a8aee3ac..fe97fcac 100644 --- a/lib/l10n/generated/fluent_localizations_it.dart +++ b/lib/l10n/generated/fluent_localizations_it.dart @@ -126,6 +126,16 @@ class FluentLocalizationsIt extends FluentLocalizations { @override String get lessText => 'Meno'; + @override + String valueSliderTooltip(int value, String colorName) { + return 'Valore $value ($colorName)'; + } + + @override + String alphaSliderTooltip(int value) { + return '$value% Opacità'; + } + @override String get colorBlack => 'Nero'; diff --git a/lib/l10n/generated/fluent_localizations_ja.dart b/lib/l10n/generated/fluent_localizations_ja.dart index 351a4324..5e4cbbaa 100644 --- a/lib/l10n/generated/fluent_localizations_ja.dart +++ b/lib/l10n/generated/fluent_localizations_ja.dart @@ -109,22 +109,32 @@ class FluentLocalizationsJa extends FluentLocalizations { String get blueLabel => '青'; @override - String get opacityLabel => '透明度'; + String get opacityLabel => '不透明度'; @override - String get hueLabel => '色相'; + String get hueLabel => '色合い'; @override String get saturationLabel => '彩度'; @override - String get valueLabel => '明度'; + String get valueLabel => '値'; @override - String get moreText => '詳細'; + String get moreText => 'さらに表示'; @override - String get lessText => '簡略'; + String get lessText => '表示を減らす'; + + @override + String valueSliderTooltip(int value, String colorName) { + return '値 $value ($colorName)'; + } + + @override + String alphaSliderTooltip(int value) { + return '$value% 不透明度'; + } @override String get colorBlack => '黒'; diff --git a/lib/l10n/generated/fluent_localizations_ko.dart b/lib/l10n/generated/fluent_localizations_ko.dart index 878a1d7a..f8295c93 100644 --- a/lib/l10n/generated/fluent_localizations_ko.dart +++ b/lib/l10n/generated/fluent_localizations_ko.dart @@ -109,7 +109,7 @@ class FluentLocalizationsKo extends FluentLocalizations { String get blueLabel => '파랑'; @override - String get opacityLabel => '투명도'; + String get opacityLabel => '불투명도'; @override String get hueLabel => '색상'; @@ -126,6 +126,16 @@ class FluentLocalizationsKo extends FluentLocalizations { @override String get lessText => '간단히'; + @override + String valueSliderTooltip(int value, String colorName) { + return '값 $value ($colorName)'; + } + + @override + String alphaSliderTooltip(int value) { + return '$value% 불투명도'; + } + @override String get colorBlack => '검정'; diff --git a/lib/l10n/generated/fluent_localizations_ku.dart b/lib/l10n/generated/fluent_localizations_ku.dart index 30b9a767..ab1e8666 100644 --- a/lib/l10n/generated/fluent_localizations_ku.dart +++ b/lib/l10n/generated/fluent_localizations_ku.dart @@ -128,6 +128,16 @@ class FluentLocalizationsKu extends FluentLocalizations { @override String get lessText => 'کەمتر'; + @override + String valueSliderTooltip(int value, String colorName) { + return 'Nirx $value ($colorName)'; + } + + @override + String alphaSliderTooltip(int value) { + return '$value% Tarî'; + } + @override String get colorBlack => 'Black'; diff --git a/lib/l10n/generated/fluent_localizations_ms.dart b/lib/l10n/generated/fluent_localizations_ms.dart index 2d8ac63b..fea06bdc 100644 --- a/lib/l10n/generated/fluent_localizations_ms.dart +++ b/lib/l10n/generated/fluent_localizations_ms.dart @@ -128,6 +128,16 @@ class FluentLocalizationsMs extends FluentLocalizations { @override String get lessText => 'Kurang'; + @override + String valueSliderTooltip(int value, String colorName) { + return 'Nilai $value ($colorName)'; + } + + @override + String alphaSliderTooltip(int value) { + return '$value% Kelegapan'; + } + @override String get colorBlack => 'Hitam'; diff --git a/lib/l10n/generated/fluent_localizations_my.dart b/lib/l10n/generated/fluent_localizations_my.dart index d27fd4c7..35da3607 100644 --- a/lib/l10n/generated/fluent_localizations_my.dart +++ b/lib/l10n/generated/fluent_localizations_my.dart @@ -126,6 +126,16 @@ class FluentLocalizationsMy extends FluentLocalizations { @override String get lessText => 'လျှော့၍'; + @override + String valueSliderTooltip(int value, String colorName) { + return 'တန်ဖိုး $value ($colorName)'; + } + + @override + String alphaSliderTooltip(int value) { + return '$value% အလင်းပိတ်မှု'; + } + @override String get colorBlack => 'Black'; diff --git a/lib/l10n/generated/fluent_localizations_nl.dart b/lib/l10n/generated/fluent_localizations_nl.dart index 0b0a8f76..39d1cda6 100644 --- a/lib/l10n/generated/fluent_localizations_nl.dart +++ b/lib/l10n/generated/fluent_localizations_nl.dart @@ -128,6 +128,16 @@ class FluentLocalizationsNl extends FluentLocalizations { @override String get lessText => 'Minder'; + @override + String valueSliderTooltip(int value, String colorName) { + return 'Waarde $value ($colorName)'; + } + + @override + String alphaSliderTooltip(int value) { + return '$value% Ondoorzichtigheid'; + } + @override String get colorBlack => 'Zwart'; diff --git a/lib/l10n/generated/fluent_localizations_pl.dart b/lib/l10n/generated/fluent_localizations_pl.dart index 557a5613..3fde2191 100644 --- a/lib/l10n/generated/fluent_localizations_pl.dart +++ b/lib/l10n/generated/fluent_localizations_pl.dart @@ -126,6 +126,16 @@ class FluentLocalizationsPl extends FluentLocalizations { @override String get lessText => 'Mniej'; + @override + String valueSliderTooltip(int value, String colorName) { + return 'Wartość $value ($colorName)'; + } + + @override + String alphaSliderTooltip(int value) { + return '$value% Nieprzezroczystość'; + } + @override String get colorBlack => 'Czarny'; diff --git a/lib/l10n/generated/fluent_localizations_pt.dart b/lib/l10n/generated/fluent_localizations_pt.dart index 84fde56a..bf3cab75 100644 --- a/lib/l10n/generated/fluent_localizations_pt.dart +++ b/lib/l10n/generated/fluent_localizations_pt.dart @@ -129,6 +129,16 @@ class FluentLocalizationsPt extends FluentLocalizations { @override String get lessText => 'Menos'; + @override + String valueSliderTooltip(int value, String colorName) { + return 'Valor $value ($colorName)'; + } + + @override + String alphaSliderTooltip(int value) { + return '$value% Opacidade'; + } + @override String get colorBlack => 'Preto'; diff --git a/lib/l10n/generated/fluent_localizations_ro.dart b/lib/l10n/generated/fluent_localizations_ro.dart index 9b564bbc..3d30ea48 100644 --- a/lib/l10n/generated/fluent_localizations_ro.dart +++ b/lib/l10n/generated/fluent_localizations_ro.dart @@ -128,6 +128,16 @@ class FluentLocalizationsRo extends FluentLocalizations { @override String get lessText => 'Mai puțin'; + @override + String valueSliderTooltip(int value, String colorName) { + return 'Valoare $value ($colorName)'; + } + + @override + String alphaSliderTooltip(int value) { + return '$value% Opacitate'; + } + @override String get colorBlack => 'Negru'; diff --git a/lib/l10n/generated/fluent_localizations_ru.dart b/lib/l10n/generated/fluent_localizations_ru.dart index b0a59419..e1fceb06 100644 --- a/lib/l10n/generated/fluent_localizations_ru.dart +++ b/lib/l10n/generated/fluent_localizations_ru.dart @@ -126,6 +126,16 @@ class FluentLocalizationsRu extends FluentLocalizations { @override String get lessText => 'Меньше'; + @override + String valueSliderTooltip(int value, String colorName) { + return 'Значение $value ($colorName)'; + } + + @override + String alphaSliderTooltip(int value) { + return '$value% Непрозрачность'; + } + @override String get colorBlack => 'Черный'; diff --git a/lib/l10n/generated/fluent_localizations_sk.dart b/lib/l10n/generated/fluent_localizations_sk.dart index 78062f9b..a94ddf45 100644 --- a/lib/l10n/generated/fluent_localizations_sk.dart +++ b/lib/l10n/generated/fluent_localizations_sk.dart @@ -128,6 +128,16 @@ class FluentLocalizationsSk extends FluentLocalizations { @override String get lessText => 'Menej'; + @override + String valueSliderTooltip(int value, String colorName) { + return 'Hodnota $value ($colorName)'; + } + + @override + String alphaSliderTooltip(int value) { + return '$value% Nepriehľadnosť'; + } + @override String get colorBlack => 'Čierna'; diff --git a/lib/l10n/generated/fluent_localizations_sv.dart b/lib/l10n/generated/fluent_localizations_sv.dart index d6090086..b2e2f58f 100644 --- a/lib/l10n/generated/fluent_localizations_sv.dart +++ b/lib/l10n/generated/fluent_localizations_sv.dart @@ -126,6 +126,16 @@ class FluentLocalizationsSv extends FluentLocalizations { @override String get lessText => 'Mindre'; + @override + String valueSliderTooltip(int value, String colorName) { + return 'Värde $value ($colorName)'; + } + + @override + String alphaSliderTooltip(int value) { + return '$value% Opacitet'; + } + @override String get colorBlack => 'Svart'; diff --git a/lib/l10n/generated/fluent_localizations_ta.dart b/lib/l10n/generated/fluent_localizations_ta.dart index bed7dca0..a029ccf4 100644 --- a/lib/l10n/generated/fluent_localizations_ta.dart +++ b/lib/l10n/generated/fluent_localizations_ta.dart @@ -130,6 +130,16 @@ class FluentLocalizationsTa extends FluentLocalizations { @override String get lessText => 'குறைவாக'; + @override + String valueSliderTooltip(int value, String colorName) { + return 'மதிப்பு $value ($colorName)'; + } + + @override + String alphaSliderTooltip(int value) { + return '$value% ஒளிபுகாத்தன்மை'; + } + @override String get colorBlack => 'கருப்பு'; diff --git a/lib/l10n/generated/fluent_localizations_th.dart b/lib/l10n/generated/fluent_localizations_th.dart index cb8c9557..99a526ce 100644 --- a/lib/l10n/generated/fluent_localizations_th.dart +++ b/lib/l10n/generated/fluent_localizations_th.dart @@ -126,6 +126,16 @@ class FluentLocalizationsTh extends FluentLocalizations { @override String get lessText => 'น้อยลง'; + @override + String valueSliderTooltip(int value, String colorName) { + return 'ค่า $value ($colorName)'; + } + + @override + String alphaSliderTooltip(int value) { + return '$value% ความทึบ'; + } + @override String get colorBlack => 'ดำ'; diff --git a/lib/l10n/generated/fluent_localizations_tr.dart b/lib/l10n/generated/fluent_localizations_tr.dart index 14e1a7f6..f0139875 100644 --- a/lib/l10n/generated/fluent_localizations_tr.dart +++ b/lib/l10n/generated/fluent_localizations_tr.dart @@ -126,6 +126,16 @@ class FluentLocalizationsTr extends FluentLocalizations { @override String get lessText => 'Daha Az'; + @override + String valueSliderTooltip(int value, String colorName) { + return 'Değer $value ($colorName)'; + } + + @override + String alphaSliderTooltip(int value) { + return '$value% Opaklık'; + } + @override String get colorBlack => 'Siyah'; diff --git a/lib/l10n/generated/fluent_localizations_uk.dart b/lib/l10n/generated/fluent_localizations_uk.dart index a30951e7..c7796fc7 100644 --- a/lib/l10n/generated/fluent_localizations_uk.dart +++ b/lib/l10n/generated/fluent_localizations_uk.dart @@ -126,6 +126,16 @@ class FluentLocalizationsUk extends FluentLocalizations { @override String get lessText => 'Менше'; + @override + String valueSliderTooltip(int value, String colorName) { + return 'Значення $value ($colorName)'; + } + + @override + String alphaSliderTooltip(int value) { + return '$value% Непрозорість'; + } + @override String get colorBlack => 'Чорний'; diff --git a/lib/l10n/generated/fluent_localizations_ur.dart b/lib/l10n/generated/fluent_localizations_ur.dart index 49e25ffa..9723e6c4 100644 --- a/lib/l10n/generated/fluent_localizations_ur.dart +++ b/lib/l10n/generated/fluent_localizations_ur.dart @@ -129,6 +129,16 @@ class FluentLocalizationsUr extends FluentLocalizations { @override String get lessText => 'کم'; + @override + String valueSliderTooltip(int value, String colorName) { + return '($colorName) $value قدر'; + } + + @override + String alphaSliderTooltip(int value) { + return '%$value دھندلاپن'; + } + @override String get colorBlack => 'سیاہ'; diff --git a/lib/l10n/generated/fluent_localizations_uz.dart b/lib/l10n/generated/fluent_localizations_uz.dart index 719f6e59..3760ad10 100644 --- a/lib/l10n/generated/fluent_localizations_uz.dart +++ b/lib/l10n/generated/fluent_localizations_uz.dart @@ -127,6 +127,16 @@ class FluentLocalizationsUz extends FluentLocalizations { @override String get lessText => 'Kamroq'; + @override + String valueSliderTooltip(int value, String colorName) { + return 'Qiymat $value ($colorName)'; + } + + @override + String alphaSliderTooltip(int value) { + return '$value% Tiniqmaslik'; + } + @override String get colorBlack => 'Black'; diff --git a/lib/l10n/generated/fluent_localizations_vi.dart b/lib/l10n/generated/fluent_localizations_vi.dart index 0ee379a6..b747f21b 100644 --- a/lib/l10n/generated/fluent_localizations_vi.dart +++ b/lib/l10n/generated/fluent_localizations_vi.dart @@ -127,6 +127,16 @@ class FluentLocalizationsVi extends FluentLocalizations { @override String get lessText => 'Ít hơn'; + @override + String valueSliderTooltip(int value, String colorName) { + return 'Giá trị $value ($colorName)'; + } + + @override + String alphaSliderTooltip(int value) { + return '$value% Độ mờ đục'; + } + @override String get colorBlack => 'Đen'; diff --git a/lib/l10n/generated/fluent_localizations_zh.dart b/lib/l10n/generated/fluent_localizations_zh.dart index 0f0b95dc..f30dfd07 100644 --- a/lib/l10n/generated/fluent_localizations_zh.dart +++ b/lib/l10n/generated/fluent_localizations_zh.dart @@ -118,7 +118,7 @@ class FluentLocalizationsZh extends FluentLocalizations { String get saturationLabel => '饱和度'; @override - String get valueLabel => '明度'; + String get valueLabel => '值'; @override String get moreText => '更多'; @@ -126,6 +126,16 @@ class FluentLocalizationsZh extends FluentLocalizations { @override String get lessText => '更少'; + @override + String valueSliderTooltip(int value, String colorName) { + return '值 $value ($colorName)'; + } + + @override + String alphaSliderTooltip(int value) { + return '$value% 不透明度'; + } + @override String get colorBlack => '黑色'; @@ -654,10 +664,10 @@ class FluentLocalizationsZhHant extends FluentLocalizationsZh { String get hueLabel => '色調'; @override - String get saturationLabel => '飽和度'; + String get saturationLabel => '彩度'; @override - String get valueLabel => '明度'; + String get valueLabel => '値'; @override String get moreText => '更多'; @@ -665,6 +675,16 @@ class FluentLocalizationsZhHant extends FluentLocalizationsZh { @override String get lessText => '更少'; + @override + String valueSliderTooltip(int value, String colorName) { + return '値 $value ($colorName)'; + } + + @override + String alphaSliderTooltip(int value) { + return '$value% 不透明度'; + } + @override String get colorBlack => '黑色'; diff --git a/lib/l10n/intl_ar.arb b/lib/l10n/intl_ar.arb index c1d91082..a9751d56 100644 --- a/lib/l10n/intl_ar.arb +++ b/lib/l10n/intl_ar.arb @@ -34,12 +34,14 @@ "redLabel": "أحمر", "greenLabel": "أخضر", "blueLabel": "أزرق", - "opacityLabel": "الشفافية", + "opacityLabel": "معدل العتامة", "hueLabel": "التدرج", "saturationLabel": "التشبع", "valueLabel": "القيمة", "moreText": "المزيد", "lessText": "أقل", + "valueSliderTooltip": "({colorName}) {value} القيمة", + "alphaSliderTooltip": "%{value} معدل العتامة", "colorBlack": "أسود", "colorNavy": "أزرق داكن", "colorDarkBlue": "أزرق داكن", diff --git a/lib/l10n/intl_be.arb b/lib/l10n/intl_be.arb index a3da2ddb..30699c66 100644 --- a/lib/l10n/intl_be.arb +++ b/lib/l10n/intl_be.arb @@ -37,5 +37,7 @@ "saturationLabel": "Насычанасць", "valueLabel": "Значэнне", "moreText": "Больш", - "lessText": "Менш" + "lessText": "Менш", + "valueSliderTooltip": "Значэнне {value} ({colorName})", + "alphaSliderTooltip": "{value}% Непразрыстасць" } \ No newline at end of file diff --git a/lib/l10n/intl_bn.arb b/lib/l10n/intl_bn.arb index 617c53dd..a0e55d19 100644 --- a/lib/l10n/intl_bn.arb +++ b/lib/l10n/intl_bn.arb @@ -40,6 +40,8 @@ "valueLabel": "মান", "moreText": "আরও", "lessText": "কম", + "valueSliderTooltip": "মান {value} ({colorName})", + "alphaSliderTooltip": "{value}% অস্বচ্ছতা", "colorBlack": "কালো", "colorNavy": "গাঢ় নীল", "colorDarkBlue": "গাঢ় নীল", diff --git a/lib/l10n/intl_ca.arb b/lib/l10n/intl_ca.arb index 3b185dcf..500c2e4d 100644 --- a/lib/l10n/intl_ca.arb +++ b/lib/l10n/intl_ca.arb @@ -40,6 +40,8 @@ "valueLabel": "Valor", "moreText": "Més", "lessText": "Menys", + "valueSliderTooltip": "Valor {value} ({colorName})", + "alphaSliderTooltip": "{value}% Opacitat", "colorBlack": "Negre", "colorNavy": "Blau fosc", "colorDarkBlue": "Blau fosc", diff --git a/lib/l10n/intl_cs.arb b/lib/l10n/intl_cs.arb index 7c2bdfdd..25ca4c80 100644 --- a/lib/l10n/intl_cs.arb +++ b/lib/l10n/intl_cs.arb @@ -40,6 +40,8 @@ "valueLabel": "Hodnota", "moreText": "Více", "lessText": "Méně", + "valueSliderTooltip": "Hodnota {value} ({colorName})", + "alphaSliderTooltip": "{value}% Neprůhlednost", "colorBlack": "Černá", "colorNavy": "Tmavě modrá", "colorDarkBlue": "Tmavě modrá", diff --git a/lib/l10n/intl_de.arb b/lib/l10n/intl_de.arb index 2eab5b1d..6882d007 100644 --- a/lib/l10n/intl_de.arb +++ b/lib/l10n/intl_de.arb @@ -37,9 +37,11 @@ "opacityLabel": "Deckkraft", "hueLabel": "Farbton", "saturationLabel": "Sättigung", - "valueLabel": "Helligkeit", + "valueLabel": "Wert", "moreText": "Mehr", "lessText": "Weniger", + "valueSliderTooltip": "Wert {value} ({colorName})", + "alphaSliderTooltip": "Deckkraft: {value}%", "colorBlack": "Schwarz", "colorNavy": "Dunkelblau", "colorDarkBlue": "Dunkelblau", diff --git a/lib/l10n/intl_el.arb b/lib/l10n/intl_el.arb index 5beeb553..01d8ddd8 100644 --- a/lib/l10n/intl_el.arb +++ b/lib/l10n/intl_el.arb @@ -40,6 +40,8 @@ "valueLabel": "Τιμή", "moreText": "Περισσότερα", "lessText": "Λιγότερα", + "valueSliderTooltip": "Τιμή {value} ({colorName})", + "alphaSliderTooltip": "{value}% Αδιαφάνεια", "colorBlack": "Μαύρο", "colorNavy": "Σκούρο μπλε", "colorDarkBlue": "Σκούρο μπλε", diff --git a/lib/l10n/intl_en.arb b/lib/l10n/intl_en.arb index 3877fd29..826b9551 100644 --- a/lib/l10n/intl_en.arb +++ b/lib/l10n/intl_en.arb @@ -160,6 +160,25 @@ "@lessText": { "description": "Text for collapsing color picker options" }, + "valueSliderTooltip": "Value {value} ({colorName})", + "@valueSliderTooltip": { + "placeholders": { + "value": { + "type": "int" + }, + "colorName": { + "type": "String" + } + } + }, + "alphaSliderTooltip": "{value}% opacity", + "@alphaSliderTooltip": { + "placeholders": { + "value": { + "type": "int" + } + } + }, "colorBlack": "Black", "@colorBlack": { "description": "The name of the color, Black." diff --git a/lib/l10n/intl_es.arb b/lib/l10n/intl_es.arb index e672eed1..7d9edee4 100644 --- a/lib/l10n/intl_es.arb +++ b/lib/l10n/intl_es.arb @@ -40,6 +40,8 @@ "valueLabel": "Valor", "moreText": "Más", "lessText": "Menos", + "valueSliderTooltip": "Valor {value} ({colorName})", + "alphaSliderTooltip": "{value}% Opacidad", "colorBlack": "Negro", "colorNavy": "Azul marino", "colorDarkBlue": "Azul marino", diff --git a/lib/l10n/intl_fa.arb b/lib/l10n/intl_fa.arb index c82ab229..a926a3c0 100644 --- a/lib/l10n/intl_fa.arb +++ b/lib/l10n/intl_fa.arb @@ -40,6 +40,8 @@ "valueLabel": "مقدار", "moreText": "بیشتر", "lessText": "کمتر", + "valueSliderTooltip": "({colorName}) {value} مقدار", + "alphaSliderTooltip": "%{value} تاری", "colorBlack": "مشکی", "colorNavy": "آبی تیره", "colorDarkBlue": "آبی تیره", diff --git a/lib/l10n/intl_fr.arb b/lib/l10n/intl_fr.arb index 547bab42..fbc8e64d 100644 --- a/lib/l10n/intl_fr.arb +++ b/lib/l10n/intl_fr.arb @@ -40,6 +40,8 @@ "valueLabel": "Valeur", "moreText": "Plus", "lessText": "Moins", + "valueSliderTooltip": "Valeur {value} ({colorName})", + "alphaSliderTooltip": "{value}% opacité", "colorBlack": "Noir", "colorNavy": "Bleu foncé", "colorDarkBlue": "Bleu foncé", diff --git a/lib/l10n/intl_he.arb b/lib/l10n/intl_he.arb index 1d820fd5..0b9bf3c9 100644 --- a/lib/l10n/intl_he.arb +++ b/lib/l10n/intl_he.arb @@ -133,6 +133,8 @@ "valueLabel": "ערך", "moreText": "עוד", "lessText": "פחות", + "valueSliderTooltip": "({colorName}) {value} ערך", + "alphaSliderTooltip": "%{value} אטימות", "colorBlack": "שחור", "colorNavy": "כחול כהה", "colorDarkBlue": "כחול כהה", diff --git a/lib/l10n/intl_hi.arb b/lib/l10n/intl_hi.arb index b4876115..8170c4e1 100644 --- a/lib/l10n/intl_hi.arb +++ b/lib/l10n/intl_hi.arb @@ -40,6 +40,8 @@ "valueLabel": "मान", "moreText": "अधिक", "lessText": "कम", + "valueSliderTooltip": "मान {value} ({colorName})", + "alphaSliderTooltip": "{value}% अपारदर्शिता", "colorBlack": "काला", "colorNavy": "गहरा नीला", "colorDarkBlue": "गहरा नीला", diff --git a/lib/l10n/intl_hr.arb b/lib/l10n/intl_hr.arb index 4961af1d..9c6722c9 100644 --- a/lib/l10n/intl_hr.arb +++ b/lib/l10n/intl_hr.arb @@ -133,6 +133,8 @@ "valueLabel": "Vrijednost", "moreText": "Više", "lessText": "Manje", + "valueSliderTooltip": "Vrijednost {value} ({colorName})", + "alphaSliderTooltip": "{value}% Neprozirnost", "colorBlack": "Crna", "colorNavy": "Tamnoplava", "colorDarkBlue": "Tamnoplava", diff --git a/lib/l10n/intl_hu.arb b/lib/l10n/intl_hu.arb index 14b3a014..47e36840 100644 --- a/lib/l10n/intl_hu.arb +++ b/lib/l10n/intl_hu.arb @@ -40,6 +40,8 @@ "valueLabel": "Érték", "moreText": "Több", "lessText": "Kevesebb", + "valueSliderTooltip": "Érték {value} ({colorName})", + "alphaSliderTooltip": "{value}% Átlátszatlanság", "colorBlack": "Fekete", "colorNavy": "Sötétkék", "colorDarkBlue": "Sötétkék", diff --git a/lib/l10n/intl_id.arb b/lib/l10n/intl_id.arb index 9309bd81..942d1f8f 100644 --- a/lib/l10n/intl_id.arb +++ b/lib/l10n/intl_id.arb @@ -40,6 +40,8 @@ "valueLabel": "Nilai", "moreText": "Lainnya", "lessText": "Sedikit", + "valueSliderTooltip": "Nilai {value} ({colorName})", + "alphaSliderTooltip": "{value}% Keburaman", "colorBlack": "Hitam", "colorNavy": "Biru gelap", "colorDarkBlue": "Biru gelap", diff --git a/lib/l10n/intl_it.arb b/lib/l10n/intl_it.arb index 4018e782..9f94c79d 100644 --- a/lib/l10n/intl_it.arb +++ b/lib/l10n/intl_it.arb @@ -40,6 +40,8 @@ "valueLabel": "Valore", "moreText": "Più", "lessText": "Meno", + "valueSliderTooltip": "Valore {value} ({colorName})", + "alphaSliderTooltip": "{value}% Opacità", "colorBlack": "Nero", "colorNavy": "Blu scuro", "colorDarkBlue": "Blu scuro", diff --git a/lib/l10n/intl_ja.arb b/lib/l10n/intl_ja.arb index 7b5b3ef1..cef23c5e 100644 --- a/lib/l10n/intl_ja.arb +++ b/lib/l10n/intl_ja.arb @@ -34,12 +34,14 @@ "redLabel": "赤", "greenLabel": "緑", "blueLabel": "青", - "opacityLabel": "透明度", - "hueLabel": "色相", + "opacityLabel": "不透明度", + "hueLabel": "色合い", "saturationLabel": "彩度", - "valueLabel": "明度", - "moreText": "詳細", - "lessText": "簡略", + "valueLabel": "値", + "moreText": "さらに表示", + "lessText": "表示を減らす", + "valueSliderTooltip": "値 {value} ({colorName})", + "alphaSliderTooltip": "{value}% 不透明度", "colorBlack": "黒", "colorNavy": "濃い青", "colorDarkBlue": "濃い青", diff --git a/lib/l10n/intl_ko.arb b/lib/l10n/intl_ko.arb index fefc2e15..2b01258a 100644 --- a/lib/l10n/intl_ko.arb +++ b/lib/l10n/intl_ko.arb @@ -34,12 +34,14 @@ "redLabel": "빨강", "greenLabel": "녹색", "blueLabel": "파랑", - "opacityLabel": "투명도", + "opacityLabel": "불투명도", "hueLabel": "색상", "saturationLabel": "채도", "valueLabel": "값", "moreText": "자세히", "lessText": "간단히", + "valueSliderTooltip": "값 {value} ({colorName})", + "alphaSliderTooltip": "{value}% 불투명도", "colorBlack": "검정", "colorNavy": "진한 파랑", "colorDarkBlue": "진한 파랑", diff --git a/lib/l10n/intl_ku.arb b/lib/l10n/intl_ku.arb index 6c7a375d..6588035e 100644 --- a/lib/l10n/intl_ku.arb +++ b/lib/l10n/intl_ku.arb @@ -132,5 +132,7 @@ "saturationLabel": "تێرایی", "valueLabel": "بەها", "moreText": "زیاتر", - "lessText": "کەمتر" + "lessText": "کەمتر", + "valueSliderTooltip": "Nirx {value} ({colorName})", + "alphaSliderTooltip": "{value}% Tarî" } \ No newline at end of file diff --git a/lib/l10n/intl_ms.arb b/lib/l10n/intl_ms.arb index 9dce4ff4..a9f68939 100644 --- a/lib/l10n/intl_ms.arb +++ b/lib/l10n/intl_ms.arb @@ -33,6 +33,8 @@ "valueLabel": "Nilai", "moreText": "Lagi", "lessText": "Kurang", + "valueSliderTooltip": "Nilai {value} ({colorName})", + "alphaSliderTooltip": "{value}% Kelegapan", "colorBlack": "Hitam", "colorNavy": "Biru tua", "colorDarkBlue": "Biru tua", diff --git a/lib/l10n/intl_my.arb b/lib/l10n/intl_my.arb index 964c7fa6..1dd2b2d6 100644 --- a/lib/l10n/intl_my.arb +++ b/lib/l10n/intl_my.arb @@ -37,5 +37,7 @@ "saturationLabel": "ပြည့်ဝမှု", "valueLabel": "တန်ဖိုး", "moreText": "ပို၍", - "lessText": "လျှော့၍" + "lessText": "လျှော့၍", + "valueSliderTooltip": "တန်ဖိုး {value} ({colorName})", + "alphaSliderTooltip": "{value}% အလင်းပိတ်မှု" } \ No newline at end of file diff --git a/lib/l10n/intl_nl.arb b/lib/l10n/intl_nl.arb index b8bb0005..9d480c3f 100644 --- a/lib/l10n/intl_nl.arb +++ b/lib/l10n/intl_nl.arb @@ -40,6 +40,8 @@ "valueLabel": "Waarde", "moreText": "Meer", "lessText": "Minder", + "valueSliderTooltip": "Waarde {value} ({colorName})", + "alphaSliderTooltip": "{value}% Ondoorzichtigheid", "colorBlack": "Zwart", "colorNavy": "Donkerblauw", "colorDarkBlue": "Donkerblauw", diff --git a/lib/l10n/intl_pl.arb b/lib/l10n/intl_pl.arb index 5f21282c..b596752d 100644 --- a/lib/l10n/intl_pl.arb +++ b/lib/l10n/intl_pl.arb @@ -33,6 +33,8 @@ "valueLabel": "Wartość", "moreText": "Więcej", "lessText": "Mniej", + "valueSliderTooltip": "Wartość {value} ({colorName})", + "alphaSliderTooltip": "{value}% Nieprzezroczystość", "colorBlack": "Czarny", "colorNavy": "Ciemnoniebieski", "colorDarkBlue": "Ciemnoniebieski", diff --git a/lib/l10n/intl_pt.arb b/lib/l10n/intl_pt.arb index 0610f47d..0ffde4ad 100644 --- a/lib/l10n/intl_pt.arb +++ b/lib/l10n/intl_pt.arb @@ -40,6 +40,8 @@ "valueLabel": "Valor", "moreText": "Mais", "lessText": "Menos", + "valueSliderTooltip": "Valor {value} ({colorName})", + "alphaSliderTooltip": "{value}% Opacidade", "colorBlack": "Preto", "colorNavy": "Azul escuro", "colorDarkBlue": "Azul escuro", diff --git a/lib/l10n/intl_ro.arb b/lib/l10n/intl_ro.arb index a2d00cf6..f8d6df0b 100644 --- a/lib/l10n/intl_ro.arb +++ b/lib/l10n/intl_ro.arb @@ -133,6 +133,8 @@ "valueLabel": "Valoare", "moreText": "Mai mult", "lessText": "Mai puțin", + "valueSliderTooltip": "Valoare {value} ({colorName})", + "alphaSliderTooltip": "{value}% Opacitate", "colorBlack": "Negru", "colorNavy": "Albastru închis", "colorDarkBlue": "Albastru închis", diff --git a/lib/l10n/intl_ru.arb b/lib/l10n/intl_ru.arb index dd5c3fa0..673e26ab 100644 --- a/lib/l10n/intl_ru.arb +++ b/lib/l10n/intl_ru.arb @@ -33,6 +33,8 @@ "valueLabel": "Значение", "moreText": "Больше", "lessText": "Меньше", + "valueSliderTooltip": "Значение {value} ({colorName})", + "alphaSliderTooltip": "{value}% Непрозрачность", "colorBlack": "Черный", "colorNavy": "Темно-синий", "colorDarkBlue": "Темно-синий", diff --git a/lib/l10n/intl_sk.arb b/lib/l10n/intl_sk.arb index ab083dbd..650c130f 100644 --- a/lib/l10n/intl_sk.arb +++ b/lib/l10n/intl_sk.arb @@ -133,6 +133,8 @@ "valueLabel": "Hodnota", "moreText": "Viac", "lessText": "Menej", + "valueSliderTooltip": "Hodnota {value} ({colorName})", + "alphaSliderTooltip": "{value}% Nepriehľadnosť", "colorBlack": "Čierna", "colorNavy": "Tmavomodrá", "colorDarkBlue": "Tmavomodrá", diff --git a/lib/l10n/intl_sv.arb b/lib/l10n/intl_sv.arb index 17901e1b..7fa82dbb 100644 --- a/lib/l10n/intl_sv.arb +++ b/lib/l10n/intl_sv.arb @@ -40,6 +40,8 @@ "valueLabel": "Värde", "moreText": "Mer", "lessText": "Mindre", + "valueSliderTooltip": "Värde {value} ({colorName})", + "alphaSliderTooltip": "{value}% Opacitet", "colorBlack": "Svart", "colorNavy": "Mörkblå", "colorDarkBlue": "Mörkblå", diff --git a/lib/l10n/intl_ta.arb b/lib/l10n/intl_ta.arb index 7f8dcb44..5a02410b 100644 --- a/lib/l10n/intl_ta.arb +++ b/lib/l10n/intl_ta.arb @@ -40,6 +40,8 @@ "valueLabel": "மதிப்பு", "moreText": "மேலும்", "lessText": "குறைவாக", + "valueSliderTooltip": "மதிப்பு {value} ({colorName})", + "alphaSliderTooltip": "{value}% ஒளிபுகாத்தன்மை", "colorBlack": "கருப்பு", "colorNavy": "அடர் நீலம்", "colorDarkBlue": "அடர் நீலம்", diff --git a/lib/l10n/intl_th.arb b/lib/l10n/intl_th.arb index 8b5fa471..b678c652 100644 --- a/lib/l10n/intl_th.arb +++ b/lib/l10n/intl_th.arb @@ -40,6 +40,8 @@ "valueLabel": "ค่า", "moreText": "เพิ่มเติม", "lessText": "น้อยลง", + "valueSliderTooltip": "ค่า {value} ({colorName})", + "alphaSliderTooltip": "{value}% ความทึบ", "colorBlack": "ดำ", "colorNavy": "น้ำเงินเข้ม", "colorDarkBlue": "น้ำเงินเข้ม", diff --git a/lib/l10n/intl_tr.arb b/lib/l10n/intl_tr.arb index 8ee93632..29859953 100644 --- a/lib/l10n/intl_tr.arb +++ b/lib/l10n/intl_tr.arb @@ -40,6 +40,8 @@ "valueLabel": "Değer", "moreText": "Daha Fazla", "lessText": "Daha Az", + "valueSliderTooltip": "Değer {value} ({colorName})", + "alphaSliderTooltip": "{value}% Opaklık", "colorBlack": "Siyah", "colorNavy": "Koyu mavi", "colorDarkBlue": "Koyu mavi", diff --git a/lib/l10n/intl_uk.arb b/lib/l10n/intl_uk.arb index 4015d955..60b906d4 100644 --- a/lib/l10n/intl_uk.arb +++ b/lib/l10n/intl_uk.arb @@ -38,6 +38,8 @@ "valueLabel": "Значення", "moreText": "Більше", "lessText": "Менше", + "valueSliderTooltip": "Значення {value} ({colorName})", + "alphaSliderTooltip": "{value}% Непрозорість", "colorBlack": "Чорний", "colorNavy": "Темно-синій", "colorDarkBlue": "Темно-синій", diff --git a/lib/l10n/intl_ur.arb b/lib/l10n/intl_ur.arb index 3e61ad66..e4edf147 100644 --- a/lib/l10n/intl_ur.arb +++ b/lib/l10n/intl_ur.arb @@ -40,6 +40,8 @@ "valueLabel": "قدر", "moreText": "مزید", "lessText": "کم", + "valueSliderTooltip": "({colorName}) {value} قدر", + "alphaSliderTooltip": "%{value} دھندلاپن", "colorBlack": "سیاہ", "colorNavy": "گہرا نیلا", "colorDarkBlue": "گہرا نیلا", diff --git a/lib/l10n/intl_uz.arb b/lib/l10n/intl_uz.arb index c492961b..b829ae96 100644 --- a/lib/l10n/intl_uz.arb +++ b/lib/l10n/intl_uz.arb @@ -37,5 +37,7 @@ "saturationLabel": "To'yinganlik", "valueLabel": "Qiymat", "moreText": "Ko'proq", - "lessText": "Kamroq" + "lessText": "Kamroq", + "valueSliderTooltip": "Qiymat {value} ({colorName})", + "alphaSliderTooltip": "{value}% Tiniqmaslik" } \ No newline at end of file diff --git a/lib/l10n/intl_vi.arb b/lib/l10n/intl_vi.arb index 1e48f38c..8210a9d1 100644 --- a/lib/l10n/intl_vi.arb +++ b/lib/l10n/intl_vi.arb @@ -40,6 +40,8 @@ "valueLabel": "Giá trị", "moreText": "Thêm", "lessText": "Ít hơn", + "valueSliderTooltip": "Giá trị {value} ({colorName})", + "alphaSliderTooltip": "{value}% Độ mờ đục", "colorBlack": "Đen", "colorNavy": "Xanh dương đậm", "colorDarkBlue": "Xanh dương đậm", diff --git a/lib/l10n/intl_zh.arb b/lib/l10n/intl_zh.arb index 80068267..78f1cf0b 100644 --- a/lib/l10n/intl_zh.arb +++ b/lib/l10n/intl_zh.arb @@ -37,9 +37,11 @@ "opacityLabel": "不透明度", "hueLabel": "色调", "saturationLabel": "饱和度", - "valueLabel": "明度", + "valueLabel": "值", "moreText": "更多", "lessText": "更少", + "valueSliderTooltip": "值 {value} ({colorName})", + "alphaSliderTooltip": "{value}% 不透明度", "colorBlack": "黑色", "colorNavy": "深蓝", "colorDarkBlue": "深蓝", diff --git a/lib/l10n/intl_zh_Hant.arb b/lib/l10n/intl_zh_Hant.arb index 2327b6d5..30352587 100644 --- a/lib/l10n/intl_zh_Hant.arb +++ b/lib/l10n/intl_zh_Hant.arb @@ -36,10 +36,12 @@ "blueLabel": "藍色", "opacityLabel": "不透明度", "hueLabel": "色調", - "saturationLabel": "飽和度", - "valueLabel": "明度", + "saturationLabel": "彩度", + "valueLabel": "値", "moreText": "更多", "lessText": "更少", + "valueSliderTooltip": "値 {value} ({colorName})", + "alphaSliderTooltip": "{value}% 不透明度", "colorBlack": "黑色", "colorNavy": "深藍", "colorDarkBlue": "深藍", From d5e8b2641409040449753c1c0c59a5fe6cd80356 Mon Sep 17 00:00:00 2001 From: Jong Hyun Kim Date: Sat, 14 Dec 2024 17:55:27 +0900 Subject: [PATCH 2/2] feat(ColorPicker): Apply localization to text, label and color display names - Update MoreButton style to match WinUI 3 --- .../form/color_picker/color_names.dart | 174 +++++++++--------- .../form/color_picker/color_picker.dart | 112 +++++++---- .../form/color_picker/color_spectrum.dart | 30 ++- 3 files changed, 186 insertions(+), 130 deletions(-) diff --git a/lib/src/controls/form/color_picker/color_names.dart b/lib/src/controls/form/color_picker/color_names.dart index a40cdc5d..c356a724 100644 --- a/lib/src/controls/form/color_picker/color_names.dart +++ b/lib/src/controls/form/color_picker/color_names.dart @@ -8,140 +8,140 @@ class _ColorNames { static const Map _values = { 0xFF000000: "Black", 0xFF000080: "Navy", - 0xFF00008B: "Dark Blue", - 0xFF0000CD: "Medium Blue", + 0xFF00008B: "DarkBlue", + 0xFF0000CD: "MediumBlue", 0xFF0000FF: "Blue", - 0xFF006400: "Dark Green", + 0xFF006400: "DarkGreen", 0xFF008000: "Green", 0xFF008080: "Teal", - 0xFF008B8B: "Dark Cyan", - 0xFF00BFFF: "Deep Sky Blue", - 0xFF00CED1: "Dark Turquoise", - 0xFF00FA9A: "Medium Spring Green", + 0xFF008B8B: "DarkCyan", + 0xFF00BFFF: "DeepSkyBlue", + 0xFF00CED1: "DarkTurquoise", + 0xFF00FA9A: "MediumSpringGreen", 0xFF00FF00: "Lime", - 0xFF00FF7F: "Spring Green", + 0xFF00FF7F: "SpringGreen", 0xFF00FFFF: "Cyan", - 0xFF191970: "Midnight Blue", - 0xFF1E90FF: "Dodger Blue", - 0xFF20B2AA: "Light Sea Green", - 0xFF228B22: "Forest Green", - 0xFF2E8B57: "Sea Green", - 0xFF2F4F4F: "Dark Slate Gray", - 0xFF32CD32: "Lime Green", - 0xFF3CB371: "Medium Sea Green", + 0xFF191970: "MidnightBlue", + 0xFF1E90FF: "DodgerBlue", + 0xFF20B2AA: "LightSeaGreen", + 0xFF228B22: "ForestGreen", + 0xFF2E8B57: "SeaGreen", + 0xFF2F4F4F: "DarkSlateGray", + 0xFF32CD32: "LimeGreen", + 0xFF3CB371: "MediumSeaGreen", 0xFF40E0D0: "Turquoise", - 0xFF4169E1: "Royal Blue", - 0xFF4682B4: "Steel Blue", - 0xFF483D8B: "Dark Slate Blue", - 0xFF48D1CC: "Medium Turquoise", + 0xFF4169E1: "RoyalBlue", + 0xFF4682B4: "SteelBlue", + 0xFF483D8B: "DarkSlateBlue", + 0xFF48D1CC: "MediumTurquoise", 0xFF4B0082: "Indigo", - 0xFF556B2F: "Dark Olive Green", - 0xFF5F9EA0: "Cadet Blue", - 0xFF6495ED: "Cornflower Blue", - 0xFF66CDAA: "Medium Aquamarine", - 0xFF696969: "Dim Gray", - 0xFF6A5ACD: "Slate Blue", - 0xFF6B8E23: "Olive Drab", - 0xFF708090: "Slate Gray", - 0xFF778899: "Light Slate Gray", - 0xFF7B68EE: "Medium Slate Blue", - 0xFF7CFC00: "Lawn Green", + 0xFF556B2F: "DarkOliveGreen", + 0xFF5F9EA0: "CadetBlue", + 0xFF6495ED: "CornflowerBlue", + 0xFF66CDAA: "MediumAquamarine", + 0xFF696969: "DimGray", + 0xFF6A5ACD: "SlateBlue", + 0xFF6B8E23: "OliveDrab", + 0xFF708090: "SlateGray", + 0xFF778899: "LightSlateGray", + 0xFF7B68EE: "MediumSlateBlue", + 0xFF7CFC00: "LawnGreen", 0xFF7FFF00: "Chartreuse", 0xFF7FFFD4: "Aquamarine", 0xFF800000: "Maroon", 0xFF800080: "Purple", 0xFF808000: "Olive", 0xFF808080: "Gray", - 0xFF87CEEB: "Sky Blue", - 0xFF87CEFA: "Light Sky Blue", - 0xFF8A2BE2: "Blue Violet", - 0xFF8B0000: "Dark Red", - 0xFF8B008B: "Dark Magenta", - 0xFF8B4513: "Saddle Brown", - 0xFF8FBC8F: "Dark Sea Green", - 0xFF90EE90: "Light Green", - 0xFF9370DB: "Medium Purple", - 0xFF9400D3: "Dark Violet", - 0xFF98FB98: "Pale Green", - 0xFF9932CC: "Dark Orchid", - 0xFF9ACD32: "Yellow Green", + 0xFF87CEEB: "SkyBlue", + 0xFF87CEFA: "LightSkyBlue", + 0xFF8A2BE2: "BlueViolet", + 0xFF8B0000: "DarkRed", + 0xFF8B008B: "DarkMagenta", + 0xFF8B4513: "SaddleBrown", + 0xFF8FBC8F: "DarkSeaGreen", + 0xFF90EE90: "LightGreen", + 0xFF9370DB: "MediumPurple", + 0xFF9400D3: "DarkViolet", + 0xFF98FB98: "PaleGreen", + 0xFF9932CC: "DarkOrchid", + 0xFF9ACD32: "YellowGreen", 0xFFA0522D: "Sienna", 0xFFA52A2A: "Brown", - 0xFFA9A9A9: "Dark Gray", - 0xFFADD8E6: "Light Blue", - 0xFFADFF2F: "Green Yellow", - 0xFFAFEEEE: "Pale Turquoise", - 0xFFB0C4DE: "Light Steel Blue", - 0xFFB0E0E6: "Powder Blue", + 0xFFA9A9A9: "DarkGray", + 0xFFADD8E6: "LightBlue", + 0xFFADFF2F: "GreenYellow", + 0xFFAFEEEE: "PaleTurquoise", + 0xFFB0C4DE: "LightSteelBlue", + 0xFFB0E0E6: "PowderBlue", 0xFFB22222: "Firebrick", - 0xFFB8860B: "Dark Goldenrod", - 0xFFBA55D3: "Medium Orchid", - 0xFFBC8F8F: "Rosy Brown", - 0xFFBDB76B: "Dark Khaki", + 0xFFB8860B: "DarkGoldenrod", + 0xFFBA55D3: "MediumOrchid", + 0xFFBC8F8F: "RosyBrown", + 0xFFBDB76B: "DarkKhaki", 0xFFC0C0C0: "Silver", - 0xFFC71585: "Medium Violet Red", - 0xFFCD5C5C: "Indian Red", + 0xFFC71585: "MediumVioletRed", + 0xFFCD5C5C: "IndianRed", 0xFFCD853F: "Peru", 0xFFD2691E: "Chocolate", 0xFFD2B48C: "Tan", - 0xFFD3D3D3: "Light Gray", + 0xFFD3D3D3: "LightGray", 0xFFD8BFD8: "Thistle", 0xFFDA70D6: "Orchid", 0xFFDAA520: "Goldenrod", - 0xFFDB7093: "Pale Violet Red", + 0xFFDB7093: "PaleVioletRed", 0xFFDC143C: "Crimson", 0xFFDCDCDC: "Gainsboro", 0xFFDDA0DD: "Plum", - 0xFFDEB887: "Burly Wood", - 0xFFE0FFFF: "Light Cyan", + 0xFFDEB887: "BurlyWood", + 0xFFE0FFFF: "LightCyan", 0xFFE6E6FA: "Lavender", - 0xFFE9967A: "Dark Salmon", + 0xFFE9967A: "DarkSalmon", 0xFFEE82EE: "Violet", - 0xFFEEE8AA: "Pale Goldenrod", - 0xFFF08080: "Light Coral", + 0xFFEEE8AA: "PaleGoldenrod", + 0xFFF08080: "LightCoral", 0xFFF0E68C: "Khaki", - 0xFFF0F8FF: "Alice Blue", + 0xFFF0F8FF: "AliceBlue", 0xFFF0FFF0: "Honeydew", 0xFFF0FFFF: "Azure", - 0xFFF4A460: "Sandy Brown", + 0xFFF4A460: "SandyBrown", 0xFFF5DEB3: "Wheat", 0xFFF5F5DC: "Beige", - 0xFFF5F5F5: "White Smoke", - 0xFFF5FFFA: "Mint Cream", - 0xFFF8F8FF: "Ghost White", + 0xFFF5F5F5: "WhiteSmoke", + 0xFFF5FFFA: "MintCream", + 0xFFF8F8FF: "GhostWhite", 0xFFFA8072: "Salmon", - 0xFFFAEBD7: "Antique White", + 0xFFFAEBD7: "AntiqueWhite", 0xFFFAF0E6: "Linen", - 0xFFFAFAD2: "Light Goldenrod Yellow", - 0xFFFDF5E6: "Old Lace", + 0xFFFAFAD2: "LightGoldenrodYellow", + 0xFFFDF5E6: "OldLace", 0xFFFF0000: "Red", 0xFFFF00FF: "Magenta", - 0xFFFF1493: "Deep Pink", - 0xFFFF4500: "Orange Red", + 0xFFFF1493: "DeepPink", + 0xFFFF4500: "OrangeRed", 0xFFFF6347: "Tomato", - 0xFFFF69B4: "Hot Pink", + 0xFFFF69B4: "HotPink", 0xFFFF7F50: "Coral", - 0xFFFF8C00: "Dark Orange", - 0xFFFFA07A: "Light Salmon", + 0xFFFF8C00: "DarkOrange", + 0xFFFFA07A: "LightSalmon", 0xFFFFA500: "Orange", - 0xFFFFB6C1: "Light Pink", + 0xFFFFB6C1: "LightPink", 0xFFFFC0CB: "Pink", 0xFFFFD700: "Gold", - 0xFFFFDAB9: "Peach Puff", - 0xFFFFDEAD: "Navajo White", + 0xFFFFDAB9: "PeachPuff", + 0xFFFFDEAD: "NavajoWhite", 0xFFFFE4B5: "Moccasin", 0xFFFFE4C4: "Bisque", - 0xFFFFE4E1: "Misty Rose", - 0xFFFFEBCD: "Blanched Almond", - 0xFFFFEFD5: "Papaya Whip", - 0xFFFFF0F5: "Lavender Blush", - 0xFFFFF5EE: "Sea Shell", + 0xFFFFE4E1: "MistyRose", + 0xFFFFEBCD: "BlanchedAlmond", + 0xFFFFEFD5: "PapayaWhip", + 0xFFFFF0F5: "LavenderBlush", + 0xFFFFF5EE: "SeaShell", 0xFFFFF8DC: "Cornsilk", - 0xFFFFFACD: "Lemon Chiffon", - 0xFFFFFAF0: "Floral White", + 0xFFFFFACD: "LemonChiffon", + 0xFFFFFAF0: "FloralWhite", 0xFFFFFAFA: "Snow", 0xFFFFFF00: "Yellow", - 0xFFFFFFE0: "Light Yellow", + 0xFFFFFFE0: "LightYellow", 0xFFFFFFF0: "Ivory", 0xFFFFFFFF: "White", }; diff --git a/lib/src/controls/form/color_picker/color_picker.dart b/lib/src/controls/form/color_picker/color_picker.dart index 49cbcef7..6e2bc194 100644 --- a/lib/src/controls/form/color_picker/color_picker.dart +++ b/lib/src/controls/form/color_picker/color_picker.dart @@ -273,10 +273,22 @@ class _ColorPickerState extends State { @override Widget build(BuildContext context) { + assert(debugCheckHasFluentTheme(context)); + assert(debugCheckHasFluentLocalizations(context)); + assert(debugCheckHasDirectionality(context)); + + final theme = FluentTheme.of(context); + final localizations = FluentLocalizations.of(context); + final bool hasVisibleInputs = widget.isHexInputVisible || widget.isColorChannelTextInputVisible || (widget.isAlphaEnabled && widget.isAlphaTextInputVisible); + final bool showMoreButton = widget.isMoreButtonVisible && hasVisibleInputs; + + final bool showInputs = + hasVisibleInputs && (!widget.isMoreButtonVisible || _isMoreExpanded); + // Build the color picker layout based on orientation if (widget.orientation == Axis.vertical) { return Column( @@ -289,15 +301,15 @@ class _ColorPickerState extends State { SizedBox(height: _ColorPickerSpacing.large.size), _buildSliders(), ], - if (widget.isMoreButtonVisible && hasVisibleInputs) ...[ + if (showMoreButton) ...[ SizedBox(height: _ColorPickerSpacing.large.size), - _buildMoreButton(), + _buildMoreButton(theme, localizations), ], - if (!widget.isMoreButtonVisible || _isMoreExpanded) ...[ - if (hasVisibleInputs) ...[ + if (showInputs) ...[ + if (!widget.isMoreButtonVisible) ...[ SizedBox(height: _ColorPickerSpacing.large.size), - _buildInputs(), ], + _buildInputs(), ], ], ); @@ -367,21 +379,44 @@ class _ColorPickerState extends State { } /// Builds the "More" button to expand the color picker inputs. - Widget _buildMoreButton() { + Widget _buildMoreButton( + FluentThemeData theme, FluentLocalizations localizations) { final moreButton = SizedBox( width: _ColorPickerSizes.inputBox.size, child: Button( + style: ButtonStyle( + padding: const WidgetStatePropertyAll( + EdgeInsets.only(left: 8, right: 4, top: 8, bottom: 8), + ), + shape: const WidgetStatePropertyAll( + RoundedRectangleBorder( + side: BorderSide.none, + ), + ), + backgroundColor: const WidgetStatePropertyAll(Colors.transparent), + foregroundColor: WidgetStateColor.resolveWith((states) { + if (states.isPressed) { + return theme.resources.textFillColorTertiary; + } + if (states.isHovered || states.isFocused) { + return theme.resources.textFillColorSecondary; + } + return theme.resources.textFillColorPrimary; + }), + ), onPressed: () => setState(() => _isMoreExpanded = !_isMoreExpanded), child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, + mainAxisAlignment: MainAxisAlignment.end, children: [ - // TODO: Localize for 'Less' and 'More' later - Text(_isMoreExpanded ? 'Less' : 'More'), + Text(_isMoreExpanded + ? localizations.lessText + : localizations.moreText), + const SizedBox(width: 8), Icon( _isMoreExpanded ? FluentIcons.chevron_up : FluentIcons.chevron_down, - size: 12, + size: 10, ), ], ), @@ -629,12 +664,14 @@ class _ColorSliders extends StatelessWidget { @override Widget build(BuildContext context) { final theme = FluentTheme.of(context); + final localizations = FluentLocalizations.of(context); // Determine if the sliders should be displayed horizontally or vertically final bool isVertical = orientation != Axis.vertical; final sliders = [ - if (isColorSliderVisible) _buildValueSlider(theme, isVertical), + if (isColorSliderVisible) + _buildValueSlider(theme, localizations, isVertical), if (isColorSliderVisible && isAlphaSliderVisible && isAlphaEnabled) orientation == Axis.vertical ? SizedBox(height: _ColorPickerSpacing.large.size) @@ -642,7 +679,7 @@ class _ColorSliders extends StatelessWidget { width: _ColorPickerSpacing.large.size, ), if (isAlphaSliderVisible && isAlphaEnabled) - _buildAlphaSlider(theme, isVertical), + _buildAlphaSlider(theme, localizations, isVertical), ]; return orientation == Axis.horizontal @@ -657,14 +694,17 @@ class _ColorSliders extends StatelessWidget { } /// Builds the value slider for the color picker. - Widget _buildValueSlider(FluentThemeData theme, bool isVertical) { + Widget _buildValueSlider(FluentThemeData theme, + FluentLocalizations localizations, bool isVertical) { final thumbColor = theme.resources.focusStrokeColorOuter; - final colorName = colorState.guessColorName(); - // Format the value text with color name - // TODO: Add localization support for "Value" text - final valueText = - 'Value ${(colorState.value * 100).round()}${colorName.isNotEmpty ? " ($colorName)" : ""}'; + final colorKey = colorState.guessColorName(); + final displayName = localizations.getColorDisplayName(colorKey); + + // Format the value text with color name : "Value 100 (Color Name)" + final valueText = localizations.valueSliderTooltip( + (colorState.value * 100).round(), + displayName.isNotEmpty ? displayName : ""); return SizedBox( width: isVertical @@ -711,10 +751,13 @@ class _ColorSliders extends StatelessWidget { } /// Builds the alpha slider for the color picker. - Widget _buildAlphaSlider(FluentThemeData theme, bool isVertical) { + Widget _buildAlphaSlider(FluentThemeData theme, + FluentLocalizations localizations, bool isVertical) { final thumbColor = theme.resources.focusStrokeColorOuter; - // TODO: Localize - final opacityText = '${(colorState.alpha * 100).round()}% opacity'; + + // Format the opacity text : "100% opacity" + final opacityText = + localizations.alphaSliderTooltip((colorState.alpha * 100).round()); return SizedBox( width: isVertical @@ -849,6 +892,8 @@ class _ColorInputs extends StatelessWidget { @override Widget build(BuildContext context) { + final localizations = FluentLocalizations.of(context); + // Update hex input whenever colorState changes _updateHexControllerText(); @@ -864,8 +909,8 @@ class _ColorInputs extends StatelessWidget { isMoreExpanded) ...[ _buildColorModeAndHexInput(colorMode), colorMode == _ColorMode.rgb - ? _buildRGBInputs() - : _buildHSVInputs(), + ? _buildRGBInputs(localizations) + : _buildHSVInputs(localizations), ], ], ); @@ -958,13 +1003,12 @@ class _ColorInputs extends StatelessWidget { } /// Builds the RGB input fields. - Widget _buildRGBInputs() { - // TODO: localize color channel labels + Widget _buildRGBInputs(FluentLocalizations localizations) { return Column( children: [ if (isColorChannelTextInputVisible) ...{ _buildNumberInput( - 'Red', + localizations.redLabel, colorState.red * 255, (v) { final newState = colorState.copyWith(red: v / 255); @@ -974,7 +1018,7 @@ class _ColorInputs extends StatelessWidget { max: 255, ), _buildNumberInput( - 'Green', + localizations.greenLabel, colorState.green * 255, (v) { final newState = colorState.copyWith(green: v / 255); @@ -984,7 +1028,7 @@ class _ColorInputs extends StatelessWidget { max: 255, ), _buildNumberInput( - 'Blue', + localizations.blueLabel, colorState.blue * 255, (v) { final newState = colorState.copyWith(blue: v / 255); @@ -996,7 +1040,7 @@ class _ColorInputs extends StatelessWidget { }, if (isAlphaEnabled && isAlphaTextInputVisible) ...[ _buildNumberInput( - 'Opacity', + localizations.opacityLabel, colorState.alpha * 100, (v) { final newState = colorState.copyWith(alpha: v / 100); @@ -1011,12 +1055,12 @@ class _ColorInputs extends StatelessWidget { } /// Builds the HSV input fields. - Widget _buildHSVInputs() { + Widget _buildHSVInputs(FluentLocalizations localizations) { return Column( children: [ if (isColorChannelTextInputVisible) ...{ _buildNumberInput( - 'Hue', + localizations.hueLabel, colorState.hue, (v) { final newState = colorState.copyWith(hue: v); @@ -1026,7 +1070,7 @@ class _ColorInputs extends StatelessWidget { max: maxHue.toDouble(), ), _buildNumberInput( - 'Saturation', + localizations.saturationLabel, colorState.saturation * 100, (v) { final newState = colorState.copyWith(saturation: v / 100); @@ -1036,7 +1080,7 @@ class _ColorInputs extends StatelessWidget { max: maxSaturation.toDouble(), ), _buildNumberInput( - 'Value', + localizations.valueLabel, colorState.value * 100, (v) { final newState = colorState.copyWith(value: v / 100); @@ -1048,7 +1092,7 @@ class _ColorInputs extends StatelessWidget { }, if (isAlphaEnabled && isAlphaTextInputVisible) ...[ _buildNumberInput( - 'Opacity', + localizations.opacityLabel, colorState.alpha * 100, (v) { final newState = colorState.copyWith(alpha: v / 100); diff --git a/lib/src/controls/form/color_picker/color_spectrum.dart b/lib/src/controls/form/color_picker/color_spectrum.dart index a4f7a194..e15214eb 100644 --- a/lib/src/controls/form/color_picker/color_spectrum.dart +++ b/lib/src/controls/form/color_picker/color_spectrum.dart @@ -62,6 +62,9 @@ class _ColorRingSpectrumState extends State { @override Widget build(BuildContext context) { + final theme = FluentTheme.of(context); + final localizations = FluentLocalizations.of(context); + return GestureDetector( onPanStart: _handlePanStart, onPanUpdate: _handlePanUpdate, @@ -72,7 +75,8 @@ class _ColorRingSpectrumState extends State { painter: _RingSpectrumPainter( colorState: widget.colorState, showLabel: _showLabel, - theme: FluentTheme.of(context), + theme: theme, + localizations: localizations, minHue: widget.minHue, maxHue: widget.maxHue, minSaturation: widget.minSaturation, @@ -203,6 +207,7 @@ class _ColorBoxSpectrumState extends State { @override Widget build(BuildContext context) { final theme = FluentTheme.of(context); + final localizations = FluentLocalizations.of(context); return GestureDetector( onPanStart: _handlePanStart, @@ -222,6 +227,7 @@ class _ColorBoxSpectrumState extends State { colorState: widget.colorState, showLabel: _showLabel, theme: theme, + localizations: localizations, minHue: widget.minHue, maxHue: widget.maxHue, minSaturation: widget.minSaturation, @@ -296,6 +302,9 @@ class _RingSpectrumPainter extends CustomPainter { /// The theme data for styling final FluentThemeData theme; + /// The localizations for color names + final FluentLocalizations localizations; + /// The minimum allowed hue value (0-360) final int minHue; @@ -313,6 +322,7 @@ class _RingSpectrumPainter extends CustomPainter { required this.colorState, required this.showLabel, required this.theme, + required this.localizations, this.minHue = 0, this.maxHue = 360, this.minSaturation = 0, @@ -408,8 +418,9 @@ class _RingSpectrumPainter extends CustomPainter { // Draw color name label if needed if (showLabel) { - final colorName = colorState.guessColorName(); - _drawLabel(canvas, size, colorName, indicatorOffset); + final colorKey = colorState.guessColorName(); + final displayName = localizations.getColorDisplayName(colorKey); + _drawLabel(canvas, size, displayName, indicatorOffset); } } @@ -433,8 +444,6 @@ class _RingSpectrumPainter extends CustomPainter { final textPainter = TextPainter( text: textSpan, - textAlign: TextAlign.left, - // TODO: Update if color names support RTL languages in the future. textDirection: dart.TextDirection.ltr, )..layout(); @@ -518,6 +527,9 @@ class _BoxSpectrumPainter extends CustomPainter { /// The theme data for styling final FluentThemeData theme; + /// The localizations for color names + final FluentLocalizations localizations; + /// The minimum allowed hue value (0-360) final int minHue; @@ -535,6 +547,7 @@ class _BoxSpectrumPainter extends CustomPainter { required this.colorState, required this.showLabel, required this.theme, + required this.localizations, this.minHue = 0, this.maxHue = 360, this.minSaturation = 0, @@ -628,8 +641,9 @@ class _BoxSpectrumPainter extends CustomPainter { // Draw color name label if needed if (showLabel) { - final colorName = colorState.guessColorName(); - _drawLabel(canvas, size, colorName, Offset(x, y)); + final colorKey = colorState.guessColorName(); + final displayName = localizations.getColorDisplayName(colorKey); + _drawLabel(canvas, size, displayName, Offset(x, y)); } } @@ -653,8 +667,6 @@ class _BoxSpectrumPainter extends CustomPainter { final textPainter = TextPainter( text: textSpan, - textAlign: TextAlign.left, - // TODO: Update if color names support RTL languages in the future. textDirection: dart.TextDirection.ltr, )..layout();