Skip to content

Add BCP47 language picker in frontmatter#2720

Draft
fonsp wants to merge 2 commits intomainfrom
bcp47-picker
Draft

Add BCP47 language picker in frontmatter#2720
fonsp wants to merge 2 commits intomainfrom
bcp47-picker

Conversation

@fonsp
Copy link
Member

@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

@github-actions
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
Member

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
Member 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
Member 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