From 6b820468ab1c6be53d3813515729361782415021 Mon Sep 17 00:00:00 2001 From: Dimitris Efstathiou Date: Wed, 15 Feb 2023 12:54:29 +0200 Subject: [PATCH 1/2] pkp/pkp-lib#8592 Fixes for tests --- public/globals.js | 6 +-- public/mailable.json | 18 ++++---- src/components/Composer/Composer.vue | 2 +- src/components/Form/FormLocales.vue | 2 +- .../Composer/previews/ExampleComposer.vue | 6 +-- .../Composer/previews/PreviewComposer.vue | 22 +++++----- .../previews/PreviewDecisionPage.vue | 38 ++++++++--------- .../previews/PreviewFieldTextInline.vue | 2 +- .../components/Form/helpers/field-base.js | 4 +- .../helpers/field-options-user-locales.js | 4 +- .../helpers/field-rich-textarea-abstract.js | 4 +- .../Form/helpers/field-rich-textarea-bio.js | 4 +- .../helpers/field-rich-textarea-signature.js | 6 +-- .../Form/helpers/field-text-affiliation.js | 4 +- .../Form/helpers/field-text-prefix.js | 4 +- .../Form/helpers/field-text-subtitle.js | 4 +- .../Form/helpers/field-text-title.js | 4 +- .../Form/helpers/form-announcement.js | 14 +++---- src/docs/components/Form/helpers/form-base.js | 2 +- .../components/Form/helpers/form-citations.js | 2 +- .../components/Form/helpers/form-confirm.js | 2 +- .../Form/helpers/form-email-template.js | 6 +-- .../Form/helpers/form-for-the-editors.js | 2 +- .../components/Form/helpers/form-groups.js | 2 +- .../Form/helpers/form-institution.js | 6 +-- .../components/Form/helpers/form-metadata.js | 2 +- .../Form/helpers/form-multilingual.js | 2 +- .../components/Form/helpers/form-relations.js | 2 +- src/docs/components/Form/helpers/form-test.js | 2 +- .../Form/helpers/form-title-abstract.js | 2 +- src/docs/components/Form/helpers/form-user.js | 2 +- src/docs/components/Form/helpers/form.js | 6 +-- .../Form/previews/PreviewErrors.vue | 4 +- .../PreviewAnnouncementsListPanel.vue | 20 ++++----- .../previews/PreviewCatalogListPanel.vue | 6 +-- .../previews/PreviewInstitutionsListPanel.vue | 16 +++---- .../PreviewSelectReviewerListPanel.vue | 2 +- .../PreviewSubmissionFilesListPanel.vue | 4 +- .../components/Page/previews/PreviewPage.vue | 8 ++-- .../previews/PreviewStatsPublicationsPage.vue | 2 +- .../previews/PreviewSubmissionWizardPage.vue | 2 +- .../components/Table/helpers/articleStats.js | 4 +- .../Table/helpers/articleStatsColumns.js | 2 +- .../previews/PreviewWorkflowPage.vue | 14 +++---- src/docs/data/announcement.js | 12 +++--- src/docs/data/authors.js | 20 ++++----- src/docs/data/categories.js | 24 +++++------ src/docs/data/emailTemplate.js | 6 +-- src/docs/data/fileAttachers.js | 4 +- src/docs/data/issue.js | 10 ++--- src/docs/data/issues.js | 6 +-- src/docs/data/publication.js | 42 +++++++++---------- src/docs/data/reviewer.js | 6 +-- src/docs/data/submissionFiles.js | 12 +++--- src/docs/data/submissions.js | 18 ++++---- src/docs/pages/localization.md | 2 +- 56 files changed, 217 insertions(+), 217 deletions(-) diff --git a/public/globals.js b/public/globals.js index 534456d40..d9508bcc3 100644 --- a/public/globals.js +++ b/public/globals.js @@ -148,9 +148,9 @@ window.pkp = { */ window.$.pkp = { app: { - currentLocale: 'en_US', - primaryLocale: 'en_US', - rtlLocales: ['ar_AR'] + currentLocale: 'en', + primaryLocale: 'en', + rtlLocales: ['ar'] }, pkpHandler() { alert( diff --git a/public/mailable.json b/public/mailable.json index 3c58a015e..398aabf9c 100644 --- a/public/mailable.json +++ b/public/mailable.json @@ -40,36 +40,36 @@ "alternateTo": null, "body": { "fr_CA": "Prière de saisir votre message.", - "en_US": "Please enter your message." + "en": "Please enter your message." }, "contextId": null, "id": null, "key": "DISCUSSION_NOTIFICATION_COPYEDITING", "name": { "fr_CA": "", - "en_US": "Discussion (Copyediting)" + "en": "Discussion (Copyediting)" }, "subject": { "fr_CA": "Un message à propos de la revue {$journalName}", - "en_US": "A message regarding {$journalName}" + "en": "A message regarding {$journalName}" } }, { "_href": "http://localhost:8000/pu/api/v1/emailTemplates/CITATION_EDITOR_AUTHOR_QUERY", "alternateTo": "DISCUSSION_NOTIFICATION_COPYEDITING", "body": { - "en_US": "{$recipientName},
\n
\nCould you please verify or provide us with the proper citation for the following reference from your article, {$submissionTitle}:
\n
\n{$rawCitation}
\n
\nThanks!
\n
\n{$senderName}
\nCopy-Editor, {$journalName}
\n", + "en": "{$recipientName},
\n
\nCould you please verify or provide us with the proper citation for the following reference from your article, {$submissionTitle}:
\n
\n{$rawCitation}
\n
\nThanks!
\n
\n{$senderName}
\nCopy-Editor, {$journalName}
\n", "fr_CA": "{$recipientName},
\n
\nPourriez-vous vérifier ou nous fournir la référence bibliographique complète pour la référence suivante, provenant de votre article « {$submissionTitle} » :
\n
\n{$rawCitation}
\n
\nMerci!
\n
\n{$senderName}
\nRéviseur-e, revue {$journalName}
\n" }, "contextId": 1, "id": 2, "key": "CITATION_EDITOR_AUTHOR_QUERY", "name": { - "en_US": "Question About Citation", + "en": "Question About Citation", "fr_CA": "" }, "subject": { - "en_US": "Citation Editing", + "en": "Citation Editing", "fr_CA": "Modification des références bibliographiques" } }, @@ -77,18 +77,18 @@ "_href": "http://localhost:8000/pu/api/v1/emailTemplates/COPYEDIT_REQUEST", "alternateTo": "DISCUSSION_NOTIFICATION_COPYEDITING", "body": { - "en_US": "

Dear {$recipientName},

A new submission is ready to be copyedited:

{$submissionId} {$submissionTitle}
{$journalName}

Please follow these steps to complete this task:

  1. 1. Click on the Submission URL below.
  2. 2. Open any files available under Draft Files and edit the files. Use the Copyediting Discussions area if you need to contact the editor(s) or author(s).
  3. 3. Save the copyedited file(s) and upload them to the Copyedited panel.
  4. 4. Use the Copyediting Discussions to notify the editor(s) that all files have been prepared, and that the Production process may begin.

If you are unable to undertake this work at this time or have any questions, please contact me. Thank you for your contribution to this journal.

Kind regards,

{$signature}", + "en": "

Dear {$recipientName},

A new submission is ready to be copyedited:

{$submissionId} {$submissionTitle}
{$journalName}

Please follow these steps to complete this task:

  1. 1. Click on the Submission URL below.
  2. 2. Open any files available under Draft Files and edit the files. Use the Copyediting Discussions area if you need to contact the editor(s) or author(s).
  3. 3. Save the copyedited file(s) and upload them to the Copyedited panel.
  4. 4. Use the Copyediting Discussions to notify the editor(s) that all files have been prepared, and that the Production process may begin.

If you are unable to undertake this work at this time or have any questions, please contact me. Thank you for your contribution to this journal.

Kind regards,

{$signature}", "fr_CA": "{$recipientName},
\n
\nJ'aimerais que vous effectuiez la révision du manuscrit intitulé « {$submissionTitle} » pour la revue {$journalName} à l'aide des étapes suivantes.
\n1. Cliquer sur l'URL de la soumission ci-dessous.
\n2. Ouvrir le(s) fichier(s) disponible(s) sous Fichiers des ébauches finales et effectuer votre révision, tout en ajoutant des discussions sur la révision, le cas échéant.
\n3. Enregistrer le(s) fichier(s) révisé(s) et le(s) téléverser dans la section Version(s) révisée(s).
\n4. Informer le,la rédacteur-trice que tous les fichiers ont été révisés et que l'étape de production peut débuter.
\n
\nURL de la revue {$journalName} : {$journalUrl}
\nURL de la soumission : {$submissionUrl}
\nNom d'utilisateur-trice : {$recipientUsername}" }, "contextId": 1, "id": 1, "key": "COPYEDIT_REQUEST", "name": { - "en_US": "Request Copyedit", + "en": "Request Copyedit", "fr_CA": "" }, "subject": { - "en_US": "Submission {$submissionId} is ready to be copyedited for {$contextAcronym}", + "en": "Submission {$submissionId} is ready to be copyedited for {$contextAcronym}", "fr_CA": "Demande de révision d'une soumission" } } diff --git a/src/components/Composer/Composer.vue b/src/components/Composer/Composer.vue index 993428c84..0ebb44168 100644 --- a/src/components/Composer/Composer.vue +++ b/src/components/Composer/Composer.vue @@ -207,7 +207,7 @@ name="body" :label="bodyLabel" groupId="message" - primaryLocale="en_US" + primaryLocale="en" :all-errors="errors" :init="bodyInit" :formId="id" diff --git a/src/components/Form/FormLocales.vue b/src/components/Form/FormLocales.vue index fcf836d77..9bc6a5e06 100644 --- a/src/components/Form/FormLocales.vue +++ b/src/components/Form/FormLocales.vue @@ -68,7 +68,7 @@ export default { * the primary locale and any other visible locale will be removed. The * primary locale is always visible. * - * @param {String} localeKey "en_US" + * @param {String} localeKey "en" */ toggleLocale: function (localeKey) { let selected = [this.primaryLocaleKey]; diff --git a/src/docs/components/Composer/previews/ExampleComposer.vue b/src/docs/components/Composer/previews/ExampleComposer.vue index 3de7b522c..08dc31ceb 100644 --- a/src/docs/components/Composer/previews/ExampleComposer.vue +++ b/src/docs/components/Composer/previews/ExampleComposer.vue @@ -26,19 +26,19 @@ export default { { key: 'EDITOR_DECISION_ACCEPT', subject: { - en_US: 'Editor Decision', + en: 'Editor Decision', }, }, { key: 'EXAMPLE_ONE', subject: { - en_US: 'Example One', + en: 'Example One', }, }, { key: 'EXAMPLE_TWO', subject: { - en_US: 'Example Two', + en: 'Example Two', }, }, ]; diff --git a/src/docs/components/Composer/previews/PreviewComposer.vue b/src/docs/components/Composer/previews/PreviewComposer.vue index 7f70917cc..b8faad6fa 100644 --- a/src/docs/components/Composer/previews/PreviewComposer.vue +++ b/src/docs/components/Composer/previews/PreviewComposer.vue @@ -68,48 +68,48 @@ export default { ...emailTemplate, key: 'ACCEPTED_CONDITIONAL', name: { - en_US: 'Accepted With Conditions', + en: 'Accepted With Conditions', }, subject: { - en_US: 'Accepted With Conditions', + en: 'Accepted With Conditions', }, }); emailTemplates.push({ ...emailTemplate, key: 'ACCEPTED_EARLY_PUBLICATION', name: { - en_US: 'Accepted for Early Publication', + en: 'Accepted for Early Publication', }, subject: { - en_US: 'Accepted for Early Publication', + en: 'Accepted for Early Publication', }, }); const recipientOptions = [ { value: 2, label: { - en_US: 'Carlo Corino', + en: 'Carlo Corino', fr_CA: 'Carlo Fr Corino', }, }, { value: 3, label: { - en_US: 'Daniel Barnes', + en: 'Daniel Barnes', fr_CA: 'Daniel Fr Barnes', }, }, { value: 4, label: { - en_US: 'Stephanie Minoue', + en: 'Stephanie Minoue', fr_CA: 'Stephanie Fr Minoue', }, }, { value: 5, label: { - en_US: 'Paul Hudson', + en: 'Paul Hudson', fr_CA: 'Paul Fr Hudson', }, }, @@ -125,10 +125,10 @@ export default { emailTemplates: emailTemplates, emailTemplatesApiUrl: 'http://localhost:8000/publicknowledge/api/v1/emailTemplates', - locale: 'en_US', + locale: 'en', locales: [ { - locale: 'en_US', + locale: 'en', name: 'English', }, { @@ -141,7 +141,7 @@ export default { recipientOptions: recipientOptions, recipients: recipientOptions.map((r) => r.value), variables: { - en_US: [...insertContent], + en: [...insertContent], fr_CA: [...insertContent], }, }; diff --git a/src/docs/components/DecisionPage/previews/PreviewDecisionPage.vue b/src/docs/components/DecisionPage/previews/PreviewDecisionPage.vue index cc26730d9..7ef8a9f3b 100644 --- a/src/docs/components/DecisionPage/previews/PreviewDecisionPage.vue +++ b/src/docs/components/DecisionPage/previews/PreviewDecisionPage.vue @@ -292,8 +292,8 @@ export default { id: 'default', }, ], - primaryLocale: 'en_US', - visibleLocales: ['en_US'], + primaryLocale: 'en', + visibleLocales: ['en'], supportedFormLocales: [], errors: {}, }, @@ -310,7 +310,7 @@ export default { { value: 31, label: { - en_US: 'Rana Baiyewu', + en: 'Rana Baiyewu', fr_CA: 'Rana Fr Baiyewu', }, }, @@ -322,42 +322,42 @@ export default { { ...emailTemplate, name: { - en_US: 'Accept for Publication', + en: 'Accept for Publication', }, subject: { - en_US: 'Accept for Publication', + en: 'Accept for Publication', }, }, { ...emailTemplate, key: 'EDITOR_DECISION_ACCEPT_CONDITIONS', name: { - en_US: 'Accept with Conditions', + en: 'Accept with Conditions', }, subject: { - en_US: 'Accept with Conditions', + en: 'Accept with Conditions', }, }, { ...emailTemplate, key: 'EDITOR_DECISION_ACCEPT_EARLY', name: { - en_US: 'Accept for Early Publication', + en: 'Accept for Early Publication', }, subject: { - en_US: 'Accept for Early Publication', + en: 'Accept for Early Publication', }, }, ], emailTemplatesApiUrl: 'http://example.org', variables: { - en_US: [...insertContent], + en: [...insertContent], fr_CA: [...insertContent], }, - locale: 'en_US', + locale: 'en', locales: [ { - locale: 'en_US', + locale: 'en', name: 'English', }, { @@ -383,14 +383,14 @@ export default { { value: 10, label: { - en_US: 'Adela Gallego', + en: 'Adela Gallego', fr_CA: 'Adela Gallego', }, }, { value: 9, label: { - en_US: 'Aisla McCrae', + en: 'Aisla McCrae', fr_CA: 'Aisla McCrae', }, }, @@ -403,26 +403,26 @@ export default { ...emailTemplate, key: 'EDITOR_DECISION_THANK_REVIEWERS', subject: { - en_US: 'Thank Reviewer', + en: 'Thank Reviewer', }, }, { ...emailTemplate, key: 'EDITOR_DECISION_THANK_REVIEWERS_REQUEST', subject: { - en_US: 'Thank Reviewer and Request Feedback', + en: 'Thank Reviewer and Request Feedback', }, }, ], emailTemplatesApiUrl: 'http://example.org', variables: { - en_US: [...insertContent], + en: [...insertContent], fr_CA: [...insertContent], }, - locale: 'en_US', + locale: 'en', locales: [ { - locale: 'en_US', + locale: 'en', name: 'English', }, { diff --git a/src/docs/components/Form/fields/FieldText/previews/PreviewFieldTextInline.vue b/src/docs/components/Form/fields/FieldText/previews/PreviewFieldTextInline.vue index dc722ac51..acaddd030 100644 --- a/src/docs/components/Form/fields/FieldText/previews/PreviewFieldTextInline.vue +++ b/src/docs/components/Form/fields/FieldText/previews/PreviewFieldTextInline.vue @@ -4,7 +4,7 @@ label="Title:" :is-label-inline="true" size="large" - localeKey="en_US" + localeKey="en" @change="change" /> diff --git a/src/docs/components/Form/helpers/field-base.js b/src/docs/components/Form/helpers/field-base.js index 132bee884..60e118cac 100644 --- a/src/docs/components/Form/helpers/field-base.js +++ b/src/docs/components/Form/helpers/field-base.js @@ -2,7 +2,7 @@ export default { groupId: 'default', formId: 'default', isRequired: false, - primaryLocale: 'en_US', - locales: ['en_US'], + primaryLocale: 'en', + locales: ['en'], allErrors: {}, }; diff --git a/src/docs/components/Form/helpers/field-options-user-locales.js b/src/docs/components/Form/helpers/field-options-user-locales.js index ed15c287b..862a26c32 100644 --- a/src/docs/components/Form/helpers/field-options-user-locales.js +++ b/src/docs/components/Form/helpers/field-options-user-locales.js @@ -9,7 +9,7 @@ export default { value: [], options: [ { - value: 'en_US', + value: 'en', label: 'English', }, { @@ -17,7 +17,7 @@ export default { label: 'French', }, { - value: 'ar_AR', + value: 'ar', label: 'عربى', }, ], diff --git a/src/docs/components/Form/helpers/field-rich-textarea-abstract.js b/src/docs/components/Form/helpers/field-rich-textarea-abstract.js index 2aaed125e..b06234a84 100644 --- a/src/docs/components/Form/helpers/field-rich-textarea-abstract.js +++ b/src/docs/components/Form/helpers/field-rich-textarea-abstract.js @@ -7,10 +7,10 @@ export default { plugins: 'paste,link,noneditable', toolbar: 'bold italic superscript subscript | link', value: { - en_US: + en: '

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

', fr_CA: '', - ar_AR: '', + ar: '', }, isMultilingual: true, wordCountLabel: 'Word Count: {$count}/{$limit}', diff --git a/src/docs/components/Form/helpers/field-rich-textarea-bio.js b/src/docs/components/Form/helpers/field-rich-textarea-bio.js index 67234b827..eceb5e5c5 100644 --- a/src/docs/components/Form/helpers/field-rich-textarea-bio.js +++ b/src/docs/components/Form/helpers/field-rich-textarea-bio.js @@ -8,9 +8,9 @@ export default { tooltip: 'Your biographical statement will usually include your department and rank, and may include research interests or key publications.', value: { - en_US: '', + en: '', fr_CA: '', - ar_AR: '', + ar: '', }, isMultilingual: true, }; diff --git a/src/docs/components/Form/helpers/field-rich-textarea-signature.js b/src/docs/components/Form/helpers/field-rich-textarea-signature.js index 422e310a1..4c37373b2 100644 --- a/src/docs/components/Form/helpers/field-rich-textarea-signature.js +++ b/src/docs/components/Form/helpers/field-rich-textarea-signature.js @@ -2,11 +2,11 @@ export default { name: 'signature', component: 'field-rich-textarea', label: { - en_US: 'Signature', + en: 'Signature', fr_CA: 'Signature', }, description: { - en_US: + en: 'Add a personal signature you would like to be included with any emails we send on your behalf.', fr_CA: 'Ajoutez une signature personnelle que vous souhaitez inclure dans les courriels que nous envoyons en votre nom.', @@ -16,7 +16,7 @@ export default { plugins: 'paste,link,noneditable', toolbar: 'bold italic superscript subscript | link', value: { - en_US: '', + en: '', fr_CA: '', }, }; diff --git a/src/docs/components/Form/helpers/field-text-affiliation.js b/src/docs/components/Form/helpers/field-text-affiliation.js index 4af2c80c9..e3569ec9a 100644 --- a/src/docs/components/Form/helpers/field-text-affiliation.js +++ b/src/docs/components/Form/helpers/field-text-affiliation.js @@ -6,8 +6,8 @@ export default { groupId: 'identity', isMultilingual: true, value: { - en_US: '', + en: '', fr_CA: '', - ar_AR: '', + ar: '', }, }; diff --git a/src/docs/components/Form/helpers/field-text-prefix.js b/src/docs/components/Form/helpers/field-text-prefix.js index 06afda28d..017a5b099 100644 --- a/src/docs/components/Form/helpers/field-text-prefix.js +++ b/src/docs/components/Form/helpers/field-text-prefix.js @@ -6,9 +6,9 @@ export default { description: 'Examples: A, The', size: 'small', value: { - en_US: 'The', + en: 'The', fr_CA: '', - ar_AR: '', + ar: '', }, isMultilingual: true, }; diff --git a/src/docs/components/Form/helpers/field-text-subtitle.js b/src/docs/components/Form/helpers/field-text-subtitle.js index aaacb7b49..fcee1a048 100644 --- a/src/docs/components/Form/helpers/field-text-subtitle.js +++ b/src/docs/components/Form/helpers/field-text-subtitle.js @@ -5,9 +5,9 @@ export default { label: 'Subtitle', size: 'large', value: { - en_US: 'A comparative analysis of functionality and roles', + en: 'A comparative analysis of functionality and roles', fr_CA: '', - ar_AR: '', + ar: '', }, isMultilingual: true, }; diff --git a/src/docs/components/Form/helpers/field-text-title.js b/src/docs/components/Form/helpers/field-text-title.js index 46a144b83..70b834c3a 100644 --- a/src/docs/components/Form/helpers/field-text-title.js +++ b/src/docs/components/Form/helpers/field-text-title.js @@ -6,9 +6,9 @@ export default { isRequired: true, size: 'large', value: { - en_US: 'Effect of Data Modelling and Conceptual Modelling', + en: 'Effect of Data Modelling and Conceptual Modelling', fr_CA: '', - ar_AR: '', + ar: '', }, isMultilingual: true, }; diff --git a/src/docs/components/Form/helpers/form-announcement.js b/src/docs/components/Form/helpers/form-announcement.js index 3e202564b..b2940a875 100644 --- a/src/docs/components/Form/helpers/form-announcement.js +++ b/src/docs/components/Form/helpers/form-announcement.js @@ -9,9 +9,9 @@ export default { { ...FieldTextTitle, value: { - en_US: '', + en: '', fr_CA: '', - ar_AR: '', + ar: '', }, groupId: 'default', }, @@ -23,9 +23,9 @@ export default { plugins: 'paste,link,noneditable', toolbar: 'bold italic superscript subscript | link', value: { - en_US: '', + en: '', fr_CA: '', - ar_AR: '', + ar: '', }, groupId: 'default', }, @@ -38,9 +38,9 @@ export default { plugins: 'paste,link,noneditable', toolbar: 'bold italic superscript subscript | link', value: { - en_US: '', + en: '', fr_CA: '', - ar_AR: '', + ar: '', }, groupId: 'default', }, @@ -84,7 +84,7 @@ export default { label: 'Français (Canada)', }, { - key: 'ar_AR', + key: 'ar', label: 'عربى', }, ], diff --git a/src/docs/components/Form/helpers/form-base.js b/src/docs/components/Form/helpers/form-base.js index 89c470aa1..110e30c74 100644 --- a/src/docs/components/Form/helpers/form-base.js +++ b/src/docs/components/Form/helpers/form-base.js @@ -28,7 +28,7 @@ export default { label: 'Français (Canada)', }, { - key: 'ar_AR', + key: 'ar', label: 'عربى', }, ], diff --git a/src/docs/components/Form/helpers/form-citations.js b/src/docs/components/Form/helpers/form-citations.js index e8a1cc383..aa2293225 100644 --- a/src/docs/components/Form/helpers/form-citations.js +++ b/src/docs/components/Form/helpers/form-citations.js @@ -27,7 +27,7 @@ export default { label: 'Français (Canada)', }, { - key: 'ar_AR', + key: 'ar', label: 'عربى', }, ], diff --git a/src/docs/components/Form/helpers/form-confirm.js b/src/docs/components/Form/helpers/form-confirm.js index 7e745d079..750f1a5ac 100644 --- a/src/docs/components/Form/helpers/form-confirm.js +++ b/src/docs/components/Form/helpers/form-confirm.js @@ -28,7 +28,7 @@ export default { label: 'Français (Canada)', }, { - key: 'ar_AR', + key: 'ar', label: 'عربى', }, ], diff --git a/src/docs/components/Form/helpers/form-email-template.js b/src/docs/components/Form/helpers/form-email-template.js index 59d323d87..f8c8dafce 100644 --- a/src/docs/components/Form/helpers/form-email-template.js +++ b/src/docs/components/Form/helpers/form-email-template.js @@ -12,7 +12,7 @@ export default { label: 'Name', name: 'name', value: { - en_US: '', + en: '', fr_CA: '', }, isMultilingual: true, @@ -24,7 +24,7 @@ export default { label: 'Subject', isMultilingual: true, value: { - en_US: '', + en: '', fr_CA: '', }, groupId: 'default', @@ -41,7 +41,7 @@ export default { toolbar: 'bold italic superscript subscript | link | blockquote bullist numlist', value: { - en_US: '', + en: '', fr_CA: '', }, insertLabel: 'Insert', diff --git a/src/docs/components/Form/helpers/form-for-the-editors.js b/src/docs/components/Form/helpers/form-for-the-editors.js index 4bd9f66f3..bec49d9fc 100644 --- a/src/docs/components/Form/helpers/form-for-the-editors.js +++ b/src/docs/components/Form/helpers/form-for-the-editors.js @@ -43,7 +43,7 @@ export default { label: 'Français (Canada)', }, { - key: 'ar_AR', + key: 'ar', label: 'عربى', }, ], diff --git a/src/docs/components/Form/helpers/form-groups.js b/src/docs/components/Form/helpers/form-groups.js index d6692db1a..ffa53deca 100644 --- a/src/docs/components/Form/helpers/form-groups.js +++ b/src/docs/components/Form/helpers/form-groups.js @@ -27,7 +27,7 @@ export default { label: 'Français (Canada)', }, { - key: 'ar_AR', + key: 'ar', label: 'عربى', }, ], diff --git a/src/docs/components/Form/helpers/form-institution.js b/src/docs/components/Form/helpers/form-institution.js index 8ee95c6c4..8cf6dca39 100644 --- a/src/docs/components/Form/helpers/form-institution.js +++ b/src/docs/components/Form/helpers/form-institution.js @@ -13,9 +13,9 @@ export default { isRequired: true, size: 'large', value: { - en_US: '', + en: '', fr_CA: '', - ar_AR: '', + ar: '', }, isMultilingual: true, groupId: 'default', @@ -45,7 +45,7 @@ export default { label: 'Français (Canada)', }, { - key: 'ar_AR', + key: 'ar', label: 'عربى', }, ], diff --git a/src/docs/components/Form/helpers/form-metadata.js b/src/docs/components/Form/helpers/form-metadata.js index a7d59d84a..c1b51082b 100644 --- a/src/docs/components/Form/helpers/form-metadata.js +++ b/src/docs/components/Form/helpers/form-metadata.js @@ -27,7 +27,7 @@ export default { label: 'Français (Canada)', }, { - key: 'ar_AR', + key: 'ar', label: 'عربى', }, ], diff --git a/src/docs/components/Form/helpers/form-multilingual.js b/src/docs/components/Form/helpers/form-multilingual.js index eb8c25a66..56088566a 100644 --- a/src/docs/components/Form/helpers/form-multilingual.js +++ b/src/docs/components/Form/helpers/form-multilingual.js @@ -25,7 +25,7 @@ export default { label: 'Français (Canada)', }, { - key: 'ar_AR', + key: 'ar', label: 'عربى', }, ], diff --git a/src/docs/components/Form/helpers/form-relations.js b/src/docs/components/Form/helpers/form-relations.js index 1ff0ff992..d49b65abb 100644 --- a/src/docs/components/Form/helpers/form-relations.js +++ b/src/docs/components/Form/helpers/form-relations.js @@ -40,7 +40,7 @@ export default { label: 'Français (Canada)', }, { - key: 'ar_AR', + key: 'ar', label: 'عربى', }, ], diff --git a/src/docs/components/Form/helpers/form-test.js b/src/docs/components/Form/helpers/form-test.js index 8d4abf47b..77f650498 100644 --- a/src/docs/components/Form/helpers/form-test.js +++ b/src/docs/components/Form/helpers/form-test.js @@ -35,7 +35,7 @@ export default { label: 'Français (Canada)', }, { - key: 'ar_AR', + key: 'ar', label: 'عربى', }, ], diff --git a/src/docs/components/Form/helpers/form-title-abstract.js b/src/docs/components/Form/helpers/form-title-abstract.js index 1ff0ff992..d49b65abb 100644 --- a/src/docs/components/Form/helpers/form-title-abstract.js +++ b/src/docs/components/Form/helpers/form-title-abstract.js @@ -40,7 +40,7 @@ export default { label: 'Français (Canada)', }, { - key: 'ar_AR', + key: 'ar', label: 'عربى', }, ], diff --git a/src/docs/components/Form/helpers/form-user.js b/src/docs/components/Form/helpers/form-user.js index 8f9f939df..4f8af08c6 100644 --- a/src/docs/components/Form/helpers/form-user.js +++ b/src/docs/components/Form/helpers/form-user.js @@ -81,7 +81,7 @@ export default { label: 'Français (Canada)', }, { - key: 'ar_AR', + key: 'ar', label: 'عربى', }, ], diff --git a/src/docs/components/Form/helpers/form.js b/src/docs/components/Form/helpers/form.js index cde5fbc89..b095449be 100644 --- a/src/docs/components/Form/helpers/form.js +++ b/src/docs/components/Form/helpers/form.js @@ -13,11 +13,11 @@ export default { }, }, ], - primaryLocale: 'en_US', - visibleLocales: ['en_US'], + primaryLocale: 'en', + visibleLocales: ['en'], supportedFormLocales: [ { - key: 'en_US', + key: 'en', label: 'English', }, ], diff --git a/src/docs/components/Form/previews/PreviewErrors.vue b/src/docs/components/Form/previews/PreviewErrors.vue index 6f0181147..3dd20a608 100644 --- a/src/docs/components/Form/previews/PreviewErrors.vue +++ b/src/docs/components/Form/previews/PreviewErrors.vue @@ -17,9 +17,9 @@ export default { errors: { email: ['Please provide a valid email address'], affiliation: { - en_US: ['You must enter your affiliation in English.'], + en: ['You must enter your affiliation in English.'], fr_CA: ['You must enter your affiliation in French.'], - ar_AR: ['You must enter your affiliation in Arabic.'], + ar: ['You must enter your affiliation in Arabic.'], }, 'user-locales': ['You must select at least two options.'], bio: { diff --git a/src/docs/components/ListPanel/previews/PreviewAnnouncementsListPanel.vue b/src/docs/components/ListPanel/previews/PreviewAnnouncementsListPanel.vue index 7a959eae3..7779ba873 100644 --- a/src/docs/components/ListPanel/previews/PreviewAnnouncementsListPanel.vue +++ b/src/docs/components/ListPanel/previews/PreviewAnnouncementsListPanel.vue @@ -31,9 +31,9 @@ export default { datePosted: '2020-01-29', id: 1, title: { - en_US: 'Eros in cursus turpis massa tincidunt dui ut ornare lectus', + en: 'Eros in cursus turpis massa tincidunt dui ut ornare lectus', fr_CA: 'Eros in cursus turpis massa tincidunt dui ut ornare lectus', - ar_AR: 'Eros in cursus turpis massa tincidunt dui ut ornare lectus', + ar: 'Eros in cursus turpis massa tincidunt dui ut ornare lectus', }, }, { @@ -42,11 +42,11 @@ export default { datePosted: '2019-12-12', id: 2, title: { - en_US: + en: 'Elit ullamcorper dignissim cras tincidunt lobortis feugiat vivamus at turpis massa tincidunt dui ut ornare lectus', fr_CA: 'Elit ullamcorper dignissim cras tincidunt lobortis feugiat vivamus at turpis massa tincidunt dui ut ornare lectus', - ar_AR: + ar: 'Elit ullamcorper dignissim cras tincidunt lobortis feugiat vivamus at turpis massa tincidunt dui ut ornare lectus', }, }, @@ -56,9 +56,9 @@ export default { datePosted: '2019-11-09', id: 3, title: { - en_US: 'Risus feugiat in ante metus dictum at', + en: 'Risus feugiat in ante metus dictum at', fr_CA: 'Risus feugiat in ante metus dictum at', - ar_AR: 'Risus feugiat in ante metus dictum at', + ar: 'Risus feugiat in ante metus dictum at', }, }, { @@ -67,11 +67,11 @@ export default { datePosted: '2019-09-21', id: 4, title: { - en_US: + en: 'Morbi tincidunt ornare massa eget egestas purus viverra accumsan', fr_CA: 'Morbi tincidunt ornare massa eget egestas purus viverra accumsan', - ar_AR: + ar: 'Morbi tincidunt ornare massa eget egestas purus viverra accumsan', }, }, @@ -81,9 +81,9 @@ export default { datePosted: '2019-05-15', id: 5, title: { - en_US: 'Nibh praesent tristique magna sit amet purus gravida quis', + en: 'Nibh praesent tristique magna sit amet purus gravida quis', fr_CA: 'Nibh praesent tristique magna sit amet purus gravida quis', - ar_AR: 'Nibh praesent tristique magna sit amet purus gravida quis', + ar: 'Nibh praesent tristique magna sit amet purus gravida quis', }, }, ]; diff --git a/src/docs/components/ListPanel/previews/PreviewCatalogListPanel.vue b/src/docs/components/ListPanel/previews/PreviewCatalogListPanel.vue index 3eab262c9..6026be1cf 100644 --- a/src/docs/components/ListPanel/previews/PreviewCatalogListPanel.vue +++ b/src/docs/components/ListPanel/previews/PreviewCatalogListPanel.vue @@ -105,11 +105,11 @@ export default { }, }, ], - primaryLocale: 'en_US', - visibleLocales: ['en_US'], + primaryLocale: 'en', + visibleLocales: ['en'], supportedFormLocales: [ { - key: 'en_US', + key: 'en', label: 'English', }, ], diff --git a/src/docs/components/ListPanel/previews/PreviewInstitutionsListPanel.vue b/src/docs/components/ListPanel/previews/PreviewInstitutionsListPanel.vue index 77fd15a1e..9d3e2652a 100644 --- a/src/docs/components/ListPanel/previews/PreviewInstitutionsListPanel.vue +++ b/src/docs/components/ListPanel/previews/PreviewInstitutionsListPanel.vue @@ -26,35 +26,35 @@ export default { { id: 1, name: { - en_US: 'Institution 1 Name EN', + en: 'Institution 1 Name EN', fr_CA: 'Institution 1 Name FR', - ar_AR: 'Institution 1 Name AR', + ar: 'Institution 1 Name AR', }, ipRanges: ['142.60.*.*'], }, { id: 2, name: { - en_US: 'Institution 2 Name EN', + en: 'Institution 2 Name EN', fr_CA: 'Institution 2 Name FR', - ar_AR: 'Institution 2 Name AR', + ar: 'Institution 2 Name AR', }, ipRanges: ['142.58.103.1 - 142.58.103.4', '142.59.*.*'], }, { id: 3, name: { - en_US: 'Institution 3 Name EN', + en: 'Institution 3 Name EN', fr_CA: 'Institution 3 Name FR', - ar_AR: 'Institution 3 Name AR', + ar: 'Institution 3 Name AR', }, }, { id: 4, name: { - en_US: 'Institution 4 Name EN', + en: 'Institution 4 Name EN', fr_CA: 'Institution 4 Name FR', - ar_AR: 'Institution 4 Name AR', + ar: 'Institution 4 Name AR', }, }, ]; diff --git a/src/docs/components/ListPanel/previews/PreviewSelectReviewerListPanel.vue b/src/docs/components/ListPanel/previews/PreviewSelectReviewerListPanel.vue index 449326895..fa0c826a9 100644 --- a/src/docs/components/ListPanel/previews/PreviewSelectReviewerListPanel.vue +++ b/src/docs/components/ListPanel/previews/PreviewSelectReviewerListPanel.vue @@ -67,7 +67,7 @@ export default { reviewerRating: 5, orcid: 'http://orcid.org/0000-0002-1825-0097', biography: { - en_US: + en: '

Professor Aisla McCrae is a senior research fellow in the Publishing Studies Department in the School of Publishing at the University of Manitoba. She is the deputy chair of the Manitoba Publishing Institute and the author of Publishing Now and Forever: Recent Developments in Archival Permanence.

', }, gossip: diff --git a/src/docs/components/ListPanel/previews/PreviewSubmissionFilesListPanel.vue b/src/docs/components/ListPanel/previews/PreviewSubmissionFilesListPanel.vue index 870e08cfc..2e8717558 100644 --- a/src/docs/components/ListPanel/previews/PreviewSubmissionFilesListPanel.vue +++ b/src/docs/components/ListPanel/previews/PreviewSubmissionFilesListPanel.vue @@ -13,7 +13,7 @@ :items="components.preview.items" :options="components.preview.options" otherLabel="Other" - primaryLocale="en_US" + primaryLocale="en" removeConfirmLabel="Are you sure you want to remove this file?" :stageId="1" title="Files" @@ -44,7 +44,7 @@ export default { id: 235, fileId: 1234, name: { - en_US: 'file-with-no-genre-assignment-yet.docx', + en: 'file-with-no-genre-assignment-yet.docx', fr_CA: 'french-file-with-no-genre-assignment-yet.docx', }, genre: null, diff --git a/src/docs/components/Page/previews/PreviewPage.vue b/src/docs/components/Page/previews/PreviewPage.vue index eed997eaa..6071c66d0 100644 --- a/src/docs/components/Page/previews/PreviewPage.vue +++ b/src/docs/components/Page/previews/PreviewPage.vue @@ -63,7 +63,7 @@
  • @@ -223,12 +223,12 @@ export default { url: 'http://example.org', }, ], - currentLocale: 'en_US', + currentLocale: 'en', hasMultipleContexts: true, isLoggedInAs: 'ccorino', locales: [ { - key: 'en_US', + key: 'en', name: 'English', }, { @@ -236,7 +236,7 @@ export default { name: 'Français (Canada)', }, { - key: 'ar_AR', + key: 'ar', name: 'العربية', }, ], diff --git a/src/docs/components/StatsPage/previews/PreviewStatsPublicationsPage.vue b/src/docs/components/StatsPage/previews/PreviewStatsPublicationsPage.vue index b5d6dd8be..b7f76018c 100644 --- a/src/docs/components/StatsPage/previews/PreviewStatsPublicationsPage.vue +++ b/src/docs/components/StatsPage/previews/PreviewStatsPublicationsPage.vue @@ -299,7 +299,7 @@ export default { const items = articleStats.filter((row) => { if (this.searchPhrase) { if ( - !row.object.fullTitle.en_US.includes(this.searchPhrase) && + !row.object.fullTitle.en.includes(this.searchPhrase) && row.object.id != this.searchPhrase && !row.object.authorString.includes(this.searchPhrase) ) { diff --git a/src/docs/components/SubmissionWizardPage/previews/PreviewSubmissionWizardPage.vue b/src/docs/components/SubmissionWizardPage/previews/PreviewSubmissionWizardPage.vue index fd829c769..d48e07724 100644 --- a/src/docs/components/SubmissionWizardPage/previews/PreviewSubmissionWizardPage.vue +++ b/src/docs/components/SubmissionWizardPage/previews/PreviewSubmissionWizardPage.vue @@ -72,7 +72,7 @@ :items="components.submissionFiles.items" :options="components.submissionFiles.options" otherLabel="Other" - primaryLocale="en_US" + primaryLocale="en" removeConfirmLabel="Are you sure you want to remove this file?" :stageId="1" title="Files" diff --git a/src/docs/components/Table/helpers/articleStats.js b/src/docs/components/Table/helpers/articleStats.js index 114faffdd..125cacba7 100644 --- a/src/docs/components/Table/helpers/articleStats.js +++ b/src/docs/components/Table/helpers/articleStats.js @@ -21,7 +21,7 @@ const baseStat = { object: { id: 1, fullTitle: { - en_US: getRandomTitle(baseTitle), + en: getRandomTitle(baseTitle), }, sectionId: 1, authorString: 'Carlo Corino', @@ -37,7 +37,7 @@ for (let i = 1; i < 61; i++) { ...baseStat.object, id: i, fullTitle: { - en_US: getRandomTitle(baseTitle), + en: getRandomTitle(baseTitle), }, sectionId: sectionIds[Math.floor(Math.random() * sectionIds.length)], }, diff --git a/src/docs/components/Table/helpers/articleStatsColumns.js b/src/docs/components/Table/helpers/articleStatsColumns.js index a02d75d75..6f1186f3f 100644 --- a/src/docs/components/Table/helpers/articleStatsColumns.js +++ b/src/docs/components/Table/helpers/articleStatsColumns.js @@ -11,7 +11,7 @@ export default [ label: 'Title', isRowHeader: true, value(row) { - return row.object.fullTitle.en_US; + return row.object.fullTitle.en; }, }, { diff --git a/src/docs/components/WorkflowPage/previews/PreviewWorkflowPage.vue b/src/docs/components/WorkflowPage/previews/PreviewWorkflowPage.vue index 1af8e19b6..a8845dbb4 100644 --- a/src/docs/components/WorkflowPage/previews/PreviewWorkflowPage.vue +++ b/src/docs/components/WorkflowPage/previews/PreviewWorkflowPage.vue @@ -314,7 +314,7 @@ export default { lastModified: '2019-06-03 18:03:32', status: 1, title: { - en_US: 'Amet sit dolor ipsum lorem', + en: 'Amet sit dolor ipsum lorem', fr_CA: 'FR Amet sit dolor ipsum lorem', }, version: 3, @@ -346,14 +346,14 @@ export default { ...fieldGivenName, groupId: 'default', isMultilingual: true, - value: {en_US: ''}, + value: {en: ''}, }, { ...fieldFamilyName, isRequired: false, groupId: 'default', isMultilingual: true, - value: {en_US: ''}, + value: {en: ''}, }, { ...fieldFamilyName, @@ -362,7 +362,7 @@ export default { isRequired: false, groupId: 'default', isMultilingual: true, - value: {en_US: ''}, + value: {en: ''}, }, { ...fieldEmail, @@ -409,9 +409,9 @@ export default { ], groups: [{id: 'default', pageId: 'default'}], pages: [{id: 'default', submitButton: {label: 'Save'}}], - primaryLocale: 'en_US', - visibleLocales: ['en_US'], - supportedFormLocales: [{key: 'en_US', label: 'English'}], + primaryLocale: 'en', + visibleLocales: ['en'], + supportedFormLocales: [{key: 'en', label: 'English'}], errors: {}, }, }, diff --git a/src/docs/data/announcement.js b/src/docs/data/announcement.js index fd51f38a1..58b07c045 100644 --- a/src/docs/data/announcement.js +++ b/src/docs/data/announcement.js @@ -16,20 +16,20 @@ export default { dateExpire: '2022-02-03', datePosted: '2020-01-29', description: { - en_US: description, + en: description, fr_CA: description, - ar_AR: description, + ar: description, }, descriptionShort: { - en_US: descriptionShort, + en: descriptionShort, fr_CA: descriptionShort, - ar_AR: descriptionShort, + ar: descriptionShort, }, id: 1, title: { - en_US: 'Eros in cursus turpis massa tincidunt dui ut ornare lectus', + en: 'Eros in cursus turpis massa tincidunt dui ut ornare lectus', fr_CA: 'Eros in cursus turpis massa tincidunt dui ut ornare lectus', - ar_AR: 'Eros in cursus turpis massa tincidunt dui ut ornare lectus', + ar: 'Eros in cursus turpis massa tincidunt dui ut ornare lectus', }, typeId: 1, }; diff --git a/src/docs/data/authors.js b/src/docs/data/authors.js index 9782ddc13..08e1b0813 100644 --- a/src/docs/data/authors.js +++ b/src/docs/data/authors.js @@ -1,16 +1,16 @@ export const dbarnes = { affiliation: { - en_US: 'Public Knowledge Project', + en: 'Public Knowledge Project', fr_CA: '', }, email: 'dbarnes@mailinator.com', familyName: { - en_US: 'Barnes', + en: 'Barnes', fr_CA: '', }, fullName: 'Daniel Barnes', givenName: { - en_US: 'Daniel', + en: 'Daniel', fr_CA: '', }, id: 20, @@ -18,37 +18,37 @@ export const dbarnes = { orcid: '', preferredPublicName: { fr_CA: '', - en_US: '', + en: '', }, publicationId: 17, seq: 1, userGroupId: 14, userGroupName: { fr_CA: '', - en_US: 'Author', + en: 'Author', }, }; export const lipsum = { affiliation: { - en_US: 'University of Public Knowledge', + en: 'University of Public Knowledge', fr_CA: '', }, email: 'lipsum@mailinator.com', familyName: { - en_US: 'Ipsum', + en: 'Ipsum', fr_CA: 'Ipsum', }, fullName: 'Dr. L. P. Ipsum', givenName: { - en_US: 'Lorem', + en: 'Lorem', fr_CA: 'French Lorem', }, id: 21, includeInBrowse: true, orcid: 'https://orcid.org/0000-0001-5756-5406', preferredPublicName: { - en_US: 'Dr. L. P. Ipsum', + en: 'Dr. L. P. Ipsum', fr_CA: 'Dr F. L. P. Ipsum', }, publicationId: 17, @@ -56,7 +56,7 @@ export const lipsum = { userGroupId: 14, userGroupName: { fr_CA: '', - en_US: 'Author', + en: 'Author', }, }; diff --git a/src/docs/data/categories.js b/src/docs/data/categories.js index 1fbb4d776..a8005ae66 100644 --- a/src/docs/data/categories.js +++ b/src/docs/data/categories.js @@ -2,7 +2,7 @@ export default [ { contextId: 1, description: { - en_US: '', + en: '', fr_CA: '', }, id: 1, @@ -11,14 +11,14 @@ export default [ sequence: 1, sortOption: 'datePublished', title: { - en_US: 'Applied Science', + en: 'Applied Science', fr_CA: '', }, }, { contextId: 1, description: { - en_US: '', + en: '', fr_CA: '', }, id: 2, @@ -27,14 +27,14 @@ export default [ sequence: 2, sortOption: 'sequence', title: { - en_US: 'Computer Science', + en: 'Computer Science', fr_CA: '', }, }, { contextId: 1, description: { - en_US: '', + en: '', fr_CA: '', }, id: 3, @@ -43,14 +43,14 @@ export default [ sequence: 3, sortOption: 'datePublished', title: { - en_US: 'Engineering', + en: 'Engineering', fr_CA: '', }, }, { contextId: 1, description: { - en_US: '', + en: '', fr_CA: '', }, id: 4, @@ -59,14 +59,14 @@ export default [ sequence: 2, sortOption: 'title', title: { - en_US: 'Social Sciences', + en: 'Social Sciences', fr_CA: '', }, }, { contextId: 1, description: { - en_US: '', + en: '', fr_CA: '', }, id: 5, @@ -75,14 +75,14 @@ export default [ sequence: 1, sortOption: 'title', title: { - en_US: 'Sociology', + en: 'Sociology', fr_CA: '', }, }, { contextId: 1, description: { - en_US: '', + en: '', fr_CA: '', }, id: 6, @@ -91,7 +91,7 @@ export default [ sequence: 2, sortOption: 'title', title: { - en_US: 'Anthropology', + en: 'Anthropology', fr_CA: '', }, }, diff --git a/src/docs/data/emailTemplate.js b/src/docs/data/emailTemplate.js index 8833e9c45..3edc369d1 100644 --- a/src/docs/data/emailTemplate.js +++ b/src/docs/data/emailTemplate.js @@ -2,7 +2,7 @@ export default { _href: 'http://localhost:8000/publicknowledge/api/v1/emailTemplates/EDITOR_DECISION_ACCEPT', body: { - en_US: `

    Dear {$senderName},

    + en: `

    Dear {$senderName},

    I am delighted to inform you that your submission, {$submissionTitle}, has been accepted for publication. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

    Sincerely,

    {$senderName}
    {$journalName}

    `, @@ -15,11 +15,11 @@ export default { id: null, key: 'EDITOR_DECISION_ACCEPT', name: { - en_US: 'Accept for Publication', + en: 'Accept for Publication', }, stageId: 3, subject: { - en_US: + en: 'Your submission has been accepted for publication in {$journalName}', fr_CA: 'Votre soumission a été acceptée pour publication dans {$journalName}', diff --git a/src/docs/data/fileAttachers.js b/src/docs/data/fileAttachers.js index dde1c001f..a60f5decb 100644 --- a/src/docs/data/fileAttachers.js +++ b/src/docs/data/fileAttachers.js @@ -30,7 +30,7 @@ export default [ { id: 142, name: { - en_US: 'jpk-review-document.docx', + en: 'jpk-review-document.docx', }, documentType: 'word', url: 'http://example.org', @@ -39,7 +39,7 @@ export default [ { id: 191, name: { - en_US: 'review-for-jpk.docx', + en: 'review-for-jpk.docx', }, documentType: 'word', url: 'http://example.org', diff --git a/src/docs/data/issue.js b/src/docs/data/issue.js index 30dc70756..586c0fada 100644 --- a/src/docs/data/issue.js +++ b/src/docs/data/issue.js @@ -15,7 +15,7 @@ export default { authorsString: 'Catherine Kwantes', authorsStringShort: 'Kwantes', fullTitle: { - en_US: + en: 'Quisque vel ultrices ut vel sollicitudin vel varius suscipit phasellus', }, isPublished: true, @@ -38,18 +38,18 @@ export default { }, ], coverImageAltText: { - en_US: '', + en: '', fr_CA: '', }, coverImageUrl: { - en_US: '', + en: '', fr_CA: '', }, dateNotified: null, datePublished: '2020-09-18 20:41:39', doiObject: {...doi}, description: { - en_US: '', + en: '', fr_CA: '', }, galleys: [], @@ -60,7 +60,7 @@ export default { 'pub-id::doi': '10.987/iss123', publishedUrl: 'http://localhost:8080/publicknowledge/issue/view/1', title: { - en_US: 'Issue Number 1', + en: 'Issue Number 1', fr_CA: 'Issue Number 1', }, volume: 1, diff --git a/src/docs/data/issues.js b/src/docs/data/issues.js index b15bd5810..b67506f9e 100644 --- a/src/docs/data/issues.js +++ b/src/docs/data/issues.js @@ -13,7 +13,7 @@ export default [ identifier: '10.987/iss456', }, title: { - en_US: 'Issue Number 2', + en: 'Issue Number 2', fr_CA: 'Issue Number 2', }, }, @@ -27,7 +27,7 @@ export default [ identifier: '10.987/iss789', }, title: { - en_US: 'Issue Number 3', + en: 'Issue Number 3', fr_CA: 'Issue Number 3', }, }, @@ -41,7 +41,7 @@ export default [ identifier: '10.987/iss012', }, title: { - en_US: 'Issue Number 4', + en: 'Issue Number 4', fr_CA: 'Issue Number 4', }, }, diff --git a/src/docs/data/publication.js b/src/docs/data/publication.js index 776106622..f51976dca 100644 --- a/src/docs/data/publication.js +++ b/src/docs/data/publication.js @@ -5,7 +5,7 @@ export default { _href: 'http://localhost:8000/publicknowledge/api/v1/submissions/17/publications/17', abstract: { - en_US: + en: '

    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

    ', fr_CA: '

    FR Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

    ', @@ -17,29 +17,29 @@ export default { categoryIds: [2, 3], citations: { fr_CA: '', - en_US: '', + en: '', }, copyrightHolder: { fr_CA: '', - en_US: '', + en: '', }, copyrightYear: null, coverImage: { fr_CA: null, - en_US: null, + en: null, }, coverage: { fr_CA: '', - en_US: '', + en: '', }, datePublished: null, disciplines: { fr_CA: [], - en_US: [], + en: [], }, doiObject: {...doi}, fullTitle: { - en_US: + en: 'The Lorem ipsum dolor sit amet: Excepteur sint occaecat cupidatat non proident', fr_CA: 'Le Frorem ipsum dolor sit amet: Frexcepteur sint occaecat cupidatat non proident', @@ -50,7 +50,7 @@ export default { id: 7, isApproved: false, label: 'PDF', - locale: 'en_US', + locale: 'en', doiObject: {...doi}, publicationId: 17, seq: 0, @@ -62,7 +62,7 @@ export default { id: 8, isApproved: false, label: 'Remote', - locale: 'en_US', + locale: 'en', doiObject: {...doi}, publicationId: 17, seq: 1, @@ -74,7 +74,7 @@ export default { id: 9, isApproved: false, label: 'Supplementaru', - locale: 'en_US', + locale: 'en', doiObject: {...doi}, publicationId: 17, seq: 2, @@ -87,56 +87,56 @@ export default { isPublished: false, issueId: null, keywords: { - en_US: ['new keyword', 'and second keyword'], + en: ['new keyword', 'and second keyword'], fr_CA: ['fr keyword one', 'fr keyword two'], }, language: null, lastModified: '2019-06-06 15:00:37', licenseUrl: null, - locale: 'en_US', + locale: 'en', pages: null, prefix: { fr_CA: 'Le', - en_US: 'The', + en: 'The', }, primaryContactId: 20, 'pub-id::publisher-id': 'lorem-ipsum', publicationDateType: 'pub', publicationSummary: { fr_CA: '', - en_US: '', + en: '', }, publicationType: 'publication', rights: { fr_CA: '', - en_US: '', + en: '', }, sectionId: 1, seq: 0, source: { fr_CA: '', - en_US: '', + en: '', }, subjects: { fr_CA: [], - en_US: [], + en: [], }, submissionId: 17, subtitle: { - en_US: 'Excepteur sint occaecat cupidatat non proident', + en: 'Excepteur sint occaecat cupidatat non proident', fr_CA: 'Frexcepteur sint occaecat cupidatat non proident', }, supportingAgencies: { fr_CA: [], - en_US: [], + en: [], }, title: { - en_US: 'Lorem ipsum dolor sit amet', + en: 'Lorem ipsum dolor sit amet', fr_CA: 'Frorem ipsum dolor sit amet', }, type: { fr_CA: '', - en_US: '', + en: '', }, urlPublished: 'http://localhost:8000/publicknowledge/article/view/lorem-ipsum/version/17', diff --git a/src/docs/data/reviewer.js b/src/docs/data/reviewer.js index a38319cbd..cbba517ff 100644 --- a/src/docs/data/reviewer.js +++ b/src/docs/data/reviewer.js @@ -4,16 +4,16 @@ export default { userName: 'exampleuser', fullName: 'Jane Doe', affiliation: { - en_US: 'University of Nowhere', + en: 'University of Nowhere', }, groups: [ { id: 1, name: { - en_US: 'Reviewer', + en: 'Reviewer', }, abbrev: { - en_US: 'RV', + en: 'RV', }, roleId: 4096, // reviewer showTitle: true, diff --git a/src/docs/data/submissionFiles.js b/src/docs/data/submissionFiles.js index 48ed21746..5d13f5f8b 100644 --- a/src/docs/data/submissionFiles.js +++ b/src/docs/data/submissionFiles.js @@ -3,12 +3,12 @@ export default [ id: 232, fileId: 1232, name: { - en_US: 'influence-lactation-final-v2-edited-final.docx', + en: 'influence-lactation-final-v2-edited-final.docx', fr_CA: 'french-influence-lactation-final-v2-edited-final.docx', }, genreId: 1, genreName: { - en_US: 'Book Manuscript', + en: 'Book Manuscript', fr_CA: 'FR Book Manuscript', }, genreIsDependent: false, @@ -21,12 +21,12 @@ export default [ id: 233, fileId: 1233, name: { - en_US: 'ccorino-disclosure-statement.docx', + en: 'ccorino-disclosure-statement.docx', fr_CA: 'french-ccorino-disclosure-statement.docx', }, genreId: 1, genreName: { - en_US: 'Other', + en: 'Other', fr_CA: 'FR Other', }, genreIsDependent: false, @@ -40,12 +40,12 @@ export default [ id: 234, fileId: 1234, name: { - en_US: 'influence-lactation-dataset-approved.xls', + en: 'influence-lactation-dataset-approved.xls', fr_CA: 'french-influence-lactation-dataset-approved.xls', }, genreId: 1, genreName: { - en_US: 'Dataset', + en: 'Dataset', fr_CA: 'FR Dataset', }, genreIsDependent: false, diff --git a/src/docs/data/submissions.js b/src/docs/data/submissions.js index 731a77ab4..d25d75145 100644 --- a/src/docs/data/submissions.js +++ b/src/docs/data/submissions.js @@ -21,7 +21,7 @@ export default [ crossref_failedMsg: 'This is a sample failure message', }, fullTitle: { - en_US: + en: 'Quisque vel ultrices ut vel sollicitudin vel varius suscipit phasellus', }, isPublished: true, @@ -50,7 +50,7 @@ export default [ authorsString: 'Domatilia Sokoloff', authorsStringShort: 'Sokoloff', fullTitle: { - en_US: 'Metus ut elit est ultrices vivamus mauris est quisque arcu', + en: 'Metus ut elit est ultrices vivamus mauris est quisque arcu', }, }, ], @@ -81,7 +81,7 @@ export default [ authorsString: '', authorsStringShort: '', fullTitle: { - en_US: + en: 'Submission title when current user is assigned as reviewer and editor', }, }, @@ -128,7 +128,7 @@ export default [ authorsString: 'Convallis Tellus', authorsStringShort: 'Tellus', fullTitle: { - en_US: + en: 'Scelerisque felis imperdiet proin fermentum: Pretium quam vulputate dignissim suspendisse in est', }, }, @@ -188,7 +188,7 @@ export default [ authorsString: 'Curabitur Eget', authorsStringShort: 'Eget', fullTitle: { - en_US: 'Mi eget mauris pharetra et ultrices neque ornare aenean', + en: 'Mi eget mauris pharetra et ultrices neque ornare aenean', }, }, ], @@ -247,7 +247,7 @@ export default [ authorsString: 'Sed Aenean', authorsStringShort: 'Aenean', fullTitle: { - en_US: 'Sed sed mattis amet eget aenean leo est nam sit', + en: 'Sed sed mattis amet eget aenean leo est nam sit', }, }, ], @@ -295,7 +295,7 @@ export default [ authorsString: 'Lacus Agittis', authorsStringShort: 'Agittis', fullTitle: { - en_US: 'Lacus ut leo dolor nam neque nam dolor aenean sagittis', + en: 'Lacus ut leo dolor nam neque nam dolor aenean sagittis', }, }, ], @@ -343,7 +343,7 @@ export default [ authorsString: 'Ullamco Excepteur', authorsStringShort: 'Excepteur', fullTitle: { - en_US: + en: 'Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur', }, }, @@ -390,7 +390,7 @@ export default [ authorsString: '', authorsStringShort: '', fullTitle: { - en_US: 'Submission title when current user has completed a review', + en: 'Submission title when current user has completed a review', }, }, ], diff --git a/src/docs/pages/localization.md b/src/docs/pages/localization.md index fdd21745b..233010028 100644 --- a/src/docs/pages/localization.md +++ b/src/docs/pages/localization.md @@ -38,7 +38,7 @@ Multilingual fields are provided as a JSON object with keys specifying the local ```js { "name": { - "en_US": "Journal of Public Knowledge", + "en": "Journal of Public Knowledge", "fr_CA": "Journal de la connaissance du public" }, ... From 854a6aa2402e5d7ebeaee18021ef77ad87989a1e Mon Sep 17 00:00:00 2001 From: Dimitris Efstathiou Date: Wed, 15 Feb 2023 13:07:44 +0200 Subject: [PATCH 2/2] pkp/pkp-lib#8598 Translation fixes --- src/docs/components/Form/fields/FieldBase/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/docs/components/Form/fields/FieldBase/readme.md b/src/docs/components/Form/fields/FieldBase/readme.md index 84d04c3b1..e4c450e71 100644 --- a/src/docs/components/Form/fields/FieldBase/readme.md +++ b/src/docs/components/Form/fields/FieldBase/readme.md @@ -16,7 +16,7 @@ | `localeKey` | If the field `isMultilingual`, this will be set to the locale key of this particular instance. This is passed down from the `Form`. | | `primaryLocale` | The primary locale for this form. This is passed down from the `Form`. | | `locales` | The locales supported by this form. This is passed down from the `Form`. | -| `showWhen` | The `name` of another field which should have a truthy value before this field is shown. You can also pass an array to require a specific value. For example, `['primaryLocale', 'en_US']` would hide this field unless the `primaryLocale` field had a value of `en_US`. | +| `showWhen` | The `name` of another field which should have a truthy value before this field is shown. You can also pass an array to require a specific value. For example, `['primaryLocale', 'en']` would hide this field unless the `primaryLocale` field had a value of `en`. | | `value` | The current value. | | `allErrors` | An object containing all errors in the form. This is passed down from the `Form`. |