diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000..13edf646ed --- /dev/null +++ b/.gitattributes @@ -0,0 +1,44 @@ +# See https://help.github.com/articles/dealing-with-line-endings + +# This setting tells git always to normalize the files specified. +# When committed they are stored with LF, on checkout they are +# converted to the OS's native line endings. +* text + +# Explicitly declare text files we want to always be normalized and converted +# to native line endings on checkout. +*.c text +*.css text +*.csv text +*.groovy text +*.h text +*.html text +*.ini text +*.java text +*.js text +*.launch text +*.po text +*.pot text +*.properties text +*.sh text +*.sql text +*.txt text +*.xhtml text +*.xml text + +# Declare files that will always have CRLF line endings on checkout. +*.sln text eol=crlf + +# Denote all files that are truly binary and should not be modified. +*.gif binary +*.jar binary +*.jpg binary +*.png binary +*.idml binary +*.odt binary +*.odg binary +*.odp binary +*.ods binary +*.ico binary +*.eot binary +*.ttf binary diff --git a/.gitignore b/.gitignore index 386a7eb4c6..f98acddc98 100644 --- a/.gitignore +++ b/.gitignore @@ -1,11 +1,9 @@ -# NB be careful ignoring anything under src/ (especially directories or .jar files) -# because ignoring files under these directories can make it -# difficult to debug build problems. At the very least, we should ensure -# 'mvn clean' will clean such directories. - *~ *.patch +# Include patches used for the publick package +!/zanata-war/etc/public-package/patches/**/*.patch + *.sedbak zanatasearchindex/ test-output/ @@ -33,6 +31,7 @@ bin/ # eclipse scrapbook page: *.jpage +*.pdf # idea *.idea/ @@ -44,11 +43,33 @@ bin/ #gwt related .gwt-log *.gwt-tmp -/server/zanata-war/src/main/webapp/WEB-INF/deploy/ -/server/zanata-war/src/main/webapp/webtrans/ +/zanata-war/src/main/webapp/WEB-INF/deploy/ +/zanata-war/src/main/webapp/webtrans/ # vim *.swp + +# binary files +*.class +*.cli +*.exe +*.jar +*.war +*.zip + +# temp files *.log +*.temp +*.tmp /tmp* +*.bak + +# Gradle files +.gradle/ + +# other things that really ought to go under target/ +ehcache.disk.store.dir/ +frontend/src/main/web/jsconfig.json +frontend/src/main/web/.vscode/launch.json +frontend/src/main/web/.vscode/tasks.json diff --git a/.travis-settings.xml b/.travis-settings.xml new file mode 100644 index 0000000000..7edc4b5535 --- /dev/null +++ b/.travis-settings.xml @@ -0,0 +1,49 @@ + + + + + + + oss-public + + + !oss.public.off + + + + + oss-public + oss-public + https://oss.sonatype.org/content/groups/public/ + + true + + + true + + + + + + oss-public + oss-public + https://oss.sonatype.org/content/groups/public/ + + true + + + true + + + + + + + diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000000..8076ab1674 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,38 @@ +# use http://docs.travis-ci.com/user/workers/container-based-infrastructure/ +sudo: false + +# cache local Maven repo: http://docs.travis-ci.com/user/caching/ +cache: + directories: + - $HOME/.m2/repository + +language: java + +# Use the 'true' command to avoid up-front dependency fetching, for faster builds +# See http://docs.travis-ci.com/user/languages/java/#Dependency-Management +install: /bin/true + +# Travis build logs need to be small (aim for less than 4MB or 10,000 lines), +# so we try to minimise unwanted logging. However, Travis will kill the build +# if nothing is logged for 10 minutes (20 with travis_wait), so we do need +# some logging. + +script: | + mvn verify \ + --batch-mode \ + --settings .travis-settings.xml \ + -Dgwt.validateOnly \ + -Dappserver=wildfly8 \ + -DskipFuncTests \ + -Dmaven.test.redirectTestOutputToFile \ + -DstaticAnalysis | \ + egrep -v \ + '^(\[INFO\] Download|'\ + '\[WARNING\] Could not validate integrity of download from|'\ + '\[WARNING\] Checksum validation failed, no checksums available for)' + +jdk: + - oraclejdk8 + +matrix: + fast_finish: true diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index b6c67101d1..0000000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,127 +0,0 @@ -# Zanata change log summary - -## zanata-1.4.1 - * Fixed: % completed should be calculated with words, not messages: https://bugzilla.redhat.com/show_bug.cgi?id=741523 - * Fixed: Selecting Administration submenu items does not always highlight the parent menu: https://bugzilla.redhat.com/show_bug.cgi?id=724867 - * Fixed: Change of tile to list view on Language page, make project list sortable: https://bugzilla.redhat.com/show_bug.cgi?id=742111 - * Performance fix for projects with 1000+ documents: https://bugzilla.redhat.com/show_bug.cgi?id=743179 - -## zanata-1.4 - * add project-type to zanata.xml for generic push/pull commands - * redirect to login from translation editor when required - * if domain is left blank by admin, don't populate email address for new users - * UI bug fixes - -## zanata-1.4-alpha-1 - * create generic push/pull commands, with include/exclude filters - * add support for Java Properties and XLIFF projects - * bug fix: mark existing translations of modified XLIFF/Properties strings as fuzzy - * modify keyboard shortcuts in editor - * add new Zanata logo/favicon - * various UI improvements - * auto-size for translation text area - * add icons to buttons and remove text - * add option to hide editor buttons - * remove Clone and Save button; move Copy button to middle - * autosave when leaving a cell - * remove Fuzzy checkbox; add Save as Fuzzy - * better statistics graphs - * display resource IDs for translation units - * add ability to hide translation unit details - * show translation states with coloured side bars, and italics for Fuzzy - * recalculate missing word counts - * bug fixes - -## zanata-1.3.1 (never released) - * add liquibase script - * bug fix for search re-indexing by admin - * copy translations of identical strings when importing new documents - * bug fixes and improvements for UI - * bug fix for word counts (thread safety) - * remove email address from Language Team pages - * enable stats for anonymous users - * no need to enforce locales for source documents - * bug fix for push/merge when PO files are missing some msgids - -## zanata-1.3 - * bug fixes for authentication and for source comments - -## zanata-1.3-alpha-3 - * finalise rebrand from flies->zanata: XML namespaces, media types, etc - * more logging for authentication errors - * bug fix for Kerberos authentication - -## zanata-1.3-alpha-2 - * switch source control to git on github - * rebrand from flies->zanata (maven artifacts, java packages, mailing lists) - * Fedora authentication rhbz#692011 - * generate zanata.xml config file (http://code.google.com/p/flies/issues/detail?id=282) - * merge translations on import (http://code.google.com/p/flies/issues/detail?id=28) - * preserve and generate PO header comments for translator credits (http://code.google.com/p/flies/issues/detail?id=269) - * bug fixes - -## zanata-1.3-alpha-1 - * rebrand from flies->zanata (except URIs, maven artifacts and java packages) - * specify locales per project/version (http://code.google.com/p/flies/issues/detail?id=261) - * added tab for home page, removed project list, contents editable by admin (http://code.google.com/p/flies/issues/detail?id=279) - * added help page/tab, contents editable by admin (http://code.google.com/p/flies/issues/detail?id=280) - * removed name and description from project version (http://code.google.com/p/flies/issues/detail?id=281) - * stats for all languages (http://code.google.com/p/flies/issues/detail?id=275) - * workaround for form/login issue on Firefox 4.0 rhbz#691963 - * bug fixes - -## flies-1.2 - * disabled bad key bindings (http://code.google.com/p/flies/issues/detail?id=262) - * fixed python client issue with PotEntryHeader.extractedComment (http://code.google.com/p/flies/issues/detail?id=256) - * web template redesign (new logo, CSS) (http://code.google.com/p/flies/issues/detail?id=238) - * fixed Seam integration tests (http://code.google.com/p/flies/issues/detail?id=231) - -## flies-1.2-alpha-3 - * improve notifications in editor (http://code.google.com/p/flies/issues/detail?id=191) - * highlight search terms in editor (http://code.google.com/p/flies/issues/detail?id=227) - -## flies-1.2-alpha-2 - * better messages - * bug fixes - -## flies-1.2-alpha-1 - * development change: re-arranged Maven modules into common, client and server - -## flies-1.1.1 - * use word counts in translation statistics (http://code.google.com/p/flies/issues/detail?id=203) - * bug fixes - -## flies-1.1 - * Kerberos/JAAS fixes - * require name & email address on first login for JAAS/Kerberos - * validate changes to email address - * use correct BCP-47 language tags (zh-CN-Hans is now zh-Hans-CN) - -## flies-1.1-alpha-1 - * JAAS authentication - * Kerberos authentication - * remove communities tab and my communities UI (http://code.google.com/p/flies/issues/detail?id=197) - * remove "Language Missing" button (http://code.google.com/p/flies/issues/detail?id=185) - * show member number for the language groups (http://code.google.com/p/flies/issues/detail?id=186) - * allow overriding POT directory in Maven client (http://code.google.com/p/flies/issues/detail?id=200) - * support `[servers]` in flies.ini for Maven client (http://code.google.com/p/flies/issues/detail?id=193) - * better info/error messages in Maven client - -## flies-1.0.3 - * fix TM caching issue (http://code.google.com/p/flies/issues/detail?id=190) - * add 'translator' role and security rules - * configurable URLs - -## flies-1.0.2 - * minor UI fixes (http://code.google.com/p/flies/issues/detail?id=173, http://code.google.com/p/flies/issues/detail?id=176) - * ergonomics for Maven client - * UI for assigning project maintainers (http://code.google.com/p/flies/issues/detail?id=180) - * better error checking in REST API (http://code.google.com/p/flies/issues/detail?id=175) - * security rule fix (http://code.google.com/p/flies/issues/detail?id=182) - -## flies-1.0.1 - * database schema fixes - * fixes for deployment issues - -## flies-1.0 - * initial release diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000000..61d52135f4 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,120 @@ +# Contributing to Zanata + +We would love for you to contribute to our source code and to make Zanata +even better than it is today! To make sure we see your feedback contributions +straight away, please follow these guidelines: + +## Feedback or Issues +If you find a bug, want a feature or improvement, have an idea for how to make +Zanata better, or just want to tell us what you think of something in Zanata, +please let us know using our [issue system](https://zanata.atlassian.net/) + +## Pull Requests +Pull requests welcome! + +### Setup +The +[Developer Setup Guide](https://github.com/zanata/zanata-server/wiki/Developer-Guide) +shows the dependencies and how to setup Java, Maven, MySQL, JBoss, and IDE. + +### Branches +The branches that should be targeted in pull requests + - **master**: New features, bug fixes and enhancements should target this branch. + If you are unsure which branch to target pull request, use this branch. + - **release**: Only urgent bug fixes and documentation should target this + branch. + +### Test against Wildfly +To run all tests against WildFly (takes about 1 hour): + +``` +mvn clean verify -Dappserver=wildfly8 -DstaticAnalysis -Dchromefirefox +``` + +### Commit Message Format +We follow the [angular commit message format] +(https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md#commit), +that is: + +Each commit message consists of a **header**, a **body** and a **footer**. The header has a special +format that includes a **type**, a **scope** and a **subject**: + +``` +(): + + + +