Red Hat Bugzilla – Bug 820048
RFE: Maven client should print helpful messages when translation files do not exist
Last modified: 2015-08-06 01:54:26 EDT
Description of problem:
supposed project file structure is set as below:
if users didn't specify srcdir option when pushing translation files using maven tool, maven should give a warning or helpful message to let users know what exactly file that maven needs in order to successfully push po files
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1.create a project name "AboutFedora" and a project version "master"
2.open a terminal:mvn -B zanata:push -Dzanata.pushTrans
failed to push translation files(po files) to server but no warning was given. Though, source is pushed successfully.
a warning should state no translation is pushed because failed to find <filename>.
Request for technical evalutaion.
To avoid having too many warnings, we should probably only generate one warning per language if no files were found. The warning could give the full filename it tried for the first file, which should help the user to work out where Zanata is looking for the files.
Warning: no translations found in locale zh-CN: first expected file was "working_dir/pot/zh-CN/xxx.po". Please check the values of srcDir and transDir.
(This is a sign that the user should have used a srcDir value of "pot".)
We could also add a warning (with an option to switch it off) when the source file path names start with something suspicious like "pot" or "src". The warning could suggest the fix of changing srcDir to be $suspiciousPrefix.
Fixed in https://github.com/zanata/zanata-client/commit/31319e5ef9629e8b6393658a093c4a4f21661ac8