Bug 820048

Summary: RFE: Maven client should print helpful messages when translation files do not exist
Product: [Retired] Zanata Reporter: Joyce Chang <jochang>
Component: Component-MavenAssignee: Isaac Rooskov <irooskov>
Status: CLOSED CURRENTRELEASE QA Contact: Zanata-QA Mailling List <zanata-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 1.6-SNAPSHOTCC: djansen, mkim, pahuang, petersen, sflaniga, yshao, zanata-bugs
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: 2
Clone Of: Environment:
Last Closed: 2014-12-17 01:57:39 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Joyce Chang 2012-05-09 01:44:33 UTC
Description of problem:
supposed project file structure is set as below:

working_dir/
    pot/
	xxx.pot
    zh-CN/
        xxx.po

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):
maven 1.6.0-alpha-2


How reproducible:
always

Steps to Reproduce:
1.create a project name "AboutFedora" and a project version "master"
2.open a terminal:mvn -B zanata:push -Dzanata.pushTrans

  
Actual results:
failed to push translation files(po files) to server but no warning was given. Though, source is pushed successfully. 

Expected results:
a warning should state no translation is pushed because failed to find <filename>.

Comment 1 Runa Bhattacharjee 2012-07-30 13:15:10 UTC
Request for technical evalutaion.

Comment 2 Sean Flanigan 2012-07-31 02:25:37 UTC
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.

For example:

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".)

Comment 3 Sean Flanigan 2012-11-15 01:14:14 UTC
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.