Hi Alex,

what we will need use just the Flex ResourceManager in a normal royale app?
will need SystemManager? other things?
depending on requirements could be an option but I need to know the
requirements since is about to give Jewel localization capabilities
thanks

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

> As usual, implementations in Royale are PAYG.  This is the cheapest,
> simplest localization implementation I could think of.  Folks are welcome
> to contribute fancier ones.  This implementation probably worked with
> private embeds until we started decorating private variable names.  So the
> limitation for now is that it will require public vars.
>
> The entire Flex ResourceManager subsystem is up and running.  The
> Emulation components are using it.  It is very heavy, but has more
> capabilities.
>
> Volunteers are welcome to modify the compiler to strip comments from
> embedded properties files.
>
> -Alex
>
> On 2/26/19, 4:55 AM, "Carlos Rovira" <[email protected]> wrote:
>
>     One more thing: Can we remove license headers from .property files? if
> not,
>     could be stripped when embedded? this is significant weight that is
> carried
>     to final user for nothing. Is ok to have license headers in source
> files,
>     but should not go to production sites in the runnable code
>
>     El mar., 26 feb. 2019 a las 11:54, Carlos Rovira (<
> [email protected]>)
>     escribió:
>
>     > Hi Alex,
>     >
>     > the problem is that I was setting the embed vars as "private" instead
>     > "public". Once I set up "public" it worked.
>     > Maybe is a bug? or to embed something it needs to be private?
>     >
>     > In the other hand, the actual system needs one var per language, so
> if we
>     > end setting up 15 languages, we will need to add 15 public vars, one
> per
>     > language. This implies to change class code that uses the bundle. I
> suppose
>     > I'll end separating the jewel bundles from Jewel swc. And would be
> better
>     > to be able to add property files to bundle for new languages without
> the
>     > need to change the code in the Validator class in Jewel. Could be
> this part
>     > improved in some way?
>     >
>     > Thanks for your help
>     >
>     > Carlos
>     >
>     >
>     > El mar., 26 feb. 2019 a las 11:41, Carlos Rovira (<
> [email protected]>)
>     > escribió:
>     >
>     >> 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%7C550dc2c48f0a4fd4123408d69be9b59a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636867825441490942&amp;sdata=qwDrmB1jgwOfb82rKG2c99FvYWPDcQOwp7vxozuczvk%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%7C550dc2c48f0a4fd4123408d69be9b59a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636867825441490942&amp;sdata=qwDrmB1jgwOfb82rKG2c99FvYWPDcQOwp7vxozuczvk%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%7C550dc2c48f0a4fd4123408d69be9b59a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636867825441490942&amp;sdata=qwDrmB1jgwOfb82rKG2c99FvYWPDcQOwp7vxozuczvk%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%7C550dc2c48f0a4fd4123408d69be9b59a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636867825441490942&amp;sdata=qwDrmB1jgwOfb82rKG2c99FvYWPDcQOwp7vxozuczvk%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%7C550dc2c48f0a4fd4123408d69be9b59a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636867825441490942&amp;sdata=qwDrmB1jgwOfb82rKG2c99FvYWPDcQOwp7vxozuczvk%3D&amp;reserved=0
>
>
>

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

Reply via email to