Skip to content

Comments

Add PGN Sharing to the Openings Explorer#2664

Open
r3econ wants to merge 6 commits intolichess-org:mainfrom
r3econ:improve-sharing-of-the-opening-position-
Open

Add PGN Sharing to the Openings Explorer#2664
r3econ wants to merge 6 commits intolichess-org:mainfrom
r3econ:improve-sharing-of-the-opening-position-

Conversation

@r3econ
Copy link
Contributor

@r3econ r3econ commented Feb 21, 2026

Demo

88

icon: const PlatformShareIcon(),
),
SemanticIconButton(
semanticsLabel: context.l10n.mobileSharePositionAsFEN,
Copy link
Contributor

Choose a reason for hiding this comment

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

label is wrong now that the button opens the share menu

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@veloce, thanks for spotting it 🎣 It looks like we do not have anything generic that would fit here 🤔

SCR-20260222-rcyv

For now, I hardcoded it to Share game and added a new translation string 59a5024.

Is this a chicken - egg problem, isn't it? I can't use the translation key via context.l10n.mobileShareGame yet; it has to be generated and pulled by the CI action first.

If my understanding is correct I suggest we merge the PR and I'll update the code to use the translation logic once the key gets generated

Copy link
Collaborator

Choose a reason for hiding this comment

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

@r3econ take a look here: https://github.com/lichess-org/mobile/blob/main/docs/internationalisation.md you can add it to the mobile.xml and then generate the files

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Perfect, @HaonRekcef thanks for the hint! I generated the files ☑️ @veloce, the PR is ready 🚀

@HaonRekcef
Copy link
Collaborator

Mmh actually we maybe could also use share and export like we do in the analysis board so we do not need a new translation

@r3econ
Copy link
Contributor Author

r3econ commented Feb 22, 2026

One extra translation key is just a tip of an iceberg. IMHO, what we need is a broader refactor of game sharing functionality - having one easily reusable component that would allow for sharing:

  • FEN
  • PGN
  • GIF
  • URL
  • .. and allow for extending with further sharing options

Obviously, out of scope of this PR 🤔

@veloce
Copy link
Contributor

veloce commented Feb 23, 2026

Yes as said by HaonRekcef let's not add a new translation if we can avoid it (as it takes people time to translate). So please remove the string in mobile.xml and use the available studyShareAndExport key.

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.

3 participants