Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 868125

Summary: [xliff] Should be able to include *_en_US.xml as source
Product: [Retired] Zanata Reporter: Ding-Yi Chen <dchen>
Component: Component-MavenAssignee: Alex Eng <aeng>
Status: CLOSED CURRENTRELEASE QA Contact: Ding-Yi Chen <dchen>
Severity: high Docs Contact:
Priority: unspecified    
Version: developmentCC: aeng, sflaniga, zanata-bugs
Target Milestone: ---   
Target Release: 2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 2.0.3-SNAPSHOT (20121106-0949) Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-26 03:46:30 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:
Attachments:
Description Flags
Test case
none
Correct test case none

Description Ding-Yi Chen 2012-10-19 05:57:15 UTC
Description of problem:
Some xliff project such as spacewalk use _en_US.xml as postfix for translation.

However, even if we explicitly states:
<zanata.includes>StringResource_en_US.xml</zanata.includes>
in pom.xml, maven client won't be able to find it.

Version-Release number of selected component (if applicable):
Zanata version 1.8.0-SNAPSHOT (20121019-0031)
[INFO] client API version: 1.8.0-SNAPSHOT, server API version: 1.8.0-SNAPSHOT


How reproducible:
Always

Steps to Reproduce:
1. Create project spacewalk and version master
2. Download and extract the attachment
3. cd spacewalk
4. zanata -e zanata:push -Dzanata.url=YourServer
  
Actual results:
[INFO] Found source document: StringResource_en
[INFO] Found source document: StringResource_en_GB
[INFO] Found source document: StringResource_en-US
[INFO] Found source document: StringResource_en-GB

en_US is not found.


Expected results:
[INFO] Found source document: StringResource_en
[INFO] Found source document: StringResource_en_GB
[INFO] Found source document: StringResource_en-GB
[INFO] Found source document: StringResource_en-US
[INFO] Found source document: StringResource_en_US

en_US is found.

Comment 1 Ding-Yi Chen 2012-10-19 05:58:26 UTC
Created attachment 629781 [details]
Test case

Comment 2 Ding-Yi Chen 2012-10-19 06:29:38 UTC
Created attachment 629803 [details]
Correct test case

Comment 5 Ding-Yi Chen 2012-10-23 06:06:13 UTC
Tested with Zanata version 1.8.0-SNAPSHOT (20121023-1429)

maven client 1.7.5-SNAPSHOT now works normal.

However, with maven client 1.8.0-SNAPSHOT, following error appeared without -Dzanata.copyTrans=false:

[ERROR] Failed to execute goal org.zanata:zanata-maven-plugin:1.8.0-SNAPSHOT:push (default-cli) on project null: Zanata mojo exception: Could not invoke copy trans. The service was not available (404) -> [Help 1]                                      
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.zanata:zanata-maven-plugin:1.8.0-SNAPSHOT:push (default-cli) on project null: Zanata mojo exception 
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)                                   
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)                                   
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)                                   
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)           
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)           
        at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)               
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)                           
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)                                                    
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)                                                      
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)                                                          
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)                                                           
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)                                                             
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)                                                       
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)                                     
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)                             
        at java.lang.reflect.Method.invoke(Method.java:597)                                                                  
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)                               
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)                                       
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)                             
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)                                         
Caused by: org.apache.maven.plugin.MojoExecutionException: Zanata mojo exception                                             
        at org.zanata.maven.ConfigurableMojo.execute(ConfigurableMojo.java:133)                                              
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)                 
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)                                   
        ... 19 more                                                                            ========================

However, it works if -Dzanata.copyTrans=false is given.

Reassigned.

Comment 6 Ding-Yi Chen 2012-10-31 06:58:56 UTC
Test with Zanata version 2.0.2 (20121030-2357)
and maven client 1.8.0-SNAPSHOT

[ERROR] Failed to execute goal org.zanata:zanata-maven-plugin:1.8.0-SNAPSHOT:push (default-cli) on project null: Zanata mojo exception: Failed while pushing document: [org.hibernate.exception.SQLGrammarException: could not update: [org.zanata.model.HDocument#8068]] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.zanata:zanata-maven-plugin:1.8.0-SNAPSHOT:push (default-cli) on project null: Zanata mojo exception
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:158)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Zanata mojo exception
	at org.zanata.maven.ConfigurableMojo.execute(ConfigurableMojo.java:133)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
	... 19 more
Caused by: java.lang.RuntimeException: Failed while pushing document: [org.hibernate.exception.SQLGrammarException: could not update: [org.zanata.model.HDocument#8068]]
	at org.zanata.client.commands.push.PushCommand.pushSrcDocToServer(PushCommand.java:402)
	at org.zanata.client.commands.push.PushCommand.pushCurrentModule(PushCommand.java:323)
	at org.zanata.client.commands.push.PushCommand.run(PushCommand.java:183)
	at org.zanata.maven.ConfigurableMojo.runCommand(ConfigurableMojo.java:158)
	at org.zanata.maven.PushPullMojo.runCommand(PushPullMojo.java:33)
	at org.zanata.maven.ConfigurableMojo.execute(ConfigurableMojo.java:129)
	... 21 more
[ERROR] 
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

Comment 8 Alex Eng 2012-11-06 04:00:25 UTC
Retested in zanata-master-auto with version 2.0.0, cannot reproduce the error stack above. Suspect it might be server side problem when test is being conducted. Require QA retest

Comment 9 Ding-Yi Chen 2012-11-06 04:54:58 UTC
VERIFIED with Zanata version 2.0.3-SNAPSHOT (20121106-0949)