Skip to content

Specify locales in "multi locale" mode#651

Merged
jaredcwhite merged 5 commits intobridgetownrb:mainfrom
rickychilcott:feature/specified-multi-locales
Nov 23, 2022
Merged

Specify locales in "multi locale" mode#651
jaredcwhite merged 5 commits intobridgetownrb:mainfrom
rickychilcott:feature/specified-multi-locales

Conversation

@rickychilcott
Copy link
Copy Markdown
Contributor

@rickychilcott rickychilcott commented Nov 16, 2022

This is a 🙋 feature or enhancement with a 🔦 documentation change.

Summary

Extending the ability of the "multi locale" mode to specify a limited set of locales instead of outputting all locales (i.e. site.config.available_locales)

Comment thread bridgetown-core/lib/bridgetown-core/collection.rb
@rickychilcott
Copy link
Copy Markdown
Contributor Author

rickychilcott commented Nov 18, 2022

I tried to get a minimial shim of this into Bridgetown 1.1 and I got stuck because I'm not actually using this via files. Instead we are using the add_resource api from bridgetown-builder... So I'm a bit stuck as to how best to solve my issues without also changing add_resource which doesn't seem right. Any maintainer willing to pair on this one?

@jaredcwhite
Copy link
Copy Markdown
Member

@rickychilcott Hmm, I don't think the "multi" mode really makes sense for the manual API to generate resources. Just call add_resource for each locale right? (So if you had 10 pages, and 3 locales each, you'd be calling add_resource a total of 30 times)

@rickychilcott
Copy link
Copy Markdown
Contributor Author

@rickychilcott Hmm, I don't think the "multi" mode really makes sense for the manual API to generate resources. Just call add_resource for each locale right? (So if you had 10 pages, and 3 locales each, you'd be calling add_resource a total of 30 times)

We're doing some weird stuff -- fun but non-standard. But I totally agree after playing with it some more this evening.

@jaredcwhite
Copy link
Copy Markdown
Member

Thanks again @rickychilcott, this looks great!

@jaredcwhite jaredcwhite merged commit 417a944 into bridgetownrb:main Nov 23, 2022
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.

2 participants