Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Sep 18, 2025

The login wall displayed when users try to edit products had negative, restrictive language that focused on blocking access rather than encouraging contribution. This change transforms the messaging to be more positive and welcoming while emphasizing the value of contributing to food transparency. Additionally, all login wall messages are now fully internationalized for translation support.

Changes Made

Main Login Wall (Product Edit Pages)

Before:

  • Message: "You must be logged in to view this page"
  • Single "Login" button

After:

  • Message: "In order to edit this product, and contribute to food transparency, you need to be logged in to your Open Food Facts account."
  • Two action buttons: "Login" and "Create my Open Food Facts account"

Folksonomy Component

Before:

  • Message: "You must be logged in to create a new tag"
  • Tooltip: "You must be logged in to create a new tag"

After:

  • Message: "To create new tags and contribute to food transparency, please log in to your Open Food Facts account"
  • Tooltip: "Please log in to create new tags and contribute to food transparency"

Internationalization Support

All login wall messages are now translatable via the i18n system:

Added to en.json:

  • auth.login_to_edit_message: Main login wall message for product editing
  • auth.login_to_create_tags_message: Message for folksonomy tag creation
  • auth.login_to_create_tags_tooltip: Tooltip for tag creation button
  • auth.create_account: "Create my Open Food Facts account" button text
  • auth.login: "Login" button text

Updated Components:

  • src/routes/products/[barcode]/edit/+page.ts: Uses get(_)() for server-side translation
  • src/routes/products/[barcode]/Folksonomy.svelte: Uses $_() for component translation

Impact

The new messaging:

  • Explains the purpose of logging in rather than just blocking access
  • Emphasizes contribution to the Open Food Facts mission
  • Provides clear pathways for both existing users and new account creation
  • Uses encouraging language ("contribute to food transparency") instead of restrictive language ("you must")
  • Enables localization to multiple languages through the i18n system

Before (Negative)

Before - Restrictive login wall

After (Positive + Translatable)

After - Encouraging login wall with contribution messaging and i18n support

Fixes #771.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@vercel
Copy link

vercel bot commented Sep 18, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
explorer Ready Ready Preview Comment Sep 18, 2025 9:55am

Copilot AI changed the title [WIP] Make the login wall wording a little bit more positive Make login wall wording more positive and encouraging Sep 18, 2025
Copilot AI requested a review from VaiTon September 18, 2025 09:44
@VaiTon VaiTon requested a review from teolemon September 18, 2025 09:45
disabled={isLoading || !loggedIn}
title={!loggedIn
? 'You must be logged in to create a new tag'
? 'Please log in to create new tags and contribute to food transparency'
Copy link
Member

Choose a reason for hiding this comment

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

@copilot move this to the en.json file to make this i18n-able

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done! Moved the tooltip message to auth.login_to_create_tags_tooltip in en.json and updated the component to use $_('auth.login_to_create_tags_tooltip').

Commit: acda548

Comment on lines 322 to 325
<p class="mb-4">
To create new tags and contribute to food transparency, please log in to your Open Food
Facts account
</p>
Copy link
Member

Choose a reason for hiding this comment

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

@copilot make this translatable via en.json

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done! Moved the login message to auth.login_to_create_tags_message in en.json and the Login button text to auth.login. Updated the component to use $_('auth.login_to_create_tags_message') and $_('auth.login').

Commit: acda548

error(401, {
message: 'You must be logged in to view this page',
message:
'In order to edit this product, and contribute to food transparency, you need to be logged in to your Open Food Facts account.',
Copy link
Member

Choose a reason for hiding this comment

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

@copilot Move this to en.json

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done! Moved the error message to auth.login_to_edit_message in en.json and updated the page loader to use get(_)('auth.login_to_edit_message'). Also moved the action button labels to auth.login and auth.create_account.

Commit: acda548

Copilot AI changed the title Make login wall wording more positive and encouraging Make login wall wording more positive and add i18n support Sep 18, 2025
Copilot AI requested a review from VaiTon September 18, 2025 09:56
Copilot finished work on behalf of VaiTon September 18, 2025 09:56
@VaiTon
Copy link
Member

VaiTon commented Sep 18, 2025

@teolemon what do you think?

@teolemon
Copy link
Member

still very red, but definitely better @VaiTon
in the future, we should probably add the Key illustration from the app

@VaiTon
Copy link
Member

VaiTon commented Sep 18, 2025

@teolemon we can redirect to another page and show whatever, do we have an image?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

Make the login wall wording a little bit more positive

3 participants