@@ -9,6 +9,7 @@ import 'package:dpip/app/map/_lib/utils.dart';
99import 'package:dpip/app_old/page/map/tsunami/tsunami_estimate_list.dart' ;
1010import 'package:dpip/app_old/page/map/tsunami/tsunami_observed_list.dart' ;
1111import 'package:dpip/core/gps_location.dart' ;
12+ import 'package:dpip/core/i18n.dart' ;
1213import 'package:dpip/core/providers.dart' ;
1314import 'package:dpip/global.dart' ;
1415import 'package:dpip/utils/extensions/build_context.dart' ;
@@ -18,6 +19,7 @@ import 'package:dpip/utils/log.dart';
1819import 'package:dpip/widgets/map/map.dart' ;
1920import 'package:flex_color_picker/flex_color_picker.dart' ;
2021import 'package:flutter/material.dart' ;
22+ import 'package:i18n_extension/i18n_extension.dart' ;
2123import 'package:intl/intl.dart' ;
2224import 'package:maplibre_gl/maplibre_gl.dart' ;
2325
@@ -480,8 +482,8 @@ class _TsunamiMapLayerSheetState extends State<TsunamiMapLayerSheet> {
480482 children: [
481483 Text (
482484 tsunami == null
483- ? '近期無海嘯資訊'
484- : '海嘯警報' ,
485+ ? '近期無海嘯資訊' .i18n
486+ : '海嘯警報' .i18n ,
485487 style: TextStyle (
486488 fontSize: 28 ,
487489 fontWeight: FontWeight .bold,
@@ -491,7 +493,10 @@ class _TsunamiMapLayerSheetState extends State<TsunamiMapLayerSheet> {
491493 const SizedBox (height: 8 ),
492494 if (tsunami != null )
493495 Text (
494- '${tsunami !.id }號 第${tsunami !.serial }報' ,
496+ '{id}號 第{serial}報' .i18n.args ({
497+ 'id' : tsunami! .id,
498+ 'serial' : tsunami! .serial,
499+ }),
495500 style: TextStyle (
496501 fontSize: 16 ,
497502 fontWeight: FontWeight .w500,
@@ -503,7 +508,7 @@ class _TsunamiMapLayerSheetState extends State<TsunamiMapLayerSheet> {
503508 Text (
504509 tsunami != null
505510 ? '${tsunami !.time .toLocaleDateTimeString (context )} $tsunamiStatus '
506- : '${getTime ()} 更新' ,
511+ : '${getTime ()} 更新' .i18n ,
507512 style: TextStyle (
508513 fontSize: 14 ,
509514 color: context
@@ -543,10 +548,10 @@ class _TsunamiMapLayerSheetState extends State<TsunamiMapLayerSheet> {
543548 tsunami = await ExpTech ()
544549 .getTsunami (newValue);
545550 tsunamiStatus = tsunami? .status == 0
546- ? '發布'
551+ ? '發布' .i18n
547552 : tsunami? .status == 1
548- ? '更新'
549- : '解除' ;
553+ ? '更新' .i18n
554+ : '解除' .i18n ;
550555 if (tsunami != null ) {
551556 await addTsunamiObservationPoints (
552557 tsunami! ,
@@ -599,7 +604,7 @@ class _TsunamiMapLayerSheetState extends State<TsunamiMapLayerSheet> {
599604 CrossAxisAlignment .start,
600605 children: [
601606 Text (
602- '預估海嘯到達時間及波高' ,
607+ '預估海嘯到達時間及波高' .i18n ,
603608 style: TextStyle (
604609 fontSize: 22 ,
605610 fontWeight: FontWeight .bold,
@@ -618,7 +623,7 @@ class _TsunamiMapLayerSheetState extends State<TsunamiMapLayerSheet> {
618623 CrossAxisAlignment .start,
619624 children: [
620625 Text (
621- '各地觀測到的海嘯' ,
626+ '各地觀測到的海嘯' .i18n ,
622627 style: TextStyle (
623628 fontSize: 22 ,
624629 fontWeight: FontWeight .bold,
@@ -633,7 +638,7 @@ class _TsunamiMapLayerSheetState extends State<TsunamiMapLayerSheet> {
633638 ),
634639 const SizedBox (height: 15 ),
635640 Text (
636- '地震資訊' ,
641+ '地震資訊' .i18n ,
637642 style: TextStyle (
638643 fontSize: 22 ,
639644 fontWeight: FontWeight .bold,
@@ -646,7 +651,7 @@ class _TsunamiMapLayerSheetState extends State<TsunamiMapLayerSheet> {
646651 MainAxisAlignment .spaceBetween,
647652 children: [
648653 Text (
649- '發生時間' ,
654+ '發生時間' .i18n ,
650655 style: TextStyle (
651656 fontSize: 18 ,
652657 color: context.colors.onSurface,
@@ -677,7 +682,7 @@ class _TsunamiMapLayerSheetState extends State<TsunamiMapLayerSheet> {
677682 MainAxisAlignment .spaceBetween,
678683 children: [
679684 Text (
680- '位於' ,
685+ '位於' .i18n ,
681686 style: TextStyle (
682687 fontSize: 18 ,
683688 color: context.colors.onSurface,
@@ -728,7 +733,7 @@ class _TsunamiMapLayerSheetState extends State<TsunamiMapLayerSheet> {
728733 .spaceBetween,
729734 children: [
730735 Text (
731- '規模' ,
736+ '規模' .i18n ,
732737 style: TextStyle (
733738 fontSize: 18 ,
734739 color: context
@@ -757,7 +762,7 @@ class _TsunamiMapLayerSheetState extends State<TsunamiMapLayerSheet> {
757762 .spaceBetween,
758763 children: [
759764 Text (
760- '深度' ,
765+ '深度' .i18n ,
761766 style: TextStyle (
762767 fontSize: 18 ,
763768 color: context
0 commit comments