codenameone / CodenameOne

Cross-platform framework for building truly native mobile apps with Java or Kotlin. Write Once Run Anywhere support for iOS, Android, Desktop & Web.
https://www.codenameone.com/
Other
1.71k stars 408 forks source link

Add support for generating localization resource bundles to the CSS compiler #3632

Open shai-almog opened 2 years ago

shai-almog commented 2 years ago

Currently the CSS compiler generates a resource file with a theme only. Ideally it should read Java property files from the directory hierarchy and convert them to a resource bundle in the resulting res file so we can localize applications easily.

This is a relatively isolated task that should be easy to implement since it doesn't require deep knowledge of Codename One and can be implemented in Java SE code.

The starting point is here: https://github.com/codenameone/CodenameOne/blob/master/CodenameOneDesigner/src/com/codename1/designer/css/CN1CSSCLI.java#L604

One would need to add an argument to parse a directory with standard Java resource bundle property files. The code around here should then set the content of the resource bundles into a localization bundle so it can be saved to the resulting resource file.

The final task would be adding this to the maven plugin. I'm guessing @shannah would have insight on that.

cjmartinez217 commented 2 years ago

Hey I am a first time contributor and would like to take a crack at this!

shai-almog commented 2 years ago

@shannah did you start work on this or can @cjmartinez217 take that?

shannah commented 2 years ago

@shai-almog i have not started work on this yet. Have at it @cjmartinez217

AnnaJones314 commented 2 years ago

Hi! I am also a first time contributor interested in working on this, could I also give it a try?

cjmartinez217 commented 2 years ago

@AnnaJones314 I have actually picked up another first time issue so you can go ahead and work on this one if that is okay with the moderators

shai-almog commented 2 years ago

We're good @cjmartinez217 & @AnnaJones314