We're updating the issue view to help you get more done.Learn more

Uploading a .pot file via Web UI retains the extension

Uploading a .pot gettext file via the ui results in a "myfile.pot" document in the project. This differs to the client upload in that the extension is stripped.
This results in being unable to upload translations to the project, with the message
Operation failed: Failed while pushing document translations:

1. Go to a project, and create a version that is gettext
2. In Settings, Documents -> click + and upload the .pot file
3. Download the project config via the dropdown and move it to a test folder
4. In said folder, do

1 /path-to/zanata-cli/etc/scripts/zanata-cli -e push --username (you) --key (your_key) --url "http://localhost:8080/zanata/" --project-type gettext --push-type trans --file-types GETTEXT[po] --trans-dir . --project-config zanata.xml --src-dir . --merge-type import --locales ar


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 [INFO] Found source documents: [INFO] pot_example [WARN] pushType set to 'Trans': existing translations on server may be overwritten/deleted [?] This will overwrite existing TRANSLATIONS on the server. Are you sure (y/n)? y [INFO] Pushing target doc [name=pot_example size=2 client-locale=ar] to server [locale=ar] [== ][ERROR] Operation failed: Failed while pushing document translations: [A document was not found.] To retry from the last document, please set the following option(s): --from-doc "pot_example" . [ERROR] Execution failed: java.lang.RuntimeException: Failed while pushing document translations: [A document was not found.] at org.zanata.client.commands.push.PushCommand.pushCurrentModule(PushCommand.java:458) at org.zanata.client.commands.push.PushCommand.run(PushCommand.java:212) at org.zanata.client.commands.ConfigurableCommand.runWithActions(ConfigurableCommand.java:110) at org.zanata.client.commands.ArgsUtil.runCommand(ArgsUtil.java:48) at org.zanata.client.ZanataClient.processArgs(ZanataClient.java:170) at org.zanata.client.ZanataClient.main(ZanataClient.java:95) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.RuntimeException: Failed while pushing document translations: [A document was not found.] at org.zanata.client.commands.push.PushCommand.pushTargetDocToServer(PushCommand.java:696) at org.zanata.client.commands.push.PushCommand.access$300(PushCommand.java:55) at org.zanata.client.commands.push.PushCommand$1.visit(PushCommand.java:417) at org.zanata.client.commands.push.AbstractGettextPushStrategy.visitTranslationResources(AbstractGettextPushStrategy.java:144) at org.zanata.client.commands.push.PushCommand.pushCurrentModule(PushCommand.java:402)



Alex Eng


Damian Jansen





Fix versions

Affects versions