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
Translations download as zip(.po files) button fix #2445
Conversation
Commit history is not related to this. Fixing the pr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A lot of unrelated commits from some other PRs. Sync your repo.
51ce0fb
to
53d89c2
Compare
@CosmicCoder96 Can you confirm if the link redirect is right here? |
@mrsaicharan1 no - this link is supposed to be used for downloading actual .po files like you download pdfs for tickets. The URL has to come from the server where it will be stored. |
@CosmicCoder96 I've implemented the feature for downloading .po files here in this PR on the server. Won't routing it to |
@mrsaicharan1 You created a namespace on the server - by specifying that the url_prefix is |
@CosmicCoder96 Please correct me if I'm wrong, I'll be creating a model for the translations route where it fetches the data from server asynchronously. Then, I'll be setting the |
53d89c2
to
dfe3f69
Compare
yarn lock fix URL added for admin translations
@CosmicCoder96 Appended the url using the loader service. |
14cd037
to
04181a5
Compare
04181a5
to
a52749f
Compare
a52749f
to
c87c353
Compare
c87c353
to
436afd2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, you are not using the info available in isLoading
anywhere -- use it in conjunction with https://semantic-ui.com/elements/button.html#loading
c6132fb
to
79d7781
Compare
…frontend into translation-b
79d7781
to
cd40f11
Compare
Initialized isLoading setting isLoading to False finally moving logic to controller file removed redundant variable assignments Button isLoading added in template code Added translations isloading
@CosmicCoder96 |
@mrsaicharan1 what do you mean by permanent redirect? |
HTTP 308 |
@mrsaicharan1 Not sure how it's showing on your side: on testing this PR for me it shows a 404 |
@CosmicCoder96 I've tried out the API request locally and the download works properly when I navigate to |
@mrsaicharan1 I have redeployed the server on heroku -- I guess the build of your merged PR is still under progress there. Will test it in a few mins. |
@mrsaicharan1 I got this locally, any ideas? |
@mrsaicharan1 I will push a pr to create a download file service.. try it after that. |
translationsDownload() { | ||
this.set('isLoading', true); | ||
this.get('loader') | ||
.load('/admin/content/translations/all') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mrsaicharan1 Use the service I defined in #2540
here.
this.get('loader')
.downloadFile('/admin/content/translations/all')
.then(()=> {
this.get('notify').success(this.get('l10n').t('Translations Zip generated successfully.'));
})
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mrsaicharan1 Open an issue on the server for the celery task of translation helpers. It is failing for the test deployment with the same error message which I posted a screenshot of before. |
@CosmicCoder96 Fixed the translations donwload on the server fossasia/open-event-server#5767 |
Checklist
development
branch.Short description of what this resolves:
Translations as zip can now be downloaded on the admin panel
Related server PR
Fixes #2443