chore(i18n): migrate l10n keys to fl_lib#1057
Conversation
📝 WalkthroughWalkthroughThis pull request systematically migrates the application's localization system by replacing all Possibly related PRs
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (2)
lib/view/page/storage/sftp_mission.dart (1)
143-143: Prefer a single parameterized localization key for this confirmation text.Composing the sentence from fragments (
delete+mission+ name) can produce awkward grammar in some locales. Use one localized template with a{name}placeholder instead.Based on learnings: "Keep localized strings in ARB files under lib/l10n/ (Flutter i18n)."
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@lib/view/page/storage/sftp_mission.dart` at line 143, Replace the composed fragments with a single parameterized localization key: add a new ARB entry (e.g., "confirmDeleteMission": "Are you sure you want to delete the mission \"{name}\"?") under lib/l10n/, run the localization codegen, and update the Text call to use the generated accessor (replace libL10n.askContinue('${libL10n.delete} ${libL10n.mission}($name)') with the new libL10n.confirmDeleteMission(name) or equivalent); keep the placeholder name variable and remove concatenation of libL10n.delete/libL10n.mission so translations can handle grammar/order per locale.lib/view/page/ssh/tab.dart (1)
139-139: Prefer a single localized template for the close-confirmation sentence.Line 139 builds a sentence by concatenating fragments; that can break word order in some locales. Consider replacing it with one formatted localization entry (e.g.,
closeSshConnection(name)), then render that directly.Based on learnings: "Applies to lib/view/**/*.dart : Prefer using libL10n strings before adding new ones to project l10n".
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@lib/view/page/ssh/tab.dart` at line 139, Replace the concatenated fragments used to render the SSH-close confirmation (currently built with Text('${libL10n.close} SSH ${libL10n.conn}($name) ?')) with a single localized template; add a new localization getter like closeSshConnection(String name) to libL10n and use it here (e.g., Text(libL10n.closeSshConnection(name))). Update the ARB/translation entry for closeSshConnection with a formatted message that includes the name placeholder so word order and grammar are correct for all locales.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed. Nitpick comments: In `@lib/view/page/ssh/tab.dart`: - Line 139: Replace the concatenated fragments used to render the SSH-close confirmation (currently built with Text('${libL10n.close} SSH ${libL10n.conn}($name) ?')) with a single localized template; add a new localization getter like closeSshConnection(String name) to libL10n and use it here (e.g., Text(libL10n.closeSshConnection(name))). Update the ARB/translation entry for closeSshConnection with a formatted message that includes the name placeholder so word order and grammar are correct for all locales. In `@lib/view/page/storage/sftp_mission.dart`: - Line 143: Replace the composed fragments with a single parameterized localization key: add a new ARB entry (e.g., "confirmDeleteMission": "Are you sure you want to delete the mission \"{name}\"?") under lib/l10n/, run the localization codegen, and update the Text call to use the generated accessor (replace libL10n.askContinue('${libL10n.delete} ${libL10n.mission}($name)') with the new libL10n.confirmDeleteMission(name) or equivalent); keep the placeholder name variable and remove concatenation of libL10n.delete/libL10n.mission so translations can handle grammar/order per locale. ℹ️ Review info
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (15)
lib/generated/l10n/l10n.dartis excluded by!**/generated/**lib/generated/l10n/l10n_de.dartis excluded by!**/generated/**lib/generated/l10n/l10n_en.dartis excluded by!**/generated/**lib/generated/l10n/l10n_es.dartis excluded by!**/generated/**lib/generated/l10n/l10n_fr.dartis excluded by!**/generated/**lib/generated/l10n/l10n_id.dartis excluded by!**/generated/**lib/generated/l10n/l10n_it.dartis excluded by!**/generated/**lib/generated/l10n/l10n_ja.dartis excluded by!**/generated/**lib/generated/l10n/l10n_ko.dartis excluded by!**/generated/**lib/generated/l10n/l10n_nl.dartis excluded by!**/generated/**lib/generated/l10n/l10n_pt.dartis excluded by!**/generated/**lib/generated/l10n/l10n_ru.dartis excluded by!**/generated/**lib/generated/l10n/l10n_tr.dartis excluded by!**/generated/**lib/generated/l10n/l10n_uk.dartis excluded by!**/generated/**lib/generated/l10n/l10n_zh.dartis excluded by!**/generated/**
📒 Files selected for processing (60)
lib/core/utils/server.dartlib/data/model/app/menu/container.dartlib/data/model/app/menu/platform.dartlib/data/model/app/menu/server_func.dartlib/data/model/app/net_view.dartlib/data/model/app/scripts/cmd_types.dartlib/data/model/app/server_detail_card.dartlib/data/model/app/tab.dartlib/data/model/container/ps.dartlib/data/model/container/status.dartlib/data/model/server/pve.dartlib/l10n/app_de.arblib/l10n/app_en.arblib/l10n/app_es.arblib/l10n/app_fr.arblib/l10n/app_id.arblib/l10n/app_it.arblib/l10n/app_ja.arblib/l10n/app_ko.arblib/l10n/app_nl.arblib/l10n/app_pt.arblib/l10n/app_ru.arblib/l10n/app_tr.arblib/l10n/app_uk.arblib/l10n/app_zh.arblib/l10n/app_zh_tw.arblib/view/page/backup.dartlib/view/page/container/actions.dartlib/view/page/container/container.dartlib/view/page/iperf.dartlib/view/page/ping.dartlib/view/page/process.dartlib/view/page/pve.dartlib/view/page/server/connection_stats.dartlib/view/page/server/detail/view.dartlib/view/page/server/discovery/discovery.dartlib/view/page/server/edit/actions.dartlib/view/page/server/edit/edit.dartlib/view/page/server/edit/widget.dartlib/view/page/server/tab/tab.dartlib/view/page/server/tab/top_bar.dartlib/view/page/server/tab/utils.dartlib/view/page/setting/entries/ai.dartlib/view/page/setting/entries/app.dartlib/view/page/setting/entries/editor.dartlib/view/page/setting/entries/server.dartlib/view/page/setting/entries/sftp.dartlib/view/page/setting/entries/ssh.dartlib/view/page/setting/entry.dartlib/view/page/setting/seq/srv_func_seq.dartlib/view/page/snippet/edit.dartlib/view/page/ssh/page/ask_ai.dartlib/view/page/ssh/page/init.dartlib/view/page/ssh/page/virt_key.dartlib/view/page/ssh/tab.dartlib/view/page/storage/local.dartlib/view/page/storage/sftp.dartlib/view/page/storage/sftp_mission.dartlib/view/widget/server_func_btns.dartpackages/fl_lib
💤 Files with no reviewable changes (15)
- lib/l10n/app_fr.arb
- lib/l10n/app_tr.arb
- lib/l10n/app_pt.arb
- lib/l10n/app_id.arb
- lib/l10n/app_de.arb
- lib/l10n/app_ko.arb
- lib/l10n/app_es.arb
- lib/l10n/app_en.arb
- lib/l10n/app_ja.arb
- lib/l10n/app_zh_tw.arb
- lib/l10n/app_zh.arb
- lib/l10n/app_nl.arb
- lib/l10n/app_ru.arb
- lib/l10n/app_it.arb
- lib/l10n/app_uk.arb
Summary
start/stoptofl_lib.startandstopkeys from all rootlib/l10n/app_*.arbfiles.l10n.start/l10n.stoptolibL10n.start/libL10n.stop.flutter gen-l10n.Notes
packages/fl_libsubmodule has already been updated and merged (containsstart/stopkeys in source locale files).Summary by CodeRabbit