Add Paraglide-based i18n with French locale support#150
Draft
Conversation
✅ Deploy Preview for cubeindex ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
…lement-i18n-for-french-support-8e8nep
…or-french-support-8e8nep Localize component UI strings with Paraglide
- Removed locale definitions from global types in app.d.ts. - Added DetailedProfiles interface to dbTableTypes.ts for better type safety. - Simplified ExplorePopover.svelte by removing redundant titles and descriptions. - Cleaned up bottomNav.svelte by removing unnecessary aria-labels and imports. - Streamlined footer.svelte by removing unused elements and improving structure. - Updated navbar.svelte to simplify locale handling and improve readability. - Removed unnecessary elements from inConstruction.svelte and confirmSignOut.svelte. - Updated userCard.svelte to use a more concise method for deriving cube count title. - Deleted unused i18n.ts file to reduce clutter. - Adjusted user profile loading in +page.ts to select all columns instead of specific ones. - Cleaned up report page components by removing redundant text and improving clarity.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Accept-Languageheader so the site can serve the correct language on first request.Description
project.inlang/settings.jsonandmessages/en.json/messages/fr.json, and register the@inlang/plugin-message-formatplugin.src/lib/i18n.tswith locale normalization,resolveLocale, constants for cookie handling, andsetAppLocalethat calls Paraglide'ssetLocaleand persists the cookie.i18nhook and callingsetLocaleinsrc/hooks.server.ts, exposelocalevialocals, and includelocalein layout data types (src/app.d.ts) and+layout.server.ts.src/lib/paraglide, using the generatedmAPI insrc/lib/components/layout/navbar.sveltefor labels, and add a language selector; addi18n:compileand prebuild/predev scripts topackage.jsonto generate message code at build/dev time.Testing
paraglide-js compile --project ./project.inlang --outdir ./src/lib/paraglide --emit-ts-declarations, which completed successfully and producedsrc/lib/paraglide.npm run dev) ran the predev compile and served the app successfully (dev server reachable), and a screenshot of the navbar with the language selector was produced.npm run buildwas executed but failed due to a missing environment variable (PUBLIC_TURNSTILE_SITE_KEY) exported from$env/static/public, unrelated to the i18n changes.npx @inlang/paraglide-js initattempt failed due to network/plugin fetch errors, but compilation using the localproject.inlangsucceeds.Codex Task