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**:
+
+```
+():
+
+
+
+
+```
+The **header** is mandatory and the **scope** of the header is optional.
+
+Any line of the commit message cannot be longer 100 characters! This allows the message to be easier
+to read on GitHub as well as in various git tools.
+
+#### Type
+Must be one of the following:
+
+- **feat**: A new feature
+- **fix**: A bug fix
+- **docs**: Documentation only changes
+- **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing
+ semi-colons, etc)
+- **refactor**: A code change that neither fixes a bug nor adds a feature
+- **perf**: A code change that improves performance
+- **test**: Adding missing tests
+- **chore**: Changes to the build process or auxiliary tools and libraries such as documentation
+generation
+- **revert**: reverts a previous commit. The subject should be the header of the reverted commit. In the body it should say: `This reverts commit .`, where the hash is the SHA of the commit being reverted.
+
+#### Scope
+The scope could be anything specifying place of the commit change.
+If the pull requrest is targeting an issue, use issue ID like `ZNAT-1234`.
+Otherwise you can use the component or element name like `translation memory`
+`statistics` and `glossary`, as well as the purposes of pull requests,
+like `dependency`, `cleanup`.
+
+#### Subject
+The subject contains a succinct description of the change:
+
+* use the imperative, present tense: "change" not "changed" nor "changes"
+* do not capitalize first letter
+* no dot (.) at the end
+
+#### Body
+Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes".
+The body should include the motivation for the change and contrast this with previous behavior.
+
+#### Footer
+The footer should contain any information about **Breaking Changes** and is also the place to
+reference GitHub issues that this commit **Closes**.
+
+**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines. The rest of the commit message is then used for this.
+
+#### Live Examples
+* [fix(project):shows lock icon when project is readonly](https://github.com/zanata/zanata-server/commit/414c3e3d8038dd10143a30b62226ebd1267709ec)
+* [chore: use deltaspike for data access](https://github.com/zanata/zanata-server/commit/5c785b9eb15ccb2ac87cdfb9e0740ee8444f9d1c)
+
+### Submit a Pull Request
+
+1. Make your changes in a new git branch.
+2. Create your patch, **including appropriate test cases**.
+3. Commit your changes using a descriptive commit message that follows our
+ [commit message format](#Commit_Message_Format).
+4. Push your branch to GitHub.
+5. In GitHub, target the pull request to `zanata:master`.
+6. If we suggest changes then:
+ a. Make the required updates.
+ b. Commit your changes to your branch (e.g. `my-pr-branch`).
+ * Push the changes to your GitHub repository (this will update your Pull Request).
+
+For pull request detail, read
+[GitHub using pull request](https://help.github.com/articles/using-pull-requests/).
+
+That is it! Thank you for your contribution!
+
+### After your pull request is merged
+
+After your pull request is merged, you may safely delete your branch and
+pull the changes from the **master** (or **release** branch if you were
+working with it) branch of main (upstream) repository.
+
diff --git a/LICENSE.LESSER.txt b/LICENSE.LESSER.txt
new file mode 100644
index 0000000000..551cb4acb9
--- /dev/null
+++ b/LICENSE.LESSER.txt
@@ -0,0 +1,502 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL. It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it. You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+ When we speak of free software, we are referring to freedom of use,
+not price. Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+ To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights. These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+ Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+ Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License. We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+ When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+ We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less
+of an advantage over competing non-free programs. These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+ For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard. To achieve this, non-free programs must be
+allowed to use the library. A more frequent case is that a free
+library does the same job as widely used non-free libraries. In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+ In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software. For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+ Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+ 6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (1) uses at run time a
+ copy of the library already present on the user's computer system,
+ rather than copying library functions into the executable, and (2)
+ will operate properly with a modified version of the library, if
+ the user installs one, as long as the modified version is
+ interface-compatible with the version that the work was made with.
+
+ c) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ d) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ e) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded. In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library. It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+ , 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!
diff --git a/LICENSE.txt b/LICENSE.txt
index 602bfc9463..d159169d10 100644
--- a/LICENSE.txt
+++ b/LICENSE.txt
@@ -1,397 +1,221 @@
- GNU LESSER GENERAL PUBLIC LICENSE
- Version 2.1, February 1999
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
-[This is the first released version of the Lesser GPL. It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
- Preamble
+ Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
- This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it. You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations below.
-
- When we speak of free software, we are referring to freedom of use,
-not price. Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights. These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
- For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you. You must make sure that they, too, receive or can get the source
-code. If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it. And you must show them these terms so they know their rights.
-
- We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
- To protect each distributor, we want to make it very clear that
-there is no warranty for the free library. Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-
- Finally, software patents pose a constant threat to the existence of
-any free program. We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder. Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
- Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License. This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License. We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
- When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library. The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom. The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
- We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License. It also provides other free software developers Less
-of an advantage over competing non-free programs. These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries. However, the Lesser license provides advantages in certain
-special circumstances.
-
- For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it becomes
-a de-facto standard. To achieve this, non-free programs must be
-allowed to use the library. A more frequent case is that a free
-library does the same job as widely used non-free libraries. In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
- In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software. For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
- Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
-modification follow. Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library". The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
- GNU LESSER GENERAL PUBLIC LICENSE
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
- 0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
- A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
- The "Library", below, refers to any such software library or work
-which has been distributed under these terms. A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language. (Hereinafter, translation is
-included without limitation in the term "modification".)
-
- "Source code" for a work means the preferred form of the work for
-making modifications to it. For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
- Activities other than copying, distribution and modification are not
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it). Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
- 1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
- You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
- 2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
- a) The modified work must itself be a software library.
-
- b) You must cause the files modified to carry prominent notices
+ a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
- c) You must cause the whole of the work to be licensed at no
- charge to all third parties under the terms of this License.
-
- d) If a facility in the modified Library refers to a function or a
- table of data to be supplied by an application program that uses
- the facility, other than as an argument passed when the facility
- is invoked, then you must make a good faith effort to ensure that,
- in the event an application does not supply such function or
- table, the facility still operates, and performs whatever part of
- its purpose remains meaningful.
-
- (For example, a function in a library to compute square roots has
- a purpose that is entirely well-defined independent of the
- application. Therefore, Subsection 2d requires that any
- application-supplied function or table used by this function must
- be optional: if the application does not supply it, the square
- root function must still compute square roots.)
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Library,
+identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
+on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
+entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
-collective works based on the Library.
+collective works based on the Program.
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
- 3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License. (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.) Do not make any other change in
-these notices.
-
- Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
- This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
- 4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
- If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
- 5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library". Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
- However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library". The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
- When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library. The
-threshold for this to be true is not precisely defined by law.
-
- If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work. (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
- Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
- 6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
- You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License. You must supply a copy of this License. If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License. Also, you must do one
-of these things:
-
- a) Accompany the work with the complete corresponding
- machine-readable source code for the Library including whatever
- changes were used in the work (which must be distributed under
- Sections 1 and 2 above); and, if the work is an executable linked
- with the Library, with the complete machine-readable "work that
- uses the Library", as object code and/or source code, so that the
- user can modify the Library and then relink to produce a modified
- executable containing the modified Library. (It is understood
- that the user who changes the contents of definitions files in the
- Library will not necessarily be able to recompile the application
- to use the modified definitions.)
-
- b) Use a suitable shared library mechanism for linking with the
- Library. A suitable mechanism is one that (1) uses at run time a
- copy of the library already present on the user's computer system,
- rather than copying library functions into the executable, and (2)
- will operate properly with a modified version of the library, if
- the user installs one, as long as the modified version is
- interface-compatible with the version that the work was made with.
-
- c) Accompany the work with a written offer, valid for at
- least three years, to give the same user the materials
- specified in Subsection 6a, above, for a charge no more
- than the cost of performing this distribution.
-
- d) If distribution of the work is made by offering access to copy
- from a designated place, offer equivalent access to copy the above
- specified materials from the same place.
-
- e) Verify that the user has already received a copy of these
- materials or that you have already sent this user a copy.
-
- For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it. However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
- It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system. Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
- 7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
- a) Accompany the combined library with a copy of the same work
- based on the Library, uncombined with any other library
- facilities. This must be distributed under the terms of the
- Sections above.
-
- b) Give prominent notice with the combined library of the fact
- that part of it is a work based on the Library, and explaining
- where to find the accompanying uncombined form of the same work.
-
- 8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License. Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License. However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
- 9. You are not required to accept this License, since you have not
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
-distribute the Library or its derivative works. These actions are
+distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
+the Program or works based on it.
- 10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions. You may not impose any further
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
+You are not responsible for enforcing compliance by third parties to
this License.
-
- 11. If, as a consequence of a court judgment or allegation of patent
+
+ 7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all. For example, if a patent
-license would not permit royalty-free redistribution of the Library by
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
+refrain entirely from distribution of the Program.
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
+integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
@@ -402,103 +226,114 @@ impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
- 12. If the distribution and/or use of the Library is restricted in
+ 8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded. In such case, this License incorporates the limitation as if
-written in the body of this License.
-
- 13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation. If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
- 14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission. For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this. Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
- NO WARRANTY
-
- 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Libraries
-
- If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change. You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
- To apply these terms, attach the following notices to the library. It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
-
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+
Copyright (C)
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
- This library is distributed in the hope that it will be useful,
+ This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
+school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
- Yoyodyne, Inc., hereby disclaims all copyright interest in the
- library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
- , 1 April 1990
+ , 1 April 1989
Ty Coon, President of Vice
-That's all there is to it!
-
-
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
diff --git a/README.md b/README.md
index 6beb8dccb1..8cc4d1457c 100644
--- a/README.md
+++ b/README.md
@@ -1,26 +1,63 @@
Zanata
=====
-Zanata is a web-based system for translators to translate
-documentation and software online using a web-browser. It is
-written in Java and uses modern web technologies like JBoss,
-Seam, GWT, Hibernate, and a REST API. It currently supports
-translation of DocBook/Publican documentation through PO
-files. Projects can be uploaded to and downloaded from a Zanata
+Zanata is a web-based system for translators to translate
+documentation and software online using a web-browser. It is
+written in Java and uses modern web technologies like JBoss,
+Seam, GWT, Hibernate, and a REST API. It currently supports
+translation of DocBook/Publican documentation through PO
+files. Projects can be uploaded to and downloaded from a Zanata
server using a Maven plugin or a Python client.
-For *developers and writers*: By using Zanata for
-your document translations, you can open up your project for
-translations without opening your entire project in version
+For *developers and writers*: By using Zanata for
+your document translations, you can open up your project for
+translations without opening your entire project in version
control.
-For *translators*: No need to deal with PO files,
-gettext or a version control system - just log in to the website, join
-a language team and start translating, with translation memory (history
-of similar translations) and the ability to see updates from other
+For *translators*: No need to deal with PO files,
+gettext or a version control system - just log in to the website, join
+a language team and start translating, with translation memory (history
+of similar translations) and the ability to see updates from other
translators in seconds.
Zanata is Free software, licensed under the [LGPL][].
[LGPL]: http://www.gnu.org/licenses/lgpl-2.1.html
+
+Developers
+----------
+
+### Prerequisites
+
+You will need:
+- Java SDK 8 (OpenJDK recommended)
+- npm
+- Mysql or MariaDB
+- JBoss EAP 6 or Wildfly
+
+### Building
+
+#### Quickly build a .war file
+
+[`etc/scripts/quickbuild.sh`](etc/scripts/quickbuild.sh) - Builds the project
+as quickly as possible, targeting both Firefox and Chrome when building GWT
+components, and skipping all checks and verifications (i.e. tests, checkstyle, etc)
+
+If you wish to build GWT components for chrome or firefox only, you can specify the
+`-c` and `-f` arguments respectively.
+
+The `-h` argument prints the script's help.
+
+#### Build and run a server for testing
+
+[`etc/scripts/cargowait.sh`](etc/scripts/cargowait.sh) - Builds the Zanata artifact
+and starts a JBoss server using the cargo plugin. This script is particularly
+useful for starting a Zanata instance with the aim of running functional tests
+from an IDE.
+
+The `-h` argument prints the script's help.
+
+#### Development using docker (experimental)
+
+For a quick Zanata development environment with Docker, please visit the [docker README](docker/README.md).
diff --git a/branch-release.sh b/branch-release.sh
new file mode 100755
index 0000000000..af26561482
--- /dev/null
+++ b/branch-release.sh
@@ -0,0 +1,21 @@
+#!/bin/bash -ex
+
+
+git fetch
+git checkout integration/master && git reset --hard origin/integration/master
+git branch -D legacy release || true
+
+git checkout legacy
+git merge origin/release --ff-only --quiet ||
+(echo please check for cherry-picked commits in legacy which were never merged into release; exit 1)
+
+git checkout release
+git merge origin/master --ff-only --quiet ||
+(echo please check for cherry-picked commits in release which were never merged into master; exit 1)
+
+git checkout integration/master
+mvn release:update-versions -DautoVersionSubmodules=true # -DdevelopmentVersion=${developmentVersion}
+git commit pom.xml */pom.xml -m "prepare for next development iteration"
+
+# push all the changes back to the server
+git push origin legacy release integration/master
diff --git a/build.sh b/build.sh
new file mode 100755
index 0000000000..599242657b
--- /dev/null
+++ b/build.sh
@@ -0,0 +1,5 @@
+#!/bin/bash -e
+
+set -a # make sure the env vars are exported
+source <(etc/scripts/allocate-jboss-ports)
+exec xvfb-run -a mvn "$@"
diff --git a/client/pom.xml b/client/pom.xml
deleted file mode 100644
index fae9d54b84..0000000000
--- a/client/pom.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
- 4.0.0
- client
- Zanata client modules
- pom
-
- org.zanata
- zanata-parent
- 1.5-SNAPSHOT
- ../zanata-parent/pom.xml
-
-
-
-
- scm:git:git://github.com/zanata/zanata.git
- scm:git:git@github.com:zanata/zanata.git
- https://github.com/zanata/zanata
-
-
-
- zanata-adapter-po
- zanata-adapter-properties
- zanata-adapter-xliff
- zanata-client-commands
- zanata-client-ant-po
- zanata-client-ant-properties
- zanata-maven-plugin
-
-
diff --git a/client/zanata-adapter-po/pom.xml b/client/zanata-adapter-po/pom.xml
deleted file mode 100644
index ad22a5478d..0000000000
--- a/client/zanata-adapter-po/pom.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-
-
- 4.0.0
- zanata-adapter-po
- Zanata Adapter for Gettext PO
-
- org.zanata
- zanata-parent
- 1.5-SNAPSHOT
- ../../zanata-parent/pom.xml
-
- jar
-
-
-
- scm:git:git://github.com/zanata/zanata.git
- scm:git:git@github.com:zanata/zanata.git
- https://github.com/zanata/zanata
-
-
-
-
- org.zanata
- zanata-common-api
- ${project.version}
-
-
- org.zanata
- zanata-common-util
- ${project.version}
-
-
- org.fedorahosted.tennera
- jgettext
- ${tennera.version}
-
-
- commons-codec
- commons-codec
-
-
- commons-lang
- commons-lang
-
-
- org.slf4j
- slf4j-log4j12
- test
-
-
-
diff --git a/client/zanata-adapter-po/src/main/java/org/zanata/adapter/po/PoReader2.java b/client/zanata-adapter-po/src/main/java/org/zanata/adapter/po/PoReader2.java
deleted file mode 100644
index e9bfb46815..0000000000
--- a/client/zanata-adapter-po/src/main/java/org/zanata/adapter/po/PoReader2.java
+++ /dev/null
@@ -1,303 +0,0 @@
-package org.zanata.adapter.po;
-
-import java.io.IOException;
-import java.net.URL;
-import java.nio.charset.Charset;
-import java.security.MessageDigest;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.commons.codec.binary.Hex;
-import org.apache.commons.lang.StringUtils;
-import org.fedorahosted.tennera.jgettext.HeaderFields;
-import org.fedorahosted.tennera.jgettext.Message;
-import org.fedorahosted.tennera.jgettext.catalog.parse.MessageStreamParser;
-import org.xml.sax.InputSource;
-import org.zanata.common.ContentState;
-import org.zanata.common.ContentType;
-import org.zanata.common.LocaleId;
-import org.zanata.rest.dto.extensions.comment.SimpleComment;
-import org.zanata.rest.dto.extensions.gettext.HeaderEntry;
-import org.zanata.rest.dto.extensions.gettext.PoHeader;
-import org.zanata.rest.dto.extensions.gettext.PoTargetHeader;
-import org.zanata.rest.dto.extensions.gettext.PotEntryHeader;
-import org.zanata.rest.dto.resource.Resource;
-import org.zanata.rest.dto.resource.TextFlow;
-import org.zanata.rest.dto.resource.TextFlowTarget;
-import org.zanata.rest.dto.resource.TranslationsResource;
-import org.zanata.util.ShortString;
-
-import com.google.common.collect.ImmutableSet;
-
-public class PoReader2
-{
-
- public static final ContentType PO_CONTENT_TYPE = new ContentType("application/x-gettext");
-
- public static final ImmutableSet POT_HEADER_FIELDS = ImmutableSet.of(HeaderFields.KEY_ProjectIdVersion, HeaderFields.KEY_ReportMsgidBugsTo, HeaderFields.KEY_PotCreationDate, HeaderFields.KEY_MimeVersion, HeaderFields.KEY_ContentType, HeaderFields.KEY_ContentTransferEncoding);
-
- public static final ImmutableSet PO_HEADER_FIELDS = ImmutableSet.of(HeaderFields.KEY_PoRevisionDate, HeaderFields.KEY_LastTranslator, HeaderFields.KEY_LanguageTeam, HeaderFields.KEY_Language, "Plural-Forms", "X-Generator");
-
- public PoReader2()
- {
- }
-
- public TranslationsResource extractTarget(InputSource inputSource, Resource srcDoc, boolean useSourceOrder)
- {
- TranslationsResource document = new TranslationsResource();
- MessageStreamParser messageParser = createParser(inputSource);
-
- List resources = srcDoc.getTextFlows();
-
- List textFlowIds = null;
- Map targets = null;
- if (useSourceOrder)
- {
- textFlowIds = new ArrayList();
- for (TextFlow res : resources)
- {
- textFlowIds.add(res.getId());
- }
- targets = new HashMap();
- }
-
- boolean headerFound = false;
- while (messageParser.hasNext())
- {
- Message message = messageParser.next();
-
- if (message.isHeader())
- {
- if (headerFound)
- throw new IllegalStateException("found a second header!");
- headerFound = true;
-
- // add target header data
- PoTargetHeader poHeader = new PoTargetHeader();
- extractPoHeader(message, poHeader);
- document.getExtensions(true).add(poHeader);
- }
- else if (message.isObsolete())
- {
- // TODO append obsolete
- }
- else if (message.isPlural())
- {
- // TODO skip for now
- }
- else
- {
- String id = createId(message);
- if (useSourceOrder && !textFlowIds.contains(id))
- {
- // TODO append obsolete
- }
- else
- {
- // add the target content (msgstr)
- TextFlowTarget tfTarget = new TextFlowTarget();
- tfTarget.setResId(id);
- tfTarget.setDescription(ShortString.shorten(message.getMsgid()));
-
- tfTarget.setContent(message.getMsgstr());
- tfTarget.setState(getContentState(message));
-
- // add the PO comment
- tfTarget.getExtensions(true).add(new SimpleComment(StringUtils.join(message.getComments(), "\n")));
- if (useSourceOrder)
- targets.put(id, tfTarget);
- else
- document.getTextFlowTargets().add(tfTarget);
- }
- }
- }
- if (useSourceOrder)
- {
- // this ensures that the TextFlowTargets have the same order as the
- // TextFlows in the Document:
- for (String id : textFlowIds)
- {
- TextFlowTarget tfTarget = targets.get(id);
- document.getTextFlowTargets().add(tfTarget);
- }
- }
- return document;
- }
-
- private static void extractPotHeader(Message message, PoHeader potHeader)
- {
- potHeader.setComment(StringUtils.join(message.getComments(), "\n"));
-
- HeaderFields hf = HeaderFields.wrap(message);
- for (String key : hf.getKeys())
- {
- String val = hf.getValue(key);
- if (POT_HEADER_FIELDS.contains(key))
- {
- potHeader.getEntries().add(new HeaderEntry(key, val));
- }
- // we add any custom fields to the PO only, not the POT
- // TODO this should be configurable
- }
- }
-
- private static void extractPoHeader(Message message, PoTargetHeader poHeader)
- {
- poHeader.setComment(StringUtils.join(message.getComments(), "\n"));
-
- HeaderFields hf = HeaderFields.wrap(message);
- for (String key : hf.getKeys())
- {
- String val = hf.getValue(key);
- if (PO_HEADER_FIELDS.contains(key))
- {
- poHeader.getEntries().add(new HeaderEntry(key, val));
- }
- else if (!POT_HEADER_FIELDS.contains(key))
- {
- // we add any custom fields to the PO only, not the POT
- // TODO this should be configurable
- poHeader.getEntries().add(new HeaderEntry(key, val));
- }
- }
- }
-
- public Resource extractTemplate(InputSource inputSource, LocaleId sourceLocaleId, String docName)
- {
- Resource document = new Resource(docName);
- MessageStreamParser messageParser = createParser(inputSource);
-
- document.setLang(sourceLocaleId);
- document.setContentType(PO_CONTENT_TYPE);
- List resources = document.getTextFlows();
-
- boolean headerFound = false;
- while (messageParser.hasNext())
- {
- Message message = messageParser.next();
-
- if (message.isHeader())
- {
- if (headerFound)
- throw new IllegalStateException("found a second header!");
- headerFound = true;
-
- // store POT data
- PoHeader potHeader = new PoHeader();
- extractPotHeader(message, potHeader);
- document.getExtensions(true).add(potHeader);
-
- }
- else if (message.isObsolete())
- {
- // TODO append obsolete
- }
- else if (message.isPlural())
- {
- // TODO skip for now
- }
- else
- {
- String id = createId(message);
- // add the content (msgid)
- TextFlow tf = new TextFlow(id, sourceLocaleId);
- tf.setContent(message.getMsgid());
- resources.add(tf);
-
- // add the entry header POT fields
- tf.getExtensions(true).add(createPotEntryHeader(message));
- tf.getExtensions().add(createSimpleComment(message));
- }
- }
- return document;
- }
-
- private static PotEntryHeader createPotEntryHeader(Message message)
- {
- PotEntryHeader data = new PotEntryHeader();
- if (message.getMsgctxt() != null)
- {
- data.setContext(message.getMsgctxt());
- }
- data.getFlags().addAll(message.getFormats());
- data.getReferences().addAll(message.getSourceReferences());
- return data;
- }
-
- private static SimpleComment createSimpleComment(Message message)
- {
- String comment = StringUtils.join(message.getExtractedComments(), "\n");
- SimpleComment result = new SimpleComment(comment);
- return result;
- }
-
- static MessageStreamParser createParser(InputSource inputSource)
- {
- MessageStreamParser messageParser;
- if (inputSource.getCharacterStream() != null)
- messageParser = new MessageStreamParser(inputSource.getCharacterStream());
- else if (inputSource.getByteStream() != null)
- {
- if (inputSource.getEncoding() != null)
- messageParser = new MessageStreamParser(inputSource.getByteStream(), Charset.forName(inputSource.getEncoding()));
- else
- messageParser = new MessageStreamParser(inputSource.getByteStream(), Charset.forName("UTF-8"));
- }
- else if (inputSource.getSystemId() != null)
- {
- try
- {
- URL url = new URL(inputSource.getSystemId());
-
- if (inputSource.getEncoding() != null)
- messageParser = new MessageStreamParser(url.openStream(), Charset.forName(inputSource.getEncoding()));
- else
- messageParser = new MessageStreamParser(url.openStream(), Charset.forName("UTF-8"));
- }
- catch (IOException e)
- {
- // TODO throw stronger typed exception
- throw new RuntimeException("failed to get input from url in inputSource", e);
- }
- }
- else
- // TODO throw stronger typed exception
- throw new RuntimeException("not a valid inputSource");
-
- return messageParser;
- }
-
- static ContentState getContentState(Message message)
- {
- if (message.getMsgstr() == null || message.getMsgstr().isEmpty())
- return ContentState.New;
- else if (message.isFuzzy())
- return ContentState.NeedReview;
- else
- return ContentState.Approved;
- }
-
- static String createId(Message message)
- {
- String sep = "\u0000";
- String hashBase = message.getMsgctxt() == null ? message.getMsgid() : message.getMsgctxt() + sep + message.getMsgid();
- return generateHash(hashBase);
- }
-
- public static String generateHash(String key)
- {
- try
- {
- MessageDigest md5 = MessageDigest.getInstance("MD5");
- md5.reset();
- return new String(Hex.encodeHex(md5.digest(key.getBytes("UTF-8"))));
- }
- catch (Exception exc)
- {
- throw new RuntimeException(exc);
- }
- }
-
-}
diff --git a/client/zanata-adapter-po/src/main/java/org/zanata/adapter/po/PoWriter2.java b/client/zanata-adapter-po/src/main/java/org/zanata/adapter/po/PoWriter2.java
deleted file mode 100644
index 3dc7d490d9..0000000000
--- a/client/zanata-adapter-po/src/main/java/org/zanata/adapter/po/PoWriter2.java
+++ /dev/null
@@ -1,309 +0,0 @@
-package org.zanata.adapter.po;
-
-import java.io.BufferedOutputStream;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.Writer;
-import java.nio.charset.Charset;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.commons.lang.StringUtils;
-import org.fedorahosted.tennera.jgettext.HeaderFields;
-import org.fedorahosted.tennera.jgettext.Message;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.zanata.resources.OutputSource;
-import org.zanata.rest.dto.extensions.comment.SimpleComment;
-import org.zanata.rest.dto.extensions.gettext.HeaderEntry;
-import org.zanata.rest.dto.extensions.gettext.PoHeader;
-import org.zanata.rest.dto.extensions.gettext.PoTargetHeader;
-import org.zanata.rest.dto.extensions.gettext.PotEntryHeader;
-import org.zanata.rest.dto.resource.Resource;
-import org.zanata.rest.dto.resource.TextFlow;
-import org.zanata.rest.dto.resource.TextFlowTarget;
-import org.zanata.rest.dto.resource.TranslationsResource;
-import org.zanata.util.PathUtil;
-
-public class PoWriter2
-{
- private static final Logger log = LoggerFactory.getLogger(PoWriter2.class);
- private final org.fedorahosted.tennera.jgettext.PoWriter poWriter = new org.fedorahosted.tennera.jgettext.PoWriter();
-
- public PoWriter2()
- {
- }
-
- private void mkdirs(File dir) throws IOException
- {
- if (!dir.exists())
- {
- if (!dir.mkdirs())
- throw new IOException("unable to create output directory: " + dir);
- }
- }
-
- /**
- * Generates a pot file from Resource (document), using the publican
- * directory layout.
- *
- * @param baseDir
- * @param doc
- * @throws IOException
- */
- public void writePot(File baseDir, Resource doc) throws IOException
- {
- // write the POT file to pot/$name.pot
- File potDir = new File(baseDir, "pot");
- writePotToDir(potDir, doc);
- }
-
- /**
- * Generates a pot file from Resource (document), in the specified directory.
- *
- * @param potDir
- * @param doc
- * @throws IOException
- */
- public void writePotToDir(File potDir, Resource doc) throws IOException
- {
- // write the POT file to $potDir/$name.pot
- File potFile = new File(potDir, doc.getName() + ".pot");
- PathUtil.makeParents(potFile);
- OutputSource outputSource = new OutputSource(potFile);
- write(outputSource, doc, null);
- }
-
- /**
- * Generates a po file from a Resource and a TranslationsResource, using the
- * publican directory layout.
- *
- * @param baseDir
- * @param doc
- * @param locale
- * @param targetDoc
- * @throws IOException
- */
- public void writePo(File baseDir, Resource doc, String locale, TranslationsResource targetDoc) throws IOException
- {
- // write the PO file to $locale/$name.po
- File localeDir = new File(baseDir, locale);
- File poFile = new File(localeDir, doc.getName() + ".po");
- mkdirs(poFile.getParentFile());
- OutputSource outputSource = new OutputSource(poFile);
- write(outputSource, doc, targetDoc);
- }
-
- /**
- * Generates a pot or po file from a Resource and/or TranslationsResource,
- * using the publican directory layout. If targetDoc is non-null, a po file
- * will be generated from Resource+TranslationsResource, otherwise a pot file
- * will be generated from the Resource only.
- *
- * @param outputSource
- * @param document
- * @param targetDoc
- * @throws IOException
- */
- private void write(OutputSource outputSource, Resource document, TranslationsResource targetDoc) throws IOException
- {
- Writer writer = createWriter(outputSource);
-
- PoHeader poHeader = document.getExtensions(true).findByType(PoHeader.class);
- HeaderFields hf = new HeaderFields();
- if (poHeader == null)
- {
- log.warn("No PO header in document named " + document.getName());
- setDefaultHeaderFields(hf);
- }
- else
- {
- copyToHeaderFields(hf, poHeader.getEntries());
- }
- Message headerMessage = null;
- if (targetDoc != null)
- {
- PoTargetHeader poTargetHeader = targetDoc.getExtensions(true).findByType(PoTargetHeader.class);
- if (poTargetHeader != null)
- {
- copyToHeaderFields(hf, poTargetHeader.getEntries());
- headerMessage = hf.unwrap();
- copyTargetHeaderComments(headerMessage, poTargetHeader);
- }
- }
- if (headerMessage == null)
- {
- headerMessage = hf.unwrap();
- }
- poWriter.write(headerMessage, writer);
- writer.write("\n");
- Map targets = null;
- if (targetDoc != null)
- {
- targets = new HashMap();
- for (TextFlowTarget target : targetDoc.getTextFlowTargets())
- {
- targets.put(target.getResId(), target);
- }
- }
-
- // first write header
- for (TextFlow textFlow : document.getTextFlows())
- {
-
- PotEntryHeader entryData = textFlow.getExtensions(true).findByType(PotEntryHeader.class);
- SimpleComment srcComment = textFlow.getExtensions().findByType(SimpleComment.class);
- Message message = new Message();
- message.setMsgid(textFlow.getContent());
- message.setMsgstr("");
- if (targetDoc != null)
- {
- TextFlowTarget contentData = targets.get(textFlow.getId());
- if (contentData != null)
- {
- if (entryData == null)
- {
- log.warn("Missing POT entry for text-flow ID " + textFlow.getId());
- }
- else if (!contentData.getResId().equals(textFlow.getId()))
- {
- throw new RuntimeException("ID from target doesn't match text-flow ID");
- }
- message.setMsgstr(contentData.getContent());
- SimpleComment poComment = contentData.getExtensions().findByType(SimpleComment.class);
- if (poComment != null)
- {
- String[] comments = poComment.getValue().split("\n");
- if (comments.length == 1 && comments[0].isEmpty())
- {
- // nothing
- }
- else
- {
- for (String comment : comments)
- {
- message.getComments().add(comment);
- }
- }
- }
- switch (contentData.getState())
- {
- case Approved:
- message.setFuzzy(false);
- break;
- case NeedReview:
- case New:
- message.setFuzzy(true);
- break;
- }
- }
- }
-
- if (entryData != null)
- copyToMessage(entryData, srcComment, message);
-
- poWriter.write(message, writer);
- writer.write("\n");
- }
- }
-
- static Writer createWriter(OutputSource outputSource)
- {
- Writer writer;
-
- // the writer has first priority
- if (outputSource.getWriter() != null)
- writer = outputSource.getWriter();
- else if (outputSource.getOutputStream() != null)
- { // outputstream has 2nd priority
- if (outputSource.getEncoding() != null)
- {
- writer = new OutputStreamWriter(outputSource.getOutputStream(), Charset.forName(outputSource.getEncoding()));
- }
- else
- {
- writer = new OutputStreamWriter(outputSource.getOutputStream(), Charset.forName("UTF-8"));
- }
- }
- else if (outputSource.getFile() != null)
- { // file has 3rd priority
- try
- {
- OutputStream os = new BufferedOutputStream(new FileOutputStream(outputSource.getFile()));
- if (outputSource.getEncoding() != null)
- {
- writer = new OutputStreamWriter(os, Charset.forName(outputSource.getEncoding()));
- }
- else
- {
- writer = new OutputStreamWriter(os, Charset.forName("UTF-8"));
- }
- }
- catch (FileNotFoundException fnf)
- {
- throw new IllegalArgumentException("outputSource", fnf);
- }
- }
- else
- throw new IllegalArgumentException("outputSource");
- return writer;
- }
-
- private static void copyTargetHeaderComments(Message headerMessage, PoTargetHeader poTargetHeader)
- {
- for (String s : poTargetHeader.getComment().split("\n"))
- {
- headerMessage.addComment(s);
- }
- }
-
- static void setDefaultHeaderFields(HeaderFields hf)
- {
- hf.setValue("MIME-Version", "1.0");
- hf.setValue("Content-Type", "text/plain; charset=UTF-8");
- hf.setValue("Content-Transfer-Encoding", "8bit");
- }
-
- static void copyToHeaderFields(HeaderFields hf, final List entries)
- {
- for (HeaderEntry e : entries)
- {
- hf.setValue(e.getKey(), e.getValue());
- }
- }
-
- private static void copyToMessage(PotEntryHeader data, SimpleComment simpleComment, Message message)
- {
- if (data != null)
- {
- String context = data.getContext();
- if (context != null)
- message.setMsgctxt(context);
- for (String flag : data.getFlags())
- {
- message.addFormat(flag);
- }
- for (String ref : data.getReferences())
- {
- message.addSourceReference(ref);
- }
- }
- if (simpleComment != null)
- {
- String[] comments = StringUtils.splitPreserveAllTokens(simpleComment.getValue(), "\n");
- if (!(comments.length == 1 && comments[0].isEmpty()))
- {
- for (String comment : comments)
- {
- message.addExtractedComment(comment);
- }
- }
- }
- }
-
-}
diff --git a/client/zanata-adapter-po/src/test/java/org/zanata/adapter/po/PoReader2Test.java b/client/zanata-adapter-po/src/test/java/org/zanata/adapter/po/PoReader2Test.java
deleted file mode 100644
index d7a8c3f60e..0000000000
--- a/client/zanata-adapter-po/src/test/java/org/zanata/adapter/po/PoReader2Test.java
+++ /dev/null
@@ -1,86 +0,0 @@
-package org.zanata.adapter.po;
-
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.Matchers.equalTo;
-import static org.hamcrest.Matchers.is;
-import static org.hamcrest.Matchers.notNullValue;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.StringWriter;
-import java.util.List;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Marshaller;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.annotations.Test;
-import org.xml.sax.InputSource;
-import org.zanata.common.LocaleId;
-import org.zanata.rest.dto.resource.Resource;
-import org.zanata.rest.dto.resource.TextFlow;
-import org.zanata.rest.dto.resource.TextFlowTarget;
-import org.zanata.rest.dto.resource.TranslationsResource;
-
-@Test(groups = { "unit-tests" })
-public class PoReader2Test
-{
-
- private static final Logger log = LoggerFactory.getLogger(PoReader2Test.class);
-
- LocaleId ja = new LocaleId("ja-JP");
-
- @Test
- public void extractTemplateThenAdd2Targets() throws IOException, JAXBException
- {
- String testDir = "src/test/resources/";
-
-
- InputSource inputSource = new InputSource(new File(testDir, "pot/RPM.pot").toURI().toString());
- inputSource.setEncoding("utf8");
-
- PoReader2 poReader = new PoReader2();
-
- System.out.println("parsing template");
- Resource doc = poReader.extractTemplate(inputSource, LocaleId.EN_US, "doc1");
- assertThat(doc.getTextFlows().size(), is(137));
- String locale = "ja-JP";
- inputSource = new InputSource(new File(testDir, locale + "/RPM.po").toURI().toString());
- inputSource.setEncoding("utf8");
- System.out.println("extracting target: " + locale);
- TranslationsResource targetDoc = poReader.extractTarget(inputSource, doc, false);
- List textFlowTargets = targetDoc.getTextFlowTargets();
- assertThat(textFlowTargets.size(), is(137));
- TextFlowTarget target = textFlowTargets.iterator().next();
- assertThat(target, notNullValue());
-
- JAXBContext jaxbContext = JAXBContext.newInstance(Resource.class, TranslationsResource.class);
- Marshaller m = jaxbContext.createMarshaller();
- m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
-
- System.out.println("marshalling source doc");
- {
- StringWriter writer = new StringWriter();
- m.marshal(doc, writer);
- log.debug("{}", writer);
- }
-
- System.out.println("marshalling target doc");
- {
- StringWriter writer = new StringWriter();
- m.marshal(targetDoc, writer);
- log.debug("{}", writer);
- }
-
- List resources = doc.getTextFlows();
-
- TextFlow tf1 = resources.get(3);
- assertThat(tf1.getContent(), equalTo("Important"));
- TextFlowTarget tfTarget = textFlowTargets.get(3);
- assertThat(tfTarget.getContent(), equalTo("キーのインポート"));
-
- // TODO test PO headers and attributes
- }
-}
diff --git a/client/zanata-adapter-po/src/test/resources/ja-JP/RPM.po b/client/zanata-adapter-po/src/test/resources/ja-JP/RPM.po
deleted file mode 100644
index 9625fcceff..0000000000
--- a/client/zanata-adapter-po/src/test/resources/ja-JP/RPM.po
+++ /dev/null
@@ -1,2152 +0,0 @@
-# translation of RPM.po to Traditional Chinese
-# translation of rpm.po to
-# Copyright (C) 2003,2004, 2006, 2007 Free Software Foundation, Inc.
-#
-# Noriko Mizumoto , 2003,2004, 2006.
-# Chester Cheng , 2007.
-msgid ""
-msgstr ""
-"Project-Id-Version: RPM\n"
-"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
-"POT-Creation-Date: 2010-03-18T07:41:00\n"
-"PO-Revision-Date: 2007-07-11 12:35+1000\n"
-"Last-Translator: Chester Cheng \n"
-"Language-Team: Traditional Chinese \n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Generator: KBabel 1.11.4\n"
-
-#. Tag: title
-#, no-c-format
-msgid "RPM"
-msgstr ""
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"The RPM Package Manager (RPM) is an open packaging "
-"system, which runs on &MAJOR_OS; as well as other Linux and UNIX systems. "
-"Red Hat, Inc. and the Fedora Project encourage other vendors to use RPM for "
-"their own products. RPM is distributed under the terms of the "
-"GPL (GNU General Public License"
-"firstterm>)."
-msgstr ""
-"RPM Package Manager(RPM)は、誰もが利用できるオープン パッケージングシステム"
-"で、&PROD;だけでなく他のLinuxや UNIXシステム上でも動作します。 &FORMAL-RHI;で"
-"は、他のメーカーにも RPM を自社製品に使用して頂くよう奨励しています。 RPM は"
-"GPL契約 に基づいて配布されます。"
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"The RPM Package Manager only works with packages built to work with the "
-"RPM format . RPM is itself provided as a pre-installed "
-"rpm package. For the end user, RPM makes system updates easy. Installing, "
-"uninstalling and upgrading RPM packages can be accomplished with short "
-"commands. RPM maintains a database of installed packages and their files, so "
-"you can invoke powerful queries and verifications on your system. If you "
-"prefer a graphical interface, you can use the PackageKit"
-"application> GUI to perform many RPM commands. Refer to for details."
-msgstr ""
-"エンドユーザーは、RPMによりシステムを簡単に更新することができます。RPMパッ"
-"ケージのインストール、アンインストール、アップグレードは短いコマンドで実行で"
-"きます。RPM は インストールされているパッケージやそのファイル群に関する デー"
-"タベースを維持しているので、システムで強力な問い合わせ/ 検証を実行することが"
-"できます。グラフィカルインターフェイス で使用したい場合は、"
-"&RHRPMTOOL; を使用して多くのRPM コマンドを実行する"
-"ことができます。 詳細はを参照してくださ"
-"い。"
-
-# EXACT MATCH
-#. Tag: title
-#, fuzzy, no-c-format
-msgid "Important"
-msgstr "キーのインポート"
-
-#. Tag: para
-#, no-c-format
-msgid ""
-"When installing a package, ensure it is compatible with your operating "
-"system and processor architecture. This can usually be determined by "
-"checking the package name. Many of the following examples show RPM packages "
-"compiled for the AMD64/Intel 64 computer architectures; thus, the RPM file "
-"name ends in x86_64.rpm ."
-msgstr ""
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"During upgrades, RPM handles configuration files carefully, so that you "
-"never lose your customizations—something that you cannot accomplish with "
-"regular .tar.gz files."
-msgstr ""
-"アップグレード時に、RPM は設定ファイルを慎重に処理するため カスタマイズ情報が"
-"失われることはありません — 普通の.tar.gz"
-"filename>ファイルなどを使用した場合は、このような機能を実現することができませ"
-"ん。"
-
-# EXACT MATCH
-#. Tag: para
-#, no-c-format
-msgid ""
-"For the developer, RPM allows you to take software source code and package "
-"it into source and binary packages for end users. This process is quite "
-"simple and is driven from a single file and optional patches that you "
-"create. This clear delineation between pristine "
-"sources and your patches along with build instructions eases the maintenance "
-"of the package as new versions of the software are released."
-msgstr ""
-"開発者にとっては、RPM を使用することにより、ソフトウェアのソースコード を取り"
-"出し、 エンドユーザー用にソースとバイナリパッケージにパッケージ化することがで"
-"きます。このプロセスは極めて単純で、ひとつのファイルと作成するオプションの"
-"パッチから操作することができます。 ビルトの指示に加えて純粋な"
-"firstterm>ソースとパッチの明確な 違いが、ソフトウェアの新しいバージョンがリ"
-"リースされたときにパッケージの管理を 容易にします。"
-
-# EXACT MATCH
-#. Tag: title
-#, no-c-format
-msgid "Note"
-msgstr "注記"
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"Because RPM makes changes to your system, you must be logged in as root to "
-"install, remove, or upgrade an RPM package."
-msgstr ""
-"RPM はシステムに変更を加えるため、RPM パッケージの インストール、削除、アップ"
-"グレードを行なうには、rootになる必要があります。"
-
-# EXACT MATCH
-#. Tag: title
-#, no-c-format
-msgid "RPM Design Goals"
-msgstr "RPM の設計目標"
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"To understand how to use RPM, it can be helpful to understand the design "
-"goals of RPM:"
-msgstr ""
-"RPM の使用方法を理解するためには、RPM の設計目標を理解する とわかりやすいで"
-"しょう。"
-
-# EXACT MATCH
-#. Tag: term
-#, no-c-format
-msgid "Upgradability"
-msgstr "アップグレードの可能性"
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"With RPM, you can upgrade individual components of your system without "
-"completely reinstalling. When you get a new release of an operating system "
-"based on RPM, such as &MAJOR_OS;, you do not need to reinstall a fresh copy "
-"of the operating system your machine (as you might need to with operating "
-"systems based on other packaging systems). RPM allows intelligent, fully-"
-"automated, in-place upgrades of your system. In addition, configuration "
-"files in packages are preserved across upgrades, so you do not lose your "
-"customizations. There are no special upgrade files needed to upgrade a "
-"package because the same RPM file is used to both install and upgrade the "
-"package on your system."
-msgstr ""
-"RPMを使用すれば、コンポーネントを完全に再インストールすることなく、個別にコン"
-"ポーネントをアップグレードすることができます。RPMベースのオペレーティングシス"
-"テム(&PROD;など)の新しいリリースを入手したときに、マシンに再インストールする"
-"必要がありません(他のパッケージングシステムに基づくオペレーティングシステムの"
-"場合はその必要があります)。RPMを使用すれば、完全自動化された適切なシステムの"
-"アップグレードをスマートに行うことができます。パッケージに含まれる設定ファイ"
-"ルはアップグレード後にも保持されるので、 カスタマイズ情報が失われることはあり"
-"ません。同じRPM ファイルがシステムでのパッケージのインストール及びアップグ"
-"レードに 使用されるため、 パッケージをアップグレードするために特別なアップ グ"
-"レードファイルが必要になる ことはありません。"
-
-# EXACT MATCH
-#. Tag: term
-#, no-c-format
-msgid "Powerful Querying"
-msgstr "強力な問い合わせ"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"RPM is designed to provide powerful querying options. You can perform "
-"searches on your entire database for packages or even just certain files. "
-"You can also easily find out what package a file belongs to and from where "
-"the package came. The files an RPM package contains are in a compressed "
-"archive, with a custom binary header containing useful information about the "
-"package and its contents, allowing you to query individual packages quickly "
-"and easily."
-msgstr ""
-"RPM では、強力な問い合わせオプションが提供されて います。データベース全体を通"
-"じてパッケージを検索したり、 特定のファイル群のみを検索したりすることができま"
-"す。 あるファイルがどのパッケージに属し、パッケージがどこから 来たのかをも簡"
-"単に検索することができます。RPM パッケージ に含まれるファイルは圧縮アーカイブ"
-"形式であり、パッケージと その内容に関する有用な情報を含むカスタムバイナリヘッ"
-"ダーが 付いているため、個別のパッケージをすばやく簡単に問い合わせ することが"
-"できます。"
-
-# EXACT MATCH
-#. Tag: term
-#, no-c-format
-msgid "System Verification"
-msgstr "システムの検証"
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"Another powerful RPM feature is the ability to verify packages. If you are "
-"worried that you deleted an important file for some package, you can verify "
-"the package. You are then notified of anomalies, if any—at which point you "
-"can reinstall the package, if necessary. Any configuration files that you "
-"modified are preserved during reinstallation."
-msgstr ""
-"もう1つの強力な特徴は、パッケージの検証機能です。 あるパッケージの重要ファイ"
-"ルを削除してしまった恐れがある場合は、パッケージを検証します。何か異常があれ"
-"ば通知されます。その時点で、必要であればそのパッケージを再インストールするこ"
-"とができます。 再インストールを行っても、修正した設定ファイルは保持されます。"
-
-# EXACT MATCH
-#. Tag: term
-#, no-c-format
-msgid "Pristine Sources"
-msgstr "純粋なソース"
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"A crucial design goal was to allow the use of pristine "
-"software sources, as distributed by the original authors of the software. "
-"With RPM, you have the pristine sources along with any patches that were "
-"used, plus complete build instructions. This is an important advantage for "
-"several reasons. For instance, if a new version of a program is released, "
-"you do not necessarily have to start from scratch to get it to compile. You "
-"can look at the patch to see what you might need to do. "
-"All the compiled-in defaults, and all of the changes that were made to get "
-"the software to build properly, are easily visible using this technique."
-msgstr ""
-"最終的な設計目標は、ソフトウェアのオリジナル作者によって配布されたときのまま"
-"の「純粋な」ソフトウェアソースをユーザーが利用できるようにすることでした。RPM"
-"を使用した場合、純粋なソースと適用済みのパッチ、完全なビルド命令群が入手でき"
-"ます。いくつかの理由から、これは大きなメリットとなります。たとえば、あるプロ"
-"グラムの新しいバージョンがリリースされた場合、それをコンパイルするために必ず"
-"しも最初から作業を始める必要はなくなります。パッチを見て、必要になる"
-"かもしれない 作業を確かめることができます。この技術を使え"
-"ば、組み込み済みのすべてのデフォルト設定と、ソフトウェアを適切に構築するため"
-"に行われたすべての変更内容が、容易に目に見えるようになります。"
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"The goal of keeping sources pristine may seem important only for developers, "
-"but it results in higher quality software for end users, too."
-msgstr ""
-"ソースを純粋な状態に保持するという目標は、開発者にとってのみ重要なことのよう"
-"に思われるかもしれませんが、結果として、エンドユーザーにより高品質のソフト"
-"ウェアが 提供されることにもなります。"
-
-# EXACT MATCH
-#. Tag: title
-#, no-c-format
-msgid "Using RPM"
-msgstr "RPMの使用法"
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"RPM has five basic modes of operation (not counting package building): "
-"installing, uninstalling, upgrading, querying, and verifying. This section "
-"contains an overview of each mode. For complete details and options, try "
-"rpm --help or man rpm . You can also "
-"refer to for more "
-"information on RPM."
-msgstr ""
-"RPMには、次の5つの基本的作動モードがあります(パッケージの構築はカウントしませ"
-"ん)。インストール、アンインストール、アップグレード、照会、検証の5つです。こ"
-"のセクションでは、各モードの概要を説明します。詳細な説明やオプションについて"
-"はrpm --help をご覧ください。RPMの詳細については を参照してください。"
-
-# EXACT MATCH
-#. Tag: title
-#, no-c-format
-msgid "Finding RPM Packages"
-msgstr "RPM パッケージの検索"
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"Before using any RPM packages, you must know where to find them. An Internet "
-"search returns many RPM repositories, but if you are looking for RPM "
-"packages built by the Fedora Project, they can be found at the following "
-"locations:"
-msgstr ""
-"RPMを使用する前に、RPMがある場所を知っておかねばなりません。 インターネット検"
-"索では数多くのRPMレポジトリを返してきますが、 &RHI;が製作したRPMパッケージを"
-"探している場合は、次の場所にあります。"
-
-#. Tag: para
-#, no-c-format
-msgid "The &MAJOR_OS; installation media contain many installable RPMs."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid ""
-"The initial RPM repositories provided with the YUM package manager. Refer to "
-" for details on how to use the official "
-"&MAJOR_OS; package repositories."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid ""
-"Unofficial, third-party repositories not affiliated with the Fedora Project "
-"also provide RPM packages."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid ""
-"When considering third-party repositories for use with your &MAJOR_OS; "
-"system, pay close attention to the repository's web site with regard to "
-"package compatibility before adding the repository as a package source. "
-"Alternate package repositories may offer different, incompatible versions of "
-"the same software, including packages already included in the Fedora "
-"repositories."
-msgstr ""
-
-# EXACT MATCH
-#. Tag: title
-#, no-c-format
-msgid "Installing"
-msgstr "インストール"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"RPM packages typically have file names like tree-1.5.2.2-4.fc12."
-"x86_64.rpm . The file name includes the package name "
-"(tree ), version (1.5.2.2 ), release "
-"(4 ), operating system major version (fc12"
-"filename>) and CPU architecture (x86_64 ). Assuming the "
-"tree-1.5.2.2-4.fc12.x86_64.rpm package is in the "
-"current directory, log in as root and type the following command at a shell "
-"prompt to install it:"
-msgstr ""
-"RPM パッケージには概してfoo-1.0-1.i386.rpm "
-"filename>というようなファイル名が付けられています。 このファイル名は、パッ"
-"ケージ名(foo )、バージョン(1.0 )、 リリース(1"
-"filename>)、アーキテクチャ (i386 )で構"
-"成されています。パッケージをインストールするには、rootでログインし、シェルプ"
-"ロンプトで以下のコマンドを入力します。"
-
-#. Tag: para
-#, no-c-format
-msgid ""
-"The -i option tells rpm to install the "
-"package, and the v and h options, while "
-"aren't strictly necessary, increase output information and display a "
-"progress meter, respectively."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid ""
-"Alternatively, you can use the -U option, which "
-"upgrades the package if an older version is already "
-"installed, or simply installs it if not:"
-msgstr ""
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid "If the installation is successful, the following output is displayed:"
-msgstr "インストールが正常に終了すると、以下のような出力が表示されます。"
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"As you can see, RPM prints out the name of the package and then prints a "
-"succession of hash marks as a progress meter while the package is installed."
-msgstr ""
-"RPM はパッケージ名を出力し、 パッケージのインストー"
-"ル状況をシャープ記号を使って 表示します。"
-
-# EXACT MATCH
-#. Tag: para
-#, no-c-format
-msgid ""
-"The signature of a package is checked automatically when installing or "
-"upgrading a package. The signature confirms that the package was signed by "
-"an authorized party. For example, if the verification of the signature "
-"fails, an error message such as the following is displayed:"
-msgstr ""
-"パッケージの署名は、パッケージのインストールまたはアップグレード時に自動的に"
-"チェックされます。署名により、パッケージが認証機関によって署名されたことを確"
-"認できます。たとえば、署名の検証が失敗すると、次のようなエラーメッセージが表"
-"示されます。"
-
-# EXACT MATCH
-#. Tag: para
-#, no-c-format
-msgid ""
-"If it is a new, header-only, signature, an error message such as the "
-"following is displayed:"
-msgstr "ヘッダのみの新しい署名なら、次のようなエラーメッセージが表示されます。"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"If you do not have the appropriate key installed to verify the signature, "
-"the message contains the word NOKEY :"
-msgstr ""
-"署名を検証するための適切なキーをインストールしていない場合は、 メッセージは以"
-"下のようなNOKEY という単語"
-"を含みます。"
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"Refer to for more information on "
-"checking a package's signature."
-msgstr ""
-"パッケージ署名のチェックに関する詳細情報は、 で参照してください。"
-
-# EXACT MATCH
-#. Tag: title
-#, no-c-format
-msgid "Warning"
-msgstr "警告"
-
-#. Tag: para
-#, no-c-format
-msgid ""
-"If you are installing a kernel package, you should always use the "
-"rpm -ivh command (simple install) instead of rpm "
-"-Uvh . The reason for this is that install "
-"(-i ) and upgrade (-U ) "
-"take on specific meanings when installing kernel packages. Refer to for details."
-msgstr ""
-
-# EXACT MATCH
-#. Tag: title
-#, no-c-format
-msgid "Package Already Installed"
-msgstr "すでにインストールされているパッケージ"
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"If a package of the same name and version is already installed, the "
-"following output is displayed:"
-msgstr ""
-"同じバージョンのパッケージがすでにインストールされている場合は、 以下のメッ"
-"セージが表示されます。"
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"However, if you want to install the package anyway, you can use the "
-"--replacepkgs option, which tells RPM to ignore the error:"
-msgstr ""
-"インストールしようとしているものと同じバージョンがすでにインストールされてい"
-"るが、とにかくパッケージをインストールするには、--replacepkgs"
-"command>オプションを使用します。このオプションはRPMにエラーを無視するよう指示"
-"します。"
-
-# EXACT MATCH
-#. Tag: para
-#, no-c-format
-msgid ""
-"This option is helpful if files installed from the RPM were deleted or if "
-"you want the original configuration files from the RPM to be installed."
-msgstr ""
-"このオプションは、RPM からインストールされた ファイルが削除された場合や、RPM "
-"からオリジナルの 設定ファイルをインストールしたい場合に便利です。"
-
-# EXACT MATCH
-#. Tag: title
-#, no-c-format
-msgid "Conflicting Files"
-msgstr "ファイルの競合"
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"If you attempt to install a package that contains a file which has already "
-"been installed by another package, the following is displayed:"
-msgstr ""
-"別のパッケージや同じパッケージの旧バージョンによってすでにインストールされて"
-"いる ファイルを含むパッケージをインストールしようとすると、 以下のメッセージ"
-"が表示されます。"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"To make RPM ignore this error, use the --replacefiles "
-"option:"
-msgstr ""
-"RPM にこのエラーを無視するよう指示するには、 --"
-"replacefiles オプションを 使用します。"
-
-# EXACT MATCH
-#. Tag: title
-#, no-c-format
-msgid "Unresolved Dependency"
-msgstr "未解決の依存"
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"RPM packages may sometimes depend on other packages, which means that they "
-"require other packages to be installed to run properly. If you try to "
-"install a package which has an unresolved dependency, output similar to the "
-"following is displayed:"
-msgstr ""
-"RPMパッケージは他のパッケージに依存する ことがありま"
-"す。つまり、正しく動作するために他のパッケージのインストールが必要な場合があ"
-"ります。未解決の依存関係を持つパッケージをインストールしようとすると、以下の"
-"ような出力が表示されます。"
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"If you are installing a package from the &MAJOR_OS; installation media, such "
-"as from a CD-ROM or DVD, it usually suggests the package or packages needed "
-"to resolve the dependency. Find the suggested package(s) on the &MAJOR_OS; "
-"installation media or on one of the active &MAJOR_OS; mirrors ( ) and add it to the "
-"command:"
-msgstr ""
-"&PROD;のCD-ROMセットからパッケージをインストールしている場合は、通常、依存関"
-"係を解決するために必要なパッケージが示されます。このパッケージを &PROD; CD-"
-"ROM、または、&RH; FTP サイト(またはミラー)から見つけて、それを次のようにコマ"
-"ンドに追加します。"
-
-# EXACT MATCH
-#. Tag: para
-#, no-c-format
-msgid ""
-"If installation of both packages is successful, output similar to the "
-"following is displayed:"
-msgstr ""
-"両方のパッケージのインストールが正常に行なわれると、以下のような出力が表示さ"
-"れます。"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"If it does not suggest a package to resolve the dependency, you can try the "
-"--whatprovides option to determine which package contains "
-"the required file."
-msgstr ""
-"プログラムが依存関係を解決するパッケージを提示してこない場合は、--"
-"redhatprovides オプションでどのパッケージが必要なファイルを含んでい"
-"るか判定してみることができます。このオプションを実行するには、rpmdb-redhat パッケージをインストールしている必"
-"要があります。"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"If the package that contains bar.so.3 is in the RPM "
-"database, the name of the package is displayed:"
-msgstr ""
-"bar.so.2 を含むパッケージが rpmdb-redhat パッケージからの インストール済み"
-"データベースにある場合、その パッケージ名が表示されます。"
-
-#. Tag: title
-#, no-c-format
-msgid "Warning: Forcing Package Installation"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid ""
-"Although we can force rpm to install "
-"a package that gives us a Failed dependencies"
-"computeroutput> error (using the --nodeps option), this is "
-"not recommended, and will usually result in the "
-"installed package failing to run. Installing or removing packages with "
-"rpm --nodeps can cause applications to misbehave and/or "
-"crash, and can cause serious package management problems or, possibly, "
-"system failure. For these reasons, it is best to heed such warnings; the "
-"package manager—whether RPM , Yum"
-"application> or PackageKit —shows us these "
-"warnings and suggests possible fixes because accounting for dependencies is "
-"critical. The Yum package manager can perform "
-"dependency resolution and fetch dependencies from online repositories, "
-"making it safer, easier and smarter than forcing rpm to "
-"carry out actions without regard to resolving dependencies."
-msgstr ""
-
-# EXACT MATCH
-#. Tag: title
-#, no-c-format
-msgid "Uninstalling"
-msgstr "アンインストール"
-
-# EXACT MATCH
-#. Tag: para
-#, no-c-format
-msgid ""
-"Uninstalling a package is just as simple as installing one. Type the "
-"following command at a shell prompt:"
-msgstr ""
-"パッケージのアンインストールは、インストールと 同様、簡単に実行できます。シェ"
-"ルプロンプトで以下の コマンドを入力します。"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"Notice that we used the package name foo"
-"filename>, not the name of the original package file , "
-"foo-1.0-1.fc12.x86_64 . If you attempt to uninstall a "
-"package using the rpm -e command and the original full "
-"file name, you will receive a package name error."
-msgstr ""
-"使用したのは、パッケージの名前 である foo であって、オリジナルパッケージのファイル"
-"emphasis>名、 foo-1.0-1.i386.rpm では"
-"ないことに注意してください。 パッケージをアンインストールするには、foo に 実際のオリジナルパッケージのパッケージ名を"
-"入れます。"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"You can encounter dependency errors when uninstalling a package if another "
-"installed package depends on the one you are trying to remove. For example:"
-msgstr ""
-"削除しようとしているパッケージに別のインストール されているパッケージが依存し"
-"ている場合、アンインストール 時に依存関係エラーが発生することがあります。 た"
-"とえば、"
-
-#. Tag: para
-#, no-c-format
-msgid ""
-"Similar to how we searched for a shared object library (i.e. a "
-"<library_name> .so."
-"<number> file) in , we can search for a 64-bit shared "
-"object library using this exact syntax (and making sure to quote the file "
-"name):"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid ""
-"Although we can force rpm to remove "
-"a package that gives us a Failed dependencies"
-"computeroutput> error (using the --nodeps option), this is "
-"not recommended, and may cause harm to other installed "
-"applications. Installing or removing packages with rpm --nodeps"
-"command> can cause applications to misbehave and/or crash, and can cause "
-"serious package management problems or, possibly, system failure. For these "
-"reasons, it is best to heed such warnings; the package manager—whether "
-"RPM , Yum or "
-"PackageKit —shows us these warnings and suggests "
-"possible fixes because accounting for dependencies is critical. The "
-"Yum package manager can perform dependency "
-"resolution and fetch dependencies from online repositories, making it safer, "
-"easier and smarter than forcing rpm to carry out actions "
-"without regard to resolving dependencies."
-msgstr ""
-
-# EXACT MATCH
-#. Tag: title
-#, no-c-format
-msgid "Upgrading"
-msgstr "アップグレード"
-
-#. Tag: para
-#, no-c-format
-msgid ""
-"Upgrading a package (using the -U option) is similar to "
-"installing one (the -i option). If we have the RPM named "
-"tree-1.5.3.0-1.fc12.x86_64.rpm in our current "
-"directory, and tree-1.5.2.2-4.fc12.x86_64.rpm is "
-"already installed on our system (rpm -qi will tell us "
-"which version of the tree package we have installed on "
-"our system, if any), then the following command will upgrade tree to the "
-"newer version:"
-msgstr ""
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"As part of upgrading a package, RPM automatically uninstalls any old "
-"versions of the foo package. Note that -U"
-"option> will also install a package even when there are no previous versions "
-"of the package installed."
-msgstr ""
-"パッケージアップグレードの一部として、RPM は自動的に foo パッケージの旧バージョンをすべてアンインストールしま"
-"す。実際には、以前にどのバージョンのパッケージもインストールしたことがなくて"
-"もこのオプションは機能するため、パッケージのインストールには常に -U"
-"option> を使用するのを好む人もいます。"
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"It is not advisable to use the -U option for installing "
-"kernel packages because RPM completely replaces the previous kernel package. "
-"This does not affect a running system, but if the new kernel is unable to "
-"boot during your next restart, there would be no other kernel to boot "
-"instead."
-msgstr ""
-"カーネルパッケージのインストールには-U を使わない方がいいで"
-"しょう。RPMは旧カーネルパッケージを置換してしまいます。システムの実行には影響"
-"しませんが、新しいカーネルで再起動時にブートできない場合、代りにブートする"
-"カーネルがなくなります。"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"Using the -i option adds the kernel to your GRUB boot menu "
-"(/etc/grub.conf ). Similarly, removing an old, unneeded "
-"kernel removes the kernel from GRUB."
-msgstr ""
-"-i オプションを使用するとそのカーネルがGRUBブートメニューに追"
-"加されます(/etc/grub.conf )。同様に、必"
-"要のなくなった古いカーネルを削除するとGRUBからそのカーネルが削除されます。"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"Because RPM performs intelligent upgrading of packages with configuration "
-"files, you may see one or the other of the following messages:"
-msgstr ""
-"RPMは設定ファイルを使用したパッケージのインテリジェントなアップグレードを行う"
-"ので、以下のようなメッセージが表示されることもあります。"
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"This message means that changes you made to the configuration file may not "
-"be forward-compatible with the new configuration file "
-"in the package, so RPM saved your original file and installed a new one. You "
-"should investigate the differences between the two configuration files and "
-"resolve them as soon as possible, to ensure that your system continues to "
-"function properly."
-msgstr ""
-"このメッセージは、設定ファイルに加えられた変更がパッケージ内の新しい設定ファ"
-"イルと前方互換 がない可能性があるため、RPMは元のファイ"
-"ルを保存したまま新しいファイルをインストールしたという意味です。できる限り早"
-"期に、この2つのファイルの違いを調査して解決し、引き続きシステムが正しく動作す"
-"るようにしてください。"
-
-#. Tag: para
-#, no-c-format
-msgid ""
-"Alternatively, RPM may save the package's new "
-"configuration file as, for example, foo.conf.rpmnew , "
-"and leave the configuration file you modified untouched. You should still "
-"resolve any conflicts between your modified configuration file and the new "
-"one, usually by merging changes from the old one to the new one with a "
-"diff program."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid ""
-"If you attempt to upgrade to a package with an older "
-"version number (that is, if a higher version of the package is already "
-"installed), the output is similar to the following:"
-msgstr ""
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"To force RPM to upgrade anyway, use the --oldpackage "
-"option:"
-msgstr ""
-"RPMにアップグレードを強行させるには、--"
-"oldpackage オプションを使用します。"
-
-# EXACT MATCH
-#. Tag: title
-#, no-c-format
-msgid "Freshening"
-msgstr "freshenの実行"
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"Freshening is similar to upgrading, except that only existent packages are "
-"upgraded. Type the following command at a shell prompt:"
-msgstr ""
-"パッケージへのfreshenの実行はアップグレード と似ています。シェルプロンプトで"
-"以下のコマンドを入力 します。"
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"RPM's freshen option checks the versions of the packages specified on the "
-"command line against the versions of packages that have already been "
-"installed on your system. When a newer version of an already-installed "
-"package is processed by RPM's freshen option, it is upgraded to the newer "
-"version. However, RPM's freshen option does not install a package if no "
-"previously-installed package of the same name exists. This differs from "
-"RPM's upgrade option, as an upgrade does install "
-"packages whether or not an older version of the package was already "
-"installed."
-msgstr ""
-"RPM のfreshenオプションにより、コマンドラインで 指定されたパッケージのバー"
-"ジョンと、すでにシステムに インストールされているパッケージのバージョンが照"
-"合 されます。インストールされているパッケージよりも 新しいバージョンのパッ"
-"ケージに対してRPM のfreshen オプションが実行されると、そのパッケージは新しい "
-"バージョンへアップグレードされます。ただし、同じ名前 でインストールされている"
-"パッケージが存在しない場合は、 RPM のfreshenオプションによるパッケージのイン"
-"ストール は実行されません。この点が、RPM のアップグレード オプションと異なり"
-"ます。アップグレードでは、古い バージョンのパッケージがインストールされている"
-"か どうかに関係なくパッケージが必ず インストールされま"
-"す。"
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"Freshening works for single packages or package groups. If you have just "
-"downloaded a large number of different packages, and you only want to "
-"upgrade those packages that are already installed on your system, freshening "
-"does the job. Thus, you do not have to delete any unwanted packages from the "
-"group that you downloaded before using RPM."
-msgstr ""
-"RPMのfreshenオプションは、単一のパッケージに対しても複数のパッケージに対して"
-"も使用できます。多数の異なるパッケージをダウンロードした後で、システムにイン"
-"ストールされているパッケージのみをアップグレードしたい場合に、freshenが役に立"
-"ちます。freshenを使用する場合、RPMを使う前にダウンロードしたグループ中から不"
-"要なパッケージを削除する必要はありません。"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"In this case, issue the following with the *.rpm glob:"
-msgstr "この場合、以下のコマンドを発行します。"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"RPM then automatically upgrades only those packages that are already "
-"installed."
-msgstr ""
-"RPMはすでにインストールされているパッケージのみ自動的にアップグレードします。"
-
-# EXACT MATCH
-#. Tag: title
-#, no-c-format
-msgid "Querying"
-msgstr "問い合わせ"
-
-#. Tag: para
-#, no-c-format
-msgid ""
-"The RPM database stores information about all RPM packages installed in your "
-"system. It is stored in the directory /var/lib/rpm/ , "
-"and is used to query what packages are installed, what versions each package "
-"is, and to calculate any changes to any files in the package since "
-"installation, among other use cases."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid ""
-"To query this database, use the -q option. The "
-"rpm -q package name command "
-"displays the package name, version, and release number of the installed "
-"package <package_name> . For example, using "
-"rpm -q tree to query installed package tree"
-"filename> might generate the following output:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid ""
-"You can also use the following Package Selection Options"
-"emphasis> (which is a subheading in the RPM man page: see man rpm"
-"command> for details) to further refine or qualify your query:"
-msgstr ""
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid "-a — queries all currently installed packages."
-msgstr ""
-"-a コマンドは、現時点で インストールされ"
-"ているすべてのパッケージの 問い合わせを実行します。"
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"-f <file_name> "
-"filename> — queries the RPM database for which package owns "
-"<file_name> . Specify "
-"the absolute path of the file (for example, rpm -qf /bin/"
-"ls instead of rpm -qf ls )."
-msgstr ""
-"-f <"
-"file> は、<file> の持ち主であるパッケー"
-"ジを問い合わせします。ファイルを指定するときは、そのファイルのフルパスを指定"
-"する必要があります (例、/bin/ls )。"
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"-p <package_file> "
-"filename> — queries the uninstalled package "
-"<package_file> ."
-msgstr ""
-"-p <"
-"packagefile> は、<packagefile> パッケージ"
-"の問い合わせを実行 します。"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"There are a number of ways to specify what information to display about "
-"queried packages. The following options are used to select the type of "
-"information for which you are searching. These are called the "
-"Package Query Options ."
-msgstr ""
-"問い合わせを行なったパッケージに関して表示する情報を指定する方法がたくさんあ"
-"ります。検索を行う情報のタイプを選択するには、以下のオプションを使用します。"
-"これらのオプションを情報選択オプション と 呼びます。"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"-i displays package information including name, "
-"description, release, size, build date, install date, vendor, and other "
-"miscellaneous information."
-msgstr ""
-"-i コマンドは、 パッケージ名、説明、リ"
-"リース、サイズ、構築日、 インストール日、ベンダーなど多様なパッケージ情報を "
-"表示します。"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"-l displays the list of files that the package contains."
-msgstr ""
-"-l コマンドは、 パッケージに含まれるファ"
-"イルの一覧を表示します。"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"-s displays the state of all the files in the package."
-msgstr ""
-"-s コマンドは、 パッケージに含まれるすべ"
-"てのファイルの状態を表示します。"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"-d displays a list of files marked as documentation (man "
-"pages, info pages, READMEs, etc.) in the package."
-msgstr ""
-"-d コマンドは、 ドキュメント(manページ、"
-"infoページ、READMEなど)として マークが付けられたファイルの一覧を表示します。"
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"-c displays a list of files marked as configuration "
-"files. These are the files you edit after installation to adapt and "
-"customize the package to your system (for example, sendmail.cf"
-"filename>, passwd , inittab , etc.)."
-msgstr ""
-"-c は、 設定ファイルとしてマークが付けら"
-"れたファイルの一覧を 表示します。これは、パッケージをシステムに適合させる た"
-"めに、ユーザーがインストール後に変更を加えるファイル です(例、sendmail.cf 、 passwd 、inittab など)。"
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"For options that display lists of files, add -v to the "
-"command to display the lists in a familiar ls -l format."
-msgstr ""
-"ファイルの一覧を表示するオプションについては、コマンドに-v を追加して、その一覧を使い慣れたls -l 形式で表示します。"
-
-# EXACT MATCH
-#. Tag: title
-#, no-c-format
-msgid "Verifying"
-msgstr "検証"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"Verifying a package compares information about files installed from a "
-"package with the same information from the original package. Among other "
-"things, verifying compares the file size, MD5 sum, permissions, type, owner, "
-"and group of each file."
-msgstr ""
-"パッケージの検証では、パッケージからインストール されたファイルに関する情報"
-"と、元のパッケージに含まれる ファイルに関する情報が同一かどうか調べます。 検"
-"証により、各ファイルのサイズ、MD5チェックサム、 権限、タイプ、所有者、グルー"
-"プを始め、さまざまなこと が比較されます。"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"The command rpm -V verifies a package. You can use any of "
-"the Verify Options listed for querying to specify the "
-"packages you wish to verify. A simple use of verifying is rpm -V "
-"tree , which verifies that all the files in the tree"
-"command> package are as they were when they were originally installed. For "
-"example:"
-msgstr ""
-"コマンドrpm -V は、パッケージの検証を行い"
-"ます。問い合わせの説明で示したPackage Verify Options を使"
-"用して、検証したいパッケージを指定することができます。簡単な使用法としては"
-"rpm -V foo というものがあります。これを"
-"実行すると、foo パッケージに含まれるすべ"
-"てのファイルが、それがインストールされた ときの状態と同じであるかどうかが検証"
-"されます。 例えば、"
-
-# EXACT MATCH
-#. Tag: para
-#, no-c-format
-msgid "To verify a package containing a particular file:"
-msgstr "特定のファイルを含むパッケージを検証するには、"
-
-#. Tag: para
-#, no-c-format
-msgid ""
-"In this example, /usr/bin/tree is the absolute path to "
-"the file used to query a package."
-msgstr ""
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"To verify ALL installed packages throughout the system (which will take some "
-"time):"
-msgstr "インストールされているすべてのパッケージを 検証するには、"
-
-# EXACT MATCH
-#. Tag: para
-#, no-c-format
-msgid "To verify an installed package against an RPM package file:"
-msgstr ""
-"インストールされているパッケージと、 RPM パッケージファイルとを検証するには、"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"This command can be useful if you suspect that your RPM database is corrupt."
-msgstr ""
-"RPM データベースが破損した疑いがある場合に、 このコマンドが役立ちます。"
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"If everything verified properly, there is no output. If there are any "
-"discrepancies, they are displayed. The format of the output is a string of "
-"eight characters (a \"c \" denotes a "
-"configuration file) and then the file name. Each of the eight characters "
-"denotes the result of a comparison of one attribute of the file to the value "
-"of that attribute recorded in the RPM database. A single period "
-"(. ) means the test passed. The following "
-"characters denote specific discrepancies:"
-msgstr ""
-"すべてが正常に検証された場合は何も出力されません。 何らかの矛盾が見つかった場"
-"合はその内容が表示されます。 出力フォーマットは、8個の文字列(c は設定ファイルを示す)とファイル名です。 "
-"8個の各文字は、ファイルの1つの属性とRPM データベースに 記録されたその属性の値"
-"とを比較した結果を示します。1つのピリオド(."
-" )は、 テストに合格したことを示します。以下の文字はそれぞれ "
-"何らかのテストで不合格になったことを示しています。"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid "5 — MD5 checksum"
-msgstr ""
-"5 —MD5チェックサム"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid "S — file size"
-msgstr ""
-"S —ファイルサイズ"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid "L — symbolic link"
-msgstr ""
-"L —シンボリックリン"
-"ク"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid "T — file modification time"
-msgstr ""
-"T —ファイル修正時刻"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid "D — device"
-msgstr "D —デバイス"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid "U — user"
-msgstr "U —ユーザー"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid "G — group"
-msgstr "G —グループ"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"M — mode (includes permissions and file "
-"type)"
-msgstr ""
-"M —モード(権限とファ"
-"イルタイプを含む)"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"? — unreadable file (file permission "
-"errors, for example)"
-msgstr ""
-"M —モード(権限とファ"
-"イルタイプを含む)"
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"If you see any output, use your best judgment to determine if you should "
-"remove the package, reinstall it, or fix the problem in another way."
-msgstr ""
-"何らかが出力された場合は、パッケージを削除する のか、再インストールするのか、"
-"あるいは別の方法で問題 を修正するのかを熟慮の上判断してください。"
-
-#. Tag: title
-#, no-c-format
-msgid "Practical and Common Examples of RPM Usage"
-msgstr ""
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"RPM is a useful tool for both managing your system and diagnosing and fixing "
-"problems. The best way to make sense of all its options is to look at some "
-"examples."
-msgstr ""
-"RPMはシステムの管理や問題の診断及び修正に役に立つ ツールです。これらのすべて"
-"のオプションを理解する 最善の方法はいくつかの例を見ることでしょう。"
-
-# EXACT MATCH
-#. Tag: para
-#, no-c-format
-msgid ""
-"Perhaps you have deleted some files by accident, but you are not sure what "
-"you deleted. To verify your entire system and see what might be missing, you "
-"could try the following command:"
-msgstr ""
-"誤って何らかのファイルを削除してしまったものの、 何を削除したかわからないとし"
-"ます。 システム全体を検証して足りないものを調べるには、以下のコマンドを試すこ"
-"とができます。"
-
-# EXACT MATCH
-#. Tag: para
-#, no-c-format
-msgid ""
-"If some files are missing or appear to have been corrupted, you should "
-"probably either re-install the package or uninstall and then re-install the "
-"package."
-msgstr ""
-"足りないファイルがあるか、壊れているファイルが あるように見える場合は、おそら"
-"くパッケージを再インストールするか、いったんアンインストールして 再インストー"
-"ルする必要があります。"
-
-# EXACT MATCH
-#. Tag: para
-#, no-c-format
-msgid ""
-"At some point, you might see a file that you do not recognize. To find out "
-"which package owns it, enter:"
-msgstr ""
-"所属先のわからないファイルを見つけたとします。そのファイルが含まれるパッケー"
-"ジを検索するには、以下のように入力します。"
-
-# EXACT MATCH
-#. Tag: para
-#, no-c-format
-msgid "The output would look like the following:"
-msgstr "出力は以下のようになります。"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"We can combine the above two examples in the following scenario. Say you are "
-"having problems with /usr/bin/paste . You would like to "
-"verify the package that owns that program, but you do not know which package "
-"owns paste . Enter the following command,"
-msgstr ""
-"上記2つの例を組み合わせて、次のような方法を 考えることができます。/usr/bin/paste に問題があるとします。このプログ"
-"ラムが 含まれるパッケージを検証しようにも、paste "
-" がどのパッケージに含まれるかがわかりません。次のコマンドを入力しま"
-"す。"
-
-# EXACT MATCH
-#. Tag: para
-#, no-c-format
-msgid "and the appropriate package is verified."
-msgstr "該当するパッケージが検証されます。"
-
-# EXACT MATCH
-#. Tag: para
-#, no-c-format
-msgid ""
-"Do you want to find out more information about a particular program? You can "
-"try the following command to locate the documentation which came with the "
-"package that owns that program:"
-msgstr ""
-"特定のプログラムに関して詳細な情報が必要 なら、次のコマンドを入力して、そのプ"
-"ログラムの入った パッケージに付随するドキュメントを検索することが できます。"
-
-# EXACT MATCH
-#. Tag: para
-#, no-c-format
-msgid "The output would be similar to the following:"
-msgstr "出力は以下のようになります。"
-
-# EXACT MATCH
-#. Tag: para
-#, no-c-format
-msgid ""
-"You may find a new RPM, but you do not know what it does. To find "
-"information about it, use the following command:"
-msgstr ""
-"新しいRPM パッケージ が見つかったものの、それが何で"
-"あるかがわからないと します。それに関する情報を検索するには、以下のコマンド "
-"を使用します。"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"Perhaps you now want to see what files the crontabs RPM "
-"package installs. You would enter the following:"
-msgstr ""
-"RPMがインストールするcrontabs ファイル"
-"がどのようなものか見てみましょう。 次のように入力します。"
-
-# EXACT MATCH
-#. Tag: para
-#, no-c-format
-msgid "The output is similar to the following:"
-msgstr "出力は以下のようになります。"
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"These are just a few examples. As you use RPM, you may find more uses for it."
-msgstr ""
-"以上がいくつかの例です。使用するにつれて、たくさんのRPM の用途がわかってきま"
-"す。"
-
-# EXACT MATCH
-#. Tag: title
-#, no-c-format
-msgid "Additional Resources"
-msgstr "その他のリソース"
-
-# EXACT MATCH
-#. Tag: para
-#, no-c-format
-msgid ""
-"RPM is an extremely complex utility with many options and methods for "
-"querying, installing, upgrading, and removing packages. Refer to the "
-"following resources to learn more about RPM."
-msgstr ""
-"RPM は、パッケージの問い合わせ、インストール、アップグレード、 削除を実行する"
-"ためのたくさんのオプションや方法がある 非常に複雑なユーティリティです。RPM の"
-"詳細については、 以下のリソースを参照してください。"
-
-# EXACT MATCH
-#. Tag: title
-#, no-c-format
-msgid "Installed Documentation"
-msgstr "インストールされているドキュメント"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"rpm --help — This command displays a quick reference of "
-"RPM parameters."
-msgstr ""
-"rpm --help — このコマンドを実行す"
-"ると、RPM のパラメータの クイックリファレンスが表示されます。"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"man rpm — The RPM man page gives more detail about RPM "
-"parameters than the rpm --help command."
-msgstr ""
-"man rpm — RPM のmanページでは、"
-"rpm --help コマンドより更に詳細なRPMのパ"
-"ラメータに関する情報が提供されています。"
-
-# EXACT MATCH
-#. Tag: title
-#, no-c-format
-msgid "Useful Websites"
-msgstr "役に立つWebサイト"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"The RPM website — http://www.rpm.org/"
-"ulink>"
-msgstr ""
-"http://www.rpm.org/ —RPMの"
-"Webページ"
-
-#. Tag: para
-#, no-c-format
-msgid ""
-"The RPM mailing list can be subscribed to, and its archives read from, here "
-"— https://"
-"lists.rpm.org/mailman/listinfo/rpm-list "
-msgstr ""
-
-# EXACT MATCH
-#. Tag: title
-#, no-c-format
-msgid "Related Books"
-msgstr "関連書籍"
-
-#. Tag: term
-#, no-c-format
-msgid ""
-"Maximum RPM — "
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid ""
-"The Maximum RPM book, which you can read online or "
-"download in HTML or PDF, covers everything from general RPM usage to "
-"building your own RPMs to programming with rpmlib."
-msgstr ""
-
-#. Tag: term
-#, no-c-format
-msgid ""
-"Red Hat RPM Guide — "
-msgstr ""
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"The Red Hat RPM Guide by Eric Foster-Johnson is an "
-"excellent resource on all details of the RPM package format and the RPM "
-"package management utility."
-msgstr ""
-"&RH; RPM Guide Eric Foster-Johnson 著; Wiley, John & "
-"Sons, Incorporated — パッケージのインストールから、 RPMの構築まで、RPM"
-"の総合ガイドとなる書籍です。"
-
-# EXACT MATCH
-#~ msgid "Package Management with RPM"
-#~ msgstr "RPMによるパッケージ管理"
-
-# IGNORED
-#, fuzzy
-#~ msgid "Red Hat Package Manager"
-#~ msgstr "&RH; Package Manager"
-
-# EXACT MATCH
-#~ msgid "RPM "
-#~ msgstr "RPM "
-
-# EXACT MATCH
-#~ msgid "RPM "
-#~ msgstr "RPM "
-
-# EXACT MATCH
-#~ msgid "design goals"
-#~ msgstr "設計目標"
-
-# EXACT MATCH
-#~ msgid "using"
-#~ msgstr "使用法"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "The &RH; Errata Page available at http://www.redhat.com/apps/support/errata/ "
-#~ msgstr ""
-#~ "&RH; のエラータページは、http://www.redhat.com/apps/support/errata/ で ご覧くださ"
-#~ "い。"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "&RHN; — Refer to for more details "
-#~ "on &RHN;."
-#~ msgstr ""
-#~ "&RHN; — &RHN;に関する詳細については、 を参照してください。"
-
-# EXACT MATCH
-#~ msgid "installing"
-#~ msgstr "インストール"
-
-# EXACT MATCH
-#~ msgid "packages"
-#~ msgstr "パッケージ"
-
-# IGNORED
-#, fuzzy
-#~ msgid "rpm -ivh foo-1.0-1.i386.rpm "
-#~ msgstr ""
-#~ "-a コマンドは、現時点で インストールさ"
-#~ "れているすべてのパッケージの 問い合わせを実行します。"
-
-# IGNORED
-#, fuzzy
-#~ msgid "rpm -Uvh foo-1.0-1.i386.rpm "
-#~ msgstr ""
-#~ "-a コマンドは、現時点で インストールさ"
-#~ "れているすべてのパッケージの 問い合わせを実行します。"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "\n"
-#~ "Preparing... ########################################### "
-#~ "[100%] \n"
-#~ " 1:foo ########################################### "
-#~ "[100%] "
-#~ msgstr ""
-#~ "U —ユーザー"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "error: V3 DSA signature: BAD, key ID "
-#~ "0352860f "
-#~ msgstr ""
-#~ "D —デバイス"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "error: Header V3 DSA signature: BAD, "
-#~ "key ID 0352860f "
-#~ msgstr ""
-#~ "D —デバイス"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "warning: V3 DSA signature: NOKEY, key "
-#~ "ID 0352860f "
-#~ msgstr ""
-#~ "D —デバイス"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "If you are installing a kernel package, you should use rpm -ivh instead. Refer to for details."
-#~ msgstr ""
-#~ "カーネルパッケージをインストールしている場合は、 代わりにrpm -"
-#~ "ivh を使用する必要が あります。詳細はを参照して ください。"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "\n"
-#~ "Preparing... ########################################### "
-#~ "[100%] \n"
-#~ "package foo-1.0-1 is already installed "
-#~ msgstr ""
-#~ "U —ユーザー"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "rpm -ivh --replacepkgs foo-1.0-1.i386.rpm"
-#~ "command>"
-#~ msgstr ""
-#~ "-a コマンドは、現時点で インストールさ"
-#~ "れているすべてのパッケージの 問い合わせを実行します。"
-
-# EXACT MATCH
-#~ msgid "file conflicts"
-#~ msgstr "ファイルの競合"
-
-# EXACT MATCH
-#~ msgid "resolving"
-#~ msgstr "解決"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "\n"
-#~ "Preparing... ########################################### "
-#~ "[100%] \n"
-#~ "file /usr/bin/foo from install of foo-1.0-1 conflicts with file from "
-#~ "package bar-2.0.20 "
-#~ msgstr ""
-#~ "U —ユーザー"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "rpm -ivh --replacefiles foo-1.0-1.i386.rpm"
-#~ "command>"
-#~ msgstr ""
-#~ "-a コマンドは、現時点で インストールさ"
-#~ "れているすべてのパッケージの 問い合わせを実行します。"
-
-# EXACT MATCH
-#~ msgid "dependencies"
-#~ msgstr "依存"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "\n"
-#~ "error: Failed dependencies:\n"
-#~ " bar.so.2 is needed by foo-1.0-1 \n"
-#~ "Suggested resolutions:\n"
-#~ " bar-2.0.20-3.i386.rpm "
-#~ msgstr ""
-#~ "U —ユーザー"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "rpm -ivh foo-1.0-1.i386.rpm bar-2.0.20-3.i386."
-#~ "rpm "
-#~ msgstr ""
-#~ "-a コマンドは、現時点で インストールさ"
-#~ "れているすべてのパッケージの 問い合わせを実行します。"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "\n"
-#~ "Preparing... ########################################### "
-#~ "[100%] \n"
-#~ " 1:foo ########################################### "
-#~ "[ 50%] \n"
-#~ " 2:bar ########################################### "
-#~ "[100%] "
-#~ msgstr ""
-#~ "U —ユーザー"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "rpm -q --redhatprovides bar.so.2 "
-#~ msgstr ""
-#~ "-a コマンドは、現時点で インストールさ"
-#~ "れているすべてのパッケージの 問い合わせを実行します。"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "bar-2.0.20-3.i386.rpm "
-#~ msgstr ""
-#~ "U —ユーザー"
-
-# EXACT MATCH
-#~ msgid ""
-#~ "To force the installation anyway (which is not recommended since the "
-#~ "package may not run correctly), use the --nodeps option."
-#~ msgstr ""
-#~ "とにかくインストールをそのまま強制するには(パッケージが正常には動作しない"
-#~ "場合があるので推奨されません)、--nodeps オプションを使用し"
-#~ "ます。"
-
-# EXACT MATCH
-#~ msgid "uninstalling"
-#~ msgstr "アンインストール"
-
-# EXACT MATCH
-#~ msgid "removing"
-#~ msgstr "取り外し"
-
-# IGNORED
-#, fuzzy
-#~ msgid "rpm -e foo "
-#~ msgstr ""
-#~ "-a コマンドは、現時点で インストールさ"
-#~ "れているすべてのパッケージの 問い合わせを実行します。"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "\n"
-#~ "error: Failed dependencies: \n"
-#~ " foo is needed by (installed) bar-2.0.20-3.i386.rpm"
-#~ "computeroutput>"
-#~ msgstr ""
-#~ "U —ユーザー"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "To make RPM ignore this error and uninstall the package anyway (which may "
-#~ "break the package dependent on it) use the --nodeps "
-#~ "option."
-#~ msgstr ""
-#~ "RPM にこのエラーを無視させ、強制的にパッケージをアンインストールさせるに"
-#~ "は、これに依存しているパッケージを壊してしまう可能性がありますが、"
-#~ "--nodeps オプションを使用します。"
-
-# EXACT MATCH
-#~ msgid "upgrading"
-#~ msgstr "アップグレード"
-
-# EXACT MATCH
-#~ msgid ""
-#~ "Upgrading a package is similar to installing one. Type the following "
-#~ "command at a shell prompt:"
-#~ msgstr ""
-#~ "パッケージのアップグレードはインストールと 似ています。シェルプロンプトで"
-#~ "以下のコマンドを 入力します。"
-
-# IGNORED
-#, fuzzy
-#~ msgid "rpm -Uvh foo-2.0-1.i386.rpm "
-#~ msgstr ""
-#~ "-a コマンドは、現時点で インストールさ"
-#~ "れているすべてのパッケージの 問い合わせを実行します。"
-
-# EXACT MATCH
-#~ msgid "Tip "
-#~ msgstr "ヒント "
-
-# EXACT MATCH
-#~ msgid "preserving configuration files"
-#~ msgstr "設定ファイルの保存"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "saving /etc/foo.conf as /etc/foo.conf."
-#~ "rpmsave "
-#~ msgstr ""
-#~ "U —ユーザー"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "package foo-2.0-1 (which is newer than "
-#~ "foo-1.0-1) is already installed "
-#~ msgstr ""
-#~ "U —ユーザー"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "rpm -Uvh --oldpackage foo-1.0-1.i386.rpm"
-#~ "command>"
-#~ msgstr ""
-#~ "-a コマンドは、現時点で インストールさ"
-#~ "れているすべてのパッケージの 問い合わせを実行します。"
-
-# EXACT MATCH
-#~ msgid "freshen"
-#~ msgstr "freshen"
-
-# EXACT MATCH
-#~ msgid "freshening packages"
-#~ msgstr "パッケージにfreshenを実行"
-
-# EXACT MATCH
-#~ msgid "freshening with RPM"
-#~ msgstr "RPMでfreshenを実行"
-
-# IGNORED
-#, fuzzy
-#~ msgid "rpm -Fvh foo-1.2-1.i386.rpm "
-#~ msgstr ""
-#~ "-a コマンドは、現時点で インストールさ"
-#~ "れているすべてのパッケージの 問い合わせを実行します。"
-
-# IGNORED
-#, fuzzy
-#~ msgid "rpm -Fvh *.rpm "
-#~ msgstr ""
-#~ "-a コマンドは、現時点で インストールさ"
-#~ "れているすべてのパッケージの 問い合わせを実行します。"
-
-# EXACT MATCH
-#~ msgid "querying"
-#~ msgstr "問い合わせ"
-
-# IGNORED
-#, fuzzy
-#~ msgid "foo-2.0-1 "
-#~ msgstr ""
-#~ "U —ユーザー"
-
-# EXACT MATCH
-#~ msgid "verifying"
-#~ msgstr "検証"
-
-# IGNORED
-#, fuzzy
-#~ msgid "rpm -Vf /usr/bin/foo "
-#~ msgstr ""
-#~ "-a コマンドは、現時点で インストールさ"
-#~ "れているすべてのパッケージの 問い合わせを実行します。"
-
-# IGNORED
-#, fuzzy
-#~ msgid "rpm -Va "
-#~ msgstr ""
-#~ "-a コマンドは、現時点で インストールさ"
-#~ "れているすべてのパッケージの 問い合わせを実行します。"
-
-# IGNORED
-#, fuzzy
-#~ msgid "rpm -Vp foo-1.0-1.i386.rpm "
-#~ msgstr ""
-#~ "-a コマンドは、現時点で インストールさ"
-#~ "れているすべてのパッケージの 問い合わせを実行します。"
-
-# EXACT MATCH
-#~ msgid ""
-#~ "? — unreadable "
-#~ "file"
-#~ msgstr ""
-#~ "? —読み込み不可"
-#~ "ファイル"
-
-# EXACT MATCH
-#~ msgid "Checking a Package's Signature"
-#~ msgstr "パッケージの署名のチェック"
-
-# EXACT MATCH
-#~ msgid "md5sum"
-#~ msgstr "md5sum"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "If you wish to verify that a package has not been corrupted or tampered "
-#~ "with, examine only the md5sum by typing the following command at a shell "
-#~ "prompt (where <rpm-file> is the file "
-#~ "name of the RPM package):"
-#~ msgstr ""
-#~ "パッケージが破損したり不正に変更されたりしていないことを検査する場合、シェ"
-#~ "ルプロンプトで以下のコマンドを入力してmd5sumを調べます(<"
-#~ "rpm-file> の部分を実際のRPM "
-#~ "パッケージのファイル名に置き換えてください)。"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "rpm -K --nosignature <rpm-"
-#~ "file> "
-#~ msgstr ""
-#~ "-a コマンドは、現時点で インストールさ"
-#~ "れているすべてのパッケージの 問い合わせを実行します。"
-
-# EXACT MATCH
-#~ msgid ""
-#~ "The message <rpm-"
-#~ "file> : md5 OK is displayed. This brief "
-#~ "message means that the file was not corrupted by the download. To see a "
-#~ "more verbose message, replace -K with -Kvv"
-#~ "option> in the command."
-#~ msgstr ""
-#~ "<rpm-file>"
-#~ "replaceable>: md5 OK と言うメッセージが表示されます。 この"
-#~ "短いメッセージはダウンロードによるメッセージの 破損はないことを意味してい"
-#~ "ます。詳細メッセージを 表示するには、コマンド内の -K を "
-#~ "-Kvv に置き換えます。"
-
-# EXACT MATCH
-#~ msgid ""
-#~ "On the other hand, how trustworthy is the developer who created the "
-#~ "package? If the package is signed with the "
-#~ "developer's GnuPG key , you know that the developer "
-#~ "really is who they say they are."
-#~ msgstr ""
-#~ "一方、パッケージを作成した開発者はどの程度に 信用できるでしょうか。パッ"
-#~ "ケージが開発者の GnuPG キー で署名"
-#~ "firstterm> されていれば、開発者が誰なのか判断できます。"
-
-# EXACT MATCH
-#~ msgid "GnuPG "
-#~ msgstr "GnuPG "
-
-# EXACT MATCH
-#~ msgid "checking package signatures"
-#~ msgstr "パッケージ署名のチェック"
-
-# EXACT MATCH
-#~ msgid "GnuPG "
-#~ msgstr "GnuPG "
-
-# EXACT MATCH
-#~ msgid "checking RPM package signatures"
-#~ msgstr "RPM パッケージ署名のチェック"
-
-# EXACT MATCH
-#~ msgid ""
-#~ "An RPM package can be signed using Gnu Privacy Guard"
-#~ "firstterm> (or GnuPG), to help you make certain your downloaded package "
-#~ "is trustworthy."
-#~ msgstr ""
-#~ "RPMパッケージはGnu Privacy Guard (GnuPG)を使用して"
-#~ "署名でき、これによりユーザーはダウンロードしたパッケージが信頼できるもので"
-#~ "あることを確認できます。"
-
-# EXACT MATCH
-#~ msgid ""
-#~ "GnuPG is a tool for secure communication; it is a complete and free "
-#~ "replacement for the encryption technology of PGP, an electronic privacy "
-#~ "program. With GnuPG, you can authenticate the validity of documents and "
-#~ "encrypt/decrypt data to and from other recipients. GnuPG is capable of "
-#~ "decrypting and verifying PGP 5.x files as well."
-#~ msgstr ""
-#~ "GnuPGは安全な通信のためのツールで、PGPの暗号化技術である電子プライバシー保"
-#~ "護プログラムを完全に無償で置き換えたものです。GnuPGを使用して、ドキュメン"
-#~ "トの正当性を認証し、他の受信者との間で送受信するデータを暗号化/解読するこ"
-#~ "とができます。GnuPGは、PGP 5.x のファイルについ"
-#~ "ても同様に 解読、認証を行うことが可能です。"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "During installation, GnuPG is installed by default. That way you can "
-#~ "immediately start using GnuPG to verify any packages that you receive "
-#~ "from Red Hat. Before doing so, you must first import &RH;'s public key."
-#~ msgstr ""
-#~ "インストール時に、GnuPGがデフォルトでインストールされます。このため、&RH;"
-#~ "から入手したパッケージの検査をGnuPGを使用してすぐに始めることができます。"
-#~ "最初に、&RH;の公開キーをインポートする必要があります。"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "To verify &RH; packages, you must import the &RH; GPG key. To do so, "
-#~ "execute the following command at a shell prompt:"
-#~ msgstr ""
-#~ "&RH;パッケージを検証するには、&RH; GPGキーをインポート する必要がありま"
-#~ "す。これを実行するには、シェルプロンプト で次のコマンドを実行します。"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "rpm --import /usr/share/rhn/RPM-GPG-KEY"
-#~ "command>"
-#~ msgstr ""
-#~ "-a コマンドは、現時点で インストールさ"
-#~ "れているすべてのパッケージの 問い合わせを実行します。"
-
-# EXACT MATCH
-#~ msgid ""
-#~ "To display a list of all keys installed for RPM verification, execute the "
-#~ "command:"
-#~ msgstr ""
-#~ "RPM検証用にインストールされたすべてのキーの一覧を 表示するには、次のコマン"
-#~ "ドを実行します。"
-
-# IGNORED
-#, fuzzy
-#~ msgid "rpm -qa gpg-pubkey* "
-#~ msgstr ""
-#~ "-a コマンドは、現時点で インストールさ"
-#~ "れているすべてのパッケージの 問い合わせを実行します。"
-
-# IGNORED
-#, fuzzy
-#~ msgid "For the &RH; key, the output includes:"
-#~ msgstr "&RH;キー用には、出力が次を含んでいます。"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "gpg-pubkey-db42a60e-37ea5438"
-#~ "computeroutput>"
-#~ msgstr ""
-#~ "U —ユーザー"
-
-# EXACT MATCH
-#~ msgid ""
-#~ "To display details about a specific key, use rpm -qi followed by the output from the previous command:"
-#~ msgstr ""
-#~ "特定のキーの詳細を表示するには、rpm -qi "
-#~ "command>コマンドの後に、先程のコマンドの出力を 付けます。"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "rpm -qi gpg-pubkey-db42a60e-37ea5438 "
-#~ msgstr ""
-#~ "U —ユーザー"
-
-# EXACT MATCH
-#~ msgid "Verifying Signature of Packages"
-#~ msgstr "パッケージ署名の検証"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "To check the GnuPG signature of an RPM file after importing the builder's "
-#~ "GnuPG key, use the following command (replace <rpm-"
-#~ "file> with the filename of the RPM package):"
-#~ msgstr ""
-#~ "構築者のGnuPGキーをインポートした後で、RPMファイルの GnuPG署名をチェックす"
-#~ "るには、次のコマンドを使用します (<rpm-file>"
-#~ "replaceable>を実際の RPMパッケージのファイル名に置き換えます)。"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "rpm -K <rpm-file>"
-#~ "replaceable> "
-#~ msgstr ""
-#~ "-a コマンドは、現時点で インストールさ"
-#~ "れているすべてのパッケージの 問い合わせを実行します。"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "If all goes well, the following message is displayed: md5 gpg OK . This means that the "
-#~ "signature of the package has been verified, and that it is not corrupt."
-#~ msgstr ""
-#~ "すべて問題がなければ、md5 gpg OK "
-#~ "computeroutput>のメッセージが表示されます。パッケージの署名が検証され、破"
-#~ "損していないという意味です。"
-
-# EXACT MATCH
-#~ msgid "tips"
-#~ msgstr "ヒント"
-
-# EXACT MATCH
-#~ msgid "finding deleted files with"
-#~ msgstr "削除したファイルを探す"
-
-# EXACT MATCH
-#~ msgid "finding deleted files from"
-#~ msgstr "削除したファイルを探す"
-
-# EXACT MATCH
-#~ msgid "determining file ownership with"
-#~ msgstr "ファイルの所属先を確定する"
-
-# IGNORED
-#, fuzzy
-#~ msgid "rpm -qf /usr/bin/ggv "
-#~ msgstr ""
-#~ "-a コマンドは、現時点で インストールさ"
-#~ "れているすべてのパッケージの 問い合わせを実行します。"
-
-# IGNORED
-#, fuzzy
-#~ msgid "ggv-2.6.0-2 "
-#~ msgstr ""
-#~ "U —ユーザー"
-
-# IGNORED
-#, fuzzy
-#~ msgid "rpm -Vf /usr/bin/paste "
-#~ msgstr ""
-#~ "-a コマンドは、現時点で インストールさ"
-#~ "れているすべてのパッケージの 問い合わせを実行します。"
-
-# EXACT MATCH
-#~ msgid "documentation with"
-#~ msgstr "ドキュメント"
-
-# EXACT MATCH
-#~ msgid "locating documentation for"
-#~ msgstr "ドキュメントの検索"
-
-# EXACT MATCH
-#~ msgid "documentation"
-#~ msgstr "ドキュメント"
-
-# EXACT MATCH
-#~ msgid "finding installed"
-#~ msgstr "インストール先を探す"
-
-# IGNORED
-#, fuzzy
-#~ msgid "rpm -qdf /usr/bin/free "
-#~ msgstr ""
-#~ "-a コマンドは、現時点で インストールさ"
-#~ "れているすべてのパッケージの 問い合わせを実行します。"
-
-# EXACT MATCH
-#~ msgid "querying uninstalled packages"
-#~ msgstr "アンインストールしたパッケージの問い合わせ"
-
-# EXACT MATCH
-#~ msgid "querying uninstalled"
-#~ msgstr "アンインストールの問い合わせ"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "rpm -qip crontabs-1.10-7.noarch.rpm "
-#~ msgstr ""
-#~ "-a コマンドは、現時点で インストールさ"
-#~ "れているすべてのパッケージの 問い合わせを実行します。"
-
-# EXACT MATCH
-#~ msgid "querying for file list"
-#~ msgstr "ファイル一覧の問い合わせ"
-
-# EXACT MATCH
-#~ msgid "obtaining list of files"
-#~ msgstr "ファイル一覧の入手"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "rpm -qlp crontabs-1.10-5.noarch.rpm "
-#~ msgstr ""
-#~ "-a コマンドは、現時点で インストールさ"
-#~ "れているすべてのパッケージの 問い合わせを実行します。"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "\n"
-#~ "/etc/cron.daily \n"
-#~ "/etc/cron.hourly \n"
-#~ "/etc/cron.monthly \n"
-#~ "/etc/cron.weekly \n"
-#~ "/etc/crontab \n"
-#~ "/usr/bin/run-parts "
-#~ msgstr ""
-#~ "U —ユーザー"
-
-# EXACT MATCH
-#~ msgid "additional resources"
-#~ msgstr "その他のリソース"
-
-# EXACT MATCH
-#~ msgid "website"
-#~ msgstr "webサイト"
-
-# EXACT MATCH
-#~ msgid ""
-#~ "http://"
-#~ "www.redhat.com/mailman/listinfo/rpm-list/ — The RPM mailing "
-#~ "list is archived here. To subscribe, send mail to rpm-list-"
-#~ "request@redhat.com with the word subscribe in the subject line."
-#~ msgstr ""
-#~ "http://"
-#~ "www.redhat.com/mailman/listinfo/rpm-list/ — RPMのメーリング"
-#~ "リストがここにアーカイブされています。 講読するには、件名の欄に subscribe という単語を記入して メールを"
-#~ "rpm-list-request@redhat.com 宛に送信します。"
-
-# EXACT MATCH
-#~ msgid "book about"
-#~ msgstr "関連書籍"
diff --git a/client/zanata-adapter-po/src/test/resources/pot/RPM.pot b/client/zanata-adapter-po/src/test/resources/pot/RPM.pot
deleted file mode 100644
index dcdc7fcb6d..0000000000
--- a/client/zanata-adapter-po/src/test/resources/pot/RPM.pot
+++ /dev/null
@@ -1,699 +0,0 @@
-#
-# AUTHOR , YEAR.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: 0\n"
-"POT-Creation-Date: 2010-03-18T07:41:00\n"
-"PO-Revision-Date: 2010-03-18T07:41:00\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: None\n"
-"MIME-Version: 1.0\n"
-"Content-Type: application/x-publican; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#. Tag: title
-#, no-c-format
-msgid "RPM"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "The RPM Package Manager (RPM) is an open packaging system, which runs on &MAJOR_OS; as well as other Linux and UNIX systems. Red Hat, Inc. and the Fedora Project encourage other vendors to use RPM for their own products. RPM is distributed under the terms of the GPL (GNU General Public License )."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "The RPM Package Manager only works with packages built to work with the RPM format . RPM is itself provided as a pre-installed rpm package. For the end user, RPM makes system updates easy. Installing, uninstalling and upgrading RPM packages can be accomplished with short commands. RPM maintains a database of installed packages and their files, so you can invoke powerful queries and verifications on your system. If you prefer a graphical interface, you can use the PackageKit GUI to perform many RPM commands. Refer to for details."
-msgstr ""
-
-#. Tag: title
-#, no-c-format
-msgid "Important"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "When installing a package, ensure it is compatible with your operating system and processor architecture. This can usually be determined by checking the package name. Many of the following examples show RPM packages compiled for the AMD64/Intel 64 computer architectures; thus, the RPM file name ends in x86_64.rpm ."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "During upgrades, RPM handles configuration files carefully, so that you never lose your customizations—something that you cannot accomplish with regular .tar.gz files."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "For the developer, RPM allows you to take software source code and package it into source and binary packages for end users. This process is quite simple and is driven from a single file and optional patches that you create. This clear delineation between pristine sources and your patches along with build instructions eases the maintenance of the package as new versions of the software are released."
-msgstr ""
-
-#. Tag: title
-#, no-c-format
-msgid "Note"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "Because RPM makes changes to your system, you must be logged in as root to install, remove, or upgrade an RPM package."
-msgstr ""
-
-#. Tag: title
-#, no-c-format
-msgid "RPM Design Goals"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "To understand how to use RPM, it can be helpful to understand the design goals of RPM:"
-msgstr ""
-
-#. Tag: term
-#, no-c-format
-msgid "Upgradability"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "With RPM, you can upgrade individual components of your system without completely reinstalling. When you get a new release of an operating system based on RPM, such as &MAJOR_OS;, you do not need to reinstall a fresh copy of the operating system your machine (as you might need to with operating systems based on other packaging systems). RPM allows intelligent, fully-automated, in-place upgrades of your system. In addition, configuration files in packages are preserved across upgrades, so you do not lose your customizations. There are no special upgrade files needed to upgrade a package because the same RPM file is used to both install and upgrade the package on your system."
-msgstr ""
-
-#. Tag: term
-#, no-c-format
-msgid "Powerful Querying"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "RPM is designed to provide powerful querying options. You can perform searches on your entire database for packages or even just certain files. You can also easily find out what package a file belongs to and from where the package came. The files an RPM package contains are in a compressed archive, with a custom binary header containing useful information about the package and its contents, allowing you to query individual packages quickly and easily."
-msgstr ""
-
-#. Tag: term
-#, no-c-format
-msgid "System Verification"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "Another powerful RPM feature is the ability to verify packages. If you are worried that you deleted an important file for some package, you can verify the package. You are then notified of anomalies, if any—at which point you can reinstall the package, if necessary. Any configuration files that you modified are preserved during reinstallation."
-msgstr ""
-
-#. Tag: term
-#, no-c-format
-msgid "Pristine Sources"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "A crucial design goal was to allow the use of pristine software sources, as distributed by the original authors of the software. With RPM, you have the pristine sources along with any patches that were used, plus complete build instructions. This is an important advantage for several reasons. For instance, if a new version of a program is released, you do not necessarily have to start from scratch to get it to compile. You can look at the patch to see what you might need to do. All the compiled-in defaults, and all of the changes that were made to get the software to build properly, are easily visible using this technique."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "The goal of keeping sources pristine may seem important only for developers, but it results in higher quality software for end users, too."
-msgstr ""
-
-#. Tag: title
-#, no-c-format
-msgid "Using RPM"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "RPM has five basic modes of operation (not counting package building): installing, uninstalling, upgrading, querying, and verifying. This section contains an overview of each mode. For complete details and options, try rpm --help or man rpm . You can also refer to for more information on RPM."
-msgstr ""
-
-#. Tag: title
-#, no-c-format
-msgid "Finding RPM Packages"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "Before using any RPM packages, you must know where to find them. An Internet search returns many RPM repositories, but if you are looking for RPM packages built by the Fedora Project, they can be found at the following locations:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "The &MAJOR_OS; installation media contain many installable RPMs."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "The initial RPM repositories provided with the YUM package manager. Refer to for details on how to use the official &MAJOR_OS; package repositories."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "Unofficial, third-party repositories not affiliated with the Fedora Project also provide RPM packages."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "When considering third-party repositories for use with your &MAJOR_OS; system, pay close attention to the repository's web site with regard to package compatibility before adding the repository as a package source. Alternate package repositories may offer different, incompatible versions of the same software, including packages already included in the Fedora repositories."
-msgstr ""
-
-#. Tag: title
-#, no-c-format
-msgid "Installing"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "RPM packages typically have file names like tree-1.5.2.2-4.fc12.x86_64.rpm . The file name includes the package name (tree ), version (1.5.2.2 ), release (4 ), operating system major version (fc12 ) and CPU architecture (x86_64 ). Assuming the tree-1.5.2.2-4.fc12.x86_64.rpm package is in the current directory, log in as root and type the following command at a shell prompt to install it:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "The -i option tells rpm to install the package, and the v and h options, while aren't strictly necessary, increase output information and display a progress meter, respectively."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "Alternatively, you can use the -U option, which upgrades the package if an older version is already installed, or simply installs it if not:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "If the installation is successful, the following output is displayed:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "As you can see, RPM prints out the name of the package and then prints a succession of hash marks as a progress meter while the package is installed."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "The signature of a package is checked automatically when installing or upgrading a package. The signature confirms that the package was signed by an authorized party. For example, if the verification of the signature fails, an error message such as the following is displayed:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "If it is a new, header-only, signature, an error message such as the following is displayed:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "If you do not have the appropriate key installed to verify the signature, the message contains the word NOKEY :"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "Refer to for more information on checking a package's signature."
-msgstr ""
-
-#. Tag: title
-#, no-c-format
-msgid "Warning"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "If you are installing a kernel package, you should always use the rpm -ivh command (simple install) instead of rpm -Uvh . The reason for this is that install (-i ) and upgrade (-U ) take on specific meanings when installing kernel packages. Refer to for details."
-msgstr ""
-
-#. Tag: title
-#, no-c-format
-msgid "Package Already Installed"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "If a package of the same name and version is already installed, the following output is displayed:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "However, if you want to install the package anyway, you can use the --replacepkgs option, which tells RPM to ignore the error:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "This option is helpful if files installed from the RPM were deleted or if you want the original configuration files from the RPM to be installed."
-msgstr ""
-
-#. Tag: title
-#, no-c-format
-msgid "Conflicting Files"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "If you attempt to install a package that contains a file which has already been installed by another package, the following is displayed:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "To make RPM ignore this error, use the --replacefiles option:"
-msgstr ""
-
-#. Tag: title
-#, no-c-format
-msgid "Unresolved Dependency"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "RPM packages may sometimes depend on other packages, which means that they require other packages to be installed to run properly. If you try to install a package which has an unresolved dependency, output similar to the following is displayed:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "If you are installing a package from the &MAJOR_OS; installation media, such as from a CD-ROM or DVD, it usually suggests the package or packages needed to resolve the dependency. Find the suggested package(s) on the &MAJOR_OS; installation media or on one of the active &MAJOR_OS; mirrors ( ) and add it to the command:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "If installation of both packages is successful, output similar to the following is displayed:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "If it does not suggest a package to resolve the dependency, you can try the --whatprovides option to determine which package contains the required file."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "If the package that contains bar.so.3 is in the RPM database, the name of the package is displayed:"
-msgstr ""
-
-#. Tag: title
-#, no-c-format
-msgid "Warning: Forcing Package Installation"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "Although we can force rpm to install a package that gives us a Failed dependencies error (using the --nodeps option), this is not recommended, and will usually result in the installed package failing to run. Installing or removing packages with rpm --nodeps can cause applications to misbehave and/or crash, and can cause serious package management problems or, possibly, system failure. For these reasons, it is best to heed such warnings; the package manager—whether RPM , Yum or PackageKit —shows us these warnings and suggests possible fixes because accounting for dependencies is critical. The Yum package manager can perform dependency resolution and fetch dependencies from online repositories, making it safer, easier and smarter than forcing rpm to carry out actions without regard to resolving dependencies."
-msgstr ""
-
-#. Tag: title
-#, no-c-format
-msgid "Uninstalling"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "Uninstalling a package is just as simple as installing one. Type the following command at a shell prompt:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "Notice that we used the package name foo , not the name of the original package file , foo-1.0-1.fc12.x86_64 . If you attempt to uninstall a package using the rpm -e command and the original full file name, you will receive a package name error."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "You can encounter dependency errors when uninstalling a package if another installed package depends on the one you are trying to remove. For example:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "Similar to how we searched for a shared object library (i.e. a <library_name> .so.<number> file) in , we can search for a 64-bit shared object library using this exact syntax (and making sure to quote the file name):"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "Although we can force rpm to remove a package that gives us a Failed dependencies error (using the --nodeps option), this is not recommended, and may cause harm to other installed applications. Installing or removing packages with rpm --nodeps can cause applications to misbehave and/or crash, and can cause serious package management problems or, possibly, system failure. For these reasons, it is best to heed such warnings; the package manager—whether RPM , Yum or PackageKit —shows us these warnings and suggests possible fixes because accounting for dependencies is critical. The Yum package manager can perform dependency resolution and fetch dependencies from online repositories, making it safer, easier and smarter than forcing rpm to carry out actions without regard to resolving dependencies."
-msgstr ""
-
-#. Tag: title
-#, no-c-format
-msgid "Upgrading"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "Upgrading a package (using the -U option) is similar to installing one (the -i option). If we have the RPM named tree-1.5.3.0-1.fc12.x86_64.rpm in our current directory, and tree-1.5.2.2-4.fc12.x86_64.rpm is already installed on our system (rpm -qi will tell us which version of the tree package we have installed on our system, if any), then the following command will upgrade tree to the newer version:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "As part of upgrading a package, RPM automatically uninstalls any old versions of the foo package. Note that -U will also install a package even when there are no previous versions of the package installed."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "It is not advisable to use the -U option for installing kernel packages because RPM completely replaces the previous kernel package. This does not affect a running system, but if the new kernel is unable to boot during your next restart, there would be no other kernel to boot instead."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "Using the -i option adds the kernel to your GRUB boot menu (/etc/grub.conf ). Similarly, removing an old, unneeded kernel removes the kernel from GRUB."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "Because RPM performs intelligent upgrading of packages with configuration files, you may see one or the other of the following messages:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "This message means that changes you made to the configuration file may not be forward-compatible with the new configuration file in the package, so RPM saved your original file and installed a new one. You should investigate the differences between the two configuration files and resolve them as soon as possible, to ensure that your system continues to function properly."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "Alternatively, RPM may save the package's new configuration file as, for example, foo.conf.rpmnew , and leave the configuration file you modified untouched. You should still resolve any conflicts between your modified configuration file and the new one, usually by merging changes from the old one to the new one with a diff program."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "If you attempt to upgrade to a package with an older version number (that is, if a higher version of the package is already installed), the output is similar to the following:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "To force RPM to upgrade anyway, use the --oldpackage option:"
-msgstr ""
-
-#. Tag: title
-#, no-c-format
-msgid "Freshening"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "Freshening is similar to upgrading, except that only existent packages are upgraded. Type the following command at a shell prompt:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "RPM's freshen option checks the versions of the packages specified on the command line against the versions of packages that have already been installed on your system. When a newer version of an already-installed package is processed by RPM's freshen option, it is upgraded to the newer version. However, RPM's freshen option does not install a package if no previously-installed package of the same name exists. This differs from RPM's upgrade option, as an upgrade does install packages whether or not an older version of the package was already installed."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "Freshening works for single packages or package groups. If you have just downloaded a large number of different packages, and you only want to upgrade those packages that are already installed on your system, freshening does the job. Thus, you do not have to delete any unwanted packages from the group that you downloaded before using RPM."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "In this case, issue the following with the *.rpm glob:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "RPM then automatically upgrades only those packages that are already installed."
-msgstr ""
-
-#. Tag: title
-#, no-c-format
-msgid "Querying"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "The RPM database stores information about all RPM packages installed in your system. It is stored in the directory /var/lib/rpm/ , and is used to query what packages are installed, what versions each package is, and to calculate any changes to any files in the package since installation, among other use cases."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "To query this database, use the -q option. The rpm -q package name command displays the package name, version, and release number of the installed package <package_name> . For example, using rpm -q tree to query installed package tree might generate the following output:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "You can also use the following Package Selection Options (which is a subheading in the RPM man page: see man rpm for details) to further refine or qualify your query:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "-a — queries all currently installed packages."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "-f <file_name> — queries the RPM database for which package owns <file_name> . Specify the absolute path of the file (for example, rpm -qf /bin/ls instead of rpm -qf ls )."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "-p <package_file> — queries the uninstalled package <package_file> ."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "There are a number of ways to specify what information to display about queried packages. The following options are used to select the type of information for which you are searching. These are called the Package Query Options ."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "-i displays package information including name, description, release, size, build date, install date, vendor, and other miscellaneous information."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "-l displays the list of files that the package contains."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "-s displays the state of all the files in the package."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "-d displays a list of files marked as documentation (man pages, info pages, READMEs, etc.) in the package."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "-c displays a list of files marked as configuration files. These are the files you edit after installation to adapt and customize the package to your system (for example, sendmail.cf , passwd , inittab , etc.)."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "For options that display lists of files, add -v to the command to display the lists in a familiar ls -l format."
-msgstr ""
-
-#. Tag: title
-#, no-c-format
-msgid "Verifying"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "Verifying a package compares information about files installed from a package with the same information from the original package. Among other things, verifying compares the file size, MD5 sum, permissions, type, owner, and group of each file."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "The command rpm -V verifies a package. You can use any of the Verify Options listed for querying to specify the packages you wish to verify. A simple use of verifying is rpm -V tree , which verifies that all the files in the tree package are as they were when they were originally installed. For example:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "To verify a package containing a particular file:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "In this example, /usr/bin/tree is the absolute path to the file used to query a package."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "To verify ALL installed packages throughout the system (which will take some time):"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "To verify an installed package against an RPM package file:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "This command can be useful if you suspect that your RPM database is corrupt."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "If everything verified properly, there is no output. If there are any discrepancies, they are displayed. The format of the output is a string of eight characters (a \"c \" denotes a configuration file) and then the file name. Each of the eight characters denotes the result of a comparison of one attribute of the file to the value of that attribute recorded in the RPM database. A single period (. ) means the test passed. The following characters denote specific discrepancies:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "5 — MD5 checksum"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "S — file size"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "L — symbolic link"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "T — file modification time"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "D — device"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "U — user"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "G — group"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "M — mode (includes permissions and file type)"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "? — unreadable file (file permission errors, for example)"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "If you see any output, use your best judgment to determine if you should remove the package, reinstall it, or fix the problem in another way."
-msgstr ""
-
-#. Tag: title
-#, no-c-format
-msgid "Practical and Common Examples of RPM Usage"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "RPM is a useful tool for both managing your system and diagnosing and fixing problems. The best way to make sense of all its options is to look at some examples."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "Perhaps you have deleted some files by accident, but you are not sure what you deleted. To verify your entire system and see what might be missing, you could try the following command:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "If some files are missing or appear to have been corrupted, you should probably either re-install the package or uninstall and then re-install the package."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "At some point, you might see a file that you do not recognize. To find out which package owns it, enter:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "The output would look like the following:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "We can combine the above two examples in the following scenario. Say you are having problems with /usr/bin/paste . You would like to verify the package that owns that program, but you do not know which package owns paste . Enter the following command,"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "and the appropriate package is verified."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "Do you want to find out more information about a particular program? You can try the following command to locate the documentation which came with the package that owns that program:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "The output would be similar to the following:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "You may find a new RPM, but you do not know what it does. To find information about it, use the following command:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "Perhaps you now want to see what files the crontabs RPM package installs. You would enter the following:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "The output is similar to the following:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "These are just a few examples. As you use RPM, you may find more uses for it."
-msgstr ""
-
-#. Tag: title
-#, no-c-format
-msgid "Additional Resources"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "RPM is an extremely complex utility with many options and methods for querying, installing, upgrading, and removing packages. Refer to the following resources to learn more about RPM."
-msgstr ""
-
-#. Tag: title
-#, no-c-format
-msgid "Installed Documentation"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "rpm --help — This command displays a quick reference of RPM parameters."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "man rpm — The RPM man page gives more detail about RPM parameters than the rpm --help command."
-msgstr ""
-
-#. Tag: title
-#, no-c-format
-msgid "Useful Websites"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "The RPM website — http://www.rpm.org/ "
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "The RPM mailing list can be subscribed to, and its archives read from, here — https://lists.rpm.org/mailman/listinfo/rpm-list "
-msgstr ""
-
-#. Tag: title
-#, no-c-format
-msgid "Related Books"
-msgstr ""
-
-#. Tag: term
-#, no-c-format
-msgid "Maximum RPM — "
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "The Maximum RPM book, which you can read online or download in HTML or PDF, covers everything from general RPM usage to building your own RPMs to programming with rpmlib."
-msgstr ""
-
-#. Tag: term
-#, no-c-format
-msgid "Red Hat RPM Guide — "
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "The Red Hat RPM Guide by Eric Foster-Johnson is an excellent resource on all details of the RPM package format and the RPM package management utility."
-msgstr ""
-
diff --git a/client/zanata-adapter-properties/pom.xml b/client/zanata-adapter-properties/pom.xml
deleted file mode 100644
index 594c4ddd5e..0000000000
--- a/client/zanata-adapter-properties/pom.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-
-
- 4.0.0
- zanata-adapter-properties
- Zanata Adapter for Java Properties
-
- org.zanata
- zanata-parent
- 1.5-SNAPSHOT
- ../../zanata-parent/pom.xml
-
- jar
-
-
-
- scm:git:git://github.com/zanata/zanata.git
- scm:git:git@github.com:zanata/zanata.git
- https://github.com/zanata/zanata
-
-
-
-
- org.zanata
- zanata-common-api
- ${project.version}
-
-
- org.fedorahosted.openprops
- openprops
-
-
- org.infinitest
- infinitest
- test
-
-
- org.slf4j
- slf4j-log4j12
- test
-
-
- org.slf4j
- slf4j-api
-
-
- commons-io
- commons-io
- 2.0.1
- test
-
-
-
diff --git a/client/zanata-adapter-properties/src/main/java/org/zanata/adapter/properties/PropReader.java b/client/zanata-adapter-properties/src/main/java/org/zanata/adapter/properties/PropReader.java
deleted file mode 100644
index c95bd3ecc5..0000000000
--- a/client/zanata-adapter-properties/src/main/java/org/zanata/adapter/properties/PropReader.java
+++ /dev/null
@@ -1,162 +0,0 @@
-package org.zanata.adapter.properties;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.InvalidPropertiesFormatException;
-import java.util.List;
-
-import org.fedorahosted.openprops.Properties;
-import org.zanata.common.ContentState;
-import org.zanata.common.LocaleId;
-import org.zanata.rest.dto.extensions.comment.SimpleComment;
-import org.zanata.rest.dto.resource.Resource;
-import org.zanata.rest.dto.resource.TextFlow;
-import org.zanata.rest.dto.resource.TextFlowTarget;
-import org.zanata.rest.dto.resource.TranslationsResource;
-
-/**
- * A PropReader. NOT THREADSAFE.
- *
- * @author Sean Flanigan
- * @version $Revision: 1.1 $
- */
-public class PropReader
-{
-
- public static final String PROP_CONTENT_TYPE = "text/plain";
- private static final String NEWLINE_REGEX = "(\r\n|\r|\n)";
-
- // pre: template already extracted
- public void extractTarget(TranslationsResource doc, InputStream in, LocaleId localeId, ContentState contentState) throws IOException
- {
- Properties props = loadProps(in);
- for (String key : props.stringPropertyNames())
- {
- String val = props.getProperty(key);
- String id = getID(key, val);
- TextFlowTarget textFlowTarget = new TextFlowTarget(id);
- textFlowTarget.setContent(val);
- // textFlowTarget.setLang(localeId);
- textFlowTarget.setState(contentState);
- String comment = props.getComment(key);
- if (comment != null && comment.length() != 0)
- {
- SimpleComment simpleComment = textFlowTarget.getExtensions(true).findOrAddByType(SimpleComment.class);
- simpleComment.setValue(comment);
- }
- doc.getTextFlowTargets().add(textFlowTarget);
- }
- }
-
- /**
- * Reads properties from a given {@link InputStream} and adds them to the
- * given {@link Resource}.
- *
- * @param doc the resource to add properties textflows to
- * @param in the input stream to read the properties from
- * @throws IOException
- */
- // TODO allowing Readers (via InputSource) might be a bad idea
- // TODO add documentation on exceptions thrown
- public void extractTemplate(Resource doc, InputStream in) throws IOException
- {
- List resources = doc.getTextFlows();
- Properties props = loadProps(in);
- int nonTranslatableCount = 0;
- for (String key : props.stringPropertyNames())
- {
- String comment = null;
- String rawComment = props.getRawComment(key);
- if (rawComment != null && rawComment.length() != 0)
- {
- StringBuilder sb = new StringBuilder(rawComment.length());
- nonTranslatableCount = processCommentForNonTranslatable(nonTranslatableCount, rawComment, sb);
- comment = sb.toString();
- }
- if (nonTranslatableCount == 0)
- {
- String val = props.getProperty(key);
- String id = getID(key, val);
- TextFlow textFlow = new TextFlow(id);
- textFlow.setContent(val);
- if (comment != null && comment.length() != 0)
- {
- SimpleComment simpleComment = textFlow.getExtensions(true).findOrAddByType(SimpleComment.class);
- simpleComment.setValue(comment);
- }
- // textFlow.setLang(LocaleId.EN);
- resources.add(textFlow);
- }
- }
- }
-
- /**
- * Processes a full comment for non-translatable sections, writing
- * translatable sections to a given string buffer.
- *
- * @param comment comment to process, may have multiple lines
- * @param sb string buffer to output comments in translatable blocks
- * @return adjusted non-translateable count, a value > 0 indicates that the
- * current section is non-translatable
- * @throws Exception
- */
- private int processCommentForNonTranslatable(int nonTranslatableCount, String comment, StringBuilder sb) throws InvalidPropertiesFormatException
- {
- int nonTranslatable = nonTranslatableCount;
- String[] lines = comment.split(NEWLINE_REGEX);
-
- int lineNonTranslatable;
- for (String line : lines)
- {
- lineNonTranslatable = checkNonTranslatable(line);
- nonTranslatable += lineNonTranslatable;
- if (nonTranslatable < 0)
- {
- // TODO probably want a different exception here
- throw new InvalidPropertiesFormatException("Found '# END NON-TRANSLATABLE' " + "without matching '# START NON-TRANSLATABLE'");
- }
- if (nonTranslatable == 0 && lineNonTranslatable == 0)
- {
- sb.append(Properties.cookCommentLine(line));
- // TODO if not last line
- sb.append('\n');
- }
- }
-
- return nonTranslatable;
- }
-
- /**
- * Checks a comment for START and END of NON-TRANSLATABLE sections within a
- * single line of a comment.
- *
- * @param line a single line of a comment
- * @return 0 if no NON-TRANSLATABLE comment is found, +1 for start, -1 for
- * end
- */
- private int checkNonTranslatable(String line)
- {
- if (line.startsWith("# START NON-TRANSLATABLE"))
- {
- return 1;
- }
- if (line.startsWith("# END NON-TRANSLATABLE"))
- {
- return -1;
- }
- return 0;
- }
-
- private String getID(String key, String val)
- {
- return key;
- }
-
- private Properties loadProps(InputStream in) throws IOException
- {
- Properties props = new Properties();
- props.load(in);
- return props;
- }
-
-}
diff --git a/client/zanata-adapter-properties/src/main/java/org/zanata/adapter/properties/PropWriter.java b/client/zanata-adapter-properties/src/main/java/org/zanata/adapter/properties/PropWriter.java
deleted file mode 100644
index 158e96afc4..0000000000
--- a/client/zanata-adapter-properties/src/main/java/org/zanata/adapter/properties/PropWriter.java
+++ /dev/null
@@ -1,78 +0,0 @@
-package org.zanata.adapter.properties;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.PrintStream;
-
-import org.fedorahosted.openprops.Properties;
-import org.zanata.rest.dto.extensions.comment.SimpleComment;
-import org.zanata.rest.dto.resource.Resource;
-import org.zanata.rest.dto.resource.TextFlow;
-import org.zanata.rest.dto.resource.TextFlowTarget;
-import org.zanata.rest.dto.resource.TranslationsResource;
-
-public class PropWriter
-{
-
- private static void logVerbose(String msg)
- {
- System.out.println(msg);
- }
-
- private static void makeParentDirs(File f)
- {
- File parentFile = f.getParentFile();
- if (parentFile != null)
- parentFile.mkdirs();
- }
-
- /**
- * Writes a properties file representation of the given {@link Resource} to
- * the given directory.
- *
- * @param doc
- * @param baseDir
- * @throws IOException
- */
- public static void write(final Resource doc, final File baseDir) throws IOException
- {
- File baseFile = new File(baseDir, doc.getName() + ".properties");
- makeParentDirs(baseFile);
-
- logVerbose("Creating base file " + baseFile);
- Properties props = new Properties();
- for (TextFlow textFlow : doc.getTextFlows())
- {
- props.setProperty(textFlow.getId(), textFlow.getContent());
- SimpleComment simpleComment = textFlow.getExtensions(true).findByType(SimpleComment.class);
- if (simpleComment != null && simpleComment.getValue() != null)
- props.setComment(textFlow.getId(), simpleComment.getValue());
- }
- // props.store(System.out, null);
- PrintStream out = new PrintStream(new FileOutputStream(baseFile));
- props.store(out, null);
- out.close();
- }
-
- public static void write(final TranslationsResource doc, final File baseDir, String bundleName, String locale) throws IOException
- {
-
- Properties targetProp = new Properties();
- for (TextFlowTarget target : doc.getTextFlowTargets())
- {
- targetProp.setProperty(target.getResId(), target.getContent());
- SimpleComment simpleComment = target.getExtensions(true).findByType(SimpleComment.class);
- if (simpleComment != null && simpleComment.getValue() != null)
- targetProp.setComment(target.getResId(), simpleComment.getValue());
- }
-
- File langFile = new File(baseDir, bundleName + "_" + locale + ".properties");
- makeParentDirs(langFile);
- logVerbose("Creating target file " + langFile);
- // targetProp.store(System.out, null);
- PrintStream out2 = new PrintStream(new FileOutputStream(langFile));
- targetProp.store(out2, null);
- }
-
-}
diff --git a/client/zanata-adapter-properties/src/test/java/org/zanata/adapter/properties/PropReaderTests.java b/client/zanata-adapter-properties/src/test/java/org/zanata/adapter/properties/PropReaderTests.java
deleted file mode 100644
index 042bced2ff..0000000000
--- a/client/zanata-adapter-properties/src/test/java/org/zanata/adapter/properties/PropReaderTests.java
+++ /dev/null
@@ -1,161 +0,0 @@
-package org.zanata.adapter.properties;
-
-import static org.testng.Assert.assertEquals;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.StringReader;
-import java.io.StringWriter;
-import java.net.MalformedURLException;
-import java.util.InvalidPropertiesFormatException;
-import java.util.List;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.Marshaller;
-import javax.xml.bind.Unmarshaller;
-
-import org.apache.commons.io.IOUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-import org.zanata.common.ContentState;
-import org.zanata.common.LocaleId;
-import org.zanata.rest.dto.resource.Resource;
-import org.zanata.rest.dto.resource.TextFlow;
-import org.zanata.rest.dto.resource.TranslationsResource;
-
-public class PropReaderTests
-{
- private static final Logger log = LoggerFactory.getLogger(PropReaderTests.class);
- private static final String TEST_OUTPUT_DIR_STRING = "target/test-output";
- private static final File TEST_OUTPUT_DIR = new File(TEST_OUTPUT_DIR_STRING);
-
- PropReader propReader;
-
- @BeforeMethod
- public void resetReader()
- {
- propReader = new PropReader();
- }
-
- @Test
- public void roundtripSrcPropsToDocXmlToProps() throws Exception
- {
- String docName = "test.properties";
-
- Resource srcDoc = new Resource("test");
- InputStream testStream = getResourceAsStream(docName);
-
- propReader.extractTemplate(srcDoc, testStream);
- JAXBContext jc = JAXBContext.newInstance(Resource.class);
- Marshaller marshal = jc.createMarshaller();
- StringWriter sw = new StringWriter();
- marshal.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
- marshal.marshal(srcDoc, sw);
- log.debug("{}", sw);
-
- Unmarshaller unmarshal = jc.createUnmarshaller();
- Resource docIn = (Resource) unmarshal.unmarshal(new StringReader(sw.toString()));
-
- PropWriter.write(docIn, TEST_OUTPUT_DIR);
-
- assertInputAndOutputDocContentSame(docName);
- }
-
- @Test
- public void roundtripTransPropsToDocXmlToProps() throws Exception
- {
- String locale = "fr";
- String docName = "test_fr.properties";
- InputStream targetStream = getResourceAsStream(docName);
- TranslationsResource transDoc = new TranslationsResource();
- propReader.extractTarget(transDoc, targetStream, new LocaleId(locale), ContentState.New);
-
- JAXBContext jc = JAXBContext.newInstance(TranslationsResource.class);
- Marshaller marshal = jc.createMarshaller();
- StringWriter sw = new StringWriter();
- marshal.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
- marshal.marshal(transDoc, sw);
- log.debug("{}", sw);
-
- Unmarshaller unmarshal = jc.createUnmarshaller();
- TranslationsResource docIn = (TranslationsResource) unmarshal.unmarshal(new StringReader(sw.toString()));
-
- PropWriter.write(docIn, TEST_OUTPUT_DIR, "test", locale);
-
- assertInputAndOutputDocContentSame(docName);
- }
-
- /**
- * Asserts that the content of the input document and output document are
- * identical. Assumes filename is the same for both documents and that the
- * output file is in TEST_OUTPUT_DIR.
- *
- * @param docName the name for both input and output files
- * @throws FileNotFoundException
- * @throws IOException
- * @throws MalformedURLException
- */
- private void assertInputAndOutputDocContentSame(String docName) throws FileNotFoundException, IOException, MalformedURLException
- {
- File newFile = new File(TEST_OUTPUT_DIR.getPath() + File.separator + docName);
- InputStream newStream = newFile.toURI().toURL().openStream();
- InputStream origStream = getResourceAsStream(docName);
-
- String origContent = IOUtils.toString(origStream);
- String newContent = IOUtils.toString(newStream);
-
- // note: this does not allow for differences in whitespace, so if tests
- // start failing this should be updated to use a less strict comparison
- assertEquals(newContent, origContent, "output file should be the same as the input file");
- }
-
- private InputStream getResourceAsStream(String relativeResourceName) throws FileNotFoundException
- {
- InputStream stream = PropReaderTests.class.getResourceAsStream(relativeResourceName);
- if (stream == null)
- throw new FileNotFoundException(relativeResourceName);
- return stream;
- }
-
- @Test
- public void extractTemplateRemovesNonTranslateableRegions() throws IOException
- {
- Resource srcDoc = new Resource("test");
- InputStream testStream = getResourceAsStream("test_non_trans.properties");
- propReader.extractTemplate(srcDoc, testStream);
-
- List textFlows = srcDoc.getTextFlows();
-
- assertEquals(textFlows.size(), 2, "Unexpected number of textflows");
- assertEquals(textFlows.get(0).getId(), "HELLO", "Unexpected textflow id");
- assertEquals(textFlows.get(1).getId(), "GOODBYE", "Unexpected textflow id");
- // TODO also check comments?
- }
-
- @Test
- public void extractTemplateNestedNonTranslatableRegions() throws Exception
- {
- Resource srcDoc = new Resource("test");
- InputStream testStream = getResourceAsStream("test_non_trans_nested.properties");
- propReader.extractTemplate(srcDoc, testStream);
-
- List textFlows = srcDoc.getTextFlows();
-
- assertEquals(textFlows.size(), 2, "Unexpected number of textflows");
- assertEquals(textFlows.get(0).getId(), "HELLO", "Unexpected textflow id");
- assertEquals(textFlows.get(1).getId(), "GOODBYE", "Unexpected textflow id");
- // TODO also check comments?
- }
-
- @Test(expectedExceptions = InvalidPropertiesFormatException.class)
- public void extractTemplateNonTranslatableMismatchException() throws IOException, InvalidPropertiesFormatException
- {
- Resource srcDoc = new Resource("test");
- InputStream testStream = getResourceAsStream("test_non_trans_mismatch.properties");
- propReader.extractTemplate(srcDoc, testStream);
- }
-}
diff --git a/client/zanata-adapter-properties/src/test/resources/org/zanata/adapter/properties/test.properties b/client/zanata-adapter-properties/src/test/resources/org/zanata/adapter/properties/test.properties
deleted file mode 100644
index b16d79c7d1..0000000000
--- a/client/zanata-adapter-properties/src/test/resources/org/zanata/adapter/properties/test.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-# a source comment
-HELLO=Hello World
diff --git a/client/zanata-adapter-properties/src/test/resources/org/zanata/adapter/properties/test_fr.properties b/client/zanata-adapter-properties/src/test/resources/org/zanata/adapter/properties/test_fr.properties
deleted file mode 100644
index fed0ddcb15..0000000000
--- a/client/zanata-adapter-properties/src/test/resources/org/zanata/adapter/properties/test_fr.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-# a translator comment
-HELLO=Bonjour le Monde
diff --git a/client/zanata-adapter-properties/src/test/resources/org/zanata/adapter/properties/test_non_trans.properties b/client/zanata-adapter-properties/src/test/resources/org/zanata/adapter/properties/test_non_trans.properties
deleted file mode 100644
index 49adad8994..0000000000
--- a/client/zanata-adapter-properties/src/test/resources/org/zanata/adapter/properties/test_non_trans.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-# a source comment
-HELLO=Hello World
-
-# START NON-TRANSLATABLE
-# non-translatable source comment
-NONT=Hello Config
-
-# other non-translatable source comment
-NONT3=Goodbye Config
-# END NON-TRANSLATABLE
-
-# different source comment
-GOODBYE=Goodbye World
diff --git a/client/zanata-adapter-properties/src/test/resources/org/zanata/adapter/properties/test_non_trans_mismatch.properties b/client/zanata-adapter-properties/src/test/resources/org/zanata/adapter/properties/test_non_trans_mismatch.properties
deleted file mode 100644
index c4d0ab8896..0000000000
--- a/client/zanata-adapter-properties/src/test/resources/org/zanata/adapter/properties/test_non_trans_mismatch.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-# a source comment
-HELLO=Hello World
-
-# END NON-TRANSLATABLE
-
-GOODBYE=Goodbye World
\ No newline at end of file
diff --git a/client/zanata-adapter-properties/src/test/resources/org/zanata/adapter/properties/test_non_trans_nested.properties b/client/zanata-adapter-properties/src/test/resources/org/zanata/adapter/properties/test_non_trans_nested.properties
deleted file mode 100644
index 2467872674..0000000000
--- a/client/zanata-adapter-properties/src/test/resources/org/zanata/adapter/properties/test_non_trans_nested.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-# a source comment
-HELLO=Hello World
-
-# START NON-TRANSLATABLE
-# non-trans source comment
-NONT=Hello Config
-
-# START NON-TRANSLATABLE
-# non-trans source comment 2
-NONT2=Also this Config
-# END NON-TRANSLATABLE
-
-# this was non-translatable before
-NONT3=Goodbye Config
-# END NON-TRANSLATABLE
-
-# different source comment
-GOODBYE=Goodbye World
diff --git a/client/zanata-adapter-xliff/pom.xml b/client/zanata-adapter-xliff/pom.xml
deleted file mode 100644
index 278eef635f..0000000000
--- a/client/zanata-adapter-xliff/pom.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-
-
- 4.0.0
- zanata-adapter-xliff
- Zanata Adapter for XLIFF file
-
- org.zanata
- zanata-parent
- 1.5-SNAPSHOT
- ../../zanata-parent/pom.xml
-
- jar
-
-
-
- scm:git:git://github.com/zanata/zanata.git
- scm:git:git@github.com:zanata/zanata.git
- https://github.com/zanata/zanata
-
-
-
-
- org.zanata
- zanata-common-api
- ${project.version}
-
-
- org.zanata
- zanata-common-util
- ${project.version}
-
-
- org.slf4j
- slf4j-log4j12
- test
-
-
- org.slf4j
- slf4j-api
-
-
- stax
- stax
- 1.2.0
-
-
-
diff --git a/client/zanata-adapter-xliff/src/main/java/org/zanata/adapter/xliff/XliffCommon.java b/client/zanata-adapter-xliff/src/main/java/org/zanata/adapter/xliff/XliffCommon.java
deleted file mode 100644
index 8acf488740..0000000000
--- a/client/zanata-adapter-xliff/src/main/java/org/zanata/adapter/xliff/XliffCommon.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package org.zanata.adapter.xliff;
-
-public abstract class XliffCommon
-{
- protected static final String DELIMITER = "::";
-
- protected static final String ELE_FILE = "file";
- protected static final String ELE_TRANS_UNIT = "trans-unit";
- protected static final String ELE_SOURCE = "source";
- protected static final String ELE_CONTEXT_GROUP = "context-group";
- protected static final String ELE_CONTEXT = "context";
- protected static final String ELE_TARGET = "target";
- protected static final String ELE_BODY = "body";
-
- protected static final String ATTRI_SOURCE_LANGUAGE = "source-language";
- protected static final String ATTRI_TARGET_LANGUAGE = "target-language";
- protected static final String ATTRI_ID = "id";
- protected static final String ATTRI_CONTEXT_TYPE = "context-type";
- protected static final String ATTRI_NAME = "name";
- protected static final String ATTRI_DATATYPE = "datatype";
- protected static final String ATTRI_ORIGINAL = "original";
-
-}
diff --git a/client/zanata-adapter-xliff/src/main/java/org/zanata/adapter/xliff/XliffReader.java b/client/zanata-adapter-xliff/src/main/java/org/zanata/adapter/xliff/XliffReader.java
deleted file mode 100644
index 887fe84260..0000000000
--- a/client/zanata-adapter-xliff/src/main/java/org/zanata/adapter/xliff/XliffReader.java
+++ /dev/null
@@ -1,253 +0,0 @@
-package org.zanata.adapter.xliff;
-
-import javax.xml.stream.XMLInputFactory;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.events.XMLEvent;
-
-import org.apache.commons.lang.StringUtils;
-import org.xml.sax.InputSource;
-import org.zanata.common.ContentState;
-import org.zanata.common.ContentType;
-import org.zanata.common.LocaleId;
-import org.zanata.rest.dto.extensions.comment.SimpleComment;
-import org.zanata.rest.dto.resource.ExtensionSet;
-import org.zanata.rest.dto.resource.Resource;
-import org.zanata.rest.dto.resource.TextFlow;
-import org.zanata.rest.dto.resource.TextFlowTarget;
-import org.zanata.rest.dto.resource.TranslationsResource;
-
-/**
- * @author aeng
- *
- */
-public class XliffReader extends XliffCommon
-{
- LocaleId srcLang;
-
- public Resource extractTemplate(InputSource inputSource, LocaleId sourceLocaleId, String docName)
- {
- Resource document = new Resource(docName);
- document.setContentType(ContentType.TextPlain);
- document.setLang(sourceLocaleId);
- srcLang = sourceLocaleId;
- extractXliff(inputSource, document, null);
- return document;
- }
-
- public TranslationsResource extractTarget(InputSource inputSource)
- {
- TranslationsResource document = new TranslationsResource();
- extractXliff(inputSource, null, document);
- return document;
- }
-
- private void extractXliff(InputSource inputSource, Resource document, TranslationsResource transDoc)
- {
- try
- {
- XMLInputFactory xmlif = XMLInputFactory.newInstance();
- XMLStreamReader xmlr = xmlif.createXMLStreamReader(inputSource.getByteStream());
-
- while (xmlr.hasNext())
- {
- xmlr.next();
-
- if (xmlr.getEventType() == XMLEvent.COMMENT)
- {
- // at the moment, ignore comments
- // extractComment(xmlr);
- }
- else if (xmlr.isStartElement() && xmlr.getLocalName().equals(ELE_FILE))
- {
- // srcLang is passed as en-us by default
- // srcLang = new LocaleId(getAttributeValue(xmlr,
- // ATTRI_SOURCE_LANGUAGE));
- }
- else if (xmlr.isStartElement() && xmlr.getLocalName().equals(ELE_TRANS_UNIT))
- {
- if (document != null)
- {
- TextFlow textFlow = new TextFlow();
- extractTransUnit(xmlr, textFlow);
- document.getTextFlows().add(textFlow);
- }
- else
- {
- TextFlowTarget tfTarget = new TextFlowTarget();
- extractTransUnit(xmlr, tfTarget);
- if(!StringUtils.isEmpty(tfTarget.getContent())){
- tfTarget.setState(ContentState.Approved);
- transDoc.getTextFlowTargets().add(tfTarget);
- }
-
- }
- }
- else if (xmlr.isEndElement() && xmlr.getLocalName().equals(ELE_FILE))
- {
- // this is to ensure only 1 element in each xliff document
- break;
- }
- }
- }
- catch (XMLStreamException e)
- {
- throw new RuntimeException("Invalid XLIFF file format ", e);
- }
- }
-
-
- private void extractTransUnit(XMLStreamReader xmlr, TextFlow textFlow) throws XMLStreamException
- {
- Boolean endTransUnit = false;
- textFlow.setId(getAttributeValue(xmlr, ATTRI_ID));
-
- while (xmlr.hasNext() && !endTransUnit)
- {
- xmlr.next();
- if (xmlr.isEndElement() && xmlr.getLocalName().equals(ELE_TRANS_UNIT))
- endTransUnit = true;
- else
- {
- if (xmlr.isStartElement() && xmlr.getLocalName().equals(ELE_SOURCE))
- {
- textFlow.setContent(getElementValue(xmlr));
- }
- else if (xmlr.isStartElement() && xmlr.getLocalName().equals(ELE_CONTEXT_GROUP))
- {
- textFlow.getExtensions(true).addAll(extractContextList(xmlr));
- }
- }
- }
- textFlow.setLang(srcLang);
- }
-
- private void extractTransUnit(XMLStreamReader xmlr, TextFlowTarget textFlow) throws XMLStreamException
- {
- Boolean endTransUnit = false;
- textFlow.setResId(getAttributeValue(xmlr, ATTRI_ID));
-
- while (xmlr.hasNext() && !endTransUnit)
- {
- xmlr.next();
- if (xmlr.isEndElement() && xmlr.getLocalName().equals(ELE_TRANS_UNIT))
- endTransUnit = true;
- else
- {
- if (xmlr.isStartElement() && xmlr.getLocalName().equals(ELE_TARGET))
- {
- textFlow.setContent(getElementValue(xmlr));
- }
- else if (xmlr.isStartElement() && xmlr.getLocalName().equals(ELE_CONTEXT_GROUP))
- {
- textFlow.getExtensions(true).addAll(extractContextList(xmlr));
- }
- }
- }
- }
-
- /**
- * Extract context list
- *
- * @param xmlr
- * @return
- * @throws XMLStreamException
- */
- private ExtensionSet extractContextList(XMLStreamReader xmlr) throws XMLStreamException
- {
- ExtensionSet contextList = new ExtensionSet();
- Boolean endContextGroup = false;
- String contextGroup = getAttributeValue(xmlr, ATTRI_NAME);
-
- while (xmlr.hasNext() && !endContextGroup)
- {
- xmlr.next();// move to context tag
- if (xmlr.isEndElement() && xmlr.getLocalName().equals(ELE_CONTEXT_GROUP))
- endContextGroup = true;
- else
- {
- if (xmlr.isStartElement() && xmlr.getLocalName().equals(ELE_CONTEXT))
- {
- StringBuilder sb = new StringBuilder();
- sb.append(contextGroup);// context-group
- sb.append(DELIMITER);
- sb.append(getAttributeValue(xmlr, ATTRI_CONTEXT_TYPE));// context-type
- sb.append(DELIMITER);
- sb.append(getElementValue(xmlr));// value
- contextList.add(new SimpleComment(sb.toString()));
- }
- }
- }
- return contextList;
- }
-
- /**
- * Extract given element's value
- *
- * @param currentCursor
- * @return
- * @throws XMLStreamException
- */
- private String getElementValue(XMLStreamReader currentCursor) throws XMLStreamException
- {
- currentCursor.next();
- if (currentCursor.hasText())
- return currentCursor.getText();
-
- return null;
- }
-
- /**
- * Extract given attribute's value
- *
- * @param xmlr
- * @param attrKey
- * @return
- */
- private String getAttributeValue(XMLStreamReader xmlr, String attrKey)
- {
- int count = xmlr.getAttributeCount();
-
- if (count > 0)
- {
- for (int i = 0; i < count; i++)
- {
- if (xmlr.getAttributeLocalName(i).equals(attrKey))
- return xmlr.getAttributeValue(i);
- }
- }
- return null;
- }
-
- // private static String getEventTypeString(int eventType)
- // {
- // switch (eventType)
- // {
- // case XMLEvent.START_ELEMENT:
- // return "START_ELEMENT";
- // case XMLEvent.END_ELEMENT:
- // return "END_ELEMENT";
- // case XMLEvent.PROCESSING_INSTRUCTION:
- // return "PROCESSING_INSTRUCTION";
- // case XMLEvent.CHARACTERS:
- // return "CHARACTERS";
- // case XMLEvent.COMMENT:
- // return "COMMENT";
- // case XMLEvent.START_DOCUMENT:
- // return "START_DOCUMENT";
- // case XMLEvent.END_DOCUMENT:
- // return "END_DOCUMENT";
- // case XMLEvent.ENTITY_REFERENCE:
- // return "ENTITY_REFERENCE";
- // case XMLEvent.ATTRIBUTE:
- // return "ATTRIBUTE";
- // case XMLEvent.DTD:
- // return "DTD";
- // case XMLEvent.CDATA:
- // return "CDATA";
- // case XMLEvent.SPACE:
- // return "SPACE";
- // }
- // return "UNKNOWN_EVENT_TYPE , " + eventType;
- // }
-}
diff --git a/client/zanata-adapter-xliff/src/main/java/org/zanata/adapter/xliff/XliffWriter.java b/client/zanata-adapter-xliff/src/main/java/org/zanata/adapter/xliff/XliffWriter.java
deleted file mode 100644
index ff7b818020..0000000000
--- a/client/zanata-adapter-xliff/src/main/java/org/zanata/adapter/xliff/XliffWriter.java
+++ /dev/null
@@ -1,183 +0,0 @@
-package org.zanata.adapter.xliff;
-
-import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.xml.stream.XMLOutputFactory;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamWriter;
-
-import org.zanata.rest.dto.extensions.comment.SimpleComment;
-import org.zanata.rest.dto.extensions.gettext.TextFlowExtension;
-import org.zanata.rest.dto.resource.Resource;
-import org.zanata.rest.dto.resource.TextFlow;
-import org.zanata.rest.dto.resource.TextFlowTarget;
-import org.zanata.rest.dto.resource.TranslationsResource;
-import org.zanata.util.PathUtil;
-
-import com.sun.xml.txw2.output.IndentingXMLStreamWriter;
-
-public class XliffWriter extends XliffCommon
-{
- // Write document header with XML, xliff, file and body tag
- private static void writeHeader(IndentingXMLStreamWriter writer, Resource doc, String targetLocale) throws XMLStreamException
- {
- // XML tag
- writer.writeStartDocument("utf-8", "1.0");
- writer.writeComment("XLIFF document generated by Zanata. Visit http://zanata.org for more infomation.");
- writer.writeCharacters("\n");
- // XLiff tag
- writer.writeStartElement("xliff");
- writer.writeNamespace("", "urn:oasis:names:tc:xliff:document:1.1");
- writer.writeNamespace("xyz", "urn:appInfo:Items");
- writer.writeNamespace("xsi", "http://www.w3.org/2001/XMLSchema-instance");
- writer.writeAttribute("xsi:schemaLocation", "urn:oasis:names:tc:xliff:document:1.1 http://www.oasis-open.org/committees/xliff/documents/xliff-core-1.1.xsd");
- writer.writeAttribute("version", "1.1");
-
- // file tag
- writer.writeStartElement(ELE_FILE);
- writer.writeAttribute(ATTRI_SOURCE_LANGUAGE, doc.getLang().getId());
- writer.writeAttribute(ATTRI_DATATYPE, "plaintext");
- writer.writeAttribute(ATTRI_ORIGINAL, "");
- if (targetLocale != null)
- {
- writer.writeAttribute(ATTRI_TARGET_LANGUAGE, targetLocale);
- }
-
- // body tag
- writer.writeStartElement(ELE_BODY);
- }
-
- private static void writeTransUnits(IndentingXMLStreamWriter writer, Resource doc, TranslationsResource targetDoc) throws XMLStreamException
- {
- Map targets = Collections.emptyMap();
- if (targetDoc != null)
- {
- targets = new HashMap();
- for (TextFlowTarget target : targetDoc.getTextFlowTargets())
- {
- targets.put(target.getResId(), target);
- }
- }
- for (TextFlow textFlow : doc.getTextFlows())
- {
- writer.writeStartElement(ELE_TRANS_UNIT);
- writer.writeAttribute(ATTRI_ID, textFlow.getId());
- writeTransUnitSource(writer, textFlow);
- writeTransUnitContext(writer, textFlow);
- TextFlowTarget target = targets.get(textFlow.getId());
- if (target != null)
- {
- writeTransUnitTarget(writer, target);
- }
- writer.writeEndElement();// end trans-unit tag
- }
- }
-
- private static void writeTransUnitSource(IndentingXMLStreamWriter writer, TextFlow textFlow) throws XMLStreamException
- {
- writer.writeStartElement(ELE_SOURCE);
- writer.writeCharacters(textFlow.getContent());
- writer.writeEndElement();// end source tag
- }
-
- private static void writeTransUnitTarget(IndentingXMLStreamWriter writer, TextFlowTarget target) throws XMLStreamException
- {
- writer.writeStartElement(ELE_TARGET);
- writer.writeCharacters(target.getContent());
- writer.writeEndElement();// end target tag
- }
-
- private static void writeTransUnitContext(IndentingXMLStreamWriter writer, TextFlow textFlow) throws XMLStreamException
- {
- if (!textFlow.getExtensions(true).isEmpty())
- {
- Map> contextGroupMap = new HashMap>();
-
- for (TextFlowExtension textFlowExtension : textFlow.getExtensions())
- {
- SimpleComment comment = (SimpleComment) textFlowExtension;
- String[] contextValues = comment.getValue().split(DELIMITER);
- if (!contextGroupMap.containsKey(contextValues[0]))
- {
- ArrayList list = new ArrayList();
- list.add(new String[] { contextValues[1], contextValues[2] });
- contextGroupMap.put(contextValues[0], list);
- }
- else
- {
- ArrayList list = contextGroupMap.get(contextValues[0]);
- list.add(new String[] { contextValues[1], contextValues[2] });
- }
-
- }
-
- for (String key : contextGroupMap.keySet())
- {
- ArrayList values = contextGroupMap.get(key);
-
- writer.writeStartElement(ELE_CONTEXT_GROUP);
- writer.writeAttribute(ATTRI_NAME, key);
-
- for (String[] val : values)
- {
- writer.writeStartElement(ELE_CONTEXT);
- writer.writeAttribute(ATTRI_CONTEXT_TYPE, val[0]);
- writer.writeCharacters(val[1]);
- writer.writeEndElement();// end context
- }
-
- writer.writeEndElement();// end context-group
- }
- }
- }
-
- /**
- * @param baseDir
- * @param doc
- * @param javaLocale
- * @param targetDoc may be null
- */
- public static void write(File baseDir, Resource doc, String javaLocale, TranslationsResource targetDoc)
- {
- try
- {
- XMLOutputFactory output = XMLOutputFactory.newInstance();
- File outFile = new File(baseDir, doc.getName() + "_" + javaLocale + ".xml");
- PathUtil.makeParents(outFile);
- XMLStreamWriter xmlStreamWriter = output.createXMLStreamWriter(new FileWriter(outFile));
- IndentingXMLStreamWriter writer = new IndentingXMLStreamWriter(xmlStreamWriter);
-
- if (targetDoc != null)
- writeHeader(writer, doc, javaLocale);
- else
- writeHeader(writer, doc, null);
- writeTransUnits(writer, doc, targetDoc);
-
- writer.writeEndElement(); // end body tag
- writer.writeEndElement(); // end file tag
- writer.writeEndDocument(); // end Xliff tag
- writer.flush();
- writer.close();
- }
- catch (XMLStreamException e)
- {
- throw new RuntimeException("Error generating XLIFF file format ", e);
- }
- catch (IOException e)
- {
- throw new RuntimeException("Error writing XLIFF file ", e);
- }
- }
-
- public static void write(File baseDir, Resource doc, String javaLocale)
- {
- write(baseDir, doc, javaLocale, null);
- }
-
-}
diff --git a/client/zanata-adapter-xliff/src/test/java/org/zanata/adapter/xliff/XliffReaderTest.java b/client/zanata-adapter-xliff/src/test/java/org/zanata/adapter/xliff/XliffReaderTest.java
deleted file mode 100644
index a787ad55a6..0000000000
--- a/client/zanata-adapter-xliff/src/test/java/org/zanata/adapter/xliff/XliffReaderTest.java
+++ /dev/null
@@ -1,84 +0,0 @@
-package org.zanata.adapter.xliff;
-
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.Matchers.equalTo;
-import static org.hamcrest.Matchers.is;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-
-import org.testng.annotations.BeforeTest;
-import org.testng.annotations.Test;
-import org.xml.sax.InputSource;
-import org.zanata.common.LocaleId;
-import org.zanata.rest.dto.resource.Resource;
-import org.zanata.rest.dto.resource.TextFlow;
-import org.zanata.rest.dto.resource.TextFlowTarget;
-import org.zanata.rest.dto.resource.TranslationsResource;
-
-@Test(groups = { "unit-tests" })
-public class XliffReaderTest
-{
- private static final String TEST_DIR = "src/test/resources/";
- private static final String DOC_NAME = "StringResource_en_US.xml";
- private XliffReader reader;
-
- @BeforeTest
- public void resetReader()
- {
- reader = new XliffReader();
- }
-
- @Test
- public void extractTemplateSizeTest() throws FileNotFoundException
- {
- Resource doc = getTemplateDoc();
-
- assertThat(doc.getName(), equalTo(DOC_NAME));
- assertThat(doc.getTextFlows().size(), is(3));
- }
-
- @Test
- public void templateFirstAndLastTextFlowTest() throws FileNotFoundException
- {
- Resource doc = getTemplateDoc();
-
- TextFlow firstTextFlow = doc.getTextFlows().get(0);
- TextFlow lastTextFlow = doc.getTextFlows().get(doc.getTextFlows().size() - 1);
-
- assertThat(firstTextFlow.getContent(), equalTo("Translation Unit 1"));
- assertThat(lastTextFlow.getContent(), equalTo("Translation Unit 3"));
- }
-
- @Test
- public void extractTargetSizeTest() throws FileNotFoundException
- {
- File fileTarget = new File(TEST_DIR, "/StringResource_de.xml");
- InputSource inputSource = new InputSource(new FileInputStream(fileTarget));
- TranslationsResource tr = reader.extractTarget(inputSource);
- assertThat(tr.getTextFlowTargets().size(), is(2));
- }
-
- @Test
- public void targetFirstAndLastTextFlowTest() throws FileNotFoundException
- {
- File fileTarget = new File(TEST_DIR, "/StringResource_de.xml");
- InputSource inputSource = new InputSource(new FileInputStream(fileTarget));
- TranslationsResource tr = reader.extractTarget(inputSource);
-
- TextFlowTarget firstTextFlow = tr.getTextFlowTargets().get(0);
- TextFlowTarget lastTextFlow = tr.getTextFlowTargets().get(tr.getTextFlowTargets().size() - 1);
-
- assertThat(firstTextFlow.getContent(), equalTo("Translation 1"));
- assertThat(lastTextFlow.getContent(), equalTo("Translation 3"));
- }
-
-
- private Resource getTemplateDoc() throws FileNotFoundException
- {
- File file = new File(TEST_DIR, File.separator + DOC_NAME);
- InputSource inputSource = new InputSource(new FileInputStream(file));
- return reader.extractTemplate(inputSource, LocaleId.EN_US, DOC_NAME);
- }
-}
diff --git a/client/zanata-adapter-xliff/src/test/java/org/zanata/adapter/xliff/XliffWriterTest.java b/client/zanata-adapter-xliff/src/test/java/org/zanata/adapter/xliff/XliffWriterTest.java
deleted file mode 100644
index 9fbc0b949c..0000000000
--- a/client/zanata-adapter-xliff/src/test/java/org/zanata/adapter/xliff/XliffWriterTest.java
+++ /dev/null
@@ -1,68 +0,0 @@
-package org.zanata.adapter.xliff;
-
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.Matchers.equalTo;
-import static org.hamcrest.Matchers.is;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-
-import org.testng.annotations.Test;
-import org.xml.sax.InputSource;
-import org.zanata.common.LocaleId;
-import org.zanata.rest.dto.resource.Resource;
-import org.zanata.rest.dto.resource.TextFlow;
-
-@Test(groups = { "unit-tests" })
-public class XliffWriterTest
-{
- private String testDir = "src/test/resources/";
- private String generateDir = "target/xliffGenerate/";
- private String generatedDocName = "Generated_StringResource";
- private String generatedDocFileName = generatedDocName + "_en_US.xml";
-
- XliffReader reader;
-
- @Test
- public void checkTransUnit() throws FileNotFoundException
- {
- prepareTemplateDoc();
-
- File generatedFile = new File(generateDir, "/" + generatedDocFileName);
- InputSource inputSource = new InputSource(new FileInputStream(generatedFile));
- Resource doc = reader.extractTemplate(inputSource, LocaleId.EN_US, generatedDocName);
-
- TextFlow firstTextFlow = doc.getTextFlows().get(0);
- TextFlow lastTextFlow = doc.getTextFlows().get(doc.getTextFlows().size() - 1);
-
- assertThat(firstTextFlow.getContent(), equalTo("Translation Unit 1"));
- assertThat(lastTextFlow.getContent(), equalTo("Translation Unit 3"));
- }
-
- @Test
- public void extractSizeTest() throws FileNotFoundException
- {
- prepareTemplateDoc();
-
- File generatedFile = new File(generateDir, "/" + generatedDocFileName);
- InputSource inputSource = new InputSource(new FileInputStream(generatedFile));
- Resource doc = reader.extractTemplate(inputSource, LocaleId.EN_US, generatedDocName);
-
- assertThat(doc.getTextFlows().size(), is(3));
- }
-
- private void prepareTemplateDoc() throws FileNotFoundException
- {
- String docName = "StringResource_en_US.xml";
-
- reader = new XliffReader();
-
- File file = new File(testDir, "/" + docName);
- InputSource inputSource = new InputSource(new FileInputStream(file));
- Resource doc = reader.extractTemplate(inputSource, LocaleId.EN_US, docName);
- doc.setName(generatedDocName);
-
- XliffWriter.write(new File(generateDir), doc, "en_US");
- }
-}
diff --git a/client/zanata-adapter-xliff/src/test/resources/StringResource_de.xml b/client/zanata-adapter-xliff/src/test/resources/StringResource_de.xml
deleted file mode 100644
index 9e7cf185fe..0000000000
--- a/client/zanata-adapter-xliff/src/test/resources/StringResource_de.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
- Translation Unit 1
- Translation 1
-
- /test/file1
-
-
-
- Translation Unit 2
-
- /test/file2
-
-
-
-
- /test/file3
-
-
- Translation Unit 3
- Translation 3
-
-
-
-
-
\ No newline at end of file
diff --git a/client/zanata-adapter-xliff/src/test/resources/StringResource_en_US.xml b/client/zanata-adapter-xliff/src/test/resources/StringResource_en_US.xml
deleted file mode 100644
index 47efaaced2..0000000000
--- a/client/zanata-adapter-xliff/src/test/resources/StringResource_en_US.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
-
- Translation Unit 1
-
- /test/file1
-
-
-
- Translation Unit 2
-
- /test/file2
-
-
-
-
- /test/file3
-
-
- Translation Unit 3
-
-
-
-
-
diff --git a/client/zanata-client-ant-po/eclipse/DownloadPoTask --help.launch b/client/zanata-client-ant-po/eclipse/DownloadPoTask --help.launch
deleted file mode 100644
index 1a6c54fed7..0000000000
--- a/client/zanata-client-ant-po/eclipse/DownloadPoTask --help.launch
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/client/zanata-client-ant-po/eclipse/DownloadPoTask.launch b/client/zanata-client-ant-po/eclipse/DownloadPoTask.launch
deleted file mode 100644
index 7cc47297e0..0000000000
--- a/client/zanata-client-ant-po/eclipse/DownloadPoTask.launch
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/client/zanata-client-ant-po/eclipse/UploadPoTask --help.launch b/client/zanata-client-ant-po/eclipse/UploadPoTask --help.launch
deleted file mode 100644
index 4c17e2e63c..0000000000
--- a/client/zanata-client-ant-po/eclipse/UploadPoTask --help.launch
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/client/zanata-client-ant-po/eclipse/UploadPoTask hudson.launch b/client/zanata-client-ant-po/eclipse/UploadPoTask hudson.launch
deleted file mode 100644
index 876dce4175..0000000000
--- a/client/zanata-client-ant-po/eclipse/UploadPoTask hudson.launch
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/client/zanata-client-ant-po/eclipse/UploadPoTask localhost.launch b/client/zanata-client-ant-po/eclipse/UploadPoTask localhost.launch
deleted file mode 100644
index f9dcec554a..0000000000
--- a/client/zanata-client-ant-po/eclipse/UploadPoTask localhost.launch
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/client/zanata-client-ant-po/flies-ant-demo/build.xml b/client/zanata-client-ant-po/flies-ant-demo/build.xml
deleted file mode 100644
index 9d949337df..0000000000
--- a/client/zanata-client-ant-po/flies-ant-demo/build.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/client/zanata-client-ant-po/flies-ant-demo/pom.xml b/client/zanata-client-ant-po/flies-ant-demo/pom.xml
deleted file mode 100644
index 5dcd505e36..0000000000
--- a/client/zanata-client-ant-po/flies-ant-demo/pom.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-
- 4.0.0
- null
- null
- 0
-
-
-
- org.zanata
- zanata-client-ant-po
- 1.0-SNAPSHOT
-
-
- org.jboss.resteasy
- resteasy-atom-provider
-
-
-
-
- org.slf4j
- slf4j-log4j12
- 1.6.1
-
-
-
diff --git a/client/zanata-client-ant-po/flies-ant-demo/taskdefs.xml b/client/zanata-client-ant-po/flies-ant-demo/taskdefs.xml
deleted file mode 100644
index 4d5d921b4c..0000000000
--- a/client/zanata-client-ant-po/flies-ant-demo/taskdefs.xml
+++ /dev/null
@@ -1,76 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/client/zanata-client-ant-po/flies-ant-demo/test1/foo/foo.properties b/client/zanata-client-ant-po/flies-ant-demo/test1/foo/foo.properties
deleted file mode 100644
index e27eab1c01..0000000000
--- a/client/zanata-client-ant-po/flies-ant-demo/test1/foo/foo.properties
+++ /dev/null
@@ -1 +0,0 @@
-FOOD=Slime Mould
diff --git a/client/zanata-client-ant-po/flies-ant-demo/test1/foo/foo_de.properties b/client/zanata-client-ant-po/flies-ant-demo/test1/foo/foo_de.properties
deleted file mode 100644
index ecba6037b3..0000000000
--- a/client/zanata-client-ant-po/flies-ant-demo/test1/foo/foo_de.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-# This should be treated as a translator comment
-FOOD=Sauerkraut
diff --git a/client/zanata-client-ant-po/flies-ant-demo/test1/test.properties b/client/zanata-client-ant-po/flies-ant-demo/test1/test.properties
deleted file mode 100644
index 5445564340..0000000000
--- a/client/zanata-client-ant-po/flies-ant-demo/test1/test.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-# This is a test comment with a leading space.
-# Note that comments without leading spaces will have one added,
-# and footer comments will not be preserved.
-# Also, if the final line does not end with a newline, one will be added.
-HELLO=Hello World
diff --git a/client/zanata-client-ant-po/flies-ant-demo/test1/test_fr.properties b/client/zanata-client-ant-po/flies-ant-demo/test1/test_fr.properties
deleted file mode 100644
index 831619bea0..0000000000
--- a/client/zanata-client-ant-po/flies-ant-demo/test1/test_fr.properties
+++ /dev/null
@@ -1 +0,0 @@
-HELLO=Bonjour le Monde
diff --git a/client/zanata-client-ant-po/pom.xml b/client/zanata-client-ant-po/pom.xml
deleted file mode 100644
index e42b671414..0000000000
--- a/client/zanata-client-ant-po/pom.xml
+++ /dev/null
@@ -1,232 +0,0 @@
-
-
- 4.0.0
- zanata-client-ant-po
- Zanata / REST Ant Task for Gettext PO / Publican
-
- org.zanata
- zanata-parent
- 1.5-SNAPSHOT
- ../../zanata-parent/pom.xml
-
-
-
-
- scm:git:git://github.com/zanata/zanata.git
- scm:git:git@github.com:zanata/zanata.git
- https://github.com/zanata/zanata
-
-
-
-
- org.zanata
- zanata-adapter-po
- ${project.version}
-
-
- org.zanata
- zanata-rest-client
- ${project.version}
-
-
- org.zanata
- zanata-client-commands
- ${project.version}
-
-
- junit
- junit
- 3.8.1
- test
-
-
- org.apache.ant
- ant
- 1.7.1
- compile
-
-
-
- org.apache.ant
- ant-launcher
- 1.7.1
- test
-
-
- org.apache.ant
- ant-testutil
- 1.7.1
- test
-
-
- org.slf4j
- slf4j-log4j12
- runtime
-
-
- args4j
- args4j
- 2.0.13
-
-
-
-
-
- org.apache.maven.plugins
- maven-jar-plugin
-
-
-
- true
- true
- ../../../../../
- org.zanata.client.ant.po.PoTool
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-surefire-plugin
- 2.6
-
-
- none:none
-
- **/RemoteTest.java
-
-
-
-
-
-
- org.codehaus.mojo
- appassembler-maven-plugin
- 1.0
-
-
-
- org.zanata.client.ant.po.PoTool
- zanata-publican
-
-
-
-
-
-
-
-
- buildrpm
-
-
- buildrpm
- true
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-dependency-plugin
-
-
- package
-
- copy-dependencies
-
-
-
-
- target/lib
- true
- true
- true
- runtime
- provided
- true
-
-
-
-
-
- org.codehaus.mojo
- rpm-maven-plugin
- 2.0.1
-
-
-
- rpm
-
-
-
-
-
- zanata-publican
- Publican client for Zanata
-
- zanata
- LGPLv2.1+
- /usr
-
-
- /usr/bin
- 755
- root
- root
-
-
- src/main/bin
-
-
-
-
- /usr/share/zanata-publican/org/zanata/zanata-client-ant-po/${project.version}/
- 755
- root
- root
-
-
- target/zanata-client-ant-po-${project.version}.jar
-
-
-
-
- /usr/share/zanata-publican
- 755
- root
- root
-
-
- target/lib
-
-
-
-
-
-
-
-
- java >= 1:1.6.0
- jpackage-utils
-
-
-
-
-
-
-
-
diff --git a/client/zanata-client-ant-po/src/main/java/org/zanata/client/ant/po/ConfigurableProjectTask.java b/client/zanata-client-ant-po/src/main/java/org/zanata/client/ant/po/ConfigurableProjectTask.java
deleted file mode 100644
index 5b27c6e4ba..0000000000
--- a/client/zanata-client-ant-po/src/main/java/org/zanata/client/ant/po/ConfigurableProjectTask.java
+++ /dev/null
@@ -1,69 +0,0 @@
-package org.zanata.client.ant.po;
-
-
-import org.kohsuke.args4j.Option;
-import org.zanata.client.config.LocaleList;
-
-public abstract class ConfigurableProjectTask extends ConfigurableTask
-{
- private String projectConfig = "zanata.xml";
-
- private String project;
- private String projectVersion;
- private String projectType;
- private LocaleList locales;
-
- public String getProj()
- {
- return project;
- }
-
- @Option(name = "--project", metaVar = "PROJ", usage = "Project ID. This value is required unless specified in zanata.xml.")
- public void setProj(String projectSlug)
- {
- this.project = projectSlug;
- }
-
- @Option(name = "--project-config", metaVar = "FILENAME", usage = "Project configuration, eg zanata.xml", required = false)
- public void setProjectConfig(String projectConfig)
- {
- this.projectConfig = projectConfig;
- }
-
- public String getProjectVersion()
- {
- return projectVersion;
- }
-
- @Option(name = "--project-version", metaVar = "VER", usage = "Project version ID This value is required unless specified in zanata.xml.")
- public void setProjectVersion(String versionSlug)
- {
- this.projectVersion = versionSlug;
- }
-
- public String getProjectType()
- {
- return projectType;
- }
-
- @Option(name = "--project-type", metaVar = "PROJTYPE", usage = "Type of project ('properties' = Java .properties, 'podir' = publican-style gettext directories)")
- public void setProjectType(String projectType)
- {
- this.projectType = projectType;
- }
-
- public String getProjectConfig()
- {
- return projectConfig;
- }
-
- public LocaleList getLocales()
- {
- return locales;
- }
-
- public void setLocales(LocaleList locales)
- {
- this.locales = locales;
- }
-}
diff --git a/client/zanata-client-ant-po/src/main/java/org/zanata/client/ant/po/ConfigurableTask.java b/client/zanata-client-ant-po/src/main/java/org/zanata/client/ant/po/ConfigurableTask.java
deleted file mode 100644
index 434d1c9b5b..0000000000
--- a/client/zanata-client-ant-po/src/main/java/org/zanata/client/ant/po/ConfigurableTask.java
+++ /dev/null
@@ -1,76 +0,0 @@
-package org.zanata.client.ant.po;
-
-import java.io.File;
-import java.net.URL;
-
-import org.kohsuke.args4j.Option;
-
-public abstract class ConfigurableTask extends ZanataTask
-{
- /**
- * Client configuration file.
- */
- private File userConfig = new File(System.getProperty("user.home"), ".config/zanata.ini");
-
- /**
- * Base URL for the server. Defaults to the value in zanata.xml.
- */
- private URL url;
-
- /**
- * Username for accessing the REST API. Defaults to the value in
- * zanata.ini.
- */
- private String username;
-
- /**
- * API key for accessing the REST API. Defaults to the value in
- * zanata.ini.
- */
- private String key;
-
- public String getKey()
- {
- return key;
- }
-
- @Option(name = "--key", metaVar = "KEY", usage = "API key (from user's profile page)")
- public void setKey(String key)
- {
- this.key = key;
- }
-
- public URL getUrl()
- {
- return url;
- }
-
- @Option(name = "--url", metaVar = "URL", usage = "Base URL, eg http://zanata.example.com/zanata/")
- public void setUrl(URL url)
- {
- this.url = url;
- }
-
- @Option(name = "--user-config", metaVar = "FILE", usage = "User configuration, eg /home/user/.config/zanata.ini")
- public void setUserConfig(File userConfig)
- {
- this.userConfig = userConfig;
- }
-
- public String getUsername()
- {
- return username;
- }
-
- @Option(name = "--username", metaVar = "USER", usage = "Username")
- public void setUsername(String username)
- {
- this.username = username;
- }
-
- public File getUserConfig()
- {
- return userConfig;
- }
-
-}
diff --git a/client/zanata-client-ant-po/src/main/java/org/zanata/client/ant/po/CreateIterationTask.java b/client/zanata-client-ant-po/src/main/java/org/zanata/client/ant/po/CreateIterationTask.java
deleted file mode 100644
index 328486a57c..0000000000
--- a/client/zanata-client-ant-po/src/main/java/org/zanata/client/ant/po/CreateIterationTask.java
+++ /dev/null
@@ -1,66 +0,0 @@
-package org.zanata.client.ant.po;
-
-import org.kohsuke.args4j.Option;
-import org.zanata.client.commands.ArgsUtil;
-import org.zanata.client.commands.PutVersionCommand;
-import org.zanata.client.commands.PutVersionOptions;
-import org.zanata.client.commands.ZanataCommand;
-
-public class CreateIterationTask extends ConfigurableTask implements PutVersionOptions
-{
- // private static final Logger log =
- // LoggerFactory.getLogger(CreateIterationTask.class);
-
- private String proj;
- private String iter;
-
- public static void main(String[] args)
- {
- CreateIterationTask task = new CreateIterationTask();
- ArgsUtil.processArgs(args, task);
- }
-
- @Override
- public String getCommandName()
- {
- return "createiter";
- }
-
- @Override
- public String getCommandDescription()
- {
- return "Creates a project version";
- }
-
-
- @Option(name = "--proj", metaVar = "PROJ", usage = "Project ID", required = true)
- public void setVersionProject(String id)
- {
- this.proj = id;
- }
-
- @Option(name = "--version-slug", metaVar = "VER", usage = "Project version ID", required = true)
- public void setVersionSlug(String id)
- {
- this.iter = id;
- }
-
- @Override
- public ZanataCommand initCommand()
- {
- return new PutVersionCommand(this);
- }
-
-
- public String getVersionProject()
- {
- return this.proj;
- }
-
- @Override
- public String getVersionSlug()
- {
- return this.iter;
- }
-
-}
diff --git a/client/zanata-client-ant-po/src/main/java/org/zanata/client/ant/po/CreateProjectTask.java b/client/zanata-client-ant-po/src/main/java/org/zanata/client/ant/po/CreateProjectTask.java
deleted file mode 100644
index 17e721aacd..0000000000
--- a/client/zanata-client-ant-po/src/main/java/org/zanata/client/ant/po/CreateProjectTask.java
+++ /dev/null
@@ -1,122 +0,0 @@
-package org.zanata.client.ant.po;
-
-
-import org.kohsuke.args4j.Option;
-import org.zanata.client.commands.ArgsUtil;
-import org.zanata.client.commands.PutProjectCommand;
-import org.zanata.client.commands.PutProjectOptions;
-import org.zanata.client.commands.ZanataCommand;
-
-public class CreateProjectTask extends ConfigurableTask implements PutProjectOptions
-{
- // private static final Logger log =
- // LoggerFactory.getLogger(CreateProjectTask.class);
-
- private String proj;
- private String name;
- private String desc;
- private String projectSlug;
- private String projectName;
- private String projectDesc;
-
- public static void main(String[] args)
- {
- CreateProjectTask task = new CreateProjectTask();
- ArgsUtil.processArgs(args, task);
- }
-
- @Override
- public String getCommandName()
- {
- return "createproj";
- }
-
- @Override
- public String getCommandDescription()
- {
- return "Creates a project";
- }
-
-
- @Option(name = "--proj", metaVar = "PROJ", usage = "Project ID", required = true)
- public void setVersionProject(String id)
- {
- this.proj = id;
- }
-
- @Option(name = "--version-name", metaVar = "NAME", usage = "Project version name", required = true)
- public void setVersionName(String name)
- {
- this.name = name;
- }
-
- @Option(name = "--version-desc", metaVar = "DESC", usage = "Project version description", required = true)
- public void setVersionDesc(String desc)
- {
- this.desc = desc;
- }
-
-
- @Override
- public ZanataCommand initCommand()
- {
- return new PutProjectCommand(this);
- }
-
-
-
- public String getVersionProject()
- {
- return this.proj;
- }
-
-
- public String getVersionDesc()
- {
- return this.desc;
- }
-
- public String getVersionName()
- {
- return this.name;
- }
-
- @Option(name = "--project-slug", metaVar = "PROJ", usage = "Project ID", required = true)
- public void setProjectSlug(String id)
- {
- this.projectSlug = id;
- }
-
- @Override
- @Option(name = "--project-name", metaVar = "NAME", required = true, usage = "Project name")
- public void setProjectName(String name)
- {
- this.projectName = name;
- }
-
- @Override
- @Option(name = "--project-desc", metaVar = "DESC", required = true, usage = "Project description")
- public void setProjectDesc(String desc)
- {
- this.projectDesc = desc;
- }
-
- @Override
- public String getProjectSlug()
- {
- return projectSlug;
- }
-
- @Override
- public String getProjectDesc()
- {
- return projectDesc;
- }
-
- @Override
- public String getProjectName()
- {
- return projectName;
- }
-
-}
diff --git a/client/zanata-client-ant-po/src/main/java/org/zanata/client/ant/po/DownloadPoTask.java b/client/zanata-client-ant-po/src/main/java/org/zanata/client/ant/po/DownloadPoTask.java
deleted file mode 100644
index 67c0241dc4..0000000000
--- a/client/zanata-client-ant-po/src/main/java/org/zanata/client/ant/po/DownloadPoTask.java
+++ /dev/null
@@ -1,136 +0,0 @@
-package org.zanata.client.ant.po;
-
-import java.io.File;
-
-
-import org.kohsuke.args4j.Option;
-import org.zanata.client.commands.ArgsUtil;
-import org.zanata.client.commands.PublicanPullCommand;
-import org.zanata.client.commands.PublicanPullOptions;
-import org.zanata.client.commands.ZanataCommand;
-import org.zanata.client.config.LocaleList;
-
-public class DownloadPoTask extends ConfigurableProjectTask implements PublicanPullOptions
-{
- private String projectConfig = "zanata.xml";
-
- private String project;
- private String projectVersion;
- private LocaleList locales;
- private File dstDir;
- private File dstDirPot;
- private boolean exportPot;
-
- public static void main(String[] args)
- {
- DownloadPoTask task = new DownloadPoTask();
- ArgsUtil.processArgs(args, task);
- }
-
- @Override
- public String getCommandName()
- {
- return "downloadpo";
- }
-
- @Override
- public String getCommandDescription()
- {
- return "Downloads a Publican project's PO/POT files from the server after translation, to allow document generation";
- }
-
- @Override
- public ZanataCommand initCommand()
- {
- return new PublicanPullCommand(this);
- }
-
- public String getProj()
- {
- return project;
- }
-
- @Option(name = "--project", metaVar = "PROJ", usage = "Project ID. This value is required unless specified in zanata.xml.")
- public void setProj(String projectSlug)
- {
- this.project = projectSlug;
- }
-
- @Override
- @Option(name = "--project-config", metaVar = "FILENAME", usage = "Project configuration file, eg zanata.xml", required = false)
- public void setProjectConfig(String projectConfig)
- {
- this.projectConfig = projectConfig;
- }
-
- @Override
- public String getProjectVersion()
- {
- return projectVersion;
- }
-
- @Override
- @Option(name = "--project-version", metaVar = "VER", usage = "Project version ID This value is required unless specified in zanata.xml.")
- public void setProjectVersion(String versionSlug)
- {
- this.projectVersion = versionSlug;
- }
-
- @Override
- public String getProjectConfig()
- {
- return projectConfig;
- }
-
- @Override
- public LocaleList getLocales()
- {
- return locales;
- }
-
- @Override
- public void setLocales(LocaleList locales)
- {
- this.locales = locales;
- }
-
- @Override
- public void setDstDir(File dstDir)
- {
- this.dstDir = dstDir;
- if (dstDirPot == null)
- dstDirPot = new File(dstDir, "pot");
- }
-
- @Override
- public File getDstDir()
- {
- return dstDir;
- }
-
- @Override
- public void setDstDirPot(File dstDirPot)
- {
- this.dstDirPot = dstDirPot;
- }
-
- @Override
- public File getDstDirPot()
- {
- return dstDirPot;
- }
-
- @Override
- public boolean getExportPot()
- {
- return exportPot;
- }
-
- @Override
- @Option(name = "--export-pot", usage = "Export source text from the server to local POT files")
- public void setExportPot(boolean exportPot)
- {
- this.exportPot = exportPot;
- }
-
-}
diff --git a/client/zanata-client-ant-po/src/main/java/org/zanata/client/ant/po/PutUserTask.java b/client/zanata-client-ant-po/src/main/java/org/zanata/client/ant/po/PutUserTask.java
deleted file mode 100644
index 30c58e1538..0000000000
--- a/client/zanata-client-ant-po/src/main/java/org/zanata/client/ant/po/PutUserTask.java
+++ /dev/null
@@ -1,137 +0,0 @@
-package org.zanata.client.ant.po;
-
-import org.kohsuke.args4j.Option;
-import org.zanata.client.commands.ArgsUtil;
-import org.zanata.client.commands.PutUserCommand;
-import org.zanata.client.commands.PutUserOptions;
-
-public class PutUserTask extends ConfigurableTask implements PutUserOptions
-{
- // private static final Logger log =
- // LoggerFactory.getLogger(PutUserTask.class);
- private String userName;
- private String userEmail;
- private String userUsername;
- private String userPasswordHash;
- private String userKey;
- private String userRoles;
- private String userLangs;
- private boolean userDisabled;
-
- public static void main(String[] args)
- {
- PutUserTask task = new PutUserTask();
- ArgsUtil.processArgs(args, task);
- }
-
- @Override
- public String getCommandName()
- {
- return "putuser";
- }
-
- @Override
- public String getCommandDescription()
- {
- return "Creates/overwrites a user";
- }
-
-
- public PutUserCommand initCommand()
- {
- return new PutUserCommand(this);
- }
-
- @Option(name = "--user-name", required = true, usage = "Full name of the user")
- public void setUserName(String name)
- {
- this.userName = name;
- }
-
- @Option(name = "--user-email", required = true, usage = "Email address of the user")
- public void setUserEmail(String email)
- {
- this.userEmail = email;
- }
-
- @Option(name = "--user-username", required = true, usage = "Login/username of the user")
- public void setUserUsername(String username)
- {
- this.userUsername = username;
- }
-
- @Option(name = "--user-passwordhash", required = true, usage = "User password hash")
- public void setUserPasswordHash(String passwordHash)
- {
- this.userPasswordHash = passwordHash;
- }
-
- @Option(name = "--user-key", required = true, usage = "User's api key (empty for none)")
- public void setUserKey(String userKey)
- {
- if (userKey == null || userKey.length() == 0)
- this.userKey = null;
- else
- this.userKey = userKey;
- }
-
- @Option(name = "--user-langs", required = true, usage = "Language teams for the user")
- public void setUserLangs(String userLangs)
- {
- this.userLangs = userLangs;
- }
-
- @Option(name = "--user-roles", required = true, usage = "Security roles for the user")
- public void setUserRoles(String roles)
- {
- this.userRoles = roles;
- }
-
- @Option(name = "--user-disabled", required = false, usage = "Whether the account should be disabled")
- public void setUserDisabled(boolean disabled)
- {
- this.userDisabled = disabled;
- }
-
- public String getUserUsername()
- {
- return userUsername;
- }
-
- public boolean isUserDisabled()
- {
- return userDisabled;
- }
-
- public String getUserLangs()
- {
- return userLangs;
- }
-
- public String getUserKey()
- {
- return userKey;
- }
-
- public String getUserPasswordHash()
- {
- return userPasswordHash;
- }
-
- public String getUserName()
- {
- return userName;
- }
-
- public String getUserEmail()
- {
- return userEmail;
- }
-
- public String getUserRoles()
- {
- return userRoles;
- }
-
-
-}
diff --git a/client/zanata-client-ant-po/src/main/java/org/zanata/client/ant/po/UploadPoTask.java b/client/zanata-client-ant-po/src/main/java/org/zanata/client/ant/po/UploadPoTask.java
deleted file mode 100644
index c81d127a13..0000000000
--- a/client/zanata-client-ant-po/src/main/java/org/zanata/client/ant/po/UploadPoTask.java
+++ /dev/null
@@ -1,123 +0,0 @@
-package org.zanata.client.ant.po;
-
-import java.io.File;
-
-import org.kohsuke.args4j.Option;
-import org.zanata.client.commands.ArgsUtil;
-import org.zanata.client.commands.PublicanPushCommand;
-import org.zanata.client.commands.PublicanPushOptions;
-
-
-public class UploadPoTask extends ConfigurableProjectTask implements PublicanPushOptions
-{
- // private static final Logger log =
- // LoggerFactory.getLogger(UploadPoTask.class);
- private File srcDir;
- private File srcDirPot;
-
- private String sourceLang = "en-US";
-
- private boolean importPo;
- private boolean copyTrans = true;
- private boolean validate;
- private String mergeType = "auto";
-
- public static void main(String[] args)
- {
- UploadPoTask task = new UploadPoTask();
- ArgsUtil.processArgs(args, task);
- }
-
- @Override
- public String getCommandName()
- {
- return "uploadpo";
- }
-
- @Override
- public String getCommandDescription()
- {
- return "Uploads a Publican project's PO/POT files to the server for translation";
- }
-
- public PublicanPushCommand initCommand()
- {
- return new PublicanPushCommand(this);
- }
-
- @Option(aliases = { "-s" }, name = "--src", metaVar = "DIR", required = true, usage = "Base directory for publican files (with subdirectory \"pot\" and optional locale directories)")
- public void setSrcDir(File srcDir)
- {
- this.srcDir = srcDir;
- if (srcDirPot == null)
- srcDirPot = new File(srcDir, "pot");
- }
-
- public void setSrcDirPot(File srcDirPot)
- {
- this.srcDirPot = srcDirPot;
- }
-
- @Option(aliases = { "-l" }, name = "--src-lang", usage = "Language of source (defaults to en-US)")
- public void setSourceLang(String sourceLang)
- {
- this.sourceLang = sourceLang;
- }
-
- @Option(name = "--import-po", usage = "Import translations from local PO files to the server, overwriting or erasing existing translations (DANGER!)")
- public void setImportPo(boolean importPo)
- {
- this.importPo = importPo;
- }
-
- @Option(name = "--validate", usage = "Validate XML before sending request to server")
- public void setValidate(boolean validate)
- {
- this.validate = validate;
- }
-
- public boolean getValidate()
- {
- return validate;
- }
-
- public boolean getImportPo()
- {
- return importPo;
- }
-
- @Override
- public boolean getCopyTrans()
- {
- return copyTrans;
- }
-
- public void setCopyTrans(boolean copyTrans)
- {
- this.copyTrans = copyTrans;
- }
-
- public File getSrcDir()
- {
- return srcDir;
- }
-
- @Override
- public File getSrcDirPot()
- {
- return srcDirPot;
- }
-
- public String getSourceLang()
- {
- return sourceLang;
- }
-
- @Override
- public String getMergeType()
- {
- return mergeType;
- }
-
-
-}
diff --git a/client/zanata-client-ant-po/src/main/java/org/zanata/client/ant/po/Utility.java b/client/zanata-client-ant-po/src/main/java/org/zanata/client/ant/po/Utility.java
deleted file mode 100644
index 3c5195c692..0000000000
--- a/client/zanata-client-ant-po/src/main/java/org/zanata/client/ant/po/Utility.java
+++ /dev/null
@@ -1,68 +0,0 @@
-package org.zanata.client.ant.po;
-
-import java.io.File;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.Arrays;
-
-import org.apache.tools.ant.Project;
-
-class Utility
-{
-
- /**
- * Converts a string to a URL. If it doesn't form a valid URL as is, it will
- * be treated as a file and converted to a file: URL. Relative file paths
- * will be interpreted, relative to basedir, and converted to absolute form.
- *
- * @param src a URL or a file path
- * @param basedir base directory for relative file paths
- * @return URL-equivalent of src
- * @throws MalformedURLException
- */
- public static URL createURL(String src, File basedir) throws MalformedURLException
- {
- URL srcURL;
- try
- {
- srcURL = new URL(src);
- }
- catch (MalformedURLException e)
- {
- File srcFile = new File(src);
- if (!srcFile.isAbsolute())
- {
- srcFile = new File(basedir, src);
- }
- srcURL = srcFile.toURI().toURL();
- }
- return srcURL;
- }
-
- public static String toString(ClassLoader loader)
- {
- if (loader instanceof URLClassLoader)
- {
- URLClassLoader ul = (URLClassLoader) loader;
- return "URLClassLoader" + Arrays.asList(ul.getURLs()).toString();
- }
- return String.valueOf(loader);
- }
-
- /**
- * Returns the base directory of the specified project, or user's current
- * working directory if project is null.
- *
- * @param project
- * @return
- */
- public static File getBaseDir(Project project)
- {
- if (project == null)
- return new File(System.getProperty("user.dir"));
- else
- return project.getBaseDir();
- }
-
-}
diff --git a/client/zanata-client-ant-po/src/main/java/org/zanata/client/ant/po/ZanataTask.java b/client/zanata-client-ant-po/src/main/java/org/zanata/client/ant/po/ZanataTask.java
deleted file mode 100644
index 9668629b60..0000000000
--- a/client/zanata-client-ant-po/src/main/java/org/zanata/client/ant/po/ZanataTask.java
+++ /dev/null
@@ -1,137 +0,0 @@
-package org.zanata.client.ant.po;
-
-
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Task;
-import org.kohsuke.args4j.Option;
-import org.zanata.client.commands.BasicOptions;
-import org.zanata.rest.dto.VersionInfo;
-
-public abstract class ZanataTask extends Task implements BasicOptions
-{
-
- private boolean debug;
- private boolean errors;
- private boolean help;
- private boolean quiet;
- private boolean interactiveMode = true;
- // TODO shouldn't this use VersionUtility.getVersionInfo() ?
- protected VersionInfo versionInfo = new VersionInfo("SNAPSHOT", "");
-
- @Override
- public boolean getDebug()
- {
- return debug;
- }
-
- @Option(name = "--debug", aliases = { "-X" }, usage = "Enable debug logging")
- @Override
- public void setDebug(boolean debug)
- {
- this.debug = debug;
- if (debug)
- {
- setErrors(true);
- }
- }
-
- @Override
- public boolean getHelp()
- {
- return this.help;
- }
-
- @Option(name = "--help", aliases = { "-h", "-help" }, usage = "Display this help and exit")
- @Override
- public void setHelp(boolean help)
- {
- this.help = help;
- }
-
- @Override
- public boolean getErrors()
- {
- return this.errors;
- }
-
- @Option(name = "--errors", aliases = { "-e" }, usage = "Output full execution error messages (stacktraces)")
- @Override
- public void setErrors(boolean errors)
- {
- this.errors = errors;
- }
-
- @Override
- public boolean getQuiet()
- {
- return quiet;
- }
-
- @Option(name = "--quiet", aliases = { "-q" }, usage = "Quiet mode - error messages only")
- @Override
- public void setQuiet(boolean quiet)
- {
- this.quiet = quiet;
- }
-
- @Override
- public boolean isInteractiveMode()
- {
- return interactiveMode;
- }
-
- @Override
- public void setInteractiveMode(boolean interactiveMode)
- {
- this.interactiveMode = interactiveMode;
- }
-
- @Override
- public void execute() throws BuildException
- {
- ClassLoader oldLoader = Thread.currentThread().getContextClassLoader();
- try
- {
- // make sure RESTEasy classes will be found:
- Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
- // OptionsUtil.applyConfigFiles(this);
- this.initCommand().run();
- }
- catch (Exception e)
- {
- throw new BuildException(e);
- }
- finally
- {
- Thread.currentThread().setContextClassLoader(oldLoader);
- }
- }
-
- @Override
- public void log(String msg)
- {
- super.log(msg + "\n\n");
- }
-
- @Override
- public boolean isDebugSet()
- {
- // TODO Auto-generated method stub
- return false;
- }
-
- @Override
- public boolean isErrorsSet()
- {
- // TODO Auto-generated method stub
- return false;
- }
-
- @Override
- public boolean isQuietSet()
- {
- // TODO Auto-generated method stub
- return false;
- }
-
-}
diff --git a/client/zanata-client-ant-po/src/main/resources/log4j.xml b/client/zanata-client-ant-po/src/main/resources/log4j.xml
deleted file mode 100644
index a598e90e27..0000000000
--- a/client/zanata-client-ant-po/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/client/zanata-client-ant-po/src/main/resources/org/zanata/client/ant/po/antlib.xml b/client/zanata-client-ant-po/src/main/resources/org/zanata/client/ant/po/antlib.xml
deleted file mode 100644
index e30ba30d23..0000000000
--- a/client/zanata-client-ant-po/src/main/resources/org/zanata/client/ant/po/antlib.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
diff --git a/client/zanata-client-ant-po/src/test/java/org/zanata/client/ant/po/AbstractBuildTest.java b/client/zanata-client-ant-po/src/test/java/org/zanata/client/ant/po/AbstractBuildTest.java
deleted file mode 100644
index 77ca5eed32..0000000000
--- a/client/zanata-client-ant-po/src/test/java/org/zanata/client/ant/po/AbstractBuildTest.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package org.zanata.client.ant.po;
-
-import org.apache.tools.ant.BuildFileTest;
-
-public abstract class AbstractBuildTest extends BuildFileTest
-{
-
- public AbstractBuildTest(String name)
- {
- super(name);
- }
-
- @Override
- protected void runTest() throws Throwable
- {
- try
- {
- System.out.println("Executing build target '" + getName() + "'");
- executeTarget(getName());
- }
- finally
- {
- System.out.print(getLog());
- System.out.print(getOutput());
- System.err.print(getError());
- }
- }
-
- @Override
- protected void setUp() throws Exception
- {
- // work around maven bug: http://jira.codehaus.org/browse/SUREFIRE-184
- System.getProperties().remove("basedir");
- configureProject(getBuildFile());
- }
-
- abstract protected String getBuildFile();
-
-}
diff --git a/client/zanata-client-ant-po/src/test/java/org/zanata/client/ant/po/LocalTest.java b/client/zanata-client-ant-po/src/test/java/org/zanata/client/ant/po/LocalTest.java
deleted file mode 100644
index 21d40e4755..0000000000
--- a/client/zanata-client-ant-po/src/test/java/org/zanata/client/ant/po/LocalTest.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package org.zanata.client.ant.po;
-
-import org.zanata.client.ant.po.DownloadPoTask;
-import org.zanata.client.ant.po.UploadPoTask;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-@SuppressWarnings("nls")
-public class LocalTest extends AbstractBuildTest
-{
- /**
- * This helps Infinitest, since it doesn't know about the taskdefs inside
- * build.xml
- */
- @SuppressWarnings("unchecked")
- static Class>[] testedClasses = { UploadPoTask.class, DownloadPoTask.class };
-
- public LocalTest(String name)
- {
- super(name);
- }
-
- @Override
- protected String getBuildFile()
- {
- return "src/test/resources/org/zanata/client/ant/po/build.xml";
- }
-
- public static Test suite()
- {
- TestSuite suite = new TestSuite(LocalTest.class.getName());
- // FIXME
- // suite.addTest(new LocalTest("uploadpo"));
- // suite.addTest(new LocalTest("downloadpo"));
- // suite.addTest(new LocalTest("roundtriplocal"));
- return suite;
- }
-
- // @Override
- // protected void tearDown() throws Exception {
- // String outDir = getProject().getProperty("out.dir");
- // if (outDir != null) {
- // TestUtil.delete(new File(outDir));
- // }
- // super.tearDown();
- // }
-
-}
diff --git a/client/zanata-client-ant-po/src/test/java/org/zanata/client/ant/po/RemoteTest.java b/client/zanata-client-ant-po/src/test/java/org/zanata/client/ant/po/RemoteTest.java
deleted file mode 100644
index 6645cb3331..0000000000
--- a/client/zanata-client-ant-po/src/test/java/org/zanata/client/ant/po/RemoteTest.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package org.zanata.client.ant.po;
-
-import org.zanata.client.ant.po.DownloadPoTask;
-import org.zanata.client.ant.po.UploadPoTask;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-@SuppressWarnings("nls")
-public class RemoteTest extends AbstractBuildTest
-{
- /**
- * This helps Infinitest, since it doesn't know about the taskdefs inside
- * build.xml
- */
- @SuppressWarnings("unchecked")
- static Class>[] testedClasses = { UploadPoTask.class, DownloadPoTask.class };
-
- public RemoteTest(String name)
- {
- super(name);
- }
-
- @Override
- protected String getBuildFile()
- {
- return "src/test/resources/org/zanata/client/ant/po/build.xml";
- }
-
- public static Test suite()
- {
- TestSuite suite = new TestSuite(RemoteTest.class.getName());
- suite.addTest(new RemoteTest("roundtripremote"));
- return suite;
- }
-
-}
diff --git a/client/zanata-client-ant-po/src/test/resources/org/zanata/client/ant/po/build.xml b/client/zanata-client-ant-po/src/test/resources/org/zanata/client/ant/po/build.xml
deleted file mode 100644
index 82fd122bc9..0000000000
--- a/client/zanata-client-ant-po/src/test/resources/org/zanata/client/ant/po/build.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/client/zanata-client-ant-po/src/test/resources/org/zanata/client/ant/po/downloadpo.xml b/client/zanata-client-ant-po/src/test/resources/org/zanata/client/ant/po/downloadpo.xml
deleted file mode 100644
index 595d702aa1..0000000000
--- a/client/zanata-client-ant-po/src/test/resources/org/zanata/client/ant/po/downloadpo.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/client/zanata-client-ant-po/src/test/resources/org/zanata/client/ant/po/roundtrip.xml b/client/zanata-client-ant-po/src/test/resources/org/zanata/client/ant/po/roundtrip.xml
deleted file mode 100644
index 969da6b31e..0000000000
--- a/client/zanata-client-ant-po/src/test/resources/org/zanata/client/ant/po/roundtrip.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/client/zanata-client-ant-po/src/test/resources/org/zanata/client/ant/po/sample/documents/documents.xml b/client/zanata-client-ant-po/src/test/resources/org/zanata/client/ant/po/sample/documents/documents.xml
deleted file mode 100644
index 63d4640980..0000000000
--- a/client/zanata-client-ant-po/src/test/resources/org/zanata/client/ant/po/sample/documents/documents.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
-
-
- Slime Mould
-
-
- Sauerkraut
-
-
-
-
-
-
-
-
- Hello World
-
-
- Bonjour le Monde
-
-
-
-
-
-
\ No newline at end of file
diff --git a/client/zanata-client-ant-po/src/test/resources/org/zanata/client/ant/po/taskdefs.xml b/client/zanata-client-ant-po/src/test/resources/org/zanata/client/ant/po/taskdefs.xml
deleted file mode 100644
index 6a28cf4e3a..0000000000
--- a/client/zanata-client-ant-po/src/test/resources/org/zanata/client/ant/po/taskdefs.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/client/zanata-client-ant-po/src/test/resources/org/zanata/client/ant/po/uploadpo.xml b/client/zanata-client-ant-po/src/test/resources/org/zanata/client/ant/po/uploadpo.xml
deleted file mode 100644
index 1a3bc64409..0000000000
--- a/client/zanata-client-ant-po/src/test/resources/org/zanata/client/ant/po/uploadpo.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/client/zanata-client-ant-po/src/test/resources/test-input/en-US/Book_Info.xml b/client/zanata-client-ant-po/src/test/resources/test-input/en-US/Book_Info.xml
deleted file mode 100644
index 30324eb0c1..0000000000
--- a/client/zanata-client-ant-po/src/test/resources/test-input/en-US/Book_Info.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
- Deployment Guide
- Deployment, configuration and administration of Fedora 12 (Draft)
- Fedora Documentation
- 12
- 0
- 0
-
- The Deployment Guide documents relevant information regarding the deployment, configuration and administration of Fedora 12.
-
-
-
-
-
-
-
-
-
-
-
diff --git a/client/zanata-client-ant-po/src/test/resources/test-input/ja-JP/Book_Info.po b/client/zanata-client-ant-po/src/test/resources/test-input/ja-JP/Book_Info.po
deleted file mode 100644
index 09a436987d..0000000000
--- a/client/zanata-client-ant-po/src/test/resources/test-input/ja-JP/Book_Info.po
+++ /dev/null
@@ -1,59 +0,0 @@
-# translation of Book_Info.po to
-# translation of Book_Info.po to Japanese
-#
-# Kiyoto James Hashida , 2006.
-# Noriko Mizumoto , 2007.
-# Kiyoto Hashida , 2007.
-msgid ""
-msgstr ""
-"Project-Id-Version: Book_Info\n"
-"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
-"POT-Creation-Date: 2010-03-18T07:40:58\n"
-"PO-Revision-Date: 2007-07-20 14:33+1000\n"
-"Last-Translator: Kiyoto Hashida \n"
-"Language-Team: Japanese \n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Generator: KBabel 1.11.4\n"
-
-# IGNORED
-#. Tag: title
-#, fuzzy, no-c-format
-msgid "Deployment Guide"
-msgstr "&PROD; 導入ガイド"
-
-#. Tag: subtitle
-#, no-c-format
-msgid "Deployment, configuration and administration of Fedora 12 (Draft)"
-msgstr ""
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"The Deployment Guide documents relevant information regarding the "
-"deployment, configuration and administration of Fedora 12."
-msgstr ""
-"導入ガイドは、 &PROD; 5.1.0 の導入、 設定、 及び管理に関連する情報を文書化し"
-"ています。"
-
-#~ msgid "&FORMAL-RHI;"
-#~ msgstr "&FORMAL-RHI;"
-
-#~ msgid ""
-#~ "Michael Hideo Smith "
-#~ "mhideo@redhat.com "
-#~ msgstr ""
-#~ "Michael Hideo Smith "
-#~ "mhideo@redhat.com "
-
-#, fuzzy
-#~ msgid "Resolves: #232215"
-#~ msgstr "Resolves: #245683"
-
-#~ msgid "Content Update"
-#~ msgstr "内容更新"
-
-#~ msgid "&PROD; &PRODVER;"
-#~ msgstr "&PROD; &PRODVER;"
diff --git a/client/zanata-client-ant-po/src/test/resources/test-input/ja-JP/RPM.po b/client/zanata-client-ant-po/src/test/resources/test-input/ja-JP/RPM.po
deleted file mode 100644
index 9625fcceff..0000000000
--- a/client/zanata-client-ant-po/src/test/resources/test-input/ja-JP/RPM.po
+++ /dev/null
@@ -1,2152 +0,0 @@
-# translation of RPM.po to Traditional Chinese
-# translation of rpm.po to
-# Copyright (C) 2003,2004, 2006, 2007 Free Software Foundation, Inc.
-#
-# Noriko Mizumoto , 2003,2004, 2006.
-# Chester Cheng , 2007.
-msgid ""
-msgstr ""
-"Project-Id-Version: RPM\n"
-"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
-"POT-Creation-Date: 2010-03-18T07:41:00\n"
-"PO-Revision-Date: 2007-07-11 12:35+1000\n"
-"Last-Translator: Chester Cheng \n"
-"Language-Team: Traditional Chinese \n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Generator: KBabel 1.11.4\n"
-
-#. Tag: title
-#, no-c-format
-msgid "RPM"
-msgstr ""
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"The RPM Package Manager (RPM) is an open packaging "
-"system, which runs on &MAJOR_OS; as well as other Linux and UNIX systems. "
-"Red Hat, Inc. and the Fedora Project encourage other vendors to use RPM for "
-"their own products. RPM is distributed under the terms of the "
-"GPL (GNU General Public License"
-"firstterm>)."
-msgstr ""
-"RPM Package Manager(RPM)は、誰もが利用できるオープン パッケージングシステム"
-"で、&PROD;だけでなく他のLinuxや UNIXシステム上でも動作します。 &FORMAL-RHI;で"
-"は、他のメーカーにも RPM を自社製品に使用して頂くよう奨励しています。 RPM は"
-"GPL契約 に基づいて配布されます。"
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"The RPM Package Manager only works with packages built to work with the "
-"RPM format . RPM is itself provided as a pre-installed "
-"rpm package. For the end user, RPM makes system updates easy. Installing, "
-"uninstalling and upgrading RPM packages can be accomplished with short "
-"commands. RPM maintains a database of installed packages and their files, so "
-"you can invoke powerful queries and verifications on your system. If you "
-"prefer a graphical interface, you can use the PackageKit"
-"application> GUI to perform many RPM commands. Refer to for details."
-msgstr ""
-"エンドユーザーは、RPMによりシステムを簡単に更新することができます。RPMパッ"
-"ケージのインストール、アンインストール、アップグレードは短いコマンドで実行で"
-"きます。RPM は インストールされているパッケージやそのファイル群に関する デー"
-"タベースを維持しているので、システムで強力な問い合わせ/ 検証を実行することが"
-"できます。グラフィカルインターフェイス で使用したい場合は、"
-"&RHRPMTOOL; を使用して多くのRPM コマンドを実行する"
-"ことができます。 詳細はを参照してくださ"
-"い。"
-
-# EXACT MATCH
-#. Tag: title
-#, fuzzy, no-c-format
-msgid "Important"
-msgstr "キーのインポート"
-
-#. Tag: para
-#, no-c-format
-msgid ""
-"When installing a package, ensure it is compatible with your operating "
-"system and processor architecture. This can usually be determined by "
-"checking the package name. Many of the following examples show RPM packages "
-"compiled for the AMD64/Intel 64 computer architectures; thus, the RPM file "
-"name ends in x86_64.rpm ."
-msgstr ""
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"During upgrades, RPM handles configuration files carefully, so that you "
-"never lose your customizations—something that you cannot accomplish with "
-"regular .tar.gz files."
-msgstr ""
-"アップグレード時に、RPM は設定ファイルを慎重に処理するため カスタマイズ情報が"
-"失われることはありません — 普通の.tar.gz"
-"filename>ファイルなどを使用した場合は、このような機能を実現することができませ"
-"ん。"
-
-# EXACT MATCH
-#. Tag: para
-#, no-c-format
-msgid ""
-"For the developer, RPM allows you to take software source code and package "
-"it into source and binary packages for end users. This process is quite "
-"simple and is driven from a single file and optional patches that you "
-"create. This clear delineation between pristine "
-"sources and your patches along with build instructions eases the maintenance "
-"of the package as new versions of the software are released."
-msgstr ""
-"開発者にとっては、RPM を使用することにより、ソフトウェアのソースコード を取り"
-"出し、 エンドユーザー用にソースとバイナリパッケージにパッケージ化することがで"
-"きます。このプロセスは極めて単純で、ひとつのファイルと作成するオプションの"
-"パッチから操作することができます。 ビルトの指示に加えて純粋な"
-"firstterm>ソースとパッチの明確な 違いが、ソフトウェアの新しいバージョンがリ"
-"リースされたときにパッケージの管理を 容易にします。"
-
-# EXACT MATCH
-#. Tag: title
-#, no-c-format
-msgid "Note"
-msgstr "注記"
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"Because RPM makes changes to your system, you must be logged in as root to "
-"install, remove, or upgrade an RPM package."
-msgstr ""
-"RPM はシステムに変更を加えるため、RPM パッケージの インストール、削除、アップ"
-"グレードを行なうには、rootになる必要があります。"
-
-# EXACT MATCH
-#. Tag: title
-#, no-c-format
-msgid "RPM Design Goals"
-msgstr "RPM の設計目標"
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"To understand how to use RPM, it can be helpful to understand the design "
-"goals of RPM:"
-msgstr ""
-"RPM の使用方法を理解するためには、RPM の設計目標を理解する とわかりやすいで"
-"しょう。"
-
-# EXACT MATCH
-#. Tag: term
-#, no-c-format
-msgid "Upgradability"
-msgstr "アップグレードの可能性"
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"With RPM, you can upgrade individual components of your system without "
-"completely reinstalling. When you get a new release of an operating system "
-"based on RPM, such as &MAJOR_OS;, you do not need to reinstall a fresh copy "
-"of the operating system your machine (as you might need to with operating "
-"systems based on other packaging systems). RPM allows intelligent, fully-"
-"automated, in-place upgrades of your system. In addition, configuration "
-"files in packages are preserved across upgrades, so you do not lose your "
-"customizations. There are no special upgrade files needed to upgrade a "
-"package because the same RPM file is used to both install and upgrade the "
-"package on your system."
-msgstr ""
-"RPMを使用すれば、コンポーネントを完全に再インストールすることなく、個別にコン"
-"ポーネントをアップグレードすることができます。RPMベースのオペレーティングシス"
-"テム(&PROD;など)の新しいリリースを入手したときに、マシンに再インストールする"
-"必要がありません(他のパッケージングシステムに基づくオペレーティングシステムの"
-"場合はその必要があります)。RPMを使用すれば、完全自動化された適切なシステムの"
-"アップグレードをスマートに行うことができます。パッケージに含まれる設定ファイ"
-"ルはアップグレード後にも保持されるので、 カスタマイズ情報が失われることはあり"
-"ません。同じRPM ファイルがシステムでのパッケージのインストール及びアップグ"
-"レードに 使用されるため、 パッケージをアップグレードするために特別なアップ グ"
-"レードファイルが必要になる ことはありません。"
-
-# EXACT MATCH
-#. Tag: term
-#, no-c-format
-msgid "Powerful Querying"
-msgstr "強力な問い合わせ"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"RPM is designed to provide powerful querying options. You can perform "
-"searches on your entire database for packages or even just certain files. "
-"You can also easily find out what package a file belongs to and from where "
-"the package came. The files an RPM package contains are in a compressed "
-"archive, with a custom binary header containing useful information about the "
-"package and its contents, allowing you to query individual packages quickly "
-"and easily."
-msgstr ""
-"RPM では、強力な問い合わせオプションが提供されて います。データベース全体を通"
-"じてパッケージを検索したり、 特定のファイル群のみを検索したりすることができま"
-"す。 あるファイルがどのパッケージに属し、パッケージがどこから 来たのかをも簡"
-"単に検索することができます。RPM パッケージ に含まれるファイルは圧縮アーカイブ"
-"形式であり、パッケージと その内容に関する有用な情報を含むカスタムバイナリヘッ"
-"ダーが 付いているため、個別のパッケージをすばやく簡単に問い合わせ することが"
-"できます。"
-
-# EXACT MATCH
-#. Tag: term
-#, no-c-format
-msgid "System Verification"
-msgstr "システムの検証"
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"Another powerful RPM feature is the ability to verify packages. If you are "
-"worried that you deleted an important file for some package, you can verify "
-"the package. You are then notified of anomalies, if any—at which point you "
-"can reinstall the package, if necessary. Any configuration files that you "
-"modified are preserved during reinstallation."
-msgstr ""
-"もう1つの強力な特徴は、パッケージの検証機能です。 あるパッケージの重要ファイ"
-"ルを削除してしまった恐れがある場合は、パッケージを検証します。何か異常があれ"
-"ば通知されます。その時点で、必要であればそのパッケージを再インストールするこ"
-"とができます。 再インストールを行っても、修正した設定ファイルは保持されます。"
-
-# EXACT MATCH
-#. Tag: term
-#, no-c-format
-msgid "Pristine Sources"
-msgstr "純粋なソース"
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"A crucial design goal was to allow the use of pristine "
-"software sources, as distributed by the original authors of the software. "
-"With RPM, you have the pristine sources along with any patches that were "
-"used, plus complete build instructions. This is an important advantage for "
-"several reasons. For instance, if a new version of a program is released, "
-"you do not necessarily have to start from scratch to get it to compile. You "
-"can look at the patch to see what you might need to do. "
-"All the compiled-in defaults, and all of the changes that were made to get "
-"the software to build properly, are easily visible using this technique."
-msgstr ""
-"最終的な設計目標は、ソフトウェアのオリジナル作者によって配布されたときのまま"
-"の「純粋な」ソフトウェアソースをユーザーが利用できるようにすることでした。RPM"
-"を使用した場合、純粋なソースと適用済みのパッチ、完全なビルド命令群が入手でき"
-"ます。いくつかの理由から、これは大きなメリットとなります。たとえば、あるプロ"
-"グラムの新しいバージョンがリリースされた場合、それをコンパイルするために必ず"
-"しも最初から作業を始める必要はなくなります。パッチを見て、必要になる"
-"かもしれない 作業を確かめることができます。この技術を使え"
-"ば、組み込み済みのすべてのデフォルト設定と、ソフトウェアを適切に構築するため"
-"に行われたすべての変更内容が、容易に目に見えるようになります。"
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"The goal of keeping sources pristine may seem important only for developers, "
-"but it results in higher quality software for end users, too."
-msgstr ""
-"ソースを純粋な状態に保持するという目標は、開発者にとってのみ重要なことのよう"
-"に思われるかもしれませんが、結果として、エンドユーザーにより高品質のソフト"
-"ウェアが 提供されることにもなります。"
-
-# EXACT MATCH
-#. Tag: title
-#, no-c-format
-msgid "Using RPM"
-msgstr "RPMの使用法"
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"RPM has five basic modes of operation (not counting package building): "
-"installing, uninstalling, upgrading, querying, and verifying. This section "
-"contains an overview of each mode. For complete details and options, try "
-"rpm --help or man rpm . You can also "
-"refer to for more "
-"information on RPM."
-msgstr ""
-"RPMには、次の5つの基本的作動モードがあります(パッケージの構築はカウントしませ"
-"ん)。インストール、アンインストール、アップグレード、照会、検証の5つです。こ"
-"のセクションでは、各モードの概要を説明します。詳細な説明やオプションについて"
-"はrpm --help をご覧ください。RPMの詳細については を参照してください。"
-
-# EXACT MATCH
-#. Tag: title
-#, no-c-format
-msgid "Finding RPM Packages"
-msgstr "RPM パッケージの検索"
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"Before using any RPM packages, you must know where to find them. An Internet "
-"search returns many RPM repositories, but if you are looking for RPM "
-"packages built by the Fedora Project, they can be found at the following "
-"locations:"
-msgstr ""
-"RPMを使用する前に、RPMがある場所を知っておかねばなりません。 インターネット検"
-"索では数多くのRPMレポジトリを返してきますが、 &RHI;が製作したRPMパッケージを"
-"探している場合は、次の場所にあります。"
-
-#. Tag: para
-#, no-c-format
-msgid "The &MAJOR_OS; installation media contain many installable RPMs."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid ""
-"The initial RPM repositories provided with the YUM package manager. Refer to "
-" for details on how to use the official "
-"&MAJOR_OS; package repositories."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid ""
-"Unofficial, third-party repositories not affiliated with the Fedora Project "
-"also provide RPM packages."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid ""
-"When considering third-party repositories for use with your &MAJOR_OS; "
-"system, pay close attention to the repository's web site with regard to "
-"package compatibility before adding the repository as a package source. "
-"Alternate package repositories may offer different, incompatible versions of "
-"the same software, including packages already included in the Fedora "
-"repositories."
-msgstr ""
-
-# EXACT MATCH
-#. Tag: title
-#, no-c-format
-msgid "Installing"
-msgstr "インストール"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"RPM packages typically have file names like tree-1.5.2.2-4.fc12."
-"x86_64.rpm . The file name includes the package name "
-"(tree ), version (1.5.2.2 ), release "
-"(4 ), operating system major version (fc12"
-"filename>) and CPU architecture (x86_64 ). Assuming the "
-"tree-1.5.2.2-4.fc12.x86_64.rpm package is in the "
-"current directory, log in as root and type the following command at a shell "
-"prompt to install it:"
-msgstr ""
-"RPM パッケージには概してfoo-1.0-1.i386.rpm "
-"filename>というようなファイル名が付けられています。 このファイル名は、パッ"
-"ケージ名(foo )、バージョン(1.0 )、 リリース(1"
-"filename>)、アーキテクチャ (i386 )で構"
-"成されています。パッケージをインストールするには、rootでログインし、シェルプ"
-"ロンプトで以下のコマンドを入力します。"
-
-#. Tag: para
-#, no-c-format
-msgid ""
-"The -i option tells rpm to install the "
-"package, and the v and h options, while "
-"aren't strictly necessary, increase output information and display a "
-"progress meter, respectively."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid ""
-"Alternatively, you can use the -U option, which "
-"upgrades the package if an older version is already "
-"installed, or simply installs it if not:"
-msgstr ""
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid "If the installation is successful, the following output is displayed:"
-msgstr "インストールが正常に終了すると、以下のような出力が表示されます。"
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"As you can see, RPM prints out the name of the package and then prints a "
-"succession of hash marks as a progress meter while the package is installed."
-msgstr ""
-"RPM はパッケージ名を出力し、 パッケージのインストー"
-"ル状況をシャープ記号を使って 表示します。"
-
-# EXACT MATCH
-#. Tag: para
-#, no-c-format
-msgid ""
-"The signature of a package is checked automatically when installing or "
-"upgrading a package. The signature confirms that the package was signed by "
-"an authorized party. For example, if the verification of the signature "
-"fails, an error message such as the following is displayed:"
-msgstr ""
-"パッケージの署名は、パッケージのインストールまたはアップグレード時に自動的に"
-"チェックされます。署名により、パッケージが認証機関によって署名されたことを確"
-"認できます。たとえば、署名の検証が失敗すると、次のようなエラーメッセージが表"
-"示されます。"
-
-# EXACT MATCH
-#. Tag: para
-#, no-c-format
-msgid ""
-"If it is a new, header-only, signature, an error message such as the "
-"following is displayed:"
-msgstr "ヘッダのみの新しい署名なら、次のようなエラーメッセージが表示されます。"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"If you do not have the appropriate key installed to verify the signature, "
-"the message contains the word NOKEY :"
-msgstr ""
-"署名を検証するための適切なキーをインストールしていない場合は、 メッセージは以"
-"下のようなNOKEY という単語"
-"を含みます。"
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"Refer to for more information on "
-"checking a package's signature."
-msgstr ""
-"パッケージ署名のチェックに関する詳細情報は、 で参照してください。"
-
-# EXACT MATCH
-#. Tag: title
-#, no-c-format
-msgid "Warning"
-msgstr "警告"
-
-#. Tag: para
-#, no-c-format
-msgid ""
-"If you are installing a kernel package, you should always use the "
-"rpm -ivh command (simple install) instead of rpm "
-"-Uvh . The reason for this is that install "
-"(-i ) and upgrade (-U ) "
-"take on specific meanings when installing kernel packages. Refer to for details."
-msgstr ""
-
-# EXACT MATCH
-#. Tag: title
-#, no-c-format
-msgid "Package Already Installed"
-msgstr "すでにインストールされているパッケージ"
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"If a package of the same name and version is already installed, the "
-"following output is displayed:"
-msgstr ""
-"同じバージョンのパッケージがすでにインストールされている場合は、 以下のメッ"
-"セージが表示されます。"
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"However, if you want to install the package anyway, you can use the "
-"--replacepkgs option, which tells RPM to ignore the error:"
-msgstr ""
-"インストールしようとしているものと同じバージョンがすでにインストールされてい"
-"るが、とにかくパッケージをインストールするには、--replacepkgs"
-"command>オプションを使用します。このオプションはRPMにエラーを無視するよう指示"
-"します。"
-
-# EXACT MATCH
-#. Tag: para
-#, no-c-format
-msgid ""
-"This option is helpful if files installed from the RPM were deleted or if "
-"you want the original configuration files from the RPM to be installed."
-msgstr ""
-"このオプションは、RPM からインストールされた ファイルが削除された場合や、RPM "
-"からオリジナルの 設定ファイルをインストールしたい場合に便利です。"
-
-# EXACT MATCH
-#. Tag: title
-#, no-c-format
-msgid "Conflicting Files"
-msgstr "ファイルの競合"
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"If you attempt to install a package that contains a file which has already "
-"been installed by another package, the following is displayed:"
-msgstr ""
-"別のパッケージや同じパッケージの旧バージョンによってすでにインストールされて"
-"いる ファイルを含むパッケージをインストールしようとすると、 以下のメッセージ"
-"が表示されます。"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"To make RPM ignore this error, use the --replacefiles "
-"option:"
-msgstr ""
-"RPM にこのエラーを無視するよう指示するには、 --"
-"replacefiles オプションを 使用します。"
-
-# EXACT MATCH
-#. Tag: title
-#, no-c-format
-msgid "Unresolved Dependency"
-msgstr "未解決の依存"
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"RPM packages may sometimes depend on other packages, which means that they "
-"require other packages to be installed to run properly. If you try to "
-"install a package which has an unresolved dependency, output similar to the "
-"following is displayed:"
-msgstr ""
-"RPMパッケージは他のパッケージに依存する ことがありま"
-"す。つまり、正しく動作するために他のパッケージのインストールが必要な場合があ"
-"ります。未解決の依存関係を持つパッケージをインストールしようとすると、以下の"
-"ような出力が表示されます。"
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"If you are installing a package from the &MAJOR_OS; installation media, such "
-"as from a CD-ROM or DVD, it usually suggests the package or packages needed "
-"to resolve the dependency. Find the suggested package(s) on the &MAJOR_OS; "
-"installation media or on one of the active &MAJOR_OS; mirrors ( ) and add it to the "
-"command:"
-msgstr ""
-"&PROD;のCD-ROMセットからパッケージをインストールしている場合は、通常、依存関"
-"係を解決するために必要なパッケージが示されます。このパッケージを &PROD; CD-"
-"ROM、または、&RH; FTP サイト(またはミラー)から見つけて、それを次のようにコマ"
-"ンドに追加します。"
-
-# EXACT MATCH
-#. Tag: para
-#, no-c-format
-msgid ""
-"If installation of both packages is successful, output similar to the "
-"following is displayed:"
-msgstr ""
-"両方のパッケージのインストールが正常に行なわれると、以下のような出力が表示さ"
-"れます。"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"If it does not suggest a package to resolve the dependency, you can try the "
-"--whatprovides option to determine which package contains "
-"the required file."
-msgstr ""
-"プログラムが依存関係を解決するパッケージを提示してこない場合は、--"
-"redhatprovides オプションでどのパッケージが必要なファイルを含んでい"
-"るか判定してみることができます。このオプションを実行するには、rpmdb-redhat パッケージをインストールしている必"
-"要があります。"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"If the package that contains bar.so.3 is in the RPM "
-"database, the name of the package is displayed:"
-msgstr ""
-"bar.so.2 を含むパッケージが rpmdb-redhat パッケージからの インストール済み"
-"データベースにある場合、その パッケージ名が表示されます。"
-
-#. Tag: title
-#, no-c-format
-msgid "Warning: Forcing Package Installation"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid ""
-"Although we can force rpm to install "
-"a package that gives us a Failed dependencies"
-"computeroutput> error (using the --nodeps option), this is "
-"not recommended, and will usually result in the "
-"installed package failing to run. Installing or removing packages with "
-"rpm --nodeps can cause applications to misbehave and/or "
-"crash, and can cause serious package management problems or, possibly, "
-"system failure. For these reasons, it is best to heed such warnings; the "
-"package manager—whether RPM , Yum"
-"application> or PackageKit —shows us these "
-"warnings and suggests possible fixes because accounting for dependencies is "
-"critical. The Yum package manager can perform "
-"dependency resolution and fetch dependencies from online repositories, "
-"making it safer, easier and smarter than forcing rpm to "
-"carry out actions without regard to resolving dependencies."
-msgstr ""
-
-# EXACT MATCH
-#. Tag: title
-#, no-c-format
-msgid "Uninstalling"
-msgstr "アンインストール"
-
-# EXACT MATCH
-#. Tag: para
-#, no-c-format
-msgid ""
-"Uninstalling a package is just as simple as installing one. Type the "
-"following command at a shell prompt:"
-msgstr ""
-"パッケージのアンインストールは、インストールと 同様、簡単に実行できます。シェ"
-"ルプロンプトで以下の コマンドを入力します。"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"Notice that we used the package name foo"
-"filename>, not the name of the original package file , "
-"foo-1.0-1.fc12.x86_64 . If you attempt to uninstall a "
-"package using the rpm -e command and the original full "
-"file name, you will receive a package name error."
-msgstr ""
-"使用したのは、パッケージの名前 である foo であって、オリジナルパッケージのファイル"
-"emphasis>名、 foo-1.0-1.i386.rpm では"
-"ないことに注意してください。 パッケージをアンインストールするには、foo に 実際のオリジナルパッケージのパッケージ名を"
-"入れます。"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"You can encounter dependency errors when uninstalling a package if another "
-"installed package depends on the one you are trying to remove. For example:"
-msgstr ""
-"削除しようとしているパッケージに別のインストール されているパッケージが依存し"
-"ている場合、アンインストール 時に依存関係エラーが発生することがあります。 た"
-"とえば、"
-
-#. Tag: para
-#, no-c-format
-msgid ""
-"Similar to how we searched for a shared object library (i.e. a "
-"<library_name> .so."
-"<number> file) in , we can search for a 64-bit shared "
-"object library using this exact syntax (and making sure to quote the file "
-"name):"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid ""
-"Although we can force rpm to remove "
-"a package that gives us a Failed dependencies"
-"computeroutput> error (using the --nodeps option), this is "
-"not recommended, and may cause harm to other installed "
-"applications. Installing or removing packages with rpm --nodeps"
-"command> can cause applications to misbehave and/or crash, and can cause "
-"serious package management problems or, possibly, system failure. For these "
-"reasons, it is best to heed such warnings; the package manager—whether "
-"RPM , Yum or "
-"PackageKit —shows us these warnings and suggests "
-"possible fixes because accounting for dependencies is critical. The "
-"Yum package manager can perform dependency "
-"resolution and fetch dependencies from online repositories, making it safer, "
-"easier and smarter than forcing rpm to carry out actions "
-"without regard to resolving dependencies."
-msgstr ""
-
-# EXACT MATCH
-#. Tag: title
-#, no-c-format
-msgid "Upgrading"
-msgstr "アップグレード"
-
-#. Tag: para
-#, no-c-format
-msgid ""
-"Upgrading a package (using the -U option) is similar to "
-"installing one (the -i option). If we have the RPM named "
-"tree-1.5.3.0-1.fc12.x86_64.rpm in our current "
-"directory, and tree-1.5.2.2-4.fc12.x86_64.rpm is "
-"already installed on our system (rpm -qi will tell us "
-"which version of the tree package we have installed on "
-"our system, if any), then the following command will upgrade tree to the "
-"newer version:"
-msgstr ""
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"As part of upgrading a package, RPM automatically uninstalls any old "
-"versions of the foo package. Note that -U"
-"option> will also install a package even when there are no previous versions "
-"of the package installed."
-msgstr ""
-"パッケージアップグレードの一部として、RPM は自動的に foo パッケージの旧バージョンをすべてアンインストールしま"
-"す。実際には、以前にどのバージョンのパッケージもインストールしたことがなくて"
-"もこのオプションは機能するため、パッケージのインストールには常に -U"
-"option> を使用するのを好む人もいます。"
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"It is not advisable to use the -U option for installing "
-"kernel packages because RPM completely replaces the previous kernel package. "
-"This does not affect a running system, but if the new kernel is unable to "
-"boot during your next restart, there would be no other kernel to boot "
-"instead."
-msgstr ""
-"カーネルパッケージのインストールには-U を使わない方がいいで"
-"しょう。RPMは旧カーネルパッケージを置換してしまいます。システムの実行には影響"
-"しませんが、新しいカーネルで再起動時にブートできない場合、代りにブートする"
-"カーネルがなくなります。"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"Using the -i option adds the kernel to your GRUB boot menu "
-"(/etc/grub.conf ). Similarly, removing an old, unneeded "
-"kernel removes the kernel from GRUB."
-msgstr ""
-"-i オプションを使用するとそのカーネルがGRUBブートメニューに追"
-"加されます(/etc/grub.conf )。同様に、必"
-"要のなくなった古いカーネルを削除するとGRUBからそのカーネルが削除されます。"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"Because RPM performs intelligent upgrading of packages with configuration "
-"files, you may see one or the other of the following messages:"
-msgstr ""
-"RPMは設定ファイルを使用したパッケージのインテリジェントなアップグレードを行う"
-"ので、以下のようなメッセージが表示されることもあります。"
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"This message means that changes you made to the configuration file may not "
-"be forward-compatible with the new configuration file "
-"in the package, so RPM saved your original file and installed a new one. You "
-"should investigate the differences between the two configuration files and "
-"resolve them as soon as possible, to ensure that your system continues to "
-"function properly."
-msgstr ""
-"このメッセージは、設定ファイルに加えられた変更がパッケージ内の新しい設定ファ"
-"イルと前方互換 がない可能性があるため、RPMは元のファイ"
-"ルを保存したまま新しいファイルをインストールしたという意味です。できる限り早"
-"期に、この2つのファイルの違いを調査して解決し、引き続きシステムが正しく動作す"
-"るようにしてください。"
-
-#. Tag: para
-#, no-c-format
-msgid ""
-"Alternatively, RPM may save the package's new "
-"configuration file as, for example, foo.conf.rpmnew , "
-"and leave the configuration file you modified untouched. You should still "
-"resolve any conflicts between your modified configuration file and the new "
-"one, usually by merging changes from the old one to the new one with a "
-"diff program."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid ""
-"If you attempt to upgrade to a package with an older "
-"version number (that is, if a higher version of the package is already "
-"installed), the output is similar to the following:"
-msgstr ""
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"To force RPM to upgrade anyway, use the --oldpackage "
-"option:"
-msgstr ""
-"RPMにアップグレードを強行させるには、--"
-"oldpackage オプションを使用します。"
-
-# EXACT MATCH
-#. Tag: title
-#, no-c-format
-msgid "Freshening"
-msgstr "freshenの実行"
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"Freshening is similar to upgrading, except that only existent packages are "
-"upgraded. Type the following command at a shell prompt:"
-msgstr ""
-"パッケージへのfreshenの実行はアップグレード と似ています。シェルプロンプトで"
-"以下のコマンドを入力 します。"
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"RPM's freshen option checks the versions of the packages specified on the "
-"command line against the versions of packages that have already been "
-"installed on your system. When a newer version of an already-installed "
-"package is processed by RPM's freshen option, it is upgraded to the newer "
-"version. However, RPM's freshen option does not install a package if no "
-"previously-installed package of the same name exists. This differs from "
-"RPM's upgrade option, as an upgrade does install "
-"packages whether or not an older version of the package was already "
-"installed."
-msgstr ""
-"RPM のfreshenオプションにより、コマンドラインで 指定されたパッケージのバー"
-"ジョンと、すでにシステムに インストールされているパッケージのバージョンが照"
-"合 されます。インストールされているパッケージよりも 新しいバージョンのパッ"
-"ケージに対してRPM のfreshen オプションが実行されると、そのパッケージは新しい "
-"バージョンへアップグレードされます。ただし、同じ名前 でインストールされている"
-"パッケージが存在しない場合は、 RPM のfreshenオプションによるパッケージのイン"
-"ストール は実行されません。この点が、RPM のアップグレード オプションと異なり"
-"ます。アップグレードでは、古い バージョンのパッケージがインストールされている"
-"か どうかに関係なくパッケージが必ず インストールされま"
-"す。"
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"Freshening works for single packages or package groups. If you have just "
-"downloaded a large number of different packages, and you only want to "
-"upgrade those packages that are already installed on your system, freshening "
-"does the job. Thus, you do not have to delete any unwanted packages from the "
-"group that you downloaded before using RPM."
-msgstr ""
-"RPMのfreshenオプションは、単一のパッケージに対しても複数のパッケージに対して"
-"も使用できます。多数の異なるパッケージをダウンロードした後で、システムにイン"
-"ストールされているパッケージのみをアップグレードしたい場合に、freshenが役に立"
-"ちます。freshenを使用する場合、RPMを使う前にダウンロードしたグループ中から不"
-"要なパッケージを削除する必要はありません。"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"In this case, issue the following with the *.rpm glob:"
-msgstr "この場合、以下のコマンドを発行します。"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"RPM then automatically upgrades only those packages that are already "
-"installed."
-msgstr ""
-"RPMはすでにインストールされているパッケージのみ自動的にアップグレードします。"
-
-# EXACT MATCH
-#. Tag: title
-#, no-c-format
-msgid "Querying"
-msgstr "問い合わせ"
-
-#. Tag: para
-#, no-c-format
-msgid ""
-"The RPM database stores information about all RPM packages installed in your "
-"system. It is stored in the directory /var/lib/rpm/ , "
-"and is used to query what packages are installed, what versions each package "
-"is, and to calculate any changes to any files in the package since "
-"installation, among other use cases."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid ""
-"To query this database, use the -q option. The "
-"rpm -q package name command "
-"displays the package name, version, and release number of the installed "
-"package <package_name> . For example, using "
-"rpm -q tree to query installed package tree"
-"filename> might generate the following output:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid ""
-"You can also use the following Package Selection Options"
-"emphasis> (which is a subheading in the RPM man page: see man rpm"
-"command> for details) to further refine or qualify your query:"
-msgstr ""
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid "-a — queries all currently installed packages."
-msgstr ""
-"-a コマンドは、現時点で インストールされ"
-"ているすべてのパッケージの 問い合わせを実行します。"
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"-f <file_name> "
-"filename> — queries the RPM database for which package owns "
-"<file_name> . Specify "
-"the absolute path of the file (for example, rpm -qf /bin/"
-"ls instead of rpm -qf ls )."
-msgstr ""
-"-f <"
-"file> は、<file> の持ち主であるパッケー"
-"ジを問い合わせします。ファイルを指定するときは、そのファイルのフルパスを指定"
-"する必要があります (例、/bin/ls )。"
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"-p <package_file> "
-"filename> — queries the uninstalled package "
-"<package_file> ."
-msgstr ""
-"-p <"
-"packagefile> は、<packagefile> パッケージ"
-"の問い合わせを実行 します。"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"There are a number of ways to specify what information to display about "
-"queried packages. The following options are used to select the type of "
-"information for which you are searching. These are called the "
-"Package Query Options ."
-msgstr ""
-"問い合わせを行なったパッケージに関して表示する情報を指定する方法がたくさんあ"
-"ります。検索を行う情報のタイプを選択するには、以下のオプションを使用します。"
-"これらのオプションを情報選択オプション と 呼びます。"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"-i displays package information including name, "
-"description, release, size, build date, install date, vendor, and other "
-"miscellaneous information."
-msgstr ""
-"-i コマンドは、 パッケージ名、説明、リ"
-"リース、サイズ、構築日、 インストール日、ベンダーなど多様なパッケージ情報を "
-"表示します。"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"-l displays the list of files that the package contains."
-msgstr ""
-"-l コマンドは、 パッケージに含まれるファ"
-"イルの一覧を表示します。"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"-s displays the state of all the files in the package."
-msgstr ""
-"-s コマンドは、 パッケージに含まれるすべ"
-"てのファイルの状態を表示します。"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"-d displays a list of files marked as documentation (man "
-"pages, info pages, READMEs, etc.) in the package."
-msgstr ""
-"-d コマンドは、 ドキュメント(manページ、"
-"infoページ、READMEなど)として マークが付けられたファイルの一覧を表示します。"
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"-c displays a list of files marked as configuration "
-"files. These are the files you edit after installation to adapt and "
-"customize the package to your system (for example, sendmail.cf"
-"filename>, passwd , inittab , etc.)."
-msgstr ""
-"-c は、 設定ファイルとしてマークが付けら"
-"れたファイルの一覧を 表示します。これは、パッケージをシステムに適合させる た"
-"めに、ユーザーがインストール後に変更を加えるファイル です(例、sendmail.cf 、 passwd 、inittab など)。"
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"For options that display lists of files, add -v to the "
-"command to display the lists in a familiar ls -l format."
-msgstr ""
-"ファイルの一覧を表示するオプションについては、コマンドに-v を追加して、その一覧を使い慣れたls -l 形式で表示します。"
-
-# EXACT MATCH
-#. Tag: title
-#, no-c-format
-msgid "Verifying"
-msgstr "検証"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"Verifying a package compares information about files installed from a "
-"package with the same information from the original package. Among other "
-"things, verifying compares the file size, MD5 sum, permissions, type, owner, "
-"and group of each file."
-msgstr ""
-"パッケージの検証では、パッケージからインストール されたファイルに関する情報"
-"と、元のパッケージに含まれる ファイルに関する情報が同一かどうか調べます。 検"
-"証により、各ファイルのサイズ、MD5チェックサム、 権限、タイプ、所有者、グルー"
-"プを始め、さまざまなこと が比較されます。"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"The command rpm -V verifies a package. You can use any of "
-"the Verify Options listed for querying to specify the "
-"packages you wish to verify. A simple use of verifying is rpm -V "
-"tree , which verifies that all the files in the tree"
-"command> package are as they were when they were originally installed. For "
-"example:"
-msgstr ""
-"コマンドrpm -V は、パッケージの検証を行い"
-"ます。問い合わせの説明で示したPackage Verify Options を使"
-"用して、検証したいパッケージを指定することができます。簡単な使用法としては"
-"rpm -V foo というものがあります。これを"
-"実行すると、foo パッケージに含まれるすべ"
-"てのファイルが、それがインストールされた ときの状態と同じであるかどうかが検証"
-"されます。 例えば、"
-
-# EXACT MATCH
-#. Tag: para
-#, no-c-format
-msgid "To verify a package containing a particular file:"
-msgstr "特定のファイルを含むパッケージを検証するには、"
-
-#. Tag: para
-#, no-c-format
-msgid ""
-"In this example, /usr/bin/tree is the absolute path to "
-"the file used to query a package."
-msgstr ""
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"To verify ALL installed packages throughout the system (which will take some "
-"time):"
-msgstr "インストールされているすべてのパッケージを 検証するには、"
-
-# EXACT MATCH
-#. Tag: para
-#, no-c-format
-msgid "To verify an installed package against an RPM package file:"
-msgstr ""
-"インストールされているパッケージと、 RPM パッケージファイルとを検証するには、"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"This command can be useful if you suspect that your RPM database is corrupt."
-msgstr ""
-"RPM データベースが破損した疑いがある場合に、 このコマンドが役立ちます。"
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"If everything verified properly, there is no output. If there are any "
-"discrepancies, they are displayed. The format of the output is a string of "
-"eight characters (a \"c \" denotes a "
-"configuration file) and then the file name. Each of the eight characters "
-"denotes the result of a comparison of one attribute of the file to the value "
-"of that attribute recorded in the RPM database. A single period "
-"(. ) means the test passed. The following "
-"characters denote specific discrepancies:"
-msgstr ""
-"すべてが正常に検証された場合は何も出力されません。 何らかの矛盾が見つかった場"
-"合はその内容が表示されます。 出力フォーマットは、8個の文字列(c は設定ファイルを示す)とファイル名です。 "
-"8個の各文字は、ファイルの1つの属性とRPM データベースに 記録されたその属性の値"
-"とを比較した結果を示します。1つのピリオド(."
-" )は、 テストに合格したことを示します。以下の文字はそれぞれ "
-"何らかのテストで不合格になったことを示しています。"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid "5 — MD5 checksum"
-msgstr ""
-"5 —MD5チェックサム"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid "S — file size"
-msgstr ""
-"S —ファイルサイズ"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid "L — symbolic link"
-msgstr ""
-"L —シンボリックリン"
-"ク"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid "T — file modification time"
-msgstr ""
-"T —ファイル修正時刻"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid "D — device"
-msgstr "D —デバイス"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid "U — user"
-msgstr "U —ユーザー"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid "G — group"
-msgstr "G —グループ"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"M — mode (includes permissions and file "
-"type)"
-msgstr ""
-"M —モード(権限とファ"
-"イルタイプを含む)"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"? — unreadable file (file permission "
-"errors, for example)"
-msgstr ""
-"M —モード(権限とファ"
-"イルタイプを含む)"
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"If you see any output, use your best judgment to determine if you should "
-"remove the package, reinstall it, or fix the problem in another way."
-msgstr ""
-"何らかが出力された場合は、パッケージを削除する のか、再インストールするのか、"
-"あるいは別の方法で問題 を修正するのかを熟慮の上判断してください。"
-
-#. Tag: title
-#, no-c-format
-msgid "Practical and Common Examples of RPM Usage"
-msgstr ""
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"RPM is a useful tool for both managing your system and diagnosing and fixing "
-"problems. The best way to make sense of all its options is to look at some "
-"examples."
-msgstr ""
-"RPMはシステムの管理や問題の診断及び修正に役に立つ ツールです。これらのすべて"
-"のオプションを理解する 最善の方法はいくつかの例を見ることでしょう。"
-
-# EXACT MATCH
-#. Tag: para
-#, no-c-format
-msgid ""
-"Perhaps you have deleted some files by accident, but you are not sure what "
-"you deleted. To verify your entire system and see what might be missing, you "
-"could try the following command:"
-msgstr ""
-"誤って何らかのファイルを削除してしまったものの、 何を削除したかわからないとし"
-"ます。 システム全体を検証して足りないものを調べるには、以下のコマンドを試すこ"
-"とができます。"
-
-# EXACT MATCH
-#. Tag: para
-#, no-c-format
-msgid ""
-"If some files are missing or appear to have been corrupted, you should "
-"probably either re-install the package or uninstall and then re-install the "
-"package."
-msgstr ""
-"足りないファイルがあるか、壊れているファイルが あるように見える場合は、おそら"
-"くパッケージを再インストールするか、いったんアンインストールして 再インストー"
-"ルする必要があります。"
-
-# EXACT MATCH
-#. Tag: para
-#, no-c-format
-msgid ""
-"At some point, you might see a file that you do not recognize. To find out "
-"which package owns it, enter:"
-msgstr ""
-"所属先のわからないファイルを見つけたとします。そのファイルが含まれるパッケー"
-"ジを検索するには、以下のように入力します。"
-
-# EXACT MATCH
-#. Tag: para
-#, no-c-format
-msgid "The output would look like the following:"
-msgstr "出力は以下のようになります。"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"We can combine the above two examples in the following scenario. Say you are "
-"having problems with /usr/bin/paste . You would like to "
-"verify the package that owns that program, but you do not know which package "
-"owns paste . Enter the following command,"
-msgstr ""
-"上記2つの例を組み合わせて、次のような方法を 考えることができます。/usr/bin/paste に問題があるとします。このプログ"
-"ラムが 含まれるパッケージを検証しようにも、paste "
-" がどのパッケージに含まれるかがわかりません。次のコマンドを入力しま"
-"す。"
-
-# EXACT MATCH
-#. Tag: para
-#, no-c-format
-msgid "and the appropriate package is verified."
-msgstr "該当するパッケージが検証されます。"
-
-# EXACT MATCH
-#. Tag: para
-#, no-c-format
-msgid ""
-"Do you want to find out more information about a particular program? You can "
-"try the following command to locate the documentation which came with the "
-"package that owns that program:"
-msgstr ""
-"特定のプログラムに関して詳細な情報が必要 なら、次のコマンドを入力して、そのプ"
-"ログラムの入った パッケージに付随するドキュメントを検索することが できます。"
-
-# EXACT MATCH
-#. Tag: para
-#, no-c-format
-msgid "The output would be similar to the following:"
-msgstr "出力は以下のようになります。"
-
-# EXACT MATCH
-#. Tag: para
-#, no-c-format
-msgid ""
-"You may find a new RPM, but you do not know what it does. To find "
-"information about it, use the following command:"
-msgstr ""
-"新しいRPM パッケージ が見つかったものの、それが何で"
-"あるかがわからないと します。それに関する情報を検索するには、以下のコマンド "
-"を使用します。"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"Perhaps you now want to see what files the crontabs RPM "
-"package installs. You would enter the following:"
-msgstr ""
-"RPMがインストールするcrontabs ファイル"
-"がどのようなものか見てみましょう。 次のように入力します。"
-
-# EXACT MATCH
-#. Tag: para
-#, no-c-format
-msgid "The output is similar to the following:"
-msgstr "出力は以下のようになります。"
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"These are just a few examples. As you use RPM, you may find more uses for it."
-msgstr ""
-"以上がいくつかの例です。使用するにつれて、たくさんのRPM の用途がわかってきま"
-"す。"
-
-# EXACT MATCH
-#. Tag: title
-#, no-c-format
-msgid "Additional Resources"
-msgstr "その他のリソース"
-
-# EXACT MATCH
-#. Tag: para
-#, no-c-format
-msgid ""
-"RPM is an extremely complex utility with many options and methods for "
-"querying, installing, upgrading, and removing packages. Refer to the "
-"following resources to learn more about RPM."
-msgstr ""
-"RPM は、パッケージの問い合わせ、インストール、アップグレード、 削除を実行する"
-"ためのたくさんのオプションや方法がある 非常に複雑なユーティリティです。RPM の"
-"詳細については、 以下のリソースを参照してください。"
-
-# EXACT MATCH
-#. Tag: title
-#, no-c-format
-msgid "Installed Documentation"
-msgstr "インストールされているドキュメント"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"rpm --help — This command displays a quick reference of "
-"RPM parameters."
-msgstr ""
-"rpm --help — このコマンドを実行す"
-"ると、RPM のパラメータの クイックリファレンスが表示されます。"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"man rpm — The RPM man page gives more detail about RPM "
-"parameters than the rpm --help command."
-msgstr ""
-"man rpm — RPM のmanページでは、"
-"rpm --help コマンドより更に詳細なRPMのパ"
-"ラメータに関する情報が提供されています。"
-
-# EXACT MATCH
-#. Tag: title
-#, no-c-format
-msgid "Useful Websites"
-msgstr "役に立つWebサイト"
-
-# EXACT MATCH
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"The RPM website — http://www.rpm.org/"
-"ulink>"
-msgstr ""
-"http://www.rpm.org/ —RPMの"
-"Webページ"
-
-#. Tag: para
-#, no-c-format
-msgid ""
-"The RPM mailing list can be subscribed to, and its archives read from, here "
-"— https://"
-"lists.rpm.org/mailman/listinfo/rpm-list "
-msgstr ""
-
-# EXACT MATCH
-#. Tag: title
-#, no-c-format
-msgid "Related Books"
-msgstr "関連書籍"
-
-#. Tag: term
-#, no-c-format
-msgid ""
-"Maximum RPM — "
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid ""
-"The Maximum RPM book, which you can read online or "
-"download in HTML or PDF, covers everything from general RPM usage to "
-"building your own RPMs to programming with rpmlib."
-msgstr ""
-
-#. Tag: term
-#, no-c-format
-msgid ""
-"Red Hat RPM Guide — "
-msgstr ""
-
-# IGNORED
-#. Tag: para
-#, fuzzy, no-c-format
-msgid ""
-"The Red Hat RPM Guide by Eric Foster-Johnson is an "
-"excellent resource on all details of the RPM package format and the RPM "
-"package management utility."
-msgstr ""
-"&RH; RPM Guide Eric Foster-Johnson 著; Wiley, John & "
-"Sons, Incorporated — パッケージのインストールから、 RPMの構築まで、RPM"
-"の総合ガイドとなる書籍です。"
-
-# EXACT MATCH
-#~ msgid "Package Management with RPM"
-#~ msgstr "RPMによるパッケージ管理"
-
-# IGNORED
-#, fuzzy
-#~ msgid "Red Hat Package Manager"
-#~ msgstr "&RH; Package Manager"
-
-# EXACT MATCH
-#~ msgid "RPM "
-#~ msgstr "RPM "
-
-# EXACT MATCH
-#~ msgid "RPM "
-#~ msgstr "RPM "
-
-# EXACT MATCH
-#~ msgid "design goals"
-#~ msgstr "設計目標"
-
-# EXACT MATCH
-#~ msgid "using"
-#~ msgstr "使用法"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "The &RH; Errata Page available at http://www.redhat.com/apps/support/errata/ "
-#~ msgstr ""
-#~ "&RH; のエラータページは、http://www.redhat.com/apps/support/errata/ で ご覧くださ"
-#~ "い。"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "&RHN; — Refer to for more details "
-#~ "on &RHN;."
-#~ msgstr ""
-#~ "&RHN; — &RHN;に関する詳細については、 を参照してください。"
-
-# EXACT MATCH
-#~ msgid "installing"
-#~ msgstr "インストール"
-
-# EXACT MATCH
-#~ msgid "packages"
-#~ msgstr "パッケージ"
-
-# IGNORED
-#, fuzzy
-#~ msgid "rpm -ivh foo-1.0-1.i386.rpm "
-#~ msgstr ""
-#~ "-a コマンドは、現時点で インストールさ"
-#~ "れているすべてのパッケージの 問い合わせを実行します。"
-
-# IGNORED
-#, fuzzy
-#~ msgid "rpm -Uvh foo-1.0-1.i386.rpm "
-#~ msgstr ""
-#~ "-a コマンドは、現時点で インストールさ"
-#~ "れているすべてのパッケージの 問い合わせを実行します。"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "\n"
-#~ "Preparing... ########################################### "
-#~ "[100%] \n"
-#~ " 1:foo ########################################### "
-#~ "[100%] "
-#~ msgstr ""
-#~ "U —ユーザー"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "error: V3 DSA signature: BAD, key ID "
-#~ "0352860f "
-#~ msgstr ""
-#~ "D —デバイス"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "error: Header V3 DSA signature: BAD, "
-#~ "key ID 0352860f "
-#~ msgstr ""
-#~ "D —デバイス"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "warning: V3 DSA signature: NOKEY, key "
-#~ "ID 0352860f "
-#~ msgstr ""
-#~ "D —デバイス"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "If you are installing a kernel package, you should use rpm -ivh instead. Refer to for details."
-#~ msgstr ""
-#~ "カーネルパッケージをインストールしている場合は、 代わりにrpm -"
-#~ "ivh を使用する必要が あります。詳細はを参照して ください。"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "\n"
-#~ "Preparing... ########################################### "
-#~ "[100%] \n"
-#~ "package foo-1.0-1 is already installed "
-#~ msgstr ""
-#~ "U —ユーザー"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "rpm -ivh --replacepkgs foo-1.0-1.i386.rpm"
-#~ "command>"
-#~ msgstr ""
-#~ "-a コマンドは、現時点で インストールさ"
-#~ "れているすべてのパッケージの 問い合わせを実行します。"
-
-# EXACT MATCH
-#~ msgid "file conflicts"
-#~ msgstr "ファイルの競合"
-
-# EXACT MATCH
-#~ msgid "resolving"
-#~ msgstr "解決"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "\n"
-#~ "Preparing... ########################################### "
-#~ "[100%] \n"
-#~ "file /usr/bin/foo from install of foo-1.0-1 conflicts with file from "
-#~ "package bar-2.0.20 "
-#~ msgstr ""
-#~ "U —ユーザー"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "rpm -ivh --replacefiles foo-1.0-1.i386.rpm"
-#~ "command>"
-#~ msgstr ""
-#~ "-a コマンドは、現時点で インストールさ"
-#~ "れているすべてのパッケージの 問い合わせを実行します。"
-
-# EXACT MATCH
-#~ msgid "dependencies"
-#~ msgstr "依存"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "\n"
-#~ "error: Failed dependencies:\n"
-#~ " bar.so.2 is needed by foo-1.0-1 \n"
-#~ "Suggested resolutions:\n"
-#~ " bar-2.0.20-3.i386.rpm "
-#~ msgstr ""
-#~ "U —ユーザー"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "rpm -ivh foo-1.0-1.i386.rpm bar-2.0.20-3.i386."
-#~ "rpm "
-#~ msgstr ""
-#~ "-a コマンドは、現時点で インストールさ"
-#~ "れているすべてのパッケージの 問い合わせを実行します。"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "\n"
-#~ "Preparing... ########################################### "
-#~ "[100%] \n"
-#~ " 1:foo ########################################### "
-#~ "[ 50%] \n"
-#~ " 2:bar ########################################### "
-#~ "[100%] "
-#~ msgstr ""
-#~ "U —ユーザー"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "rpm -q --redhatprovides bar.so.2 "
-#~ msgstr ""
-#~ "-a コマンドは、現時点で インストールさ"
-#~ "れているすべてのパッケージの 問い合わせを実行します。"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "bar-2.0.20-3.i386.rpm "
-#~ msgstr ""
-#~ "U —ユーザー"
-
-# EXACT MATCH
-#~ msgid ""
-#~ "To force the installation anyway (which is not recommended since the "
-#~ "package may not run correctly), use the --nodeps option."
-#~ msgstr ""
-#~ "とにかくインストールをそのまま強制するには(パッケージが正常には動作しない"
-#~ "場合があるので推奨されません)、--nodeps オプションを使用し"
-#~ "ます。"
-
-# EXACT MATCH
-#~ msgid "uninstalling"
-#~ msgstr "アンインストール"
-
-# EXACT MATCH
-#~ msgid "removing"
-#~ msgstr "取り外し"
-
-# IGNORED
-#, fuzzy
-#~ msgid "rpm -e foo "
-#~ msgstr ""
-#~ "-a コマンドは、現時点で インストールさ"
-#~ "れているすべてのパッケージの 問い合わせを実行します。"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "\n"
-#~ "error: Failed dependencies: \n"
-#~ " foo is needed by (installed) bar-2.0.20-3.i386.rpm"
-#~ "computeroutput>"
-#~ msgstr ""
-#~ "U —ユーザー"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "To make RPM ignore this error and uninstall the package anyway (which may "
-#~ "break the package dependent on it) use the --nodeps "
-#~ "option."
-#~ msgstr ""
-#~ "RPM にこのエラーを無視させ、強制的にパッケージをアンインストールさせるに"
-#~ "は、これに依存しているパッケージを壊してしまう可能性がありますが、"
-#~ "--nodeps オプションを使用します。"
-
-# EXACT MATCH
-#~ msgid "upgrading"
-#~ msgstr "アップグレード"
-
-# EXACT MATCH
-#~ msgid ""
-#~ "Upgrading a package is similar to installing one. Type the following "
-#~ "command at a shell prompt:"
-#~ msgstr ""
-#~ "パッケージのアップグレードはインストールと 似ています。シェルプロンプトで"
-#~ "以下のコマンドを 入力します。"
-
-# IGNORED
-#, fuzzy
-#~ msgid "rpm -Uvh foo-2.0-1.i386.rpm "
-#~ msgstr ""
-#~ "-a コマンドは、現時点で インストールさ"
-#~ "れているすべてのパッケージの 問い合わせを実行します。"
-
-# EXACT MATCH
-#~ msgid "Tip "
-#~ msgstr "ヒント "
-
-# EXACT MATCH
-#~ msgid "preserving configuration files"
-#~ msgstr "設定ファイルの保存"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "saving /etc/foo.conf as /etc/foo.conf."
-#~ "rpmsave "
-#~ msgstr ""
-#~ "U —ユーザー"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "package foo-2.0-1 (which is newer than "
-#~ "foo-1.0-1) is already installed "
-#~ msgstr ""
-#~ "U —ユーザー"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "rpm -Uvh --oldpackage foo-1.0-1.i386.rpm"
-#~ "command>"
-#~ msgstr ""
-#~ "-a コマンドは、現時点で インストールさ"
-#~ "れているすべてのパッケージの 問い合わせを実行します。"
-
-# EXACT MATCH
-#~ msgid "freshen"
-#~ msgstr "freshen"
-
-# EXACT MATCH
-#~ msgid "freshening packages"
-#~ msgstr "パッケージにfreshenを実行"
-
-# EXACT MATCH
-#~ msgid "freshening with RPM"
-#~ msgstr "RPMでfreshenを実行"
-
-# IGNORED
-#, fuzzy
-#~ msgid "rpm -Fvh foo-1.2-1.i386.rpm "
-#~ msgstr ""
-#~ "-a コマンドは、現時点で インストールさ"
-#~ "れているすべてのパッケージの 問い合わせを実行します。"
-
-# IGNORED
-#, fuzzy
-#~ msgid "rpm -Fvh *.rpm "
-#~ msgstr ""
-#~ "-a コマンドは、現時点で インストールさ"
-#~ "れているすべてのパッケージの 問い合わせを実行します。"
-
-# EXACT MATCH
-#~ msgid "querying"
-#~ msgstr "問い合わせ"
-
-# IGNORED
-#, fuzzy
-#~ msgid "foo-2.0-1 "
-#~ msgstr ""
-#~ "U —ユーザー"
-
-# EXACT MATCH
-#~ msgid "verifying"
-#~ msgstr "検証"
-
-# IGNORED
-#, fuzzy
-#~ msgid "rpm -Vf /usr/bin/foo "
-#~ msgstr ""
-#~ "-a コマンドは、現時点で インストールさ"
-#~ "れているすべてのパッケージの 問い合わせを実行します。"
-
-# IGNORED
-#, fuzzy
-#~ msgid "rpm -Va "
-#~ msgstr ""
-#~ "-a コマンドは、現時点で インストールさ"
-#~ "れているすべてのパッケージの 問い合わせを実行します。"
-
-# IGNORED
-#, fuzzy
-#~ msgid "rpm -Vp foo-1.0-1.i386.rpm "
-#~ msgstr ""
-#~ "-a コマンドは、現時点で インストールさ"
-#~ "れているすべてのパッケージの 問い合わせを実行します。"
-
-# EXACT MATCH
-#~ msgid ""
-#~ "? — unreadable "
-#~ "file"
-#~ msgstr ""
-#~ "? —読み込み不可"
-#~ "ファイル"
-
-# EXACT MATCH
-#~ msgid "Checking a Package's Signature"
-#~ msgstr "パッケージの署名のチェック"
-
-# EXACT MATCH
-#~ msgid "md5sum"
-#~ msgstr "md5sum"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "If you wish to verify that a package has not been corrupted or tampered "
-#~ "with, examine only the md5sum by typing the following command at a shell "
-#~ "prompt (where <rpm-file> is the file "
-#~ "name of the RPM package):"
-#~ msgstr ""
-#~ "パッケージが破損したり不正に変更されたりしていないことを検査する場合、シェ"
-#~ "ルプロンプトで以下のコマンドを入力してmd5sumを調べます(<"
-#~ "rpm-file> の部分を実際のRPM "
-#~ "パッケージのファイル名に置き換えてください)。"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "rpm -K --nosignature <rpm-"
-#~ "file> "
-#~ msgstr ""
-#~ "-a コマンドは、現時点で インストールさ"
-#~ "れているすべてのパッケージの 問い合わせを実行します。"
-
-# EXACT MATCH
-#~ msgid ""
-#~ "The message <rpm-"
-#~ "file> : md5 OK is displayed. This brief "
-#~ "message means that the file was not corrupted by the download. To see a "
-#~ "more verbose message, replace -K with -Kvv"
-#~ "option> in the command."
-#~ msgstr ""
-#~ "<rpm-file>"
-#~ "replaceable>: md5 OK と言うメッセージが表示されます。 この"
-#~ "短いメッセージはダウンロードによるメッセージの 破損はないことを意味してい"
-#~ "ます。詳細メッセージを 表示するには、コマンド内の -K を "
-#~ "-Kvv に置き換えます。"
-
-# EXACT MATCH
-#~ msgid ""
-#~ "On the other hand, how trustworthy is the developer who created the "
-#~ "package? If the package is signed with the "
-#~ "developer's GnuPG key , you know that the developer "
-#~ "really is who they say they are."
-#~ msgstr ""
-#~ "一方、パッケージを作成した開発者はどの程度に 信用できるでしょうか。パッ"
-#~ "ケージが開発者の GnuPG キー で署名"
-#~ "firstterm> されていれば、開発者が誰なのか判断できます。"
-
-# EXACT MATCH
-#~ msgid "GnuPG "
-#~ msgstr "GnuPG "
-
-# EXACT MATCH
-#~ msgid "checking package signatures"
-#~ msgstr "パッケージ署名のチェック"
-
-# EXACT MATCH
-#~ msgid "GnuPG "
-#~ msgstr "GnuPG "
-
-# EXACT MATCH
-#~ msgid "checking RPM package signatures"
-#~ msgstr "RPM パッケージ署名のチェック"
-
-# EXACT MATCH
-#~ msgid ""
-#~ "An RPM package can be signed using Gnu Privacy Guard"
-#~ "firstterm> (or GnuPG), to help you make certain your downloaded package "
-#~ "is trustworthy."
-#~ msgstr ""
-#~ "RPMパッケージはGnu Privacy Guard (GnuPG)を使用して"
-#~ "署名でき、これによりユーザーはダウンロードしたパッケージが信頼できるもので"
-#~ "あることを確認できます。"
-
-# EXACT MATCH
-#~ msgid ""
-#~ "GnuPG is a tool for secure communication; it is a complete and free "
-#~ "replacement for the encryption technology of PGP, an electronic privacy "
-#~ "program. With GnuPG, you can authenticate the validity of documents and "
-#~ "encrypt/decrypt data to and from other recipients. GnuPG is capable of "
-#~ "decrypting and verifying PGP 5.x files as well."
-#~ msgstr ""
-#~ "GnuPGは安全な通信のためのツールで、PGPの暗号化技術である電子プライバシー保"
-#~ "護プログラムを完全に無償で置き換えたものです。GnuPGを使用して、ドキュメン"
-#~ "トの正当性を認証し、他の受信者との間で送受信するデータを暗号化/解読するこ"
-#~ "とができます。GnuPGは、PGP 5.x のファイルについ"
-#~ "ても同様に 解読、認証を行うことが可能です。"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "During installation, GnuPG is installed by default. That way you can "
-#~ "immediately start using GnuPG to verify any packages that you receive "
-#~ "from Red Hat. Before doing so, you must first import &RH;'s public key."
-#~ msgstr ""
-#~ "インストール時に、GnuPGがデフォルトでインストールされます。このため、&RH;"
-#~ "から入手したパッケージの検査をGnuPGを使用してすぐに始めることができます。"
-#~ "最初に、&RH;の公開キーをインポートする必要があります。"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "To verify &RH; packages, you must import the &RH; GPG key. To do so, "
-#~ "execute the following command at a shell prompt:"
-#~ msgstr ""
-#~ "&RH;パッケージを検証するには、&RH; GPGキーをインポート する必要がありま"
-#~ "す。これを実行するには、シェルプロンプト で次のコマンドを実行します。"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "rpm --import /usr/share/rhn/RPM-GPG-KEY"
-#~ "command>"
-#~ msgstr ""
-#~ "-a コマンドは、現時点で インストールさ"
-#~ "れているすべてのパッケージの 問い合わせを実行します。"
-
-# EXACT MATCH
-#~ msgid ""
-#~ "To display a list of all keys installed for RPM verification, execute the "
-#~ "command:"
-#~ msgstr ""
-#~ "RPM検証用にインストールされたすべてのキーの一覧を 表示するには、次のコマン"
-#~ "ドを実行します。"
-
-# IGNORED
-#, fuzzy
-#~ msgid "rpm -qa gpg-pubkey* "
-#~ msgstr ""
-#~ "-a コマンドは、現時点で インストールさ"
-#~ "れているすべてのパッケージの 問い合わせを実行します。"
-
-# IGNORED
-#, fuzzy
-#~ msgid "For the &RH; key, the output includes:"
-#~ msgstr "&RH;キー用には、出力が次を含んでいます。"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "gpg-pubkey-db42a60e-37ea5438"
-#~ "computeroutput>"
-#~ msgstr ""
-#~ "U —ユーザー"
-
-# EXACT MATCH
-#~ msgid ""
-#~ "To display details about a specific key, use rpm -qi followed by the output from the previous command:"
-#~ msgstr ""
-#~ "特定のキーの詳細を表示するには、rpm -qi "
-#~ "command>コマンドの後に、先程のコマンドの出力を 付けます。"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "rpm -qi gpg-pubkey-db42a60e-37ea5438 "
-#~ msgstr ""
-#~ "U —ユーザー"
-
-# EXACT MATCH
-#~ msgid "Verifying Signature of Packages"
-#~ msgstr "パッケージ署名の検証"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "To check the GnuPG signature of an RPM file after importing the builder's "
-#~ "GnuPG key, use the following command (replace <rpm-"
-#~ "file> with the filename of the RPM package):"
-#~ msgstr ""
-#~ "構築者のGnuPGキーをインポートした後で、RPMファイルの GnuPG署名をチェックす"
-#~ "るには、次のコマンドを使用します (<rpm-file>"
-#~ "replaceable>を実際の RPMパッケージのファイル名に置き換えます)。"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "rpm -K <rpm-file>"
-#~ "replaceable> "
-#~ msgstr ""
-#~ "-a コマンドは、現時点で インストールさ"
-#~ "れているすべてのパッケージの 問い合わせを実行します。"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "If all goes well, the following message is displayed: md5 gpg OK . This means that the "
-#~ "signature of the package has been verified, and that it is not corrupt."
-#~ msgstr ""
-#~ "すべて問題がなければ、md5 gpg OK "
-#~ "computeroutput>のメッセージが表示されます。パッケージの署名が検証され、破"
-#~ "損していないという意味です。"
-
-# EXACT MATCH
-#~ msgid "tips"
-#~ msgstr "ヒント"
-
-# EXACT MATCH
-#~ msgid "finding deleted files with"
-#~ msgstr "削除したファイルを探す"
-
-# EXACT MATCH
-#~ msgid "finding deleted files from"
-#~ msgstr "削除したファイルを探す"
-
-# EXACT MATCH
-#~ msgid "determining file ownership with"
-#~ msgstr "ファイルの所属先を確定する"
-
-# IGNORED
-#, fuzzy
-#~ msgid "rpm -qf /usr/bin/ggv "
-#~ msgstr ""
-#~ "-a コマンドは、現時点で インストールさ"
-#~ "れているすべてのパッケージの 問い合わせを実行します。"
-
-# IGNORED
-#, fuzzy
-#~ msgid "ggv-2.6.0-2 "
-#~ msgstr ""
-#~ "U —ユーザー"
-
-# IGNORED
-#, fuzzy
-#~ msgid "rpm -Vf /usr/bin/paste "
-#~ msgstr ""
-#~ "-a コマンドは、現時点で インストールさ"
-#~ "れているすべてのパッケージの 問い合わせを実行します。"
-
-# EXACT MATCH
-#~ msgid "documentation with"
-#~ msgstr "ドキュメント"
-
-# EXACT MATCH
-#~ msgid "locating documentation for"
-#~ msgstr "ドキュメントの検索"
-
-# EXACT MATCH
-#~ msgid "documentation"
-#~ msgstr "ドキュメント"
-
-# EXACT MATCH
-#~ msgid "finding installed"
-#~ msgstr "インストール先を探す"
-
-# IGNORED
-#, fuzzy
-#~ msgid "rpm -qdf /usr/bin/free "
-#~ msgstr ""
-#~ "-a コマンドは、現時点で インストールさ"
-#~ "れているすべてのパッケージの 問い合わせを実行します。"
-
-# EXACT MATCH
-#~ msgid "querying uninstalled packages"
-#~ msgstr "アンインストールしたパッケージの問い合わせ"
-
-# EXACT MATCH
-#~ msgid "querying uninstalled"
-#~ msgstr "アンインストールの問い合わせ"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "rpm -qip crontabs-1.10-7.noarch.rpm "
-#~ msgstr ""
-#~ "-a コマンドは、現時点で インストールさ"
-#~ "れているすべてのパッケージの 問い合わせを実行します。"
-
-# EXACT MATCH
-#~ msgid "querying for file list"
-#~ msgstr "ファイル一覧の問い合わせ"
-
-# EXACT MATCH
-#~ msgid "obtaining list of files"
-#~ msgstr "ファイル一覧の入手"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "rpm -qlp crontabs-1.10-5.noarch.rpm "
-#~ msgstr ""
-#~ "-a コマンドは、現時点で インストールさ"
-#~ "れているすべてのパッケージの 問い合わせを実行します。"
-
-# IGNORED
-#, fuzzy
-#~ msgid ""
-#~ "\n"
-#~ "/etc/cron.daily \n"
-#~ "/etc/cron.hourly \n"
-#~ "/etc/cron.monthly \n"
-#~ "/etc/cron.weekly \n"
-#~ "/etc/crontab \n"
-#~ "/usr/bin/run-parts "
-#~ msgstr ""
-#~ "U —ユーザー"
-
-# EXACT MATCH
-#~ msgid "additional resources"
-#~ msgstr "その他のリソース"
-
-# EXACT MATCH
-#~ msgid "website"
-#~ msgstr "webサイト"
-
-# EXACT MATCH
-#~ msgid ""
-#~ "http://"
-#~ "www.redhat.com/mailman/listinfo/rpm-list/ — The RPM mailing "
-#~ "list is archived here. To subscribe, send mail to rpm-list-"
-#~ "request@redhat.com with the word subscribe in the subject line."
-#~ msgstr ""
-#~ "http://"
-#~ "www.redhat.com/mailman/listinfo/rpm-list/ — RPMのメーリング"
-#~ "リストがここにアーカイブされています。 講読するには、件名の欄に subscribe という単語を記入して メールを"
-#~ "rpm-list-request@redhat.com 宛に送信します。"
-
-# EXACT MATCH
-#~ msgid "book about"
-#~ msgstr "関連書籍"
diff --git a/client/zanata-client-ant-po/src/test/resources/test-input/pot/RPM.pot b/client/zanata-client-ant-po/src/test/resources/test-input/pot/RPM.pot
deleted file mode 100644
index dcdc7fcb6d..0000000000
--- a/client/zanata-client-ant-po/src/test/resources/test-input/pot/RPM.pot
+++ /dev/null
@@ -1,699 +0,0 @@
-#
-# AUTHOR , YEAR.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: 0\n"
-"POT-Creation-Date: 2010-03-18T07:41:00\n"
-"PO-Revision-Date: 2010-03-18T07:41:00\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: None\n"
-"MIME-Version: 1.0\n"
-"Content-Type: application/x-publican; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#. Tag: title
-#, no-c-format
-msgid "RPM"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "The RPM Package Manager (RPM) is an open packaging system, which runs on &MAJOR_OS; as well as other Linux and UNIX systems. Red Hat, Inc. and the Fedora Project encourage other vendors to use RPM for their own products. RPM is distributed under the terms of the GPL (GNU General Public License )."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "The RPM Package Manager only works with packages built to work with the RPM format . RPM is itself provided as a pre-installed rpm package. For the end user, RPM makes system updates easy. Installing, uninstalling and upgrading RPM packages can be accomplished with short commands. RPM maintains a database of installed packages and their files, so you can invoke powerful queries and verifications on your system. If you prefer a graphical interface, you can use the PackageKit GUI to perform many RPM commands. Refer to for details."
-msgstr ""
-
-#. Tag: title
-#, no-c-format
-msgid "Important"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "When installing a package, ensure it is compatible with your operating system and processor architecture. This can usually be determined by checking the package name. Many of the following examples show RPM packages compiled for the AMD64/Intel 64 computer architectures; thus, the RPM file name ends in x86_64.rpm ."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "During upgrades, RPM handles configuration files carefully, so that you never lose your customizations—something that you cannot accomplish with regular .tar.gz files."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "For the developer, RPM allows you to take software source code and package it into source and binary packages for end users. This process is quite simple and is driven from a single file and optional patches that you create. This clear delineation between pristine sources and your patches along with build instructions eases the maintenance of the package as new versions of the software are released."
-msgstr ""
-
-#. Tag: title
-#, no-c-format
-msgid "Note"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "Because RPM makes changes to your system, you must be logged in as root to install, remove, or upgrade an RPM package."
-msgstr ""
-
-#. Tag: title
-#, no-c-format
-msgid "RPM Design Goals"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "To understand how to use RPM, it can be helpful to understand the design goals of RPM:"
-msgstr ""
-
-#. Tag: term
-#, no-c-format
-msgid "Upgradability"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "With RPM, you can upgrade individual components of your system without completely reinstalling. When you get a new release of an operating system based on RPM, such as &MAJOR_OS;, you do not need to reinstall a fresh copy of the operating system your machine (as you might need to with operating systems based on other packaging systems). RPM allows intelligent, fully-automated, in-place upgrades of your system. In addition, configuration files in packages are preserved across upgrades, so you do not lose your customizations. There are no special upgrade files needed to upgrade a package because the same RPM file is used to both install and upgrade the package on your system."
-msgstr ""
-
-#. Tag: term
-#, no-c-format
-msgid "Powerful Querying"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "RPM is designed to provide powerful querying options. You can perform searches on your entire database for packages or even just certain files. You can also easily find out what package a file belongs to and from where the package came. The files an RPM package contains are in a compressed archive, with a custom binary header containing useful information about the package and its contents, allowing you to query individual packages quickly and easily."
-msgstr ""
-
-#. Tag: term
-#, no-c-format
-msgid "System Verification"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "Another powerful RPM feature is the ability to verify packages. If you are worried that you deleted an important file for some package, you can verify the package. You are then notified of anomalies, if any—at which point you can reinstall the package, if necessary. Any configuration files that you modified are preserved during reinstallation."
-msgstr ""
-
-#. Tag: term
-#, no-c-format
-msgid "Pristine Sources"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "A crucial design goal was to allow the use of pristine software sources, as distributed by the original authors of the software. With RPM, you have the pristine sources along with any patches that were used, plus complete build instructions. This is an important advantage for several reasons. For instance, if a new version of a program is released, you do not necessarily have to start from scratch to get it to compile. You can look at the patch to see what you might need to do. All the compiled-in defaults, and all of the changes that were made to get the software to build properly, are easily visible using this technique."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "The goal of keeping sources pristine may seem important only for developers, but it results in higher quality software for end users, too."
-msgstr ""
-
-#. Tag: title
-#, no-c-format
-msgid "Using RPM"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "RPM has five basic modes of operation (not counting package building): installing, uninstalling, upgrading, querying, and verifying. This section contains an overview of each mode. For complete details and options, try rpm --help or man rpm . You can also refer to for more information on RPM."
-msgstr ""
-
-#. Tag: title
-#, no-c-format
-msgid "Finding RPM Packages"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "Before using any RPM packages, you must know where to find them. An Internet search returns many RPM repositories, but if you are looking for RPM packages built by the Fedora Project, they can be found at the following locations:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "The &MAJOR_OS; installation media contain many installable RPMs."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "The initial RPM repositories provided with the YUM package manager. Refer to for details on how to use the official &MAJOR_OS; package repositories."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "Unofficial, third-party repositories not affiliated with the Fedora Project also provide RPM packages."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "When considering third-party repositories for use with your &MAJOR_OS; system, pay close attention to the repository's web site with regard to package compatibility before adding the repository as a package source. Alternate package repositories may offer different, incompatible versions of the same software, including packages already included in the Fedora repositories."
-msgstr ""
-
-#. Tag: title
-#, no-c-format
-msgid "Installing"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "RPM packages typically have file names like tree-1.5.2.2-4.fc12.x86_64.rpm . The file name includes the package name (tree ), version (1.5.2.2 ), release (4 ), operating system major version (fc12 ) and CPU architecture (x86_64 ). Assuming the tree-1.5.2.2-4.fc12.x86_64.rpm package is in the current directory, log in as root and type the following command at a shell prompt to install it:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "The -i option tells rpm to install the package, and the v and h options, while aren't strictly necessary, increase output information and display a progress meter, respectively."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "Alternatively, you can use the -U option, which upgrades the package if an older version is already installed, or simply installs it if not:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "If the installation is successful, the following output is displayed:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "As you can see, RPM prints out the name of the package and then prints a succession of hash marks as a progress meter while the package is installed."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "The signature of a package is checked automatically when installing or upgrading a package. The signature confirms that the package was signed by an authorized party. For example, if the verification of the signature fails, an error message such as the following is displayed:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "If it is a new, header-only, signature, an error message such as the following is displayed:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "If you do not have the appropriate key installed to verify the signature, the message contains the word NOKEY :"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "Refer to for more information on checking a package's signature."
-msgstr ""
-
-#. Tag: title
-#, no-c-format
-msgid "Warning"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "If you are installing a kernel package, you should always use the rpm -ivh command (simple install) instead of rpm -Uvh . The reason for this is that install (-i ) and upgrade (-U ) take on specific meanings when installing kernel packages. Refer to for details."
-msgstr ""
-
-#. Tag: title
-#, no-c-format
-msgid "Package Already Installed"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "If a package of the same name and version is already installed, the following output is displayed:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "However, if you want to install the package anyway, you can use the --replacepkgs option, which tells RPM to ignore the error:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "This option is helpful if files installed from the RPM were deleted or if you want the original configuration files from the RPM to be installed."
-msgstr ""
-
-#. Tag: title
-#, no-c-format
-msgid "Conflicting Files"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "If you attempt to install a package that contains a file which has already been installed by another package, the following is displayed:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "To make RPM ignore this error, use the --replacefiles option:"
-msgstr ""
-
-#. Tag: title
-#, no-c-format
-msgid "Unresolved Dependency"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "RPM packages may sometimes depend on other packages, which means that they require other packages to be installed to run properly. If you try to install a package which has an unresolved dependency, output similar to the following is displayed:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "If you are installing a package from the &MAJOR_OS; installation media, such as from a CD-ROM or DVD, it usually suggests the package or packages needed to resolve the dependency. Find the suggested package(s) on the &MAJOR_OS; installation media or on one of the active &MAJOR_OS; mirrors ( ) and add it to the command:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "If installation of both packages is successful, output similar to the following is displayed:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "If it does not suggest a package to resolve the dependency, you can try the --whatprovides option to determine which package contains the required file."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "If the package that contains bar.so.3 is in the RPM database, the name of the package is displayed:"
-msgstr ""
-
-#. Tag: title
-#, no-c-format
-msgid "Warning: Forcing Package Installation"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "Although we can force rpm to install a package that gives us a Failed dependencies error (using the --nodeps option), this is not recommended, and will usually result in the installed package failing to run. Installing or removing packages with rpm --nodeps can cause applications to misbehave and/or crash, and can cause serious package management problems or, possibly, system failure. For these reasons, it is best to heed such warnings; the package manager—whether RPM , Yum or PackageKit —shows us these warnings and suggests possible fixes because accounting for dependencies is critical. The Yum package manager can perform dependency resolution and fetch dependencies from online repositories, making it safer, easier and smarter than forcing rpm to carry out actions without regard to resolving dependencies."
-msgstr ""
-
-#. Tag: title
-#, no-c-format
-msgid "Uninstalling"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "Uninstalling a package is just as simple as installing one. Type the following command at a shell prompt:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "Notice that we used the package name foo , not the name of the original package file , foo-1.0-1.fc12.x86_64 . If you attempt to uninstall a package using the rpm -e command and the original full file name, you will receive a package name error."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "You can encounter dependency errors when uninstalling a package if another installed package depends on the one you are trying to remove. For example:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "Similar to how we searched for a shared object library (i.e. a <library_name> .so.<number> file) in , we can search for a 64-bit shared object library using this exact syntax (and making sure to quote the file name):"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "Although we can force rpm to remove a package that gives us a Failed dependencies error (using the --nodeps option), this is not recommended, and may cause harm to other installed applications. Installing or removing packages with rpm --nodeps can cause applications to misbehave and/or crash, and can cause serious package management problems or, possibly, system failure. For these reasons, it is best to heed such warnings; the package manager—whether RPM , Yum or PackageKit —shows us these warnings and suggests possible fixes because accounting for dependencies is critical. The Yum package manager can perform dependency resolution and fetch dependencies from online repositories, making it safer, easier and smarter than forcing rpm to carry out actions without regard to resolving dependencies."
-msgstr ""
-
-#. Tag: title
-#, no-c-format
-msgid "Upgrading"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "Upgrading a package (using the -U option) is similar to installing one (the -i option). If we have the RPM named tree-1.5.3.0-1.fc12.x86_64.rpm in our current directory, and tree-1.5.2.2-4.fc12.x86_64.rpm is already installed on our system (rpm -qi will tell us which version of the tree package we have installed on our system, if any), then the following command will upgrade tree to the newer version:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "As part of upgrading a package, RPM automatically uninstalls any old versions of the foo package. Note that -U will also install a package even when there are no previous versions of the package installed."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "It is not advisable to use the -U option for installing kernel packages because RPM completely replaces the previous kernel package. This does not affect a running system, but if the new kernel is unable to boot during your next restart, there would be no other kernel to boot instead."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "Using the -i option adds the kernel to your GRUB boot menu (/etc/grub.conf ). Similarly, removing an old, unneeded kernel removes the kernel from GRUB."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "Because RPM performs intelligent upgrading of packages with configuration files, you may see one or the other of the following messages:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "This message means that changes you made to the configuration file may not be forward-compatible with the new configuration file in the package, so RPM saved your original file and installed a new one. You should investigate the differences between the two configuration files and resolve them as soon as possible, to ensure that your system continues to function properly."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "Alternatively, RPM may save the package's new configuration file as, for example, foo.conf.rpmnew , and leave the configuration file you modified untouched. You should still resolve any conflicts between your modified configuration file and the new one, usually by merging changes from the old one to the new one with a diff program."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "If you attempt to upgrade to a package with an older version number (that is, if a higher version of the package is already installed), the output is similar to the following:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "To force RPM to upgrade anyway, use the --oldpackage option:"
-msgstr ""
-
-#. Tag: title
-#, no-c-format
-msgid "Freshening"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "Freshening is similar to upgrading, except that only existent packages are upgraded. Type the following command at a shell prompt:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "RPM's freshen option checks the versions of the packages specified on the command line against the versions of packages that have already been installed on your system. When a newer version of an already-installed package is processed by RPM's freshen option, it is upgraded to the newer version. However, RPM's freshen option does not install a package if no previously-installed package of the same name exists. This differs from RPM's upgrade option, as an upgrade does install packages whether or not an older version of the package was already installed."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "Freshening works for single packages or package groups. If you have just downloaded a large number of different packages, and you only want to upgrade those packages that are already installed on your system, freshening does the job. Thus, you do not have to delete any unwanted packages from the group that you downloaded before using RPM."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "In this case, issue the following with the *.rpm glob:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "RPM then automatically upgrades only those packages that are already installed."
-msgstr ""
-
-#. Tag: title
-#, no-c-format
-msgid "Querying"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "The RPM database stores information about all RPM packages installed in your system. It is stored in the directory /var/lib/rpm/ , and is used to query what packages are installed, what versions each package is, and to calculate any changes to any files in the package since installation, among other use cases."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "To query this database, use the -q option. The rpm -q package name command displays the package name, version, and release number of the installed package <package_name> . For example, using rpm -q tree to query installed package tree might generate the following output:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "You can also use the following Package Selection Options (which is a subheading in the RPM man page: see man rpm for details) to further refine or qualify your query:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "-a — queries all currently installed packages."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "-f <file_name> — queries the RPM database for which package owns <file_name> . Specify the absolute path of the file (for example, rpm -qf /bin/ls instead of rpm -qf ls )."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "-p <package_file> — queries the uninstalled package <package_file> ."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "There are a number of ways to specify what information to display about queried packages. The following options are used to select the type of information for which you are searching. These are called the Package Query Options ."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "-i displays package information including name, description, release, size, build date, install date, vendor, and other miscellaneous information."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "-l displays the list of files that the package contains."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "-s displays the state of all the files in the package."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "-d displays a list of files marked as documentation (man pages, info pages, READMEs, etc.) in the package."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "-c displays a list of files marked as configuration files. These are the files you edit after installation to adapt and customize the package to your system (for example, sendmail.cf , passwd , inittab , etc.)."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "For options that display lists of files, add -v to the command to display the lists in a familiar ls -l format."
-msgstr ""
-
-#. Tag: title
-#, no-c-format
-msgid "Verifying"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "Verifying a package compares information about files installed from a package with the same information from the original package. Among other things, verifying compares the file size, MD5 sum, permissions, type, owner, and group of each file."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "The command rpm -V verifies a package. You can use any of the Verify Options listed for querying to specify the packages you wish to verify. A simple use of verifying is rpm -V tree , which verifies that all the files in the tree package are as they were when they were originally installed. For example:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "To verify a package containing a particular file:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "In this example, /usr/bin/tree is the absolute path to the file used to query a package."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "To verify ALL installed packages throughout the system (which will take some time):"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "To verify an installed package against an RPM package file:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "This command can be useful if you suspect that your RPM database is corrupt."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "If everything verified properly, there is no output. If there are any discrepancies, they are displayed. The format of the output is a string of eight characters (a \"c \" denotes a configuration file) and then the file name. Each of the eight characters denotes the result of a comparison of one attribute of the file to the value of that attribute recorded in the RPM database. A single period (. ) means the test passed. The following characters denote specific discrepancies:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "5 — MD5 checksum"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "S — file size"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "L — symbolic link"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "T — file modification time"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "D — device"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "U — user"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "G — group"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "M — mode (includes permissions and file type)"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "? — unreadable file (file permission errors, for example)"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "If you see any output, use your best judgment to determine if you should remove the package, reinstall it, or fix the problem in another way."
-msgstr ""
-
-#. Tag: title
-#, no-c-format
-msgid "Practical and Common Examples of RPM Usage"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "RPM is a useful tool for both managing your system and diagnosing and fixing problems. The best way to make sense of all its options is to look at some examples."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "Perhaps you have deleted some files by accident, but you are not sure what you deleted. To verify your entire system and see what might be missing, you could try the following command:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "If some files are missing or appear to have been corrupted, you should probably either re-install the package or uninstall and then re-install the package."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "At some point, you might see a file that you do not recognize. To find out which package owns it, enter:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "The output would look like the following:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "We can combine the above two examples in the following scenario. Say you are having problems with /usr/bin/paste . You would like to verify the package that owns that program, but you do not know which package owns paste . Enter the following command,"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "and the appropriate package is verified."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "Do you want to find out more information about a particular program? You can try the following command to locate the documentation which came with the package that owns that program:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "The output would be similar to the following:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "You may find a new RPM, but you do not know what it does. To find information about it, use the following command:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "Perhaps you now want to see what files the crontabs RPM package installs. You would enter the following:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "The output is similar to the following:"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "These are just a few examples. As you use RPM, you may find more uses for it."
-msgstr ""
-
-#. Tag: title
-#, no-c-format
-msgid "Additional Resources"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "RPM is an extremely complex utility with many options and methods for querying, installing, upgrading, and removing packages. Refer to the following resources to learn more about RPM."
-msgstr ""
-
-#. Tag: title
-#, no-c-format
-msgid "Installed Documentation"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "rpm --help — This command displays a quick reference of RPM parameters."
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "man rpm — The RPM man page gives more detail about RPM parameters than the rpm --help command."
-msgstr ""
-
-#. Tag: title
-#, no-c-format
-msgid "Useful Websites"
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "The RPM website — http://www.rpm.org/ "
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "The RPM mailing list can be subscribed to, and its archives read from, here — https://lists.rpm.org/mailman/listinfo/rpm-list "
-msgstr ""
-
-#. Tag: title
-#, no-c-format
-msgid "Related Books"
-msgstr ""
-
-#. Tag: term
-#, no-c-format
-msgid "Maximum RPM — "
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "The Maximum RPM book, which you can read online or download in HTML or PDF, covers everything from general RPM usage to building your own RPMs to programming with rpmlib."
-msgstr ""
-
-#. Tag: term
-#, no-c-format
-msgid "Red Hat RPM Guide — "
-msgstr ""
-
-#. Tag: para
-#, no-c-format
-msgid "The Red Hat RPM Guide by Eric Foster-Johnson is an excellent resource on all details of the RPM package format and the RPM package management utility."
-msgstr ""
-
diff --git a/client/zanata-client-ant-po/src/test/resources/test-input/publican.cfg b/client/zanata-client-ant-po/src/test/resources/test-input/publican.cfg
deleted file mode 100644
index fb73604fab..0000000000
--- a/client/zanata-client-ant-po/src/test/resources/test-input/publican.cfg
+++ /dev/null
@@ -1,9 +0,0 @@
-# Config::Simple 4.59
-# Wed Aug 19 01:03:18 2009
-
-debug: 1
-xml_lang: en-US
-#brand: fedora
-brand: common
-ignored_translations: as-IN kn-IN or-IN si-LK te-IN
-
diff --git a/client/zanata-client-ant-properties/README-TESTING.txt b/client/zanata-client-ant-properties/README-TESTING.txt
deleted file mode 100644
index 28d65768fe..0000000000
--- a/client/zanata-client-ant-properties/README-TESTING.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-Ant's classloader setup can be confusing, because the classloader which knows
-how to load a task's classpath/classpathref is not set as the Thread Context
-ClassLoader (TCL). If the task uses other libraries which try to use the
-TCL, they can't find the resources they want, and much pain ensues...
-
-Naturally, none of this is evident when using Ant's BuildFileTest, only when
-using Ant from the command-line. Hence the need for a command-line-based test
-of the Ant tasks.
-
-To run the round-trip Ant tests, just go into the zanata-ant-demo directory, and run:
- ant
-
-To do this via Maven:
- mvn -Drunant install [-DskipTests=true]
-
-This test converts and sends the properties files in zanata-ant-demo/test1 to
-the server via the REST api, retrieves them again, and then compares the
-resulting properties files with the originals, failing if they don't match.
diff --git a/client/zanata-client-ant-properties/pom.xml b/client/zanata-client-ant-properties/pom.xml
deleted file mode 100644
index a993e1156a..0000000000
--- a/client/zanata-client-ant-properties/pom.xml
+++ /dev/null
@@ -1,145 +0,0 @@
-
-
- 4.0.0
- zanata-client-ant-properties
- Zanata/REST Ant task for Java Properties
-
- org.zanata
- zanata-parent
- 1.5-SNAPSHOT
- ../../zanata-parent/pom.xml
-
-
-
-
- scm:git:git://github.com/zanata/zanata.git
- scm:git:git@github.com:zanata/zanata.git
- https://github.com/zanata/zanata
-
-
-
-
- junit
- junit
- 3.8.1
- test
-
-
- org.apache.ant
- ant
- 1.7.1
- compile
-
-
-
- org.apache.ant
- ant-launcher
- 1.7.1
- test
-
-
- org.apache.ant
- ant-testutil
- 1.7.1
- test
-
-
- org.zanata
- zanata-adapter-properties
- ${project.version}
-
-
- org.zanata
- zanata-client-commands
- ${project.version}
-
-
- org.zanata
- zanata-rest-client
- ${project.version}
-
-
-
- org.fedorahosted.tennera
- ant-gettext
- 0.6
- test
-
-
-
- org.fedorahosted.tennera
- jgettext
- 0.6
- test
-
-
- org.slf4j
- slf4j-log4j12
- test
-
-
-
-
-
- runant
-
-
- runant
-
-
-
-
-
- org.codehaus.mojo
- exec-maven-plugin
- 1.1.1
-
- ant
- zanata-ant-demo
-
-
-
- runant
-
- install
-
- exec
-
-
-
-
-
-
-
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-surefire-plugin
- 2.6
-
-
- none:none
-
- **/RemoteTest.java
-
-
-
-
-
-
diff --git a/client/zanata-client-ant-properties/src/main/java/org/zanata/client/ant/properties/BasePropertiesSelector.java b/client/zanata-client-ant-properties/src/main/java/org/zanata/client/ant/properties/BasePropertiesSelector.java
deleted file mode 100644
index ccb397ad9f..0000000000
--- a/client/zanata-client-ant-properties/src/main/java/org/zanata/client/ant/properties/BasePropertiesSelector.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package org.zanata.client.ant.properties;
-
-import java.io.File;
-
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.types.selectors.FileSelector;
-
-class BasePropertiesSelector implements FileSelector
-{
- private String[] locales;
-
- public BasePropertiesSelector(String[] locales)
- {
- this.locales = locales;
- }
-
- @Override
- public boolean isSelected(File basedir, String filename, File file) throws BuildException
- {
- for (String loc : locales)
- {
- if (filename.endsWith("_" + loc + ".properties")) { //$NON-NLS-1$ //$NON-NLS-2$
- // log("skipping translated property file for now: "+filename);
- return false;
- }
- }
- return true;
- }
-}
diff --git a/client/zanata-client-ant-properties/src/main/java/org/zanata/client/ant/properties/BaseTask.java b/client/zanata-client-ant-properties/src/main/java/org/zanata/client/ant/properties/BaseTask.java
deleted file mode 100644
index dc1ec7ba3d..0000000000
--- a/client/zanata-client-ant-properties/src/main/java/org/zanata/client/ant/properties/BaseTask.java
+++ /dev/null
@@ -1,70 +0,0 @@
-package org.zanata.client.ant.properties;
-
-import org.apache.tools.ant.taskdefs.MatchingTask;
-
-public abstract class BaseTask extends MatchingTask
-{
- Progress progress = Progress.NONE;
-
- enum Progress
- {
- NONE
- {
- @Override
- public void update(int currentIndex, int maxIndex)
- {
- }
-
- @Override
- void finished()
- {
- }
- },
- PERCENTAGE
- {
- @Override
- public void update(int currentIndex, int maxIndex)
- {
- int percent = (int) (100.0 * currentIndex / maxIndex);
- if (percent % 5 == 0 && percent != lastPercent)
- {
- System.err.print(percent);
- System.err.println('%');
- lastPercent = percent;
- }
- }
-
- @Override
- void finished()
- {
- System.err.println("100%");
- }
- },
- NUMBER
- {
- @Override
- public void update(int currentIndex, int maxIndex)
- {
- System.err.printf("(%d/%d)\n", currentIndex, maxIndex);
- }
-
- @Override
- void finished()
- {
- System.err.println("(finished) ");
- }
- },
- ;
-
- int lastPercent = -1;
-
- abstract void update(int currentIndex, int maxIndex);
-
- abstract void finished();
- }
-
- public void setProgressType(String type)
- {
- progress = Progress.valueOf(type.toUpperCase());
- }
-}
diff --git a/client/zanata-client-ant-properties/src/main/java/org/zanata/client/ant/properties/Docs2PropsTask.java b/client/zanata-client-ant-properties/src/main/java/org/zanata/client/ant/properties/Docs2PropsTask.java
deleted file mode 100644
index cca0dca01e..0000000000
--- a/client/zanata-client-ant-properties/src/main/java/org/zanata/client/ant/properties/Docs2PropsTask.java
+++ /dev/null
@@ -1,143 +0,0 @@
-package org.zanata.client.ant.properties;
-
-import java.io.File;
-
-import org.apache.tools.ant.BuildException;
-
-public class Docs2PropsTask extends BaseTask
-{
-
- private String user;
- private String apiKey;
- private boolean debug;
- private File dstDir;
- private String src;
- private boolean exportRoot;
-
- @Override
- public void execute() throws BuildException
- {
- // ClassLoader oldLoader = Thread.currentThread().getContextClassLoader();
- // try
- // {
- // // make sure RESTEasy classes will be found:
- // Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
- // Unmarshaller m = null;
- // if (debug)
- // {
- // JAXBContext jc = JAXBContext.newInstance(Documents.class);
- // m = jc.createUnmarshaller();
- // }
- //
- // URL srcURL = Utility.createURL(src, getProject());
- //
- // List docList;
- // if ("file".equals(srcURL.getProtocol()))
- // {
- // Documents docs = (Documents) m.unmarshal(new File(srcURL.getFile()));
- // docList = docs.getDocuments();
- // }
- // else
- // {
- // // use rest api to fetch Documents
- // ZanataProxyFactory factory = new ZanataProxyFactory(user,
- // apiKey, new VersionInfo("SNAPSHOT", "Unknow"));
- // IDocumentsResource documentsResource =
- // factory.getDocuments(srcURL.toURI());
- // ClientResponse response = documentsResource.getDocuments();
- //
- // ClientUtility.checkResult(response, srcURL.toURI());
- // docList = response.getEntity().getDocuments();
- // }
- //
- // for (Document doc : docList)
- // {
- // PropWriter.write(doc, dstDir, exportRoot);
- // }
- // }
- // catch (Exception e)
- // {
- // throw new BuildException(e);
- // }
- // finally
- // {
- // Thread.currentThread().setContextClassLoader(oldLoader);
- // }
- }
-
- @Override
- public void log(String msg)
- {
- super.log(msg + "\n\n");
- }
-
- // private void logVerbose(String msg) {
- // super.log(msg, org.apache.tools.ant.Project.MSG_VERBOSE);
- // }
-
- public void setApiKey(String apiKey)
- {
- this.apiKey = apiKey;
- }
-
- public void setDebug(boolean debug)
- {
- this.debug = debug;
- }
-
- public void setDstDir(File dstDir)
- {
- this.dstDir = dstDir;
- }
-
- public void setSrc(String src)
- {
- this.src = src;
- }
-
- public void setUser(String user)
- {
- this.user = user;
- }
-
- public void setExportRootLocale(boolean exportRoot)
- {
- this.exportRoot = exportRoot;
- }
-
- public boolean isExportRoot()
- {
- return exportRoot;
- }
-
- public void setExportRoot(boolean exportRoot)
- {
- this.exportRoot = exportRoot;
- }
-
- public String getUser()
- {
- return user;
- }
-
- public String getApiKey()
- {
- return apiKey;
- }
-
- public boolean isDebug()
- {
- return debug;
- }
-
- public File getDstDir()
- {
- return dstDir;
- }
-
- public String getSrc()
- {
- return src;
- }
-
-}
diff --git a/client/zanata-client-ant-properties/src/main/java/org/zanata/client/ant/properties/Props2DocsTask.java b/client/zanata-client-ant-properties/src/main/java/org/zanata/client/ant/properties/Props2DocsTask.java
deleted file mode 100644
index 87dbdd713a..0000000000
--- a/client/zanata-client-ant-properties/src/main/java/org/zanata/client/ant/properties/Props2DocsTask.java
+++ /dev/null
@@ -1,227 +0,0 @@
-package org.zanata.client.ant.properties;
-
-import java.io.File;
-import java.io.StringWriter;
-import java.net.URL;
-import java.util.List;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.Marshaller;
-
-
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.DirectoryScanner;
-import org.apache.tools.ant.types.selectors.FileSelector;
-import org.jboss.resteasy.client.ClientResponse;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.zanata.adapter.properties.PropReader;
-import org.zanata.common.ContentState;
-import org.zanata.common.ContentType;
-import org.zanata.common.LocaleId;
-import org.zanata.rest.client.ClientUtility;
-import org.zanata.rest.client.ZanataProxyFactory;
-import org.zanata.rest.dto.VersionInfo;
-
-public class Props2DocsTask extends BaseTask
-{
- private static final Logger log = LoggerFactory.getLogger(Props2DocsTask.class);
-
- private String user;
- private String apiKey;
-
- public String[] getLocales()
- {
- return locales;
- }
-
- public void setLocales(String[] locales)
- {
- this.locales = locales;
- }
-
- public ContentState getContentState()
- {
- return contentState;
- }
-
- public void setContentState(ContentState contentState)
- {
- this.contentState = contentState;
- }
-
- public String getUser()
- {
- return user;
- }
-
- public String getApiKey()
- {
- return apiKey;
- }
-
- public boolean isDebug()
- {
- return debug;
- }
-
- public String getDst()
- {
- return dst;
- }
-
- public String getSourceLang()
- {
- return sourceLang;
- }
-
- public File getSrcDir()
- {
- return srcDir;
- }
-
- private boolean debug;
- private String dst;
- private String[] locales;
- private String sourceLang;
- private File srcDir;
- private ContentState contentState = ContentState.Approved;
-
- @Override
- public void execute() throws BuildException
- {
- ClassLoader oldLoader = Thread.currentThread().getContextClassLoader();
- try
- {
- // make sure RESTEasy classes will be found:
- Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
- DirectoryScanner ds = getDirectoryScanner(srcDir);
- // use default includes if unset:
- if (!getImplicitFileSet().hasPatterns())
- {
- ds.setIncludes(new String[] { "**/*.properties" }); //$NON-NLS-1$
- }
- ds.setSelectors(getSelectors());
- ds.scan();
- String[] files = ds.getIncludedFiles();
-
- Marshaller m = null;
- // JAXBContext jc = JAXBContext.newInstance(Documents.class);
- // m = jc.createMarshaller();
- if (debug)
- {
- m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
- }
-
- // Documents docs = new Documents();
- // List docList = docs.getDocuments();
- PropReader propReader = new PropReader();
- // for each of the base props files under srcdir:
- int i = 0;
- for (String filename : files)
- {
- progress.update(i++, files.length);
- // Document doc = new Document(filename, ContentType.TextPlain);
- // doc.setLang(LocaleId.fromJavaName(sourceLang));
- File f = new File(srcDir, filename);
- // propReader.extractAll(doc, f, locales, contentState);
- // docList.add(doc);
- }
- progress.finished();
- if (debug)
- {
- StringWriter writer = new StringWriter();
- // m.marshal(docs, writer);
- log.debug("{}", writer);
- }
-
- if (dst == null)
- return;
-
- URL dstURL = Utility.createURL(dst, getProject());
- if ("file".equals(dstURL.getProtocol()))
- {
- // m.marshal(docs, new File(dstURL.getFile()));
- }
- else
- {
- // send project to rest api
- ZanataProxyFactory factory = new ZanataProxyFactory(user, apiKey, new VersionInfo("SNAPSHOT", "Unknow"));
- // IDocumentsResource documentsResource =
- // factory.getDocuments(dstURL.toURI());
- // ClientResponse response = documentsResource.put(docs);
- // ClientUtility.checkResult(response, dstURL.toURI());
- }
-
- }
- catch (Exception e)
- {
- throw new BuildException(e);
- }
- finally
- {
- Thread.currentThread().setContextClassLoader(oldLoader);
- }
- }
-
- FileSelector[] getSelectors()
- {
- if (locales != null)
- return new FileSelector[] { new BasePropertiesSelector(locales) };
- else
- return new FileSelector[0];
- }
-
- @Override
- public void log(String msg)
- {
- super.log(msg + "\n\n");
- }
-
- private void logVerbose(String msg)
- {
- super.log(msg, org.apache.tools.ant.Project.MSG_VERBOSE);
- }
-
- public void setApiKey(String apiKey)
- {
- this.apiKey = apiKey;
- }
-
- public void setContentState(String contentState)
- {
- this.contentState = ContentState.valueOf(contentState);
- }
-
- public void setDebug(boolean debug)
- {
- this.debug = debug;
- }
-
- public void setDst(String dst)
- {
- this.dst = dst;
- }
-
- public void setLocales(String locales)
- {
- this.locales = locales.split(","); //$NON-NLS-1$
- }
-
- public void setSourceLang(String sourceLang)
- {
- this.sourceLang = sourceLang;
- }
-
- public void setSrcDir(File srcDir)
- {
- this.srcDir = srcDir;
- logVerbose("srcDir=" + srcDir);
- }
-
- public void setUser(String user)
- {
- this.user = user;
- }
-
-}
diff --git a/client/zanata-client-ant-properties/src/main/java/org/zanata/client/ant/properties/Utility.java b/client/zanata-client-ant-properties/src/main/java/org/zanata/client/ant/properties/Utility.java
deleted file mode 100644
index f9575425fb..0000000000
--- a/client/zanata-client-ant-properties/src/main/java/org/zanata/client/ant/properties/Utility.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package org.zanata.client.ant.properties;
-
-import java.io.File;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.Arrays;
-
-import org.apache.tools.ant.Project;
-
-class Utility
-{
-
- /**
- * Converts a string to a URL. If it doesn't form a valid URL as is, it will
- * be treated as a file and converted to a file: URL. Relative file paths
- * will be interpreted, relative to the Ant project basedir, and converted to
- * absolute form.
- *
- * @param src a URL or a file path
- * @param project Ant Project for relative file paths
- * @return URL-equivalent of src
- * @throws MalformedURLException
- */
- public static URL createURL(String src, Project project) throws MalformedURLException
- {
- URL srcURL;
- try
- {
- srcURL = new URL(src);
- }
- catch (MalformedURLException e)
- {
- File srcFile = new File(src);
- if (!srcFile.isAbsolute())
- srcFile = new File(project.getBaseDir(), src);
- srcURL = srcFile.toURI().toURL();
- }
- return srcURL;
- }
-
- public static String toString(ClassLoader loader)
- {
- if (loader instanceof URLClassLoader)
- {
- URLClassLoader ul = (URLClassLoader) loader;
- return "URLClassLoader" + Arrays.asList(ul.getURLs()).toString();
- }
- return String.valueOf(loader);
- }
-
-}
diff --git a/client/zanata-client-ant-properties/src/main/resources/org/zanata/client/ant/properties/antlib.xml b/client/zanata-client-ant-properties/src/main/resources/org/zanata/client/ant/properties/antlib.xml
deleted file mode 100644
index 36303cb9d0..0000000000
--- a/client/zanata-client-ant-properties/src/main/resources/org/zanata/client/ant/properties/antlib.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
diff --git a/client/zanata-client-ant-properties/src/test/java/org/zanata/client/ant/properties/AbstractBuildTest.java b/client/zanata-client-ant-properties/src/test/java/org/zanata/client/ant/properties/AbstractBuildTest.java
deleted file mode 100644
index 0e0da18391..0000000000
--- a/client/zanata-client-ant-properties/src/test/java/org/zanata/client/ant/properties/AbstractBuildTest.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package org.zanata.client.ant.properties;
-
-import org.apache.tools.ant.BuildFileTest;
-
-public abstract class AbstractBuildTest extends BuildFileTest
-{
-
- public AbstractBuildTest(String name)
- {
- super(name);
- }
-
- @Override
- protected void runTest() throws Throwable
- {
- try
- {
- System.out.println("Executing build target '" + getName() + "'");
- executeTarget(getName());
- }
- finally
- {
- System.out.print(getLog());
- System.out.print(getOutput());
- System.err.print(getError());
- }
- }
-
- @Override
- protected void setUp() throws Exception
- {
- // work around maven bug: http://jira.codehaus.org/browse/SUREFIRE-184
- System.getProperties().remove("basedir");
- configureProject(getBuildFile());
- }
-
- abstract protected String getBuildFile();
-
-}
diff --git a/client/zanata-client-ant-properties/src/test/java/org/zanata/client/ant/properties/LocalTest.java b/client/zanata-client-ant-properties/src/test/java/org/zanata/client/ant/properties/LocalTest.java
deleted file mode 100644
index 88f6277f0d..0000000000
--- a/client/zanata-client-ant-properties/src/test/java/org/zanata/client/ant/properties/LocalTest.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package org.zanata.client.ant.properties;
-
-import org.zanata.client.ant.properties.Docs2PropsTask;
-import org.zanata.client.ant.properties.Props2DocsTask;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-@SuppressWarnings("nls")
-public class LocalTest extends AbstractBuildTest
-{
- /**
- * This helps Infinitest, since it doesn't know about the taskdefs inside
- * build.xml
- */
- @SuppressWarnings("unchecked")
- static Class[] testedClasses = { Props2DocsTask.class, Docs2PropsTask.class };
-
- public LocalTest(String name)
- {
- super(name);
- }
-
- @Override
- protected String getBuildFile()
- {
- return "src/test/resources/org/zanata/client/ant/properties/build.xml";
- }
-
- public static Test suite()
- {
- TestSuite suite = new TestSuite(LocalTest.class.getName());
- // FIXME
- // suite.addTest(new LocalTest("props2docs"));
- // suite.addTest(new LocalTest("docs2props"));
- // suite.addTest(new LocalTest("roundtriplocal"));
- return suite;
- }
-
- // @Override
- // protected void tearDown() throws Exception {
- // String outDir = getProject().getProperty("out.dir");
- // if (outDir != null) {
- // TestUtil.delete(new File(outDir));
- // }
- // super.tearDown();
- // }
-
-}
diff --git a/client/zanata-client-ant-properties/src/test/java/org/zanata/client/ant/properties/RemoteTest.java b/client/zanata-client-ant-properties/src/test/java/org/zanata/client/ant/properties/RemoteTest.java
deleted file mode 100644
index 083e9c45a6..0000000000
--- a/client/zanata-client-ant-properties/src/test/java/org/zanata/client/ant/properties/RemoteTest.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package org.zanata.client.ant.properties;
-
-import org.zanata.client.ant.properties.Docs2PropsTask;
-import org.zanata.client.ant.properties.Props2DocsTask;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-@SuppressWarnings("nls")
-public class RemoteTest extends AbstractBuildTest
-{
- /**
- * This helps Infinitest, since it doesn't know about the taskdefs inside
- * build.xml
- */
- @SuppressWarnings("unchecked")
- static Class[] testedClasses = { Props2DocsTask.class, Docs2PropsTask.class };
-
- public RemoteTest(String name)
- {
- super(name);
- }
-
- @Override
- protected String getBuildFile()
- {
- return "src/test/resources/org/zanata/client/ant/properties/build.xml";
- }
-
- public static Test suite()
- {
- TestSuite suite = new TestSuite(RemoteTest.class.getName());
- suite.addTest(new RemoteTest("roundtripremote"));
- return suite;
- }
-
-}
diff --git a/client/zanata-client-ant-properties/src/test/resources/org/zanata/client/ant/properties/build.xml b/client/zanata-client-ant-properties/src/test/resources/org/zanata/client/ant/properties/build.xml
deleted file mode 100644
index 028f1d6802..0000000000
--- a/client/zanata-client-ant-properties/src/test/resources/org/zanata/client/ant/properties/build.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/client/zanata-client-ant-properties/src/test/resources/org/zanata/client/ant/properties/roundtrip.xml b/client/zanata-client-ant-properties/src/test/resources/org/zanata/client/ant/properties/roundtrip.xml
deleted file mode 100644
index 801f769c1d..0000000000
--- a/client/zanata-client-ant-properties/src/test/resources/org/zanata/client/ant/properties/roundtrip.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/client/zanata-client-ant-properties/src/test/resources/org/zanata/client/ant/properties/taskdefs.xml b/client/zanata-client-ant-properties/src/test/resources/org/zanata/client/ant/properties/taskdefs.xml
deleted file mode 100644
index ce89ee08ce..0000000000
--- a/client/zanata-client-ant-properties/src/test/resources/org/zanata/client/ant/properties/taskdefs.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/client/zanata-client-ant-properties/src/test/resources/org/zanata/client/ant/properties/test1/foo/foo.properties b/client/zanata-client-ant-properties/src/test/resources/org/zanata/client/ant/properties/test1/foo/foo.properties
deleted file mode 100644
index e27eab1c01..0000000000
--- a/client/zanata-client-ant-properties/src/test/resources/org/zanata/client/ant/properties/test1/foo/foo.properties
+++ /dev/null
@@ -1 +0,0 @@
-FOOD=Slime Mould
diff --git a/client/zanata-client-ant-properties/src/test/resources/org/zanata/client/ant/properties/test1/foo/foo_de.properties b/client/zanata-client-ant-properties/src/test/resources/org/zanata/client/ant/properties/test1/foo/foo_de.properties
deleted file mode 100644
index d772c2e765..0000000000
--- a/client/zanata-client-ant-properties/src/test/resources/org/zanata/client/ant/properties/test1/foo/foo_de.properties
+++ /dev/null
@@ -1 +0,0 @@
-FOOD=Sauerkraut
diff --git a/client/zanata-client-ant-properties/src/test/resources/org/zanata/client/ant/properties/test1/test.properties b/client/zanata-client-ant-properties/src/test/resources/org/zanata/client/ant/properties/test1/test.properties
deleted file mode 100644
index 5e2994d917..0000000000
--- a/client/zanata-client-ant-properties/src/test/resources/org/zanata/client/ant/properties/test1/test.properties
+++ /dev/null
@@ -1 +0,0 @@
-HELLO=Hello World
diff --git a/client/zanata-client-ant-properties/src/test/resources/org/zanata/client/ant/properties/test1/test_fr.properties b/client/zanata-client-ant-properties/src/test/resources/org/zanata/client/ant/properties/test1/test_fr.properties
deleted file mode 100644
index 831619bea0..0000000000
--- a/client/zanata-client-ant-properties/src/test/resources/org/zanata/client/ant/properties/test1/test_fr.properties
+++ /dev/null
@@ -1 +0,0 @@
-HELLO=Bonjour le Monde
diff --git a/client/zanata-client-ant-properties/src/test/resources/org/zanata/client/ant/properties/test2/documents.xml b/client/zanata-client-ant-properties/src/test/resources/org/zanata/client/ant/properties/test2/documents.xml
deleted file mode 100644
index 63d4640980..0000000000
--- a/client/zanata-client-ant-properties/src/test/resources/org/zanata/client/ant/properties/test2/documents.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
-
-
- Slime Mould
-
-
- Sauerkraut
-
-
-
-
-
-
-
-
- Hello World
-
-
- Bonjour le Monde
-
-
-
-
-
-
\ No newline at end of file
diff --git a/client/zanata-client-ant-properties/zanata-ant-demo/build.xml b/client/zanata-client-ant-properties/zanata-ant-demo/build.xml
deleted file mode 100644
index 58fed7ae6c..0000000000
--- a/client/zanata-client-ant-properties/zanata-ant-demo/build.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/client/zanata-client-ant-properties/zanata-ant-demo/pom.xml b/client/zanata-client-ant-properties/zanata-ant-demo/pom.xml
deleted file mode 100644
index 8b1bc5c732..0000000000
--- a/client/zanata-client-ant-properties/zanata-ant-demo/pom.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-
- 4.0.0
- null
- null
- 0
-
-
-
- org.zanata
- zanata-client-ant
- 1.0-SNAPSHOT
-
-
- org.jboss.resteasy
- resteasy-atom-provider
-
-
-
-
- org.fedorahosted.tennera
- ant-gettext
- 0.6
-
-
- org.slf4j
- slf4j-log4j12
- 1.6.1
-
-
-
diff --git a/client/zanata-client-ant-properties/zanata-ant-demo/taskdefs.xml b/client/zanata-client-ant-properties/zanata-ant-demo/taskdefs.xml
deleted file mode 100644
index 73588e88cd..0000000000
--- a/client/zanata-client-ant-properties/zanata-ant-demo/taskdefs.xml
+++ /dev/null
@@ -1,79 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/client/zanata-client-ant-properties/zanata-ant-demo/test1/foo/foo.properties b/client/zanata-client-ant-properties/zanata-ant-demo/test1/foo/foo.properties
deleted file mode 100644
index e27eab1c01..0000000000
--- a/client/zanata-client-ant-properties/zanata-ant-demo/test1/foo/foo.properties
+++ /dev/null
@@ -1 +0,0 @@
-FOOD=Slime Mould
diff --git a/client/zanata-client-ant-properties/zanata-ant-demo/test1/foo/foo_de.properties b/client/zanata-client-ant-properties/zanata-ant-demo/test1/foo/foo_de.properties
deleted file mode 100644
index ecba6037b3..0000000000
--- a/client/zanata-client-ant-properties/zanata-ant-demo/test1/foo/foo_de.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-# This should be treated as a translator comment
-FOOD=Sauerkraut
diff --git a/client/zanata-client-ant-properties/zanata-ant-demo/test1/test.properties b/client/zanata-client-ant-properties/zanata-ant-demo/test1/test.properties
deleted file mode 100644
index 5445564340..0000000000
--- a/client/zanata-client-ant-properties/zanata-ant-demo/test1/test.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-# This is a test comment with a leading space.
-# Note that comments without leading spaces will have one added,
-# and footer comments will not be preserved.
-# Also, if the final line does not end with a newline, one will be added.
-HELLO=Hello World
diff --git a/client/zanata-client-ant-properties/zanata-ant-demo/test1/test_fr.properties b/client/zanata-client-ant-properties/zanata-ant-demo/test1/test_fr.properties
deleted file mode 100644
index 831619bea0..0000000000
--- a/client/zanata-client-ant-properties/zanata-ant-demo/test1/test_fr.properties
+++ /dev/null
@@ -1 +0,0 @@
-HELLO=Bonjour le Monde
diff --git a/client/zanata-client-commands/pom.xml b/client/zanata-client-commands/pom.xml
deleted file mode 100644
index 8256033a86..0000000000
--- a/client/zanata-client-commands/pom.xml
+++ /dev/null
@@ -1,109 +0,0 @@
-
-
- 4.0.0
-
- org.zanata
- zanata-parent
- 1.5-SNAPSHOT
- ../../zanata-parent/pom.xml
-
- zanata-client-commands
- Zanata client commands
-
-
-
- scm:git:git://github.com/zanata/zanata.git
- scm:git:git@github.com:zanata/zanata.git
- https://github.com/zanata/zanata
-
-
-
-
- org.zanata
- zanata-adapter-properties
- ${project.version}
-
-
- org.zanata
- zanata-adapter-po
- ${project.version}
-
-
- org.zanata
- zanata-adapter-xliff
- ${project.version}
-
-
- org.zanata
- zanata-rest-client
- ${project.version}
-
-
- org.easymock
- easymock
- test
-
-
-
- org.testng
- testng
- test
-
-
- junit
- junit
- test
-
-
- org.codehaus.plexus
- plexus-utils
- 1.0.4
- test
-
-
- org.easytesting
- fest-assert
- 1.3
- test
-
-
- commons-configuration
- commons-configuration
-
-
- org.slf4j
- slf4j-log4j12
- test
-
-
- log4j
- log4j
- compile
-
-
- args4j
- args4j
-
-
- commons-io
- commons-io
- 2.0.1
-
-
- org.fedorahosted.openprops
- openprops
-
-
-
- org.apache.ant
- ant
- 1.8.2
-
-
-
- net.sf.opencsv
- opencsv
- 2.1
-
-
-
diff --git a/client/zanata-client-commands/src/main/java/org/zanata/client/VersionUtility.java b/client/zanata-client-commands/src/main/java/org/zanata/client/VersionUtility.java
deleted file mode 100644
index 548763fa16..0000000000
--- a/client/zanata-client-commands/src/main/java/org/zanata/client/VersionUtility.java
+++ /dev/null
@@ -1,102 +0,0 @@
-package org.zanata.client;
-
-import java.io.IOException;
-import java.io.PrintStream;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.jar.Attributes;
-import java.util.jar.Manifest;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.zanata.common.LocaleId;
-import org.zanata.rest.dto.VersionInfo;
-
-/**
- * @see org.zanata.util.VersionUtility
- */
-// FIXME merge zanata.client.VersionUtility and zanata.util.VersionUtility into zanata.common.util.VersionUtility (must prevent GWT compilation)
-public class VersionUtility
-{
- private static final Logger log = LoggerFactory.getLogger(VersionUtility.class);
- private static VersionInfo apiVersion;
-
- public static VersionInfo getAPIVersionInfo()
- {
- if (apiVersion == null)
- {
- // LocaleId jar version (zanata-common-api) is used as an "API version"
- apiVersion = getVersionInfo(LocaleId.class);
- }
- return new VersionInfo(apiVersion);
- }
-
- public static VersionInfo getVersionInfo(Class> clazz)
- {
- Attributes atts = null;
- String version = null;
- String buildTimestamp = null;
- {
- try
- {
- atts = getJarAttributesForClass(clazz);
- }
- catch (IOException e)
- {
- log.debug(e.getMessage(), e);
- }
- }
- if (atts != null)
- {
- version = atts.getValue("Implementation-Version");
- buildTimestamp = atts.getValue("Implementation-Build");
- }
-
- // if we can't get version from the jar, try for the package version
- if (version == null)
- {
- Package pkg = clazz.getPackage();
- if (pkg != null)
- version = pkg.getImplementationVersion();
- }
- if (version == null)
- version = "unknown";
- if (buildTimestamp == null)
- buildTimestamp = "unknown";
- VersionInfo result = new VersionInfo(version, buildTimestamp);
- return result;
- }
-
- private static Attributes getJarAttributesForClass(Class> clazz) throws MalformedURLException, IOException
- {
- // thanks to http://stackoverflow.com/questions/1272648/need-to-read-own-jars-manifest-and-not-root-classloaders-manifest/1273432#1273432
- String className = clazz.getSimpleName() + ".class";
- String classPath = clazz.getResource(className).toString();
- if (classPath.startsWith("vfszip:"))
- {
- String manifestPath = classPath.substring(0, classPath.lastIndexOf(".jar/") + ".jar/".length()) + "META-INF/MANIFEST.MF";
- Manifest manifest = new Manifest(new URL(manifestPath).openStream());
- Attributes attr = manifest.getMainAttributes();
- return attr;
- }
- else if (classPath.startsWith("jar:"))
- {
- String manifestPath = classPath.substring(0, classPath.lastIndexOf("!") + "!".length()) + "/META-INF/MANIFEST.MF";
- Manifest manifest = new Manifest(new URL(manifestPath).openStream());
- Attributes attr = manifest.getMainAttributes();
- return attr;
- }
- return null;
- }
-
- public static void printVersions(Class> clientClass, PrintStream out)
- {
- VersionInfo clientVer = getVersionInfo(clientClass);
- out.println("Client version: " + clientVer.getVersionNo());
- out.println("Client timestamp: " + clientVer.getBuildTimeStamp());
- VersionInfo apiVer = getAPIVersionInfo();
- out.println("API version: " + apiVer.getVersionNo());
- out.println("API timestamp: " + apiVer.getBuildTimeStamp());
- }
-
-}
diff --git a/client/zanata-client-commands/src/main/java/org/zanata/client/ZanataClient.java b/client/zanata-client-commands/src/main/java/org/zanata/client/ZanataClient.java
deleted file mode 100644
index 6f9c78f54c..0000000000
--- a/client/zanata-client-commands/src/main/java/org/zanata/client/ZanataClient.java
+++ /dev/null
@@ -1,179 +0,0 @@
-package org.zanata.client;
-
-import java.io.PrintStream;
-import java.util.ArrayList;
-import java.util.LinkedHashMap;
-import java.util.List;
-
-import org.kohsuke.args4j.Argument;
-import org.kohsuke.args4j.CmdLineException;
-import org.kohsuke.args4j.CmdLineParser;
-import org.kohsuke.args4j.Option;
-import org.zanata.client.commands.AppAbortStrategy;
-import org.zanata.client.commands.ArgsUtil;
-import org.zanata.client.commands.BasicOptions;
-import org.zanata.client.commands.BasicOptionsImpl;
-import org.zanata.client.commands.ListRemoteOptionsImpl;
-import org.zanata.client.commands.PublicanPullOptionsImpl;
-import org.zanata.client.commands.PublicanPushOptionsImpl;
-import org.zanata.client.commands.PutProjectOptionsImpl;
-import org.zanata.client.commands.PutUserOptionsImpl;
-import org.zanata.client.commands.PutVersionOptionsImpl;
-import org.zanata.client.commands.SystemExitStrategy;
-import org.zanata.client.commands.ZanataCommand;
-
-@SuppressWarnings("deprecation")
-public class ZanataClient extends BasicOptionsImpl
-{
- private String command;
- private boolean version;
-
- @Argument(index = 1, multiValued = true)
- private final List arguments = new ArrayList();
- private final CmdLineParser parser = new CmdLineParser(this);
- private final LinkedHashMap optionsMap = new LinkedHashMap();
- private final AppAbortStrategy abortStrategy;
- private final PrintStream out;
- private final PrintStream err;
-
- public static void main(String[] args)
- {
- ZanataClient tool = new ZanataClient();
- tool.processArgs(args);
- }
-
- @Override
- public ZanataCommand initCommand()
- {
- return null;
- }
-
- /**
- * Only for testing (allows access to optionsMap)
- */
- public ZanataClient()
- {
- this(new SystemExitStrategy(), System.out, System.err);
- }
-
- public ZanataClient(AppAbortStrategy strategy, PrintStream out, PrintStream err)
- {
- this.abortStrategy = strategy;
- this.out = out;
- this.err = err;
- // getOptionsMap().put("listlocal", new ListLocalOptionsImpl());
- getOptionsMap().put("listremote", new ListRemoteOptionsImpl());
- getOptionsMap().put("publican-push", new PublicanPushOptionsImpl());
- getOptionsMap().put("publican-pull", new PublicanPullOptionsImpl());
- getOptionsMap().put("putproject", new PutProjectOptionsImpl());
- getOptionsMap().put("putuser", new PutUserOptionsImpl());
- getOptionsMap().put("putversion", new PutVersionOptionsImpl());
- }
-
- public String getCommandName()
- {
- return "zanataj";
- }
-
- public String getCommandDescription()
- {
- return "Zanata Java command-line client";
- }
-
- protected LinkedHashMap getOptionsMap()
- {
- return optionsMap;
- }
-
- protected void processArgs(String... args)
- {
- // workaround for failing test (client used in multiple tests)
- arguments.clear();
- try
- {
- parser.parseArgument(args);
- }
- catch (CmdLineException e)
- {
- if (!getHelp() && args.length != 0)
- {
- err.println(e.getMessage());
- printHelp(err);
- abortStrategy.abort(null);
- }
- }
- if (getHelp() && command == null)
- {
- printHelp(out);
- return;
- }
- if (version)
- {
- out.println(getCommandName());
- VersionUtility.printVersions(ZanataClient.class, out);
- return;
- }
- if ("help".equals(command))
- {
- setHelp(true);
- command = null;
- if (arguments.size() != 0)
- command = arguments.remove(0);
- }
- if (command == null)
- {
- printHelp(out);
- return;
- }
- String[] otherArgs = arguments.toArray(new String[0]);
- try
- {
- BasicOptions options = getOptionsMap().get(command);
- if (options == null)
- {
- err.println("Unknown command '" + command + "'");
- printHelp(err);
- abortStrategy.abort(null);
- }
- else
- {
- new ArgsUtil(abortStrategy, out, err).process(otherArgs, options);
- }
- }
- catch (Exception e)
- {
- ArgsUtil.handleException(e, getErrors(), abortStrategy);
- }
- }
-
- private void printHelp(PrintStream out)
- {
- out.println("Usage: " + getCommandName() + " [OPTION]... [COMMANDOPTION]...");
- out.println(getCommandDescription());
- out.println();
- parser.printUsage(out);
- out.println();
- out.println("Type '" + getCommandName() + " help ' for help on a specific command.");
- out.println();
- out.println("Available commands:");
- for (String cmd : getOptionsMap().keySet())
- {
- out.println(" " + cmd);
- }
- }
-
- @Option(name = "--version", aliases = { "-v" }, usage = "Output version information and exit")
- public void setVersion(boolean version)
- {
- this.version = version;
- }
-
- @Argument(index = 0, usage = "Command name", metaVar = "")
- public void setCommand(String command)
- {
- this.command = command;
- // save remaining options for the subcommand's parser
- parser.stopOptionParsing();
- }
-
-}
diff --git a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/AppAbortStrategy.java b/client/zanata-client-commands/src/main/java/org/zanata/client/commands/AppAbortStrategy.java
deleted file mode 100644
index 103c33855b..0000000000
--- a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/AppAbortStrategy.java
+++ /dev/null
@@ -1,6 +0,0 @@
-package org.zanata.client.commands;
-
-public interface AppAbortStrategy
-{
- void abort(Throwable e);
-}
\ No newline at end of file
diff --git a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/ArgsUtil.java b/client/zanata-client-commands/src/main/java/org/zanata/client/commands/ArgsUtil.java
deleted file mode 100644
index ce502d6481..0000000000
--- a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/ArgsUtil.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/**
- *
- */
-package org.zanata.client.commands;
-
-import java.io.PrintStream;
-
-import org.kohsuke.args4j.CmdLineException;
-import org.kohsuke.args4j.CmdLineParser;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @author Sean Flanigan
- *
- */
-public class ArgsUtil
-{
- private static final Logger log = LoggerFactory.getLogger(ArgsUtil.class);
- private final AppAbortStrategy abortStrategy;
- private final PrintStream out;
- private final PrintStream err;
-
- public ArgsUtil(AppAbortStrategy strategy, PrintStream out, PrintStream err)
- {
- this.abortStrategy = strategy;
- this.out = out;
- this.err = err;
- }
-
- public static void processArgs(String[] args, BasicOptions opts)
- {
- new ArgsUtil(new SystemExitStrategy(), System.out, System.err).process(args, opts);
- }
-
- public void process(String[] args, BasicOptions opts)
- {
- log.debug("process(args: {}, opts: {})", args, opts);
- CmdLineParser parser = new CmdLineParser(opts);
-
- try
- {
- parser.setUsageWidth(Integer.parseInt(System.getenv("COLUMNS")));
- }
- catch (Exception e)
- {
- parser.setUsageWidth(120);
- }
- try
- {
- parser.parseArgument(args);
- }
- catch (CmdLineException e)
- {
- if (!opts.getHelp() && args.length != 0)
- {
- err.println(e.getMessage());
- printHelp(opts, err);
- parser.printUsage(err);
- abortStrategy.abort(e);
- }
- }
-
- if (opts.getHelp() || args.length == 0)
- {
- printHelp(opts, out);
- parser.printUsage(out);
- return;
- }
- // while loading config, we use the global logging options
- setLogLevels(opts);
-
- try
- {
- if (opts instanceof ConfigurableOptions)
- OptionsUtil.applyConfigFiles((ConfigurableOptions) opts);
- ZanataCommand cmd = opts.initCommand();
- // just in case the logging options were changed by a config file:
- setLogLevels(opts);
- if (opts.getErrors())
- {
- log.info("Error stacktraces are turned on.");
- }
- cmd.run();
- }
- catch (Exception e)
- {
- handleException(e, opts.getErrors(), abortStrategy);
- }
- }
-
- private static void setLogLevels(BasicOptions opts)
- {
- if (opts.getDebug())
- {
- enableDebugLogging();
- }
- else if (opts.getQuiet())
- {
- enableQuietLogging();
- }
- }
-
- /**
- * Maven's --debug/-X flag sets the Maven LoggerManager to LEVEL_DEBUG. The
- * slf4j framework doesn't provide any way of doing this, so we have to go to
- * the underlying framework (assumed to be log4j).
- */
- private static void enableDebugLogging()
- {
- org.apache.log4j.Logger root = org.apache.log4j.Logger.getRootLogger();
- root.setLevel(org.apache.log4j.Level.DEBUG);
- }
-
- /**
- * Maven's --quiet/-q flag sets the Maven LoggerManager to LEVEL_ERROR. The
- * slf4j framework doesn't provide any way of doing this, so we have to go to
- * the underlying framework (assumed to be log4j).
- */
- private static void enableQuietLogging()
- {
- org.apache.log4j.Logger root = org.apache.log4j.Logger.getRootLogger();
- root.setLevel(org.apache.log4j.Level.ERROR);
- }
-
- private static void printHelp(BasicOptions cmd, PrintStream output)
- {
- output.println("Usage: " + cmd.getCommandName() + " [options]");
- output.println(cmd.getCommandDescription());
- output.println();
- }
-
- public static void handleException(Exception e, boolean outputErrors, AppAbortStrategy abortStrategy)
- {
- if (outputErrors)
- {
- log.error("Execution failed: ", e);
- }
- else
- {
- log.error("Execution failed: " + e.getMessage());
- log.error("Use -e/--errors for full stack trace (or when reporting bugs)");
- }
- abortStrategy.abort(e);
- }
-
-}
diff --git a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/BasicOptions.java b/client/zanata-client-commands/src/main/java/org/zanata/client/commands/BasicOptions.java
deleted file mode 100644
index edfcc3b4ca..0000000000
--- a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/BasicOptions.java
+++ /dev/null
@@ -1,64 +0,0 @@
-package org.zanata.client.commands;
-
-public interface BasicOptions
-{
- ZanataCommand initCommand();
-
- /**
- * Whether to enable debug mode. Defaults to the value in zanata.ini. This
- * value is used by command line clients, but not by Maven (which uses its
- * own --debug/-X flag).
- */
- boolean getDebug();
-
- void setDebug(boolean debug);
-
- boolean isDebugSet();
-
- /**
- * Whether to display full information about errors (ie exception stack
- * traces). Defaults to the value in zanata.ini. This value is used by command
- * line clients, but not by Maven (which uses its own --errors/-e flag).
- */
- boolean getErrors();
-
- void setErrors(boolean errors);
-
- boolean isErrorsSet();
-
- /**
- * Whether to display the command's usage help. Maven uses the auto-generated
- * HelpMojo instead.
- */
- boolean getHelp();
-
- void setHelp(boolean help);
-
- /**
- * Enable quiet mode - error messages only
- */
- boolean getQuiet();
- void setQuiet(boolean quiet);
- boolean isQuietSet();
-
- public boolean isInteractiveMode();
-
- public void setInteractiveMode(boolean interactiveMode);
-
- /**
- * Used to generate the command line interface and its usage help. This name
- * should match the Maven Mojo's 'goal' annotation.
- *
- * @return
- */
- public String getCommandName();
-
- /**
- * Used to generate CLI usage help. This description should preferably match
- * the Maven Mojo's Javadoc description.
- *
- * @return
- */
- public String getCommandDescription();
-
-}
diff --git a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/BasicOptionsImpl.java b/client/zanata-client-commands/src/main/java/org/zanata/client/commands/BasicOptionsImpl.java
deleted file mode 100644
index 31b556282a..0000000000
--- a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/BasicOptionsImpl.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * Copyright 2010, Red Hat, Inc. and individual contributors as indicated by the
- * @author tags. See the copyright.txt file in the distribution for a full
- * listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it under the
- * terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This software is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this software; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
- * site: http://www.fsf.org.
- */
-package org.zanata.client.commands;
-
-import org.kohsuke.args4j.Option;
-
-/**
- * Base class for commands
- *
- * @author Sean Flanigan
- *
- */
-public abstract class BasicOptionsImpl implements BasicOptions
-{
-
- private boolean debug = false;
- private boolean debugSet;
- private boolean errors = false;
- private boolean errorsSet;
- private boolean help;
- private boolean quiet = false;
- private boolean quietSet;
- private boolean interactiveMode = true;
-
- public BasicOptionsImpl()
- {
- }
-
- @Override
- public boolean getDebug()
- {
- return debug;
- }
-
- @Override
- @Option(name = "--debug", aliases = { "-X" }, usage = "Enable debug logging")
- public void setDebug(boolean debug)
- {
- debugSet = true;
- this.debug = debug;
- if (debug)
- {
- // debug logging includes error logging
- setErrors(true);
- }
- }
-
- @Override
- public boolean getErrors()
- {
- return errors;
- }
-
- @Override
- @Option(name = "--errors", aliases = { "-e" }, usage = "Output full execution error messages (stacktraces)")
- public void setErrors(boolean errors)
- {
- errorsSet = true;
- this.errors = errors;
- }
-
- @Override
- public boolean getHelp()
- {
- return this.help;
- }
-
- @Override
- @Option(name = "--help", aliases = { "-h", "-help" }, usage = "Display this help and exit")
- public void setHelp(boolean help)
- {
- this.help = help;
- }
-
- @Override
- public boolean getQuiet()
- {
- return quiet;
- }
-
- @Override
- @Option(name = "--quiet", aliases = { "-q" }, usage = "Quiet mode - error messages only")
- public void setQuiet(boolean quiet)
- {
- quietSet = true;
- this.quiet = quiet;
- }
-
- @Override
- public boolean isInteractiveMode()
- {
- return interactiveMode;
- }
-
- @Override
- public void setInteractiveMode(boolean interactiveMode)
- {
- this.interactiveMode = interactiveMode;
- }
-
- @Option(name = "-B")
- public void setBatchMode(boolean batchMode)
- {
- setInteractiveMode(!batchMode);
- }
-
- @Override
- public boolean isDebugSet()
- {
- return debugSet;
- }
-
- @Override
- public boolean isErrorsSet()
- {
- return errorsSet;
- }
-
- @Override
- public boolean isQuietSet()
- {
- return quietSet;
- }
-}
diff --git a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/ConfigurableCommand.java b/client/zanata-client-commands/src/main/java/org/zanata/client/commands/ConfigurableCommand.java
deleted file mode 100644
index ca7a12a7f1..0000000000
--- a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/ConfigurableCommand.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright 2010, Red Hat, Inc. and individual contributors as indicated by the
- * @author tags. See the copyright.txt file in the distribution for a full
- * listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it under the
- * terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This software is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this software; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
- * site: http://www.fsf.org.
- */
-package org.zanata.client.commands;
-
-import org.zanata.rest.client.ZanataProxyFactory;
-
-/**
- * Base class for commands which supports configuration by the user's
- * zanata.ini
- *
- * @author Sean Flanigan
- *
- */
-public abstract class ConfigurableCommand implements ZanataCommand
-{
- private final O opts;
- private ZanataProxyFactory requestFactory;
-
- public ConfigurableCommand(O opts, ZanataProxyFactory factory)
- {
- this.opts = opts;
- if (factory != null)
- this.requestFactory = factory;
- else
- this.requestFactory = OptionsUtil.createRequestFactory(opts);
- }
-
- public ConfigurableCommand(O opts)
- {
- this(opts, null);
- }
-
- public O getOpts()
- {
- return opts;
- }
-
- public ZanataProxyFactory getRequestFactory()
- {
- return requestFactory;
- }
-
-}
diff --git a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/ConfigurableOptions.java b/client/zanata-client-commands/src/main/java/org/zanata/client/commands/ConfigurableOptions.java
deleted file mode 100644
index 5b2a1c4712..0000000000
--- a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/ConfigurableOptions.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package org.zanata.client.commands;
-
-import java.io.File;
-import java.net.URL;
-
-import org.kohsuke.args4j.Option;
-
-/**
- * Base options for commands which supports configuration by the user's
- * zanata.ini
- *
- * @author Sean Flanigan
- *
- */
-public interface ConfigurableOptions extends BasicOptions
-{
-
- /**
- * API key for accessing the REST API. Defaults to the value in
- * zanata.ini.
- */
- public String getKey();
-
- @Option(name = "--key", metaVar = "KEY", usage = "API key (from user's profile page)")
- public void setKey(String key);
-
- /**
- * Base URL for the server. Defaults to the value in zanata.xml.
- */
- public URL getUrl();
-
- @Option(name = "--url", metaVar = "URL", usage = "Base URL, eg http://zanata.example.com/zanata/")
- public void setUrl(URL url);
-
- /**
- * Client configuration file.
- */
- public File getUserConfig();
-
- @Option(name = "--user-config", metaVar = "FILE", usage = "User configuration, eg /home/user/.config/zanata.ini")
- public void setUserConfig(File userConfig);
-
- /**
- * Username for accessing the REST API. Defaults to the value in
- * zanata.ini.
- */
- public String getUsername();
-
- @Option(name = "--username", metaVar = "USER", usage = "Username")
- public void setUsername(String username);
-
-
-}
\ No newline at end of file
diff --git a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/ConfigurableOptionsImpl.java b/client/zanata-client-commands/src/main/java/org/zanata/client/commands/ConfigurableOptionsImpl.java
deleted file mode 100644
index 2fd6222e3a..0000000000
--- a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/ConfigurableOptionsImpl.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Copyright 2010, Red Hat, Inc. and individual contributors as indicated by the
- * @author tags. See the copyright.txt file in the distribution for a full
- * listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it under the
- * terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This software is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this software; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
- * site: http://www.fsf.org.
- */
-package org.zanata.client.commands;
-
-import java.io.File;
-import java.net.URL;
-
-import org.kohsuke.args4j.Option;
-
-/**
- * Base options for commands which support configuration by the user's
- * zanata.ini
- *
- * @author Sean Flanigan
- *
- */
-public abstract class ConfigurableOptionsImpl extends BasicOptionsImpl implements ConfigurableOptions
-{
- /**
- * Client configuration file.
- */
- private File userConfig = new File(System.getProperty("user.home"), ".config/zanata.ini");
-
- /**
- * Base URL for the server. Defaults to the value in zanata.xml.
- */
- private URL url;
-
- /**
- * Username for accessing the REST API. Defaults to the value in
- * zanata.ini.
- */
- private String username;
-
- /**
- * API key for accessing the REST API. Defaults to the value in
- * zanata.ini.
- */
- private String key;
-
- public ConfigurableOptionsImpl()
- {
- }
-
- @Override
- public String getKey()
- {
- return key;
- }
-
- @Override
- @Option(name = "--key", metaVar = "KEY", usage = "API key (from user's profile page)")
- public void setKey(String key)
- {
- this.key = key;
- }
-
- @Override
- public URL getUrl()
- {
- return url;
- }
-
- @Override
- @Option(name = "--url", metaVar = "URL", usage = "Base URL, eg http://zanata.example.com/zanata/")
- public void setUrl(URL url)
- {
- this.url = url;
- }
-
- @Override
- @Option(name = "--user-config", metaVar = "FILE", usage = "User configuration, eg /home/user/.config/zanata.ini")
- public void setUserConfig(File userConfig)
- {
- this.userConfig = userConfig;
- }
-
- @Override
- public String getUsername()
- {
- return username;
- }
-
- @Override
- @Option(name = "--username", metaVar = "USER", usage = "Username")
- public void setUsername(String username)
- {
- this.username = username;
- }
-
- @Override
- public File getUserConfig()
- {
- return userConfig;
- }
-
-}
diff --git a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/ConfigurableProjectCommand.java b/client/zanata-client-commands/src/main/java/org/zanata/client/commands/ConfigurableProjectCommand.java
deleted file mode 100644
index 8e3553715c..0000000000
--- a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/ConfigurableProjectCommand.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright 2010, Red Hat, Inc. and individual contributors as indicated by the
- * @author tags. See the copyright.txt file in the distribution for a full
- * listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it under the
- * terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This software is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this software; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
- * site: http://www.fsf.org.
- */
-package org.zanata.client.commands;
-
-import org.zanata.client.exceptions.ConfigException;
-import org.zanata.rest.client.ZanataProxyFactory;
-
-
-/**
- * Base class for commands which supports configuration by the user's
- * zanata.ini and by a project's zanata.xml
- *
- * @author Sean Flanigan
- *
- */
-public abstract class ConfigurableProjectCommand extends ConfigurableCommand
-{
-
- protected static final String PROJECT_TYPE_PUBLICAN = "podir";
- protected static final String PROJECT_TYPE_PROPERTIES = "properties";
- protected static final String PROJECT_TYPE_XLIFF = "xliff";
- protected static final String PROJECT_TYPE_XML = "xml";
-
- public ConfigurableProjectCommand(O opts, ZanataProxyFactory factory)
- {
- super(opts, factory);
- if (opts.getProj() == null)
- throw new ConfigException("Project must be specified");
- if (opts.getProjectVersion() == null)
- throw new ConfigException("Project version must be specified");
- if (getProjectType() == null)
- throw new ConfigException("Project type must be specified");
- }
-
- public ConfigurableProjectCommand(O opts)
- {
- this(opts, null);
- }
-
- protected String getProjectType()
- {
- return this.getOpts().getProjectType();
- }
-}
diff --git a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/ConfigurableProjectOptions.java b/client/zanata-client-commands/src/main/java/org/zanata/client/commands/ConfigurableProjectOptions.java
deleted file mode 100644
index d581f676e9..0000000000
--- a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/ConfigurableProjectOptions.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package org.zanata.client.commands;
-
-
-import org.kohsuke.args4j.Option;
-import org.zanata.client.config.LocaleList;
-
-/**
- * Base options for commands which support configuration by the user's
- * zanata.ini and by a project's zanata.xml
- *
- * @author Sean Flanigan
- *
- */
-public interface ConfigurableProjectOptions extends ConfigurableOptions
-{
-
- public String getProj();
-
- @Option(name = "--project", metaVar = "PROJ", usage = "Project ID. This value is required unless specified in zanata.xml.")
- public void setProj(String projectSlug);
-
- @Option(name = "--project-config", metaVar = "FILENAME", usage = "Project configuration file, eg zanata.xml", required = false)
- public void setProjectConfig(String projectConfig);
-
- public String getProjectVersion();
-
- @Option(name = "--project-version", metaVar = "VER", usage = "Project version ID This value is required unless specified in zanata.xml.")
- public void setProjectVersion(String versionSlug);
-
- public String getProjectType();
-
- @Option(name = "--project-type", metaVar = "PROJTYPE", usage = "Project type This value is required unless specified in zanata.xml.")
- public void setProjectType(String projectType);
-
- public String getProjectConfig();
-
- public LocaleList getLocales();
-
- public void setLocales(LocaleList locales);
-
-}
\ No newline at end of file
diff --git a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/ConfigurableProjectOptionsImpl.java b/client/zanata-client-commands/src/main/java/org/zanata/client/commands/ConfigurableProjectOptionsImpl.java
deleted file mode 100644
index 5f69672959..0000000000
--- a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/ConfigurableProjectOptionsImpl.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Copyright 2010, Red Hat, Inc. and individual contributors as indicated by the
- * @author tags. See the copyright.txt file in the distribution for a full
- * listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it under the
- * terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This software is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this software; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
- * site: http://www.fsf.org.
- */
-package org.zanata.client.commands;
-
-
-import org.kohsuke.args4j.Option;
-import org.zanata.client.config.LocaleList;
-
-/**
- * Base options for commands which supports configuration by the user's
- * zanata.ini and by a project's zanata.xml
- *
- * @author Sean Flanigan
- *
- */
-public abstract class ConfigurableProjectOptionsImpl extends ConfigurableOptionsImpl implements ConfigurableProjectOptions
-{
-
- /**
- * Project configuration file for Zanata client.
- */
- // When used as a CLI command, the default path (specified here) is relative
- // to CWD. ConfigurableProjectMojo specifies another default, which is
- // relative to project's basedir.
- private String projectConfig = "zanata.xml";
-
- private String project;
- private String projectVersion;
- private String projectType;
- private LocaleList locales;
-
- @Override
- public String getProj()
- {
- return project;
- }
-
- @Override
- @Option(name = "--project", metaVar = "PROJ", usage = "Project ID. This value is required unless specified in zanata.xml.")
- public void setProj(String projectSlug)
- {
- this.project = projectSlug;
- }
-
- @Override
- @Option(name = "--project-config", metaVar = "FILENAME", usage = "Project configuration file, eg zanata.xml", required = false)
- public void setProjectConfig(String projectConfig)
- {
- this.projectConfig = projectConfig;
- }
-
- @Override
- public String getProjectVersion()
- {
- return projectVersion;
- }
-
- @Override
- @Option(name = "--project-version", metaVar = "VER", usage = "Project version ID This value is required unless specified in zanata.xml.")
- public void setProjectVersion(String versionSlug)
- {
- this.projectVersion = versionSlug;
- }
-
- @Override
- public String getProjectType()
- {
- return projectType;
- }
-
- @Override
- @Option(name = "--project-type", metaVar = "PROJTYPE", usage = "Type of project ('properties' = Java .properties, 'podir' = publican-style gettext directories)")
- public void setProjectType(String projectType)
- {
- this.projectType = projectType;
- }
-
- @Override
- public String getProjectConfig()
- {
- return projectConfig;
- }
-
- @Override
- public LocaleList getLocales()
- {
- return locales;
- }
-
- @Override
- public void setLocales(LocaleList locales)
- {
- this.locales = locales;
- }
-
-}
diff --git a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/ListLocalCommand.java b/client/zanata-client-commands/src/main/java/org/zanata/client/commands/ListLocalCommand.java
deleted file mode 100644
index e269eb1329..0000000000
--- a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/ListLocalCommand.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package org.zanata.client.commands;
-
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.zanata.rest.client.ZanataProxyFactory;
-
-/**
- * @author Sean Flanigan
- *
- */
-// FIXME not implemented yet!
-public class ListLocalCommand extends ConfigurableProjectCommand
-{
- private static final Logger log = LoggerFactory.getLogger(ListLocalCommand.class);
-
- public ListLocalCommand(ConfigurableProjectOptions opts, ZanataProxyFactory factory)
- {
- super(opts, factory);
- }
-
- public ListLocalCommand(ConfigurableProjectOptions opts)
- {
- this(opts, null);
- }
-
- @Override
- public void run()
- {
- // TODO remove this
- log.debug("listlocal");
-
- // TODO needs DocSet support
- }
-
-}
diff --git a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/ListLocalOptionsImpl.java b/client/zanata-client-commands/src/main/java/org/zanata/client/commands/ListLocalOptionsImpl.java
deleted file mode 100644
index 90c6893baf..0000000000
--- a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/ListLocalOptionsImpl.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package org.zanata.client.commands;
-
-public class ListLocalOptionsImpl extends ConfigurableProjectOptionsImpl
-{
-
- @Override
- public ZanataCommand initCommand()
- {
- return new ListLocalCommand(this);
- }
-
- @Override
- public String getCommandName()
- {
- return "listlocal";
- }
-
- @Override
- public String getCommandDescription()
- {
- return "Lists all local files in the project which are considered to be translatable " + "documents. These are the files which will be sent to the server when using the " + "'push' goal.";
- }
-
-}
diff --git a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/ListRemoteCommand.java b/client/zanata-client-commands/src/main/java/org/zanata/client/commands/ListRemoteCommand.java
deleted file mode 100644
index 56da51416b..0000000000
--- a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/ListRemoteCommand.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright 2010, Red Hat, Inc. and individual contributors as indicated by the
- * @author tags. See the copyright.txt file in the distribution for a full
- * listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it under the
- * terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This software is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this software; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
- * site: http://www.fsf.org.
- */
-package org.zanata.client.commands;
-
-import java.util.List;
-
-import org.jboss.resteasy.client.ClientResponse;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.zanata.rest.client.ClientUtility;
-import org.zanata.rest.client.ITranslationResources;
-import org.zanata.rest.dto.resource.ResourceMeta;
-
-/**
- * @author Sean Flanigan
- *
- */
-public class ListRemoteCommand extends ConfigurableProjectCommand
-{
- private static final Logger log = LoggerFactory.getLogger(ListRemoteCommand.class);
-
- public ListRemoteCommand(ConfigurableProjectOptions opts)
- {
- super(opts);
- }
-
- @Override
- public void run() throws Exception
- {
- log.info("Server: " + getOpts().getUrl());
- log.info("Project: " + getOpts().getProj());
- log.info("Version: " + getOpts().getProjectVersion());
- ITranslationResources translationResources = getRequestFactory().getTranslationResources(getOpts().getProj(), getOpts().getProjectVersion());
- ClientResponse> response = translationResources.get(null);
- ClientUtility.checkResult(response, getRequestFactory().getTranslationResourcesURI(getOpts().getProj(), getOpts().getProjectVersion()));
- List list = response.getEntity();
- for (ResourceMeta doc : list)
- {
- System.out.println(doc.getName());
- }
- }
-
-}
diff --git a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/ListRemoteOptionsImpl.java b/client/zanata-client-commands/src/main/java/org/zanata/client/commands/ListRemoteOptionsImpl.java
deleted file mode 100644
index cd84200c34..0000000000
--- a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/ListRemoteOptionsImpl.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package org.zanata.client.commands;
-
-public class ListRemoteOptionsImpl extends ConfigurableProjectOptionsImpl
-{
-
- @Override
- public ZanataCommand initCommand()
- {
- return new ListRemoteCommand(this);
- }
-
- @Override
- public String getCommandName()
- {
- return "listremote";
- }
-
- @Override
- public String getCommandDescription()
- {
- return "Lists all remote documents in the configured server/project/version.";
- }
-
-
-}
diff --git a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/OptionsUtil.java b/client/zanata-client-commands/src/main/java/org/zanata/client/commands/OptionsUtil.java
deleted file mode 100644
index c4f949f6fc..0000000000
--- a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/OptionsUtil.java
+++ /dev/null
@@ -1,174 +0,0 @@
-package org.zanata.client.commands;
-
-import java.io.File;
-import java.net.URISyntaxException;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Unmarshaller;
-
-import org.apache.commons.configuration.ConfigurationException;
-import org.apache.commons.configuration.HierarchicalINIConfiguration;
-import org.apache.commons.configuration.SubnodeConfiguration;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.zanata.client.VersionUtility;
-import org.zanata.client.config.ConfigUtil;
-import org.zanata.client.config.LocaleList;
-import org.zanata.client.config.ZanataConfig;
-import org.zanata.client.exceptions.ConfigException;
-import org.zanata.rest.client.ZanataProxyFactory;
-
-public class OptionsUtil
-{
- private static final Logger log = LoggerFactory.getLogger(OptionsUtil.class);
-
- /**
- * Loads the config files (controlled by the property userConfig) to supply
- * any values which haven't already been set.
- *
- * @throws Exception
- */
- public static void applyConfigFiles(ConfigurableOptions opts) throws ConfigurationException, JAXBException
- {
- if (opts instanceof ConfigurableProjectOptions)
- {
- ConfigurableProjectOptions projOpts = (ConfigurableProjectOptions) opts;
- if (projOpts.getProjectConfig() != null)
- {
- JAXBContext jc = JAXBContext.newInstance(ZanataConfig.class);
- Unmarshaller unmarshaller = jc.createUnmarshaller();
- String projectConfigName = projOpts.getProjectConfig();
- File projectConfigFile = new File(projectConfigName);
- if (!projectConfigFile.isAbsolute())
- {
- String userDir = System.getProperty("user.dir");
- File projectDir = new File(userDir);
- while (projectDir != null && !(projectConfigFile = new File(projectDir, projectConfigName)).exists())
- {
- projectDir = projectDir.getParentFile();
- }
- }
-
- if (projectConfigFile.exists())
- {
- log.info("Loading project config from {}", projectConfigFile);
- ZanataConfig projectConfig = (ZanataConfig) unmarshaller.unmarshal(projectConfigFile);
- // local project config is supposed to override user's zanata.ini,
- // so we apply it first
- applyProjectConfig(projOpts, projectConfig);
- }
- else
- {
- log.warn("Project config file '{}' not found; ignoring.", projectConfigName);
- }
- }
- }
- if (opts.getUserConfig() != null)
- {
- if (opts.getUserConfig().exists())
- {
- log.info("Loading user config from {}", opts.getUserConfig());
- HierarchicalINIConfiguration dataConfig = new HierarchicalINIConfiguration(opts.getUserConfig());
- applyUserConfig(opts, dataConfig);
- }
- else
- {
- System.err.printf("User config file '%s' not found; ignoring.\n", opts.getUserConfig());
- }
- }
- }
-
- /**
- * Applies values from the project configuration unless they have been set
- * directly via parameters.
- *
- * @param config
- */
- private static void applyProjectConfig(ConfigurableProjectOptions opts, ZanataConfig config)
- {
- if (opts.getProj() == null)
- {
- opts.setProj(config.getProject());
- }
- if (opts.getUrl() == null)
- {
- opts.setUrl(config.getUrl());
- }
- if (opts.getProjectVersion() == null)
- {
- opts.setProjectVersion(config.getProjectVersion());
- }
- if (opts.getProjectType() == null)
- {
- opts.setProjectType(config.getProjectType());
- }
- LocaleList locales = config.getLocales();
- opts.setLocales(locales);
- }
-
- /**
- * Applies values from the user's personal configuration unless they have
- * been set directly (by parameters or by project configuration).
- *
- * @param config
- */
- private static void applyUserConfig(ConfigurableOptions opts, HierarchicalINIConfiguration config)
- {
- if (!opts.isDebugSet())
- {
- Boolean debug = config.getBoolean("defaults.debug", null);
- if (debug != null)
- opts.setDebug(debug);
- }
-
- if (!opts.isErrorsSet())
- {
- Boolean errors = config.getBoolean("defaults.errors", null);
- if (errors != null)
- opts.setErrors(errors);
- }
-
- if (!opts.isQuietSet())
- {
- Boolean quiet = config.getBoolean("defaults.quiet", null);
- if (quiet != null)
- opts.setQuiet(quiet);
- }
- if ((opts.getUsername() == null || opts.getKey() == null) && opts.getUrl() != null)
- {
- SubnodeConfiguration servers = config.getSection("servers");
- String prefix = ConfigUtil.findPrefix(servers, opts.getUrl());
- if (prefix != null)
- {
- if (opts.getUsername() == null)
- {
- opts.setUsername(servers.getString(prefix + ".username", null));
- }
- if (opts.getKey() == null)
- {
- opts.setKey(servers.getString(prefix + ".key", null));
- }
- }
- }
- }
-
- public static ZanataProxyFactory createRequestFactory(ConfigurableOptions opts)
- {
- try
- {
- if (opts.getUrl() == null)
- throw new ConfigException("Server URL must be specified");
- if (opts.getUsername() == null)
- throw new ConfigException("Username must be specified");
- if (opts.getKey() == null)
- throw new ConfigException("API key must be specified");
- return new ZanataProxyFactory(opts.getUrl().toURI(), opts.getUsername(), opts.getKey(), VersionUtility.getAPIVersionInfo());
- }
- catch (URISyntaxException e)
- {
- throw new ConfigException(e);
- }
- }
-
-}
diff --git a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/PublicanPullCommand.java b/client/zanata-client-commands/src/main/java/org/zanata/client/commands/PublicanPullCommand.java
deleted file mode 100644
index f3e9b533fa..0000000000
--- a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/PublicanPullCommand.java
+++ /dev/null
@@ -1,125 +0,0 @@
-package org.zanata.client.commands;
-
-import java.net.URI;
-import java.util.List;
-
-import javax.ws.rs.core.Response;
-
-import org.jboss.resteasy.client.ClientResponse;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.zanata.adapter.po.PoWriter2;
-import org.zanata.client.config.LocaleList;
-import org.zanata.client.config.LocaleMapping;
-import org.zanata.client.exceptions.ConfigException;
-import org.zanata.common.LocaleId;
-import org.zanata.rest.RestUtil;
-import org.zanata.rest.StringSet;
-import org.zanata.rest.client.ClientUtility;
-import org.zanata.rest.client.ITranslationResources;
-import org.zanata.rest.client.ZanataProxyFactory;
-import org.zanata.rest.dto.resource.Resource;
-import org.zanata.rest.dto.resource.ResourceMeta;
-import org.zanata.rest.dto.resource.TranslationsResource;
-
-/**
- * @author Sean Flanigan sflaniga@redhat.com
- *
- * @deprecated
- * @see org.zanata.client.commands.pull.PullCommand
- */
-public class PublicanPullCommand extends ConfigurableProjectCommand
-{
- private static final Logger log = LoggerFactory.getLogger(PublicanPullCommand.class);
-
- private final ITranslationResources translationResources;
- private final URI uri;
-
- public PublicanPullCommand(PublicanPullOptions opts, ZanataProxyFactory factory, ITranslationResources translationResources, URI uri)
- {
- super(opts, factory);
- this.translationResources = translationResources;
- this.uri = uri;
- }
-
- private PublicanPullCommand(PublicanPullOptions opts, ZanataProxyFactory factory)
- {
- this(opts, factory, factory.getTranslationResources(opts.getProj(), opts.getProjectVersion()), factory.getTranslationResourcesURI(opts.getProj(), opts.getProjectVersion()));
- }
-
- public PublicanPullCommand(PublicanPullOptions opts)
- {
- this(opts, OptionsUtil.createRequestFactory(opts));
- }
-
- @Override
- protected String getProjectType()
- {
- return PROJECT_TYPE_PUBLICAN;
- }
-
- @Override
- public void run() throws Exception
- {
- log.info("Server: {}", getOpts().getUrl());
- log.info("Project: {}", getOpts().getProj());
- log.info("Version: {}", getOpts().getProjectVersion());
- log.info("Username: {}", getOpts().getUsername());
- if (getOpts().getExportPot())
- {
- log.info("Exporting source and target (translation) documents");
- log.info("POT directory (originals): {}", getOpts().getDstDirPot());
- }
- else
- {
- log.info("Exporting target documents (translations) only");
- }
- log.info("PO base directory (translations): {}", getOpts().getDstDir());
-
- LocaleList locales = getOpts().getLocales();
- if (locales == null)
- throw new ConfigException("no locales specified");
- PoWriter2 poWriter = new PoWriter2();
- StringSet extensions = new StringSet("gettext;comment");
-
- ClientResponse> listResponse = translationResources.get(null);
- ClientUtility.checkResult(listResponse, uri);
- List resourceMetaList = listResponse.getEntity();
- for (ResourceMeta resourceMeta : resourceMetaList)
- {
- String docName = resourceMeta.getName();
- // TODO follow a Link
- String docUri = RestUtil.convertToDocumentURIId(docName);
- ClientResponse resourceResponse = translationResources.getResource(docUri, extensions);
- ClientUtility.checkResult(resourceResponse, uri);
- Resource doc = resourceResponse.getEntity();
- if (getOpts().getExportPot())
- {
- log.info("writing POT for document {}", docName);
- poWriter.writePotToDir(getOpts().getDstDirPot(), doc);
- }
-
- for (LocaleMapping locMapping : locales)
- {
- LocaleId locale = new LocaleId(locMapping.getLocale());
-
- ClientResponse transResponse = translationResources.getTranslations(docUri, locale, extensions);
- // ignore 404 (no translation yet for specified document)
- if (transResponse.getResponseStatus() == Response.Status.NOT_FOUND)
- {
- log.info("no translations found in locale {} for document {}", locale, docName);
- continue;
- }
- ClientUtility.checkResult(transResponse, uri);
- TranslationsResource targetDoc = transResponse.getEntity();
-
- String localeDir = locMapping.getLocalLocale();
- log.info("writing PO translations in locale {} for document {}", locale, docName);
- poWriter.writePo(getOpts().getDstDir(), doc, localeDir, targetDoc);
- }
- }
-
- }
-
-}
diff --git a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/PublicanPullOptions.java b/client/zanata-client-commands/src/main/java/org/zanata/client/commands/PublicanPullOptions.java
deleted file mode 100644
index b9579e34a5..0000000000
--- a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/PublicanPullOptions.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package org.zanata.client.commands;
-
-import java.io.File;
-
-import org.kohsuke.args4j.Option;
-
-/**
- * @author Sean Flanigan sflaniga@redhat.com
- *
- * @deprecated
- * @see org.zanata.client.commands.pull.PullOptions
- */
-public interface PublicanPullOptions extends ConfigurableProjectOptions
-{
-
- @Option(aliases = { "-d" }, name = "--dst", metaVar = "DIR", required = true, usage = "Base directory for publican files (with subdirectory \"pot\" and locale directories)")
- public void setDstDir(File dstDir);
-
- public void setDstDirPot(File dstDirPot);
-
- public File getDstDir();
-
- public File getDstDirPot();
-
- boolean getExportPot();
-
- void setExportPot(boolean exportPot);
-
-}
\ No newline at end of file
diff --git a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/PublicanPullOptionsImpl.java b/client/zanata-client-commands/src/main/java/org/zanata/client/commands/PublicanPullOptionsImpl.java
deleted file mode 100644
index 758d8ad71d..0000000000
--- a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/PublicanPullOptionsImpl.java
+++ /dev/null
@@ -1,78 +0,0 @@
-package org.zanata.client.commands;
-
-import java.io.File;
-
-import org.kohsuke.args4j.Option;
-
-/**
- * @author Sean Flanigan sflaniga@redhat.com
- *
- * @deprecated
- * @see org.zanata.client.commands.pull.PullOptions
- */
-public class PublicanPullOptionsImpl extends ConfigurableProjectOptionsImpl implements PublicanPullOptions
-{
- private File dstDir;
- private File dstDirPot;
- private boolean exportPot;
-
- @Override
- public ZanataCommand initCommand()
- {
- return new PublicanPullCommand(this);
- }
-
- @Override
- public String getCommandName()
- {
- return "publican-pull";
- }
-
- @Override
- public String getCommandDescription()
- {
- return "Pulls translated text from Zanata.";
- }
-
- @Option(aliases = { "-d" }, name = "--dst", metaVar = "DIR", required = true, usage = "Base directory for publican files (with subdirectory \"pot\" and locale directories)")
- @Override
- public void setDstDir(File dstDir)
- {
- this.dstDir = dstDir;
- if (dstDirPot == null)
- dstDirPot = new File(dstDir, "pot");
- }
-
- @Override
- public File getDstDir()
- {
- return dstDir;
- }
-
- @Override
- public void setDstDirPot(File dstDirPot)
- {
- this.dstDirPot = dstDirPot;
- }
-
- @Override
- public File getDstDirPot()
- {
- return dstDirPot;
- }
-
- @Override
- public boolean getExportPot()
- {
- return exportPot;
- }
-
- @Override
- @Option(name = "--export-pot", usage = "Export source text from Zanata to local POT files")
- public void setExportPot(boolean exportPot)
- {
- this.exportPot = exportPot;
- }
-
-}
diff --git a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/PublicanPushCommand.java b/client/zanata-client-commands/src/main/java/org/zanata/client/commands/PublicanPushCommand.java
deleted file mode 100644
index fbba3738a2..0000000000
--- a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/PublicanPushCommand.java
+++ /dev/null
@@ -1,279 +0,0 @@
-package org.zanata.client.commands;
-
-import java.io.BufferedInputStream;
-import java.io.Console;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.StringWriter;
-import java.net.URI;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.Marshaller;
-
-import org.apache.commons.io.filefilter.AndFileFilter;
-import org.jboss.resteasy.client.ClientResponse;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.xml.sax.InputSource;
-import org.zanata.adapter.po.PoReader2;
-import org.zanata.client.commands.gettext.PublicanUtil;
-import org.zanata.client.config.LocaleMapping;
-import org.zanata.common.LocaleId;
-import org.zanata.rest.JaxbUtil;
-import org.zanata.rest.RestUtil;
-import org.zanata.rest.StringSet;
-import org.zanata.rest.client.ClientUtility;
-import org.zanata.rest.client.ITranslationResources;
-import org.zanata.rest.client.ZanataProxyFactory;
-import org.zanata.rest.dto.resource.Resource;
-import org.zanata.rest.dto.resource.ResourceMeta;
-import org.zanata.rest.dto.resource.TranslationsResource;
-
-/**
- * @author Sean Flanigan sflaniga@redhat.com
- *
- * @deprecated
- * @see org.zanata.client.commands.push.PushCommand
- */
-public class PublicanPushCommand extends ConfigurableProjectCommand
-{
- private static final Logger log = LoggerFactory.getLogger(PublicanPushCommand.class);
-
- private final ITranslationResources translationResources;
- private final URI uri;
-
- public PublicanPushCommand(PublicanPushOptions opts, ZanataProxyFactory factory, ITranslationResources translationResources, URI uri)
- {
- super(opts, factory);
- this.translationResources = translationResources;
- this.uri = uri;
- }
-
- private PublicanPushCommand(PublicanPushOptions opts, ZanataProxyFactory factory)
- {
- this(opts, factory, factory.getTranslationResources(opts.getProj(), opts.getProjectVersion()), factory.getTranslationResourcesURI(opts.getProj(), opts.getProjectVersion()));
- }
-
- public PublicanPushCommand(PublicanPushOptions opts)
- {
- this(opts, OptionsUtil.createRequestFactory(opts));
- }
-
- @Override
- protected String getProjectType()
- {
- return PROJECT_TYPE_PUBLICAN;
- }
-
- @Override
- public void run() throws Exception
- {
- log.info("Server: {}", getOpts().getUrl());
- log.info("Project: {}", getOpts().getProj());
- log.info("Version: {}", getOpts().getProjectVersion());
- log.info("Username: {}", getOpts().getUsername());
- log.info("Source language: {}", getOpts().getSourceLang());
- log.info("Copy previous translations: {}", getOpts().getCopyTrans());
- log.info("Merge type: {}", getOpts().getMergeType());
- if (getOpts().getImportPo())
- {
- log.info("Importing source and target documents");
- }
- else
- {
- log.info("Importing source documents only");
- }
- log.info("POT directory (originals): {}", getOpts().getSrcDirPot());
- if (getOpts().getImportPo())
- {
- log.info("PO base directory (translations): {}", getOpts().getSrcDir());
- }
- File potDir = getOpts().getSrcDirPot();
-
- if (!potDir.exists())
- {
- throw new RuntimeException("directory '" + potDir + "' does not exist - check srcDir and srcDirPot options");
- }
-
- Console console = System.console();
- if (getOpts().isInteractiveMode())
- {
- if (console == null)
- throw new RuntimeException("console not available: please run maven from a console, or use batch mode (mvn -B)");
- }
-
- if (getOpts().getImportPo())
- {
- log.warn("importPo option is set: existing translations on server will be overwritten/deleted");
- if (getOpts().isInteractiveMode())
- {
- console.printf("This will overwrite/delete any existing documents AND TRANSLATIONS on the server.\n");
- console.printf("Are you sure (y/n)? ");
- expectYes(console);
- }
- }
- else if (getOpts().isInteractiveMode())
- {
- console.printf("This will overwrite/delete any existing documents on the server.\n");
- console.printf("Are you sure (y/n)? ");
- expectYes(console);
- }
-
- JAXBContext jc = null;
- if (log.isDebugEnabled() || getOpts().getValidate())
- {
- jc = JAXBContext.newInstance(Resource.class, TranslationsResource.class);
- }
- Marshaller m = null;
- if (log.isDebugEnabled())
- {
- m = jc.createMarshaller();
- m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
- }
-
- // NB we don't load all the docs into a HashMap, because that would waste
- // memory
- Set localDocNames = new HashSet();
- // populate localDocNames by looking in pot directory
-
- String[] potFiles = PublicanUtil.findPotFiles(potDir, new AndFileFilter());
- for (String potName : potFiles)
- {
- String docName = StringUtil.removeFileExtension(potName, ".pot");
- localDocNames.add(docName);
- }
-
- ClientResponse> getResponse = translationResources.get(null);
- ClientUtility.checkResult(getResponse, uri);
- List remoteDocList = getResponse.getEntity();
- for (ResourceMeta doc : remoteDocList)
- {
- // NB ResourceMeta.name = HDocument.docId
- String docName = doc.getName();
- String docUri = RestUtil.convertToDocumentURIId(docName);
- if (!localDocNames.contains(docName))
- {
- log.info("deleting resource {} from server", docName);
- ClientResponse deleteResponse = translationResources.deleteResource(docUri);
- ClientUtility.checkResult(deleteResponse, uri);
- }
- }
- List locales = null;
- if (getOpts().getImportPo())
- {
- if (getOpts().getLocales() != null)
- {
- locales = PublicanUtil.findLocales(getOpts().getSrcDir(), getOpts().getLocales());
- if (locales.size() == 0)
- {
- log.warn("option 'importPo' is set, but none of the configured locale directories was found (check zanata.xml)");
- }
- }
- else
- {
- locales = PublicanUtil.findLocales(getOpts().getSrcDir());
- if (locales.size() == 0)
- {
- log.warn("option 'importPo' is set, but no locale directories were found");
- }
- else
- {
- log.info("option 'importPo' is set, but no locales specified in configuration: importing " + locales.size() + " directories");
- }
- }
- }
-
- PoReader2 poReader = new PoReader2();
- for (String docName : localDocNames)
- {
- String docUri = RestUtil.convertToDocumentURIId(docName);
- File potFile = new File(potDir, docName + ".pot");
- Resource srcDoc;
- BufferedInputStream bis = new BufferedInputStream(new FileInputStream(potFile));
- try
- {
- InputSource potInputSource = new InputSource(bis);
- potInputSource.setEncoding("utf8");
- // load 'srcDoc' from pot/${docID}.pot
- srcDoc = poReader.extractTemplate(potInputSource, new LocaleId(getOpts().getSourceLang()), docName);
- }
- finally
- {
- bis.close();
- }
- if (log.isDebugEnabled())
- {
- StringWriter writer = new StringWriter();
- m.marshal(srcDoc, writer);
- log.debug("{}", writer);
- }
- if (getOpts().getValidate())
- {
- JaxbUtil.validateXml(srcDoc, jc);
- }
- StringSet extensions = new StringSet("comment;gettext");
- log.info("pushing source document [name={}] to server", srcDoc.getName());
- boolean copyTrans = getOpts().getCopyTrans();
- ClientResponse putResponse = translationResources.putResource(docUri, srcDoc, extensions, copyTrans );
- ClientUtility.checkResult(putResponse, uri);
-
- if (getOpts().getImportPo())
- {
- for (LocaleMapping locale : locales)
- {
- File localeDir = new File(getOpts().getSrcDir(), locale.getLocalLocale());
- File poFile = new File(localeDir, docName + ".po");
- if (poFile.canRead())
- {
- TranslationsResource targetDoc;
- BufferedInputStream bis2 = new BufferedInputStream(new FileInputStream(poFile));
- try
- {
- InputSource inputSource = new InputSource(bis2);
- inputSource.setEncoding("utf8");
- // NB we always use source order in this impl
- targetDoc = poReader.extractTarget(inputSource, srcDoc, true);
- }
- finally
- {
- bis2.close();
- }
- if (log.isDebugEnabled())
- {
- StringWriter writer = new StringWriter();
- m.marshal(targetDoc, writer);
- log.debug("{}", writer);
- }
- if (getOpts().getValidate())
- {
- JaxbUtil.validateXml(targetDoc, jc);
- }
- log.info("pushing target document [name={} client-locale={}] to server [locale={}]", new Object[] { srcDoc.getName(), locale.getLocalLocale(), locale.getLocale() });
- ClientResponse putTransResponse = translationResources.putTranslations(docUri, new LocaleId(locale.getLocale()), targetDoc, extensions, getOpts().getMergeType());
- ClientUtility.checkResult(putTransResponse, uri);
- String entity = putTransResponse.getEntity(String.class);
- if (entity != null && !entity.isEmpty())
- {
- log.warn("{}", entity);
- }
- }
- }
- }
- }
- }
-
- protected void expectYes(Console console) throws IOException
- {
- String line = console.readLine();
- if (line == null)
- throw new IOException("console stream closed");
- if (!line.toLowerCase().equals("y") && !line.toLowerCase().equals("yes"))
- throw new RuntimeException("operation aborted by user");
- }
-
-}
diff --git a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/PublicanPushOptions.java b/client/zanata-client-commands/src/main/java/org/zanata/client/commands/PublicanPushOptions.java
deleted file mode 100644
index 553b3e246d..0000000000
--- a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/PublicanPushOptions.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package org.zanata.client.commands;
-
-import java.io.File;
-
-/**
- *
- * @author Sean Flanigan sflaniga@redhat.com
- * @deprecated
- * @see org.zanata.client.commands.push.PushOptions
- */
-public interface PublicanPushOptions extends ConfigurableProjectOptions
-{
- public File getSrcDir();
- public File getSrcDirPot();
- public String getSourceLang();
- public boolean getImportPo();
- public boolean getCopyTrans();
- public boolean getValidate();
- public String getMergeType();
-}
\ No newline at end of file
diff --git a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/PublicanPushOptionsImpl.java b/client/zanata-client-commands/src/main/java/org/zanata/client/commands/PublicanPushOptionsImpl.java
deleted file mode 100644
index 282c3bd348..0000000000
--- a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/PublicanPushOptionsImpl.java
+++ /dev/null
@@ -1,130 +0,0 @@
-package org.zanata.client.commands;
-
-import java.io.File;
-
-import org.kohsuke.args4j.Option;
-
-/**
- * @author Sean Flanigan sflaniga@redhat.com
- *
- * @deprecated
- * @see org.zanata.client.commands.push.PushOptions
- */
-public class PublicanPushOptionsImpl extends ConfigurableProjectOptionsImpl implements PublicanPushOptions
-{
- private File srcDir;
- private File srcDirPot;
-
- private String sourceLang = "en-US";
-
- private boolean importPo;
- private boolean copyTrans = true;
- private boolean validate;
- private String mergeType = "auto";
-
- public PublicanPushOptionsImpl()
- {
- super();
- }
-
- @Override
- public String getCommandName()
- {
- return "publican-push";
- }
-
- @Override
- public String getCommandDescription()
- {
- return "Publishes publican source text to Zanata so that it can be translated.";
- }
-
- @Override
- public PublicanPushCommand initCommand()
- {
- return new PublicanPushCommand(this);
- }
-
- @Option(aliases = { "-s" }, name = "--src", metaVar = "DIR", required = true, usage = "Base directory for publican files (with subdirectory \"pot\" and optional locale directories)")
- public void setSrcDir(File srcDir)
- {
- this.srcDir = srcDir;
- if (srcDirPot == null)
- srcDirPot = new File(srcDir, "pot");
- }
-
- @Option(name = "--src-pot", metaVar = "DIR", required = false, usage = "Override base directory for publican POT files (defaults to \"pot\" under --src directory)")
- public void setSrcDirPot(File srcDirPot)
- {
- this.srcDirPot = srcDirPot;
- }
-
- @Option(aliases = { "-l" }, name = "--src-lang", usage = "Language of source (defaults to en-US)")
- public void setSourceLang(String sourceLang)
- {
- this.sourceLang = sourceLang;
- }
-
- @Option(name = "--import-po", usage = "Import translations from local PO files to Zanata, overwriting or erasing existing translations (DANGER!)")
- public void setImportPo(boolean importPo)
- {
- this.importPo = importPo;
- }
-
- @Option(name = "--validate", usage = "Validate XML before sending request to server")
- public void setValidate(boolean validate)
- {
- this.validate = validate;
- }
-
-
- @Override
- public boolean getValidate()
- {
- return validate;
- }
-
- @Override
- public boolean getImportPo()
- {
- return importPo;
- }
-
- @Override
- public boolean getCopyTrans()
- {
- return copyTrans;
- }
-
- @Option(name = "--no-copy-trans", usage = "Don't copy latest translation from equivalent documents from other versions of the same project")
- public void setNoCopyTrans(boolean noCopyTrans)
- {
- this.copyTrans = !noCopyTrans;
- }
-
- @Override
- public File getSrcDir()
- {
- return srcDir;
- }
-
- @Override
- public File getSrcDirPot()
- {
- return srcDirPot;
- }
-
- @Override
- public String getSourceLang()
- {
- return sourceLang;
- }
-
- @Override
- public String getMergeType()
- {
- return mergeType;
- }
-
-}
diff --git a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/PutProjectCommand.java b/client/zanata-client-commands/src/main/java/org/zanata/client/commands/PutProjectCommand.java
deleted file mode 100644
index f2d3224e38..0000000000
--- a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/PutProjectCommand.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package org.zanata.client.commands;
-
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-
-import javax.xml.bind.JAXBException;
-
-import org.jboss.resteasy.client.ClientResponse;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.zanata.rest.client.ClientUtility;
-import org.zanata.rest.client.IProjectResource;
-import org.zanata.rest.dto.Project;
-
-/**
- * @author Sean Flanigan
- *
- */
-public class PutProjectCommand extends ConfigurableCommand
-{
- private static final Logger log = LoggerFactory.getLogger(PutProjectCommand.class);
-
- public PutProjectCommand(PutProjectOptions opts)
- {
- super(opts);
- }
-
- @Override
- public void run() throws JAXBException, URISyntaxException, IOException
- {
- Project project = new Project();
- project.setId(getOpts().getProjectSlug());
- project.setName(getOpts().getProjectName());
- project.setDescription(getOpts().getProjectDesc());
-
- log.debug("{}", project);
-
- // send project to rest api
- IProjectResource projResource = getRequestFactory().getProject(getOpts().getProjectSlug());
- URI uri = getRequestFactory().getProjectURI(getOpts().getProjectSlug());
- ClientResponse> response = projResource.put(project);
- ClientUtility.checkResult(response, uri);
- }
-}
diff --git a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/PutProjectOptions.java b/client/zanata-client-commands/src/main/java/org/zanata/client/commands/PutProjectOptions.java
deleted file mode 100644
index c1f4db21e6..0000000000
--- a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/PutProjectOptions.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package org.zanata.client.commands;
-
-import org.kohsuke.args4j.Option;
-
-public interface PutProjectOptions extends ConfigurableOptions
-{
-
- @Option(name = "--project-slug", metaVar = "PROJ", usage = "Project ID", required = true)
- public void setProjectSlug(String id);
-
- @Option(name = "--project-name", metaVar = "NAME", required = true, usage = "Project name")
- public void setProjectName(String name);
-
- @Option(name = "--project-desc", metaVar = "DESC", required = true, usage = "Project description")
- public void setProjectDesc(String desc);
-
- public String getProjectSlug();
-
- public String getProjectDesc();
-
- public String getProjectName();
-
-}
\ No newline at end of file
diff --git a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/PutProjectOptionsImpl.java b/client/zanata-client-commands/src/main/java/org/zanata/client/commands/PutProjectOptionsImpl.java
deleted file mode 100644
index 53d66225cd..0000000000
--- a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/PutProjectOptionsImpl.java
+++ /dev/null
@@ -1,73 +0,0 @@
-package org.zanata.client.commands;
-
-import org.kohsuke.args4j.Option;
-
-/**
- * @author Sean Flanigan
- *
- */
-public class PutProjectOptionsImpl extends ConfigurableOptionsImpl implements PutProjectOptions
-{
-
- private String projectSlug;
- private String projectName;
- private String projectDesc;
-
- @Override
- public String getCommandName()
- {
- return "putproject";
- }
-
- @Override
- public String getCommandDescription()
- {
- return "Creates or updates a Zanata project.";
- }
-
- @Override
- public PutProjectCommand initCommand()
- {
- return new PutProjectCommand(this);
- }
-
- @Override
- @Option(name = "--project-slug", metaVar = "PROJ", usage = "Project ID", required = true)
- public void setProjectSlug(String id)
- {
- this.projectSlug = id;
- }
-
- @Override
- @Option(name = "--project-name", metaVar = "NAME", required = true, usage = "Project name")
- public void setProjectName(String name)
- {
- this.projectName = name;
- }
-
- @Override
- @Option(name = "--project-desc", metaVar = "DESC", required = true, usage = "Project description")
- public void setProjectDesc(String desc)
- {
- this.projectDesc = desc;
- }
-
- @Override
- public String getProjectSlug()
- {
- return projectSlug;
- }
-
- @Override
- public String getProjectDesc()
- {
- return projectDesc;
- }
-
- @Override
- public String getProjectName()
- {
- return projectName;
- }
-
-}
diff --git a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/PutUserCommand.java b/client/zanata-client-commands/src/main/java/org/zanata/client/commands/PutUserCommand.java
deleted file mode 100644
index fb55e94a16..0000000000
--- a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/PutUserCommand.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package org.zanata.client.commands;
-
-import java.net.URI;
-import java.util.Arrays;
-import java.util.HashSet;
-
-import org.jboss.resteasy.client.ClientResponse;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.zanata.rest.client.ClientUtility;
-import org.zanata.rest.client.IAccountResource;
-import org.zanata.rest.dto.Account;
-
-/**
- * @author Sean Flanigan
- *
- */
-public class PutUserCommand extends ConfigurableCommand
-{
- private static final Logger log = LoggerFactory.getLogger(PutUserCommand.class);
-
- public PutUserCommand(PutUserOptions opts)
- {
- super(opts);
- }
-
- public void run() throws Exception
- {
- Account account = new Account();
- account.setEmail(getOpts().getUserEmail());
- account.setName(getOpts().getUserName());
- account.setUsername(getOpts().getUserUsername());
- account.setPasswordHash(getOpts().getUserPasswordHash());
- account.setApiKey(getOpts().getUserKey());
- account.setEnabled(!getOpts().isUserDisabled());
- account.setRoles(new HashSet(Arrays.asList(getOpts().getUserRoles().split(","))));
- account.setTribes(new HashSet(Arrays.asList(getOpts().getUserLangs().split(","))));
-
- log.debug("{}", account);
-
- IAccountResource iterResource = getRequestFactory().getAccount(getOpts().getUserUsername());
- URI uri = getRequestFactory().getAccountURI(getOpts().getUserUsername());
- ClientResponse> response = iterResource.put(account);
- ClientUtility.checkResult(response, uri);
- }
-
-}
diff --git a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/PutUserOptions.java b/client/zanata-client-commands/src/main/java/org/zanata/client/commands/PutUserOptions.java
deleted file mode 100644
index ff59e5fd54..0000000000
--- a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/PutUserOptions.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package org.zanata.client.commands;
-
-import org.kohsuke.args4j.Option;
-
-public interface PutUserOptions extends ConfigurableOptions
-{
-
- @Option(name = "--user-name", required = true, usage = "Full name of the user")
- public void setUserName(String name);
-
- public String getUserName();
-
- @Option(name = "--user-email", required = true, usage = "Email address of the user")
- public void setUserEmail(String email);
-
- public String getUserEmail();
-
- @Option(name = "--user-username", required = true, usage = "Login/username of the user")
- public void setUserUsername(String username);
-
- public String getUserUsername();
-
- @Option(name = "--user-passwordhash", required = true, usage = "User password hash")
- public void setUserPasswordHash(String passwordHash);
-
- public String getUserPasswordHash();
-
- @Option(name = "--user-key", required = true, usage = "User's api key (empty for none)")
- public void setUserKey(String userKey);
-
- public String getUserKey();
-
- @Option(name = "--user-langs", required = true, usage = "Language teams for the user")
- public void setUserLangs(String langs);
-
- public String getUserLangs();
-
- @Option(name = "--user-roles", required = true, usage = "Security roles for the user")
- public void setUserRoles(String roles);
-
- public String getUserRoles();
-
- @Option(name = "--user-disabled", required = false, usage = "Whether the account should be disabled")
- public void setUserDisabled(boolean disabled);
- public boolean isUserDisabled();
-
-}
\ No newline at end of file
diff --git a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/PutUserOptionsImpl.java b/client/zanata-client-commands/src/main/java/org/zanata/client/commands/PutUserOptionsImpl.java
deleted file mode 100644
index fc11e2fc1b..0000000000
--- a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/PutUserOptionsImpl.java
+++ /dev/null
@@ -1,145 +0,0 @@
-package org.zanata.client.commands;
-
-import org.kohsuke.args4j.Option;
-
-/**
- * @author Sean Flanigan
- *
- */
-public class PutUserOptionsImpl extends ConfigurableOptionsImpl implements PutUserOptions
-{
- private String userName;
- private String userEmail;
- private String userUsername;
- private String userPasswordHash;
- private String userKey;
- private String userRoles;
- private String userLangs;
- private boolean userDisabled;
-
- @Override
- public String getCommandName()
- {
- return "putuser";
- }
-
- @Override
- public String getCommandDescription()
- {
- return "Creates or updates a user.";
- }
-
- @Override
- public PutUserCommand initCommand()
- {
- return new PutUserCommand(this);
- }
-
- @Override
- @Option(name = "--user-name", required = true, usage = "Full name of the user")
- public void setUserName(String name)
- {
- this.userName = name;
- }
-
- @Override
- @Option(name = "--user-email", required = true, usage = "Email address of the user")
- public void setUserEmail(String email)
- {
- this.userEmail = email;
- }
-
- @Override
- @Option(name = "--user-username", required = true, usage = "Login/username of the user")
- public void setUserUsername(String username)
- {
- this.userUsername = username;
- }
-
- @Override
- @Option(name = "--user-passwordhash", required = true, usage = "User password hash")
- public void setUserPasswordHash(String passwordHash)
- {
- this.userPasswordHash = passwordHash;
- }
-
- @Override
- @Option(name = "--user-key", required = true, usage = "User's api key (empty for none)")
- public void setUserKey(String userKey)
- {
- if (userKey == null || userKey.length() == 0)
- this.userKey = null;
- else
- this.userKey = userKey;
- }
-
- @Option(name = "--user-langs", required = true, usage = "Language teams for the user")
- @Override
- public void setUserLangs(String userLangs)
- {
- this.userLangs = userLangs;
- }
-
- @Override
- @Option(name = "--user-roles", required = true, usage = "Security roles for the user")
- public void setUserRoles(String roles)
- {
- this.userRoles = roles;
- }
-
- @Override
- @Option(name = "--user-disabled", required = false, usage = "Whether the account should be disabled")
- public void setUserDisabled(boolean disabled)
- {
- this.userDisabled = disabled;
- }
-
- @Override
- public String getUserUsername()
- {
- return userUsername;
- }
-
- @Override
- public boolean isUserDisabled()
- {
- return userDisabled;
- }
-
- @Override
- public String getUserLangs()
- {
- return userLangs;
- }
-
- @Override
- public String getUserKey()
- {
- return userKey;
- }
-
- @Override
- public String getUserPasswordHash()
- {
- return userPasswordHash;
- }
-
- @Override
- public String getUserName()
- {
- return userName;
- }
-
- @Override
- public String getUserEmail()
- {
- return userEmail;
- }
-
- @Override
- public String getUserRoles()
- {
- return userRoles;
- }
-
-}
diff --git a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/PutVersionCommand.java b/client/zanata-client-commands/src/main/java/org/zanata/client/commands/PutVersionCommand.java
deleted file mode 100644
index ea4e769ed6..0000000000
--- a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/PutVersionCommand.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package org.zanata.client.commands;
-
-import java.net.URI;
-
-import org.jboss.resteasy.client.ClientResponse;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.zanata.rest.client.ClientUtility;
-import org.zanata.rest.client.IProjectIterationResource;
-import org.zanata.rest.dto.ProjectIteration;
-
-/**
- * @author Sean Flanigan
- *
- */
-public class PutVersionCommand extends ConfigurableCommand
-{
- private static final Logger log = LoggerFactory.getLogger(PutVersionCommand.class);
-
- public PutVersionCommand(PutVersionOptions opts)
- {
- super(opts);
- }
-
- @Override
- public void run() throws Exception
- {
- ProjectIteration version = new ProjectIteration();
- version.setId(getOpts().getVersionSlug());
- log.debug("{}", version);
-
- IProjectIterationResource iterResource = getRequestFactory().getProjectIteration(getOpts().getVersionProject(), getOpts().getVersionSlug());
- URI uri = getRequestFactory().getProjectIterationURI(getOpts().getVersionProject(), getOpts().getVersionSlug());
- ClientResponse> response = iterResource.put(version);
- ClientUtility.checkResult(response, uri);
- }
-
-}
diff --git a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/PutVersionOptions.java b/client/zanata-client-commands/src/main/java/org/zanata/client/commands/PutVersionOptions.java
deleted file mode 100644
index f263559591..0000000000
--- a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/PutVersionOptions.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package org.zanata.client.commands;
-
-import org.kohsuke.args4j.Option;
-
-public interface PutVersionOptions extends ConfigurableOptions
-{
-
- @Option(name = "--version-project", metaVar = "PROJ", usage = "ID of Zanata project", required = true)
- public void setVersionProject(String id);
-
- @Option(name = "--version-slug", metaVar = "VER", usage = "Project version ID", required = true)
- public void setVersionSlug(String id);
-
- public String getVersionProject();
-
- public String getVersionSlug();
-
-}
\ No newline at end of file
diff --git a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/PutVersionOptionsImpl.java b/client/zanata-client-commands/src/main/java/org/zanata/client/commands/PutVersionOptionsImpl.java
deleted file mode 100644
index c65679e3a6..0000000000
--- a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/PutVersionOptionsImpl.java
+++ /dev/null
@@ -1,59 +0,0 @@
-package org.zanata.client.commands;
-
-import org.kohsuke.args4j.Option;
-
-/**
- * @author Sean Flanigan
- *
- */
-public class PutVersionOptionsImpl extends ConfigurableOptionsImpl implements PutVersionOptions
-{
- private String versionProject;
- private String versionSlug;
-
- @Override
- public String getCommandName()
- {
- return "putversion";
- }
-
- @Override
- public String getCommandDescription()
- {
- return "Creates or updates a Zanata project version.";
- }
-
- @Override
- public PutVersionCommand initCommand()
- {
- return new PutVersionCommand(this);
- }
-
- @Override
- @Option(name = "--version-project", metaVar = "PROJ", usage = "ID of Zanata project", required = true)
- public void setVersionProject(String id)
- {
- this.versionProject = id;
- }
-
- @Override
- @Option(name = "--version-slug", metaVar = "VER", usage = "Project version ID", required = true)
- public void setVersionSlug(String id)
- {
- this.versionSlug = id;
- }
-
- @Override
- public String getVersionProject()
- {
- return versionProject;
- }
-
- @Override
- public String getVersionSlug()
- {
- return versionSlug;
- }
-
-
-}
diff --git a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/RuntimeExceptionStrategy.java b/client/zanata-client-commands/src/main/java/org/zanata/client/commands/RuntimeExceptionStrategy.java
deleted file mode 100644
index b1dc7f1cbd..0000000000
--- a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/RuntimeExceptionStrategy.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package org.zanata.client.commands;
-
-public class RuntimeExceptionStrategy implements AppAbortStrategy
-{
- @Override
- public void abort(Throwable e)
- {
- throw new RuntimeException("abort called", e);
- }
-}
\ No newline at end of file
diff --git a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/StringUtil.java b/client/zanata-client-commands/src/main/java/org/zanata/client/commands/StringUtil.java
deleted file mode 100644
index be9ffa8102..0000000000
--- a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/StringUtil.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package org.zanata.client.commands;
-
-/**
- *
- * @author Sean Flanigan sflaniga@redhat.com
- *
- */
-public class StringUtil
-{
- public static String removeFileExtension(String filename, String extension)
- {
- if (!filename.endsWith(extension))
- throw new IllegalArgumentException("Filename '" + filename + "' should have extension '" + extension + "'");
- String basename = filename.substring(0, filename.length() - extension.length());
- return basename;
- }
-
-}
diff --git a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/SystemExitStrategy.java b/client/zanata-client-commands/src/main/java/org/zanata/client/commands/SystemExitStrategy.java
deleted file mode 100644
index b1b381bc33..0000000000
--- a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/SystemExitStrategy.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package org.zanata.client.commands;
-
-public class SystemExitStrategy implements AppAbortStrategy
-{
- @Override
- public void abort(Throwable e)
- {
- System.exit(1);
- }
-}
\ No newline at end of file
diff --git a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/ZanataCommand.java b/client/zanata-client-commands/src/main/java/org/zanata/client/commands/ZanataCommand.java
deleted file mode 100644
index d0dd78bfb9..0000000000
--- a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/ZanataCommand.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package org.zanata.client.commands;
-
-
-
-public interface ZanataCommand
-{
- /**
- * Executes the command, using the parameters which have been
- * previously set. This method must be called after initConfig().
- */
- public void run() throws Exception;
-
-}
diff --git a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/gettext/GettextUtils.java b/client/zanata-client-commands/src/main/java/org/zanata/client/commands/gettext/GettextUtils.java
deleted file mode 100644
index 90fcc79506..0000000000
--- a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/gettext/GettextUtils.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package org.zanata.client.commands.gettext;
-
-/**
- *
- * @author Sean Flanigan sflaniga@redhat.com
- *
- */
-public class GettextUtils
-{
-
- private GettextUtils()
- {
- }
-
- public static void transfer()
- {
-
- }
-
-}
diff --git a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/gettext/PublicanUtil.java b/client/zanata-client-commands/src/main/java/org/zanata/client/commands/gettext/PublicanUtil.java
deleted file mode 100644
index 9a2460a567..0000000000
--- a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/gettext/PublicanUtil.java
+++ /dev/null
@@ -1,95 +0,0 @@
-package org.zanata.client.commands.gettext;
-
-import java.io.File;
-import java.io.FileFilter;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-
-import org.apache.commons.io.FileUtils;
-import org.apache.commons.io.filefilter.AndFileFilter;
-import org.apache.commons.io.filefilter.SuffixFileFilter;
-import org.apache.commons.io.filefilter.TrueFileFilter;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.zanata.client.config.LocaleList;
-import org.zanata.client.config.LocaleMapping;
-import org.zanata.util.PathUtil;
-
-/**
- *
- * @author Sean Flanigan <sflaniga@redhat.com >
- *
- */
-public class PublicanUtil
-{
- private static final Logger log = LoggerFactory.getLogger(PublicanUtil.class);
-
- private PublicanUtil()
- {
- }
-
- public static String[] findPotFiles(File potDir, AndFileFilter fileFilter) throws IOException
- {
- SuffixFileFilter extensionFilter = new SuffixFileFilter(".pot");
- fileFilter.addFileFilter(extensionFilter);
-
- Collection files = FileUtils.listFiles(potDir, fileFilter, TrueFileFilter.TRUE);
-
-
- String[] potFiles = new String[files.size()];
- Iterator iter = files.iterator();
-
- for (int i = 0; i < potFiles.length; i++)
- {
- File potFile = iter.next();
- String relativePath = PathUtil.getSubPath(potFile, potDir);
- potFiles[i] = relativePath;
- }
- return potFiles;
- }
-
- public static File[] findLocaleDirs(File srcDir)
- {
- File[] localeDirs;
- localeDirs = srcDir.listFiles(new FileFilter()
- {
- @Override
- public boolean accept(File f)
- {
- return f.isDirectory() && !f.getName().equals("pot");
- }
- });
- return localeDirs;
- }
-
- public static List findLocales(File srcDir)
- {
- File[] localeDirs = findLocaleDirs(srcDir);
- List locales = new ArrayList();
- for (File dir : localeDirs)
- {
- locales.add(new LocaleMapping(dir.getName()));
- }
- return locales;
- }
-
- public static List findLocales(File srcDir, LocaleList locales)
- {
- List localeDirs = new ArrayList();
-
- for (LocaleMapping loc : locales)
- {
- File localeDir = new File(srcDir, loc.getLocalLocale());
- if (localeDir.isDirectory())
- localeDirs.add(loc);
- else
- log.warn("configured locale {} not found; directory {} does not exist", loc.getLocale(), loc.getLocalLocale());
- }
-
- return localeDirs;
- }
-}
diff --git a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/glossary/delete/GlossaryDeleteCommand.java b/client/zanata-client-commands/src/main/java/org/zanata/client/commands/glossary/delete/GlossaryDeleteCommand.java
deleted file mode 100644
index 7e4f6b270c..0000000000
--- a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/glossary/delete/GlossaryDeleteCommand.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright 2011, Red Hat, Inc. and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.zanata.client.commands.glossary.delete;
-
-import java.net.URI;
-
-import org.apache.commons.lang.StringUtils;
-import org.jboss.resteasy.client.ClientResponse;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.zanata.client.commands.ConfigurableCommand;
-import org.zanata.client.commands.OptionsUtil;
-import org.zanata.common.LocaleId;
-import org.zanata.rest.client.ClientUtility;
-import org.zanata.rest.client.IGlossaryResource;
-import org.zanata.rest.client.ZanataProxyFactory;
-
-/**
- *
- * @author Alex Eng aeng@redhat.com
- *
- **/
-public class GlossaryDeleteCommand extends ConfigurableCommand
-{
- private static final Logger log = LoggerFactory.getLogger(GlossaryDeleteCommand.class);
-
- private final IGlossaryResource glossaryResource;
- private final URI uri;
-
- public GlossaryDeleteCommand(GlossaryDeleteOptions opts, ZanataProxyFactory factory, IGlossaryResource glossaryResource, URI uri)
- {
- super(opts, factory);
- this.glossaryResource = glossaryResource;
- this.uri = uri;
- }
-
- private GlossaryDeleteCommand(GlossaryDeleteOptions opts, ZanataProxyFactory factory)
- {
- this(opts, factory, factory.getGlossaryResource(), factory.getGlossaryResourceURI());
- }
-
- public GlossaryDeleteCommand(GlossaryDeleteOptions opts)
- {
- this(opts, OptionsUtil.createRequestFactory(opts));
- }
-
- @Override
- public void run() throws Exception
- {
- log.info("Server: {}", getOpts().getUrl());
- log.info("Username: {}", getOpts().getUsername());
- log.info("Locale to delete: {}", getOpts().getlang());
- log.info("Delete entire glossary?: {}", getOpts().getAllGlossary());
-
- ClientResponse response;
-
- if (getOpts().getAllGlossary())
- {
- response = glossaryResource.deleteGlossaries();
- }
- else if (!StringUtils.isEmpty(getOpts().getlang()))
- {
- response = glossaryResource.deleteGlossary(new LocaleId(getOpts().getlang()));
- }
- else
- {
- throw new RuntimeException("Option 'zanata.lang' is required.");
- }
- ClientUtility.checkResult(response, uri);
- }
-}
diff --git a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/glossary/delete/GlossaryDeleteOptions.java b/client/zanata-client-commands/src/main/java/org/zanata/client/commands/glossary/delete/GlossaryDeleteOptions.java
deleted file mode 100644
index 744915348a..0000000000
--- a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/glossary/delete/GlossaryDeleteOptions.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package org.zanata.client.commands.glossary.delete;
-
-import org.zanata.client.commands.ConfigurableProjectOptions;
-
-public interface GlossaryDeleteOptions extends ConfigurableProjectOptions
-{
- public String getlang();
-
- public boolean getAllGlossary();
-}
\ No newline at end of file
diff --git a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/glossary/push/AbstractGlossaryPushReader.java b/client/zanata-client-commands/src/main/java/org/zanata/client/commands/glossary/push/AbstractGlossaryPushReader.java
deleted file mode 100644
index c5140a03fe..0000000000
--- a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/glossary/push/AbstractGlossaryPushReader.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright 2011, Red Hat, Inc. and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.zanata.client.commands.glossary.push;
-
-import java.io.File;
-import java.io.IOException;
-
-import org.zanata.client.config.LocaleMapping;
-import org.zanata.common.LocaleId;
-import org.zanata.rest.dto.Glossary;
-
-/**
- *
- * @author Alex Eng aeng@redhat.com
- *
- **/
-public abstract class AbstractGlossaryPushReader
-{
- private GlossaryPushOptions opts;
-
- private String fileExtension;
-
- public abstract Glossary extractGlossary(File glossaryFile) throws IOException;
-
- protected LocaleId getLocaleFromMap(String localLocale)
- {
- if (!getOpts().getLocales().isEmpty())
- {
- for (LocaleMapping loc : getOpts().getLocales())
- {
- if (loc.getLocalLocale().equals(localLocale))
- {
- return new LocaleId(loc.getLocale());
- }
- }
- }
- return new LocaleId(localLocale);
- }
-
- public GlossaryPushOptions getOpts()
- {
- return opts;
- }
-
- public void setOpts(GlossaryPushOptions opts)
- {
- this.opts = opts;
- }
-
- public String getFileExtension()
- {
- return fileExtension;
- }
-
-}
diff --git a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/glossary/push/GlossaryCSVReader.java b/client/zanata-client-commands/src/main/java/org/zanata/client/commands/glossary/push/GlossaryCSVReader.java
deleted file mode 100644
index d6a939c72d..0000000000
--- a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/glossary/push/GlossaryCSVReader.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
- * Copyright 2011, Red Hat, Inc. and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.zanata.client.commands.glossary.push;
-
-import java.io.File;
-import java.io.FileReader;
-import java.io.IOException;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.TreeMap;
-
-import org.zanata.common.LocaleId;
-import org.zanata.rest.dto.Glossary;
-import org.zanata.rest.dto.GlossaryEntry;
-import org.zanata.rest.dto.GlossaryTerm;
-
-import au.com.bytecode.opencsv.CSVReader;
-
-/**
- *
- * @author Alex Eng aeng@redhat.com
- *
- **/
-public class GlossaryCSVReader extends AbstractGlossaryPushReader
-{
- @Override
- public Glossary extractGlossary(File glossaryFile) throws IOException, RuntimeException
- {
- CSVReader reader = new CSVReader(new FileReader(glossaryFile));
-
- List entries = reader.readAll();
-
- validateCVSEntries(entries);
-
- Map descriptionMap = setupDescMap(entries);
- Map localeColMap = setupLocalesMap(entries, descriptionMap);
-
- LocaleId srcLocale = localeColMap.get(0);
-
- Glossary glossary = new Glossary();
-
- for (int i = 1; i < entries.size(); i++)
- {
- String[] row = entries.get(i);
- GlossaryEntry entry = new GlossaryEntry();
- entry.setSrcLang(srcLocale);
-
- for (int x = 0; x < row.length && localeColMap.containsKey(x); x++)
- {
- GlossaryTerm term = new GlossaryTerm();
- term.setLocale(localeColMap.get(x));
- term.setContent(row[x]);
- if (x == 0)
- {
- // this is source term
- for (int descRow : descriptionMap.keySet())
- {
- term.getComments().add(row[descRow]);
- }
- }
- entry.getGlossaryTerms().add(term);
- }
- glossary.getGlossaryEntries().add(entry);
- }
- return glossary;
-
- }
-
- /* @formatter:off
- * Basic validation of CVS file format
- * - At least 2 rows in the CVS file
- * - Empty content validation
- * - All row must have the same column count
- */
- private void validateCVSEntries(List entries)
- {
- if (entries.isEmpty() || entries == null)
- {
- throw new RuntimeException("Invalid CSV file - empty file");
- }
- if (entries.size() < 2)
- {
- throw new RuntimeException("Invalid CSV file - no entries found");
- }
- for (String[] row : entries)
- {
- if(entries.get(0).length != row.length)
- {
- throw new RuntimeException("Invalid CSV file - inconsistency of columns with header");
- }
- }
- }
- /* @formatter:off
- * Parser reads from all from first row and exclude column from description map.
- * Format of CVS: {source locale},{locale},{locale}...,pos,description OR
- * Format of CVS: {source locale},{locale},{locale}...,description1,description2.....
- */
- private Map setupLocalesMap(List entries, Map descriptionMap)
- {
- Map localeColMap = new HashMap();
- String[] headerRow = entries.get(0);
- for (int row = 0; row < headerRow.length && !descriptionMap.containsKey(row); row++)
- {
- LocaleId locale = getLocaleFromMap(headerRow[row]);
- localeColMap.put(row, locale);
- }
- return localeColMap;
- }
-
- private Map setupDescMap(List entries)
- {
- Map descMap = new HashMap();
- String[] headerRow = entries.get(0);
-
- for (int row = 0; row < headerRow.length; row++)
- {
- for(String optsHeader:getOpts().getCommentCols())
- {
- if(optsHeader.equals(headerRow[row])){
- descMap.put(row,headerRow[row]);
- }
- }
- }
- /*
- * Sort out description map according to the value (header name)
- */
- ValueComparator bvc = new ValueComparator(descMap);
- TreeMap sorted_map = new TreeMap(bvc);
- sorted_map.putAll(descMap);
-
- return sorted_map;
- }
-
- static class ValueComparator implements Comparator {
-
- Map base;
- public ValueComparator(Map base) {
- this.base = base;
- }
-
- public int compare(Integer a, Integer b) {
- String strA = base.get(a);
- String strB = base.get(b);
-
- if (strA == null || strB == null)
- {
- return (strA == null) ? -1 : 1;
- }
-
- return strA.compareTo(strB);
- }
- }
-}
diff --git a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/glossary/push/GlossaryPoReader.java b/client/zanata-client-commands/src/main/java/org/zanata/client/commands/glossary/push/GlossaryPoReader.java
deleted file mode 100644
index 6c8fcbe94a..0000000000
--- a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/glossary/push/GlossaryPoReader.java
+++ /dev/null
@@ -1,191 +0,0 @@
-/*
- * Copyright 2011, Red Hat, Inc. and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.zanata.client.commands.glossary.push;
-
-import java.io.BufferedInputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.net.URL;
-import java.nio.charset.Charset;
-
-import org.apache.commons.lang.StringUtils;
-import org.fedorahosted.tennera.jgettext.Message;
-import org.fedorahosted.tennera.jgettext.catalog.parse.MessageStreamParser;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.xml.sax.InputSource;
-import org.zanata.common.LocaleId;
-import org.zanata.rest.dto.Glossary;
-import org.zanata.rest.dto.GlossaryEntry;
-import org.zanata.rest.dto.GlossaryTerm;
-
-/**
- *
- * @author Alex Eng aeng@redhat.com
- *
- **/
-public class GlossaryPoReader extends AbstractGlossaryPushReader
-{
-
- private static final Logger log = LoggerFactory.getLogger(GlossaryPoReader.class);
-
- @Override
- public Glossary extractGlossary(File glossaryFile) throws IOException
- {
- BufferedInputStream bis = new BufferedInputStream(new FileInputStream(glossaryFile));
- try
- {
- InputSource potInputSource = new InputSource(bis);
- potInputSource.setEncoding("utf8");
- return extractTemplate(potInputSource);
- }
- finally
- {
- bis.close();
- }
- }
-
- private Glossary extractTemplate(InputSource potInputSource)
- {
- MessageStreamParser messageParser = createParser(potInputSource);
-
- LocaleId srcLang = getLocaleFromMap(getOpts().getSourceLang());
- LocaleId targetLang = getLocaleFromMap(getOpts().getTransLang());
-
- Glossary glossary = new Glossary();
-
- while (messageParser.hasNext())
- {
- Message message = messageParser.next();
-
- if (message.isHeader())
- {
- // log.warn("term: [{}] is ignored - message is header",
- // message.getMsgid());
- }
- else if (message.isObsolete())
- {
- // log.warn("term: [{}] is ignored - message obsolete",
- // message.getMsgid());
- }
- else if (message.isPlural())
- {
- // log.warn("term: [{}] is ignored - message is plural",
- // message.getMsgid());
- }
- else if (message.isFuzzy())
- {
- log.warn("term: [{}] is ignored - state fuzzy", message.getMsgid());
- }
- else
- {
- GlossaryEntry entry = new GlossaryEntry();
- entry.setSrcLang(srcLang);
-
- GlossaryTerm srcTerm = new GlossaryTerm();
- srcTerm.setLocale(srcLang);
- srcTerm.setContent(message.getMsgid());
-
- GlossaryTerm targetTerm = new GlossaryTerm();
- targetTerm.setLocale(targetLang);
- targetTerm.setContent(message.getMsgstr());
-
- // Treat all comments and source reference as translation comment
- if (getOpts().getTreatSourceCommentsAsTarget())
- {
- for (String srcRef : message.getSourceReferences())
- {
- targetTerm.getComments().add(srcRef);
- }
-
- for (String comment : message.getExtractedComments())
- {
- targetTerm.getComments().add(comment);
- }
- }
- else
- {
- StringBuilder sb = new StringBuilder();
- if (!StringUtils.isEmpty(entry.getSourcereference()))
- {
- sb.append(entry.getSourcereference());
- }
- if (!StringUtils.isEmpty(StringUtils.join(message.getSourceReferences(), "\n")))
- {
- sb.append(StringUtils.join(message.getSourceReferences(), "\n"));
- }
-
- entry.setSourcereference(sb.toString());
-
- for (String comment : message.getExtractedComments())
- {
- srcTerm.getComments().add(comment);
- }
- }
- for (String comment : message.getComments())
- {
- targetTerm.getComments().add(comment);
- }
-
- entry.getGlossaryTerms().add(srcTerm);
- entry.getGlossaryTerms().add(targetTerm);
-
- glossary.getGlossaryEntries().add(entry);
- }
- }
- return glossary;
- }
-
- static MessageStreamParser createParser(InputSource inputSource)
- {
- MessageStreamParser messageParser;
- if (inputSource.getCharacterStream() != null)
- messageParser = new MessageStreamParser(inputSource.getCharacterStream());
- else if (inputSource.getByteStream() != null)
- {
- if (inputSource.getEncoding() != null)
- messageParser = new MessageStreamParser(inputSource.getByteStream(), Charset.forName(inputSource.getEncoding()));
- else
- messageParser = new MessageStreamParser(inputSource.getByteStream(), Charset.forName("UTF-8"));
- }
- else if (inputSource.getSystemId() != null)
- {
- try
- {
- URL url = new URL(inputSource.getSystemId());
-
- if (inputSource.getEncoding() != null)
- messageParser = new MessageStreamParser(url.openStream(), Charset.forName(inputSource.getEncoding()));
- else
- messageParser = new MessageStreamParser(url.openStream(), Charset.forName("UTF-8"));
- }
- catch (IOException e)
- {
- throw new RuntimeException("failed to get input from url in inputSource", e);
- }
- }
- else
- throw new RuntimeException("not a valid inputSource");
-
- return messageParser;
- }
-}
diff --git a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/glossary/push/GlossaryPushCommand.java b/client/zanata-client-commands/src/main/java/org/zanata/client/commands/glossary/push/GlossaryPushCommand.java
deleted file mode 100644
index 910ea260d7..0000000000
--- a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/glossary/push/GlossaryPushCommand.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Copyright 2011, Red Hat, Inc. and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.zanata.client.commands.glossary.push;
-
-import java.io.File;
-import java.net.URI;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.Marshaller;
-
-import org.apache.commons.io.FilenameUtils;
-import org.apache.commons.lang.StringUtils;
-import org.jboss.resteasy.client.ClientResponse;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.zanata.client.commands.ConfigurableCommand;
-import org.zanata.client.commands.OptionsUtil;
-import org.zanata.rest.client.ClientUtility;
-import org.zanata.rest.client.IGlossaryResource;
-import org.zanata.rest.client.ZanataProxyFactory;
-import org.zanata.rest.dto.Glossary;
-
-/**
- *
- * @author Alex Eng aeng@redhat.com
- *
- **/
-public class GlossaryPushCommand extends ConfigurableCommand
-{
- private static final Logger log = LoggerFactory.getLogger(GlossaryPushCommand.class);
-
- private static final Map glossaryReaders = new HashMap();
-
- private final IGlossaryResource glossaryResource;
- private final URI uri;
-
- {
- glossaryReaders.put("po", new GlossaryPoReader());
- glossaryReaders.put("csv", new GlossaryCSVReader());
- }
-
- public GlossaryPushCommand(GlossaryPushOptions opts, ZanataProxyFactory factory, IGlossaryResource glossaryResource, URI uri)
- {
- super(opts, factory);
- this.glossaryResource = glossaryResource;
- this.uri = uri;
- }
-
- private GlossaryPushCommand(GlossaryPushOptions opts, ZanataProxyFactory factory)
- {
- this(opts, factory, factory.getGlossaryResource(), factory.getGlossaryResourceURI());
- }
-
- public GlossaryPushCommand(GlossaryPushOptions opts)
- {
- this(opts, OptionsUtil.createRequestFactory(opts));
- }
-
- private AbstractGlossaryPushReader getReader(String fileExtension)
- {
- AbstractGlossaryPushReader reader = glossaryReaders.get(fileExtension);
- if (reader == null)
- {
- throw new RuntimeException("unknown file type: " + fileExtension);
- }
- reader.setOpts(getOpts());
- return reader;
- }
-
- private String validateFileExtensionWithTransLang() throws RuntimeException
- {
- String fileExtension = FilenameUtils.getExtension(getOpts().getGlossaryFile().getName());
-
- if (StringUtils.isEmpty(getOpts().getTransLang()))
- {
- if (fileExtension.equals("po"))
- {
- throw new RuntimeException("Option 'zanata.transLang' is required for this file type.");
- }
- }
- return fileExtension;
- }
-
- @Override
- public void run() throws Exception
- {
- log.info("Server: {}", getOpts().getUrl());
- log.info("Username: {}", getOpts().getUsername());
- log.info("Source language: {}", getOpts().getSourceLang());
- log.info("Translation language: {}", getOpts().getTransLang());
- log.info("All translation comment: {}", getOpts().getTreatSourceCommentsAsTarget());
- log.info("Glossary file: {}", getOpts().getGlossaryFile());
-
- File glossaryFile = getOpts().getGlossaryFile();
-
- if (!glossaryFile.exists())
- {
- throw new RuntimeException("File '" + glossaryFile + "' does not exist - check glossaryFile option");
- }
-
- String fileExtension = validateFileExtensionWithTransLang();
-
- AbstractGlossaryPushReader reader = getReader(fileExtension);
-
- JAXBContext jc = null;
- Marshaller m = null;
-
- if (getOpts().isDebugSet())
- {
- jc = JAXBContext.newInstance(Glossary.class);
- }
- if (getOpts().isDebugSet())
- {
- m = jc.createMarshaller();
- m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
- }
-
- log.info("pushing glossary document [{}] to server", glossaryFile.getName());
-
- Glossary glossary = reader.extractGlossary(glossaryFile);
- log.debug(glossary.toString());
- ClientResponse response = glossaryResource.put(glossary);
- ClientUtility.checkResult(response, uri);
- }
-}
-
-
-
\ No newline at end of file
diff --git a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/glossary/push/GlossaryPushOptions.java b/client/zanata-client-commands/src/main/java/org/zanata/client/commands/glossary/push/GlossaryPushOptions.java
deleted file mode 100644
index d166f856ca..0000000000
--- a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/glossary/push/GlossaryPushOptions.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package org.zanata.client.commands.glossary.push;
-
-import java.io.File;
-import java.util.List;
-
-import org.zanata.client.commands.ConfigurableProjectOptions;
-
-public interface GlossaryPushOptions extends ConfigurableProjectOptions
-{
- public File getGlossaryFile();
-
- public String getSourceLang();
-
- public String getTransLang();
-
- public boolean getTreatSourceCommentsAsTarget();
-
- public List getCommentCols();
-}
\ No newline at end of file
diff --git a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/pull/GettextDirStrategy.java b/client/zanata-client-commands/src/main/java/org/zanata/client/commands/pull/GettextDirStrategy.java
deleted file mode 100644
index 8cfb78099e..0000000000
--- a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/pull/GettextDirStrategy.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright 2011, Red Hat, Inc. and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.zanata.client.commands.pull;
-
-import java.io.IOException;
-
-import org.zanata.adapter.po.PoWriter2;
-import org.zanata.client.config.LocaleMapping;
-import org.zanata.rest.StringSet;
-import org.zanata.rest.dto.resource.Resource;
-import org.zanata.rest.dto.resource.TranslationsResource;
-
-/**
- * @author Sean Flanigan sflaniga@redhat.com
- *
- */
-public class GettextDirStrategy implements PullStrategy
-{
- PoWriter2 poWriter = new PoWriter2();
- StringSet extensions = new StringSet("gettext;comment");
- private PullOptions opts;
-
-
- @Override
- public void setPullOptions(PullOptions opts)
- {
- this.opts = opts;
- }
-
- @Override
- public StringSet getExtensions()
- {
- return extensions;
- }
-
- @Override
- public boolean needsDocToWriteTrans()
- {
- return true;
- }
-
- @Override
- public void writeSrcFile(Resource doc) throws IOException
- {
- poWriter.writePotToDir(opts.getSrcDir(), doc);
- }
-
- @Override
- public void writeTransFile(Resource doc, String docName, LocaleMapping locMapping, TranslationsResource targetDoc) throws IOException
- {
- String localeDir = locMapping.getLocalLocale();
- poWriter.writePo(opts.getTransDir(), doc, localeDir, targetDoc);
- }
-
-}
diff --git a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/pull/PropertiesStrategy.java b/client/zanata-client-commands/src/main/java/org/zanata/client/commands/pull/PropertiesStrategy.java
deleted file mode 100644
index d30fb53163..0000000000
--- a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/pull/PropertiesStrategy.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright 2011, Red Hat, Inc. and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.zanata.client.commands.pull;
-
-import java.io.IOException;
-
-import org.zanata.adapter.properties.PropWriter;
-import org.zanata.client.config.LocaleMapping;
-import org.zanata.rest.StringSet;
-import org.zanata.rest.dto.resource.Resource;
-import org.zanata.rest.dto.resource.TranslationsResource;
-
-/**
- * @author Sean Flanigan sflaniga@redhat.com
- *
- */
-public class PropertiesStrategy implements PullStrategy
-{
- StringSet extensions = new StringSet("comment");
- private PullOptions opts;
-
- @Override
- public void setPullOptions(PullOptions opts)
- {
- this.opts = opts;
- }
-
- @Override
- public StringSet getExtensions()
- {
- return extensions;
- }
-
- @Override
- public boolean needsDocToWriteTrans()
- {
- return false;
- }
-
- @Override
- public void writeSrcFile(Resource doc) throws IOException
- {
- PropWriter.write(doc, opts.getSrcDir());
- }
-
- @Override
- public void writeTransFile(Resource doc, String docName, LocaleMapping localeMapping, TranslationsResource targetDoc) throws IOException
- {
- PropWriter.write(targetDoc, opts.getTransDir(), docName, localeMapping.getJavaLocale());
- }
-
-}
diff --git a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/pull/PullCommand.java b/client/zanata-client-commands/src/main/java/org/zanata/client/commands/pull/PullCommand.java
deleted file mode 100644
index fe7e142109..0000000000
--- a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/pull/PullCommand.java
+++ /dev/null
@@ -1,208 +0,0 @@
-package org.zanata.client.commands.pull;
-
-import java.io.Console;
-import java.io.IOException;
-import java.io.StringWriter;
-import java.net.URI;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.ws.rs.core.Response;
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Marshaller;
-
-import org.jboss.resteasy.client.ClientResponse;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.zanata.client.commands.ConfigurableProjectCommand;
-import org.zanata.client.commands.OptionsUtil;
-import org.zanata.client.config.LocaleList;
-import org.zanata.client.config.LocaleMapping;
-import org.zanata.client.exceptions.ConfigException;
-import org.zanata.common.LocaleId;
-import org.zanata.rest.RestUtil;
-import org.zanata.rest.client.ClientUtility;
-import org.zanata.rest.client.ITranslationResources;
-import org.zanata.rest.client.ZanataProxyFactory;
-import org.zanata.rest.dto.resource.Resource;
-import org.zanata.rest.dto.resource.ResourceMeta;
-import org.zanata.rest.dto.resource.TranslationsResource;
-
-/**
- * @author Sean Flanigan sflaniga@redhat.com
- *
- */
-public class PullCommand extends ConfigurableProjectCommand
-{
- private static final Logger log = LoggerFactory.getLogger(PullCommand.class);
-
- private static final Map strategies = new HashMap();
-
- {
- strategies.put(PROJECT_TYPE_PROPERTIES, new PropertiesStrategy());
- strategies.put(PROJECT_TYPE_PUBLICAN, new GettextDirStrategy());
- strategies.put(PROJECT_TYPE_XLIFF, new XliffStrategy());
- strategies.put(PROJECT_TYPE_XML, new XmlStrategy());
- }
-
- Marshaller m = null;
-
- private final ITranslationResources translationResources;
- private final URI uri;
-
- public PullCommand(PullOptions opts, ZanataProxyFactory factory, ITranslationResources translationResources, URI uri)
- {
- super(opts, factory);
- this.translationResources = translationResources;
- this.uri = uri;
- }
-
- private PullCommand(PullOptions opts, ZanataProxyFactory factory)
- {
- this(opts, factory, factory.getTranslationResources(opts.getProj(), opts.getProjectVersion()), factory.getTranslationResourcesURI(opts.getProj(), opts.getProjectVersion()));
- }
-
- public PullCommand(PullOptions opts)
- {
- this(opts, OptionsUtil.createRequestFactory(opts));
- }
-
- private PullStrategy getStrategy(String strategyType)
- {
- PullStrategy strat = strategies.get(strategyType);
- if (strat == null)
- {
- throw new RuntimeException("unknown project type: " + getOpts().getProjectType());
- }
- strat.setPullOptions(getOpts());
- return strat;
- }
-
- @Override
- public void run() throws Exception
- {
- log.info("Server: {}", getOpts().getUrl());
- log.info("Project: {}", getOpts().getProj());
- log.info("Version: {}", getOpts().getProjectVersion());
- log.info("Username: {}", getOpts().getUsername());
- if (getOpts().getPullSrc())
- {
- log.info("Pulling source and target (translation) documents");
- log.info("Source-language directory (originals): {}", getOpts().getSrcDir());
- }
- else
- {
- log.info("Pulling target documents (translations) only");
- }
- log.info("Target-language base directory (translations): {}", getOpts().getTransDir());
-
- if (getOpts().getPullSrc())
- {
- log.warn("pullSrc option is set: existing source-language files may be overwritten/deleted");
- confirmWithUser("This will overwrite/delete any existing documents and translations in the above directories.\n");
- }
- else
- {
- confirmWithUser("This will overwrite/delete any existing translations in the above directory.\n");
- }
- PullStrategy strat = getStrategy(getOpts().getProjectType());
-
- JAXBContext jc = null;
- if (getOpts().isDebugSet()) // || opts.getValidate())
- {
- jc = JAXBContext.newInstance(Resource.class, TranslationsResource.class);
- }
- if (getOpts().isDebugSet())
- {
- m = jc.createMarshaller();
- m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
- }
-
- LocaleList locales = getOpts().getLocales();
- if (locales == null)
- throw new ConfigException("no locales specified");
-
- ClientResponse> listResponse = translationResources.get(null);
- ClientUtility.checkResult(listResponse, uri);
- List resourceMetaList = listResponse.getEntity();
- for (ResourceMeta resourceMeta : resourceMetaList)
- {
- Resource doc = null;
- String docName = resourceMeta.getName();
- // TODO follow a Link
- String docUri = RestUtil.convertToDocumentURIId(docName);
- if (strat.needsDocToWriteTrans() || getOpts().getPullSrc())
- {
- ClientResponse resourceResponse = translationResources.getResource(docUri, strat.getExtensions());
- ClientUtility.checkResult(resourceResponse, uri);
- doc = resourceResponse.getEntity();
- }
- if (getOpts().getPullSrc())
- {
- log.info("writing source file for document {}", docName);
- strat.writeSrcFile(doc);
- }
-
- for (LocaleMapping locMapping : locales)
- {
- LocaleId locale = new LocaleId(locMapping.getLocale());
-
- ClientResponse transResponse = translationResources.getTranslations(docUri, locale, strat.getExtensions());
- // ignore 404 (no translation yet for specified document)
- if (transResponse.getResponseStatus() == Response.Status.NOT_FOUND)
- {
- log.info("no translations found in locale {} for document {}", locale, docName);
- continue;
- }
- ClientUtility.checkResult(transResponse, uri);
- TranslationsResource targetDoc = transResponse.getEntity();
-
- log.info("writing translation file in locale {} for document {}", locMapping.getLocalLocale(), docName);
- strat.writeTransFile(doc, docName, locMapping, targetDoc);
- }
- }
-
- }
-
- private void confirmWithUser(String message) throws IOException
- {
- if (getOpts().isInteractiveMode())
- {
- Console console = System.console();
- if (console == null)
- throw new RuntimeException("console not available: please run Maven from a console, or use batch mode (mvn -B)");
- console.printf(message + "\nAre you sure (y/n)? ");
- expectYes(console);
- }
- }
-
- protected static void expectYes(Console console) throws IOException
- {
- String line = console.readLine();
- if (line == null)
- throw new IOException("console stream closed");
- if (!line.toLowerCase().equals("y") && !line.toLowerCase().equals("yes"))
- throw new RuntimeException("operation aborted by user");
- }
-
- protected void debug(Object jaxbElement)
- {
- try
- {
- if (getOpts().isDebugSet())
- {
- StringWriter writer = new StringWriter();
- m.marshal(jaxbElement, writer);
- log.debug("{}", writer);
- }
- }
- catch (JAXBException e)
- {
- log.debug(e.toString(), e);
- }
- }
-
-}
diff --git a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/pull/PullOptions.java b/client/zanata-client-commands/src/main/java/org/zanata/client/commands/pull/PullOptions.java
deleted file mode 100644
index fe84535b61..0000000000
--- a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/pull/PullOptions.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright 2011, Red Hat, Inc. and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.zanata.client.commands.pull;
-
-import java.io.File;
-
-import org.zanata.client.commands.ConfigurableProjectOptions;
-
-/**
- * @author Sean Flanigan sflaniga@redhat.com
- *
- */
-public interface PullOptions extends ConfigurableProjectOptions
-{
- File getSrcDir();
- File getTransDir();
- boolean getPullSrc();
-}
diff --git a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/pull/PullStrategy.java b/client/zanata-client-commands/src/main/java/org/zanata/client/commands/pull/PullStrategy.java
deleted file mode 100644
index 86a2f03cd6..0000000000
--- a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/pull/PullStrategy.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package org.zanata.client.commands.pull;
-
-import java.io.IOException;
-
-import org.zanata.client.config.LocaleMapping;
-import org.zanata.rest.StringSet;
-import org.zanata.rest.dto.resource.Resource;
-import org.zanata.rest.dto.resource.TranslationsResource;
-
-public interface PullStrategy
-{
- void setPullOptions(PullOptions opts);
- StringSet getExtensions();
-
- boolean needsDocToWriteTrans();
-
- /**
- * @param doc
- * @throws IOException
- */
- void writeSrcFile(Resource doc) throws IOException;
-
- /**
- * @param doc may be null if needsDocToWriteTrans() returns false
- * @param docName
- * @param localeMapping
- * @param targetDoc
- * @throws IOException
- */
- void writeTransFile(Resource doc, String docName, LocaleMapping localeMapping, TranslationsResource targetDoc) throws IOException;
-}
diff --git a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/pull/XliffStrategy.java b/client/zanata-client-commands/src/main/java/org/zanata/client/commands/pull/XliffStrategy.java
deleted file mode 100644
index 7bdf991b9d..0000000000
--- a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/pull/XliffStrategy.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright 2011, Red Hat, Inc. and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.zanata.client.commands.pull;
-
-import java.io.IOException;
-
-import org.zanata.adapter.xliff.XliffWriter;
-import org.zanata.client.config.LocaleMapping;
-import org.zanata.rest.StringSet;
-import org.zanata.rest.dto.resource.Resource;
-import org.zanata.rest.dto.resource.TranslationsResource;
-
-/**
- * @author Sean Flanigan sflaniga@redhat.com
- *
- */
-public class XliffStrategy implements PullStrategy
-{
- StringSet extensions = new StringSet("comment");
- private PullOptions opts;
-
- @Override
- public void setPullOptions(PullOptions opts)
- {
- this.opts = opts;
- }
-
- @Override
- public StringSet getExtensions()
- {
- return extensions;
- }
-
- @Override
- public boolean needsDocToWriteTrans()
- {
- return true;
- }
-
- @Override
- public void writeSrcFile(Resource doc) throws IOException
- {
- XliffWriter.write(opts.getSrcDir(), doc, "en_US");
- }
-
- @Override
- public void writeTransFile(Resource doc, String docName, LocaleMapping localeMapping, TranslationsResource targetDoc) throws IOException
- {
- XliffWriter.write(opts.getTransDir(), doc, localeMapping.getJavaLocale(), targetDoc);
- }
-
-}
diff --git a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/pull/XmlStrategy.java b/client/zanata-client-commands/src/main/java/org/zanata/client/commands/pull/XmlStrategy.java
deleted file mode 100644
index af33a962e0..0000000000
--- a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/pull/XmlStrategy.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * Copyright 2011, Red Hat, Inc. and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.zanata.client.commands.pull;
-
-import java.io.File;
-import java.io.IOException;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Marshaller;
-
-import org.zanata.client.config.LocaleMapping;
-import org.zanata.rest.StringSet;
-import org.zanata.rest.dto.resource.Resource;
-import org.zanata.rest.dto.resource.TranslationsResource;
-import org.zanata.util.PathUtil;
-
-/**
- * @author Sean Flanigan sflaniga@redhat.com
- *
- */
-public class XmlStrategy implements PullStrategy
-{
- private JAXBContext jaxbContext;
- private Marshaller marshaller;
- private PullOptions pullOptions;
- StringSet extensions = new StringSet("comment;gettext");
-
- public XmlStrategy()
- {
- try
- {
- jaxbContext = JAXBContext.newInstance(Resource.class, TranslationsResource.class);
- marshaller = jaxbContext.createMarshaller();
- marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
- }
- catch (JAXBException e)
- {
- throw new RuntimeException(e);
- }
- }
-
- @Override
- public void setPullOptions(PullOptions opts)
- {
- this.pullOptions = opts;
- }
-
- @Override
- public boolean needsDocToWriteTrans()
- {
- return false;
- }
-
- private String docNameToFilename(String docName)
- {
- return docName + ".xml";
- }
-
- private String docNameToFilename(String docName, LocaleMapping locale)
- {
- return docName + "_" + locale.getJavaLocale() + ".xml";
- }
-
- @Override
- public void writeSrcFile(Resource doc) throws IOException
- {
- try
- {
- String filename = docNameToFilename(doc.getName());
- File srcFile = new File(pullOptions.getSrcDir(), filename);
- PathUtil.makeParents(srcFile);
- marshaller.marshal(doc, srcFile);
- }
- catch (JAXBException e)
- {
- throw new IOException(e);
- }
- }
-
- @Override
- public void writeTransFile(Resource doc, String docName, LocaleMapping locale, TranslationsResource targetDoc) throws IOException
- {
- try
- {
- String filename = docNameToFilename(docName, locale);
- File transFile = new File(pullOptions.getTransDir(), filename);
- PathUtil.makeParents(transFile);
- marshaller.marshal(targetDoc, transFile);
- }
- catch (JAXBException e)
- {
- throw new IOException(e);
- }
- }
-
- @Override
- public StringSet getExtensions()
- {
- return extensions;
- }
-}
diff --git a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/push/AbstractPushStrategy.java b/client/zanata-client-commands/src/main/java/org/zanata/client/commands/push/AbstractPushStrategy.java
deleted file mode 100644
index 6fa4d70b34..0000000000
--- a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/push/AbstractPushStrategy.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Copyright 2011, Red Hat, Inc. and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.zanata.client.commands.push;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.List;
-import java.util.Set;
-
-import org.apache.tools.ant.DirectoryScanner;
-import org.zanata.client.commands.push.PushCommand.TranslationResourcesVisitor;
-import org.zanata.client.config.LocaleMapping;
-import org.zanata.rest.StringSet;
-import org.zanata.rest.dto.resource.Resource;
-
-/**
- *
- * @author Alex Eng aeng@redhat.com
- *
- **/
-public abstract class AbstractPushStrategy
-{
- private PushOptions opts;
- private StringSet extensions;
- private String fileExtension;
-
- public abstract Set findDocNames(File srcDir, List includes, List excludes, boolean includeDefaultExclude) throws IOException;
-
- public abstract Resource loadSrcDoc(File sourceDir, String docName) throws IOException;
-
- public abstract void visitTranslationResources(String docName, Resource srcDoc, TranslationResourcesVisitor visitor) throws IOException;
-
- public AbstractPushStrategy(StringSet extensions, String fileExtension)
- {
- this.extensions = extensions;
- this.fileExtension = fileExtension;
- }
-
- public String[] getSrcFiles(File srcDir, List includes, List excludes, boolean excludeLocalFileName, boolean includeDefaultExclude)
- {
- if (includes.isEmpty())
- {
- includes.add("**/*" + fileExtension);
- }
-
- if (excludeLocalFileName)
- {
- excludeLocaleFileName(excludes);
- }
-
- DirectoryScanner dirScanner = new DirectoryScanner();
-
- if (includeDefaultExclude)
- {
- dirScanner.addDefaultExcludes();
- }
-
- dirScanner.setBasedir(srcDir);
- dirScanner.setCaseSensitive(false);
- dirScanner.setExcludes((String[]) excludes.toArray(new String[excludes.size()]));
- dirScanner.setIncludes((String[]) includes.toArray(new String[includes.size()]));
- dirScanner.scan();
- return dirScanner.getIncludedFiles();
- }
-
- private void excludeLocaleFileName(List excludes)
- {
- for (LocaleMapping locMap : opts.getLocales())
- {
- String loc = locMap.getJavaLocale().toLowerCase();
- excludes.add("**/*_" + loc + fileExtension);
- }
- }
-
- protected String docNameToFilename(String docName)
- {
- return docName + fileExtension;
- }
-
- protected String docNameToFilename(String docName, LocaleMapping locale)
- {
- return docName + "_" + locale.getJavaLocale() + fileExtension;
- }
-
- public void setPushOptions(PushOptions opts)
- {
- this.opts = opts;
- }
-
- public StringSet getExtensions()
- {
- return extensions;
- }
-
- public String getFileExtension()
- {
- return fileExtension;
- }
-
- public PushOptions getOpts()
- {
- return opts;
- }
-
-}
-
-
-
\ No newline at end of file
diff --git a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/push/GettextDirStrategy.java b/client/zanata-client-commands/src/main/java/org/zanata/client/commands/push/GettextDirStrategy.java
deleted file mode 100644
index 2aa7bb422c..0000000000
--- a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/push/GettextDirStrategy.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * Copyright 2011, Red Hat, Inc. and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.zanata.client.commands.push;
-
-import java.io.BufferedInputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.apache.commons.io.FilenameUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.xml.sax.InputSource;
-import org.zanata.adapter.po.PoReader2;
-import org.zanata.client.commands.gettext.PublicanUtil;
-import org.zanata.client.commands.push.PushCommand.TranslationResourcesVisitor;
-import org.zanata.client.config.LocaleMapping;
-import org.zanata.common.LocaleId;
-import org.zanata.rest.StringSet;
-import org.zanata.rest.dto.resource.Resource;
-import org.zanata.rest.dto.resource.TranslationsResource;
-
-class GettextDirStrategy extends AbstractPushStrategy
-{
- private static final Logger log = LoggerFactory.getLogger(GettextDirStrategy.class);
-
- PoReader2 poReader = new PoReader2();
- List locales;
-
- public GettextDirStrategy()
- {
- super(new StringSet("comment;gettext"), ".pot");
- }
-
- public Set findDocNames(File srcDir, List includes, List excludes, boolean includeDefaultExclude) throws IOException
- {
- Set localDocNames = new HashSet();
-
- // populate localDocNames by looking in pot directory
- String[] srcFiles = getSrcFiles(srcDir, includes, excludes, false, includeDefaultExclude);
-
- for (String potName : srcFiles)
- {
- String docName = FilenameUtils.removeExtension(potName);
- localDocNames.add(docName);
- }
- return localDocNames;
- }
-
- @Override
- public Resource loadSrcDoc(File sourceDir, String docName) throws IOException
- {
- File srcFile = new File(sourceDir, docName + getFileExtension());
- BufferedInputStream bis = new BufferedInputStream(new FileInputStream(srcFile));
- try
- {
- InputSource potInputSource = new InputSource(bis);
- potInputSource.setEncoding("utf8");
- // load 'srcDoc' from pot/${docID}.pot
- return poReader.extractTemplate(potInputSource, new LocaleId(getOpts().getSourceLang()), docName);
- }
- finally
- {
- bis.close();
- }
- }
-
- private List findLocales()
- {
- if (locales != null)
- return locales;
- if (getOpts().getPushTrans())
- {
- if (getOpts().getLocales() != null)
- {
- locales = PublicanUtil.findLocales(getOpts().getTransDir(), getOpts().getLocales());
- if (locales.size() == 0)
- {
- log.warn("option 'pushTrans' is set, but none of the configured locale directories was found (check zanata.xml)");
- }
- }
- else
- {
- locales = PublicanUtil.findLocales(getOpts().getTransDir());
- if (locales.size() == 0)
- {
- log.warn("option 'pushTrans' is set, but no locale directories were found");
- }
- else
- {
- log.info("option 'pushTrans' is set, but no locales specified in configuration: importing " + locales.size() + " directories");
- }
- }
- }
- return locales;
- }
-
- @Override
- public void visitTranslationResources(String docName, Resource srcDoc, TranslationResourcesVisitor callback) throws IOException
- {
- for (LocaleMapping locale : findLocales())
- {
- File localeDir = new File(getOpts().getTransDir(), locale.getLocalLocale());
- File transFile = new File(localeDir, docName + ".po");
- if (transFile.canRead())
- {
- BufferedInputStream bis = new BufferedInputStream(new FileInputStream(transFile));
- try
- {
- InputSource inputSource = new InputSource(bis);
- inputSource.setEncoding("utf8");
- TranslationsResource targetDoc = poReader.extractTarget(inputSource, srcDoc, getOpts().getUseSrcOrder());
- callback.visit(locale, targetDoc);
- }
- finally
- {
- bis.close();
- }
- }
- }
- }
-}
\ No newline at end of file
diff --git a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/push/PropertiesStrategy.java b/client/zanata-client-commands/src/main/java/org/zanata/client/commands/push/PropertiesStrategy.java
deleted file mode 100644
index 0dfeb33939..0000000000
--- a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/push/PropertiesStrategy.java
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
- * Copyright 2011, Red Hat, Inc. and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.zanata.client.commands.push;
-
-import java.io.BufferedInputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.apache.commons.io.FilenameUtils;
-import org.fedorahosted.openprops.Properties;
-import org.zanata.client.commands.push.PushCommand.TranslationResourcesVisitor;
-import org.zanata.client.config.LocaleMapping;
-import org.zanata.common.ContentState;
-import org.zanata.common.LocaleId;
-import org.zanata.rest.StringSet;
-import org.zanata.rest.dto.extensions.comment.SimpleComment;
-import org.zanata.rest.dto.resource.Resource;
-import org.zanata.rest.dto.resource.TextFlow;
-import org.zanata.rest.dto.resource.TextFlowTarget;
-import org.zanata.rest.dto.resource.TranslationsResource;
-
-class PropertiesStrategy extends AbstractPushStrategy
-{
- public PropertiesStrategy()
- {
- super(new StringSet("comment"), ".properties");
- }
-
- @Override
- public Set findDocNames(File srcDir, List includes, List excludes, boolean includeDefaultExclude) throws IOException
- {
- Set localDocNames = new HashSet();
-
- String[] files = getSrcFiles(srcDir, includes, excludes, true, includeDefaultExclude);
-
- for (String relativeFilePath : files)
- {
- String baseName = FilenameUtils.removeExtension(relativeFilePath);
- localDocNames.add(baseName);
- }
- return localDocNames;
- }
-
- private Properties loadPropFile(File propFile) throws FileNotFoundException, IOException
- {
- InputStream is = new BufferedInputStream(new FileInputStream(propFile));
- try
- {
- Properties props = new Properties();
- props.load(is);
- return props;
- }
- finally
- {
- is.close();
- }
- }
-
- private Resource loadResource(String docName, File propFile) throws IOException
- {
- // TODO consider using PropReader
- Resource doc = new Resource(docName);
- // doc.setContentType(contentType);
- Properties props = loadPropFile(propFile);
- for (String key : props.keySet())
- {
- TextFlow textflow = propEntryToTextFlow(props, key);
- doc.getTextFlows().add(textflow);
- }
- return doc;
- }
-
- private TextFlow propEntryToTextFlow(Properties props, String key)
- {
- String content = props.getProperty(key);
- LocaleId sourceLoc = new LocaleId(getOpts().getSourceLang());
- TextFlow textflow = new TextFlow(key, sourceLoc, content);
- String comment = props.getComment(key);
- if (comment != null)
- {
- SimpleComment simpleComment = new SimpleComment(comment);
- textflow.getExtensions(true).add(simpleComment);
- }
- return textflow;
- }
-
- @Override
- public Resource loadSrcDoc(File sourceDir, String docName) throws IOException
- {
- String filename = docNameToFilename(docName);
- File propFile = new File(sourceDir, filename);
- return loadResource(docName, propFile);
- }
-
- private TranslationsResource loadTranslationsResource(Resource srcDoc, File transFile, boolean useSourceOrder) throws IOException
- {
- // TODO consider using PropReader
- TranslationsResource targetDoc = new TranslationsResource();
- Properties props = loadPropFile(transFile);
- if (getOpts().getUseSrcOrder())
- {
- for (TextFlow tf : srcDoc.getTextFlows())
- {
- String key = tf.getId();
- addPropEntryToDoc(targetDoc, props, key);
- }
- }
- else
- {
- for (String key : props.keySet())
- {
- addPropEntryToDoc(targetDoc, props, key);
- }
- }
- return targetDoc;
- }
-
- private void addPropEntryToDoc(TranslationsResource targetDoc, Properties props, String key)
- {
- String content = props.getProperty(key);
- if (content == null)
- return;
- TextFlowTarget textFlowTarget = new TextFlowTarget(key);
- textFlowTarget.setContent(content);
- textFlowTarget.setState(ContentState.Approved);
- String comment = props.getComment(key);
- if (comment != null)
- {
- SimpleComment simpleComment = new SimpleComment(comment);
- textFlowTarget.getExtensions(true).add(simpleComment);
- }
- targetDoc.getTextFlowTargets().add(textFlowTarget);
- }
-
- @Override
- public void visitTranslationResources(String docName, Resource srcDoc, TranslationResourcesVisitor callback) throws IOException
- {
- for (LocaleMapping locale : getOpts().getLocales())
- {
- String filename = docNameToFilename(docName, locale);
- File transFile = new File(getOpts().getTransDir(), filename);
- if (transFile.exists())
- {
- TranslationsResource targetDoc = loadTranslationsResource(srcDoc, transFile, getOpts().getUseSrcOrder());
- callback.visit(locale, targetDoc);
- }
- else
- {
- // no translation found in 'locale' for current doc
- }
- }
- }
-}
diff --git a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/push/PushCommand.java b/client/zanata-client-commands/src/main/java/org/zanata/client/commands/push/PushCommand.java
deleted file mode 100644
index 5e2e20f2b9..0000000000
--- a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/push/PushCommand.java
+++ /dev/null
@@ -1,279 +0,0 @@
-package org.zanata.client.commands.push;
-
-import java.io.Console;
-import java.io.File;
-import java.io.IOException;
-import java.io.StringWriter;
-import java.net.URI;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Marshaller;
-
-import org.jboss.resteasy.client.ClientResponse;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.zanata.client.commands.ConfigurableProjectCommand;
-import org.zanata.client.commands.OptionsUtil;
-import org.zanata.client.config.LocaleMapping;
-import org.zanata.client.exceptions.ConfigException;
-import org.zanata.common.LocaleId;
-import org.zanata.rest.RestUtil;
-import org.zanata.rest.StringSet;
-import org.zanata.rest.client.ClientUtility;
-import org.zanata.rest.client.ITranslationResources;
-import org.zanata.rest.client.ZanataProxyFactory;
-import org.zanata.rest.dto.resource.Resource;
-import org.zanata.rest.dto.resource.ResourceMeta;
-import org.zanata.rest.dto.resource.TranslationsResource;
-
-/**
- * @author Sean Flanigan sflaniga@redhat.com
- *
- */
-public class PushCommand extends ConfigurableProjectCommand
-{
- private static final Logger log = LoggerFactory.getLogger(PushCommand.class);
-
- private static final Map strategies = new HashMap();
-
- public static interface TranslationResourcesVisitor
- {
- void visit(LocaleMapping locale, TranslationsResource targetDoc);
- }
-
- {
- strategies.put(PROJECT_TYPE_PROPERTIES, new PropertiesStrategy());
- strategies.put(PROJECT_TYPE_PUBLICAN, new GettextDirStrategy());
- strategies.put(PROJECT_TYPE_XLIFF, new XliffStrategy());
- strategies.put(PROJECT_TYPE_XML, new XmlStrategy());
- }
-
- Marshaller m = null;
-
- private final ITranslationResources translationResources;
- private final URI uri;
-
- public PushCommand(PushOptions opts, ZanataProxyFactory factory, ITranslationResources translationResources, URI uri)
- {
- super(opts, factory);
- this.translationResources = translationResources;
- this.uri = uri;
- }
-
- private PushCommand(PushOptions opts, ZanataProxyFactory factory)
- {
- this(opts, factory, factory.getTranslationResources(opts.getProj(), opts.getProjectVersion()), factory.getTranslationResourcesURI(opts.getProj(), opts.getProjectVersion()));
- }
-
- public PushCommand(PushOptions opts)
- {
- this(opts, OptionsUtil.createRequestFactory(opts));
- }
-
- private AbstractPushStrategy getStrategy(String strategyType)
- {
- AbstractPushStrategy strat = strategies.get(strategyType);
- if (strat == null)
- {
- throw new RuntimeException("unknown project type: " + getOpts().getProjectType());
- }
- strat.setPushOptions(getOpts());
- return strat;
- }
-
- @Override
- public void run() throws Exception
- {
- log.info("Server: {}", getOpts().getUrl());
- log.info("Project: {}", getOpts().getProj());
- log.info("Version: {}", getOpts().getProjectVersion());
- log.info("Username: {}", getOpts().getUsername());
- log.info("Project type: {}", getOpts().getProjectType());
- log.info("Source language: {}", getOpts().getSourceLang());
- log.info("Copy previous translations: {}", getOpts().getCopyTrans());
- log.info("Merge type: {}", getOpts().getMergeType());
-
- if (!getOpts().getIncludes().isEmpty())
- {
- StringBuilder sb = new StringBuilder();
- for (String pattern : getOpts().getIncludes())
- {
- sb.append(pattern);
- sb.append(" ");
- }
- log.info("Include patterns: {}", sb.toString());
- }
-
- if (!getOpts().getExcludes().isEmpty())
- {
- StringBuilder sb = new StringBuilder();
- for(String pattern:getOpts().getExcludes())
- {
- sb.append(pattern);
- sb.append(" ");
- }
- log.info("Exclude patterns: {}", sb.toString());
- }
- log.info("Default exclude: {}", getOpts().getDefaultExcludes());
-
- if (getOpts().getPushTrans())
- {
- log.info("Pushing source and target documents");
- }
- else
- {
- log.info("Pushing source documents only");
- }
- log.info("Source directory (originals): {}", getOpts().getSrcDir());
- if (getOpts().getPushTrans())
- {
- log.info("Target base directory (translations): {}", getOpts().getTransDir());
- }
- File sourceDir = getOpts().getSrcDir();
-
- if (!sourceDir.exists())
- {
- throw new RuntimeException("directory '" + sourceDir + "' does not exist - check sourceDir option");
- }
-
- if (getOpts().getPushTrans())
- {
- if (getOpts().getLocales() == null)
- throw new ConfigException("pushTrans option set, but zanata.xml contains no ");
- log.warn("pushTrans option is set: existing translations on server may be overwritten/deleted");
- confirmWithUser("This will overwrite/delete any existing documents AND TRANSLATIONS on the server.\n");
- }
- else
- {
- confirmWithUser("This will overwrite/delete any existing documents on the server.\n");
- }
-
- AbstractPushStrategy strat = getStrategy(getOpts().getProjectType());
-
- JAXBContext jc = null;
- if (getOpts().isDebugSet()) // || opts.getValidate())
- {
- jc = JAXBContext.newInstance(Resource.class, TranslationsResource.class);
- }
- if (getOpts().isDebugSet())
- {
- m = jc.createMarshaller();
- m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
- }
-
- // NB we don't load all the docs into a HashMap, because that would waste
- // memory
-
- Set localDocNames = strat.findDocNames(sourceDir, getOpts().getIncludes(), getOpts().getExcludes(), getOpts().getDefaultExcludes());
- for (String docName : localDocNames)
- {
- log.info("Source file to be uploaded: {}", docName);
- }
- deleteObsoleteDocsFromServer(localDocNames);
-
- for (String docName : localDocNames)
- {
- final String docUri = RestUtil.convertToDocumentURIId(docName);
- final Resource srcDoc = strat.loadSrcDoc(sourceDir, docName);
- debug(srcDoc);
- // if (opts.getValidate())
- // {
- // JaxbUtil.validateXml(srcDoc, jc);
- // }
-
- final StringSet extensions = strat.getExtensions();
- log.info("pushing source document [name={}] to server", srcDoc.getName());
- boolean copyTrans = getOpts().getCopyTrans();
- ClientResponse putResponse = translationResources.putResource(docUri, srcDoc, extensions, copyTrans);
- ClientUtility.checkResult(putResponse, uri);
-
- if (getOpts().getPushTrans())
- {
- strat.visitTranslationResources(docName, srcDoc, new TranslationResourcesVisitor()
- {
- @Override
- public void visit(LocaleMapping locale, TranslationsResource targetDoc)
- {
- debug(targetDoc);
- // if (opts.getValidate())
- // {
- // JaxbUtil.validateXml(targetDoc, jc);
- // }
- log.info("pushing target document [name={} client-locale={}] to server [locale={}]", new Object[] { srcDoc.getName(), locale.getLocalLocale(), locale.getLocale() });
- ClientResponse putTransResponse = translationResources.putTranslations(docUri, new LocaleId(locale.getLocale()), targetDoc, extensions, getOpts().getMergeType());
- ClientUtility.checkResult(putTransResponse, uri);
- String entity = putTransResponse.getEntity(String.class);
- if (entity != null && !entity.isEmpty())
- {
- log.warn("{}", entity);
- }
- }
- });
- }
- }
- }
-
- protected void deleteObsoleteDocsFromServer(Set localDocNames)
- {
- ClientResponse> getResponse = translationResources.get(null);
- ClientUtility.checkResult(getResponse, uri);
- List remoteDocList = getResponse.getEntity();
- for (ResourceMeta doc : remoteDocList)
- {
- // NB ResourceMeta.name = HDocument.docId
- String docName = doc.getName();
- String docUri = RestUtil.convertToDocumentURIId(docName);
- if (!localDocNames.contains(docName))
- {
- log.info("deleting resource {} from server", docName);
- ClientResponse deleteResponse = translationResources.deleteResource(docUri);
- ClientUtility.checkResult(deleteResponse, uri);
- }
- }
- }
-
- private void confirmWithUser(String message) throws IOException
- {
- if (getOpts().isInteractiveMode())
- {
- Console console = System.console();
- if (console == null)
- throw new RuntimeException("console not available: please run Maven from a console, or use batch mode (mvn -B)");
- console.printf(message + "\nAre you sure (y/n)? ");
- expectYes(console);
- }
- }
-
- protected static void expectYes(Console console) throws IOException
- {
- String line = console.readLine();
- if (line == null)
- throw new IOException("console stream closed");
- if (!line.toLowerCase().equals("y") && !line.toLowerCase().equals("yes"))
- throw new RuntimeException("operation aborted by user");
- }
-
- protected void debug(Object jaxbElement)
- {
- try
- {
- if (getOpts().isDebugSet())
- {
- StringWriter writer = new StringWriter();
- m.marshal(jaxbElement, writer);
- log.debug("{}", writer);
- }
- }
- catch (JAXBException e)
- {
- log.debug(e.toString(), e);
- }
- }
-
-}
diff --git a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/push/PushOptions.java b/client/zanata-client-commands/src/main/java/org/zanata/client/commands/push/PushOptions.java
deleted file mode 100644
index 2a2aecb6c3..0000000000
--- a/client/zanata-client-commands/src/main/java/org/zanata/client/commands/push/PushOptions.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package org.zanata.client.commands.push;
-
-import java.io.File;
-import java.util.List;
-
-import org.zanata.client.commands.ConfigurableProjectOptions;
-
-public interface PushOptions extends ConfigurableProjectOptions
-{
- public String getSourceLang();
- public File getSrcDir();
- public File getTransDir();
- public boolean getPushTrans();
- public boolean getCopyTrans();
- public boolean getUseSrcOrder();
- public String getMergeType();
-
- public List