Skip to content

Project documents still describe the removed in-app language-settings UI #56

@kmch4n

Description

@kmch4n

Summary

Commit bab0b45 [🔥] Remove in-app language settings removed the in-app language picker, the persisted locale preference, and the setLocalePreference / loadInitialLocale helpers. The runtime now resolves the locale once at module init from expo-localization and never re-reads it.

The three project documents still describe the old behavior, which makes onboarding / handoff misleading and breaks the user-stated invariant that CLAUDE.md / SnowLog.md should reflect current implementation.

Problem (concrete divergences)

README.md:70

設定画面からの手動切替(日本語 / English / デバイスに従う)に対応し、選択は端末ローカルに永続化する。

The settings screen for language no longer exists; selection is not persisted. Should describe device-locale-only behavior and mention CFBundleLocalizations for InfoPlist localization.

SnowLog.md

  • §4.3 lists settings/language as a Stack-managed screen — it has been deleted (src/app/_layout.tsx registers no such screen).
  • §5.4 "i18n 初期ロケール解決" describes reading appPreferenceRepository.getPreference("locale") and "ja" | "en" | "device" value handling — none of this happens; see src/i18n/index.ts:12-18.
  • §7.7 lists 6 settings menu items including "言語設定". The actual menu has 5 navigable items (calendar / techniques / favoriteResorts / tags / duplicateCandidates) plus a maintenance row "不要ファイルを削除". See src/app/(tabs)/settings/index.tsx:30-59.
  • §13 item 8: "日英 2 言語の i18n 基盤が導入済みで、設定から手動切替できる" — manual switching removed.
  • §14 entire i18n chapter describes setLocalePreference, loadInitialLocale, the useSyncExternalStore-driven re-render of Stack screens, and the LocalePreference = SupportedLocale | "device" type. None of these symbols exist anymore (verified by grep across src/).

.claude/CLAUDE.md

  • "Boot order" comment mentions "i18n loadInitialLocale" — function does not exist.
  • "i18n live updates" section claims useTranslation returns { t, locale, preference, setPreference } and that setLocalePreference("ja"|"en"|"device") notifies subscribers. Actual return type is { t: ..., locale: SupportedLocale } — see src/i18n/useTranslation.ts:11-14.
  • app_preferences keys list includes locale — that key is no longer written.
  • Screens table includes settings/language.

Relevant files

  • README.md:70 — manual switching claim
  • SnowLog.md — §4.3, §5.4, §7.7, §13, §14
  • .claude/CLAUDE.md — boot order, i18n live updates section, app_preferences keys, screens list
  • src/i18n/index.ts:12-43 — actual i18n surface (only t, getCurrentLocale, getLocaleVersion, subscribeToLocale remain)
  • src/i18n/useTranslation.ts:11-38 — actual hook return type
  • src/i18n/types.ts — only SupportedLocale and SUPPORTED_LOCALES remain; LocalePreference and LOCALE_PREFERENCE_KEY are gone

Proposed fix

Update all three documents to describe the current, simpler behavior:

  1. Locale resolves once at module init via expo-localization.getLocales()[0]?.languageCode, falling back to en for non-ja devices.
  2. There is no in-app language switch; users change language by changing iOS system language.
  3. The useTranslation hook returns { t, locale } only.
  4. app_preferences keys actually used today are weekStartDay, home_sort_order, capturedAt_repair_version, thumbnail_migration_version — remove locale from any list.
  5. Settings menu in §7.7 should reflect the 5 navigable items + storage cleanup (covered separately by the orphan-cleanup docs issue).

Whether to also remove the now-dead subscribeToLocale / getLocaleVersion plumbing is tracked separately (see follow-up tech-debt issue).

Acceptance criteria

  • README.md no longer claims in-app language switching exists.
  • SnowLog.md §4.3 / §5.4 / §7.7 / §13 / §14 match current code.
  • CLAUDE.md boot order, i18n section, screens list, and app_preferences keys match current code.
  • Documentation describes the actual useTranslation return shape.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationpriority:mediumMedium prioritytech-debtCode health and maintainability

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions