Skip to content

chore(i18n): migrate l10n keys to fl_lib#1057

Merged
lollipopkit merged 1 commit intomainfrom
chore/migrate-start-stop-l10n-to-fl-lib
Feb 27, 2026
Merged

chore(i18n): migrate l10n keys to fl_lib#1057
lollipopkit merged 1 commit intomainfrom
chore/migrate-start-stop-l10n-to-fl-lib

Conversation

@lollipopkit
Copy link
Owner

@lollipopkit lollipopkit commented Feb 27, 2026

Summary

  • Move single-word i18n keys start/stop to fl_lib.
  • Remove start and stop keys from all root lib/l10n/app_*.arb files.
  • Replace remaining usages in root source from l10n.start/l10n.stop to libL10n.start/libL10n.stop.
  • Regenerate root localization code with flutter gen-l10n.

Notes

  • packages/fl_lib submodule has already been updated and merged (contains start/stop keys in source locale files).
  • This aligns with previous single-word-key migration (battery/addr 等语义单一键)

Summary by CodeRabbit

  • Refactor
    • Updated localization infrastructure by consolidating translation string references across the application.
    • Removed unused translation keys from multiple language files to streamline the localization system.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 27, 2026

📝 Walkthrough

Walkthrough

This pull request systematically migrates the application's localization system by replacing all l10n references with libL10n across the codebase. The change affects approximately 40 Dart files in the core logic, data models, and UI pages. Additionally, large sets of localization keys are removed from all translation ARB files (English, German, Spanish, French, Indonesian, Italian, Japanese, Korean, Dutch, Portuguese, Russian, Turkish, Ukrainian, Chinese, and Traditional Chinese). The fl_lib submodule reference is also updated. These changes shift the source of localized strings without altering functional behavior.

Possibly related PRs

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title clearly describes the main change: migrating localization keys to the fl_lib package, which aligns with the extensive updates throughout the codebase.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/migrate-start-stop-l10n-to-fl-lib

Comment @coderabbitai help to get the list of available commands and usage tips.

@lollipopkit lollipopkit changed the title chore(i18n): migrate start/stop keys to fl_lib chore(i18n): migrate l10n keys to fl_lib Feb 27, 2026
Copy link

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 4 additional findings.

Open in Devin Review
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 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

📥 Commits

Reviewing files that changed from the base of the PR and between 2166e27 and 61d699b.

⛔ Files ignored due to path filters (15)
  • lib/generated/l10n/l10n.dart is excluded by !**/generated/**
  • lib/generated/l10n/l10n_de.dart is excluded by !**/generated/**
  • lib/generated/l10n/l10n_en.dart is excluded by !**/generated/**
  • lib/generated/l10n/l10n_es.dart is excluded by !**/generated/**
  • lib/generated/l10n/l10n_fr.dart is excluded by !**/generated/**
  • lib/generated/l10n/l10n_id.dart is excluded by !**/generated/**
  • lib/generated/l10n/l10n_it.dart is excluded by !**/generated/**
  • lib/generated/l10n/l10n_ja.dart is excluded by !**/generated/**
  • lib/generated/l10n/l10n_ko.dart is excluded by !**/generated/**
  • lib/generated/l10n/l10n_nl.dart is excluded by !**/generated/**
  • lib/generated/l10n/l10n_pt.dart is excluded by !**/generated/**
  • lib/generated/l10n/l10n_ru.dart is excluded by !**/generated/**
  • lib/generated/l10n/l10n_tr.dart is excluded by !**/generated/**
  • lib/generated/l10n/l10n_uk.dart is excluded by !**/generated/**
  • lib/generated/l10n/l10n_zh.dart is excluded by !**/generated/**
📒 Files selected for processing (60)
  • lib/core/utils/server.dart
  • lib/data/model/app/menu/container.dart
  • lib/data/model/app/menu/platform.dart
  • lib/data/model/app/menu/server_func.dart
  • lib/data/model/app/net_view.dart
  • lib/data/model/app/scripts/cmd_types.dart
  • lib/data/model/app/server_detail_card.dart
  • lib/data/model/app/tab.dart
  • lib/data/model/container/ps.dart
  • lib/data/model/container/status.dart
  • lib/data/model/server/pve.dart
  • lib/l10n/app_de.arb
  • lib/l10n/app_en.arb
  • lib/l10n/app_es.arb
  • lib/l10n/app_fr.arb
  • lib/l10n/app_id.arb
  • lib/l10n/app_it.arb
  • lib/l10n/app_ja.arb
  • lib/l10n/app_ko.arb
  • lib/l10n/app_nl.arb
  • lib/l10n/app_pt.arb
  • lib/l10n/app_ru.arb
  • lib/l10n/app_tr.arb
  • lib/l10n/app_uk.arb
  • lib/l10n/app_zh.arb
  • lib/l10n/app_zh_tw.arb
  • lib/view/page/backup.dart
  • lib/view/page/container/actions.dart
  • lib/view/page/container/container.dart
  • lib/view/page/iperf.dart
  • lib/view/page/ping.dart
  • lib/view/page/process.dart
  • lib/view/page/pve.dart
  • lib/view/page/server/connection_stats.dart
  • lib/view/page/server/detail/view.dart
  • lib/view/page/server/discovery/discovery.dart
  • lib/view/page/server/edit/actions.dart
  • lib/view/page/server/edit/edit.dart
  • lib/view/page/server/edit/widget.dart
  • lib/view/page/server/tab/tab.dart
  • lib/view/page/server/tab/top_bar.dart
  • lib/view/page/server/tab/utils.dart
  • lib/view/page/setting/entries/ai.dart
  • lib/view/page/setting/entries/app.dart
  • lib/view/page/setting/entries/editor.dart
  • lib/view/page/setting/entries/server.dart
  • lib/view/page/setting/entries/sftp.dart
  • lib/view/page/setting/entries/ssh.dart
  • lib/view/page/setting/entry.dart
  • lib/view/page/setting/seq/srv_func_seq.dart
  • lib/view/page/snippet/edit.dart
  • lib/view/page/ssh/page/ask_ai.dart
  • lib/view/page/ssh/page/init.dart
  • lib/view/page/ssh/page/virt_key.dart
  • lib/view/page/ssh/tab.dart
  • lib/view/page/storage/local.dart
  • lib/view/page/storage/sftp.dart
  • lib/view/page/storage/sftp_mission.dart
  • lib/view/widget/server_func_btns.dart
  • packages/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
@lollipopkit lollipopkit merged commit c3678f3 into main Feb 27, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant