jow- / luci-ng

LuCI on Angular
84 stars 26 forks source link

looking for a skeletal structure to create an application #28

Open chris5560 opened 7 years ago

chris5560 commented 7 years ago

@jow- I would like to start to develop the first applications for your project.

Could you please offer a skeletal structure where to easily start and how to implement localisation. Many thanks

ianchi commented 7 years ago

Hi @chris5560, sorry for the late reply. Right now luci-ng is undergoing a revision on the way pages are wired, and it should be better to wait a bit till the API is more settled before migrating new applications. The idea is to have two ways to define apps:

A very very basic idea of the approach can be found in PR #24

Regarding localization, some more work still needs to be done to finish implementing a functional feature, it is still very much work in progress. I added some helper task that should eventually be used: first run: gulp translate:pot this will generate the template to use as source for translations. You generate your translated .po file and save it in a po/ subdirectory then running: gulp translate:json will generate the file needed to be added to luci. But the problem is that still the interface for loading the translations is not developed yet.