Skip to content

ci: check translation key consistency - #72

Open
cyfung1031 wants to merge 3 commits into
mainfrom
codex/translation-consistency-check
Open

ci: check translation key consistency#72
cyfung1031 wants to merge 3 commits into
mainfrom
codex/translation-consistency-check

Conversation

@cyfung1031

Copy link
Copy Markdown

Summary

  • add a baseline-aware translation consistency checker for public/locales/*/translations.json
  • validate staged translation changes before commit and pushed translation changes before push
  • run the same check in GitHub Actions on pushes and pull requests

The repository currently contains historical key gaps between locales, so the checker preserves that baseline while rejecting newly added or removed keys that are not changed consistently across every locale.

Verification

  • pnpm run check:i18n
  • pnpm run lint
  • intentional single-locale key addition was rejected with the missing locale list
  • staged-snapshot path was exercised successfully
  • pnpm run build was attempted with the documented proxy environment, but Next.js compilation stalled without producing an error and was stopped after approximately two minutes

@cyfung1031
cyfung1031 marked this pull request as ready for review August 4, 2026 12:19
@cyfung1031

Copy link
Copy Markdown
Author

@CodFrm missing keys found in en-US so merging #68 still have the gap with zh-CN.

public/locales/zh-CN/translations.json has 49 key(s) not present in en-US:
  admin.navigation.reports
  admin.reports.action_view
  admin.reports.col_actions
  admin.reports.col_comments
  admin.reports.col_createtime
  admin.reports.col_reason
  admin.reports.col_reporter
  admin.reports.col_script
  admin.reports.col_status
  admin.reports.filter_status
  admin.reports.title
  login.qq_migrate_deprecation_cancel
  login.qq_migrate_deprecation_content
  login.qq_migrate_deprecation_continue
  login.qq_migrate_deprecation_title
  user.contact_email
  user.email_code_placeholder
  user.email_code_required
  user.email_code_resend
  user.email_code_sent
  user.email_help_text
  user.email_send_code
  user.email_send_code_countdown
  user.profile.account_deactivated
  user.profile.ban_1_day
  user.profile.ban_30_days
  user.profile.ban_3_days
  user.profile.ban_7_days
  user.profile.ban_90_days
  user.profile.ban_clean_options
  user.profile.ban_clean_scores
  user.profile.ban_clean_scripts
  user.profile.ban_confirm_title
  user.profile.ban_custom
  user.profile.ban_duration
  user.profile.ban_expire_at
  user.profile.ban_permanent
  user.profile.ban_permanent_label
  user.profile.ban_reason
  user.profile.ban_reason_placeholder
  user.profile.ban_success
  user.profile.ban_user
  user.profile.ip_location
  user.profile.register_email
  user.profile.register_ip
  user.profile.unban_confirm
  user.profile.unban_success
  user.profile.unban_user
  user.profile.user_banned

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant