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

Internationalization of ingest messages #9571

Merged

Conversation

stevenferey
Copy link
Contributor

@stevenferey stevenferey commented May 3, 2023

What this PR does / why we need it:
Internationalization of ingest messages

Which issue(s) this PR closes:

Copy link
Member

@pdurbin pdurbin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me. Thanks, @stevenferey!

I'm going to give this our smallest size estimate because it shouldn't be hard to test.

@@ -1809,6 +1809,8 @@ file.spss-savEncoding.current=Current Selection:
file.spss-porExtraLabels=Variable Labels
file.spss-porExtraLabels.title=Upload an additional text file with extra variable labels.
file.spss-porExtraLabels.selectToAddBtn=Select File to Add
file.ingest.saveFailed.message=Ingest succeeded, but failed to save the ingested tabular data in the database; no further information is available
file.ingest.saveFailed.detail.message=Ingest succeeded, but failed to save the ingested tabular data in the database:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh good, there's a space after the : even though it's hard to see.

@pdurbin
Copy link
Member

pdurbin commented May 4, 2023

@stevenferey is a first time contributor (❤️ thanks! ❤️ ) so I had to click the "run" button for the checks.

@pdurbin pdurbin added Feature: Internationalization Size: 3 A percentage of a sprint. 2.1 hours. labels May 4, 2023
@stevenferey
Copy link
Contributor Author

Thanks for your feedback @pdurbin !

The error during the maven build is not to be related to the PR for me, is it?

Thanks,
Steven.

@pdurbin
Copy link
Member

pdurbin commented May 5, 2023

@stevenferey no, this error is unrelated to your pull request:

Failed to read schema document 'https://ddialliance.org/Specification/DDI-Codebook/2.5/XMLSchema/codebook.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.

Internally, we've been discussing how to fix this: https://iqss.slack.com/archives/C010LA04BCG/p1682360103211409

@kcondon
Copy link
Contributor

kcondon commented May 26, 2023

@stevenferey Please refresh this branch from develop since there is an outdated flyway db script name in this branch that is causing trouble deploying. Thanks!

@kcondon kcondon self-assigned this May 26, 2023
@pdurbin
Copy link
Member

pdurbin commented May 26, 2023

I took care of the merge.

@kcondon
Copy link
Contributor

kcondon commented May 26, 2023 via email

Copy link
Member

@pdurbin pdurbin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this by artificially adding some runtime exceptions, which I didn't commit, of course. Looks good to me. Thanks, @stevenferey!

@@ -128,9 +128,9 @@ public void onMessage(Message message) {
IngestReport errorReport = new IngestReport();
errorReport.setFailure();
if (ex.getMessage() != null) {
errorReport.setReport("Ingest succeeded, but failed to save the ingested tabular data in the database: " + ex.getMessage());
errorReport.setReport(BundleUtil.getStringFromBundle("file.ingest.saveFailed.detail.message") + ex.getMessage());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To artificially test this I used the following code...

     public boolean ingestAsTabular(Long datafile_id) {
+        if (true) {
+            throw (new RuntimeException("customMessage"));
+        }
         DataFile dataFile = fileService.find(datafile_id);

... to create this screenshot, which looks good to me:

Screen Shot 2023-05-26 at 2 47 48 PM

} else {
errorReport.setReport("Ingest succeeded, but failed to save the ingested tabular data in the database; no further information is available");
errorReport.setReport(BundleUtil.getStringFromBundle("file.ingest.saveFailed.message"));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For this one I used...

     public boolean ingestAsTabular(Long datafile_id) {
+        if (true) {
+            throw (new RuntimeException());
+        }
         DataFile dataFile = fileService.find(datafile_id);

... to get this screenshot, which also looks fine to me:

Screen Shot 2023-05-26 at 2 54 47 PM

IQSS/dataverse (TO BE RETIRED / DELETED in favor of project 34) automation moved this from QA ✅ to Ready for QA ⏩ May 26, 2023
@kcondon kcondon merged commit e2eb6d9 into IQSS:develop May 26, 2023
9 checks passed
IQSS/dataverse (TO BE RETIRED / DELETED in favor of project 34) automation moved this from Ready for QA ⏩ to Done 🚀 May 26, 2023
@pdurbin pdurbin added this to the 5.14 milestone May 26, 2023
@stevenferey stevenferey deleted the 9570-untranslated-error-ingest-message branch May 30, 2023 09:08
@DS-INRA DS-INRA added this to 🚀 Done (Recherche Data Gouv) in Recherche Data Gouv (formerly Data INRAE) Oct 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature: Internationalization Size: 3 A percentage of a sprint. 2.1 hours.
Projects
Recherche Data Gouv (formerly Data IN...
  
🚀 Done (Recherche Data Gouv)
Development

Successfully merging this pull request may close these issues.

Untranslated error ingest message
3 participants