This module contains: User profile page, Glossary page, and Zanata side menu bar.
Navigate to src
, run make install
To run in dev mode http://localhost:8000 (a HTTP server to serve index.html with webpack produced bundle.js)
- need http://localhost:8080/zanata to run separately
make start
make build
There is a helper script to create files for a new component and set it up with in storybook ready for iterating on its design. Just run the following, answer the questions and follow the instructions:
make component
make styleguide-build
followed by make styleguide-server
mvn install
It will build and deploy to local maven repository a jar file containing the javascript bundle. The jar file can be used directly under any servlet 3 compatible container and the bundle is accessible as static resources. See Servlet 3 static resources.
The following Maven properties can be overridden on the command line with -Dkey=value
:
<node.version>v5.6.0</node.version>
<yarn.version>v0.18.1</yarn.version>
<yarn.install.directory>${download.dir}/zanata-frontend/node-${node.version}-yarn-${yarn.version}</yarn.install.directory>
By default it will try to install npm modules from npm registry (default cache TTL is 10 seconds).
This module is setup to disable lifecycle scripts for yarn command by default. See help using yarn -h
The configuration is in .yarnrc in this module.
The editor is a separate single-page React+Redux application that uses REST APIs on the Zanata server for all its data. It is meant to be packaged with zanata-war as a jar dependency.
To package the editor as a jar, use maven:
mvn package
All the build instructions below are for use when developing this editor on its own. They are not needed to make the final jar package. They just allow for faster builds and immediate feedback on code changes.
Make sure you test changes against the current server before checking them in.
- Make sure node and yarn are installed. Node: v5.6.0, Yarn: v0.18.1
- Setup dependencies:
make install
. - Build compressed files:
make build
, files will be in /app/dist
Build and run a server: make watch
.
- Editor is available at localhost:8080
- the editor will be blank at the base URL, include the project-version to show content. The format is localhost:8000/#/{project-slug}/{version-slug}/translate
- Assumes a server is already serving the Zanata REST API.
Build and run server and API server: make watch-fakeserver
.
- Editor is available at localhost:8080
- URL for a working document from the default API server Tiny Project 1, hello.txt to French
- REST API server is available at localhost:7878/zanata/rest
Run tests with make test
.
And these for Javascript.
Always add documentation.
For CSS I am aiming to move to these guidelines.
This module is setup to disable lifecycle scripts for yarn command by default. See help using yarn -h
The configuration is in .yarnrc in this module.