This README documents the steps necessary to get your application up and running.
- Quick summary
- Version
- Learn Markdown
The Play framework is needed in order to run this program.
- Install PostgreSQL on your machine
- Follow instructions to install a Postgres Server on your machine
- Run postgres "createdb" util and Create Database "default" using your postgres user
using
createdb -U postgres default
orCREATE DATABASE "default";
inside the postgres console - Create user "cosmic" with password "cosmic123" as per application config;
run
CREATE USER cosmic PASSWORD 'cosmic123';
inside the database console - Your server should now be running and deploying in development with "Activator run" should connect to local DB running at "postgres://localhost/default"
- Play Framework
- Download it.
- Make a new folder and extract the .zip file in it.
- Add
activator
to your PATH or create the following link substituting/path/to/activator
with the absolute path to theactivator
executable by executingsudo ln -s /path/to/activator /usr/local/bin/activator
. Consult this link for the complete installation documentation.
- SQLite 3
- Download and install SQLite 3 for your platform at https://www.sqlite.org/.
- HOW TO ADD A NEW LANGUAGE
- Create a file in public/resources called xx.json where xx is the language code you're trying to add according to ISO 639-1. https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
- Add your language to the following section of public/javascript/app/app.js :
$scope.languages = [
{id:'en', name:'English'},
{id:'fr', name:'Français'},
{id:'xx', name:'NewLanguage'}
];
$translateProvider.registerAvailableLanguageKeys(['en', 'fr', xx], {
'en_*': 'en',
'fr_*': 'fr',
'xx_*': 'xx'
});
where **xx** is the code of the language you're trying to add.
-
HOW TO FORMAT HTML LABELS
https://angular-translate.github.io/docs/#/guide/05_using-translate-directivei. Add ressource to the file just created :
{ "WEBSITE_SECTION": { "RESOURCE_NAME":"Text to print" } }
Where WEBSITE_SECTION and RESOURCE_NAME are the same for all the languages JSON files (refer to the english JSON file).
ii. Add filter and ID in your html tag :
<p>'WEBSITE_SECTION.RESOURCE_NAME' | translate</p>
-
ANY MODULE THAT YOU ADD MUST INJECT THE $translate MODULE AS SHOWN IN THE FOLLOWING EXAMPLE :
.controller('RegistrationCtrl', ['$scope', '$translate', function ($scope, $translate) {
To build and run the application in the Play server, execute activator run
. It may take some time to download some missing packages the first time if you have installed activator-minimal.
Once the server is running you can connect to the application's webpage by entering http://localhost:9000
in your browser's address bar. The first time you access the application, it may take a while because of the compilation process.
Use Ctrl + D
to stop the server and go back to the console.
- Writing tests
- Code review
- Other guidelines
- Repo owner or admin
- Other community or team contact