Skip to content

Use browser language for public sharing links instead of owner's locale#3774

Merged
rezk2ll merged 1 commit intomasterfrom
copilot/fix-public-link-language-issue
Apr 9, 2026
Merged

Use browser language for public sharing links instead of owner's locale#3774
rezk2ll merged 1 commit intomasterfrom
copilot/fix-public-link-language-issue

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 31, 2026

  • Use dataset.isLoggedIn (from cozy-stack PR #4719) to distinguish authenticated users from anonymous share visitors
  • Add backward-compatibility: if dataset.isLoggedIn is absent (older stack), fall back to dataset.locale (previous behaviour) instead of the browser locale

demo

drive-language.mp4

Copilot AI linked an issue Mar 31, 2026 that may be closed by this pull request
codescene-delta-analysis[bot]

This comment was marked as outdated.

codescene-delta-analysis[bot]

This comment was marked as outdated.

Copilot AI changed the title [WIP] Fix public link language setting for sharing Use browser language for public sharing links instead of owner's locale Mar 31, 2026
Copilot AI requested a review from Crash-- March 31, 2026 02:49
codescene-delta-analysis[bot]

This comment was marked as outdated.

codescene-delta-analysis[bot]

This comment was marked as outdated.

codescene-delta-analysis[bot]

This comment was marked as outdated.

@Crash-- Crash-- marked this pull request as ready for review April 3, 2026 04:58
@Crash-- Crash-- force-pushed the copilot/fix-public-link-language-issue branch from c776f2d to ab02f80 Compare April 7, 2026 01:25
@Crash--
Copy link
Copy Markdown
Contributor

Crash-- commented Apr 7, 2026

@copilot can you squash the commits please

codescene-delta-analysis[bot]

This comment was marked as outdated.

Copy link
Copy Markdown
Author

Copilot AI commented Apr 7, 2026

@copilot can you squash the commits please

Squashing these commits requires a force-push to rewrite the branch history, which isn't available through the tools I have access to. You can squash them locally with git rebase -i HEAD~4 (or via the GitHub UI "Squash and merge" option when merging the PR).

Copilot AI requested a review from Crash-- April 7, 2026 01:27
@Crash--
Copy link
Copy Markdown
Contributor

Crash-- commented Apr 7, 2026

@copilot fix the linter issue please

Copy link
Copy Markdown
Author

Copilot AI commented Apr 7, 2026

@copilot fix the linter issue please

Fixed in fb5ae78 — the initTranslation call needed to be broken across lines to satisfy prettier's line-length rule.

codescene-delta-analysis[bot]

This comment was marked as outdated.

codescene-delta-analysis[bot]

This comment was marked as outdated.

codescene-delta-analysis[bot]

This comment was marked as outdated.

@rezk2ll rezk2ll force-pushed the copilot/fix-public-link-language-issue branch from 2ab715a to d64532e Compare April 9, 2026 08:09
codescene-delta-analysis[bot]

This comment was marked as outdated.

codescene-delta-analysis[bot]

This comment was marked as outdated.

@bundlemon
Copy link
Copy Markdown

bundlemon bot commented Apr 9, 2026

BundleMon

Files updated (1)
Status Path Size Limits
public/static/js/public.(hash).js
141.81KB (+85B +0.06%) -
Unchanged files (20)
Status Path Size Limits
static/js/(chunkId).(hash).js
1.17MB -
public/static/js/(chunkId).(hash).js
1.1MB -
static/js/cozy.(hash).js
919.45KB -
public/static/js/cozy.(hash).js
782.19KB -
(hash).js
336.11KB -
public/(hash).js
336.11KB -
services/qualificationMigration.js
283.13KB -
services/dacc.js
262.86KB -
static/js/main.(hash).js
168.15KB -
public/static/js/lib-react.(hash).js
43.88KB -
static/js/lib-react.(hash).js
43.88KB -
public/static/css/cozy.(hash).css
31.56KB -
static/css/cozy.(hash).css
31.56KB -
public/static/js/lib-router.(hash).js
21.86KB -
static/js/lib-router.(hash).js
21.86KB -
static/css/main.(hash).css
17.04KB -
public/static/css/public.(hash).css
6.76KB -
manifest.webapp
3.04KB -
index.html
704B -
assets/manifest.json
185B -

Total files change +85B 0%

Groups updated (1)
Status Path Size Limits
**/*.js
7.61MB (+85B 0%) -
Unchanged groups (2)
Status Path Size Limits
**/*.{png,svg,ico}
2.19MB -
**/*.css
120.14KB -

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

codescene-delta-analysis[bot]

This comment was marked as outdated.

@rezk2ll rezk2ll force-pushed the copilot/fix-public-link-language-issue branch from 7824e76 to ee3689f Compare April 9, 2026 08:21
codescene-delta-analysis[bot]

This comment was marked as outdated.

Anonymous visitors on public sharing links were seeing the file owner's
language instead of their own. Use the browser locale for unauthenticated
visitors while keeping the instance locale for authenticated owners and
older cozy-stack versions without the isLoggedIn flag.

Co-authored-by: Quentin Valmori <1107936+crash--@users.noreply.github.com>
Co-authored-by: lethemanh <16944047+lethemanh@users.noreply.github.com>
@rezk2ll rezk2ll force-pushed the copilot/fix-public-link-language-issue branch from ee3689f to 704e105 Compare April 9, 2026 08:23
Copy link
Copy Markdown

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

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

Gates Passed
3 Quality Gates Passed

See analysis details in CodeScene

Quality Gate Profile: The Bare Minimum
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.

@rezk2ll rezk2ll merged commit 396db7f into master Apr 9, 2026
6 checks passed
@rezk2ll rezk2ll deleted the copilot/fix-public-link-language-issue branch April 9, 2026 09:12
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.

Public link and language

5 participants