Skip to content

バックグラウンド音声機能解放#4047

Merged
TinyKitten merged 1 commit intodevfrom
feature/bg-tts
Feb 1, 2025
Merged

バックグラウンド音声機能解放#4047
TinyKitten merged 1 commit intodevfrom
feature/bg-tts

Conversation

@TinyKitten
Copy link
Member

@TinyKitten TinyKitten commented Feb 1, 2025

Summary by CodeRabbit

  • 新機能
    • アプリに、背景音声機能利用時にマナーモード中でも音が再生される旨の注意メッセージを追加しました。
    • 設定画面の表示を改善し、背景音声設定に関する情報がより明確に提示されるようになりました。

@TinyKitten TinyKitten self-assigned this Feb 1, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 1, 2025

Walkthrough

このプルリクエストでは、TrainLCDアプリの翻訳ファイルに新規警告文が追加され、英語と日本語両言語で背景音声機能に関する注意喚起が実装されました。また、AsyncStorageで使用するキーの命名規則が、QAプレフィックスからBGプレフィックスに変更され、関連コンポーネント(PermittedやAppSettings)でのキー参照およびUI表示の処理が調整されています。

Changes

ファイル 変更内容
assets/translations/en.json および assets/translations/ja.json 背景音声機能の警告用新翻訳エントリ bgTtsAlertText を追加
src/constants/asyncStorage.ts QA_SPEECH_ENABLEDQA_TTS_NOTICEQA_BG_TTS_ENABLED を削除し、BG_TTS_ENABLEDBG_TTS_NOTICEを追加
src/components/Permitted.tsx 非同期ストレージキーの参照を QA_BG_TTS_ENABLED から BG_TTS_ENABLED に変更
src/screens/AppSettings/index.tsx AsyncStorageキーの更新、変数名の変更、および背景TTS通知用UI(bgTTSNoticeスタイル)の追加

Sequence Diagram(s)

sequenceDiagram
    participant 利用者
    participant 設定画面
    participant AsyncStorage
    participant 翻訳サービス
    利用者->>設定画面: 背景TTS機能を有効化
    設定画面->>AsyncStorage: BG_TTS_ENABLEDおよびBG_TTS_NOTICEを取得
    AsyncStorage-->>設定画面: 状態情報の返答
    設定画面->>翻訳サービス: bgTtsAlertTextを参照
    翻訳サービス-->>設定画面: 警告メッセージを返答
    設定画面->>利用者: 警告メッセージを表示
Loading

Suggested labels

react, functions

Poem

ふわり耳ピョンと
変更の風が舞い上がる
新たなキーと警告のメッセージ
アプリの世界が一新する
ぼくは小さなウサギ、跳ねながら祝う!
🌟🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bc3db40 and 390145c.

📒 Files selected for processing (5)
  • assets/translations/en.json (1 hunks)
  • assets/translations/ja.json (1 hunks)
  • src/components/Permitted.tsx (1 hunks)
  • src/constants/asyncStorage.ts (1 hunks)
  • src/screens/AppSettings/index.tsx (4 hunks)
🔇 Additional comments (7)
src/constants/asyncStorage.ts (1)

11-12: 命名規則の改善を確認しました

QAプレフィックスを削除し、BGプレフィックスを使用することで、より明確な命名規則となっています。

src/screens/AppSettings/index.tsx (3)

46-51: スタイリングの実装が適切です

背景音声機能の警告テキストのスタイリングが適切に実装されています。


101-121: ユーザー通知の実装が適切です

バックグラウンド音声機能の警告通知が適切に実装されており、ユーザーに重要な情報を明確に伝えています。


175-206: UIの実装が一貫しています

バックグラウンド音声設定のUIが他の設定項目と一貫性を保ちながら実装されており、警告テキストも適切に表示されています。

src/components/Permitted.tsx (1)

237-237: AsyncStorageキーの参照が適切に更新されています

BG_TTS_ENABLEDキーへの参照が正しく更新されており、新しい命名規則と整合性が取れています。

assets/translations/ja.json (1)

117-117: 警告メッセージの翻訳が適切です

バックグラウンド音声機能の警告メッセージが明確で、特に電車内での使用に関する注意喚起が適切に含まれています。

assets/translations/en.json (1)

116-116: 新規警告文の追加は適切です。
「bgTtsAlertText」キーが追加され、バックグラウンド音声機能が有効な場合に、サイレントモードでも音が鳴る旨がユーザーに明示されています。他の翻訳エントリとのスタイルやフォーマットも一貫しており、明瞭な警告文が実現されています。

✨ Finishing Touches
  • 📝 Generate Docstrings (Beta)

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added the react label Feb 1, 2025
@TinyKitten TinyKitten merged commit 8221fec into dev Feb 1, 2025
4 checks passed
@TinyKitten TinyKitten deleted the feature/bg-tts branch February 1, 2025 14:31
@coderabbitai coderabbitai bot mentioned this pull request Feb 19, 2025
This was referenced Jan 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant