-
Notifications
You must be signed in to change notification settings - Fork 144
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
make info boxes for posts translatable #484
Conversation
@andibraeu Would it be better to use the language strings directly in the component partial, instead of loading them up with the model? You can see an example here: rainlab/user-plugin#402 - which is a similar change to the one you are proposing, but for the User plugin. |
thanks for your feedback. Unfortunately I didn't get it to work with default values then.
|
@andibraeu why do you need default values? What is being passed is a backend language string, so use the filter that's meant to handle those ( |
thanks for your help, I'm new to twig and octobercms :) I've made the changes |
any news on that? |
@andibraeu Would you mind testing my changes and let me know if that works for you? Also, feel free to adjust the lang file if necessary - wasn't sure if that's the correct syntax. @LukeTowers let me know if my changes were what you were after. |
@bennothommo that looks good to me but can we have spaces around the Twig filter bar? i.e. |
That change means, that we'll see "in uncategorized" for every post that's not in a catergory? |
Good catch @andibraeu. @bennothommo I think we should remove the uncategorized fallback |
Although not sure how to best handle that |
@LukeTowers I did consider that as well, but I didn't think any of the options for that were graceful if we were attempting to simplify the wording down to one language string, ie.
I felt having it show up as Uncategorized fits the spirit of the plugin, given that Blog posts are categorised, and matches similar functionality to Wordpress. If people didn't like it, they always had the option of overwriting the partial. |
@bennothommo I agree with you in principle, however this is a change to the default partial that people are using on their sites out in the wild. You wouldn't expect random strings to start appearing on your frontend after an update so we can't really make that sort of change here. |
@LukeTowers Fair point - I've added a second language string when no categories are present, so the difference in languages can be done purely through the language files. Also, added spaces around the Twig filters. |
are there any news on that? |
@andibraeu The changes are awaiting confirmation that they work before being merged. Have you had a chance to test them? |
yes, I tested it, and I use it. You can see the results here: https://weimarnetz.de/blog |
Thanks @andibraeu! |
By default there was a line "Posted in on <Month day, Year>" for every language.
This PR enables users to use the translation plugin to translate these strings.