Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Set "avoid_hard_coded_japanese" to true #469

Merged
merged 5 commits into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion packages/flutter_app/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,4 @@ custom_lint:
rules:
# TODO(riscait): Enable custom lint rules for altive_lints.
# https://github.com/altive/flutter_app_template/issues/461
- avoid_hardcoded_japanese: false
- prefer_clock_now: false
8 changes: 6 additions & 2 deletions packages/flutter_app/lib/gen/strings.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/flutter_app/lib/i18n/app_en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ homePage:
list:
appInfo:
label: "App Info"
doubleCount: "The doubled count value :"
notFoundPage:
title: "404 Not Found"
header:
Expand Down
1 change: 1 addition & 0 deletions packages/flutter_app/lib/i18n/app_ja.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ homePage:
list:
appInfo:
label: "ใ‚ขใƒ—ใƒชๆƒ…ๅ ฑ"
doubleCount: "2ๅ€ใ•ใ‚ŒใŸใ‚ซใ‚ฆใƒณใƒˆๅ€ค๏ผš"
notFoundPage:
title: "404 Not Found"
header:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';

import '../../../gen/strings.g.dart';
import '../../../widgets/widgets.dart';

// Provider example.
Expand Down Expand Up @@ -35,7 +36,9 @@ class ProviderPage extends ConsumerWidget {
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
const DisplaySmallText('2ๅ€ใ•ใ‚ŒใŸใ‚ซใ‚ฆใƒณใƒˆๅ€ค๏ผš'),
DisplaySmallText(
Translations.of(context).homePage.list.doubleCount,
),
Comment on lines +39 to +41
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section is being made multilingual.

// doubleCounterProvider ใฎๅ€คใ‚’่กจ็คบ
DisplayLargeText('$doubleCount'),
ElevatedButton(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// ignore_for_file: avoid_hardcoded_japanese
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IGNORE comments are added to test-related files.

import 'package:flutter_app/features/update_requester/entities/requested_version_info.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:json_annotation/json_annotation.dart';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// ignore_for_file: avoid_hardcoded_japanese
import 'package:flutter_app/pages/riverpod_example_page/async_notifier_provider_page/async_notifier_provider_page.dart';
import 'package:flutter_app/pages/riverpod_example_page/entities/todo.dart';
import 'package:flutter_app/pages/riverpod_example_page/util/dio_provider.dart';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// ignore_for_file: avoid_hardcoded_japanese
import 'dart:math';

import 'package:cloud_firestore/cloud_firestore.dart';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// ignore_for_file: avoid_hardcoded_japanese
import 'package:flutter_app/util/logger/provider_logger.dart';
import 'package:flutter_test/flutter_test.dart';

Expand Down