raviriley / agency-jekyll-theme

Jekyll version of the newest Agency Bootstrap theme, plus new features: Google Analytics, Markdown support, custom pages, and more!
https://raviriley.github.io/agency-jekyll-theme-starter/
MIT License
347 stars 689 forks source link

Introduce backwards compatibility for multiple language support #28

Closed raviriley closed 2 years ago

raviriley commented 3 years ago

Is your feature request related to a problem? Please describe.

The current implementation of locales is not backwards compatible

Describe the solution you'd like

if statements for every usage of locales, so that if the user has no locales in any of their YAML files everything behaves like it would before the implementation

@rbenitezpagan if you get the chance, could you go in and add the if statements? You know the implementation better than I do since you wrote it.

rbenitezpagan commented 3 years ago

@raviriley Yes, I'll work on it. Assign it to me. 👍

The implementation basically just added [site.locale] to the site.data.sitetext.<var> = site.data.sitetext[site.locale].<var> so it was not really a major change.

raviriley commented 3 years ago

Sounds good, thanks @rbenitezpagan!

fmitchell commented 3 years ago

Letting you all know that I think this commit https://github.com/raviriley/agency-jekyll-theme/commit/34e5e8506674657d856e23aca7e1a7392cf4533c broke my site that, I believe, is still dependent on the old structure.

Screenshot: https://share.getcloudapp.com/qGuJPPyb

The menu, middle section, and some other parts don't show up. I'm going to attempt to fix it based on the changes in that PR.

raviriley commented 3 years ago

Thanks @fmitchell! This issue is high priority. @rbenitezpagan I can take this if you'd like!

rbenitezpagan commented 3 years ago

@raviriley This fell of my radar. You are welcome to tackle it.

I think you could add a default with site.data.sitetext.<var> and that should be enough.