Skip to content

Comments

feat: make MyHistory dates locale rely on uiLang#2002

Open
hiepau1231 wants to merge 1 commit intoempathyco:mainfrom
hiepau1231:feat/issue-791-myhistory-uilang
Open

feat: make MyHistory dates locale rely on uiLang#2002
hiepau1231 wants to merge 1 commit intoempathyco:mainfrom
hiepau1231:feat/issue-791-myhistory-uilang

Conversation

@hiepau1231
Copy link

@hiepau1231 hiepau1231 commented Feb 21, 2026

Description

Fixes #791

Makes the MyHistory component use uiLang from snippetConfig for date formatting, with proper fallback chain: uiLang > lang > locale prop.

Changes

  • Updated locale resolution in my-history.vue:
    • Before: snippetConfig?.lang ?? props.locale
    • After: snippetConfig?.uiLang ?? snippetConfig?.lang ?? props.locale
  • Added first character capitalization to formatted dates (some locales like es return lowercase weekday names)
  • Added 3 new test cases:
    • should use uiLang from snippetConfig for date formatting
    • should capitalize the first character of formatted dates
    • should fallback to lang when uiLang is not provided
  • Updated existing test to explicitly pass snippetConfig with lang: 'en'

Testing

  • All 10 tests pass ✅
  • New test cases cover uiLang priority, fallback behavior, and capitalization ✅

- Changed locale resolution to prefer uiLang over lang
- Added capitalization of first character in formatted dates
- Added comprehensive test cases for uiLang usage and capitalization
- Fixes empathyco#791

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@hiepau1231 hiepau1231 requested a review from a team as a code owner February 21, 2026 00:24
@hiepau1231
Copy link
Author

Hi @victorcg88,

I noticed the build CI check is failing on this PR (and on the previous #1990 as well). After investigating the logs, the root cause is not related to the code changes — it's a GitHub Actions security limitation.

Root cause:

The workflow uses actions/create-github-app-token which requires a GitHub App secret (appId). When a PR comes from a fork, GitHub Actions sets Secret source: None and does not inject repository secrets for security reasons. This causes the build to fail immediately with:

Error: [@octokit/auth-app] appId option is required

This means any PR from a fork will fail this CI check, regardless of the code quality.

Possible solutions (for maintainers):

  1. A maintainer with write access to empathyco/x can push this branch directly to the upstream repo and create the PR from there — secrets will be available and CI will pass.
  2. Alternatively, the workflow could be updated to use pull_request_target event instead of pull_request, which allows secrets to be safely used for fork PRs (with proper security precautions).

The code changes themselves are correct and all 10 tests pass locally. Happy to assist in any way I can!

Thanks for your time.

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.

[FEATURE]: My History dates locale should rely on uiLang

1 participant