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

read all language files from theme stream #3226

Merged
merged 1 commit into from
Feb 16, 2021
Merged

read all language files from theme stream #3226

merged 1 commit into from
Feb 16, 2021

Conversation

stephan-strate
Copy link
Contributor

@stephan-strate stephan-strate commented Feb 15, 2021

Currently when inheriting a theme and creating language files in the child theme, they will override the language files of the base theme. There is no chance to extend from the base theme language files other than copying them. This leads to a lot of manual syncing effort when updating the base theme.

themes
- child-theme
-- languages.yaml

- base-theme
-- languages.yaml <- content never loaded

I changed the language file loading to read language files from all themes in theme://.

This might be interesting for @lazybadger.

@NicoHood
Copy link
Contributor

Do you really want to load all themes? Wouldnt it make more sense to only load the base theme?

@stephan-strate
Copy link
Contributor Author

Do you really want to load all themes? Wouldnt it make more sense to only load the base theme?

I am only loading all themes in inheritance chain (so this will be usually two themes, if using inheritance)! What do you do if you want to create additional language variables in child theme?

@NicoHood
Copy link
Contributor

Alright, that makes sense to me.

Copy link
Member

@mahagr mahagr left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@rhukster rhukster merged commit 66c653b into getgrav:develop Feb 16, 2021
@rhukster
Copy link
Member

Looks good to me too

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.

4 participants