Skip to content

Commit a804916

Browse files
committed
feat: localize text in various components and pages
- Updated Footer.astro to use localized messages for button labels and copyright notice. - Modified FrameworkSelector.astro to utilize localized keys for framework names. - Enhanced Header.astro with localized aria-labels and link texts. - Updated CopyPage.astro to incorporate localized messages for button labels and subtitles. - Adjusted LanguageSelect.astro to display the language label using localization. - Improved 404.astro to show localized title and description for the error page. - Updated sponsor.astro to use localized titles and descriptions for sponsors. - Added localization to various text elements across components for better internationalization support.
1 parent 85b8193 commit a804916

File tree

8 files changed

+293
-73
lines changed

8 files changed

+293
-73
lines changed

messages/en.json

Lines changed: 186 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3655,5 +3655,190 @@
36553655
"storage_what_is_it_used_for": "What is storage used for and how does it work?",
36563656
"storage_detailed_explanation": "Storage is used to store your app update bundles, which contain web assets (HTML, CSS, JavaScript), version metadata, and checksums. It keeps all uploaded versions to support instant rollbacks, multiple release channels (production, beta, staging), and deployment history. Storage usage grows with each OTA update since every update is stored as a full bundle. Typical usage is 2 GB for a few apps with limited history, and 10–20 GB for multiple apps with frequent releases.",
36573657
"can_i_use_soc2_with_other_plans": "Can I use SOC 2 compliance with Solo, Maker, or Team plans?",
3658-
"soc2_enterprise_only": "For now, it's only available on the Enterprise plan."
3658+
"soc2_enterprise_only": "For now, it's only available on the Enterprise plan.",
3659+
3660+
"page_not_found": "Page Not Found",
3661+
"error_404": "Error 404",
3662+
"page_not_found_title": "Page Not Found - Error 404",
3663+
"page_not_found_description": "Please check the URL in the address bar and try again.",
3664+
"go_back_home": "Go back home",
3665+
"contact_support": "Contact support",
3666+
3667+
"sponsor_title": "Capgo Sponsors",
3668+
"sponsor_description": "Capgo is an open-source framework free to use thanks to our generous sponsors. If you use Capgo in your daily work and can't use our cloud service, please consider backing us.",
3669+
"become_a_sponsor": "Become a sponsor",
3670+
"tier_platinum": "Platinum",
3671+
"tier_gold": "Gold",
3672+
"tier_silver": "Silver",
3673+
"tier_baker": "Baker",
3674+
3675+
"copy_page": "Copy page",
3676+
"copy_page_options": "Copy page options",
3677+
"copy_page_as_markdown": "Copy page as Markdown for LLMs",
3678+
"view_as_markdown": "View as Markdown",
3679+
"view_page_as_plain_text": "View this page as plain text",
3680+
"open_in_chatgpt": "Open in ChatGPT",
3681+
"open_in_claude": "Open in Claude",
3682+
"open_in_perplexity": "Open in Perplexity",
3683+
"ask_questions_about_page": "Ask questions about this page",
3684+
"copied": "Copied!",
3685+
"failed_to_copy": "Failed to copy",
3686+
3687+
"capgo_home": "Capgo home",
3688+
"expand_menu": "Expand menu",
3689+
"github_stars": "GitHub Stars",
3690+
3691+
"install_plugin": "Install Plugin",
3692+
"compare": "Compare",
3693+
"all_systems_normal_uptime": "All systems normal: 99% uptime",
3694+
"copyright_notice": "CAPGO, Digital shift OU. ALL RIGHTS RESERVED.",
3695+
"soc2_compliant": "SOC 2 Compliant",
3696+
"soc1_compliant": "SOC 1 Compliant",
3697+
"gdpr_compliant": "GDPR Compliant",
3698+
3699+
"semver_tester_title": "Capgo Semver Tester",
3700+
"semver_tester_description": "Check semantic versioning compatibility for your Capacitor app updates",
3701+
"local_version": "Local Version",
3702+
"remote_version": "Remote Version",
3703+
"advanced_settings": "Advanced Settings",
3704+
"app_context": "App Context",
3705+
"platform": "Platform",
3706+
"development_build": "Development Build",
3707+
"running_on_emulator": "Running on Emulator",
3708+
"channel_settings": "Channel Settings",
3709+
"allow_updates_for_ios": "Allow updates for iOS devices",
3710+
"allow_updates_for_android": "Allow updates for Android devices",
3711+
"allow_development_build": "Allow development build",
3712+
"allow_updates_for_dev_builds": "Allow updates for development builds",
3713+
"allow_emulators": "Allow Emulators",
3714+
"allow_updates_for_emulators": "Allow updates for emulator devices",
3715+
"disable_auto_downgrade": "Disable auto downgrade under native",
3716+
"prevents_downgrade_native": "Prevents downgrading when running native code",
3717+
"disable_auto_update": "Disable auto update",
3718+
"controls_version_updates": "Controls which version updates are allowed",
3719+
"metadata_value": "Metadata Value",
3720+
"minimum_version_requirement": "Minimum version requirement for local app",
3721+
"enter_versions_to_compare": "Enter two semantic versions to see comparison",
3722+
"strategy_major": "Major",
3723+
"strategy_minor": "Minor",
3724+
"strategy_patch": "Patch",
3725+
"strategy_metadata": "Metadata",
3726+
"strategy_none": "None",
3727+
"why_capgo_uses_semver": "Why Capgo uses Semantic Versioning",
3728+
"semver_description": "Semantic Versioning is the most widely adopted versioning standard in software development. By using semver, Capgo ensures compatibility and safety when delivering live updates to your Capacitor apps.",
3729+
"semver_understand_changes": "The semver standard allows Capgo to understand exactly what changes are included in each update:",
3730+
"patch_updates_desc": "Patch updates (1.0.0 → 1.0.1): Bug fixes, safe to apply automatically",
3731+
"minor_updates_desc": "Minor updates (1.0.0 → 1.1.0): New features, backward compatible",
3732+
"major_updates_desc": "Major updates (1.0.0 → 2.0.0): Breaking changes, require native app store release",
3733+
"semver_protection": "This prevents Capgo from ever sending an incompatible update to your native code, protecting your users from crashes and ensuring your app remains stable.",
3734+
"flexible_semver_strategies": "Flexible Semver Strategies: Beyond Basic Versioning",
3735+
"flexible_semver_intro": "While semver is strict about its core format, you can extend it for your team's needs using pre-release identifiers and build metadata:",
3736+
"build_metadata_title": "Build Metadata (+) - The \"Cosmetic\" Layer",
3737+
"timestamp_for_tracking": "Timestamp for deployment tracking",
3738+
"ui_update_description": "UI update description for design team",
3739+
"ci_cd_build_commit": "CI/CD build number and git commit",
3740+
"build_metadata_note": "Important: Build metadata is ignored in version precedence - 1.2.0+anything equals 1.2.0 for Capgo's update logic.",
3741+
"prerelease_title": "Pre-release Identifiers (-) - Development Channels",
3742+
"beta_testing_channel": "Beta testing channel",
3743+
"urgent_fix_branch": "Urgent fix branch",
3744+
"feature_branch_testing": "Feature branch testing",
3745+
"prerelease_note": "Note: Pre-release versions have lower precedence - 1.3.0-beta.1 < 1.3.0",
3746+
"hybrid_approach_title": "Hybrid Approach - Best of Both Worlds",
3747+
"release_candidate_metadata": "Release candidate with UI metadata and timestamp",
3748+
"real_world_use_cases": "Real-World Semver Use Cases & Team Strategies",
3749+
"startup_fast_dev": "Startup / Fast Development",
3750+
"first_mvp_release": "First MVP release",
3751+
"new_feature_testing": "New feature testing",
3752+
"ui_redesign_metadata": "UI redesign metadata",
3753+
"production_ready": "Production ready",
3754+
"startup_tip": "Use 0.x.x for pre-1.0 development, metadata for design tracking",
3755+
"enterprise_regulated": "Enterprise / Regulated",
3756+
"quarterly_release": "Quarterly release",
3757+
"security_patch_tracking": "Security patch with tracking",
3758+
"pre_audit_release": "Pre-audit release candidate",
3759+
"enterprise_tip": "Strict semver with compliance metadata",
3760+
"gaming_creative": "Gaming / Creative Apps",
3761+
"seasonal_content": "Seasonal content",
3762+
"event_driven_features": "Event-driven features",
3763+
"asset_updates": "Asset updates",
3764+
"gaming_tip": "Creative metadata for content tracking",
3765+
"hotfix_strategy": "Hotfix Strategy",
3766+
"current_production": "Current production",
3767+
"critical_bug_fix": "Critical bug fix",
3768+
"released_with_timestamp": "Released with timestamp",
3769+
"hotfix_tip": "Pre-release for testing, metadata for deployment tracking",
3770+
"multi_platform_strategy": "Multi-Platform Strategy",
3771+
"ios_optimizations": "iOS-specific optimizations",
3772+
"android_design_updates": "Android design updates",
3773+
"pwa_capabilities": "PWA capabilities",
3774+
"multi_platform_tip": "Same version, platform-specific metadata",
3775+
"ci_cd_integration_title": "CI/CD Integration",
3776+
"automated_prerelease": "Automated pre-release",
3777+
"staging_deployment": "Staging deployment",
3778+
"production_deployment": "Production deployment",
3779+
"ci_cd_tip": "Automated versioning with deployment metadata",
3780+
"pro_tips": "Pro Tips:",
3781+
"pro_tip_1": "Use build metadata (+) for tracking, timestamps, or cosmetic info that doesn't affect compatibility",
3782+
"pro_tip_2": "Use pre-release identifiers (-) for development channels that need different update precedence",
3783+
"pro_tip_3": "Combine both for maximum flexibility: 1.2.0-beta.1+ui.dark.theme.20240315",
3784+
"pro_tip_4": "Remember: Capgo respects semver precedence rules, so plan your channel strategy accordingly",
3785+
"important_strict_semver": "Important: Capgo uses strict semantic versioning",
3786+
"strict_semver_note": "Unlike npm's semver implementation, Capgo follows the official SemVer specification strictly. npm's node-semver has known deviations from the spec, which can cause unexpected behavior.",
3787+
"npm_deviation_example": "For example, npm treats versions like 1.0.0-alpha.1 differently than the specification requires.",
3788+
"see_reported_issue": "See our reported issue",
3789+
"and_attempted_fix": "and attempted fix",
3790+
"that_was_never_merged": "that was never merged.",
3791+
"valid_semver": "Valid Semantic Versions",
3792+
"invalid_semver": "Invalid Semantic Versions",
3793+
"standard_release": "Standard release",
3794+
"pre_release": "Pre-release",
3795+
"pre_release_with_number": "Pre-release with number",
3796+
"build_metadata": "Build metadata",
3797+
"complete_version": "Complete version",
3798+
"leading_v_not_allowed": "Leading 'v' not allowed",
3799+
"missing_patch_version": "Missing patch version",
3800+
"too_many_parts": "Too many version parts",
3801+
"empty_prerelease": "Empty pre-release",
3802+
"empty_build_metadata": "Empty build metadata",
3803+
"capgo_update_behavior": "Capgo Update Behavior",
3804+
"patch_auto_applied": "Patch updates are automatically applied (1.0.0 → 1.0.1)",
3805+
"minor_requires_config": "Minor updates require channel configuration (1.0.0 → 1.1.0)",
3806+
"major_requires_store": "Major updates require native app store release (1.0.0 → 2.0.0)",
3807+
"prerelease_requires_config": "Pre-release versions require explicit configuration",
3808+
"semver_footer_note": "This tool follows the official Semantic Versioning specification unlike npm's implementation.",
3809+
3810+
"questionnaire_framework_question": "What language/framework do you primarily use in your app?",
3811+
"questionnaire_script_location": "Where do you put your script in the HTML document?",
3812+
"questionnaire_in_head": "In the <head> section",
3813+
"questionnaire_end_of_body": "At the end of <body> (before closing tag)",
3814+
"questionnaire_react_framework": "What React framework/setup are you using?",
3815+
"questionnaire_angular_framework": "What Angular framework/setup are you using?",
3816+
"questionnaire_vue_framework": "What Vue framework/setup are you using?",
3817+
"questionnaire_svelte_framework": "What Svelte framework/setup are you using?",
3818+
"questionnaire_qwik_framework": "What Qwik framework/setup are you using?",
3819+
"questionnaire_place_notify": "Place the notifyAppReady() call",
3820+
"questionnaire_script_type": "How does your <script> tag look?",
3821+
"questionnaire_caution": "Caution",
3822+
"questionnaire_must_call_first": "You MUST put CapacitorUpdater.notifyAppReady(); before running any other code",
3823+
"questionnaire_ionic": "Ionic",
3824+
"questionnaire_nextjs": "Next.js",
3825+
"questionnaire_vite_react": "Vite + React SPA",
3826+
"questionnaire_react_router": "React Router",
3827+
"questionnaire_create_react_app": "Legacy Create React App",
3828+
"questionnaire_vite_angular": "Vite + Angular SPA",
3829+
"questionnaire_angular_cli": "Angular CLI (ng)",
3830+
"questionnaire_vite_vue": "Vite + Vue SPA",
3831+
"questionnaire_nuxt": "Nuxt",
3832+
"questionnaire_vite_svelte": "Vite + Svelte SPA",
3833+
"questionnaire_sveltekit": "SvelteKit",
3834+
"questionnaire_vite_qwik": "Vite + Qwik SPA",
3835+
"questionnaire_qwik_city": "Qwik City",
3836+
"framework_js_dom": "JS + DOM API",
3837+
"framework_ts_dom": "TS + DOM API",
3838+
"framework_react": "React",
3839+
"framework_angular": "Angular",
3840+
"framework_vue": "Vue",
3841+
"framework_svelte": "Svelte",
3842+
"framework_qwik": "Qwik",
3843+
"language_label": "Language"
36593844
}

src/components/Footer.astro

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ const navigation: Record<string, NavigationItem[]> = {
158158
<span class="block text-zinc-500">{m.footer_tagline_part2({}, { locale: Astro.locals.locale })}</span>
159159
</h2>
160160
<a href={getRelativeLocaleUrl(Astro.locals.locale, 'plugins')} class="inline-flex justify-center items-center py-3 px-6 text-base font-medium text-white bg-blue-600 rounded-md border border-transparent shadow-sm hover:bg-blue-700 focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 focus:outline-none">
161-
Install Plugin
161+
{m.install_plugin({}, { locale: Astro.locals.locale })}
162162
</a>
163163
</div>
164164

@@ -226,7 +226,7 @@ const navigation: Record<string, NavigationItem[]> = {
226226
</ul>
227227
</div>
228228
<div>
229-
<h3 class="mb-4 text-sm font-semibold tracking-wider text-white uppercase">Compare</h3>
229+
<h3 class="mb-4 text-sm font-semibold tracking-wider text-white uppercase">{m.compare({}, { locale: Astro.locals.locale })}</h3>
230230
<ul role="list" class="space-y-3">
231231
{navigation.compare.map((item) => (
232232
<li>
@@ -261,12 +261,12 @@ const navigation: Record<string, NavigationItem[]> = {
261261
<span class="inline-flex absolute w-full h-full bg-green-400 rounded-full opacity-75 animate-ping"></span>
262262
<span class="inline-flex relative w-2 h-2 bg-green-500 rounded-full"></span>
263263
</span>
264-
All systems normal: 99% uptime
264+
{m.all_systems_normal_uptime({}, { locale: Astro.locals.locale })}
265265
</a>
266266
<div class="flex gap-4">
267-
<img src="/soc2.svg" alt="SOC 2 Compliant" class="w-auto h-12 opacity-80 transition-opacity hover:opacity-100" />
268-
<img src="/soc1.svg" alt="SOC 1 Compliant" class="w-auto h-12 opacity-80 transition-opacity hover:opacity-100" />
269-
<img src="/gdpr.svg" alt="GDPR Compliant" class="w-auto h-12 opacity-80 transition-opacity hover:opacity-100" />
267+
<img src="/soc2.svg" alt={m.soc2_compliant({}, { locale: Astro.locals.locale })} class="w-auto h-12 opacity-80 transition-opacity hover:opacity-100" />
268+
<img src="/soc1.svg" alt={m.soc1_compliant({}, { locale: Astro.locals.locale })} class="w-auto h-12 opacity-80 transition-opacity hover:opacity-100" />
269+
<img src="/gdpr.svg" alt={m.gdpr_compliant({}, { locale: Astro.locals.locale })} class="w-auto h-12 opacity-80 transition-opacity hover:opacity-100" />
270270
</div>
271271
<p class="max-w-md text-xs text-zinc-500">
272272
{m.enterprise_security_audit_desc({}, { locale: Astro.locals.locale })}
@@ -293,7 +293,7 @@ const navigation: Record<string, NavigationItem[]> = {
293293
</div>
294294

295295
<p class="text-xs tracking-wider uppercase text-zinc-500">
296-
&copy; {year} CAPGO, Digital shift OU. ALL RIGHTS RESERVED.
296+
&copy; {year} {m.copyright_notice({}, { locale: Astro.locals.locale })}
297297
</p>
298298
</div>
299299
</div>

src/components/FrameworkSelector.astro

Lines changed: 34 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,50 @@
11
---
22
// FrameworkSelector.astro - Framework selection buttons for conditional steps
3+
import * as m from '@/paraglide/messages'
4+
35
interface FrameworkOption {
46
id: string
5-
name: string
7+
nameKey: string
68
icon: string
79
}
810
911
const frameworks: FrameworkOption[] = [
10-
{ id: 'js', name: 'JS + DOM API', icon: '/icons/js.svg' },
11-
{ id: 'ts', name: 'TS + DOM API', icon: '/icons/ts.svg' },
12-
{ id: 'react', name: 'React', icon: '/icons/react.svg' },
13-
{ id: 'angular', name: 'Angular', icon: '/icons/angular.svg' },
14-
{ id: 'vue', name: 'Vue', icon: '/icons/vue.svg' },
15-
{ id: 'svelte', name: 'Svelte', icon: '/icons/svelte.svg' },
16-
{ id: 'qwik', name: 'Qwik', icon: '/icons/qwik.svg' },
12+
{ id: 'js', nameKey: 'framework_js_dom', icon: '/icons/js.svg' },
13+
{ id: 'ts', nameKey: 'framework_ts_dom', icon: '/icons/ts.svg' },
14+
{ id: 'react', nameKey: 'framework_react', icon: '/icons/react.svg' },
15+
{ id: 'angular', nameKey: 'framework_angular', icon: '/icons/angular.svg' },
16+
{ id: 'vue', nameKey: 'framework_vue', icon: '/icons/vue.svg' },
17+
{ id: 'svelte', nameKey: 'framework_svelte', icon: '/icons/svelte.svg' },
18+
{ id: 'qwik', nameKey: 'framework_qwik', icon: '/icons/qwik.svg' },
1719
]
20+
21+
const getFrameworkName = (key: string) => {
22+
const translations: Record<string, string> = {
23+
framework_js_dom: m.framework_js_dom({}, { locale: Astro.locals.locale }),
24+
framework_ts_dom: m.framework_ts_dom({}, { locale: Astro.locals.locale }),
25+
framework_react: m.framework_react({}, { locale: Astro.locals.locale }),
26+
framework_angular: m.framework_angular({}, { locale: Astro.locals.locale }),
27+
framework_vue: m.framework_vue({}, { locale: Astro.locals.locale }),
28+
framework_svelte: m.framework_svelte({}, { locale: Astro.locals.locale }),
29+
framework_qwik: m.framework_qwik({}, { locale: Astro.locals.locale }),
30+
}
31+
return translations[key] || key
32+
}
1833
---
1934

2035
<div class="framework-selector">
2136
{
22-
frameworks.map((framework) => (
23-
<button class="framework-button" data-framework={framework.id} aria-label={`Select ${framework.name}`}>
24-
<div class="framework-icon">
25-
<img src={framework.icon} alt={framework.name} />
26-
</div>
27-
<div class="framework-name">{framework.name}</div>
28-
</button>
29-
))
37+
frameworks.map((framework) => {
38+
const name = getFrameworkName(framework.nameKey)
39+
return (
40+
<button class="framework-button" data-framework={framework.id} aria-label={`Select ${name}`}>
41+
<div class="framework-icon">
42+
<img src={framework.icon} alt={name} />
43+
</div>
44+
<div class="framework-name">{name}</div>
45+
</button>
46+
)
47+
})
3048
}
3149
</div>
3250

0 commit comments

Comments
 (0)