Comments (13)
I know, this is a weird one. I haven't been able to get it right, even though I think the code is how it should be. See also this pull-request, where we tried to fix it (unsuccessfully): https://github.com/bobdenotter/bolt/pull/22
from bolt.
Was looking into this one during lunch. Found these resources:
- http://stackoverflow.com/questions/13108184/silex-translation-stops-working-when-validation-is-registered
- https://gist.github.com/1845379
Also tried
$app['translator']->addLoader('xlf', new \Symfony\Component\Translation\Loader\XliffFileLoader()); $app['translator']->addResource('xlf', __DIR__ . '/../../../../vendor/symfony/validator/Symfony/Component/Validator/Resources/translations/validators.' . $app['locale'] . '.xlf', $app['locale'], 'validators');
Also unsuccessful. However, it looks like the validation translations aren't loaded or so..
from bolt.
This is an odd issue. I think it's a bug, but we can't be sure. If i can find some time, i'll try to set up a basic test case, so we can file a bug on the silex repo. (Unless you have other ideas, that is)
from bolt.
I'll give it another try, unless you already have your test case..?
from bolt.
No, I haven't spent any time on this yet.
from bolt.
I use the following fragment in my bootstrap of another Silex application:
$app->register(new Silex\Provider\FormServiceProvider());
$app->register(new Silex\Provider\ValidatorServiceProvider());
$app->register(new Silex\Provider\TranslationServiceProvider(), array(
'locale' => 'nl',
'translator.messages' => array()
));
$app['translator']->addLoader('xlf', new Symfony\Component\Translation\Loader\XliffFileLoader());
$app['translator']->addResource('xlf', __DIR__ . '/../vendor/symfony/validator/Symfony/Component/Validator/Resources/translations/validators.nl.xlf', 'nl', 'validators');
It translates the validation messages in Dutch in that application.
When applying the same to Bolt, the translations are still in English.
All messages stay in English, no matter if I define $app['locale'] = 'nl' as well as the above fragment in the bootstrap as well as putting my browser to use the Dutch locale.
from bolt.
So, you're saying you don't know either why it's not working as it should? ;-)
I guess i'll just have to strip it down to a bare bones example, so we can either pinpoint where we did it wrong, or it might be a bug in silex.
from bolt.
Jup and the only thing that could be done is indeed strip it down and check by trial-and-error what is causing this to happen. I got some time to spend again, so I can try and start stripping it down (unless you have already started that is..?)
from bolt.
No, i haven't looked into it yet. I've been working on fleshing out
Taxonomies and Relationships, mostly.
On Thu, Jan 3, 2013 at 3:58 PM, Patrick van Kouteren <
[email protected]> wrote:
Jup and the only thing that could be done is indeed strip it down and
check by trial-and-error what is causing this to happen. I got some time to
spend again, so I can try and start stripping it down (unless you have
already started that is..?)—
Reply to this email directly or view it on GitHubhttps://github.com/bobdenotter/bolt/issues/36#issuecomment-11846227.
Bob den Otter - [email protected] - 070-3457628 - www.twokings.nl
from bolt.
Okay, I have to check with the code where it works when I get home, but I got a bare setup which works. Unfortunately not in the Bolt-way just yet.
from bolt.
I got this one covered. Will look at issue #79 after I fixed this one. Looks kind of related.
from bolt.
Got this one fixed. However, there are multiple ways to do this each with their own elegance, so I'd like some input on the pull request :)
from bolt.
Closed by the merge
from bolt.
Related Issues (20)
- error when accessing boltcms url HOT 8
- Export 0000-00-00 00:00:00 dates as Unix time
- SetContent is not case-insensitive in all databases
- template field lists underscore files in subfolders HOT 2
- Bolt CMS 3.7.4 incompatibility with PHP 7.4 - Trying to access array offset on value of type bool
- Trying to get in touch regarding a security issue
- BOLT is crashing when optimizing python HOT 2
- Uploaded PDF Files not opening in browser HOT 1
- Database export Nut command does not export relations between records HOT 1
- Keep the current locale visible in backend viewport at all times HOT 1
- Problems Run bolt.so on M1 Mac HOT 1
- Cannot Install Bolot 5 HOT 1
- Language support for 403,503,404 HOT 3
- Old AVX test fails due to GPF/sigsegv HOT 1
- Plans for Bolt 6 / Symfony 6 / Stimulus / API Platform 3 HOT 3
- DELETE method not working for Contents API
- app/nut database:export outputs unexpected results for multi-contenttype select fields HOT 1
- Dependency Resolution Performs Extremely Slowly HOT 1
- bolt fails to deploy on hosts with debian bookworm HOT 2
- SSL certificate is expired on main website
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bolt.