Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Worker pool) Show number of successful tasks in progress bar #189

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from

Conversation

kbairak
Copy link
Member

@kbairak kbairak commented May 4, 2023

No description provided.

@kbairak
Copy link
Member Author

kbairak commented May 4, 2023

Attempts to address #173

@kbairak
Copy link
Member Author

kbairak commented May 4, 2023

Here are some sample outputs with various combinations of invoking the push command with/out --skip and with/out | cat while one of the language files has a syntax error:

➜  tx push -taf

  # Getting info about resources

  kb_clitest.en_1_json - Done
  [##############################] (1 / 1)

  # Pushing translations

  kb_clitest.en_1_json [aln] - Done
  kb_clitest.en_1_json [de_AT] - Done
  kb_clitest.en_1_json [en_BD] - upload of resource 'o:tx_internal_gluon:p:kb_clitest:r:en_1_json', language 'l:en_BD' failed - parse_error: Expecting ':' delimiter: line 5 column 5 (char 90)
  kb_clitest.en_1_json [en_GR] - Done
  kb_clitest.en_1_json [es_PR] - Done
  kb_clitest.en_1_json [ig] - Done
  [################--------------] (5 / 9)

➜  tx push -taf --skip

  # Getting info about resources

  kb_clitest.en_1_json - Done
  [##############################] (1 / 1)

  # Pushing translations

  kb_clitest.en_1_json [aln] - Done
  kb_clitest.en_1_json [de_AT] - Done
  kb_clitest.en_1_json [en_BD] - upload of resource 'o:tx_internal_gluon:p:kb_clitest:r:en_1_json', language 'l:en_BD' failed - parse_error: Expecting ':' delimiter: line 5 column 5 (char 90)
  kb_clitest.en_1_json [en_GR] - Done
  kb_clitest.en_1_json [es_PR] - Done
  kb_clitest.en_1_json [ig] - Done
  kb_clitest.en_1_json [lfn] - Done
  kb_clitest.en_1_json [scn] - Done
  kb_clitest.en_1_json [ta_LK] - Done
  [##########################----] (8 / 9)


➜  tx push -taf | cat

  # Getting info about resources

  kb_clitest.en_1_json - Getting info
  kb_clitest.en_1_json - Getting stats
  kb_clitest.en_1_json - Fetching remote languages
  kb_clitest.en_1_json - Done
  Completed 1 / 1 tasks

  # Pushing translations

  kb_clitest.en_1_json [aln] - Uploading file
  kb_clitest.en_1_json [en_BD] - Uploading file
  kb_clitest.en_1_json [de_AT] - Uploading file
  kb_clitest.en_1_json [en_GR] - Uploading file
  kb_clitest.en_1_json [es_PR] - Uploading file
  kb_clitest.en_1_json [es_PR] - Done
  kb_clitest.en_1_json [ig] - Uploading file
  kb_clitest.en_1_json [en_BD] - upload of resource 'o:tx_internal_gluon:p:kb_clitest:r:en_1_json', language 'l:en_BD' failed - parse_error: Expecting ':' delimiter: line 5 column 5 (char 90)
  kb_clitest.en_1_json [en_GR] - Done
  kb_clitest.en_1_json [de_AT] - Done
  kb_clitest.en_1_json [ig] - Done
  kb_clitest.en_1_json [aln] - Done
  Completed 5 / 9 tasks


➜  tx push -taf --skip | cat

  # Getting info about resources

  kb_clitest.en_1_json - Getting info
  kb_clitest.en_1_json - Getting stats
  kb_clitest.en_1_json - Fetching remote languages
  kb_clitest.en_1_json - Done
  Completed 1 / 1 tasks

  # Pushing translations

  kb_clitest.en_1_json [aln] - Uploading file
  kb_clitest.en_1_json [en_BD] - Uploading file
  kb_clitest.en_1_json [de_AT] - Uploading file
  kb_clitest.en_1_json [es_PR] - Uploading file
  kb_clitest.en_1_json [en_GR] - Uploading file
  kb_clitest.en_1_json [en_BD] - upload of resource 'o:tx_internal_gluon:p:kb_clitest:r:en_1_json', language 'l:en_BD' failed - parse_error: Expecting ':' delimiter: line 5 column 5 (char 90)
  kb_clitest.en_1_json [ig] - Uploading file
  kb_clitest.en_1_json [en_GR] - Done
  kb_clitest.en_1_json [lfn] - Uploading file
  kb_clitest.en_1_json [aln] - Done
  kb_clitest.en_1_json [scn] - Uploading file
  kb_clitest.en_1_json [de_AT] - Done
  kb_clitest.en_1_json [ta_LK] - Uploading file
  kb_clitest.en_1_json [es_PR] - Done
  kb_clitest.en_1_json [ig] - Done
  kb_clitest.en_1_json [scn] - Done
  kb_clitest.en_1_json [ta_LK] - Done
  kb_clitest.en_1_json [lfn] - Done
  Completed 8 / 9 tasks

@fardinmardani
Copy link

The tx push command is used to push translations to the remote translation platform. Based on the sample outputs you provided, it seems that there is a syntax error in one of the language files, which is causing the push command to fail for that particular language.

When you use the --skip option, the push command skips the failed language file and continues pushing translations for the remaining languages. On the other hand, when you don't use the --skip option, the push command stops when it encounters the failed language file and doesn't push translations for the remaining languages.

The | cat at the end of the command is used to output the results of the command to the console in real-time. It doesn't affect the behavior of the command itself.

To fix the issue, you need to correct the syntax error in the language file that is causing the push command to fail. Once you've fixed the error, you can run the push command again without the --skip option to push translations for all languages including the one that failed previously.

If you continue to experience issues while pushing translations, you can contact the support team of the translation platform you're using for further assistance. They may be able to provide more specific guidance on resolving the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants