Thanks Alex,
I tried to use SimpleLocalizedValuesImpl with Jewel Validator but something
is not still not working. You can see the commit in branch
"validator-localized-bundles", commit
(5b4f2bb7f7cf2ade51c06b03be5e8367527b47e4).
I get the resourceManager object filled, and see in traces a
"org.apache.royale.core.SimpleLocalizedValuesImpl"
and in bundles I see {es_ESValidator: {...}}, what is right since I'm in
Spain, although is a mystery for me how know that is es_ES since I don't
see code for that
then I do. resourceManager.localeChain = "es_ES"; that should put the
es_ES, but I do it for testing since that code can't go in the library.
then there's the problem:
var rfe:String = resourceManager.getValue("validator", "requiredFieldError"
);
shows me that "data" var is null
And the trace of error for the try catch is
Cannot read property 'split' of null
(normal since data is null)
So I'm doing something wrong?
Seems the embed worked since compilation passed,
maybe is something with the .properties files?
Hope you could take a look and if you know the problem you can commit in
the branch or let me know so I can fix it.
Thanks
El lun., 25 feb. 2019 a las 18:47, Alex Harui (<[email protected]>)
escribió:
> Manualtests/LocaleTest
>
> On 2/25/19, 7:44 AM, "Carlos Rovira" <[email protected]> wrote:
>
> Hi,
>
> I want to make Jewel Validator get main error messages (i.e;
> requiredFieldError) from some external place. I saw that we already
> have :
>
> SimpleLocalizedValuesImpl
>
> But don't see any example using it. So I want to ask how to use it.
>
> 1.- Is this a bead that can be used at Application level?
> 2.- Where we store the values? in a .properties file in resources
> folder?
> 3.- what about file naming strategy is "EN_ussomeName.properties" and
> ""ES_essomeName.properties" , and so on...
> 2.- Then how is the basic use? If I need to get a value from
> SimpleLocalizedValuesImpl from the Validator bead?
>
> Thanks in advance for any clue on this
>
> Carlos
>
> --
> Carlos Rovira
>
> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C89a7eea435a145f0cf4708d69b381b3a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636867062645510581&sdata=%2BTEs%2FhLwqoLyNU4%2BmU5vB7jHhszIfwd9mtm0nrA2gBE%3D&reserved=0
>
>
>
--
Carlos Rovira
http://about.me/carlosrovira