-
Notifications
You must be signed in to change notification settings - Fork 86
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
Add translation support to theme settings #559
Conversation
@GinoPane I tried to test this PR using the following instance: https://88f9e4ea8aac.octodock.com/backend (user/pass = admin) I have the following
And I get the following error when visiting the Cusomize Theme page:
|
@mjauvin it's really strange, now it is working, though code is the same. I tried to debug a little, commented plugin changes, loaded the page, after that un-commented changes and it worked 🤷♂ |
Well, you probably did something that got cached or something. I created a new instance, added the same theme.yaml and I get the same error again: |
@mjauvin Hm, it seems to be happening when It's interesting 🤔 |
How did you get it created the first time? |
@mjauvin when I commented the code, the record was created. I don't fully understand the issue, but for any reason dynamic This exception was caught in ThemeData::forTheme method and therefore the generic error message was shown on the front end. Anyway, I committed a fix which should be working fine. |
* runs params value through htmlspecialchars() to escape html content * add note about escaped content in translated messages * use Html::clean() instead of e() * Revert "add note about escaped content in translated messages" * escape params when translating messages; introduce transRaw method for legacy usage * Fix for #376 (#559) Fix for #376 * Add support for transOrderBy (#516) Add support for transOrderBy * update version file for 1.6.8 release * Disable safe mode checks for ML Static Pages. Fixes rainlab/pages-plugin#434. Refs: rainlab/pages-plugin#174, rainlab/pages-plugin@6b6b061 * Clear RainLab.Pages caches when saving a static page Fixes rainlab/pages-plugin#404 * Register asset bundle (#560) * make sure multi-lingual input form controls have padding-right of 44px * register asset bundle to process less files into css files * reposition language selector above textarea box * fix language selector position when commentAbove is defined * Update version file for 1.6.9 release * Fix error with casts fields default locale value (#556) * only call setLocale() if locale has changed (#561) * remove unused module Co-authored-by: Siarhei Karavai <sergey.karavay@gmail.com> Co-authored-by: Aurélien Roy <aurelien_roy@outlook.com> Co-authored-by: Ben Thomson <git@alfreido.com> Co-authored-by: Luke Towers <github@luketowers.ca> Co-authored-by: Trysystems <av@trysystems.ru>
Fields are not marked as translatable by default.
It is a theme author responsibility to configure required fields via theme's config and mark fields as
translatable
.For example:
And the result is: