From 2609876c8fe59d9ba1f8c33372e9761a62240ed9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Urba=C5=84ski?= Date: Thu, 15 Mar 2018 00:04:06 +0100 Subject: [PATCH] Fix misspelling in tab description (#15449) Actual text: "Tab 2 of $3" Expected text: "Tab 2 of 3" --- .../flutter_localizations/lib/src/material_localizations.dart | 2 +- packages/flutter_localizations/test/translations_test.dart | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/flutter_localizations/lib/src/material_localizations.dart b/packages/flutter_localizations/lib/src/material_localizations.dart index 40f056740d..805d653e84 100644 --- a/packages/flutter_localizations/lib/src/material_localizations.dart +++ b/packages/flutter_localizations/lib/src/material_localizations.dart @@ -284,7 +284,7 @@ class GlobalMaterialLocalizations implements MaterialLocalizations { final String template = _translationBundle.tabLabel; return template .replaceFirst(r'$tabIndex', formatDecimal(tabIndex)) - .replaceFirst(r'tabCount', formatDecimal(tabCount)); + .replaceFirst(r'$tabCount', formatDecimal(tabCount)); } @override diff --git a/packages/flutter_localizations/test/translations_test.dart b/packages/flutter_localizations/test/translations_test.dart index d058732a93..7fa05e7f5d 100644 --- a/packages/flutter_localizations/test/translations_test.dart +++ b/packages/flutter_localizations/test/translations_test.dart @@ -82,8 +82,8 @@ void main() { expect(localizations.pageRowsInfoTitle(1, 10, 100, false), isNot(contains(r'$rowCount'))); expect(localizations.tabLabel(tabIndex: 2, tabCount: 5), isNotNull); - expect(localizations.tabLabel(tabIndex: 2, tabCount: 5), isNot(contains('tabIndex'))); - expect(localizations.tabLabel(tabIndex: 2, tabCount: 5), isNot(contains('tabCount'))); + expect(localizations.tabLabel(tabIndex: 2, tabCount: 5), isNot(contains(r'$tabIndex'))); + expect(localizations.tabLabel(tabIndex: 2, tabCount: 5), isNot(contains(r'$tabCount'))); expect(() => localizations.tabLabel(tabIndex: 0, tabCount: 5), throwsAssertionError); expect(() => localizations.tabLabel(tabIndex: 2, tabCount: 0), throwsAssertionError); });