Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add BCP47 language picker in frontmatter #2720

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Add BCP47 language picker in frontmatter #2720

wants to merge 2 commits into from

Conversation

fonsp
Copy link
Owner

@fonsp fonsp commented Nov 20, 2023

Using https://github.com/OM-MediaWorks/bcp47-picker, a pretty cool custom component BCP47 picker! I really like like the balance between input validation & canonlization (does not allow "english", only "en", and turns "en-gb" into "en-GB", etc) and inclusivity (if you want to write "dutch, as spoken in Chile, written in Arabic", you can).

image

Fix #2718

Waiting on OM-MediaWorks/bcp47-picker#11 and maybe some other issues that I opened there

Copy link
Contributor

Try this Pull Request!

Open Julia and type:

julia> import Pkg
julia> Pkg.activate(temp=true)
julia> Pkg.add(url="https://github.com/fonsp/Pluto.jl", rev="bcp47-picker")
julia> using Pluto

@@ -1,4 +1,6 @@
@import url("https://cdn.jsdelivr.net/npm/dialog-polyfill@0.5.6/dist/dialog-polyfill.css");
@import url("https://cdn.jsdelivr.net/npm/bcp47-picker@1.0.16/dist/bcp47-picker.css");
@import url("https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css");
Copy link
Collaborator

Choose a reason for hiding this comment

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

this one is pretty big 🤔 (165kb)

Copy link
Owner Author

@fonsp fonsp Jan 15, 2024

Choose a reason for hiding this comment

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

yeah i also don't want it. i wish bcp47 had a bundle that included all the styles that it needs, scoped to the element but i think we need to do that by hand. You can see I started working on this in this file

Copy link
Owner Author

Choose a reason for hiding this comment

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

this is one place where the PR got stuck

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.

Support for language in frontmatter
2 participants