Skip to content

Commit 4a20819

Browse files
build: use a different dprint config for messages files to allow longer lines
1 parent bf23427 commit 4a20819

102 files changed

Lines changed: 309 additions & 593 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

dprint.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727
"jest.config.js",
2828
"env.config.*",
2929
"example.env.config.*",
30-
"module.config.js"
30+
"module.config.js",
31+
"src/**/messages.{ts,js}"
3132
],
3233
"plugins": [
3334
"https://plugins.dprint.dev/typescript-0.95.15.wasm",

dprint.messages.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
// For messages files, we allow unlimited line length, to keep the file format consistent.
3+
// For now a separate file is required, but this could be simplified when
4+
// https://github.com/dprint/dprint/issues/996 is implemented or if we change to a different formatter.
5+
"extends": "dprint.json",
6+
"lineWidth": 10000,
7+
"includes": ["src/**/messages.{ts,js}"]
8+
// Because this inherits "excludes" from "dprint.json", it's necessary to use "--excludes-override none"
9+
// to run this on the command line.
10+
}

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
"build": "fedx-scripts webpack",
1414
"i18n_extract": "fedx-scripts formatjs extract --include=plugins",
1515
"stylelint": "stylelint \"plugins/**/*.scss\" \"src/**/*.scss\" \"scss/**/*.scss\" --config .stylelintrc.json",
16-
"lint": "dprint check && oxlint --type-aware --deny-warnings && npm run stylelint",
17-
"lint:fix": "dprint fmt && oxlint --type-aware --fix",
16+
"lint": "dprint check && dprint --config dprint.messages.json check --excludes-override none && oxlint --type-aware --deny-warnings && npm run stylelint",
17+
"lint:fix": "dprint fmt && dprint --config dprint.messages.json fmt --excludes-override none && oxlint --type-aware --fix",
1818
"start": "fedx-scripts webpack-dev-server --progress",
1919
"start:with-theme": "paragon install-theme && npm start && npm install",
2020
"dev": "PUBLIC_PATH=/authoring/ MFE_CONFIG_API_URL='http://localhost:8000/api/mfe_config/v1' fedx-scripts webpack-dev-server --progress --host apps.local.openedx.io",

src/accessibility-page/AccessibilityBody/messages.ts

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ const messages = defineMessages({
1313
},
1414
a11yBodyIntroGraph: {
1515
id: 'a11yBodyIntroGraph',
16-
defaultMessage:
17-
`At edX, we seek to understand and respect the unique needs and perspectives of the edX global community.
16+
defaultMessage: `At edX, we seek to understand and respect the unique needs and perspectives of the edX global community.
1817
We value every course team and are committed to expanding access to all, including course team creators and authors with
1918
disabilities. To that end, we have adopted a {communityAccessibilityLink} and this process to allow course team creators
2019
and authors to request assistance if they are unable to develop and post content on our platform via Studio because of their
@@ -28,32 +27,27 @@ const messages = defineMessages({
2827
},
2928
a11yBodyEdxResponse: {
3029
id: 'a11yBodyEdxResponse',
31-
defaultMessage:
32-
`'We will communicate with you about your preferences and needs in determining the appropriate solution, although
30+
defaultMessage: `'We will communicate with you about your preferences and needs in determining the appropriate solution, although
3331
the ultimate decision will be ours, provided that the solution is effective and timely. The factors we will consider in choosing
3432
an accessibility solution are: effectiveness; timeliness (relative to your deadlines); ease of implementation; and ease of use for
3533
you. We will notify you of the decision and explain the basis for our decision within 10 business days of discussing with you.`,
3634
description: 'Paragraph outlining how we will select an accessibility solution.',
3735
},
3836
a11yBodyEdxFollowUp: {
3937
id: 'a11yBodyEdxFollowUp',
40-
defaultMessage:
41-
`Thereafter, we will communicate with you on a weekly basis regarding our evaluation, decision, and progress in
38+
defaultMessage: `Thereafter, we will communicate with you on a weekly basis regarding our evaluation, decision, and progress in
4239
implementing the accessibility solution. We will notify you when implementation of your accessibility solution is complete and
4340
will follow-up with you as may be necessary to see if the solution was effective.`,
44-
description:
45-
'Paragraph outlining how we will follow-up with you during and after implementing an accessibility solution.',
41+
description: 'Paragraph outlining how we will follow-up with you during and after implementing an accessibility solution.',
4642
},
4743
a11yBodyOngoingSupport: {
4844
id: 'a11yBodyOngoingSupport',
49-
defaultMessage:
50-
'EdX will provide ongoing technical support as needed and will address any additional issues that arise after the initial course creation.',
45+
defaultMessage: 'EdX will provide ongoing technical support as needed and will address any additional issues that arise after the initial course creation.',
5146
description: 'A statement of ongoing support.',
5247
},
5348
a11yBodyA11yFeedback: {
5449
id: 'a11yBodyA11yFeedback',
55-
defaultMessage:
56-
'Please direct any questions or suggestions on how to improve the accessibility of Studio to {emailElement} or use the form below. We welcome your feedback.',
50+
defaultMessage: 'Please direct any questions or suggestions on how to improve the accessibility of Studio to {emailElement} or use the form below. We welcome your feedback.',
5751
description: 'Contact information heading for those with accessibility issues or suggestions.',
5852
},
5953
a11yBodyEmailHeading: {
@@ -78,39 +72,33 @@ const messages = defineMessages({
7872
},
7973
a11yBodyTimeConstraints: {
8074
id: 'a11yBodyTimeConstraints',
81-
defaultMessage:
82-
'how soon you need access and for how long (e.g., a planned course start date or in connection with a course-related deadline such as a final essay).',
75+
defaultMessage: 'how soon you need access and for how long (e.g., a planned course start date or in connection with a course-related deadline such as a final essay).',
8376
description: 'Time contstraint information.',
8477
},
8578
a11yBodyReceipt: {
8679
id: 'a11yBodyReceipt',
87-
defaultMessage:
88-
'The edX Support Team will respond to confirm receipt and forward your request to the edX Partner Manager for your institution and the edX Website Accessibility Specialist.',
80+
defaultMessage: 'The edX Support Team will respond to confirm receipt and forward your request to the edX Partner Manager for your institution and the edX Website Accessibility Specialist.',
8981
description: 'Paragraph outlining what steps edX will take immediately.',
9082
},
9183
a11yBodyExtraInfo: {
9284
id: 'a11yBodyExtraInfo',
93-
defaultMessage:
94-
`With guidance from the Website Accessibility Specialist, edX will contact you to discuss your request and gather
85+
defaultMessage: `With guidance from the Website Accessibility Specialist, edX will contact you to discuss your request and gather
9586
additional information from you about your preferences and needs, to determine if there's a workable solution that edX is able to support.`,
9687
description: 'Paragraph outlining how and when edX will reach out to you.',
9788
},
9889
a11yBodyFixesListHeader: {
9990
id: 'a11yBodyFixesListHeader',
100-
defaultMessage:
101-
'EdX will assist you promptly and thoroughly so that you are able to create content on the CMS within your time constraints. Such efforts may include, but are not limited to:',
91+
defaultMessage: 'EdX will assist you promptly and thoroughly so that you are able to create content on the CMS within your time constraints. Such efforts may include, but are not limited to:',
10292
description: 'Heading for list of ways we might be able to assist.',
10393
},
10494
a11yBodyThirdParty: {
10595
id: 'a11yBodyThirdParty',
106-
defaultMessage:
107-
'Purchasing a third-party tool or software for use on an individual basis to assist your use of Studio;',
96+
defaultMessage: 'Purchasing a third-party tool or software for use on an individual basis to assist your use of Studio;',
10897
description: 'Buy third-party software.',
10998
},
11099
a11yBodyContractor: {
111100
id: 'a11yBodyContractor',
112-
defaultMessage:
113-
'Engaging a trained independent contractor to provide real-time visual, verbal and physical assistance; or',
101+
defaultMessage: 'Engaging a trained independent contractor to provide real-time visual, verbal and physical assistance; or',
114102
description: 'Hire a contractor.',
115103
},
116104
a11yBodyCodeFix: {

src/accessibility-page/AccessibilityForm/messages.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ const messages = defineMessages({
88
},
99
accessibilityPolicyFormErrorHighVolume: {
1010
id: 'accessibilityPolicyFormErrorHighVolume',
11-
defaultMessage:
12-
'We are currently experiencing high volume. Try again later today or send an email message to {emailLink}.',
11+
defaultMessage: 'We are currently experiencing high volume. Try again later today or send an email message to {emailLink}.',
1312
description: 'Error message when site is experiencing high volume that will include an email link',
1413
},
1514
accessibilityPolicyFormErrorMissingFields: {
@@ -54,8 +53,7 @@ const messages = defineMessages({
5453
},
5554
accessibilityPolicyFormSuccessDetails: {
5655
id: 'accessibilityPolicyFormSuccessDetails',
57-
defaultMessage:
58-
'Thank you for your feedback regarding the accessibility of Studio. We typically respond within one business day ({day_start} to {day_end}, {time_start} to {time_end}).',
56+
defaultMessage: 'Thank you for your feedback regarding the accessibility of Studio. We typically respond within one business day ({day_start} to {day_end}, {time_start} to {time_end}).',
5957
description: 'Detailed thank you message when form submission is successful',
6058
},
6159
accessibilityPolicyFormValidEmail: {

src/advanced-settings/messages.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,15 @@ const messages = defineMessages({
1919
},
2020
alertWarningDescriptions: {
2121
id: 'course-authoring.advanced-settings.alert.warning.descriptions',
22-
defaultMessage:
23-
'Your changes will not take effect until you save your progress. Take care with key and value formatting, as validation is not implemented.',
22+
defaultMessage: 'Your changes will not take effect until you save your progress. Take care with key and value formatting, as validation is not implemented.',
2423
},
2524
alertSuccess: {
2625
id: 'course-authoring.advanced-settings.alert.success',
2726
defaultMessage: 'Your policy changes have been saved.',
2827
},
2928
alertSuccessDescriptions: {
3029
id: 'course-authoring.advanced-settings.alert.success.descriptions',
31-
defaultMessage:
32-
'No validation is performed on policy keys or value pairs. If you are having difficulties, check your formatting.',
30+
defaultMessage: 'No validation is performed on policy keys or value pairs. If you are having difficulties, check your formatting.',
3331
},
3432
alertProctoringError: {
3533
id: 'course-authoring.advanced-settings.alert.proctoring.error',

src/advanced-settings/settings-sidebar/messages.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,11 @@ const messages = defineMessages({
77
},
88
aboutDescription1: {
99
id: 'course-authoring.advanced-settings.sidebar.about.description-1',
10-
defaultMessage:
11-
'Advanced settings control specific course functionality. On this page, you can edit manual policies, which are JSON-based key and value pairs that control specific course settings.',
10+
defaultMessage: 'Advanced settings control specific course functionality. On this page, you can edit manual policies, which are JSON-based key and value pairs that control specific course settings.',
1211
},
1312
aboutDescription2: {
1413
id: 'course-authoring.advanced-settings.sidebar.about.description-2',
15-
defaultMessage:
16-
'Any policies you modify here override all other information you’ve defined elsewhere in Studio. Do not edit policies unless you are familiar with both their purpose and syntax.',
14+
defaultMessage: 'Any policies you modify here override all other information you’ve defined elsewhere in Studio. Do not edit policies unless you are familiar with both their purpose and syntax.',
1715
},
1816
other: {
1917
id: 'course-authoring.advanced-settings.sidebar.other.title',

src/certificates/certificate-details/messages.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ const messages = defineMessages({
1818
},
1919
detailsCourseTitleOverrideDescription: {
2020
id: 'course-authoring.certificates.details.course.title.override.description',
21-
defaultMessage:
22-
'Specify an alternative to the official course title to display on certificates. Leave blank to use the official course title.',
21+
defaultMessage: 'Specify an alternative to the official course title to display on certificates. Leave blank to use the official course title.',
2322
description: 'Helper text under the course title override input field',
2423
},
2524
detailsCourseNumber: {
@@ -45,15 +44,12 @@ const messages = defineMessages({
4544
editCertificateConfirmationTitle: {
4645
id: 'course-authoring.certificates.details.confirm.edit',
4746
defaultMessage: 'Edit this certificate?',
48-
description:
49-
'Title for the confirmation modal when a user attempts to edit an already activated (live) certificate',
47+
description: 'Title for the confirmation modal when a user attempts to edit an already activated (live) certificate',
5048
},
5149
editCertificateMessage: {
5250
id: 'course-authoring.certificates.details.confirm.edit.message',
53-
defaultMessage:
54-
'This certificate has already been activated and is live. Are you sure you want to continue editing?',
55-
description:
56-
'Message warning users about the implications of editing a certificate that is already live, prompting for confirmation',
51+
defaultMessage: 'This certificate has already been activated and is live. Are you sure you want to continue editing?',
52+
description: 'Message warning users about the implications of editing a certificate that is already live, prompting for confirmation',
5753
},
5854
});
5955

src/certificates/certificate-signatories/messages.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,8 @@ const messages = defineMessages({
88
},
99
signatoriesRecommendation: {
1010
id: 'course-authoring.certificates.signatories.recommendation',
11-
defaultMessage:
12-
'It is strongly recommended that you include four or fewer signatories. If you include additional signatories, preview the certificate in Print View to ensure the certificate will print correctly on one page.',
13-
description:
14-
'A recommendation for the number of signatories to include on a certificate, emphasizing the importance of testing the print layout',
11+
defaultMessage: 'It is strongly recommended that you include four or fewer signatories. If you include additional signatories, preview the certificate in Print View to ensure the certificate will print correctly on one page.',
12+
description: 'A recommendation for the number of signatories to include on a certificate, emphasizing the importance of testing the print layout',
1513
},
1614
signatoriesSectionTitle: {
1715
id: 'course-authoring.certificates.signatories.section.title',
@@ -55,8 +53,7 @@ const messages = defineMessages({
5553
},
5654
titleDescription: {
5755
id: 'course-authoring.certificates.signatories.title.description',
58-
defaultMessage:
59-
'Titles more than 100 characters may prevent students from printing their certificate on a single page.',
56+
defaultMessage: 'Titles more than 100 characters may prevent students from printing their certificate on a single page.',
6057
description: 'Helper text under the title input field',
6158
},
6259
organizationLabel: {
@@ -107,8 +104,7 @@ const messages = defineMessages({
107104
deleteSignatoryConfirmation: {
108105
id: 'course-authoring.certificates.signatories.confirm-modal',
109106
defaultMessage: 'Delete "{name}" from the list of signatories?',
110-
description:
111-
'Title for the confirmation modal when a user attempts to delete a signatory, where "{name}" is the name of the signatory to be deleted',
107+
description: 'Title for the confirmation modal when a user attempts to delete a signatory, where "{name}" is the name of the signatory to be deleted',
112108
},
113109
deleteSignatoryConfirmationMessage: {
114110
id: 'course-authoring.certificates.signatories.confirm-modal.message',

src/certificates/layout/certificates-sidebar/messages.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,12 @@ const messages = defineMessages({
88
},
99
workingWithCertificatesFirstParagraph: {
1010
id: 'course-authoring.certificates.sidebar.working-with-certificates.first-paragraph',
11-
defaultMessage:
12-
'Specify a course title to use on the certificate if the course\'s official title is too long to be displayed well.',
11+
defaultMessage: 'Specify a course title to use on the certificate if the course\'s official title is too long to be displayed well.',
1312
description: 'Instructions for specifying a course title for the certificate',
1413
},
1514
workingWithCertificatesSecondParagraph: {
1615
id: 'course-authoring.certificates.sidebar.working-with-certificates.second-paragraph',
17-
defaultMessage:
18-
'For verified certificates, specify between one and four signatories and upload the associated images. To edit or delete a certificate before it is activated, hover over the top right corner of the form and select {strongText} or the delete icon.',
16+
defaultMessage: 'For verified certificates, specify between one and four signatories and upload the associated images. To edit or delete a certificate before it is activated, hover over the top right corner of the form and select {strongText} or the delete icon.',
1917
description: 'Details on how to specify signatories for verified certificates and edit or delete certificates',
2018
},
2119
workingWithCertificatesSecondParagraph_strong: {
@@ -40,8 +38,7 @@ const messages = defineMessages({
4038
},
4139
issuingCertificatesFirstParagraph: {
4240
id: 'course-authoring.certificates.sidebar.issuing-certificates.first-paragraph',
43-
defaultMessage:
44-
'To begin issuing course certificates, a course team member with either the Staff or Admin role selects {strongText}. Only course team members with these roles can edit or delete an activated certificate.',
41+
defaultMessage: 'To begin issuing course certificates, a course team member with either the Staff or Admin role selects {strongText}. Only course team members with these roles can edit or delete an activated certificate.',
4542
description: 'Instructions for issuing course certificates and the roles required to edit or delete certificates',
4643
},
4744
issuingCertificatesFirstParagraph_strong: {
@@ -51,8 +48,7 @@ const messages = defineMessages({
5148
},
5249
issuingCertificatesSecondParagraph: {
5350
id: 'course-authoring.certificates.sidebar.issuing-certificates.second-paragraph',
54-
defaultMessage:
55-
'{strongText} delete certificates after a course has started; learners who have already earned certificates will no longer be able to access them.',
51+
defaultMessage: '{strongText} delete certificates after a course has started; learners who have already earned certificates will no longer be able to access them.',
5652
description: 'A warning against deleting certificates once a course has started, noting the impact on learners',
5753
},
5854
issuingCertificatesSecondParagraph_strong: {

0 commit comments

Comments
 (0)