Hi Alex,

El mar., 26 feb. 2019 a las 10:28, Alex Harui (<[email protected]>)
escribió:

> Does LocaleTest work for you?
>

yes it works of. Main difference is that LocaleTest is all setup in an App.
I'm setting up in a library.

>
> I don't have time to try to build your test and investigate.  It seems
> strange that the class is called es_ESValidator but the data is in
> validator.properties.  The code may be concatenating strings to find the
> bundle and the "V" vs "v" might be a problem.
>

I typed incorrectly name is right "es_ESvalidator", so that seems ok


>
> HTH,
> -Alex
>
> On 2/25/19, 2:52 PM, "Carlos Rovira" <[email protected]> wrote:
>
>     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&amp;data=02%7C01%7Caharui%40adobe.com%7C0c87c01aca134aff904808d69b73ea30%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636867319516461515&amp;sdata=xGC9i4L4NQYCkzNOhH93STViMPk4D%2FjcHTKnLHuTilA%3D&amp;reserved=0
>     >
>     >
>     >
>
>     --
>     Carlos Rovira
>
> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&amp;data=02%7C01%7Caharui%40adobe.com%7C0c87c01aca134aff904808d69b73ea30%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636867319516471525&amp;sdata=CD4r8GqiU1T5F1XD%2Bqpc6q8%2FFZo9S2Qw%2FdnQMgNfzrI%3D&amp;reserved=0
>
>
>

-- 
Carlos Rovira
http://about.me/carlosrovira

Reply via email to