Skip to content

Commit

Permalink
Commit before fix
Browse files Browse the repository at this point in the history
  • Loading branch information
PG-Momik committed Jan 10, 2023
1 parent ff08665 commit 061e6a0
Show file tree
Hide file tree
Showing 39 changed files with 3,939 additions and 3,632 deletions.
2,895 changes: 1,493 additions & 1,402 deletions app/IATI/Data/elementJsonSchema.json

Large diffs are not rendered by default.

842 changes: 421 additions & 421 deletions app/IATI/Data/organizationElementJsonSchema.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions app/IATI/Elements/Builder/BaseFormCreator.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function editForm(array $model, $formData, $method, string $parent_url):
],
'buttons' => [
'clear' => [
'label' => 'Cancel',
'label' => trans('buttons.cancel'),
'attr' => [
'type' => 'anchor',
'class' => 'ghost-btn mr-8',
Expand All @@ -69,7 +69,7 @@ public function editForm(array $model, $formData, $method, string $parent_url):
],

'submit' => [
'label' => 'Save and Exit',
'label' => trans('buttons.save_and_exit'),
'attr' => [
'type' => 'submit',
'class' => 'primary-btn save-btn',
Expand Down
4 changes: 2 additions & 2 deletions app/IATI/Elements/Builder/MultilevelSubElementFormCreator.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ public function editForm(array $model, $formData, $method, string $parent_url):
],
'buttons' => [
'clear' => [
'label' => 'Cancel',
'label' => trans('buttons.cancel'),
'attr' => [
'type' => 'anchor',
'class' => 'ghost-btn mr-8',
'href' => $parent_url,
],
],
'submit' => [
'label' => 'Save and Exit',
'label' => trans('buttons.save_and_exit'),
'attr' => [
'type' => 'submit',
'class' => 'primary-btn save-btn',
Expand Down
4 changes: 2 additions & 2 deletions app/IATI/Elements/Builder/ParentCollectionFormCreator.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ public function editForm(array $model, $formData, $method, string $parent_url):
],
'buttons' => [
'clear' => [
'label' => 'Cancel',
'label' => trans('buttons.cancel'),
'attr' => [
'type' => 'anchor',
'class' => 'ghost-btn mr-8',
'href' => $parent_url,
],
],
'submit' => [
'label' => 'Save and Exit',
'label' => trans('buttons.save_and_exit'),
'attr' => [
'type' => 'submit',
'class' => 'primary-btn save-btn',
Expand Down
4 changes: 2 additions & 2 deletions app/IATI/Elements/Builder/ResultElementFormCreator.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ public function editForm(array $model, $formData, $method, string $parent_url):
],
'buttons' => [
'clear' => [
'label' => 'Cancel',
'label' => trans('buttons.cancel'),
'attr' => [
'type' => 'anchor',
'class' => 'ghost-btn mr-8',
'href' => $parent_url,
],
],
'submit' => [
'label' => 'Save and Exit',
'label' => trans('buttons.save_and_exit'),
'attr' => [
'type' => 'submit',
'class' => 'primary-btn save-btn',
Expand Down
4 changes: 2 additions & 2 deletions app/IATI/Elements/Builder/TransactionElementFormCreator.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ public function editForm(array $model, $formData, $method, string $parent_url):
],
'buttons' => [
'clear' => [
'label' => 'Cancel',
'label' => trans('buttons.cancel'),
'attr' => [
'type' => 'anchor',
'class' => 'ghost-btn mr-8',
'href' => $parent_url,
],
],
'submit' => [
'label' => 'Save and Exit',
'label' => trans('buttons.save_and_exit'),
'attr' => [
'type' => 'submit',
'class' => 'primary-btn save-btn',
Expand Down
9 changes: 4 additions & 5 deletions app/IATI/Models/User/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,10 @@ public static function sendEmail(): void
{
VerifyEmail::toMailUsing(function ($notifiable, $url) {
return (new MailMessage)
->subject('Verify Email Address')
->greeting('Hello ' . $notifiable->full_name)
->line('Welcome to IATI Publisher. Your email has been used to create a new account here.
Please click the button below to verify that you have created the account in it.')
->action('Verify Email Address', $url);
->subject(trans('common.sendEmail.verify_email_address'))
->greeting(trans('common.sendEmail.hello') . $notifiable->full_name)
->line(trans('common.sendEmail.line'))
->action(trans('common.sendEmail.verify_email_address'), $url);
});
}

Expand Down
8 changes: 4 additions & 4 deletions app/IATI/Services/Workflow/ActivityWorkflowService.php
Original file line number Diff line number Diff line change
Expand Up @@ -266,16 +266,16 @@ public function getPublishErrorMessage($organization, string $type = 'activity')
$messages = [];

if (!$this->isUserVerified()) {
$messages[] = 'You have not verified your email address.';
$messages[] = trans('common.error.publish_error_1');
}
if ($this->hasNoPublisherInfo($organization->settings)) {
$messages[] = 'Your API Key is not valid or it is empty.';
$messages[] = trans('common.error.publish_error_2');
}
if ($type === 'activity' && !$this->isOrganizationPublished($organization)) {
$messages[] = 'Your Organisation data is not published.';
$messages[] = trans('common.error.publish_error_3');
}
if (!$this->organizationService->isPublisherStateActive($organization['publisher_id'])) {
$messages[] = 'The Publisher ID is not verified in IATI Registry.';
$messages[] = trans('common.error.publish_error_4');
}

return $messages;
Expand Down
2 changes: 1 addition & 1 deletion lang/en/activities.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

return [
'your_activities' => 'Your Activities_en',
'your_activities' => 'Your Activities',
'what_is_activity' => [
'label' => 'What is an activity?',
'description' => [
Expand Down
24 changes: 13 additions & 11 deletions lang/en/buttons.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
'download_all' => "Download all",
'add_activity' => "Add activity ",
'cancel' => "Cancel",
'save_and_exit' => "Save and Exit",
'close' => "Close",
'save' => "Save",
'publish' => "Publish",
Expand Down Expand Up @@ -42,24 +43,25 @@
'next_step' => "Next Step",
'step' => "Step",
'out_of' => "out of",
'save_data' => "Saved data",


/**
* ":something" is replaced by translated line in vue files
* {{language.button_lang.#key#.replace(':something', language.common_lang.#key for value#)}}
**/
'delete_confirmation' => "Are you sure you want to delete this :something ?",
'unpublish_confirmation' => "Are you sure you want to delete this :something ?",
'add_something' => "add :something",
'edit_something' => "edit :something",
'view_something' => "view :something",
'delete_something' => "delete :something",
'show_something' => "show :something",
'download_something' => "download :something",
'delete_confirmation' => "Are you sure you want to delete this :something ?",
'unpublish_confirmation' => "Are you sure you want to delete this :something ?",
'add_something' => "add :something",
'edit_something' => "edit :something",
'view_something' => "view :something",
'delete_something' => "delete :something",
'show_something' => "show :something",
'download_something' => "download :something",


/**Not yet translation lines**/
'not_yet_added_period' => "You haven't added any period yet.",
'not_yet_added_period_btn' => "Add new indicator",
'not_yet_added_indicator' => "You haven't added any indicator yet.",
'not_yet_added_period' => "You haven't added any period yet.",
'not_yet_added_period_btn' => "Add new indicator",
'not_yet_added_indicator' => "You haven't added any indicator yet.",
];
22 changes: 19 additions & 3 deletions lang/en/common.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,10 @@
'alert' => "Alert",
'item' => "Item",
'help' => "Help",
'country' => "Country",
'activity_detail_page' => "Activity Detail Page",
'you_are_logged_in' => "You are logged in!",


/**
* ":something missing", something is replaced by other keyword
Expand Down Expand Up @@ -260,20 +264,25 @@
'enter_activity_title' => "Enter an activity title text",
],

'error' => [
'error' => [
'default' => 'Error',
'activity_could_not_be_published' => 'Activity couldn\'t be published because',
'org_could_not_be_published' => 'Organisation couldn\'t be published because',

'publish_error_1' => 'You have not verified your email address.',
'publish_error_2' => 'Your API Key is not valid or it is empty.',
'publish_error_3' => 'Your Organisation data is not published.',
'publish_error_4' => 'The Publisher ID is not verified in IATI Registry.',
],
//for ValidationErrors.vue error message
'message' => [
'message' => [
'critical' => 'Data will not be available on the IATI Datastore and may not be available on other data portals/tools/software that use IATI data. We highly recommend you fix these issue(s) before publishing.',
'warning' => 'We highly recommend you fix these issue(s) before publishing your activity to improve the quality and usefulness of your data.',
'no_error' => '<b>Congratulations! No errors were found.</b> Publish your data now. This data will be available on the IATI Datastore and other data portals/tools/ software that use IATI data.',
],

//for sticky messages generated in PublishButton.vue
'sticky' => [
'sticky' => [
'title_1' => 'Activity will be validated before publishing',
'description_1' => 'This activity will be first validated before publishing the activity to the IATI Registry.',
'title_2' => 'IATI Validation',
Expand All @@ -290,4 +299,11 @@
'view_information' => 'View information about these errors/warnings at the top of the activity page.',
],
],

// for sendEmail() in User/User.php
'sendEmail' => [
'verify_email_address' => 'Verify Email Address',
'greeting' => 'Hello',
'line' => 'Welcome to IATI Publisher. Your email has been used to create a new account here. Please click the button below to verify that you have created the account in it.'
]
];
Loading

0 comments on commit 061e6a0

Please sign in to comment.