etxztn / pulpcore

Automatically exported from code.google.com/p/pulpcore
0 stars 0 forks source link

Cant use properties files for bundles! #6

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I am using bundle files for localize the texts on my game but pulpcore
shows warn about my bundle.properties and don't copy it to jar or dist

Is there any way to make it go to jar so i can use them?

Or do i have to do my own Bundle system and use other file extension?

Original issue reported on code.google.com by porfirio...@gmail.com on 18 Mar 2008 at 4:49

GoogleCodeExporter commented 8 years ago
Hmm, i just got able to do my own system using Properties, looks like

String s=Bundle.load("lang/bundle").getString("some_key");
or
Bundle bundle= Bundle.load("lang/bundle");
String s= bundle.getString("some_key");

I use Assets to get the resources from zip file, i use .lan files

so i have

lang
  bundle.lan
  bundle_pt_PT.lan

and it automatic loads the bundle_pt_PT.lan for me ( my language is Portuguese 
of
Portugal )

still some stuff to be done like caching bundles, and be able to load bundles of
other language other than system language

When i get it into a staple point i share with others and maybe it can be 
introduced
into Pulp Core

I don't know why, but i love when games and applications are in my language :)

Oh and, you don't only save text to draw, you can either put paths to sprites, 
so
different sprites or sounds for different languages etc...

Original comment by porfirio...@gmail.com on 18 Mar 2008 at 7:14

GoogleCodeExporter commented 8 years ago
Fixed in SVN - orphan property files are now included in zips/jars

Original comment by brack...@gmail.com on 18 Apr 2008 at 6:00

GoogleCodeExporter commented 8 years ago
Even greater :)

Original comment by porfirio...@gmail.com on 18 Apr 2008 at 8:09

GoogleCodeExporter commented 8 years ago
Also there is a work around for now while you wait for the next version of 
Pulpcore
to be released.

Create a bat file or similar that will run after your build and update the jar 
with
the  missing resource file. For example say I was making asteroids and my
Text.properties was left out my bat file would look a bit like this:

jar uf Asteroids.jar Text.properties
pause

Hope that helps for now.

Original comment by Alexande...@gmail.com on 27 Apr 2008 at 8:50