Skip to content

Add Cloudflare AI runtime translations for marketing pages#556

Open
riderx wants to merge 8 commits intomainfrom
codex/cloudflare-ai-runtime-i18n
Open

Add Cloudflare AI runtime translations for marketing pages#556
riderx wants to merge 8 commits intomainfrom
codex/cloudflare-ai-runtime-i18n

Conversation

@riderx
Copy link
Copy Markdown
Member

@riderx riderx commented Apr 6, 2026

Summary

  • add a Cloudflare-only runtime translation layer for non-doc pages using Workers AI and edge cache
  • keep Astro content/build output English-only while restoring a runtime language selector on eligible pages
  • mark runtime-translated pages as non-indexable and keep English canonicals

Notes

  • docs and other excluded paths stay English-only
  • the language selector is hidden outside Cloudflare AI environments
  • local validation required disabling remote bindings for Astro's Cloudflare adapter

Validation

  • bunx paraglide-js compile --project ./project.inlang --outdir ./src/paraglide --emit-ts-declarations
  • bunx astro check still reports existing unrelated repo-wide diagnostics, but not in the touched translation files
  • CLOUDFLARE_ACCOUNT_ID=9ee3d7479a3c359681e3fab2c8cb22c0 bun run build reaches Cloudflare prerender, then fails later with the existing TypeError: Invalid URL string prerender-server issue

Summary by CodeRabbit

  • Documentation

    • Removed plugin documentation templates and icon references.
    • Removed PR preview and marketing reference documentation.
  • Chores

    • Updated dependencies including Tailwind CSS, TypeScript, Astro integrations, and various dev tools.
    • Removed environment variable arguments from build scripts.
    • Removed German blog post content.
    • Removed automated content generation and translation scripts.
    • Updated Cloudflare adapter configuration.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 6, 2026

📝 Walkthrough

Walkthrough

This PR comprehensively restructures the website by consolidating agent instructions (AGENT.md into AGENTS.md), removing extensive blog automation infrastructure (translation, cleanup, and content generation scripts), deleting German blog content, refactoring locale handling in components to use runtime translation logic, updating build configuration and dependencies, and removing template/documentation references.

Changes

Cohort / File(s) Summary
Documentation & Configuration Cleanup
.templates/PLUGIN_DOCUMENTATION_TEMPLATE.md, .templates/PLUGIN_ICONS_REFERENCE.md, docs/PR_PREVIEW_SETUP.md, docs/expo-marketing-reference.md, CLAUDE.md, AGENT.md, project.inlang/.gitignore, project.inlang/project_id
Removed template references, documentation guides, agent instructions, and project metadata files. Consolidated agent instructions into new AGENTS.md with expanded sections on SEO, accessibility, and testing requirements.
Build & Package Configuration
astro.config.mjs, package.json, _typos.toml
Updated Cloudflare adapter configuration (remoteBindings: false), refactored PUBLIC_DIR path normalization for readability; bumped dependency versions (TypeScript major upgrade, @supabase/supabase-js, mermaid, openai, tailwindcss); removed environment variables from build scripts; removed translation-related exclusion patterns from typos configuration.
Blog & Content Automation Scripts
scripts/blogs/*.tsx, scripts/blogs/*.js
Deleted blog maintenance scripts: delete_broken_all.tsx, fix_locales_all.tsx, remove_mismatching_locales.tsx, sync_seobot.js, translate_all.tsx, translate_untranslated.tsx. These handled broken content removal, locale synchronization, AI-powered validation, and blog translation workflows.
Translation Infrastructure
scripts/translate.tsx, scripts/generate_docs_translations.tsx, scripts/generate_plugin_translations.tsx, scripts/commonReplacements.ts, scripts/trainOpenAI.mjs, scripts/generateTutorials.mjs
Removed translation utilities and LLM-based content generation pipeline. Deleted OpenAI/Anthropic translation adapters, vector store training, and tutorial generation using LangChain; removed common text replacement helper.
Documentation Generation Scripts
scripts/generate-plugins-readme.ts, scripts/generate_plugin_icons.mjs, scripts/create-missing-translations.sh, scripts/cleanup_doc_translate.tsx
Deleted scripts for dynamically generating plugin documentation (README tables with GitHub/npm metrics, icon SVG generation from Heroicons), translation directory cleanup, and missing translation scaffolding (Bash).
Utility & Validation Scripts
scripts/check_image_links.js, scripts/check_sitemap_404.js, scripts/verify_missing_html_elements.js, scripts/repair_sitemap.tsx, scripts/clean_not_used.tsx, scripts/fix_code_languages_all.tsx, scripts/patch-astro-rolldown.js, scripts/setup_new_locale.tsx, scripts/yaml-to-json.js
Removed assorted maintenance scripts: image/HTML link validation, sitemap checking/repair, unused file cleanup, code block language fixes, Rolldown patches, locale setup automation, and YAML-to-JSON conversion utilities.
German Blog Content
src/content/blog/de/* (100+ markdown files)
Deleted entire German localized blog post collection covering topics such as Capacitor development, OTA updates, authentication, compliance, performance, CI/CD integration, security, and platform comparisons. No replacement or migration indicated.
Runtime Locale/Translation Components
src/components/Footer.astro, src/components/SEO.astro, src/components/doc/LanguageSelect.astro
Refactored language selection and SEO logic to derive locale metadata from Astro.locals.translation (runtime) instead of build-time locale lists. Footer selector now uses runtimeTranslationLocales and prefixRuntimeLocale() helper; SEO component conditionally applies noindex and empty alternates for runtime-translated pages; LanguageSelect now conditionally renders only when multiple locales exist and uses button elements with aria-current attributes for accessibility.

Sequence Diagram(s)

This PR does not meet the criteria for sequence diagram generation. The changes are primarily file deletions, configuration updates, and component refactoring—without introducing new multi-component interaction patterns or control flow requiring visualization.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

refactor, maintenance, content-cleanup


🐰 A grand cleanup hops along,
Scripts and schemas swept away in song,
Runtime locales dance and sway,
German blogs fade to yesterday,
Consolidation blooms—simpler, stronger, bright! 🌱✨

🚥 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 and concisely describes the main feature being introduced: runtime translations for marketing pages using Cloudflare AI infrastructure.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/cloudflare-ai-runtime-i18n
⚔️ Resolve merge conflicts
  • Resolve merge conflict in branch codex/cloudflare-ai-runtime-i18n

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

@riderx riderx marked this pull request as ready for review April 6, 2026 10:56
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 6, 2026

@chatgpt-codex-connector
Copy link
Copy Markdown

💡 Codex Review

const { pathname } = stripRuntimeLocalePrefix(parsed.pathname)

P1 Badge Keep locale-targeted links unchanged during runtime rewrite

On translated requests (for example /fr/...), this logic strips any existing locale segment from every internal anchor and then re-applies the current locale, so links that intentionally target another language (like the footer language switcher entries /de/..., /es/...) are rewritten to /fr/.... That makes all selector options point to the current language and prevents switching languages from a translated page.


https://github.com/Cap-go/website/blob/fcbb342566edd4b4b559d1e11eac05b268cfeae2/scripts/fix_code_languages_all.tsx#L1
P1 Badge Restore script used by dev and build preparation commands

This file is removed, but package.json still invokes it via fix_code_languages_all in both dev and build:prepare. As a result, those workflows now fail immediately with Module not found "scripts/fix_code_languages_all.tsx", which breaks normal local startup and CI build-prep execution introduced by this commit.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Copy Markdown
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.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/components/doc/LanguageSelect.astro`:
- Around line 29-38: The locale switch currently renders as buttons inside the
locales.map in LanguageSelect.astro and uses a JS pathname rewrite that removes
the first "/{currentLocale}/" and drops search/hash, breaking routes and no-JS
fallback; change the button to a real anchor (<a>) with an href that preserves
the full target URL (replace only the locale path segment, keep the rest of
pathname plus search and hash) so users without JS still work, or if you must
keep JS navigation, update the click handler to compute the new URL by swapping
just the locale path segment in Astro.locals.locale within the current
location.pathname and then append location.search and location.hash before
calling history.pushState or navigate — ensure aria-current logic remains based
on Astro.locals.locale and that ids (language_{j}) and display (j.toUpperCase())
stay the same.

In `@src/components/Footer.astro`:
- Line 324: Replace the deprecated Tailwind utility in the Footer.astro
component: update the class string on the element that currently contains
"ring-opacity-5 absolute bottom-full left-0 z-50 mb-2 hidden w-32 rounded-md
bg-[`#1c1c1f`] shadow-lg ring-1 ring-black focus:outline-none" by removing
"ring-opacity-5" and using the modern opacity syntax "ring-black/5" so the
element (in Footer.astro) keeps the same 5% ring opacity effect.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2c6de1e8-f160-4c8d-b66c-04b5305930fa

📥 Commits

Reviewing files that changed from the base of the PR and between 27f2b73 and fcbb342.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (299)
  • .templates/PLUGIN_DOCUMENTATION_TEMPLATE.md
  • .templates/PLUGIN_ICONS_REFERENCE.md
  • AGENT.md
  • AGENTS.md
  • CLAUDE.md
  • _typos.toml
  • astro.config.mjs
  • docs/PR_PREVIEW_SETUP.md
  • docs/expo-marketing-reference.md
  • loadedVectorStore/docstore.json
  • loadedVectorStore/faiss.index
  • messages/de.json
  • messages/es.json
  • messages/fr.json
  • messages/id.json
  • messages/it.json
  • messages/ja.json
  • messages/ko.json
  • messages/zh.json
  • package.json
  • project.inlang/.gitignore
  • project.inlang/project_id
  • scripts/blogs/delete_broken_all.tsx
  • scripts/blogs/fix_locales_all.tsx
  • scripts/blogs/remove_mismatching_locales.tsx
  • scripts/blogs/sync_seobot.js
  • scripts/blogs/translate_all.tsx
  • scripts/blogs/translate_untranslated.tsx
  • scripts/check_image_links.js
  • scripts/check_sitemap_404.js
  • scripts/clean_not_used.tsx
  • scripts/cleanup_doc_translate.tsx
  • scripts/commonReplacements.ts
  • scripts/create-missing-translations.sh
  • scripts/fix_code_languages_all.tsx
  • scripts/generate-plugins-readme.ts
  • scripts/generateTutorials.mjs
  • scripts/generate_docs_translations.tsx
  • scripts/generate_plugin_icons.mjs
  • scripts/generate_plugin_translations.tsx
  • scripts/patch-astro-rolldown.js
  • scripts/repair_sitemap.tsx
  • scripts/setup_new_locale.tsx
  • scripts/trainOpenAI.mjs
  • scripts/translate.tsx
  • scripts/verify_missing_html_elements.js
  • scripts/yaml-to-json.js
  • src/components/Footer.astro
  • src/components/SEO.astro
  • src/components/doc/LanguageSelect.astro
  • src/content/blog/de/2-way-communication-in-capacitor-apps.md
  • src/content/blog/de/5-common-ota-update-mistakes-to-avoid.md
  • src/content/blog/de/5-security-best-practices-for-mobile-app-live-updates.md
  • src/content/blog/de/5-steps-for-resolving-version-conflicts-in-capacitor-apps.md
  • src/content/blog/de/5-steps-to-deploy-hotfixes-with-capgo.md
  • src/content/blog/de/5-steps-to-distribute-custom-capacitor-plugins.md
  • src/content/blog/de/5-steps-to-implement-oauth2-in-capacitor-apps.md
  • src/content/blog/de/a-brand-new-organization-system.md
  • src/content/blog/de/account-deletion-compliance-apple-guidelines.md
  • src/content/blog/de/alternative-to-appflow.md
  • src/content/blog/de/alternative-to-expo.md
  • src/content/blog/de/alternative-to-voltbuilder.md
  • src/content/blog/de/android-16kb-page-size-capacitor-plugins.md
  • src/content/blog/de/android-setup-for-capacitor-apps.md
  • src/content/blog/de/angular-mobile-app-capacitor.md
  • src/content/blog/de/api-key-security-for-app-store-compliance.md
  • src/content/blog/de/api-rate-limiting-for-app-store-compliance.md
  • src/content/blog/de/app-store-metadata-what-developers-must-know.md
  • src/content/blog/de/app-store-vs-direct-updates-what-developers-need-to-know.md
  • src/content/blog/de/appcenter-migration.md
  • src/content/blog/de/appflow-cicd-integration-best-practices.md
  • src/content/blog/de/appflow-shutdown-alternative.md
  • src/content/blog/de/apple-policy-updates-for-capacitor-apps-2025.md
  • src/content/blog/de/apple-privacy-rules-for-capacitor-apps.md
  • src/content/blog/de/apple-vs-google-privacy-compliance-for-third-party-data.md
  • src/content/blog/de/automated-consent-tracking-for-capacitor-apps.md
  • src/content/blog/de/automatic-build-and-release-with-github-actions.md
  • src/content/blog/de/automatic-build-and-release-with-gitlab.md
  • src/content/blog/de/automatic-capacitor-android-build-github-action.md
  • src/content/blog/de/automatic-capacitor-android-build-gitlab.md
  • src/content/blog/de/automatic-capacitor-ios-build-codemagic.md
  • src/content/blog/de/automatic-capacitor-ios-build-github-action-with-match.md
  • src/content/blog/de/automatic-capacitor-ios-build-github-action.md
  • src/content/blog/de/basic-js-css-config-for-native-app-look.md
  • src/content/blog/de/best-practices-for-capacitor-code-sharing.md
  • src/content/blog/de/best-practices-for-capacitor-script-automation.md
  • src/content/blog/de/biometric-authentication-in-capacitor-apps.md
  • src/content/blog/de/birth-of-capgo-revolutionizing-capacitor-app-updates.md
  • src/content/blog/de/building-a-native-mobile-app-with-nextjs-and-capacitor.md
  • src/content/blog/de/capacitor-app-initialization-step-by-step-guide.md
  • src/content/blog/de/capacitor-apps-and-data-sharing-policies.md
  • src/content/blog/de/capacitor-apps-and-russias-data-laws-compliance-tips.md
  • src/content/blog/de/capacitor-changelog-management-ultimate-guide.md
  • src/content/blog/de/capacitor-cicd-pipeline-setup-guide.md
  • src/content/blog/de/capacitor-cicd-plugins-vs-appflow-key-differences.md
  • src/content/blog/de/capacitor-cli-commands-common-issues-and-fixes.md
  • src/content/blog/de/capacitor-cli-commands-for-version-updates.md
  • src/content/blog/de/capacitor-cli-plugin-commands-overview.md
  • src/content/blog/de/capacitor-cli-project-setup-guide.md
  • src/content/blog/de/capacitor-community-forums-for-plugin-developers.md
  • src/content/blog/de/capacitor-comprehensive-guide.md
  • src/content/blog/de/capacitor-live-updates-handling-version-conflicts.md
  • src/content/blog/de/capacitor-live-updates-staying-compliant-with-apple.md
  • src/content/blog/de/capacitor-native-bridge-android-plugin-basics.md
  • src/content/blog/de/capacitor-native-bridge-web-to-android-data-transfer.md
  • src/content/blog/de/capacitor-ota-updates-app-store-approval-guide.md
  • src/content/blog/de/capacitor-ota-updates-best-practices-for-performance.md
  • src/content/blog/de/capacitor-ota-updates-boosting-low-end-device-performance.md
  • src/content/blog/de/capacitor-ota-updates-cicd-integration-guide.md
  • src/content/blog/de/capacitor-ota-updates-cloud-hosting-options-compared.md
  • src/content/blog/de/capacitor-ota-updates-debugging-issues.md
  • src/content/blog/de/capacitor-ota-updates-security-tips.md
  • src/content/blog/de/capacitor-ota-updates-staying-compliant.md
  • src/content/blog/de/capacitor-ota-updates-targeting-ios-vs-android.md
  • src/content/blog/de/capacitor-ota-updates-version-targeting-explained.md
  • src/content/blog/de/capacitor-ota-updates-versioning-best-practices.md
  • src/content/blog/de/capacitor-ota-updates-vs-app-store-restrictions.md
  • src/content/blog/de/capacitor-ota-updates-vs-traditional-testing-methods.md
  • src/content/blog/de/capacitor-ota-updates-vs-traditional-versioning.md
  • src/content/blog/de/capacitor-plugin-contribution-guide.md
  • src/content/blog/de/capacitor-plugin-options-for-ota-updates.md
  • src/content/blog/de/capacitor-plugins-for-secure-session-management.md
  • src/content/blog/de/capacitor-plugins-what-you-need-to-know.md
  • src/content/blog/de/capacitor-social-login-release.md
  • src/content/blog/de/capacitor-vs-appflow-ota-update-solutions-compared.md
  • src/content/blog/de/capacitor-vs-appflow-versioning-differences.md
  • src/content/blog/de/capgo-for-app-store-safe-ota-updates.md
  • src/content/blog/de/capgo-integration-with-github-actions-guide.md
  • src/content/blog/de/capgo-price-reduction.md
  • src/content/blog/de/capgo-purpose.md
  • src/content/blog/de/capgo-vs-appflow-deployment-solutions-compared.md
  • src/content/blog/de/ccpa-compliance-for-mobile-apps.md
  • src/content/blog/de/checklist-for-cybersecurity-compliance-in-china.md
  • src/content/blog/de/checklist-for-google-play-ota-compliance.md
  • src/content/blog/de/checklist-for-ota-updates-under-australias-privacy-act.md
  • src/content/blog/de/checklist-for-token-signing-in-capacitor-apps.md
  • src/content/blog/de/checklist-for-validating-capacitor-app-updates.md
  • src/content/blog/de/chinas-cybersecurity-law-impact-on-app-updates.md
  • src/content/blog/de/chinas-data-privacy-laws-impact-on-mobile-apps.md
  • src/content/blog/de/code-integrity-in-capacitor-apps-key-techniques.md
  • src/content/blog/de/common-cicd-bottlenecks-in-ota-pipelines.md
  • src/content/blog/de/common-live-update-issues-and-solutions-for-developers.md
  • src/content/blog/de/common-mistakes-in-custom-attribute-segmentation.md
  • src/content/blog/de/comparing-react-native-vs-capacitor.md
  • src/content/blog/de/compliance-checks-in-cicd-for-capacitor-apps.md
  • src/content/blog/de/configuring-rollback-for-capacitor-updates.md
  • src/content/blog/de/cordova-hybrid-app-development.md
  • src/content/blog/de/cpra-compliance-for-app-developers.md
  • src/content/blog/de/create-offline-screen-in-vue-angular-react.md
  • src/content/blog/de/create-react-mobile-apps-with-capacitor.md
  • src/content/blog/de/creating-and-deleting-update-channels-in-capacitor.md
  • src/content/blog/de/creating-mobile-apps-with-react-and-capacitor.md
  • src/content/blog/de/creating-mobile-apps-with-sveltekit-and-capacitor.md
  • src/content/blog/de/cross-platform-mobile-app-development-guide-2024.md
  • src/content/blog/de/cross-platform-uiux-best-practices-for-capacitor-apps.md
  • src/content/blog/de/custom-ios-plugin-optimization-best-practices.md
  • src/content/blog/de/developing-cross-platform-apps-with-capacitorjs.md.md
  • src/content/blog/de/development-vs-production-key-differences-in-capacitor-apps.md
  • src/content/blog/de/do-apple-allow-live-updates.md
  • src/content/blog/de/do-capgo-work-for-cordova.md
  • src/content/blog/de/do-google-allow-live-updates.md
  • src/content/blog/de/enable-ios-developer-mode-ios16.md
  • src/content/blog/de/error-handling-in-capacitor-apps-ux-best-practices.md
  • src/content/blog/de/error-logging-tools-for-capacitor-ota-updates.md
  • src/content/blog/de/firebase-crashlytics-for-capacitor-apps.md
  • src/content/blog/de/fix-capacitor-version-mismatch-errors.md
  • src/content/blog/de/fixing-build-failures-in-capacitor-ci-cd-pipelines.md
  • src/content/blog/de/git-flow-vs-trunk-based-for-cicd.md
  • src/content/blog/de/google-play-compliance-key-update-strategies.md
  • src/content/blog/de/google-play-staged-rollouts-how-it-works.md
  • src/content/blog/de/how-I-manage-semantic-release-with-CapGo-CapacitorUpdater.md
  • src/content/blog/de/how-capacitor-bridges-web-and-native-code.md
  • src/content/blog/de/how-capacitor-handles-platform-differences.md
  • src/content/blog/de/how-capgo-is-born.md
  • src/content/blog/de/how-ccpa-enforcement-impacts-apps.md
  • src/content/blog/de/how-chinas-cybersecurity-law-impacts-app-developers.md
  • src/content/blog/de/how-chinas-data-laws-impact-app-store-submissions.md
  • src/content/blog/de/how-cicd-tools-trigger-ota-updates.md
  • src/content/blog/de/how-delta-updates-reduce-payload-size.md
  • src/content/blog/de/how-end-to-end-encryption-secures-updates.md
  • src/content/blog/de/how-live-updates-for-capacitor-work.md
  • src/content/blog/de/how-mobile-apps-stay-compliant-with-us-privacy-laws.md
  • src/content/blog/de/how-native-bridge-works-in-capacitor-android-apps.md
  • src/content/blog/de/how-ota-encryption-meets-app-store-compliance.md
  • src/content/blog/de/how-ota-updates-affect-app-store-security.md
  • src/content/blog/de/how-rbac-secures-ota-updates-in-capacitor-apps.md
  • src/content/blog/de/how-to-add-dependencies-in-capacitor-plugins.md
  • src/content/blog/de/how-to-add-geolocation-targeting-to-ota-updates.md
  • src/content/blog/de/how-to-add-third-party-plugins-in-capacitor-apps.md
  • src/content/blog/de/how-to-build-capacitor-app-in-xcode-cloud.md
  • src/content/blog/de/how-to-bypass-app-store-review.md
  • src/content/blog/de/how-to-customize-build-scripts-with-capacitor-cli.md
  • src/content/blog/de/how-to-handle-user-data-in-capacitor-apps.md
  • src/content/blog/de/how-to-handle-user-data-requests-under-ccpa.md
  • src/content/blog/de/how-to-monitor-capacitor-app-updates.md
  • src/content/blog/de/how-to-profile-cross-platform-apps-with-capacitor.md
  • src/content/blog/de/how-to-release-major-version-in-capgo.md
  • src/content/blog/de/how-to-resolve-android-build-errors-in-capacitor.md
  • src/content/blog/de/how-to-schedule-ota-updates-for-capacitor-apps.md
  • src/content/blog/de/how-to-secure-ota-updates-with-key-management.md
  • src/content/blog/de/how-to-segment-users-by-plan-and-channels.md
  • src/content/blog/de/how-to-send-specific-version-to-users.md
  • src/content/blog/de/how-to-track-ota-update-success-in-capacitor-apps.md
  • src/content/blog/de/how-to-use-aar-files-in-capacitor-plugins.md
  • src/content/blog/de/how-to-use-capacitor-cli-for-ota-updates.md
  • src/content/blog/de/how-to-use-capgo-documentation-for-ota-updates.md
  • src/content/blog/de/how-to-use-semantic-versioning-with-capgo-ota-updates.md
  • src/content/blog/de/how-version-work-in-capgo.md
  • src/content/blog/de/how-your-usage-is-counted.md
  • src/content/blog/de/icp-filing-for-mobile-apps-in-china-step-by-step-guide.md
  • src/content/blog/de/in-app-purchases-capacitor.md
  • src/content/blog/de/installing-capacitor-cli-step-by-step-guide.md
  • src/content/blog/de/integrate-universal-links-capacitor-nextjs.md
  • src/content/blog/de/integrity-checks-for-capacitor-updates.md
  • src/content/blog/de/introducing-end-to-end-security-to-capacitor-updater-with-code-signing.md
  • src/content/blog/de/ionic-capacitor-push-notifications-firebase.md
  • src/content/blog/de/key-management-under-chinas-encryption-rules.md
  • src/content/blog/de/live-updates-faq-answers-for-app-developers.md
  • src/content/blog/de/manage-dev-and-prod-build-with-github-actions.md
  • src/content/blog/de/managing-dependencies-in-capacitor-projects.md
  • src/content/blog/de/managing-secrets-in-cicd-pipelines.md
  • src/content/blog/de/merge-policies-for-teams-using-capacitor-apps.md
  • src/content/blog/de/migrating-cordova-to-capacitor.md
  • src/content/blog/de/mobile-app-update-strategies-a-developers-checklist.md
  • src/content/blog/de/monitor-ota-updates-in-capacitor-apps.md
  • src/content/blog/de/moving-from-microsoft-app-center-to-capgo.md
  • src/content/blog/de/npm-scripts-for-capacitor-ota-updates-explained.md
  • src/content/blog/de/open-source-licence.md
  • src/content/blog/de/open-source-vs-proprietary-app-update-solutions.md
  • src/content/blog/de/open-source.md
  • src/content/blog/de/optimise-your-images-for-updates.md
  • src/content/blog/de/ota-security-checklist-for-capacitor-apps.md
  • src/content/blog/de/ota-updates-in-beta-staying-policy-compliant.md
  • src/content/blog/de/ota-updates-in-cicd-security-and-compliance-tips.md
  • src/content/blog/de/payment-data-security-for-app-store-approval.md
  • src/content/blog/de/pci-dss-compliance-for-mobile-apps-key-requirements.md
  • src/content/blog/de/phased-rollouts-for-capacitor-live-updates.md
  • src/content/blog/de/pipeda-compliance-for-mobile-apps-in-canada.md
  • src/content/blog/de/pipeline-security-for-capacitor-apps-key-insights.md
  • src/content/blog/de/privacy-manifest-for-capacitor-apps-guide.md
  • src/content/blog/de/quasar-mobile-app-capacitor.md
  • src/content/blog/de/real-time-update-metrics-for-capacitor-apps.md
  • src/content/blog/de/real-time-updates-with-user-segmentation.md
  • src/content/blog/de/refresh-token-rotation-in-cicd-workflows.md
  • src/content/blog/de/rollback-mechanisms-in-capacitor-plugins.md
  • src/content/blog/de/rollback-strategies-for-capacitor-live-updates.md
  • src/content/blog/de/rollback-strategies-for-cicd-workflows.md
  • src/content/blog/de/secure-storage-for-offline-tokens-in-capacitor.md
  • src/content/blog/de/self-hosted-capgo.md
  • src/content/blog/de/self-hosted-live-updates.md
  • src/content/blog/de/set-up-performance-monitoring-in-capacitor.md
  • src/content/blog/de/setting-up-capacitor-local-environment.md
  • src/content/blog/de/setting-up-cicd-for-capacitor-apps.md
  • src/content/blog/de/setup-ci-and-cd-in-gitlab.md
  • src/content/blog/de/setup-stripe-payment-in-us-capacitor.md
  • src/content/blog/de/ssl-pinning-for-capacitor-apps.md
  • src/content/blog/de/staged-rollouts-vs-full-releases-comparison.md
  • src/content/blog/de/staging-ota-updates-best-practices.md
  • src/content/blog/de/state-privacy-laws-for-mobile-apps-comparison.md
  • src/content/blog/de/testing-capacitor-ota-updates-with-mock-scenarios.md
  • src/content/blog/de/testing-capacitor-ota-updates.md
  • src/content/blog/de/token-revocation-in-capacitor-apps-guide.md
  • src/content/blog/de/top-6-tools-for-managing-app-updates-in-2025.md
  • src/content/blog/de/top-api-security-standards-for-app-store-compliance.md
  • src/content/blog/de/top-tools-for-debugging-ota-updates-in-capacitor.md
  • src/content/blog/de/top-tools-for-debugging-platform-specific-code-in-capacitor.md
  • src/content/blog/de/turn-off-android-talkback.md
  • src/content/blog/de/ultimate-guide-to-app-store-compliant-ota-updates.md
  • src/content/blog/de/ultimate-guide-to-capacitor-ota-updates.md
  • src/content/blog/de/ultimate-guide-to-debugging-capacitor-apps.md
  • src/content/blog/de/ultimate-guide-to-ota-update-security-for-capacitor-apps.md
  • src/content/blog/de/understanding-apples-privacy-manifest.md
  • src/content/blog/de/update-your-capacitor-apps-seamlessly-using-capacitor-updater.md
  • src/content/blog/de/updating-from-capacitor-4-to-capacitor-5.md
  • src/content/blog/de/us-privacy-laws-mobile-app-checklist.md
  • src/content/blog/de/usage-frequency-segmentation-for-app-updates.md
  • src/content/blog/de/user-consent-for-ota-updates-best-practices.md
  • src/content/blog/de/version-control-tips-for-mobile-ci-cd.md
  • src/content/blog/de/version-tagging-in-capacitor-apps.md
  • src/content/blog/de/vue-mobile-app-capacitor.md
  • src/content/blog/de/what-is-native-bridge-in-capacitor.md
  • src/content/blog/de/why-consent-management-matters-for-app-compliance.md
  • src/content/blog/en/capacitor-ota-updates-app-store-approval-guide.md
  • src/content/blog/en/capacitor-ota-updates-cloud-hosting-options-compared.md
  • src/content/blog/en/capacitor-ota-updates-security-tips.md
  • src/content/blog/en/capacitor-ota-updates-version-targeting-explained.md
  • src/content/blog/en/capacitor-ota-updates-versioning-best-practices.md
  • src/content/blog/en/capacitor-ota-updates-vs-app-store-restrictions.md
  • src/content/blog/en/capacitor-ota-updates-vs-traditional-testing-methods.md
  • src/content/blog/en/capacitor-ota-updates-vs-traditional-versioning.md
  • src/content/blog/en/error-logging-tools-for-capacitor-ota-updates.md
  • src/content/blog/en/npm-scripts-for-capacitor-ota-updates-explained.md
  • src/content/blog/en/server-setup-for-capacitor-ota-updates.md
  • src/content/blog/en/testing-capacitor-ota-updates-with-mock-scenarios.md
  • src/content/blog/en/testing-capacitor-ota-updates.md
  • src/content/blog/en/top-tools-for-debugging-ota-updates-in-capacitor.md
  • src/content/blog/es/2-way-communication-in-capacitor-apps.md
  • src/content/blog/es/5-common-ota-update-mistakes-to-avoid.md
  • src/content/blog/es/5-security-best-practices-for-mobile-app-live-updates.md
💤 Files with no reviewable changes (94)
  • project.inlang/.gitignore
  • .templates/PLUGIN_ICONS_REFERENCE.md
  • _typos.toml
  • docs/PR_PREVIEW_SETUP.md
  • scripts/blogs/delete_broken_all.tsx
  • scripts/yaml-to-json.js
  • src/content/blog/de/a-brand-new-organization-system.md
  • src/content/blog/de/2-way-communication-in-capacitor-apps.md
  • docs/expo-marketing-reference.md
  • scripts/blogs/fix_locales_all.tsx
  • scripts/check_sitemap_404.js
  • scripts/repair_sitemap.tsx
  • src/content/blog/de/5-security-best-practices-for-mobile-app-live-updates.md
  • src/content/blog/de/5-steps-to-distribute-custom-capacitor-plugins.md
  • src/content/blog/de/app-store-vs-direct-updates-what-developers-need-to-know.md
  • src/content/blog/de/5-common-ota-update-mistakes-to-avoid.md
  • scripts/blogs/sync_seobot.js
  • src/content/blog/de/5-steps-to-deploy-hotfixes-with-capgo.md
  • scripts/clean_not_used.tsx
  • .templates/PLUGIN_DOCUMENTATION_TEMPLATE.md
  • AGENT.md
  • src/content/blog/de/automatic-capacitor-ios-build-github-action.md
  • src/content/blog/de/birth-of-capgo-revolutionizing-capacitor-app-updates.md
  • src/content/blog/de/alternative-to-voltbuilder.md
  • src/content/blog/de/capacitor-live-updates-handling-version-conflicts.md
  • scripts/fix_code_languages_all.tsx
  • src/content/blog/de/automatic-capacitor-android-build-github-action.md
  • src/content/blog/de/capacitor-cli-plugin-commands-overview.md
  • CLAUDE.md
  • scripts/check_image_links.js
  • scripts/commonReplacements.ts
  • scripts/generateTutorials.mjs
  • scripts/patch-astro-rolldown.js
  • scripts/trainOpenAI.mjs
  • src/content/blog/de/alternative-to-expo.md
  • src/content/blog/de/api-rate-limiting-for-app-store-compliance.md
  • src/content/blog/de/alternative-to-appflow.md
  • src/content/blog/de/android-16kb-page-size-capacitor-plugins.md
  • src/content/blog/de/capacitor-ota-updates-best-practices-for-performance.md
  • src/content/blog/de/api-key-security-for-app-store-compliance.md
  • src/content/blog/de/apple-vs-google-privacy-compliance-for-third-party-data.md
  • src/content/blog/de/appflow-cicd-integration-best-practices.md
  • src/content/blog/de/apple-privacy-rules-for-capacitor-apps.md
  • src/content/blog/de/biometric-authentication-in-capacitor-apps.md
  • scripts/setup_new_locale.tsx
  • src/content/blog/de/capacitor-cli-commands-common-issues-and-fixes.md
  • src/content/blog/de/best-practices-for-capacitor-code-sharing.md
  • scripts/generate-plugins-readme.ts
  • src/content/blog/de/capacitor-changelog-management-ultimate-guide.md
  • src/content/blog/de/capacitor-comprehensive-guide.md
  • src/content/blog/de/capacitor-cicd-pipeline-setup-guide.md
  • src/content/blog/de/capacitor-cicd-plugins-vs-appflow-key-differences.md
  • src/content/blog/de/automatic-build-and-release-with-gitlab.md
  • src/content/blog/de/capacitor-cli-commands-for-version-updates.md
  • src/content/blog/de/capacitor-native-bridge-web-to-android-data-transfer.md
  • scripts/cleanup_doc_translate.tsx
  • src/content/blog/de/basic-js-css-config-for-native-app-look.md
  • src/content/blog/de/apple-policy-updates-for-capacitor-apps-2025.md
  • src/content/blog/de/capacitor-cli-project-setup-guide.md
  • src/content/blog/de/capacitor-ota-updates-boosting-low-end-device-performance.md
  • src/content/blog/de/capacitor-ota-updates-cicd-integration-guide.md
  • src/content/blog/de/android-setup-for-capacitor-apps.md
  • src/content/blog/de/capacitor-native-bridge-android-plugin-basics.md
  • scripts/blogs/translate_all.tsx
  • src/content/blog/de/best-practices-for-capacitor-script-automation.md
  • scripts/verify_missing_html_elements.js
  • src/content/blog/de/5-steps-to-implement-oauth2-in-capacitor-apps.md
  • scripts/blogs/remove_mismatching_locales.tsx
  • scripts/generate_plugin_icons.mjs
  • scripts/generate_plugin_translations.tsx
  • src/content/blog/de/5-steps-for-resolving-version-conflicts-in-capacitor-apps.md
  • src/content/blog/de/appflow-shutdown-alternative.md
  • src/content/blog/de/capacitor-ota-updates-cloud-hosting-options-compared.md
  • src/content/blog/de/automatic-build-and-release-with-github-actions.md
  • src/content/blog/de/automatic-capacitor-ios-build-codemagic.md
  • src/content/blog/de/automatic-capacitor-android-build-gitlab.md
  • src/content/blog/de/automatic-capacitor-ios-build-github-action-with-match.md
  • src/content/blog/de/capacitor-apps-and-russias-data-laws-compliance-tips.md
  • src/content/blog/de/capacitor-app-initialization-step-by-step-guide.md
  • src/content/blog/de/capacitor-community-forums-for-plugin-developers.md
  • src/content/blog/de/capacitor-ota-updates-app-store-approval-guide.md
  • scripts/blogs/translate_untranslated.tsx
  • src/content/blog/de/account-deletion-compliance-apple-guidelines.md
  • src/content/blog/de/capacitor-apps-and-data-sharing-policies.md
  • src/content/blog/de/appcenter-migration.md
  • src/content/blog/de/building-a-native-mobile-app-with-nextjs-and-capacitor.md
  • scripts/create-missing-translations.sh
  • project.inlang/project_id
  • src/content/blog/de/capacitor-live-updates-staying-compliant-with-apple.md
  • scripts/generate_docs_translations.tsx
  • src/content/blog/de/angular-mobile-app-capacitor.md
  • scripts/translate.tsx
  • src/content/blog/de/app-store-metadata-what-developers-must-know.md
  • src/content/blog/de/automated-consent-tracking-for-capacitor-apps.md

Comment on lines +29 to +38
{locales.map((j) => (
<button
id={`language_${j}`}
type="button"
class="block w-full cursor-pointer px-4 py-2 text-left text-sm text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus-visible:bg-gray-100 focus-visible:text-gray-900 focus-visible:outline-none dark:text-gray-200 dark:hover:bg-gray-700 dark:hover:text-gray-100 dark:focus-visible:bg-gray-700 dark:focus-visible:text-gray-100"
role="menuitem"
aria-current={Astro.locals.locale === j ? 'true' : undefined}
>
{j.toUpperCase()}
</button>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Keep locale switches as real links, or at least stop rewriting the URL this way.

Because the options are buttons, every switch now depends on Lines 74-76. That rewrite removes the first /${currentLocale}/ anywhere in the pathname and drops search/hash, so a URL like /docs/en/guide/?tab=api#install becomes /docs/guide/. This can misroute docs pages and also removes the no-JS fallback that <a href> gave you.

🔧 Minimum fix if you keep the JS navigation
-        item.addEventListener('click', () => {
-          const tmp = new URL(window.location.href).pathname.replace(`/${currentLocale}/`, '/')
-          if (j === 'en') window.location.href = tmp
-          else window.location.href = `/${j}${tmp}`
-        })
+        item.addEventListener('click', () => {
+          const nextUrl = new URL(window.location.href)
+          const localePrefix = `/${currentLocale}/`
+          const basePath = nextUrl.pathname.startsWith(localePrefix)
+            ? `/${nextUrl.pathname.slice(localePrefix.length)}`
+            : nextUrl.pathname
+          nextUrl.pathname = j === 'en' ? basePath : `/${j}${basePath}`
+          window.location.href = nextUrl.toString()
+        })

Also applies to: 70-77

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/components/doc/LanguageSelect.astro` around lines 29 - 38, The locale
switch currently renders as buttons inside the locales.map in
LanguageSelect.astro and uses a JS pathname rewrite that removes the first
"/{currentLocale}/" and drops search/hash, breaking routes and no-JS fallback;
change the button to a real anchor (<a>) with an href that preserves the full
target URL (replace only the locale path segment, keep the rest of pathname plus
search and hash) so users without JS still work, or if you must keep JS
navigation, update the click handler to compute the new URL by swapping just the
locale path segment in Astro.locals.locale within the current location.pathname
and then append location.search and location.hash before calling
history.pushState or navigate — ensure aria-current logic remains based on
Astro.locals.locale and that ids (language_{j}) and display (j.toUpperCase())
stay the same.

</button>
<div
id="language-dropdown"
class="ring-opacity-5 absolute bottom-full left-0 z-50 mb-2 hidden w-32 rounded-md bg-[#1c1c1f] shadow-lg ring-1 ring-black focus:outline-none"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Expected: Tailwind is v4-era syntax and edited templates should not contain `ring-opacity-*`.
rg -n --glob 'package.json' '"tailwindcss"\s*:\s*"[^"]+"' -C1
rg -n --glob '*.{astro,css,scss,jsx,tsx,html}' '\bring-opacity-\d+\b' -C1

Repository: Cap-go/website

Length of output: 501


Replace the deprecated ring-opacity-5 utility with Tailwind v4 canonical syntax.

Line 324 uses ring-opacity-5, which was removed in Tailwind v4. Replace it with ring-black/5 to maintain the intended 5% opacity effect with the current syntax.

Suggested fix
-                class="ring-opacity-5 absolute bottom-full left-0 z-50 mb-2 hidden w-32 rounded-md bg-[`#1c1c1f`] shadow-lg ring-1 ring-black focus:outline-none"
+                class="absolute bottom-full left-0 z-50 mb-2 hidden w-32 rounded-md bg-[`#1c1c1f`] shadow-lg ring-1 ring-black/5 focus:outline-none"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
class="ring-opacity-5 absolute bottom-full left-0 z-50 mb-2 hidden w-32 rounded-md bg-[#1c1c1f] shadow-lg ring-1 ring-black focus:outline-none"
class="absolute bottom-full left-0 z-50 mb-2 hidden w-32 rounded-md bg-[`#1c1c1f`] shadow-lg ring-1 ring-black/5 focus:outline-none"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/components/Footer.astro` at line 324, Replace the deprecated Tailwind
utility in the Footer.astro component: update the class string on the element
that currently contains "ring-opacity-5 absolute bottom-full left-0 z-50 mb-2
hidden w-32 rounded-md bg-[`#1c1c1f`] shadow-lg ring-1 ring-black
focus:outline-none" by removing "ring-opacity-5" and using the modern opacity
syntax "ring-black/5" so the element (in Footer.astro) keeps the same 5% ring
opacity effect.

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